summaryrefslogtreecommitdiff
path: root/contrib/fast-import/p4-debug.py
diff options
context:
space:
mode:
authorLibravatar Simon Hausmann <simon@lst.de>2007-03-10 09:49:19 +0100
committerLibravatar Simon Hausmann <simon@lst.de>2007-03-10 09:49:19 +0100
commita0f22e996c9d2f0e2a4a8feae852478f4aa667b5 (patch)
treeb89013cee58e3e49790e6c93a058d05b1f314f99 /contrib/fast-import/p4-debug.py
parentChanged --known-branches to take a file as argument instead of a comma separa... (diff)
downloadtgif-a0f22e996c9d2f0e2a4a8feae852478f4aa667b5.tar.xz
Fixed p4-debug file extension.
Signed-off-by: Simon Hausmann <simon@lst.de>
Diffstat (limited to 'contrib/fast-import/p4-debug.py')
-rwxr-xr-xcontrib/fast-import/p4-debug.py25
1 files changed, 25 insertions, 0 deletions
diff --git a/contrib/fast-import/p4-debug.py b/contrib/fast-import/p4-debug.py
new file mode 100755
index 0000000000..8fb159fd6a
--- /dev/null
+++ b/contrib/fast-import/p4-debug.py
@@ -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()
+