Skip to content

Commit bf9320f

Browse files
Anand Kumriagitster
authored andcommitted
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent b340fa4 commit bf9320f

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

contrib/fast-import/git-p4

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,13 @@ def system(cmd):
7070
if os.system(cmd) != 0:
7171
die("command failed: %s" % cmd)
7272

73+
def p4_system(cmd):
74+
"""Specifically invoke p4 as the system command. """
75+
real_cmd = "%s %s" % ("p4", cmd)
76+
if verbose:
77+
print real_cmd
78+
return system(real_cmd)
79+
7380
def isP4Exec(kind):
7481
"""Determine if a Perforce 'kind' should have execute permission
7582

0 commit comments

Comments
 (0)