Skip to content

Commit

Permalink
Switch to using 'p4_build_cmd'
Browse files Browse the repository at this point in the history
Signed-off-by: Anand Kumria <wildfire@progsoc.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
Anand Kumria authored and Junio C Hamano committed Aug 12, 2008
1 parent ee06427 commit 155af83
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions contrib/fast-import/git-p4
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,7 @@ def read_pipe_lines(c):

def p4_read_pipe_lines(c):
"""Specifically invoke p4 on the command supplied. """
real_cmd = "%s %s" % ("p4", c)
if verbose:
print real_cmd
real_cmd = p4_build_cmd(c)
return read_pipe_lines(real_cmd)

def system(cmd):
Expand All @@ -85,9 +83,7 @@ def system(cmd):

def p4_system(cmd):
"""Specifically invoke p4 as the system command. """
real_cmd = "%s %s" % ("p4", cmd)
if verbose:
print real_cmd
real_cmd = p4_build_cmd(cmd)
return system(real_cmd)

def isP4Exec(kind):
Expand Down Expand Up @@ -172,7 +168,7 @@ def isModeExecChanged(src_mode, dst_mode):
return isModeExec(src_mode) != isModeExec(dst_mode)

def p4CmdList(cmd, stdin=None, stdin_mode='w+b'):
cmd = "p4 -G %s" % cmd
cmd = p4_build_cmd("-G %s" % (cmd))
if verbose:
sys.stderr.write("Opening pipe: %s\n" % cmd)

Expand Down

0 comments on commit 155af83

Please sign in to comment.