2009-09-02

New Mercurial repository format (fncache).

fncache is a new repository format for Mercurial that reorganized the revlog data file names. It is introduced in Mercurial version 1.1 and stay default for newly created repository. The fncache repo format uses new encoding for path names inside the store.

Reason for this change is more pretty internal file naming. Thus reserved MS Windows file names as 'con', 'prn', 'aux', 'nul', 'com1'..'com9', 'lpt1'..'lpt9' are specially decorated and paths longer then 120 chars now stored as fixed length with decoration by SHA1 hash.

New format does not affect the wire (or bundle) protocols in any way.

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

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

For more details refer to http://mercurial.selenic.com/wiki/fncacheRepoFormat

PS. Read next new story about another new format...