store: encode first period or space in filenames (issue1713)
- Mac OS X has problems with filenames starting with '._' (e.g. '.FOO' -> '._f_o_o' is now encoded as '~2e_f_o_o') - Explorer of Windows Vista and Windows 7 strip leading spaces of path elements of filenames when copying trees Above problems are avoided by encoding the first space (as '~20') or period (as '~2e') of all path elements. This introduces a new entry 'dotencode' in .hg/requires, that is, a new repository filename layout (inside .hg/store). Newly created repositories require 'dotencode' by default. Specifying [format] dotencode = False in a config file will use the old format instead. Prior Mercurial versions will abort with the message abort: requirement 'dotencode' not supported! when trying to access a local repository that requires 'dotencode'. New 'dotencode' repositories can be converted to the previous repository format with hg --config format.dotencode=0 clone --pull repoA repoB
Showing
- mercurial/localrepo.py 4 additions, 1 deletionmercurial/localrepo.py
- mercurial/store.py 12 additions, 7 deletionsmercurial/store.py
- tests/test-hybridencode.py 6 additions, 2 deletionstests/test-hybridencode.py
- tests/test-hybridencode.py.out 2 additions, 2 deletionstests/test-hybridencode.py.out
- tests/test-init.t 4 additions, 0 deletionstests/test-init.t
Loading
Please register or sign in to comment