Windows people: please help check idea for a new Mercurial repository layout

Paul Moore p.f.moore at gmail.com
Sat Jun 14 06:22:19 CDT 2008


2008/6/14 Adrian Buehlmann <adrian at cadifra.com>:
> So, a simple file/directory encoding strategy (for a new Mercurial repo
> layout) would be to prepend a period to every directory- and filename
> inside the .hg dir.
>
> If anyone knows this encoding doesn't work, please tell me!

I see no reason why this would not work. However, it may be a bit more
wide-ranging than is needed.

> Of course this would be a new, incompatible repository layout, so old
> Mercurial versions would not be able to read such new repositories
> (see http://www.selenic.com/mercurial/wiki/index.cgi/CompatibilityRules).

Would it be better to *only* encode repository entries which are
currently invalid? Say, by tilde-escaping the first letter of the
special filename (so aux would become ~61ux). Unfortunately,
util._buildencodefun uses a hard-coded list of translations, so it's
still backward-incompatible, but at least the majority of repos remain
compatible.

Actually, if _buildencodefn added all the possible ~xx codes to the
dmap array, rather than just the ones needed for the special names, it
would give some extra scope for future encodings without breaking
compatibility each time.

Paul.


More information about the Mercurial mailing list