[PATCH V2] generaldelta: initialize basecache properly

Matt Mackall mpm at selenic.com
Sat Sep 21 17:06:45 CDT 2013


On Sun, 2013-09-22 at 05:01 +1000, Tim Delaney wrote:
> On 21 September 2013 17:47, Wojciech Lopata <lopek at fb.com> wrote:
> 
> > # HG changeset patch
> > # User Wojciech Lopata <lopek at fb.com>
> > # Date 1379699151 25200
> > #      Fri Sep 20 10:45:51 2013 -0700
> > # Node ID 68a30bf47fe1af70d698ddb213c95ce7331240d8
> > # Parent  1c62f9487e46a467aace39316459a5be57c55e8a
> > generaldelta: initialize basecache properly
> >
> > Previously basecache was incorrectly initialized before adding the first
> > revision from a changegroup. Basecache value influences when full
> > revisions are
> > stored in revlog (when using generaldelta). As a result it was possible to
> > generate a generaldelta-revlog that could be bigger by arbitrary factor
> > than its
> > non-generaldelta equivalent.
> >
> 
> Is there a reason generaldelta is still undocumented and/or not yet the
> default format? It's been in since Mercurial 1.9 and I only found out about
> it thanks to this patch. My work repo (~55000 changesets, mostly from SVN
> via hgsubversion) has had its 00manifest.d reduced from ~1.4GB to ~28MB by:

The reason is that you could still end up sending that 1.4GB over the
wire =and= taking substantially more CPU than before... because the wire
protocol can only do linear deltas and thus will have to recompute the
deltas for the old format. This will be fixed when we get the new bundle
format figured out.

You might find that a standard clone of your generaldelta repo is
smaller than your original repo.

-- 
Mathematics is the supreme nostalgia of our time.




More information about the Mercurial-devel mailing list