@matheusbsbs / matheus-bagliano / commits / bf9320f151
Fork 0

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 <wildfire@progsoc.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Anand Kumria committed Aug 10, 2008 at 19:26 UTC bf9320f1512d7ad4a17a64cfe5a593bba5037b3e
1 file changed +7
contrib/fast-import/git-p4
+7
@@ -70,6 +70,13 @@ def system(cmd):
70 if os.system(cmd) != 0:
71 die("command failed: %s" % cmd)
72
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 +
80 def isP4Exec(kind):
81 """Determine if a Perforce 'kind' should have execute permission
82