MQ performance on large repo

Adrian Buehlmann adrian at cadifra.com
Tue Mar 2 09:46:36 CST 2010


On 02.03.2010 15:32, Greg Ward wrote:
> Ah.  That sounds slow -- 400 MB, 106k changesets.  I think I'll stick with
> 
>   mv .hg/store/fncache{,.save}
>   sort -u .hg/store/fncache.save > .hg/store/fncache
> 
> That's OK, right?

I can't tell for sure, since I don't know what exactly your sort is
doing (remember: I'm on Windows).

But removing duplicate lines in fncache is ok, as long as that repo is
offline. And the order of the entries in fncache is irrelevant.

I recommend doing a hg verify afterwards, otherwise you will probably
never know whether you borked it or not (given that fncache is only used
by 'hg clone --uncompressed' -- and who uses that?).

If you do a hg verify anyway, you might as well just add an inexistent
entry to fncache. verify will do a rewrite of the fncache file to remove
that inexistent entry, thereby removing duplicates as well.

And if you still happen to have a borked (=doesn't pass verify) fncache
file, you can do a 'hg clone --pull' from the broken repo to a copy
repo. That copy will pass verify again ('hg clone --pull' doesn't read
the fncache file).


More information about the Mercurial-devel mailing list