From dd6a102dfc6efffb72e36cce8dfdf0ba3c8252f5 Mon Sep 17 00:00:00 2001 From: Simon Hausmann Date: Thu, 8 Feb 2007 23:00:19 +0100 Subject: [PATCH] a little script to ease debugging of perforce's python output --- p4-debug.p4 | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100755 p4-debug.p4 diff --git a/p4-debug.p4 b/p4-debug.p4 new file mode 100755 index 0000000..8fb159f --- /dev/null +++ b/p4-debug.p4 @@ -0,0 +1,25 @@ +#!/usr/bin/python +# +# p4-debug.py +# +# Author: Simon Hausmann +# License: MIT +# +# 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() + -- 2.11.4.GIT