summaryrefslogtreecommitdiff
path: root/git-p4.py
diff options
context:
space:
mode:
authorLibravatar Pete Wyckoff <pw@padd.com>2012-09-09 16:16:09 -0400
committerLibravatar Junio C Hamano <gitster@pobox.com>2012-09-16 21:52:52 -0700
commitdf9c5453b220923d7ec3e6291498d519596e23ed (patch)
tree59585964bd82092c3303fe063cfa100e73311611 /git-p4.py
parentgit p4: rearrange submit template construction (diff)
downloadtgif-df9c5453b220923d7ec3e6291498d519596e23ed.tar.xz
git p4: revert deleted files after submit cancel
The user can decide not to continue with a submission, by not saving the p4 submit template, then answering "no" to the "Submit anyway?" prompt. In this case, be sure to return the p4 client to its initial state. Deleted files were not reverted; fix this and test all cases. Signed-off-by: Pete Wyckoff <pw@padd.com> Acked-by: Luke Diamand <luke@diamand.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'git-p4.py')
-rwxr-xr-xgit-p4.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/git-p4.py b/git-p4.py
index ea14c1f633..60012bc63c 100755
--- a/git-p4.py
+++ b/git-p4.py
@@ -1304,6 +1304,8 @@ class P4Submit(Command, P4UserMap):
for f in filesToAdd:
p4_revert(f)
os.remove(f)
+ for f in filesToDelete:
+ p4_revert(f)
os.remove(fileName)
return ret