[PATCH] match: catch attempts to create case-insenstive exact matchers

Martin von Zweigbergk martinvonz at google.com
Tue May 23 11:51:15 EDT 2017


On Tue, May 23, 2017 at 7:18 AM, Yuya Nishihara <yuya at tcha.org> wrote:
> On Mon, 22 May 2017 08:50:41 -0700, Martin von Zweigbergk via Mercurial-devel wrote:
>> # 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"))
>
> Nit: ProgrammingError seems more appropriate.

True. Will send a patch fixing that another instance in match.py.


More information about the Mercurial-devel mailing list