summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 9466d47)
raw | patch | inline | side by side (parent: 9466d47)
author | Simon Hausmann <hausmann@kde.org> | |
Wed, 31 Jan 2007 19:48:39 +0000 (20:48 +0100) | ||
committer | Simon Hausmann <hausmann@kde.org> | |
Wed, 31 Jan 2007 19:48:39 +0000 (20:48 +0100) |
Signed-off-by: Simon Hausmann <hausmann@kde.org>
contrib/fast-import/p4-fast-export.py | patch | blob | history |
index 72a4fd70a5bc200c1758b4cb56e2dfa9a6523104..e284b195024cf3cbbe90655babe2e650d9629855 100644 (file)
# - don't hardcode the import to master
#
import os, string, sys, time
+import marshal
if len(sys.argv) != 2:
sys.stderr.write("usage: %s //depot/path[@revRange]\n" % sys.argv[0]);
if not prefix.endswith("/"):
prefix += "/"
+def p4Cmd(cmd):
+ pipe = os.popen("p4 -G %s" % cmd, "rb")
+ result = {}
+ try:
+ while True:
+ entry = marshal.load(pipe)
+ result.update(entry)
+ except EOFError:
+ pass
+ pipe.close()
+ return result
+
def describe(change):
output = os.popen("p4 describe %s" % change).readlines()
return author, log, epoch, changed, removed
-def p4cat(path):
- return os.popen("p4 print -q \"%s\"" % path).read()
-
def p4Stat(path):
output = os.popen("p4 fstat -Ol \"%s\"" % path).readlines()
fileSize = 0