Show More
@@ -32,6 +32,21 b' from .utils import (' | |||
|
32 | 32 | ) |
|
33 | 33 | |
|
34 | 34 | |
|
35 | def new_stream_clone_requirements( | |
|
36 | supported_formats, default_requirements, streamed_requirements | |
|
37 | ): | |
|
38 | """determine the final set of requirement for a new stream clone | |
|
39 | ||
|
40 | this method combine the "default" requirements that a new repository would | |
|
41 | use with the constaint we get from the stream clone content. We keep local | |
|
42 | configuration choice when possible. | |
|
43 | """ | |
|
44 | requirements = set(default_requirements) | |
|
45 | requirements -= supported_formats | |
|
46 | requirements.update(streamed_requirements) | |
|
47 | return requirements | |
|
48 | ||
|
49 | ||
|
35 | 50 | def canperformstreamclone(pullop, bundle2=False): |
|
36 | 51 | """Whether it is possible to perform a streaming clone as part of pull. |
|
37 | 52 | |
@@ -184,12 +199,10 b' def maybeperformlegacystreamclone(pullop' | |||
|
184 | 199 | |
|
185 | 200 | with repo.lock(): |
|
186 | 201 | consumev1(repo, fp, filecount, bytecount) |
|
187 | ||
|
188 | # new requirements = old non-format requirements + | |
|
189 | # new format-related remote requirements | |
|
190 | # requirements from the streamed-in repository | |
|
191 | repo.requirements = requirements | ( | |
|
192 | repo.requirements - repo.supportedformats | |
|
202 | repo.requirements = new_stream_clone_requirements( | |
|
203 | repo.supportedformats, | |
|
204 | repo.requirements, | |
|
205 | requirements, | |
|
193 | 206 | ) |
|
194 | 207 | repo.svfs.options = localrepo.resolvestorevfsoptions( |
|
195 | 208 | repo.ui, repo.requirements, repo.features |
@@ -797,11 +810,10 b' def applybundlev2(repo, fp, filecount, f' | |||
|
797 | 810 | |
|
798 | 811 | consumev2(repo, fp, filecount, filesize) |
|
799 | 812 | |
|
800 |
|
|
|
801 | # new format-related remote requirements | |
|
802 | # requirements from the streamed-in repository | |
|
803 | repo.requirements = set(requirements) | ( | |
|
804 | repo.requirements - repo.supportedformats | |
|
813 | repo.requirements = new_stream_clone_requirements( | |
|
814 | repo.supportedformats, | |
|
815 | repo.requirements, | |
|
816 | requirements, | |
|
805 | 817 | ) |
|
806 | 818 | repo.svfs.options = localrepo.resolvestorevfsoptions( |
|
807 | 819 | repo.ui, repo.requirements, repo.features |
General Comments 0
You need to be logged in to leave comments.
Login now