Show More
@@ -13,6 +13,7 import re | |||||
13 |
|
13 | |||
14 | from .i18n import _ |
|
14 | from .i18n import _ | |
15 | from . import ( |
|
15 | from . import ( | |
|
16 | encoding, | |||
16 | error, |
|
17 | error, | |
17 | pathutil, |
|
18 | pathutil, | |
18 | util, |
|
19 | util, | |
@@ -345,7 +346,7 class alwaysmatcher(basematcher): | |||||
345 | return 'all' |
|
346 | return 'all' | |
346 |
|
347 | |||
347 | def __repr__(self): |
|
348 | def __repr__(self): | |
348 | return '<alwaysmatcher>' |
|
349 | return r'<alwaysmatcher>' | |
349 |
|
350 | |||
350 | class nevermatcher(basematcher): |
|
351 | class nevermatcher(basematcher): | |
351 | '''Matches nothing.''' |
|
352 | '''Matches nothing.''' | |
@@ -368,7 +369,7 class nevermatcher(basematcher): | |||||
368 | return False |
|
369 | return False | |
369 |
|
370 | |||
370 | def __repr__(self): |
|
371 | def __repr__(self): | |
371 | return '<nevermatcher>' |
|
372 | return r'<nevermatcher>' | |
372 |
|
373 | |||
373 | class patternmatcher(basematcher): |
|
374 | class patternmatcher(basematcher): | |
374 |
|
375 | |||
@@ -397,6 +398,7 class patternmatcher(basematcher): | |||||
397 | def prefix(self): |
|
398 | def prefix(self): | |
398 | return self._prefix |
|
399 | return self._prefix | |
399 |
|
400 | |||
|
401 | @encoding.strmethod | |||
400 | def __repr__(self): |
|
402 | def __repr__(self): | |
401 | return ('<patternmatcher patterns=%r>' % self._pats) |
|
403 | return ('<patternmatcher patterns=%r>' % self._pats) | |
402 |
|
404 | |||
@@ -424,6 +426,7 class includematcher(basematcher): | |||||
424 | any(parentdir in self._roots |
|
426 | any(parentdir in self._roots | |
425 | for parentdir in util.finddirs(dir))) |
|
427 | for parentdir in util.finddirs(dir))) | |
426 |
|
428 | |||
|
429 | @encoding.strmethod | |||
427 | def __repr__(self): |
|
430 | def __repr__(self): | |
428 | return ('<includematcher includes=%r>' % self._pats) |
|
431 | return ('<includematcher includes=%r>' % self._pats) | |
429 |
|
432 | |||
@@ -452,6 +455,7 class exactmatcher(basematcher): | |||||
452 | def isexact(self): |
|
455 | def isexact(self): | |
453 | return True |
|
456 | return True | |
454 |
|
457 | |||
|
458 | @encoding.strmethod | |||
455 | def __repr__(self): |
|
459 | def __repr__(self): | |
456 | return ('<exactmatcher files=%r>' % self._files) |
|
460 | return ('<exactmatcher files=%r>' % self._files) | |
457 |
|
461 | |||
@@ -492,6 +496,7 class differencematcher(basematcher): | |||||
492 | def isexact(self): |
|
496 | def isexact(self): | |
493 | return self._m1.isexact() |
|
497 | return self._m1.isexact() | |
494 |
|
498 | |||
|
499 | @encoding.strmethod | |||
495 | def __repr__(self): |
|
500 | def __repr__(self): | |
496 | return ('<differencematcher m1=%r, m2=%r>' % (self._m1, self._m2)) |
|
501 | return ('<differencematcher m1=%r, m2=%r>' % (self._m1, self._m2)) | |
497 |
|
502 | |||
@@ -558,6 +563,7 class intersectionmatcher(basematcher): | |||||
558 | def isexact(self): |
|
563 | def isexact(self): | |
559 | return self._m1.isexact() or self._m2.isexact() |
|
564 | return self._m1.isexact() or self._m2.isexact() | |
560 |
|
565 | |||
|
566 | @encoding.strmethod | |||
561 | def __repr__(self): |
|
567 | def __repr__(self): | |
562 | return ('<intersectionmatcher m1=%r, m2=%r>' % (self._m1, self._m2)) |
|
568 | return ('<intersectionmatcher m1=%r, m2=%r>' % (self._m1, self._m2)) | |
563 |
|
569 | |||
@@ -638,6 +644,7 class subdirmatcher(basematcher): | |||||
638 | def prefix(self): |
|
644 | def prefix(self): | |
639 | return self._matcher.prefix() and not self._always |
|
645 | return self._matcher.prefix() and not self._always | |
640 |
|
646 | |||
|
647 | @encoding.strmethod | |||
641 | def __repr__(self): |
|
648 | def __repr__(self): | |
642 | return ('<subdirmatcher path=%r, matcher=%r>' % |
|
649 | return ('<subdirmatcher path=%r, matcher=%r>' % | |
643 | (self._path, self._matcher)) |
|
650 | (self._path, self._matcher)) | |
@@ -671,6 +678,7 class unionmatcher(basematcher): | |||||
671 | r |= v |
|
678 | r |= v | |
672 | return r |
|
679 | return r | |
673 |
|
680 | |||
|
681 | @encoding.strmethod | |||
674 | def __repr__(self): |
|
682 | def __repr__(self): | |
675 | return ('<unionmatcher matchers=%r>' % self._matchers) |
|
683 | return ('<unionmatcher matchers=%r>' % self._matchers) | |
676 |
|
684 |
General Comments 0
You need to be logged in to leave comments.
Login now