[PATCH 3 of 7] scmutil: use the optional badfn argument when building a matcher

Matt Harbison mharbison72 at gmail.com
Fri Jun 5 22:54:22 CDT 2015


# HG changeset patch
# User Matt Harbison <matt_harbison at yahoo.com>
# Date 1433545674 14400
#      Fri Jun 05 19:07:54 2015 -0400
# Node ID fe3274a59a17d1e24f174ca51a2eba8145cf5986
# Parent  66903c607ef552bd11cd4f65d176a099df7231c6
scmutil: use the optional badfn argument when building a matcher

diff --git a/mercurial/scmutil.py b/mercurial/scmutil.py
--- a/mercurial/scmutil.py
+++ b/mercurial/scmutil.py
@@ -798,11 +798,12 @@
     if not globbed and default == 'relpath':
         pats = expandpats(pats or [])
 
-    m = ctx.match(pats, opts.get('include'), opts.get('exclude'),
-                         default, listsubrepos=opts.get('subrepos'))
     def badfn(f, msg):
         ctx.repo().ui.warn("%s: %s\n" % (m.rel(f), msg))
-    m.bad = badfn
+
+    m = ctx.match(pats, opts.get('include'), opts.get('exclude'),
+                  default, listsubrepos=opts.get('subrepos'), badfn=badfn)
+
     if m.always():
         pats = []
     return m, pats


More information about the Mercurial-devel mailing list