Show More
@@ -533,7 +533,7 b' class patternmatcher(basematcher):' | |||
|
533 | 533 | |
|
534 | 534 | @propertycache |
|
535 | 535 | def _dirs(self): |
|
536 |
return set(util.dirs(self._fileset)) |
|
|
536 | return set(util.dirs(self._fileset)) | |
|
537 | 537 | |
|
538 | 538 | def visitdir(self, dir): |
|
539 | 539 | dir = normalizerootdir(dir, 'visitdir') |
@@ -691,7 +691,7 b' class exactmatcher(basematcher):' | |||
|
691 | 691 | |
|
692 | 692 | @propertycache |
|
693 | 693 | def _dirs(self): |
|
694 |
return set(util.dirs(self._fileset)) |
|
|
694 | return set(util.dirs(self._fileset)) | |
|
695 | 695 | |
|
696 | 696 | def visitdir(self, dir): |
|
697 | 697 | dir = normalizerootdir(dir, 'visitdir') |
@@ -1007,7 +1007,7 b' class prefixdirmatcher(basematcher):' | |||
|
1007 | 1007 | |
|
1008 | 1008 | @propertycache |
|
1009 | 1009 | def _pathdirs(self): |
|
1010 |
return set(util.finddirs(self._path)) |
|
|
1010 | return set(util.finddirs(self._path)) | |
|
1011 | 1011 | |
|
1012 | 1012 | def visitdir(self, dir): |
|
1013 | 1013 | if dir == self._path: |
@@ -84,21 +84,21 b' class PatternMatcherTests(unittest.TestC' | |||
|
84 | 84 | def testVisitdirRootfilesin(self): |
|
85 | 85 | m = matchmod.match(b'x', b'', patterns=[b'rootfilesin:dir/subdir']) |
|
86 | 86 | assert isinstance(m, matchmod.patternmatcher) |
|
87 | self.assertTrue(m.visitdir(b'')) | |
|
88 | 87 | self.assertFalse(m.visitdir(b'dir/subdir/x')) |
|
89 | 88 | self.assertFalse(m.visitdir(b'folder')) |
|
90 | 89 | # FIXME: These should probably be True. |
|
90 | self.assertFalse(m.visitdir(b'')) | |
|
91 | 91 | self.assertFalse(m.visitdir(b'dir')) |
|
92 | 92 | self.assertFalse(m.visitdir(b'dir/subdir')) |
|
93 | 93 | |
|
94 | 94 | def testVisitchildrensetRootfilesin(self): |
|
95 | 95 | m = matchmod.match(b'x', b'', patterns=[b'rootfilesin:dir/subdir']) |
|
96 | 96 | assert isinstance(m, matchmod.patternmatcher) |
|
97 | self.assertEqual(m.visitchildrenset(b''), b'this') | |
|
98 | 97 | self.assertEqual(m.visitchildrenset(b'dir/subdir/x'), set()) |
|
99 | 98 | self.assertEqual(m.visitchildrenset(b'folder'), set()) |
|
100 |
# FIXME: These should probably be {'subdir'} and 'this', |
|
|
101 |
# or at least 'this' |
|
|
99 | # FIXME: These should probably be {'dir'}, {'subdir'} and 'this', | |
|
100 | # respectively, or at least 'this' for all three. | |
|
101 | self.assertEqual(m.visitchildrenset(b''), set()) | |
|
102 | 102 | self.assertEqual(m.visitchildrenset(b'dir'), set()) |
|
103 | 103 | self.assertEqual(m.visitchildrenset(b'dir/subdir'), set()) |
|
104 | 104 |
General Comments 0
You need to be logged in to leave comments.
Login now