[PATCH 3 of 8] Add filesystem path to dirstate.statwalk return value

Adrian Buehlmann adrian at cadifra.com
Fri May 2 19:15:31 CDT 2008


On 03.05.2008 00:54, Matt Mackall wrote:
> On Fri, 2008-05-02 at 20:43 +0100, Paul Moore wrote:
>> 2008/5/1 Matt Mackall <mpm at selenic.com>:
>>>  When do we ever need both names? In the above case, it's perfectly ok to
>>>  convert 'a' to 'A' and forget 'a' was ever mentioned.
>> I can't actually remember, but I did originally convert always, and
>> hit problems. That's when I decided I needed both.
> 
> What probably happened is you hit a case where you passed in 'a' when
> you had 'A' on disk and 'a' in the dirstate. The expected filename was
> supposed to be 'a', which just happened to be what was on the command
> line.
> 
> In other words, (cmd:a, disk:A, dirstate:a) -> a, but also (cmd:A,
> disk:A, dirstate:a) -> a, because dirstate should have precedence.

But what does

disk:A, dirstate:a

on a folding workspace mean?

One of:

1) user has deliberately renamed a to A with fs operations
and not yet told Mercurial about it (hg mv --after).
2) same as 1), but it was unintentional.

Since Mercurial doesn't yet have psychic powers, it
treats 2) as 1) and should report the situation on hg sta.

That means if the user did 1) or 2) plus changed the file
content, Mercurial should refuse to hg ci.

Correct?


More information about the Mercurial-devel mailing list