comparison mercurial/match.py @ 32552:e7aa11f3abcd

match: add __repr__ for subdirmatcher Should at least be useful for debugging. Would matter for correctness too if fsmonitor or Facebook's sparse extension worked with subrepos (which I don't know if they do).
author Martin von Zweigbergk <martinvonz@google.com>
date Fri, 26 May 2017 13:08:30 -0700
parents cf7c88986e9f
children 20c9f3ecc192
comparison
equal deleted inserted replaced
32551:0ff336a42c39 32552:e7aa11f3abcd
626 def always(self): 626 def always(self):
627 return self._always 627 return self._always
628 628
629 def anypats(self): 629 def anypats(self):
630 return self._matcher.anypats() 630 return self._matcher.anypats()
631
632 def __repr__(self):
633 return ('<subdirmatcher path=%r, matcher=%r>' %
634 (self._path, self._matcher))
631 635
632 def patkind(pattern, default=None): 636 def patkind(pattern, default=None):
633 '''If pattern is 'kind:pat' with a known kind, return kind.''' 637 '''If pattern is 'kind:pat' with a known kind, return kind.'''
634 return _patsplit(pattern, default)[0] 638 return _patsplit(pattern, default)[0]
635 639