diff hgext/histedit.py @ 27546:c00924c54607

histedit: limit cleanup of histedit-last-edit.txt to success
author timeless <timeless@mozdev.org>
date Wed, 23 Dec 2015 23:23:28 +0000
parents a67d2e059a51
children 1cbfeb1dc5aa
line wrap: on
line diff
--- a/hgext/histedit.py	Sun Dec 27 03:33:09 2015 +0000
+++ b/hgext/histedit.py	Wed Dec 23 23:23:28 2015 +0000
@@ -1031,8 +1031,6 @@
         cmdutil.checkunfinished(repo)
         cmdutil.bailifchanged(repo)
 
-        if repo.vfs.exists('histedit-last-edit.txt'):
-            repo.vfs.unlink('histedit-last-edit.txt')
         topmost, empty = repo.dirstate.parents()
         if outg:
             if freeargs:
@@ -1146,6 +1144,8 @@
     state.clear()
     if os.path.exists(repo.sjoin('undo')):
         os.unlink(repo.sjoin('undo'))
+    if repo.vfs.exists('histedit-last-edit.txt'):
+        repo.vfs.unlink('histedit-last-edit.txt')
 
 def bootstrapcontinue(ui, state, opts):
     repo = state.repo