mq: use the optional badfn argument when building a matcher
authorMatt Harbison <matt_harbison@yahoo.com>
Fri, 05 Jun 2015 19:35:32 -0400
changeset 25469 cc3d94e5994e
parent 25468 72edd54de935
child 25470 378a8e700e02
mq: use the optional badfn argument when building a matcher
hgext/mq.py
--- a/hgext/mq.py	Fri Jun 05 19:33:41 2015 -0400
+++ b/hgext/mq.py	Fri Jun 05 19:35:32 2015 -0400
@@ -1138,12 +1138,11 @@
         if inclsubs:
             substatestate = repo.dirstate['.hgsubstate']
         if opts.get('include') or opts.get('exclude') or pats:
-            match = scmutil.match(repo[None], pats, opts)
             # detect missing files in pats
             def badfn(f, msg):
                 if f != '.hgsubstate': # .hgsubstate is auto-created
                     raise util.Abort('%s: %s' % (f, msg))
-            match.bad = badfn
+            match = scmutil.match(repo[None], pats, opts, badfn=badfn)
             changes = repo.status(match=match)
         else:
             changes = self.checklocalchanges(repo, force=True)