fncache is a new repository layout (or format) for Mercurial that solves the following issues:

Current version of the patch: http://marc.info/?l=mercurial-devel&m=122445566407446&w=2

Status: [http://marc.info/?l=mercurial-devel&m=122452614713724&w=2 queued] by mpm

With this patch, all new repositories on all platforms will be fncache repositories. You don't have to do anything (besides using a version of Mercurial containing this patch, which is not yet the case, as the patch is not yet applied to any official repo).

New repositories are for example created by non-hardlink cloning of existing repos or if you clone over the wire (http, ssh).

For example, if you have a current non-fncache repo and you do a local 'clone --pull' you will end up with an fncache repo. If you do a plain local clone (without '--pull') of an existing non-fncache repo, you will get a non-fncache repo with hardlinks to the existing repo.

In short, use clone --pull to convert repos (in case you want to convert repos to the fncache repo format, which will almost never be needed).

Of course old versions of Mercurial will not be able to read fncache repos. If you try to access an fncache repo with an old version of Mercurial it will abort with:

abort: requirement 'fncache' not supported!

Which tells you that the repo at hand requires knowledge of the fncache repo format in Mercurial.

(BTW, if, for whatever reason, the fnache file in the repo becomes corrupted, you can do a clone --pull to re- build it. The fncache file contains a list of all revlog files in the repo).

Existing non-fncache repositories will remain as they are, as Mercurial will still be able to write and read non-fncache repositories with this patch.

In current Mercurial there is already a hgrc option '[format] usesstore' [1], which enables the current 'store' format, which is the default in current Mercurial.

The store format encodes filenames with uppercase chars "X" as "_x". If you disable that, you will have to make sure that the repo is only used on a platform that does not fold case (that is, don't use or copy it to/on Windows). The fncache repo layout is a descendant of the store format, so if you disable the store format you implicitly disable the fncache layout.

With the patch as it is, there is currently no option to disable the fncache layout for new repos (as a hackaround, you can manually remove the 'fncache' entry in the requires file after hg init). You can only disable the 'store' format, which implicitly disables fncache too. But there is no separate option to only disable 'fncache' and keep 'store'.

The new layout does not affect the wire (or bundle) protocol(s) in any way. So you can push/pull/clone over the wire to/from any repo being in any layout using any Mercurial version on both ends.

[1] http://www.selenic.com/mercurial/hgrc.5.html#format