Patchwork [6,of,7] mq: use the optional badfn argument when building a matcher

login
register
mail settings
Submitter Matt Harbison
Date June 6, 2015, 3:54 a.m.
Message ID <63faca7efc382bd10477.1433562865@Envy>
Download mbox | patch
Permalink /patch/9543/
State Accepted
Commit cc3d94e5994e524c121fcb4a62fba95366cd8514
Headers show

Comments

Matt Harbison - June 6, 2015, 3:54 a.m.
# HG changeset patch
# User Matt Harbison <matt_harbison@yahoo.com>
# Date 1433547332 14400
#      Fri Jun 05 19:35:32 2015 -0400
# Node ID 63faca7efc382bd10477106373596e81b7129576
# Parent  ee489c5750e9ddd0c4398a64d195bc32ae48a89e
mq: use the optional badfn argument when building a matcher

Patch

diff --git a/hgext/mq.py b/hgext/mq.py
--- a/hgext/mq.py
+++ b/hgext/mq.py
@@ -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)