mercurial/scmutil.py
changeset 29758 2372182e505b
parent 29718 2dd8c225e94c
child 29771 98976e3cae57
--- a/mercurial/scmutil.py	Mon Aug 08 22:06:07 2016 -0700
+++ b/mercurial/scmutil.py	Tue Aug 09 09:02:51 2016 +0000
@@ -948,17 +948,9 @@
     ret = 0
     join = lambda f: os.path.join(prefix, f)
 
-    def matchessubrepo(matcher, subpath):
-        if matcher.exact(subpath):
-            return True
-        for f in matcher.files():
-            if f.startswith(subpath):
-                return True
-        return False
-
     wctx = repo[None]
     for subpath in sorted(wctx.substate):
-        if opts.get('subrepos') or matchessubrepo(m, subpath):
+        if opts.get('subrepos') or m.matchessubrepo(subpath):
             sub = wctx.sub(subpath)
             try:
                 submatch = matchmod.subdirmatcher(subpath, m)