Show More
@@ -199,6 +199,14 b' def readbundle(ui, fh, fname, vfs=None):' | |||||
199 | else: |
|
199 | else: | |
200 | raise error.Abort(_('%s: unknown bundle version %s') % (fname, version)) |
|
200 | raise error.Abort(_('%s: unknown bundle version %s') % (fname, version)) | |
201 |
|
201 | |||
|
202 | def _formatrequirementsspec(requirements): | |||
|
203 | return urlreq.quote(','.join(sorted(requirements))) | |||
|
204 | ||||
|
205 | def _formatrequirementsparams(requirements): | |||
|
206 | requirements = _formatrequirementsspec(requirements) | |||
|
207 | params = "%s%s" % (urlreq.quote("requirements="), requirements) | |||
|
208 | return params | |||
|
209 | ||||
202 | def getbundlespec(ui, fh): |
|
210 | def getbundlespec(ui, fh): | |
203 | """Infer the bundlespec from a bundle file handle. |
|
211 | """Infer the bundlespec from a bundle file handle. | |
204 |
|
212 | |||
@@ -247,8 +255,7 b' def getbundlespec(ui, fh):' | |||||
247 | return '%s-%s' % (comp, version) |
|
255 | return '%s-%s' % (comp, version) | |
248 | elif isinstance(b, streamclone.streamcloneapplier): |
|
256 | elif isinstance(b, streamclone.streamcloneapplier): | |
249 | requirements = streamclone.readbundle1header(fh)[2] |
|
257 | requirements = streamclone.readbundle1header(fh)[2] | |
250 | params = 'requirements=%s' % ','.join(sorted(requirements)) |
|
258 | return 'none-packed1;%s' % _formatrequirementsparams(requirements) | |
251 | return 'none-packed1;%s' % urlreq.quote(params) |
|
|||
252 | else: |
|
259 | else: | |
253 | raise error.Abort(_('unknown bundle type: %s') % b) |
|
260 | raise error.Abort(_('unknown bundle type: %s') % b) | |
254 |
|
261 |
General Comments 0
You need to be logged in to leave comments.
Login now