Mercurial case-folding BIG BUG
Dustin Sallings
dustin at spy.net
Mon Feb 4 10:18:41 CST 2008
hg status shows the change. hg addremove does the right thing.
It may be possible to issue a warning, but I always use status and
addremove (when there are new and/or deleted files). addremove (in my
config) would also detect the rename. So, in practice, I couldn't end
up in your situation.
--
Dustin Sallings (mobile)
On Feb 4, 2008, at 2:09, Filippo Pedron <fpedron at email.it> wrote:
> Dustin Sallings wrote:
>>
>> On Feb 3, 2008, at 14:14, Filippo Pedron wrote:
>>
>>>> If you disable the check, then what happens when the collision
>>>> occurs?
>>>>
>>> I understand that this is not the solution but only an emergency
>>> solution.
>>
>> I don't see how it makes anything better at all.
>>
>>>> If your filesystem can't tell the difference between FOO.TXT
>>>> and foo.txt, how should mercurial (or any revision control
>>>> system) apply changes to one or the other (or Foo.Txt)?
>>>>
>>> I agree with you and I understand that my example was too much
>>> simple to explain the problem. Follow this other (reds are added/
>>> modified lines):
>>
>> [stuff]
>>
>>> > ren foo.txt FOO.TXT
>>> > hg add FOO.TXT
>>
>> Does ``ren'' mean rename? If so, that can't possibly be what
>> you intended to do.
>>
>> From mercurial's perspective, all you did was add (see the ``hg
>> add'') a new file with the same name as another one, but in a
>> different case.
>>
>> Perhaps you wanted to ``hg mv'' or at the very least ``hg rm -A
>> foo.txt''
>>
>> What you are doing here is specifically configuring the tool to
>> attempt to do something your filesystem cannot handle. Mercurial
>> now sees a foo.txt and a FOO.txt. Your OS can't tell the
>> difference. Mercurial is trying to tell you that. You should
>> listen to it (and don't just go changing mercurial to ignore
>> important warnings).
>>
> "ren" means "rename" and I used it just to show what happen.
> In my project, a friend of my sent me a renamed file and for Windows
> everything was ok. I added some other file and committed a lot of
> time. No warning on the command line, no warning in the manual, hg
> tests were ok.
> After a while, I needed to revert changes and I wasn't able to do it.
>
> I think that on my Windows system, Mercurial should abort to commit
> if it find a case-folding collision. In this case, I should do
> something as you suggest (rename or move or remove the file) to
> solve the collision or "force" hg to commit with some special flag.
>
> In the update case on Windows system, hg should work as some ftp
> client ( FileZilla, ... ): hg should ask something like [skip,
> overwrite or abort] in some interactive way. It should also give a
> warning feedback as final message. Finally, to solve case-folding
> collision problem, I should be able to call hg to revert a file if
> it match exactly the case.
>
> On Linux everything works smoothly because there isn't a case-
> folding collision problem.
>
> Best regards,
>
> Filippo Pedron
>
>
>
> --
> Email.it, the professional e-mail, gratis per te: http://
> www.email.it/f
> Sponsor:
> Ti vestiamo dalla testa ai piedi e anche sotto se lo vuoi ! Clicca
> su www.grandinettisport.com
> * Clicca qui: http://adv.email.it/cgi-bin/foclick.cgi?mid=7502&d=4-2
>
>
More information about the Mercurial
mailing list