comparison 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
comparison
equal deleted inserted replaced
27545:a67d2e059a51 27546:c00924c54607
1029 return 1029 return
1030 else: 1030 else:
1031 cmdutil.checkunfinished(repo) 1031 cmdutil.checkunfinished(repo)
1032 cmdutil.bailifchanged(repo) 1032 cmdutil.bailifchanged(repo)
1033 1033
1034 if repo.vfs.exists('histedit-last-edit.txt'):
1035 repo.vfs.unlink('histedit-last-edit.txt')
1036 topmost, empty = repo.dirstate.parents() 1034 topmost, empty = repo.dirstate.parents()
1037 if outg: 1035 if outg:
1038 if freeargs: 1036 if freeargs:
1039 remote = freeargs[0] 1037 remote = freeargs[0]
1040 else: 1038 else:
1144 cleanupnode(ui, repo, 'replaced', mapping) 1142 cleanupnode(ui, repo, 'replaced', mapping)
1145 1143
1146 state.clear() 1144 state.clear()
1147 if os.path.exists(repo.sjoin('undo')): 1145 if os.path.exists(repo.sjoin('undo')):
1148 os.unlink(repo.sjoin('undo')) 1146 os.unlink(repo.sjoin('undo'))
1147 if repo.vfs.exists('histedit-last-edit.txt'):
1148 repo.vfs.unlink('histedit-last-edit.txt')
1149 1149
1150 def bootstrapcontinue(ui, state, opts): 1150 def bootstrapcontinue(ui, state, opts):
1151 repo = state.repo 1151 repo = state.repo
1152 if state.actions: 1152 if state.actions:
1153 actobj = state.actions.pop(0) 1153 actobj = state.actions.pop(0)