# HG changeset patch # User Martin von Zweigbergk # Date 1549695446 28800 # Node ID 635a12c53ea6cc142de741e897d8fe3fbe4eede5 # Parent 0dc3ed4e712c42af3feb4fa3b47dbf2c80b94a83 match: remove unused "exact" argument (API) It seems that all callers use match.exact() instead of match.match(exact=True). Differential Revision: https://phab.mercurial-scm.org/D5919 diff -r 0dc3ed4e712c -r 635a12c53ea6 mercurial/match.py --- a/mercurial/match.py Fri Feb 08 23:03:42 2019 -0800 +++ b/mercurial/match.py Fri Feb 08 22:57:26 2019 -0800 @@ -115,7 +115,7 @@ return unionmatcher(matchers) def match(root, cwd, patterns=None, include=None, exclude=None, default='glob', - exact=False, auditor=None, ctx=None, listsubrepos=False, warn=None, + auditor=None, ctx=None, listsubrepos=False, warn=None, badfn=None, icasefs=False): """build an object to match a set of file patterns @@ -126,7 +126,6 @@ include - patterns to include (unless they are excluded) exclude - patterns to exclude (even if they are included) default - if a pattern in patterns has no explicit type, assume this one - exact - patterns are actually filenames (include/exclude still apply) warn - optional function used for printing warnings badfn - optional bad() callback for this matcher instead of the default icasefs - make a matcher for wdir on case insensitive filesystems, which @@ -150,9 +149,6 @@ """ normalize = _donormalize if icasefs: - if exact: - raise error.ProgrammingError("a case-insensitive exact matcher " - "doesn't make sense") dirstate = ctx.repo().dirstate dsnormalize = dirstate.normalize @@ -171,9 +167,7 @@ kindpats.append((kind, pats, source)) return kindpats - if exact: - m = exactmatcher(root, cwd, patterns, badfn) - elif patterns: + if patterns: kindpats = normalize(patterns, default, root, cwd, auditor, warn) if _kindpatsalwaysmatch(kindpats): m = alwaysmatcher(root, cwd, badfn, relativeuipath=True)