'hg rename' issue on case-insensitive file system.

Steve Borho steve at borho.org
Wed Jun 23 15:11:51 UTC 2010


On Wed, Jun 23, 2010 at 3:51 AM, Martin Geisler <mg at lazybytes.net> wrote:
> Roman Kamyk jr <roman.kamyk at gmail.com> writes:
>
>> On Wed, Jun 23, 2010 at 04:39, Kevin Grover <kevin at kevingrover.net> wrote:
>>> Isn't this simply a limitation of the case insensitive file system?
>>> To Windows 'test.txt' and 'Test.txt' are the same file name.
>>
>> This is also a problem on a Mac (with default partitions settings). It
>> is annoying as we have build system on Linux and if someone using
>> Windows/Mac adds file as foo.txt and in some other place references to
>> it as 'Foo.txt' it will break on the server and work on his machine.
>> So far it is caused by the file system. But the problem is when
>> developer want to fix the name using:
>>   $ hg rename foo.txt Foo.txt
>>   Foo.txt: not overwriting - file exists
>
> Could you try with 'hg rename --after foo.txt Foo.txt'? That asks
> Mercurial to not move the file on disk, but only record that it was
> already moved by someone else.

This is how the TortoiseHg rename dialog works.  It uses shutil
commands to perform the rename, then uses 'hg mv --after', to work
around this exact issue.

-- 
Steve Borho



More information about the Mercurial mailing list