summaryrefslogtreecommitdiff
path: root/contrib/fast-import/git-p4
diff options
context:
space:
mode:
authorAnand Kumria <wildfire@progsoc.org>2008-08-10 18:26:26 (GMT)
committerJunio C Hamano <gitster@pobox.com>2008-08-12 01:57:03 (GMT)
commitbf9320f1512d7ad4a17a64cfe5a593bba5037b3e (patch)
treedf7026815808f5b3aa6717520c3c60dd8c04c775 /contrib/fast-import/git-p4
parentb340fa43017437988e233ed4fd8dc00042614071 (diff)
downloadgit-bf9320f1512d7ad4a17a64cfe5a593bba5037b3e.zip
git-bf9320f1512d7ad4a17a64cfe5a593bba5037b3e.tar.gz
git-bf9320f1512d7ad4a17a64cfe5a593bba5037b3e.tar.bz2
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>
Diffstat (limited to 'contrib/fast-import/git-p4')
-rwxr-xr-xcontrib/fast-import/git-p47
1 files changed, 7 insertions, 0 deletions
diff --git a/contrib/fast-import/git-p4 b/contrib/fast-import/git-p4
index 3deaa42..08acd51 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