From: Simon Hausmann Date: Thu, 13 Sep 2007 20:10:18 +0000 (+0200) Subject: git-p4: When skipping a patch as part of "git-p4 submit" make sure we correctly rever... X-Git-Tag: v1.5.4-rc0~336 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=209471493afbf30d5c1fc80feadfc4836b86dc42;p=git.git 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 --- diff --git a/contrib/fast-import/git-p4 b/contrib/fast-import/git-p4 index 52cd2a46b..e1dc26301 100755 --- a/contrib/fast-import/git-p4 +++ b/contrib/fast-import/git-p4 @@ -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)