changeset 31861: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 56f58027a513
children 9bd9e9cb3f69
files mercurial/bundle2.py
diffstat 1 files changed, 7 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/bundle2.py	Mon Apr 10 21:12:54 2017 -0400
+++ b/mercurial/bundle2.py	Sun Apr 09 18:16:09 2017 +0200
@@ -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: