summaryrefslogtreecommitdiff
path: root/git-p4.py
diff options
context:
space:
mode:
Diffstat (limited to 'git-p4.py')
-rwxr-xr-xgit-p4.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/git-p4.py b/git-p4.py
index e3a2791e05..2fa581789c 100755
--- a/git-p4.py
+++ b/git-p4.py
@@ -313,7 +313,7 @@ def p4_move(src, dest):
p4_system(["move", "-k", wildcard_encode(src), wildcard_encode(dest)])
def p4_last_change():
- results = p4CmdList(["changes", "-m", "1"])
+ results = p4CmdList(["changes", "-m", "1"], skip_info=True)
return int(results[0]['change'])
def p4_describe(change):
@@ -321,7 +321,7 @@ def p4_describe(change):
the presence of field "time". Return a dict of the
results."""
- ds = p4CmdList(["describe", "-s", str(change)])
+ ds = p4CmdList(["describe", "-s", str(change)], skip_info=True)
if len(ds) != 1:
die("p4 describe -s %d did not return 1 result: %s" % (change, str(ds)))
@@ -509,7 +509,7 @@ def isModeExec(mode):
def isModeExecChanged(src_mode, dst_mode):
return isModeExec(src_mode) != isModeExec(dst_mode)
-def p4CmdList(cmd, stdin=None, stdin_mode='w+b', cb=None):
+def p4CmdList(cmd, stdin=None, stdin_mode='w+b', cb=None, skip_info=False):
if isinstance(cmd,basestring):
cmd = "-G " + cmd
@@ -545,6 +545,9 @@ def p4CmdList(cmd, stdin=None, stdin_mode='w+b', cb=None):
try:
while True:
entry = marshal.load(p4.stdout)
+ if skip_info:
+ if 'code' in entry and entry['code'] == 'info':
+ continue
if cb is not None:
cb(entry)
else: