Patchwork D4160: match: add missing "return set()", add FIXME to test to doc a bug

login
register
mail settings
Submitter phabricator
Date Aug. 9, 2018, 12:22 a.m.
Message ID <04b158a4a304de299907cf65623c7931@localhost.localdomain>
Download mbox | patch
Permalink /patch/33435/
State Not Applicable
Headers show

Comments

phabricator - Aug. 9, 2018, 12:22 a.m.
This revision was automatically updated to reflect the committed changes.
Closed by commit rHGb9f94d67ea73: match: add missing &quot;return set()&quot;, add FIXME to test to doc a bug (authored by spectral, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D4160?vs=10080&id=10086

REVISION DETAIL
  https://phab.mercurial-scm.org/D4160

AFFECTED FILES
  mercurial/match.py
  tests/test-match.py

CHANGE DETAILS




To: spectral, #hg-reviewers, martinvonz
Cc: mercurial-devel

Patch

diff --git a/tests/test-match.py b/tests/test-match.py
--- a/tests/test-match.py
+++ b/tests/test-match.py
@@ -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())
 
diff --git a/mercurial/match.py b/mercurial/match.py
--- a/mercurial/match.py
+++ b/mercurial/match.py
@@ -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()