Mercurial > hg > mercurial-source
diff mercurial/bundle2.py @ 32640:6d055cd6669f
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.
author | Pierre-Yves David <pierre-yves.david@ens-lyon.org> |
---|---|
date | Sun, 09 Apr 2017 18:16:09 +0200 |
parents | 4dbef666c6c9 |
children | 9bd9e9cb3f69 |
line wrap: on
line diff
--- a/mercurial/bundle2.py +++ b/mercurial/bundle2.py @@ -900,6 +900,13 @@ 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: