[prev in list] [next in list] [prev in thread] [next in thread]
List: mercurial-devel
Subject: Re: [PATCH 3 of 3 V3] bundle2: part params
From: David Soria Parra <davidsp () fb ! com>
Date: 2014-03-31 17:24:37
Message-ID: 86zjk6s2lm.fsf () experimentalworks ! net
[Download RAW message or body]
pierre-yves.david@ens-lyon.org writes:
> # HG changeset patch
> # User Pierre-Yves David <pierre-yves.david@fb.com>
> # Date 1395303885 25200
> # Thu Mar 20 01:24:45 2014 -0700
> # Node ID 52506c69984151f618633cdd7233aa4e7eff46d9
> # Parent 797e113da0446a0bcecbdf5b81f87f22b0a54851
> bundle2: part params
>
> diff --git a/mercurial/bundle2.py b/mercurial/bundle2.py
> --- a/mercurial/bundle2.py
> +++ b/mercurial/bundle2.py
> @@ -82,12 +82,35 @@ Binary format is as follow
> interpret the part payload.
>
> The binary format of the header is has follow
>
> :typesize: (one byte)
> +
> :typename: alphanumerical part name
> - :option: we do not support option yet this denoted by two 16 bites zero.
> +
> + :parameters:
> +
> + Part's parameter may have arbitraty content, the binary structure is::
> +
> + <mandatory-count><advisory-count><param-sizes><param-data>
> +
> + :mandatory-count: 1 byte, number of mandatory parameters
> +
> + :advisory-count: 1 byte, number of advisory parameters
> +
> + :param-sizes:
> +
> + N couple of Bytes, where N is the total number of parameters. each
> + couple if the size of the key and value for a parameters
english sentences start with an uppercase letter, therefore each ->
Each. Also I don't understand that sentence.
> +
> + :param-data:
> +
> + A blob of bytes from which each parameter key and value can be
> + retrieved using the list of size couples stored in the previous
> + field.
> +
> + Mandatory parameters comes first, then the advisory ones.
>
> :payload:
>
> payload is a series of `<chunksize><chunkdata>`.
>
> @@ -113,10 +136,19 @@ from i18n import _
>
> _fstreamparamsize = '>H'
> _fpartheadersize = '>H'
> _fparttypesize = '>B'
> _fpayloadsize = '>I'
> +_fpartparamcount = '>BB'
Accordung to the pydoc there is an explizit prefix for network byte
order. Maybe for documentation purposes it might better to use it (!)
instead of >.
Besides that the series looks fine for me.
_______________________________________________
Mercurial-devel mailing list
Mercurial-devel@selenic.com
http://selenic.com/mailman/listinfo/mercurial-devel
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic