[PATCH minor-cleanup] bundle2: add an informative comment to the capability dict

Augie Fackler raf at durin42.com
Thu May 28 13:46:10 CDT 2015


On Thu, May 28, 2015 at 10:05:37AM -0700, Pierre-Yves David wrote:
> # HG changeset patch
> # User Pierre-Yves David <pierre-yves.david at fb.com>
> # Date 1432832422 25200
> #      Thu May 28 10:00:22 2015 -0700
> # Node ID 04ae51b7be17f7bed4ba69872ab51f59adcb43d8
> # Parent  bcb17d7dbec25088eaec5e4d34dedbd7057c5d68
> bundle2: add an informative comment to the capability dict

Queued, thanks. Also thanks for marking an easy to review one so I
could just clear it out quickly.

>
> It is fairly easy to get confused by capabilities "missing" from this dict. We
> make it clear the dict is not the whole story.
>
> diff --git a/mercurial/bundle2.py b/mercurial/bundle2.py
> --- a/mercurial/bundle2.py
> +++ b/mercurial/bundle2.py
> @@ -1013,10 +1013,12 @@ class unbundlepart(unpackermixin):
>              adjust = self.read(internaloffset)
>              if len(adjust) != internaloffset:
>                  raise util.Abort(_('Seek failed\n'))
>              self._pos = newpos
>
> +# These are only the static capabilities.
> +# Check the 'getrepocaps' function for the rest.
>  capabilities = {'HG20': (),
>                  'listkeys': (),
>                  'pushkey': (),
>                  'digests': tuple(sorted(util.DIGESTS.keys())),
>                  'remote-changegroup': ('http', 'https'),
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel at selenic.com
> https://selenic.com/mailman/listinfo/mercurial-devel


More information about the Mercurial-devel mailing list