changeset 41633:635a12c53ea6

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
author Martin von Zweigbergk <martinvonz@google.com>
date Fri, 08 Feb 2019 22:57:26 -0800
parents 0dc3ed4e712c
children 7c4e205f71ca
files mercurial/match.py
diffstat 1 files changed, 2 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- 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)