Patchwork D2491: narrow: always wrap repo

login
register
mail settings
Submitter phabricator
Date March 1, 2018, 2:18 a.m.
Message ID <20b7a181772822798d3b13af04ca3699@localhost.localdomain>
Download mbox | patch
Permalink /patch/28522/
State Not Applicable
Headers show

Comments

phabricator - March 1, 2018, 2:18 a.m.
This revision was automatically updated to reflect the committed changes.
Closed by commit rHGd0baa181342a: narrow: always wrap repo (authored by martinvonz, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D2491?vs=6191&id=6224

REVISION DETAIL
  https://phab.mercurial-scm.org/D2491

AFFECTED FILES
  hgext/narrow/__init__.py
  hgext/narrow/narrowcommands.py

CHANGE DETAILS




To: martinvonz, durin42, #hg-reviewers, indygreg
Cc: indygreg, mercurial-devel

Patch

diff --git a/hgext/narrow/narrowcommands.py b/hgext/narrow/narrowcommands.py
--- a/hgext/narrow/narrowcommands.py
+++ b/hgext/narrow/narrowcommands.py
@@ -30,7 +30,6 @@ 
 
 from . import (
     narrowbundle2,
-    narrowrepo,
 )
 
 table = {}
@@ -101,10 +100,6 @@ 
             '_pullbundle2extraprepare', pullbundle2extraprepare_widen)
 
     def pullnarrow(orig, repo, *args, **kwargs):
-        narrowrepo.wraprepo(repo.unfiltered())
-        if isinstance(repo, repoview.repoview):
-            repo.__class__.__bases__ = (repo.__class__.__bases__[0],
-                                        repo.unfiltered().__class__)
         if opts_narrow:
             repo.requirements.add(changegroup.NARROW_REQUIREMENT)
             repo._writerequirements()
diff --git a/hgext/narrow/__init__.py b/hgext/narrow/__init__.py
--- a/hgext/narrow/__init__.py
+++ b/hgext/narrow/__init__.py
@@ -72,8 +72,8 @@ 
     if not isinstance(repo, localrepo.localrepository):
         return
 
+    narrowrepo.wraprepo(repo)
     if changegroup.NARROW_REQUIREMENT in repo.requirements:
-        narrowrepo.wraprepo(repo)
         narrowcopies.setup(repo)
         narrowdirstate.setup(repo)
         narrowpatch.setup(repo)