Show More
@@ -47,6 +47,15 b' def new_stream_clone_requirements(' | |||||
47 | return requirements |
|
47 | return requirements | |
48 |
|
48 | |||
49 |
|
49 | |||
|
50 | def streamed_requirements(repo): | |||
|
51 | """the set of requirement the new clone will have to support | |||
|
52 | ||||
|
53 | This is used for advertising the stream options and to generate the actual | |||
|
54 | stream content.""" | |||
|
55 | requiredformats = repo.requirements & repo.supportedformats | |||
|
56 | return requiredformats | |||
|
57 | ||||
|
58 | ||||
50 | def canperformstreamclone(pullop, bundle2=False): |
|
59 | def canperformstreamclone(pullop, bundle2=False): | |
51 | """Whether it is possible to perform a streaming clone as part of pull. |
|
60 | """Whether it is possible to perform a streaming clone as part of pull. | |
52 |
|
61 | |||
@@ -346,7 +355,7 b' def generatebundlev1(repo, compression=b' | |||||
346 | if compression != b'UN': |
|
355 | if compression != b'UN': | |
347 | raise ValueError(b'we do not support the compression argument yet') |
|
356 | raise ValueError(b'we do not support the compression argument yet') | |
348 |
|
357 | |||
349 |
requirements = repo |
|
358 | requirements = streamed_requirements(repo) | |
350 | requires = b','.join(sorted(requirements)) |
|
359 | requires = b','.join(sorted(requirements)) | |
351 |
|
360 | |||
352 | def gen(): |
|
361 | def gen(): |
@@ -300,7 +300,7 b' def _capabilities(repo, proto):' | |||||
300 | if streamclone.allowservergeneration(repo): |
|
300 | if streamclone.allowservergeneration(repo): | |
301 | if repo.ui.configbool(b'server', b'preferuncompressed'): |
|
301 | if repo.ui.configbool(b'server', b'preferuncompressed'): | |
302 | caps.append(b'stream-preferred') |
|
302 | caps.append(b'stream-preferred') | |
303 |
requiredformats = repo |
|
303 | requiredformats = streamclone.streamed_requirements(repo) | |
304 | # if our local revlogs are just revlogv1, add 'stream' cap |
|
304 | # if our local revlogs are just revlogv1, add 'stream' cap | |
305 | if not requiredformats - {requirementsmod.REVLOGV1_REQUIREMENT}: |
|
305 | if not requiredformats - {requirementsmod.REVLOGV1_REQUIREMENT}: | |
306 | caps.append(b'stream') |
|
306 | caps.append(b'stream') |
General Comments 0
You need to be logged in to leave comments.
Login now