Show More
@@ -547,16 +547,6 b' class predicatematcher(basematcher):' | |||
|
547 | 547 | return b'<predicatenmatcher pred=%s>' % s |
|
548 | 548 | |
|
549 | 549 | |
|
550 | def normalizerootdir(dir, funcname): | |
|
551 | if dir == b'.': | |
|
552 | util.nouideprecwarn( | |
|
553 | b"match.%s() no longer accepts '.', use '' instead." % funcname, | |
|
554 | b'5.1', | |
|
555 | ) | |
|
556 | return b'' | |
|
557 | return dir | |
|
558 | ||
|
559 | ||
|
560 | 550 | class patternmatcher(basematcher): |
|
561 | 551 | """Matches a set of (kind, pat, source) against a 'root' directory. |
|
562 | 552 | |
@@ -602,7 +592,6 b' class patternmatcher(basematcher):' | |||
|
602 | 592 | return set(pathutil.dirs(self._fileset)) |
|
603 | 593 | |
|
604 | 594 | def visitdir(self, dir): |
|
605 | dir = normalizerootdir(dir, b'visitdir') | |
|
606 | 595 | if self._prefix and dir in self._fileset: |
|
607 | 596 | return b'all' |
|
608 | 597 | return ( |
@@ -686,7 +675,6 b' class includematcher(basematcher):' | |||
|
686 | 675 | self._parents = parents |
|
687 | 676 | |
|
688 | 677 | def visitdir(self, dir): |
|
689 | dir = normalizerootdir(dir, b'visitdir') | |
|
690 | 678 | if self._prefix and dir in self._roots: |
|
691 | 679 | return b'all' |
|
692 | 680 | return ( |
@@ -767,12 +755,9 b' class exactmatcher(basematcher):' | |||
|
767 | 755 | return set(pathutil.dirs(self._fileset)) |
|
768 | 756 | |
|
769 | 757 | def visitdir(self, dir): |
|
770 | dir = normalizerootdir(dir, b'visitdir') | |
|
771 | 758 | return dir in self._dirs |
|
772 | 759 | |
|
773 | 760 | def visitchildrenset(self, dir): |
|
774 | dir = normalizerootdir(dir, b'visitchildrenset') | |
|
775 | ||
|
776 | 761 | if not self._fileset or dir not in self._dirs: |
|
777 | 762 | return set() |
|
778 | 763 | |
@@ -1009,7 +994,6 b' class subdirmatcher(basematcher):' | |||
|
1009 | 994 | return self._matcher.matchfn(self._path + b"/" + f) |
|
1010 | 995 | |
|
1011 | 996 | def visitdir(self, dir): |
|
1012 | dir = normalizerootdir(dir, b'visitdir') | |
|
1013 | 997 | if dir == b'': |
|
1014 | 998 | dir = self._path |
|
1015 | 999 | else: |
@@ -1017,7 +1001,6 b' class subdirmatcher(basematcher):' | |||
|
1017 | 1001 | return self._matcher.visitdir(dir) |
|
1018 | 1002 | |
|
1019 | 1003 | def visitchildrenset(self, dir): |
|
1020 | dir = normalizerootdir(dir, b'visitchildrenset') | |
|
1021 | 1004 | if dir == b'': |
|
1022 | 1005 | dir = self._path |
|
1023 | 1006 | else: |
General Comments 0
You need to be logged in to leave comments.
Login now