Commit 96a1b91c authored by Matt Harbison's avatar Matt Harbison
Browse files

commands: use the optional badfn argument when building a matcher

parent f64dbe06f3d0
......@@ -350,8 +350,8 @@ def annotate(ui, repo, *pats, **opts):
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 @@ def locate(ui, repo, *pats, **opts):
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'):
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment