[PATCH 0 of 3] Case folding fixes (issues 1083 and 1092)

Paul Moore p.f.moore at gmail.com
Tue Apr 22 22:10:53 UTC 2008


This patch series fixes 2 case folding bugs (issues 1083 and 1092) and
provides a basis for further fixes.

The first patch in the series implements a utility function which, when given
a filename, returns the name of the file as stored in the filesystem. On Unix
(assuming a case sensitive filesystem) the returned name is the same as the
input, but on Windows, it can differ. The patch implements the Windows
behaviour, plus a case insensitive default implementation.

Further implementations could be added at a later date to implement support
for case sensitive filesystems on Unix, or Mac OS behaviour (case insensitive
filesystems with Unicode normalisation). I do not have access to such systems
to implement these cases at the moment.

With the utility function in place, the following two patches implement fixes
for 2 specific case folding bugs - 1083 (Case collision error between
different revisions in history) and 1092 (hg add gives wrong result
when filename case doesn't match). Further fixes along similar lines, using
the same utility function, are expected to be possible.

The tests pass on Windows exactly as for an unpatched Mercurial. I have not
been able to run the tests on Unix, but as the change is a no-op there, I do
not expect the tests to fail.

Paul


More information about the Mercurial-devel mailing list