comparison hgext/shelve.py @ 42540:80e0ea08b55c

shelve: remove rebase.clearstatus() This is a follow-up patch to c829749e7639. After this, shelve will be no longer dependent on rebase. This removes rebase.clearstatus() from shelve. Differential Revision: https://phab.mercurial-scm.org/D6584
author Navaneeth Suresh <navaneeths1998@gmail.com>
date Fri, 28 Jun 2019 22:57:48 +0530
parents 5c64d0b4c037
children
comparison
equal deleted inserted replaced
42539:5c64d0b4c037 42540:80e0ea08b55c
52 templatefilters, 52 templatefilters,
53 util, 53 util,
54 vfs as vfsmod, 54 vfs as vfsmod,
55 ) 55 )
56 56
57 from . import (
58 rebase,
59 )
60 from mercurial.utils import ( 57 from mercurial.utils import (
61 dateutil, 58 dateutil,
62 stringutil, 59 stringutil,
63 ) 60 )
64 61
653 650
654 merge.update(repo, state.pendingctx, branchmerge=False, force=True) 651 merge.update(repo, state.pendingctx, branchmerge=False, force=True)
655 if (state.activebookmark 652 if (state.activebookmark
656 and state.activebookmark in repo._bookmarks): 653 and state.activebookmark in repo._bookmarks):
657 bookmarks.activate(repo, state.activebookmark) 654 bookmarks.activate(repo, state.activebookmark)
658
659 if repo.vfs.exists('unshelverebasestate'):
660 repo.vfs.rename('unshelverebasestate', 'rebasestate')
661 rebase.clearstatus(repo)
662
663 mergefiles(ui, repo, state.wctx, state.pendingctx) 655 mergefiles(ui, repo, state.wctx, state.pendingctx)
664 if not phases.supportinternal(repo): 656 if not phases.supportinternal(repo):
665 repair.strip(ui, repo, state.nodestoremove, backup=False, 657 repair.strip(ui, repo, state.nodestoremove, backup=False,
666 topic='shelve') 658 topic='shelve')
667 finally: 659 finally:
736 # only strip the shelvectx if we produced one 728 # only strip the shelvectx if we produced one
737 state.nodestoremove.append(newnode) 729 state.nodestoremove.append(newnode)
738 shelvectx = repo[newnode] 730 shelvectx = repo[newnode]
739 731
740 hg.updaterepo(repo, pendingctx.node(), overwrite=False) 732 hg.updaterepo(repo, pendingctx.node(), overwrite=False)
741
742 if repo.vfs.exists('unshelverebasestate'):
743 repo.vfs.rename('unshelverebasestate', 'rebasestate')
744 rebase.clearstatus(repo)
745
746 mergefiles(ui, repo, state.wctx, shelvectx) 733 mergefiles(ui, repo, state.wctx, shelvectx)
747 restorebranch(ui, repo, state.branchtorestore) 734 restorebranch(ui, repo, state.branchtorestore)
748 735
749 if not phases.supportinternal(repo): 736 if not phases.supportinternal(repo):
750 repair.strip(ui, repo, state.nodestoremove, backup=False, 737 repair.strip(ui, repo, state.nodestoremove, backup=False,