1
0
mirror of https://github.com/git/git.git synced 2024-10-04 05:11:31 +02:00
git/contrib/fast-import/p4-debug.p4
Simon Hausmann 20c7bc76b9 Added a little helper script to debug the output of the p4 python interface.
Signed-off-by: Simon Hausmann <simon@lst.de>
2007-02-08 23:00:19 +01:00

26 lines
481 B
Plaintext
Executable File

#!/usr/bin/python
#
# p4-debug.py
#
# Author: Simon Hausmann <hausmann@kde.org>
# License: MIT <http://www.opensource.org/licenses/mit-license.php>
#
# executes a p4 command with -G and prints the resulting python dicts
#
import os, string, sys
import marshal, popen2
cmd = ""
for arg in sys.argv[1:]:
cmd += arg + " "
pipe = os.popen("p4 -G %s" % cmd, "rb")
try:
while True:
entry = marshal.load(pipe)
print entry
except EOFError:
pass
pipe.close()