# HG changeset patch # User Boris Feld # Date 1537352368 -7200 # Node ID 42a6b228dd2e6a985559d1c05196edf9f3c194ee # Parent a3095bc47217b46544f8e7d6521b59e123a4b297 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. diff -r a3095bc47217 -r 42a6b228dd2e hgext/shelve.py --- 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: