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