HG bundle file size

Sebastian Unger sebunger44 at gmail.com
Wed Aug 6 10:33:50 UTC 2014


Ah, yes that would be the problem. The way bundles are explained in the
manual, I always assumed that 1 bundle containing n changesets should have
essentially the same information as n bundles with 1 changeset each (the
same n changesets of course).

I guess in the mean time then one should only put related change sets in a
single bundle. Do they have to be in a single line or can a bundle store a
delta from one manifest to another manifest in the same bundle that's not
the direct predecessor? Hmm, not sure if I'm being clear here. Let me try
to draw a picture:

If a bundle contains 3 changesets:

A -> B -> C

where A -> B means A is the parent of B, then I guess everything is well
and no inefficient diffs are used. If I understand you right, what you are
saying is that in a bundle like this:

A -> B -> C       D -> E -> F

D is actually stored as a diff to C rather than to its parent which is
already in the target repo, right? That would certainly line up with my
observations. So my question is, in this case:

A -> B -> C
         \----------> D

Is D stored as a diff to C or to B? If it is stored as a diff to C, that
means one should only (if one is interested in space efficiency) create
bundles where each changeset except the first is the child of the previous
changeset in the bundle.

Cheers,
Seb



On Wed, Aug 6, 2014 at 8:38 PM, Matt Mackall <mpm at selenic.com> wrote:

> On Wed, 2014-08-06 at 13:37 +1200, Sebastian Unger wrote:
> > Ahh, I think the attached script may be a minimal reproduction of the
> > problem. Of course, here the file sizes are tiny since there is only one
> > other file in the repo. Hope this helps.
>
> I don't think this test shows what you think it shows. Mercurial sends
> along a delta for the new manifest and that mentions fileA.. but none of
> fileA's revisions are sent. The --debug flag shows:
>
> list of changesets:
> 2977cc31231706b852845fe2c9f7efe66db47042
> 82c4e6648e7f0a5de6b5d34a52d34a7da1c8f012
> bundling: 1/2 changesets (50.00%)
> bundling: 2/2 changesets (100.00%)
> bundling: 1/2 manifests (50.00%)
> bundling: 2/2 manifests (100.00%)
> bundling: fileB 1/2 files (50.00%)
> bundling: fileC 2/2 files (100.00%)
>
> Perhaps you have changesets X and Y on separate branches and there's a
> large delta in the manifests between those branches. This will result in
> a large delta being sent for manifest X -> manifest Y because the
> current bundle format can only contain linear delta chains. This is
> slowly being addressed as part of the much larger bundle2 effort that's
> currently being spread across several releases. See
>
> http://mercurial.selenic.com/wiki/GeneralDelta
> http://mercurial.selenic.com/wiki/BundleFormat2
>
> --
> Mathematics is the supreme nostalgia of our time.
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mercurial-scm.org/pipermail/mercurial/attachments/20140806/ddebe4f7/attachment-0002.html>


More information about the Mercurial mailing list