diff mercurial/match.py @ 32415:9695aca1a3a0

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).
author Martin von Zweigbergk <martinvonz@google.com>
date Mon, 22 May 2017 08:49:34 -0700
parents 952017471f93
children 57d6c0c74b1b
line wrap: on
line diff
--- 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