Show More
@@ -9,7 +9,7 b' from i18n import _' | |||
|
9 | 9 | from node import hex, nullid |
|
10 | 10 | import errno, urllib |
|
11 | 11 | import util, scmutil, changegroup, base85, error |
|
12 | import discovery, phases, obsolete, bookmarks, bundle2 | |
|
12 | import discovery, phases, obsolete, bookmarks, bundle2, pushkey | |
|
13 | 13 | |
|
14 | 14 | def readbundle(ui, fh, fname, vfs=None): |
|
15 | 15 | header = changegroup.readexactly(fh, 4) |
@@ -678,6 +678,12 b' def getbundle(repo, source, heads=None, ' | |||
|
678 | 678 | bundler = bundle2.bundle20(repo.ui, b2caps) |
|
679 | 679 | if cg: |
|
680 | 680 | bundler.newpart('b2x:changegroup', data=cg.getchunks()) |
|
681 | listkeys = kwargs.get('listkeys', ()) | |
|
682 | for namespace in listkeys: | |
|
683 | part = bundler.newpart('b2x:listkeys') | |
|
684 | part.addparam('namespace', namespace) | |
|
685 | keys = repo.listkeys(namespace).items() | |
|
686 | part.data = pushkey.encodekeys(keys) | |
|
681 | 687 | _getbundleextrapart(bundler, repo, source, heads=heads, common=common, |
|
682 | 688 | bundlecaps=bundlecaps, **kwargs) |
|
683 | 689 | return util.chunkbuffer(bundler.getchunks()) |
@@ -180,7 +180,8 b' class localrepository(object):' | |||
|
180 | 180 | requirements = ['revlogv1'] |
|
181 | 181 | filtername = None |
|
182 | 182 | |
|
183 |
bundle2caps = {'HG2X': () |
|
|
183 | bundle2caps = {'HG2X': (), | |
|
184 | 'b2x:listkeys': ()} | |
|
184 | 185 | |
|
185 | 186 | # a list of (ui, featureset) functions. |
|
186 | 187 | # only functions defined in module of enabled extensions are invoked |
General Comments 0
You need to be logged in to leave comments.
Login now