case-folding collision on Windows

Peer Sommerlund peer.sommerlund at gmail.com
Tue Aug 7 06:56:34 CDT 2007


Hi

I'm using hg version 0.9.4 + XX on Windows, which is a little newer than
0.9.4
hg --version shows f48290864625+20070705

By accident I have created the same file with different case in two
branches.
This was not detected during merge, but during update. The effect is that I
cannot do an hg up -C to the merged changeset because hg aborts.
Is it possible to enable a warning on Windows, if I try to merge two
branches with a case-folding collision?


Attached is a small script to reproduce the situation

The final error message from "hg up -C [merged-rev]":
abort: case-folding collision between World.txt and world.txt

Regards,
Peer

----
test.bat

del /s/q x >nul
rmdir /s/q x
if exist x goto :end
mkdir x
cd x
hg init base
cd base
echo Hello >hello.txt
hg add
hg com -m "Common changeset"
cd ..
hg clone base 1
cd 1
echo World >World.txt
hg add
hg com -m "Upper case World.txt"
cd ..
hg clone base 2
cd 2
echo world >world.txt
hg add
hg com -m "lower case world.txt"
hg pull ..\1
hg merge
rem  hg st at this point shows world.txt AND World.txt
hg com -m "Both upper and lower case file on windows!"
rem Switch to upper case file only
hg up -C 1
rem Switch to merged changeset (both files)
rem *** This causes hg to abort ***
hg up -C 3
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://selenic.com/pipermail/mercurial/attachments/20070807/871f03f9/attachment.htm 


More information about the Mercurial mailing list