Differences between revisions 2 and 3
Revision 2 as of 2006-10-23 23:11:29
Size: 1300
Editor: mpm
Comment:
Revision 3 as of 2006-10-26 10:21:56
Size: 1312
Editor: blueice3n1
Comment:
Deletions are marked like this. Additions are marked like this.
Line 12: Line 12:
 * replace _ with __  * replace {{{_}}} with {{{__}}}

To deal with CaseFolding on the repo side, we need to:

  • escape uppercase ASCII characters in filenames
  • escape high ASCII
    • Unicode and other characters may be case-folded as well
    • Filesystems and operating systems may do other unfortunate things to
      • filenames which will cause interoperability trouble
  • use the same scheme by default on all systems to avoid backup and media sharing issues

A simple escaping scheme is as follows:

  • replace _ with __

  • replace A-Z with _a, etc.
  • replace characters 126-255 with ~7e to ~ff (note this escapes tilde as well

Note that we rarely need to

Implementation plan:

  • add separate localrepo access methods for all store data (changelog, manifest, data/*, journal, lock) {*}

  • if .hg/data exists at localrepo init time, use old access scheme

  • if not, access all store data with escaped paths inside .hg/store/ (eg .hg/store/00changelog.i or .hg/store/data/_readme.i)

This scheme will automatically escape all paths on newly cloned or created repos.

On the working directory side, the best we can do is detect collisions. A simple scheme might look something like this:

  • detect case sensitive filesystem at checkout/update time
  • scan manifest for case-folding collisions and issue a warning

CaseFoldingPlan (last edited 2012-11-06 23:04:58 by abuehl)