Skip to content

Commit

Permalink
git-p4: When skipping a patch as part of "git-p4 submit" make sure we…
Browse files Browse the repository at this point in the history
… correctly revert to the previous state of the files using "p4 revert".

Signed-off-by: Simon Hausmann <simon@lst.de>
  • Loading branch information
Simon Hausmann committed Oct 20, 2007
1 parent 7840ce6 commit 2094714
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions contrib/fast-import/git-p4
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 2094714

Please sign in to comment.