Need to move more intelligence into bundler

Sune Foldager cryo at cyanite.org
Fri May 6 15:19:34 CDT 2011


On Fri, May 06, 2011 at 10:38:29AM -0500, Matt Mackall wrote:
>On Fri, 2011-05-06 at 10:20 +0200, Sune Foldager wrote:
>> Benoit, I think we're gonna have to move even more intelligence into the bundler.
>> Currently, group performs the main revision loop, and calls the bundler to generate
>> each revision entry in the bundle.
>>
>> I think we'll need to move the loop into the bundler as well. In that way, the
>> bundler can have maximum flexibility to select deltaparents and to ask the revlog
>> what deltaparents IT uses, so it might strive to use the same, so the deltas can be
>> transfered directly. It can also test that it actually includes, in the bundle, the
>> revisions it would base against, which is important.
>
>My plan was that the bundler object would have some capability flags
>("yes, I support delta parents") that revlog.addgroup could look at and
>choose how to build the bundle deltas. It's more or less equivalent, but
>this is slightly preferable to me because it keeps the somewhat more
>arcane knowledge of revlogs better contained.

Well, the knowledge of bundles is just as arcane, so it doesn't really matter
who does what. Although: the bundler would only have to call deltaparent on
the revlog to find out its parent, and then ask for deltas. That's all. I think
doing things the other way around, group() will need to know more about the
bundle format.


More information about the Mercurial-devel mailing list