[PATCH] cmdutil: remove duplicated badmatch call in cat()

Hannes Oldenburg hannes.christian.oldenburg at gmail.com
Sun Aug 7 15:52:53 UTC 2016


# HG changeset patch
# User Hannes Oldenburg <hannes.christian.oldenburg at gmail.com>
# Date 1470578780 0
#      Sun Aug 07 14:06:20 2016 +0000
# Node ID 12c72545f8627845c56b070a27eff88adefd7c16
# Parent  37b6f0ec6241a62de90737409458cd622e2fac0d
cmdutil: remove duplicated badmatch call in cat()

Subrepo logic is handled in ctx.walk().

diff -r 37b6f0ec6241 -r 12c72545f862 mercurial/cmdutil.py
--- a/mercurial/cmdutil.py	Fri Aug 05 17:27:51 2016 -0400
+++ b/mercurial/cmdutil.py	Sun Aug 07 14:06:20 2016 +0000
@@ -2581,14 +2581,7 @@
             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
 


More information about the Mercurial-devel mailing list