diff mercurial/localrepo.py @ 22342:262c5cc126c1

bundle2: introduce a `getrepocaps` to retrieve the bundle2 caps of a repo This function lets extensions change the bundle2 capabilities of a repository.
author Pierre-Yves David <pierre-yves.david@fb.com>
date Mon, 25 Aug 2014 19:21:47 +0200
parents 2d16b39601b5
children c9b32c6a2944
line wrap: on
line diff
--- a/mercurial/localrepo.py	Mon Aug 25 19:17:06 2014 +0200
+++ b/mercurial/localrepo.py	Mon Aug 25 19:21:47 2014 +0200
@@ -305,7 +305,7 @@
         # required by the tests (or some brave tester)
         if self.ui.configbool('experimental', 'bundle2-exp', False):
             caps = set(caps)
-            capsblob = bundle2.encodecaps(bundle2.capabilities)
+            capsblob = bundle2.encodecaps(bundle2.getrepocaps(self))
             caps.add('bundle2-exp=' + urllib.quote(capsblob))
         return caps