mirror of
https://github.com/frej/fast-export.git
synced 2025-11-12 13:45:41 +01:00
a little script to ease debugging of perforce's python output
This commit is contained in:
25
p4-debug.p4
Executable file
25
p4-debug.p4
Executable file
@@ -0,0 +1,25 @@
|
|||||||
|
#!/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()
|
||||||
|
|
||||||
Reference in New Issue
Block a user