Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/localrepo.py @ 38874:a232e6744ba3
narrow: move requirement constant from changegroup to repository
As suggested by Gregory Szorc.
Differential Revision: https://phab.mercurial-scm.org/D4094
author | Martin von Zweigbergk <martinvonz@google.com> |
---|---|
date | Fri, 03 Aug 2018 11:02:34 -0700 |
parents | e7aa113b14f7 |
children | df0873ab5c14 |
comparison
equal
deleted
inserted
replaced
38873:c83ad57627ae | 38874:a232e6744ba3 |
---|---|
823 source = hg.sharedreposource(self) | 823 source = hg.sharedreposource(self) |
824 return narrowspec.load(source) | 824 return narrowspec.load(source) |
825 | 825 |
826 @repofilecache(narrowspec.FILENAME) | 826 @repofilecache(narrowspec.FILENAME) |
827 def _narrowmatch(self): | 827 def _narrowmatch(self): |
828 if changegroup.NARROW_REQUIREMENT not in self.requirements: | 828 if repository.NARROW_REQUIREMENT not in self.requirements: |
829 return matchmod.always(self.root, '') | 829 return matchmod.always(self.root, '') |
830 include, exclude = self.narrowpats | 830 include, exclude = self.narrowpats |
831 return narrowspec.match(self.root, include=include, exclude=exclude) | 831 return narrowspec.match(self.root, include=include, exclude=exclude) |
832 | 832 |
833 # TODO(martinvonz): make this property-like instead? | 833 # TODO(martinvonz): make this property-like instead? |