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

Yuya Nishihara yuya at tcha.org
Tue May 23 10:18:47 EDT 2017


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.


More information about the Mercurial-devel mailing list