@matheusbsbs / matheus-bagliano / commits / 87b611d5fd
Fork 0

Utilise the new 'p4_system' function.

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 87b611d5fd518e4754e599bc2f348f83db410c56
1 file changed +9 -9
contrib/fast-import/git-p4
+9 -9
@@ -98,7 +98,7 @@ def setP4ExecBit(file, mode):
98 if p4Type[-1] == "+":
99 p4Type = p4Type[0:-1]
100
101 - system("p4 reopen -t %s %s" % (p4Type, file))
101 + p4_system("reopen -t %s %s" % (p4Type, file))
102
103 def getP4OpenedType(file):
104 # Returns the perforce file type for the given file.
@@ -561,7 +561,7 @@ class P4Submit(Command):
561 modifier = diff['status']
562 path = diff['src']
563 if modifier == "M":
564 - system("p4 edit \"%s\"" % path)
564 + p4_system("edit \"%s\"" % path)
565 if isModeExecChanged(diff['src_mode'], diff['dst_mode']):
566 filesToChangeExecBit[path] = diff['dst_mode']
567 editedFiles.add(path)
@@ -576,8 +576,8 @@ class P4Submit(Command):
576 filesToAdd.remove(path)
577 elif modifier == "R":
578 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))
581 if isModeExecChanged(diff['src_mode'], diff['dst_mode']):
582 filesToChangeExecBit[dest] = diff['dst_mode']
583 os.unlink(dest)
@@ -601,7 +601,7 @@ class P4Submit(Command):
601 if response == "s":
602 print "Skipping! Good luck with the next patches..."
603 for f in editedFiles:
604 - system("p4 revert \"%s\"" % f);
604 + p4_system("revert \"%s\"" % f);
605 for f in filesToAdd:
606 system("rm %s" %f)
607 return
@@ -624,10 +624,10 @@ class P4Submit(Command):
624 system(applyPatchCmd)
625
626 for f in filesToAdd:
627 - system("p4 add \"%s\"" % f)
627 + p4_system("add \"%s\"" % f)
628 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)
631
632 # Set/clear executable bits
633 for f in filesToChangeExecBit.keys():
@@ -728,7 +728,7 @@ class P4Submit(Command):
728
729 os.chdir(self.clientPath)
730 print "Syncronizing p4 checkout..."
731 - system("p4 sync ...")
731 + p4_system("sync ...")
732
733 self.check()
734