[PATCH 0 of 2] fixes for case-insensitive filesystems

Simon Heimberg simohe at besonet.ch
Wed Jul 22 08:22:35 CDT 2009

This patches probably close two issues, so they could be for stable. Could 
somebody check if the issues are fixed, please? I do not have a Mac. The 
test suite passes on linux.

#1 checks if src and dest of a rename are the same file. If it is, rename is 
used instead of copy. On windows os.path.samefile does not exist. It is 
replaced by comparing the result of os.path.normcase of both paths.

#2 uses string.lower instead of os.path.normcase because the later does not 
change the path on Mac OS X even if it is on a case-insensitive system (see 
http://docs.python.org/library/os.path.html#os.path.normcase). This is no 
problem on Linux because case-insensitive filesystems are handled different. 
(at least on my system: a can not be opened as A, creating a and A does not 

More information about the Mercurial-devel mailing list