Details
Details
- Reviewers
indygreg - Group Reviewers
hg-reviewers - Commits
- rHG879da36e7644: narrowrepo: add docstring for narrowpats
Diff Detail
Diff Detail
- Repository
- rHG Mercurial
- Lint
Lint Skipped - Unit
Unit Tests Skipped
indygreg |
hg-reviewers |
Lint Skipped |
Unit Tests Skipped |
Path | Packages | |||
---|---|---|---|---|
M | hgext/narrow/narrowrepo.py (4 lines) |
Status | Author | Revision | |
---|---|---|---|
Closed | durin42 | ||
Closed | durin42 | ||
Closed | durin42 | ||
Closed | durin42 | ||
Closed | durin42 | ||
Closed | durin42 | ||
Closed | durin42 | ||
Closed | durin42 | ||
Closed | durin42 | ||
Closed | durin42 | ||
Closed | durin42 | ||
Closed | durin42 | ||
Closed | durin42 | ||
Closed | durin42 | ||
Closed | durin42 | ||
Closed | durin42 | ||
Closed | durin42 | ||
Closed | durin42 | ||
Closed | durin42 | ||
Closed | durin42 | ||
Closed | durin42 | ||
Closed | durin42 | ||
Closed | durin42 | ||
Closed | durin42 | ||
Closed | durin42 | ||
Closed | durin42 |
def file(self, f): | def file(self, f): | ||||
fl = super(narrowrepository, self).file(f) | fl = super(narrowrepository, self).file(f) | ||||
narrowrevlog.makenarrowfilelog(fl, self.narrowmatch()) | narrowrevlog.makenarrowfilelog(fl, self.narrowmatch()) | ||||
return fl | return fl | ||||
@localrepo.repofilecache(narrowspec.FILENAME) | @localrepo.repofilecache(narrowspec.FILENAME) | ||||
def narrowpats(self): | def narrowpats(self): | ||||
"""matcher patterns for this repository's narrowspec | |||||
A tuple of (includes, excludes). | |||||
""" | |||||
return narrowspec.load(self) | return narrowspec.load(self) | ||||
@localrepo.repofilecache(narrowspec.FILENAME) | @localrepo.repofilecache(narrowspec.FILENAME) | ||||
def _narrowmatch(self): | def _narrowmatch(self): | ||||
include, exclude = self.narrowpats | include, exclude = self.narrowpats | ||||
if not opts_narrow and not include and not exclude: | if not opts_narrow and not include and not exclude: | ||||
return matchmod.always(self.root, '') | return matchmod.always(self.root, '') | ||||
return narrowspec.match(self.root, include=include, exclude=exclude) | return narrowspec.match(self.root, include=include, exclude=exclude) |