Mercurial > public > mercurial-scm > hg
diff mercurial/shelve.py @ 42704:6957f7b93e03
unshelve: clear shelvedstate and _finishunshelve() on partial unshelve
On a partial unshelve, `shelvedstate` was not cleared and `_finishunshelve()`
was not called. Ideally, these should be called on this case. This patch makes
`shelvedstate` to delete after a successful partial unshelve and calls
`_finishunshelve()` in the same case.
Differential Revision: https://phab.mercurial-scm.org/D6708
author | Navaneeth Suresh <navaneeths1998@gmail.com> |
---|---|
date | Sat, 27 Jul 2019 12:19:51 +0530 |
parents | 073cfff9aaef |
children | d684449eef67 |
line wrap: on
line diff
--- a/mercurial/shelve.py Thu Jul 25 22:01:15 2019 +0530 +++ b/mercurial/shelve.py Sat Jul 27 12:19:51 2019 +0530 @@ -1003,11 +1003,10 @@ with ui.configoverride(overrides, 'unshelve'): mergefiles(ui, repo, pctx, shelvectx) restorebranch(ui, repo, branchtorestore) + shelvedstate.clear(repo) + _finishunshelve(repo, oldtiprev, tr, activebookmark) if not ispartialunshelve: _forgetunknownfiles(repo, shelvectx, addedbefore) - - shelvedstate.clear(repo) - _finishunshelve(repo, oldtiprev, tr, activebookmark) unshelvecleanup(ui, repo, basename, opts) finally: if tr: