Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
Some fixes to the timezone conversion between the date of a perforce change and the git commit.
author
Simon Hausmann
<hausmann@kde.org>
Wed, 31 Jan 2007 18:43:16 +0000
(19:43 +0100)
committer
Simon Hausmann
<hausmann@kde.org>
Wed, 31 Jan 2007 18:43:16 +0000
(19:43 +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 (parent:
72b2f0a
)
diff --git
a/contrib/fast-import/p4-fast-export.py
b/contrib/fast-import/p4-fast-export.py
index 689349d551aa62d4ddc9dff40b238dc0c3086438..f3b5f35cb35fa69f28f4d8ab145496b7d52040d3 100644
(file)
--- a/
contrib/fast-import/p4-fast-export.py
+++ b/
contrib/fast-import/p4-fast-export.py
@@
-46,7
+46,7
@@
def describe(change):
splitted = firstLine.split(" ")
author = splitted[3]
author = author[:author.find("@")]
splitted = firstLine.split(" ")
author = splitted[3]
author = author[:author.find("@")]
- tm = time.strptime(splitted[5] + " " + splitted[6]
+ time.tzname[0], "%Y/%m/%d %H:%M:%S %Z
")
+ tm = time.strptime(splitted[5] + " " + splitted[6]
, "%Y/%m/%d %H:%M:%S
")
epoch = int(time.mktime(tm))
filesSection = 0
epoch = int(time.mktime(tm))
filesSection = 0
@@
-126,6
+126,8
@@
def getUserMap():
sys.stderr.write("\n")
sys.stderr.write("\n")
+tz = - time.timezone / 36
+
cnt = 1
for change in changes:
[ author, log, epoch, changedFiles, removedFiles ] = describe(change)
cnt = 1
for change in changes:
[ author, log, epoch, changedFiles, removedFiles ] = describe(change)
@@
-137,9
+139,9
@@
def getUserMap():
print "commit refs/heads/master"
if author in users:
print "commit refs/heads/master"
if author in users:
- print "committer %s %s
+0000" % (users[author], epoch
)
+ print "committer %s %s
%s" % (users[author], epoch, tz
)
else:
else:
- print "committer %s <a@b> %s
+0000" % (author, epoch
)
+ print "committer %s <a@b> %s
%s" % (author, epoch, tz
)
print "data <<EOT"
for l in log:
print l[:len(l) - 1]
print "data <<EOT"
for l in log:
print l[:len(l) - 1]