Size: 1348
Comment:
|
Size: 1524
Comment: +cat, see also
|
Deletions are marked like this. | Additions are marked like this. |
Line 30: | Line 30: |
=== See also === * [http://hgbook.red-bean.com/hgbookch7.html#x11-1530007.7 "Case sensitivity"] in [http://hgbook.red-bean.com/hgbook.html hgbook] ---- CategoryWindows |
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
See also
* [http://hgbook.red-bean.com/hgbookch7.html#x11-1530007.7 "Case sensitivity"] in [http://hgbook.red-bean.com/hgbook.html hgbook]