git-p4: When skipping a patch as part of "git-p4 submit" make sure we correctly revert to the previous state of the files using "p4 revert".
Signed-off-by: Simon Hausmann <simon@lst.de>
Simon Hausmann committed
Sep 13, 2007 at 22:10 UTC
209471493afbf30d5c1fc80feadfc4836b86dc42
1 file changed
+4
contrib/fast-import/git-p4
+4
@@ -529,6 +529,10 @@ class P4Submit(Command):
529
"and with .rej files / [w]rite the patch to a file (patch.txt) ")
530
if response == "s":
531
print "Skipping! Good luck with the next patches..."
532
+ for f in editedFiles:
533
+ system("p4 revert \"%s\"" % f);
534
+ for f in filesToAdd:
535
+ system("rm %s" %f)
536
return
537
elif response == "a":
538
os.system(applyPatchCmd)