comparison hgext/rebase.py @ 25512:91c2278c68a3 stable

rebase: check that the bookmark is still valid when restoring (issue4669) After a rebase --abort, we attempt to restore the previously active bookmark. We need to ensure that the bookmark still exists.
author Tony Tung <tonytung@fb.com>
date Thu, 14 May 2015 21:35:06 -0700
parents bd98d073a34f
children bb2f543b48b5
comparison
equal deleted inserted replaced
25505:8b99e9a8db05 25512:91c2278c68a3
890 if rebased: 890 if rebased:
891 strippoints = [c.node() for c in repo.set('roots(%ld)', rebased)] 891 strippoints = [c.node() for c in repo.set('roots(%ld)', rebased)]
892 # no backup of rebased cset versions needed 892 # no backup of rebased cset versions needed
893 repair.strip(repo.ui, repo, strippoints) 893 repair.strip(repo.ui, repo, strippoints)
894 894
895 if activebookmark: 895 if activebookmark and activebookmark in repo._bookmarks:
896 bookmarks.setcurrent(repo, activebookmark) 896 bookmarks.setcurrent(repo, activebookmark)
897 897
898 clearstatus(repo) 898 clearstatus(repo)
899 repo.ui.warn(_('rebase aborted\n')) 899 repo.ui.warn(_('rebase aborted\n'))
900 return 0 900 return 0