Code

When trying to map p4 integrations to git merges just record it as a single merge...
[git.git] / contrib / fast-import / p4-debug.p4
1 #!/usr/bin/python
2 #
3 # p4-debug.py
4 #
5 # Author: Simon Hausmann <hausmann@kde.org>
6 # License: MIT <http://www.opensource.org/licenses/mit-license.php>
7 #
8 # executes a p4 command with -G and prints the resulting python dicts
9 #
10 import os, string, sys
11 import marshal, popen2
13 cmd = ""
14 for arg in sys.argv[1:]:
15     cmd += arg + " "
17 pipe = os.popen("p4 -G %s" % cmd, "rb")
18 try:
19     while True:
20         entry = marshal.load(pipe)
21         print entry
22 except EOFError:
23     pass
24 pipe.close()