hgext/shelve.py
changeset 38462 61e4cf1be5b2
parent 37967 7932be8b0559
child 38463 f4776f8b98e0
equal deleted inserted replaced
38461:8459e8d2f729 38462:61e4cf1be5b2
   619     """subcommand that abort an in-progress unshelve"""
   619     """subcommand that abort an in-progress unshelve"""
   620     with repo.lock():
   620     with repo.lock():
   621         try:
   621         try:
   622             checkparents(repo, state)
   622             checkparents(repo, state)
   623 
   623 
   624             repo.vfs.rename('unshelverebasestate', 'rebasestate')
   624             merge.update(repo, state.pendingctx, False, True)
   625             try:
   625             if (state.activebookmark
   626                 rebase.rebase(ui, repo, **{
   626                     and state.activebookmark in repo._bookmarks):
   627                     r'abort' : True
   627                 bookmarks.activate(repo, state.activebookmark)
   628                 })
   628 
   629             except Exception:
   629             if repo.vfs.exists('unshelverebasestate'):
   630                 repo.vfs.rename('rebasestate', 'unshelverebasestate')
   630                 repo.vfs.rename('unshelverebasestate', 'rebasestate')
   631                 raise
   631                 rebase.clearstatus(repo)
   632 
   632 
   633             mergefiles(ui, repo, state.wctx, state.pendingctx)
   633             mergefiles(ui, repo, state.wctx, state.pendingctx)
   634             repair.strip(ui, repo, state.nodestoremove, backup=False,
   634             repair.strip(ui, repo, state.nodestoremove, backup=False,
   635                          topic='shelve')
   635                          topic='shelve')
   636         finally:
   636         finally: