Wireprotocol changes for parentdelta

Matt Mackall mpm at selenic.com
Sun Aug 1 09:33:19 CDT 2010


On Sun, 2010-08-01 at 16:14 +0200, Benoit Boissinot wrote:
> On Sun, Aug 1, 2010 at 3:49 PM, Matt Mackall <mpm at selenic.com> wrote:
> > On Sun, 2010-08-01 at 12:35 +0530, Pradeepkumar Gayam wrote:
> >>
> >
> > Fact is, we've already done a large amount of that thinking ahead at the
> > 1.5 sprint. But no one's going to tell you about it unless you ask.
> > Here's a really obvious feature that the new bundle format also needs to
> > support: shallow clone. Another is long hashes.
> >
> > The bundle chunk format looks like:
> >
> > 4  length
> > 20 node
> > 20 p1
> > 20 p2
> > 20 changeset hash (aka linkrev)
> > *  data
> >
> > It's going to need to be extended to something like:
> >
> > 4 flags
> > 4 length
> > n node
> > n p1
> > n p2
> > n delta parent (either p1, p2, n-1, or possibly null?)
> > n changeset hash
> > * data
> >
> > http://mercurial.selenic.com/wiki/BundleFormat
> >
> 
> Another change we discussed at the sprint was adding some kind of
> progress support.

Ahh, right. That'd involve a per-chunk-group header that had a
(possibly-estimated) length hint in it.

> I don't know if it's possible, but a restartable changegroup might be
> nice as well (probably too ambitious).

What would be required in the format to make that possible? Probably a
continuation header, something like:

HG  # magic
20  # version number (maybe 17 so we know when it was introduced?)
GZ  # compression
[continued at 'manifest' chunk 20]  # continuation header
[manifest progress hint]
[manifest chunk]
...
[null chunk]
[file chunks]

Then have an option to changegroup2 (17?) called resume, which would
take strings like 'manifest:20' or 'file:20:blah/blah/blah' to declare
where to resume transmission.

So if we stick in support for a continuation header today, we should be
able to make this work later..

-- 
Mathematics is the supreme nostalgia of our time.




More information about the Mercurial-devel mailing list