Mercurial > hg
comparison mercurial/match.py @ 33497:80e1331a7fe9
match: remove unused negatematcher
This was only used by the sparse extension's dirstate._ignore
override, which no longer exists.
Differential Revision: https://phab.mercurial-scm.org/D60
author | Martin von Zweigbergk <martinvonz@google.com> |
---|---|
date | Tue, 11 Jul 2017 10:46:55 -0700 |
parents | cf15c3cc304c |
children | 44bc181b9835 |
comparison
equal
deleted
inserted
replaced
33496:258298f4712b | 33497:80e1331a7fe9 |
---|---|
676 r |= v | 676 r |= v |
677 return r | 677 return r |
678 | 678 |
679 def __repr__(self): | 679 def __repr__(self): |
680 return ('<unionmatcher matchers=%r>' % self._matchers) | 680 return ('<unionmatcher matchers=%r>' % self._matchers) |
681 | |
682 class negatematcher(basematcher): | |
683 def __init__(self, matcher): | |
684 self._matcher = matcher | |
685 | |
686 def matchfn(self, f): | |
687 return not self._matcher(f) | |
688 | |
689 def __repr__(self): | |
690 return ('<negatematcher matcher=%r>' % self._matcher) | |
691 | 681 |
692 def patkind(pattern, default=None): | 682 def patkind(pattern, default=None): |
693 '''If pattern is 'kind:pat' with a known kind, return kind.''' | 683 '''If pattern is 'kind:pat' with a known kind, return kind.''' |
694 return _patsplit(pattern, default)[0] | 684 return _patsplit(pattern, default)[0] |
695 | 685 |