From: Anand Kumria Date: Sun, 10 Aug 2008 18:26:26 +0000 (+0100) Subject: Have a command that specifically invokes 'p4' (via system) X-Git-Tag: v1.6.0~2^2~11 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=bf9320f1512d7ad4a17a64cfe5a593bba5037b3e;p=git.git Have a command that specifically invokes 'p4' (via system) Similiar to our 'p4_read_pipe_lines' command, we can isolate specific changes to the invocation method in the one location with this change. Signed-off-by: Anand Kumria Signed-off-by: Junio C Hamano --- diff --git a/contrib/fast-import/git-p4 b/contrib/fast-import/git-p4 index 3deaa4255..08acd517b 100755 --- a/contrib/fast-import/git-p4 +++ b/contrib/fast-import/git-p4 @@ -70,6 +70,13 @@ def system(cmd): if os.system(cmd) != 0: die("command failed: %s" % cmd) +def p4_system(cmd): + """Specifically invoke p4 as the system command. """ + real_cmd = "%s %s" % ("p4", cmd) + if verbose: + print real_cmd + return system(real_cmd) + def isP4Exec(kind): """Determine if a Perforce 'kind' should have execute permission