[PATCH] localrepo: send client's bundlecaps to a server during a pull

Wojciech Lopata lopek at fb.com
Fri Aug 30 15:14:02 CDT 2013


# HG changeset patch
# User Wojciech Lopata <lopek at fb.com>
# Date 1377891837 25200
#      Fri Aug 30 12:43:57 2013 -0700
# Node ID b78c0dcf3d674c23462c1b68dff43e6d3277f295
# Parent  73d761ed3dbddd06d4a65027ef82bb77ae0ec82f
localrepo: send client's bundlecaps to a server during a pull

Thanks to this change extensions that modify format of revlog and are used on
client and server side will be able to customize format of bundles sent during
a pull, and possibly make this operation faster.

diff --git a/mercurial/localrepo.py b/mercurial/localrepo.py
--- a/mercurial/localrepo.py
+++ b/mercurial/localrepo.py
@@ -148,6 +148,7 @@
                                         'dotencode'))
     openerreqs = set(('revlogv1', 'generaldelta'))
     requirements = ['revlogv1']
+    bundlecaps = set()
     filtername = None
 
     def _baserequirements(self, create):
@@ -1671,7 +1672,7 @@
                 if remote.capable('getbundle'):
                     # TODO: get bundlecaps from remote
                     cg = remote.getbundle('pull', common=common,
-                                          heads=heads or rheads)
+                            heads=heads or rheads, bundlecaps=self.bundlecaps)
                 elif heads is None:
                     cg = remote.changegroup(fetch, 'pull')
                 elif not remote.capable('changegroupsubset'):


More information about the Mercurial-devel mailing list