diff --git a/mercurial/match.py b/mercurial/match.py --- a/mercurial/match.py +++ b/mercurial/match.py @@ -13,6 +13,7 @@ import re from .i18n import _ from . import ( + encoding, error, pathutil, util, @@ -345,7 +346,7 @@ class alwaysmatcher(basematcher): return 'all' def __repr__(self): - return '' + return r'' class nevermatcher(basematcher): '''Matches nothing.''' @@ -368,7 +369,7 @@ class nevermatcher(basematcher): return False def __repr__(self): - return '' + return r'' class patternmatcher(basematcher): @@ -397,6 +398,7 @@ class patternmatcher(basematcher): def prefix(self): return self._prefix + @encoding.strmethod def __repr__(self): return ('' % self._pats) @@ -424,6 +426,7 @@ class includematcher(basematcher): any(parentdir in self._roots for parentdir in util.finddirs(dir))) + @encoding.strmethod def __repr__(self): return ('' % self._pats) @@ -452,6 +455,7 @@ class exactmatcher(basematcher): def isexact(self): return True + @encoding.strmethod def __repr__(self): return ('' % self._files) @@ -492,6 +496,7 @@ class differencematcher(basematcher): def isexact(self): return self._m1.isexact() + @encoding.strmethod def __repr__(self): return ('' % (self._m1, self._m2)) @@ -558,6 +563,7 @@ class intersectionmatcher(basematcher): def isexact(self): return self._m1.isexact() or self._m2.isexact() + @encoding.strmethod def __repr__(self): return ('' % (self._m1, self._m2)) @@ -638,6 +644,7 @@ class subdirmatcher(basematcher): def prefix(self): return self._matcher.prefix() and not self._always + @encoding.strmethod def __repr__(self): return ('' % (self._path, self._matcher)) @@ -671,6 +678,7 @@ class unionmatcher(basematcher): r |= v return r + @encoding.strmethod def __repr__(self): return ('' % self._matchers)