summaryrefslogtreecommitdiff
path: root/contrib
diff options
context:
space:
mode:
authorLibravatar Simon Hausmann <hausmann@kde.org>2007-01-31 23:03:01 +0100
committerLibravatar Simon Hausmann <hausmann@kde.org>2007-01-31 23:03:01 +0100
commit71f7c0d0bb20936fc831e49bbfc9355f1e5ca211 (patch)
tree23ac0b880b1ffaecac6aeb9b77378f9be0ae66af /contrib
parentFixed displaying import progress by calling flush on stdout. (diff)
downloadtgif-71f7c0d0bb20936fc831e49bbfc9355f1e5ca211.tar.xz
Create a git tag for every changeset imported from perforce.
Signed-off-by: Simon Hausmann <hausmann@kde.org>
Diffstat (limited to 'contrib')
-rw-r--r--contrib/fast-import/p4-fast-export.py15
1 files changed, 13 insertions, 2 deletions
diff --git a/contrib/fast-import/p4-fast-export.py b/contrib/fast-import/p4-fast-export.py
index a1dc54013e..588554d672 100644
--- a/contrib/fast-import/p4-fast-export.py
+++ b/contrib/fast-import/p4-fast-export.py
@@ -98,12 +98,17 @@ for change in changes:
author = description["user"]
gitStream.write("commit refs/heads/master\n")
+ committer = ""
if author in users:
- gitStream.write("committer %s %s %s\n" % (users[author], epoch, tz))
+ committer = "%s %s %s" % (users[author], epoch, tz)
else:
- gitStream.write("committer %s <a@b> %s %s\n" % (author, epoch, tz))
+ committer = "%s <a@b> %s %s" % (author, epoch, tz)
+
+ gitStream.write("committer %s\n" % committer)
+
gitStream.write("data <<EOT\n")
gitStream.write(description["desc"])
+ gitStream.write("\n[ imported from %s; change %s ]\n" % (prefix, change))
gitStream.write("EOT\n\n")
fnum = 0
@@ -137,6 +142,12 @@ for change in changes:
gitStream.write("\n")
+ gitStream.write("tag p4/%s\n" % change)
+ gitStream.write("from refs/heads/master\n");
+ gitStream.write("tagger %s\n" % committer);
+ gitStream.write("data 0\n\n")
+
+
gitStream.close()
gitOutput.close()
gitError.close()