[PATCH 1 of 4] bundle2: add documention to 'part.addparams'
Pierre-Yves David
pierre-yves.david at ens-lyon.org
Sun Apr 9 17:41:53 UTC 2017
# HG changeset patch
# User Pierre-Yves David <pierre-yves.david at ens-lyon.org>
# Date 1491754569 -7200
# Sun Apr 09 18:16:09 2017 +0200
# Node ID 94eac6f88d489757b183229681baf0d3f44284e7
# Parent e0dc40530c5aa514feb6a09cf79ab6a3aa2ec331
# EXP-Topic bundle2.doc
# Available At https://www.mercurial-scm.org/repo/users/marmoute/mercurial/
# hg pull https://www.mercurial-scm.org/repo/users/marmoute/mercurial/ -r 94eac6f88d48
bundle2: add documention to 'part.addparams'
They are some non-obvious limitation to what the parameters can be. We make it
clearer on the method as code writter might seek details there.
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 remove 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:
More information about the Mercurial-devel
mailing list