diff mercurial/match.py @ 28017:d3f1b7ee5e70

match: rename "narrowmatcher" to "subdirmatcher" (API) I keep mistaking "narrowmatcher" for narrowhg's narrowmatcher. "subdirmatcher" seems more to the point anyway.
author Martin von Zweigbergk <martinvonz@google.com>
date Fri, 05 Feb 2016 21:09:32 -0800
parents 9e2d01707e71
children 92f2c69ee5a5
line wrap: on
line diff
--- a/mercurial/match.py	Wed Feb 03 18:59:35 2016 +0000
+++ b/mercurial/match.py	Fri Feb 05 21:09:32 2016 -0800
@@ -334,13 +334,13 @@
     m.bad = badfn
     return m
 
-class narrowmatcher(match):
+class subdirmatcher(match):
     """Adapt a matcher to work on a subdirectory only.
 
     The paths are remapped to remove/insert the path as needed:
 
     >>> m1 = match('root', '', ['a.txt', 'sub/b.txt'])
-    >>> m2 = narrowmatcher('sub', m1)
+    >>> m2 = subdirmatcher('sub', m1)
     >>> bool(m2('a.txt'))
     False
     >>> bool(m2('b.txt'))