[PATCH 4 of 7] match: don't print explicitly listed files with wrong case (BC)

Matt Harbison mharbison72 at gmail.com
Tue May 23 00:01:36 EDT 2017


On Mon, 22 May 2017 02:16:04 -0400, Martin von Zweigbergk
<martinvonz at google.com> wrote:

> # HG changeset patch
> # User Martin von Zweigbergk <martinvonz at google.com>
> # Date 1495148746 25200
> #      Thu May 18 16:05:46 2017 -0700
> # Node ID fcf2e822e20b4c25e4525057a0fdf8221e48b0ec
> # Parent  6bf950ac0b443b409e744bb0cff6b340197dbdd2
> match: don't print explicitly listed files with wrong case (BC)
>
> On case-insensitive file systems, if file A exists and you try to
> remove it (or add, etc.) by specifying a different case, you will see
> something like this:
>
>   $ hg rm a
>   removing file A
>
> I honestly found this surprising because it seems to me like it was
> explicitly listed by the user. Still, there is a comment in the code
> describing it, so it is very clearly intentional. The code was added
> in baa11dde8c0e (match: add a subclass for dirstate normalizing of the
> matched patterns, 2015-04-12).

That behavior predates this commit.  I added this commit, probably to be
consistent with the existing behavior that I observed with forget a few
weeks before:

https://www.mercurial-scm.org/repo/hg/rev/c780a63f61ca

My assumed reason for this output was simply that if you don't type the
filename exactly (e.g., like implying a file by naming a directory), it
prints out the actual name.  I've never played with a repo that has
Foo.txt and foo.txt, and then brought it over to icasefs to give it a
spin, so I'm not sure how important this was.

I don't have a problem with dropping it for now.  It might be nice to get
back when the cleanup is done, if possible.

As far as pitfalls with icasefs, I went back to all the commits in the
obsolete line, and it looks like baa11dde8c0e talks about the ones that I
knew about at the time.  I'm not aware that many (any?) were subsequently
fixed.  The subrepo thing is still an issue.


More information about the Mercurial-devel mailing list