comparison mercurial/localrepo.py @ 21144:7a20fe8dc080

bundle2: use HG2X in the header The current implementation of bundle2 is still very experimental and the 3.0 freeze is yesterday. The current bundle2 format has never been field-tested, so we rename the header to HG2X. This leaves the HG20 header available for real usage as a stable format in Mercurial 3.1. We won't guarantee that future mercurial versions will keep supporting this `HG2X` format.
author Pierre-Yves David <pierre-yves.david@fb.com>
date Thu, 17 Apr 2014 15:27:54 -0400
parents d8dd19e09ed4
children 0c5088be66af
comparison
equal deleted inserted replaced
21143:5bb5d4ba14e5 21144:7a20fe8dc080
107 107
108 def getbundle(self, source, heads=None, common=None, bundlecaps=None, 108 def getbundle(self, source, heads=None, common=None, bundlecaps=None,
109 format='HG10'): 109 format='HG10'):
110 cg = exchange.getbundle(self._repo, source, heads=heads, 110 cg = exchange.getbundle(self._repo, source, heads=heads,
111 common=common, bundlecaps=bundlecaps) 111 common=common, bundlecaps=bundlecaps)
112 if bundlecaps is not None and 'HG20' in bundlecaps: 112 if bundlecaps is not None and 'HG2X' in bundlecaps:
113 # When requesting a bundle2, getbundle returns a stream to make the 113 # When requesting a bundle2, getbundle returns a stream to make the
114 # wire level function happier. We need to build a proper object 114 # wire level function happier. We need to build a proper object
115 # from it in local peer. 115 # from it in local peer.
116 cg = bundle2.unbundle20(self.ui, cg) 116 cg = bundle2.unbundle20(self.ui, cg)
117 return cg 117 return cg
178 'dotencode')) 178 'dotencode'))
179 openerreqs = set(('revlogv1', 'generaldelta')) 179 openerreqs = set(('revlogv1', 'generaldelta'))
180 requirements = ['revlogv1'] 180 requirements = ['revlogv1']
181 filtername = None 181 filtername = None
182 182
183 bundle2caps = {'HG20': ()} 183 bundle2caps = {'HG2X': ()}
184 184
185 # a list of (ui, featureset) functions. 185 # a list of (ui, featureset) functions.
186 # only functions defined in module of enabled extensions are invoked 186 # only functions defined in module of enabled extensions are invoked
187 featuresetupfuncs = set() 187 featuresetupfuncs = set()
188 188