Show More
@@ -15,6 +15,7 b' from .pycompat import open' | |||||
15 | from .interfaces import repository |
|
15 | from .interfaces import repository | |
16 | from . import ( |
|
16 | from . import ( | |
17 | bookmarks, |
|
17 | bookmarks, | |
|
18 | bundle2 as bundle2mod, | |||
18 | cacheutil, |
|
19 | cacheutil, | |
19 | error, |
|
20 | error, | |
20 | narrowspec, |
|
21 | narrowspec, | |
@@ -89,8 +90,10 b' def canperformstreamclone(pullop, bundle' | |||||
89 |
|
90 | |||
90 | bundle2supported = False |
|
91 | bundle2supported = False | |
91 | if pullop.canusebundle2: |
|
92 | if pullop.canusebundle2: | |
92 | if b'v2' in pullop.remotebundle2caps.get(b'stream', []): |
|
93 | local_caps = bundle2mod.getrepocaps(repo, role=b'client') | |
93 | bundle2supported = True |
|
94 | local_supported = set(local_caps.get(b'stream', [])) | |
|
95 | remote_supported = set(pullop.remotebundle2caps.get(b'stream', [])) | |||
|
96 | bundle2supported = bool(local_supported & remote_supported) | |||
94 | # else |
|
97 | # else | |
95 | # Server doesn't support bundle2 stream clone or doesn't support |
|
98 | # Server doesn't support bundle2 stream clone or doesn't support | |
96 | # the versions we support. Fall back and possibly allow legacy. |
|
99 | # the versions we support. Fall back and possibly allow legacy. |
General Comments 0
You need to be logged in to leave comments.
Login now