# HG changeset patch # User Boris Feld <boris.f...@octobus.net> # Date 1528239790 -7200 # Wed Jun 06 01:03:10 2018 +0200 # Node ID f36b6c860bb59c43de8ee80a9dbe6abadef21fe9 # Parent e31e54630b73f2ae1c217f0680e836c1bbbddbef # EXP-Topic internal-phase # Available At https://bitbucket.org/octobus/mercurial-devel/ # hg pull https://bitbucket.org/octobus/mercurial-devel/ -r f36b6c860bb5 shelve: handle shelved node on unfiltered repository
To build a version of shelve that use hiding instead of stripping, we need shelve to be able to find these revision. This it does not hurt the bundle version, so we introduce the necessary code in the relevant place. diff --git a/hgext/shelve.py b/hgext/shelve.py --- a/hgext/shelve.py +++ b/hgext/shelve.py @@ -159,10 +159,11 @@ class shelvedfile(object): btype = 'HG20' compression = 'BZ' - outgoing = discovery.outgoing(self.repo, missingroots=bases, + repo = self.repo.unfiltered() + + outgoing = discovery.outgoing(repo, missingroots=bases, missingheads=[node]) - cg = changegroup.makechangegroup(self.repo, outgoing, cgversion, - 'shelve') + cg = changegroup.makechangegroup(repo, outgoing, cgversion, 'shelve') bundle2.writebundle(self.ui, cg, self.fname, btype, self.vfs, compression=compression) @@ -753,6 +754,7 @@ def _commitworkingcopychanges(ui, repo, def _unshelverestorecommit(ui, repo, basename): """Recreate commit in the repository during the unshelve""" + repo = repo.unfiltered() with ui.configoverride({('ui', 'quiet'): True}): shelvedfile(repo, basename, 'hg').applybundle() shelvectx = repo['tip'] @@ -952,6 +954,7 @@ def _dounshelve(ui, repo, *shelved, **op if not shelvedfile(repo, basename, patchextension).exists(): raise error.Abort(_("shelved change '%s' not found") % basename) + repo = repo.unfiltered() lock = tr = None try: lock = repo.lock() _______________________________________________ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel