##// END OF EJS Templates
stream-clone: factor computation of requirement of a stream clone...
marmoute -
r49443:8475a136 default
parent child Browse files
Show More
@@ -47,6 +47,15 b' def new_stream_clone_requirements('
47 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 59 def canperformstreamclone(pullop, bundle2=False):
51 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 355 if compression != b'UN':
347 356 raise ValueError(b'we do not support the compression argument yet')
348 357
349 requirements = repo.requirements & repo.supportedformats
358 requirements = streamed_requirements(repo)
350 359 requires = b','.join(sorted(requirements))
351 360
352 361 def gen():
@@ -300,7 +300,7 b' def _capabilities(repo, proto):'
300 300 if streamclone.allowservergeneration(repo):
301 301 if repo.ui.configbool(b'server', b'preferuncompressed'):
302 302 caps.append(b'stream-preferred')
303 requiredformats = repo.requirements & repo.supportedformats
303 requiredformats = streamclone.streamed_requirements(repo)
304 304 # if our local revlogs are just revlogv1, add 'stream' cap
305 305 if not requiredformats - {requirementsmod.REVLOGV1_REQUIREMENT}:
306 306 caps.append(b'stream')
General Comments 0
You need to be logged in to leave comments. Login now