# HG changeset patch # User Pierre-Yves David # Date 2017-04-09 16:16:09 # Node ID 6d055cd6669f771e815cc11dd9d8522f6ef3ba73 # Parent 56f58027a513470a623204f1b0a04ce34c1973c5 bundle2: add documention to 'part.addparams' There are some non-obvious limitations on the parameters of this method. Add some documentation where people will likely look to understand how to use this API. diff --git a/mercurial/bundle2.py b/mercurial/bundle2.py --- a/mercurial/bundle2.py +++ b/mercurial/bundle2.py @@ -900,6 +900,13 @@ class bundlepart(object): return tuple(self._advisoryparams) def addparam(self, name, value='', mandatory=True): + """add a parameter to the part + + If 'mandatory' is set to True, the remote handler must claim support + for this parameter or the unbundling will be aborted. + + The 'name' and 'value' cannot exceed 255 bytes each. + """ if self._generated is not None: raise error.ReadOnlyPartError('part is being generated') if name in self._seenparams: