2011-09-19

New Mercurial repository format (dotencode).

dotencode is a new repository format for Mercurial that which enhances the fncache repository format.

Previously I wrote about introducing of fncache repository format and problems that occur on old Debian installation.

Story like to be repeated. Debian squeeze use version 1.6.4, while last Cygwin distro come with 1.9.2. So Mercurial repos do not be readable from USB stick on Debian if they created under last Cygwin distro without special magic...

dotencode format is introduced in Mercurial version 1.7 and stay default for newly created repository. fncache must be enabled to use dotencode.

New format allow to avoid issues with filenames starting with ._ on Mac OS X and spaces on Windows.

New format does not affect the wire (or bundle) protocols in any way. THIS CHANGE is only a workaround for some limitations of underlie FS!!

But local operation denied on new format repository by old Mercurial version (prior to 1.6.x). If you try you get:

abort: requirement 'dotencode' not supported!
This controlled by dotencode keyword from requires files:
$ cat repo/.hg/requires revlogv1 store fncache dotencode
If you wont back from dotencode to non-dotencode repo use new Mercurial (from 1.7):
$ hg --config format.usedotencode=0 clone --pull $oldrepo $newrepo
The fncache repo format can be disabled in the hgrc(5):
[format] usedotencode = False
or with "--config format.usefncache=0" on the command line. In this case you get repo which compatible with Mercurial down to version 1.1.

To get list of supported repo formats type:

$ hg help config
and look for "format" section. To be Mercurial 0.9.4 compatible use::
$ hg clone -U --pull \ --config format.usefncache=0 --config format.dotencode=0 $oldr $newr