From 475307efcd0b771379489180b4c05aa75198116b Mon Sep 17 00:00:00 2001 From: Hannes Oldenburg Date: Sun, 7 Aug 2016 14:06:20 +0000 Subject: [PATCH] cmdutil: remove duplicated badmatch call in cat() Subrepo logic is handled in ctx.walk(). --- mercurial/cmdutil.py | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/mercurial/cmdutil.py b/mercurial/cmdutil.py index abb9c47ec1..dca729fce5 100644 --- a/mercurial/cmdutil.py +++ b/mercurial/cmdutil.py @@ -2581,14 +2581,7 @@ def cat(ui, repo, ctx, matcher, prefix, **opts): write(file) return 0 - # Don't warn about "missing" files that are really in subrepos - def badfn(path, msg): - for subpath in ctx.substate: - if path.startswith(subpath + '/'): - return - matcher.bad(path, msg) - - for abs in ctx.walk(matchmod.badmatch(matcher, badfn)): + for abs in ctx.walk(matcher): write(abs) err = 0