New revlog format, plan page

Johannes Totz johannes at jo-t.de
Thu Jan 7 01:05:34 UTC 2021


On 05/01/2021 15:38, Raphaël Gomès wrote:
> Hi all,
> 
> During the last (virtual) sprint, a lot of us spoke about the need for a 
> format change of the revlog to overcome some of its limitations.
> 
> I've opened a very much draft plan page [1] to try to list all the 
> things we want to do in that version and try to figure out an efficient 
> new format.
> 
> I'm aware that the v2 is already planned, but I figured that we can just 
> merge that (seemingly) paused effort and this new one.
> 
> I wish you all a nice 2021!
> Raphaël
> 
> [1] https://www.mercurial-scm.org/wiki/RevlogV2Plan

I haven't kept up to date with hg dev... sorry if this is a stupid question:

Have we ever addressed the file duplication on hg-mv? .hg/store/data/ 
will end up with lots of duplicated data. That has always been my 
biggest gripe.

Random idea I had:
store the *.d files as usual but add a layer of "segments" like *.d.0 
and *.d.1 and so on. So when one does a hg-mv, the initial oldname.d.0 
is hardlinked to newname.d.0 and any appends to oldname.d.0 would 
instead go to a new segment oldname.d.1 (same for newname.d.1) because 
that segment *.d.0 has >1 link count. And so on for subsequent segments.
That should work for local clones, moves, copies. But will prob make a 
mess of the wire protocol.




More information about the Mercurial-devel mailing list