Mercurial > hg-stable
changeset 39893:42a6b228dd2e
shelve: return the shelved node as part of bundle application
It make sense to have the function in charge of unbundling the shelved revision
also return the node of that revision (when the data is in the bundle).
This will help us to handle unnatural state where the unshelved change already
exists in the repository.
author | Boris Feld <boris.feld@octobus.net> |
---|---|
date | Wed, 19 Sep 2018 12:19:28 +0200 |
parents | a3095bc47217 |
children | d9ba836fc234 |
files | hgext/shelve.py |
diffstat | 1 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/hgext/shelve.py Thu Sep 20 11:18:28 2018 +0200 +++ b/hgext/shelve.py Wed Sep 19 12:19:28 2018 +0200 @@ -148,6 +148,7 @@ source='unshelve', url='bundle:' + self.vfs.join(self.fname), targetphase=targetphase) + return self.repo['tip'] finally: fp.close() @@ -791,8 +792,7 @@ node = shelvedfile(repo, basename, 'shelve').readinfo()['node'] if node is None or node not in repo: with ui.configoverride({('ui', 'quiet'): True}): - shelvedfile(repo, basename, 'hg').applybundle() - shelvectx = repo['tip'] + shelvectx = shelvedfile(repo, basename, 'hg').applybundle() # We might not strip the unbundled changeset, so we should keep track of # the unshelve node in case we need to reuse it (eg: unshelve --keep) if node is None: