hgext/narrow/narrowrepo.py
changeset 36471 c28b6d609c47
parent 36470 d851951b421c
child 37373 c50078fc32f3
--- a/hgext/narrow/narrowrepo.py	Tue Feb 27 23:05:39 2018 -0800
+++ b/hgext/narrow/narrowrepo.py	Wed Feb 28 12:56:01 2018 -0800
@@ -12,7 +12,6 @@
     changegroup,
     hg,
     localrepo,
-    match as matchmod,
     narrowspec,
     scmutil,
 )
@@ -67,35 +66,6 @@
             narrowrevlog.makenarrowfilelog(fl, self.narrowmatch())
             return fl
 
-        @localrepo.repofilecache(narrowspec.FILENAME)
-        def narrowpats(self):
-            """matcher patterns for this repository's narrowspec
-
-            A tuple of (includes, excludes).
-            """
-            source = self
-            if self.shared():
-                source = hg.sharedreposource(self)
-            return narrowspec.load(source)
-
-        @localrepo.repofilecache(narrowspec.FILENAME)
-        def _narrowmatch(self):
-            if changegroup.NARROW_REQUIREMENT not in self.requirements:
-                return matchmod.always(self.root, '')
-            include, exclude = self.narrowpats
-            return narrowspec.match(self.root, include=include, exclude=exclude)
-
-        # TODO(martinvonz): make this property-like instead?
-        def narrowmatch(self):
-            return self._narrowmatch
-
-        def setnarrowpats(self, newincludes, newexcludes):
-            target = self
-            if self.shared():
-                target = hg.sharedreposource(self)
-            narrowspec.save(target, newincludes, newexcludes)
-            self.invalidate(clearfilecache=True)
-
         # I'm not sure this is the right place to do this filter.
         # context._manifestmatches() would probably be better, or perhaps
         # move it to a later place, in case some of the callers do want to know