bundle2: expose mandatory params in a mandatorykeys attribute
We expose all keys that MUST be processed in ``part.mandatorykeys``. This makes
it much easier to access the information. Enforcement of the mandatory
parameters is coming in later changesets.
--- a/mercurial/bundle2.py Mon May 26 18:45:43 2014 -0700
+++ b/mercurial/bundle2.py Fri May 23 20:23:54 2014 -0700
@@ -690,6 +690,7 @@
self.mandatoryparams = None
self.advisoryparams = None
self.params = None
+ self.mandatorykeys = ()
self._payloadstream = None
self._readheader()
@@ -715,6 +716,7 @@
# user friendly UI
self.params = dict(self.mandatoryparams)
self.params.update(dict(self.advisoryparams))
+ self.mandatorykeys = frozenset(p[0] for p in mandatoryparams)
def _readheader(self):
"""read the header and setup the object"""