changeset 25468:72edd54de935

commands: use the optional badfn argument when building a matcher
author Matt Harbison <matt_harbison@yahoo.com>
date Fri, 05 Jun 2015 19:33:41 -0400
parents f64dbe06f3d0
children cc3d94e5994e
files mercurial/commands.py
diffstat 1 files changed, 4 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/commands.py	Fri Jun 05 19:24:32 2015 -0400
+++ b/mercurial/commands.py	Fri Jun 05 19:33:41 2015 -0400
@@ -350,8 +350,8 @@
     def bad(x, y):
         raise util.Abort("%s: %s" % (x, y))
 
-    m = scmutil.match(ctx, pats, opts)
-    m.bad = bad
+    m = scmutil.match(ctx, pats, opts, badfn=bad)
+
     follow = not opts.get('no_follow')
     diffopts = patch.difffeatureopts(ui, opts, section='annotate',
                                      whitespace=True)
@@ -4442,8 +4442,8 @@
 
     ret = 1
     ctx = repo[rev]
-    m = scmutil.match(ctx, pats, opts, default='relglob')
-    m.bad = lambda x, y: False
+    m = scmutil.match(ctx, pats, opts, default='relglob',
+                      badfn=lambda x, y: False)
 
     for abs in ctx.matches(m):
         if opts.get('fullpath'):