Show More
@@ -76,6 +76,10 b' urlreq = util.urlreq' | |||
|
76 | 76 | } |
|
77 | 77 | _bundlespeccontentopts['bundle2'] = _bundlespeccontentopts['v2'] |
|
78 | 78 | |
|
79 | _bundlespecvariants = {"streamv2": {"changegroup": False, "streamv2": True, | |
|
80 | "tagsfnodescache": False, | |
|
81 | "revbranchcache": False}} | |
|
82 | ||
|
79 | 83 | # Compression engines allowed in version 1. THIS SHOULD NEVER CHANGE. |
|
80 | 84 | _bundlespecv1compengines = {'gzip', 'bzip2', 'none'} |
|
81 | 85 | |
@@ -206,6 +210,11 b' def parsebundlespec(repo, spec, strict=T' | |||
|
206 | 210 | # Compute contentopts based on the version |
|
207 | 211 | contentopts = _bundlespeccontentopts.get(version, {}).copy() |
|
208 | 212 | |
|
213 | # Process the variants | |
|
214 | if "stream" in params and params["stream"] == "v2": | |
|
215 | variant = _bundlespecvariants["streamv2"] | |
|
216 | contentopts.update(variant) | |
|
217 | ||
|
209 | 218 | if not externalnames: |
|
210 | 219 | engine = util.compengines.forbundlename(compression) |
|
211 | 220 | compression = engine.bundletype()[1] |
@@ -281,6 +290,13 b' def getbundlespec(ui, fh):' | |||
|
281 | 290 | 'a known bundlespec') % version, |
|
282 | 291 | hint=_('try upgrading your Mercurial ' |
|
283 | 292 | 'client')) |
|
293 | elif part.type == 'stream2' and version is None: | |
|
294 | # A stream2 part requires to be part of a v2 bundle | |
|
295 | version = "v2" | |
|
296 | requirements = urlreq.unquote(part.params['requirements']) | |
|
297 | splitted = requirements.split() | |
|
298 | params = bundle2._formatrequirementsparams(splitted) | |
|
299 | return 'none-v2;stream=v2;%s' % params | |
|
284 | 300 | |
|
285 | 301 | if not version: |
|
286 | 302 | raise error.Abort(_('could not identify changegroup version in ' |
@@ -41,15 +41,8 b' The extension requires a repo (currently' | |||
|
41 | 41 | > EOF |
|
42 | 42 | |
|
43 | 43 | $ hg bundle -a --type="none-v2;stream=v2" bundle.hg |
|
44 | 5 changesets found | |
|
45 | 44 | $ hg debugbundle bundle.hg |
|
46 | 45 | Stream params: {} |
|
47 | changegroup -- {nbchanges: 5, version: 02} | |
|
48 | 426bada5c67598ca65036d57d9e4b64b0c1ce7a0 | |
|
49 | 112478962961147124edd43549aedd1a335e44bf | |
|
50 | 26805aba1e600a82e93661149f2313866a221a7b | |
|
51 | f585351a92f85104bff7c284233c338b10eb1df7 | |
|
52 | 9bc730a19041f9ec7cb33c626e811aa233efb18c | |
|
53 | cache:rev-branch-cache -- {} | |
|
46 | stream2 -- {bytecount: 1693, filecount: 11, requirements: dotencode%2Cfncache%2Cgeneraldelta%2Crevlogv1%2Cstore} | |
|
54 | 47 | $ hg debugbundle --spec bundle.hg |
|
55 | none-v2 | |
|
48 | none-v2;stream=v2;requirements%3Ddotencode%2Cfncache%2Cgeneraldelta%2Crevlogv1%2Cstore |
General Comments 0
You need to be logged in to leave comments.
Login now