##// END OF EJS Templates
rebase: on abort delete rebase state file no matter what...
Christian Delahousse -
r26744:21e50e36 default
parent child Browse files
Show More
@@ -926,6 +926,7 def abort(repo, originalwd, target, stat
926 activebookmark: the name of the bookmark that should be active after the
926 activebookmark: the name of the bookmark that should be active after the
927 restore'''
927 restore'''
928
928
929 try:
929 # If the first commits in the rebased set get skipped during the rebase,
930 # If the first commits in the rebased set get skipped during the rebase,
930 # their values within the state mapping will be the target rev id. The
931 # their values within the state mapping will be the target rev id. The
931 # dstates list must must not contain the target rev (issue4896)
932 # dstates list must must not contain the target rev (issue4896)
@@ -954,13 +955,15 def abort(repo, originalwd, target, stat
954 # Strip from the first rebased revision
955 # Strip from the first rebased revision
955 rebased = filter(lambda x: x >= 0 and x != target, state.values())
956 rebased = filter(lambda x: x >= 0 and x != target, state.values())
956 if rebased:
957 if rebased:
957 strippoints = [c.node() for c in repo.set('roots(%ld)', rebased)]
958 strippoints = [
959 c.node() for c in repo.set('roots(%ld)', rebased)]
958 # no backup of rebased cset versions needed
960 # no backup of rebased cset versions needed
959 repair.strip(repo.ui, repo, strippoints)
961 repair.strip(repo.ui, repo, strippoints)
960
962
961 if activebookmark and activebookmark in repo._bookmarks:
963 if activebookmark and activebookmark in repo._bookmarks:
962 bookmarks.activate(repo, activebookmark)
964 bookmarks.activate(repo, activebookmark)
963
965
966 finally:
964 clearstatus(repo)
967 clearstatus(repo)
965 repo.ui.warn(_('rebase aborted\n'))
968 repo.ui.warn(_('rebase aborted\n'))
966 return 0
969 return 0
General Comments 0
You need to be logged in to leave comments. Login now