--- 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)