[PATCH 0 of 3] Case folding changes

Paul Moore p.f.moore at gmail.com
Fri Jun 6 18:24:03 UTC 2008


This is a repost of my case folding changes. The series improves support
for case folding filesystems. There are 3 parts to the change:

  - Add a dirstate method, folding(), to check if we are on a case-folding
    filesystem.
  - Add a util function, fspath(), which converts a pathname (for an existing
    file) to the case as stored in the filesystem.
  - Add a normalize method to the dirstate, to return the canonical form of a
    filename. Use that in dirstate.statwalk.

With these changes, the test suite passes on Windows, with the following
additional failures - test-commit, test-issue612, test-issue660,
test-mv-cp-st-diff, test-remove, test-rename, test-rename-dir-merge,
test-revert, test-walk, test-win32text. All of these are simply the result of
filenames being reported with backslash as path separator (the normal Windows
value) rather than slash. There was one further failure, test-status, which
appears to be caused by different text for the error message reporting a
missing file.

None of the test failures reflect any functional issues.

It should be possible to fix the test suite to remove the path separator
failures, but I believe this needs to be done in the Windows test suite patch
series, rather than in the tests as shipped with Mercurial.

These patches fix issues 910 and 1092, and add infrastructure to allow easier
fixes of other case folding issues.

Paul Moore.


More information about the Mercurial-devel mailing list