match: catch attempts to create case-insenstive exact matchers
authorMartin von Zweigbergk <martinvonz@google.com>
Mon, 22 May 2017 08:49:34 -0700
changeset 32415 9695aca1a3a0
parent 32414 7b7f55d56076
child 32416 9a3e88d4a030
match: catch attempts to create case-insenstive exact matchers Exact matchers are only created internally (as opposed to from user input) based on a set of files that the caller collected before, so they should always match the list exactly (i.e. case-sensitively).
mercurial/match.py
--- a/mercurial/match.py	Mon May 22 19:29:21 2017 +0200
+++ b/mercurial/match.py	Mon May 22 08:49:34 2017 -0700
@@ -120,6 +120,9 @@
     """
     normalize = _donormalize
     if icasefs:
+        if exact:
+            raise error.Abort(_("a case-insensitive exact matcher doesn't "
+                                "make sense"))
         dirstate = ctx.repo().dirstate
         dsnormalize = dirstate.normalize