I\'ve seen the other Mercurial case-folding Answers on StackOverflow - they say that if you have access to a case sensitive file system like unix then check out there and it
To get a case folding issue on windows I'm guessing that you've got the differing cases in different branches or heads in the repo, and it becomes a problem when merging. I can't see how (on Windows) you would actually get two different cases in the same revision without going via a unix box.
So, if they are in different revisions then you can do something like this:
hg update <some rev>
hg remove -A -f "Some File"
then the merge would succeed ok. The -A is for 'after', and the -f will 'force'.
We resolved this without resorting to a case-sensitive filesystem by issuing HG rename commands. Say you are having trouble because "Foo.txt" needs to be called "foo.txt":
hg rename Foo.txt Foo.txt.renamed
hg rename Foo.txt.renamed foo.txt
We encountered this problem when a file was deleted and then later re-created in the main repository with the same name, but different case. A branch repository that was created before these changes could not then be merged in, despite the changesets from the main repository having been pulled.
Its a regular problem in Windows for not using case-sensitive file systems. If you want to do it with the TortoiseHg Workbench
installed, search the file and rename it:
right click/TortoiseHg/Rename File
It will rename the file to the right case sensitive name you want. The next picture shows how i changed XMLConverter
for XmlConverter
Then in the Workbench you may commit the file change:
This was updated a week later
The solution presented may gives you problems later updating the whole repository from another PC. So the ultimate way to resolve it, may be making 2 commits:
So it got like this:
This is actually the way it doesnt make conflicts in Windows anymore. It looks ugly but it is effective.
I solved in a simpler way:
What it's really causing the problem is trying to create and delete at the same time a file/folder that is potentially the same in case unsensitive systems.
I know this is an old question but this is what worked for me and I hope it is of use to someone. In my case I had a legacy repo with an old branch I needed to close.
I used to Windows bash shell of Windows 10 to resolve this lxrun /install
and then when that was setup I installed mercurial sudo apt-get install mercurial
This will give you access to your file system via the mnt folder, and you can use mercurial from the command line.
In my case I could then easily update to the problematic branch and close it.
As Laurens Holst said renaming the folder/file passing through a temporary file system worked for me.
$ hg rename a.txt tmp
$ hg rename tmp A.TXT
But to make it work, and avoid colliding files error during merge i had to PURGE after renaming