Mercurial > hg-stable
changeset 25439:aaede04c0ba6
revert: replace match.bad() monkey patching with match.badmatch()
No known issues with the previous code since it immediately overwrote the
patched, locally create matcher.
author | Matt Harbison <matt_harbison@yahoo.com> |
---|---|
date | Thu, 04 Jun 2015 22:02:22 -0400 |
parents | 7ce5a3230441 |
children | 1a95c57959f6 |
files | mercurial/cmdutil.py |
diffstat | 1 files changed, 2 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/cmdutil.py Thu Jun 04 21:55:56 2015 -0400 +++ b/mercurial/cmdutil.py Thu Jun 04 22:02:22 2015 -0400 @@ -2838,8 +2838,7 @@ targetsubs = sorted(s for s in wctx.substate if m(s)) if not m.always(): - m.bad = lambda x, y: False - for abs in repo.walk(m): + for abs in repo.walk(matchmod.badmatch(m, lambda x, y: False)): names[abs] = m.rel(abs), m.exact(abs) # walk target manifest to fill `names` @@ -2855,8 +2854,7 @@ return ui.warn("%s: %s\n" % (m.rel(path), msg)) - m.bad = badfn - for abs in ctx.walk(m): + for abs in ctx.walk(matchmod.badmatch(m, badfn)): if abs not in names: names[abs] = m.rel(abs), m.exact(abs)