git-p4: When skipping a patch as part of "git-p4 submit" make sure we correctly rever...
authorSimon Hausmann <simon@lst.de>
Thu, 13 Sep 2007 20:10:18 +0000 (22:10 +0200)
committerSimon Hausmann <simon@lst.de>
Sat, 20 Oct 2007 15:12:02 +0000 (17:12 +0200)
Signed-off-by: Simon Hausmann <simon@lst.de>
contrib/fast-import/git-p4

index 52cd2a46ba839c4d83af13d0ec0553be05e0eb6d..e1dc2630136559e48b802e565d871efb4cd3d2e1 100755 (executable)
@@ -529,6 +529,10 @@ class P4Submit(Command):
                                      "and with .rej files / [w]rite the patch to a file (patch.txt) ")
             if response == "s":
                 print "Skipping! Good luck with the next patches..."
+                for f in editedFiles:
+                    system("p4 revert \"%s\"" % f);
+                for f in filesToAdd:
+                    system("rm %s" %f)
                 return
             elif response == "a":
                 os.system(applyPatchCmd)