diff -r 7108834c76a2 -r 3072ce740945 mercurial/cmdutil.py --- a/mercurial/cmdutil.py Fri Mar 11 04:14:54 2016 +0900 +++ b/mercurial/cmdutil.py Fri Mar 11 15:24:27 2016 -0600 @@ -2374,14 +2374,15 @@ for subpath in sorted(ctx.substate): def matchessubrepo(subpath): - return (m.always() or m.exact(subpath) + return (m.exact(subpath) or any(f.startswith(subpath + '/') for f in m.files())) if subrepos or matchessubrepo(subpath): sub = ctx.sub(subpath) try: submatch = matchmod.subdirmatcher(subpath, m) - if sub.printfiles(ui, submatch, fm, fmt, subrepos) == 0: + recurse = m.exact(subpath) or subrepos + if sub.printfiles(ui, submatch, fm, fmt, recurse) == 0: ret = 0 except error.LookupError: ui.status(_("skipping missing subrepository: %s\n")