Mercurial > public > mercurial-scm > hg
diff mercurial/shelve.py @ 42614:117437f3f541
continue: added support for unshelve
This patch adds the support for `ushelve` in `hg continue` plan.
`hgcontinueunshelve()` has been created for independent calls.
In case an interrupted unshelve is resumed via hg continue the
shelvedstate needs to be loaded seperately. This has been
ensured by `_loadunshelvedstate()`
`hgcontinueunshelve()` is then registered as `continuefunc` for state
detection API.
Results are shown as tests.
Differential Revision: https://phab.mercurial-scm.org/D6652
author | Taapas Agrawal <taapas2897@gmail.com> |
---|---|
date | Wed, 17 Jul 2019 22:24:17 +0530 |
parents | 3fb0493812c0 |
children | 5162753c4c14 |
line wrap: on
line diff
--- a/mercurial/shelve.py Tue Jul 16 01:59:28 2019 +0530 +++ b/mercurial/shelve.py Wed Jul 17 22:24:17 2019 +0530 @@ -751,6 +751,12 @@ unshelvecleanup(ui, repo, state.name, opts) ui.status(_("unshelve of '%s' complete\n") % state.name) +def hgcontinueunshelve(ui, repo): + """logic to resume unshelve using 'hg continue'""" + with repo.wlock(): + state = _loadshelvedstate(ui, repo, {'continue' : True}) + return unshelvecontinue(ui, repo, state, {'keep' : state.keep}) + def _commitworkingcopychanges(ui, repo, opts, tmpwctx): """Temporarily commit working copy changes before moving unshelve commit""" # Store pending changes in a commit and remember added in case a shelve