Wireprotocol changes for parentdelta

Vishakh Harikumar vsh426 at gmail.com
Mon Aug 2 11:39:24 CDT 2010


On Mon, Aug 2, 2010 at 1:00 AM, Matt Mackall <mpm at selenic.com> wrote:
> On Mon, 2010-08-02 at 00:35 +0530, Vishakh Harikumar wrote:
>> On Sun, Aug 1, 2010 at 7:19 PM, Matt Mackall <mpm at selenic.com> wrote:
>> > 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
>>
>> Bundle format for shallow clones,
>> 1 delta parent
>>   now all groups start with a diff against p1 of the first rev. for
>>   shallowclones i am sending the full revision in cases where
>>   p1 is not available.
>
> Is the delta parent option above not sufficient?

Just reiterating it.

>> 2 header to identify shallow root for which bundle was created
>>   e.g. when a new repo is created from a bundled shallow clone
>
> Uh, tell us more? How do you envision this working?

Similar to what you mentioned for the continuation header.
The root for which the bundle was created will exist immediately
after the bundle format ('HGXXXX") and before the changegroup begins,
so we can read that first and 1)confirm the bundle is intended for the local
[shallow] repository or 2)initialize the local repo with the give root.
If there are to be other optional fields then an extras chunk before the
changegroup where they (&root) can be found and a header extracting function
returning version and extras.

format for extras chunk (bytes):
4 - length of entire chunk
n - field length
fieldlength - field data
[n - field length
 fieldlength - field data
 [.and so on.]
]
(n=max length of field data supported)

> We need enough information here so that one person can write one bundle
> format that meets all the requirements.
>
> --
> Mathematics is the supreme nostalgia of our time.
>
>
>



-- 
vsh


More information about the Mercurial-devel mailing list