# HG changeset patch # User Kyle Lippincott # Date 1533772985 25200 # Node ID b9f94d67ea732831cedc60de95698a0e6e5b1d06 # Parent f356be1a7ba3aff49d473eca52eadd59f3d3f778 match: add missing "return set()", add FIXME to test to doc a bug These were both brought up during the codereview of D4130. Differential Revision: https://phab.mercurial-scm.org/D4160 diff -r f356be1a7ba3 -r b9f94d67ea73 mercurial/match.py --- a/mercurial/match.py Wed Aug 08 16:53:17 2018 -0700 +++ b/mercurial/match.py Wed Aug 08 17:03:05 2018 -0700 @@ -910,6 +910,7 @@ return self._matcher.visitchildrenset(dir[len(self._pathprefix):]) if dir in self._pathdirs: return 'this' + return set() def isexact(self): return self._matcher.isexact() diff -r f356be1a7ba3 -r b9f94d67ea73 tests/test-match.py --- a/tests/test-match.py Wed Aug 08 16:53:17 2018 -0700 +++ b/tests/test-match.py Wed Aug 08 17:03:05 2018 -0700 @@ -97,6 +97,8 @@ self.assertEqual(m.visitchildrenset('.'), 'this') self.assertEqual(m.visitchildrenset('dir/subdir/x'), set()) self.assertEqual(m.visitchildrenset('folder'), set()) + # FIXME: These should probably be {'subdir'} and 'this', respectively, + # or at least 'this' and 'this'. self.assertEqual(m.visitchildrenset('dir'), set()) self.assertEqual(m.visitchildrenset('dir/subdir'), set())