changeset 39400:6a71324cb68b

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.
author Boris Feld <boris.feld@octobus.net>
date Wed, 06 Jun 2018 01:03:10 +0200
parents da121c9dc0f2
children c67c94c0e7ae
files hgext/shelve.py
diffstat 1 files changed, 6 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/hgext/shelve.py	Tue May 29 11:47:32 2018 +0200
+++ b/hgext/shelve.py	Wed Jun 06 01:03:10 2018 +0200
@@ -160,10 +160,11 @@
             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 _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 @@
     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()