summaryrefslogtreecommitdiff
path: root/git-p4.py
diff options
context:
space:
mode:
authorPete Wyckoff <pw@padd.com>2012-09-09 20:16:09 (GMT)
committerJunio C Hamano <gitster@pobox.com>2012-09-17 04:52:52 (GMT)
commitdf9c5453b220923d7ec3e6291498d519596e23ed (patch)
tree59585964bd82092c3303fe063cfa100e73311611 /git-p4.py
parent55ac2ed6f56c153bc71dc80eb7634e2df2747670 (diff)
downloadgit-df9c5453b220923d7ec3e6291498d519596e23ed.zip
git-df9c5453b220923d7ec3e6291498d519596e23ed.tar.gz
git-df9c5453b220923d7ec3e6291498d519596e23ed.tar.bz2
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 ea14c1f..60012bc 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