Patchwork D5469: manifest: accept narrowmatch into constructor instead of getting from repo

login
register
mail settings
Submitter phabricator
Date Dec. 22, 2018, 7:36 a.m.
Message ID <1d63359963e64100ac39731377247c64@localhost.localdomain>
Download mbox | patch
Permalink /patch/37313/
State Not Applicable
Headers show

Comments

phabricator - Dec. 22, 2018, 7:36 a.m.
This revision was automatically updated to reflect the committed changes.
Closed by commit rHG3913223417ea: manifest: accept narrowmatch into constructor instead of getting from repo (authored by martinvonz, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D5469?vs=12933&id=12948

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

AFFECTED FILES
  mercurial/bundlerepo.py
  mercurial/localrepo.py
  mercurial/manifest.py
  mercurial/statichttprepo.py
  mercurial/unionrepo.py
  tests/test-check-interfaces.py

CHANGE DETAILS




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

Patch

diff --git a/tests/test-check-interfaces.py b/tests/test-check-interfaces.py
--- a/tests/test-check-interfaces.py
+++ b/tests/test-check-interfaces.py
@@ -182,7 +182,8 @@ 
     checkzobject(fl, allowextra=True)
 
     # Conforms to imanifestlog.
-    ml = manifest.manifestlog(vfs, repo, manifest.manifestrevlog(repo.svfs))
+    ml = manifest.manifestlog(vfs, repo, manifest.manifestrevlog(repo.svfs),
+                              repo.narrowmatch())
     checkzobject(ml)
     checkzobject(repo.manifestlog)
 
diff --git a/mercurial/unionrepo.py b/mercurial/unionrepo.py
--- a/mercurial/unionrepo.py
+++ b/mercurial/unionrepo.py
@@ -212,7 +212,8 @@ 
     def manifestlog(self):
         rootstore = unionmanifest(self.svfs, self.repo2.svfs,
                                   self.unfiltered()._clrev)
-        return manifest.manifestlog(self.svfs, self, rootstore)
+        return manifest.manifestlog(self.svfs, self, rootstore,
+                                    self.narrowmatch())
 
     def _clrev(self, rev2):
         """map from repo2 changelog rev to temporary rev in self.changelog"""
diff --git a/mercurial/statichttprepo.py b/mercurial/statichttprepo.py
--- a/mercurial/statichttprepo.py
+++ b/mercurial/statichttprepo.py
@@ -187,7 +187,8 @@ 
         self.requirements = requirements
 
         rootmanifest = manifest.manifestrevlog(self.svfs)
-        self.manifestlog = manifest.manifestlog(self.svfs, self, rootmanifest)
+        self.manifestlog = manifest.manifestlog(self.svfs, self, rootmanifest,
+                                                self.narrowmatch())
         self.changelog = changelog.changelog(self.svfs)
         self._tags = None
         self.nodetagscache = None
diff --git a/mercurial/manifest.py b/mercurial/manifest.py
--- a/mercurial/manifest.py
+++ b/mercurial/manifest.py
@@ -1636,7 +1636,7 @@ 
     of the list of files in the given commit. Consumers of the output of this
     class do not care about the implementation details of the actual manifests
     they receive (i.e. tree or flat or lazily loaded, etc)."""
-    def __init__(self, opener, repo, rootstore):
+    def __init__(self, opener, repo, rootstore, narrowmatch):
         usetreemanifest = False
         cachesize = 4
 
@@ -1649,7 +1649,7 @@ 
 
         self._rootstore = rootstore
         self._rootstore._setupmanifestcachehooks(repo)
-        self._narrowmatch = repo.narrowmatch()
+        self._narrowmatch = narrowmatch
 
         # A cache of the manifestctx or treemanifestctx for each directory
         self._dirmancache = {}
diff --git a/mercurial/localrepo.py b/mercurial/localrepo.py
--- a/mercurial/localrepo.py
+++ b/mercurial/localrepo.py
@@ -1190,7 +1190,8 @@ 
     @storecache('00manifest.i')
     def manifestlog(self):
         rootstore = manifest.manifestrevlog(self.svfs)
-        return manifest.manifestlog(self.svfs, self, rootstore)
+        return manifest.manifestlog(self.svfs, self, rootstore,
+                                    self.narrowmatch())
 
     @repofilecache('dirstate')
     def dirstate(self):
diff --git a/mercurial/bundlerepo.py b/mercurial/bundlerepo.py
--- a/mercurial/bundlerepo.py
+++ b/mercurial/bundlerepo.py
@@ -374,7 +374,8 @@ 
         rootstore = bundlemanifest(self.svfs, self._cgunpacker, linkmapper)
         self.filestart = self._cgunpacker.tell()
 
-        return manifest.manifestlog(self.svfs, self, rootstore)
+        return manifest.manifestlog(self.svfs, self, rootstore,
+                                    self.narrowmatch())
 
     def _consumemanifest(self):
         """Consumes the manifest portion of the bundle, setting filestart so the