[PATCH minor-cleanup] bundle2: add an informative comment to the capability dict

Pierre-Yves David pierre-yves.david at ens-lyon.org
Thu May 28 17:05:37 UTC 2015


# HG changeset patch
# User Pierre-Yves David <pierre-yves.david at fb.com>
# Date 1432832422 25200
#      Thu May 28 10:00:22 2015 -0700
# Node ID 04ae51b7be17f7bed4ba69872ab51f59adcb43d8
# Parent  bcb17d7dbec25088eaec5e4d34dedbd7057c5d68
bundle2: add an informative comment to the capability dict

It is fairly easy to get confused by capabilities "missing" from this dict. We
make it clear the dict is not the whole story.

diff --git a/mercurial/bundle2.py b/mercurial/bundle2.py
--- a/mercurial/bundle2.py
+++ b/mercurial/bundle2.py
@@ -1013,10 +1013,12 @@ class unbundlepart(unpackermixin):
             adjust = self.read(internaloffset)
             if len(adjust) != internaloffset:
                 raise util.Abort(_('Seek failed\n'))
             self._pos = newpos
 
+# These are only the static capabilities.
+# Check the 'getrepocaps' function for the rest.
 capabilities = {'HG20': (),
                 'listkeys': (),
                 'pushkey': (),
                 'digests': tuple(sorted(util.DIGESTS.keys())),
                 'remote-changegroup': ('http', 'https'),


More information about the Mercurial-devel mailing list