Minor code cleanups.
Signed-off-by: Simon Hausmann <simon@lst.de>
This commit is contained in:
parent
20c7bc76b9
commit
b41507a427
@ -183,6 +183,8 @@ tzsign = ("%s" % tz)[0]
|
|||||||
if tzsign != '+' and tzsign != '-':
|
if tzsign != '+' and tzsign != '-':
|
||||||
tz = "+" + ("%s" % tz)
|
tz = "+" + ("%s" % tz)
|
||||||
|
|
||||||
|
gitOutput, gitStream, gitError = popen2.popen3("git-fast-import")
|
||||||
|
|
||||||
if len(revision) > 0:
|
if len(revision) > 0:
|
||||||
print "Doing initial import of %s from revision %s" % (prefix, revision)
|
print "Doing initial import of %s from revision %s" % (prefix, revision)
|
||||||
|
|
||||||
@ -207,15 +209,11 @@ if len(revision) > 0:
|
|||||||
|
|
||||||
details["change"] = newestRevision
|
details["change"] = newestRevision
|
||||||
|
|
||||||
gitOutput, gitStream, gitError = popen2.popen3("git-fast-import")
|
|
||||||
try:
|
try:
|
||||||
commit(details)
|
commit(details)
|
||||||
except:
|
except:
|
||||||
print gitError.read()
|
print gitError.read()
|
||||||
|
|
||||||
gitStream.close()
|
|
||||||
gitOutput.close()
|
|
||||||
gitError.close()
|
|
||||||
else:
|
else:
|
||||||
output = os.popen("p4 changes %s...%s" % (prefix, changeRange)).readlines()
|
output = os.popen("p4 changes %s...%s" % (prefix, changeRange)).readlines()
|
||||||
|
|
||||||
@ -230,8 +228,6 @@ else:
|
|||||||
print "no changes to import!"
|
print "no changes to import!"
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
|
||||||
gitOutput, gitStream, gitError = popen2.popen3("git-fast-import")
|
|
||||||
|
|
||||||
cnt = 1
|
cnt = 1
|
||||||
for change in changes:
|
for change in changes:
|
||||||
description = p4Cmd("describe %s" % change)
|
description = p4Cmd("describe %s" % change)
|
||||||
@ -246,12 +242,12 @@ else:
|
|||||||
print gitError.read()
|
print gitError.read()
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
|
||||||
gitStream.close()
|
|
||||||
gitOutput.close()
|
|
||||||
gitError.close()
|
|
||||||
|
|
||||||
print ""
|
print ""
|
||||||
|
|
||||||
|
gitStream.close()
|
||||||
|
gitOutput.close()
|
||||||
|
gitError.close()
|
||||||
|
|
||||||
os.popen("git-repo-config p4.depotpath %s" % prefix).read()
|
os.popen("git-repo-config p4.depotpath %s" % prefix).read()
|
||||||
|
|
||||||
sys.exit(0)
|
sys.exit(0)
|
||||||
|
Loading…
Reference in New Issue
Block a user