Skip to content

Commit 87b611d

Browse files
Anand Kumriagitster
authored andcommitted
Utilise the new 'p4_system' function.
Signed-off-by: Anand Kumria <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent bf9320f commit 87b611d

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

contrib/fast-import/git-p4

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ def setP4ExecBit(file, mode):
9898
if p4Type[-1] == "+":
9999
p4Type = p4Type[0:-1]
100100

101-
system("p4 reopen -t %s %s" % (p4Type, file))
101+
p4_system("reopen -t %s %s" % (p4Type, file))
102102

103103
def getP4OpenedType(file):
104104
# Returns the perforce file type for the given file.
@@ -561,7 +561,7 @@ class P4Submit(Command):
561561
modifier = diff['status']
562562
path = diff['src']
563563
if modifier == "M":
564-
system("p4 edit \"%s\"" % path)
564+
p4_system("edit \"%s\"" % path)
565565
if isModeExecChanged(diff['src_mode'], diff['dst_mode']):
566566
filesToChangeExecBit[path] = diff['dst_mode']
567567
editedFiles.add(path)
@@ -576,8 +576,8 @@ class P4Submit(Command):
576576
filesToAdd.remove(path)
577577
elif modifier == "R":
578578
src, dest = diff['src'], diff['dst']
579-
system("p4 integrate -Dt \"%s\" \"%s\"" % (src, dest))
580-
system("p4 edit \"%s\"" % (dest))
579+
p4_system("integrate -Dt \"%s\" \"%s\"" % (src, dest))
580+
p4_system("edit \"%s\"" % (dest))
581581
if isModeExecChanged(diff['src_mode'], diff['dst_mode']):
582582
filesToChangeExecBit[dest] = diff['dst_mode']
583583
os.unlink(dest)
@@ -601,7 +601,7 @@ class P4Submit(Command):
601601
if response == "s":
602602
print "Skipping! Good luck with the next patches..."
603603
for f in editedFiles:
604-
system("p4 revert \"%s\"" % f);
604+
p4_system("revert \"%s\"" % f);
605605
for f in filesToAdd:
606606
system("rm %s" %f)
607607
return
@@ -624,10 +624,10 @@ class P4Submit(Command):
624624
system(applyPatchCmd)
625625

626626
for f in filesToAdd:
627-
system("p4 add \"%s\"" % f)
627+
p4_system("add \"%s\"" % f)
628628
for f in filesToDelete:
629-
system("p4 revert \"%s\"" % f)
630-
system("p4 delete \"%s\"" % f)
629+
p4_system("revert \"%s\"" % f)
630+
p4_system("delete \"%s\"" % f)
631631

632632
# Set/clear executable bits
633633
for f in filesToChangeExecBit.keys():
@@ -728,7 +728,7 @@ class P4Submit(Command):
728728

729729
os.chdir(self.clientPath)
730730
print "Syncronizing p4 checkout..."
731-
system("p4 sync ...")
731+
p4_system("sync ...")
732732

733733
self.check()
734734

0 commit comments

Comments
 (0)