[PATCH 05 of 10] shelve: handle shelved node on unfiltered repository
Boris Feld
boris.feld at octobus.net
Wed Aug 29 12:30:53 EDT 2018
# HG changeset patch
# User Boris Feld <boris.feld at octobus.net>
# Date 1528239790 -7200
# Wed Jun 06 01:03:10 2018 +0200
# Node ID a000c7acde68b242548a33f08aa7b84c303f197e
# Parent 86fcd2d7daee18e9c4a515532b9e2fbfa9f16214
# EXP-Topic internal-phase.shelve
# Available At https://bitbucket.org/octobus/mercurial-devel/
# hg pull https://bitbucket.org/octobus/mercurial-devel/ -r a000c7acde68
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 revisions. 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
@@ -160,10 +160,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)
@@ -762,6 +763,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']
@@ -961,6 +963,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()
More information about the Mercurial-devel
mailing list