Mercurial > hg-stable
changeset 32585: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 | 0ff336a42c39 |
children | 20c9f3ecc192 |
files | mercurial/match.py |
diffstat | 1 files changed, 4 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/match.py Sun May 28 21:31:29 2017 -0400 +++ b/mercurial/match.py Fri May 26 13:08:30 2017 -0700 @@ -629,6 +629,10 @@ def anypats(self): return self._matcher.anypats() + def __repr__(self): + return ('<subdirmatcher path=%r, matcher=%r>' % + (self._path, self._matcher)) + def patkind(pattern, default=None): '''If pattern is 'kind:pat' with a known kind, return kind.''' return _patsplit(pattern, default)[0]