Differences between revisions 4 and 5
Revision 4 as of 2006-12-10 19:29:39
Size: 1333
Editor: 10
Revision 5 as of 2006-12-10 20:48:52
Size: 1348
Editor: mon69-3-82-235-37-168
Comment: reserved char
Deletions are marked like this. Additions are marked like this.
Line 14: Line 14:
 * replace characters 126-255 with ~7e to ~ff (note this escapes tilde as well  * replace characters 126-255 and '\:*?"<>|' with ~7e to ~ff (note this escapes tilde as well

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 and '\:*?"<>|' 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)