[PATCH] match: catch attempts to create case-insenstive exact matchers
Martin von Zweigbergk
martinvonz at google.com
Mon May 22 15:50:41 UTC 2017
# HG changeset patch
# User Martin von Zweigbergk <martinvonz at google.com>
# Date 1495468174 25200
# Mon May 22 08:49:34 2017 -0700
# Node ID 936afa945aea039ef4a12517cdbf891a36af256f
# Parent e8c043375b53b30c4b468687f08323cbeeb452ef
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).
diff --git a/mercurial/match.py b/mercurial/match.py
--- a/mercurial/match.py
+++ b/mercurial/match.py
@@ -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
More information about the Mercurial-devel
mailing list