Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
Minor cleanups and print an error message of git fast-import if it fails.
author
Simon Hausmann
<hausmann@kde.org>
Wed, 7 Feb 2007 21:57:01 +0000
(22:57 +0100)
committer
Simon Hausmann
<hausmann@kde.org>
Wed, 7 Feb 2007 21:57:01 +0000
(22:57 +0100)
Signed-off-by: Simon Hausmann <hausmann@kde.org>
contrib/fast-import/p4-fast-export.py
patch
|
blob
|
history
raw
|
patch
|
inline
| side by side (from parent 1:
6d48d12
)
diff --git
a/contrib/fast-import/p4-fast-export.py
b/contrib/fast-import/p4-fast-export.py
index 19f5f034763a348668811891a892b8480b8c8511..06de0eae6d5e26cb8d09fffd1cebe978b1e2ea22 100755
(executable)
--- a/
contrib/fast-import/p4-fast-export.py
+++ b/
contrib/fast-import/p4-fast-export.py
@@
-154,6
+154,9
@@
def getUserMap():
sys.stderr.write("\n")
tz = - time.timezone / 36
sys.stderr.write("\n")
tz = - time.timezone / 36
+tzsign = ("%s" % tz)[0]
+if tzsign != '+' and tzsign != '-':
+ tz = "+" + ("%s" % tz)
if len(revision) > 0:
print "Doing initial import of %s from revision %s" % (prefix, revision)
if len(revision) > 0:
print "Doing initial import of %s from revision %s" % (prefix, revision)
@@
-165,21
+168,25
@@
def getUserMap():
fileCnt = 0
for info in p4CmdList("files %s...%s" % (prefix, revision)):
fileCnt = 0
for info in p4CmdList("files %s...%s" % (prefix, revision)):
+ change = info["change"]
+ if change > newestRevision:
+ newestRevision = change
+
if info["action"] == "delete":
continue
if info["action"] == "delete":
continue
+
for prop in [ "depotFile", "rev", "action", "type" ]:
details["%s%s" % (prop, fileCnt)] = info[prop]
for prop in [ "depotFile", "rev", "action", "type" ]:
details["%s%s" % (prop, fileCnt)] = info[prop]
- change = info["change"]
- if change > newestRevision:
- newestRevision = change
-
fileCnt = fileCnt + 1
details["change"] = newestRevision
gitOutput, gitStream, gitError = popen2.popen3("git-fast-import")
fileCnt = fileCnt + 1
details["change"] = newestRevision
gitOutput, gitStream, gitError = popen2.popen3("git-fast-import")
- commit(details)
+ try:
+ commit(details)
+ except:
+ print gitError.read()
gitStream.close()
gitOutput.close()
gitStream.close()
gitOutput.close()