equal
deleted
inserted
replaced
71 |
71 |
72 # Streaming clone only works on an empty destination repository |
72 # Streaming clone only works on an empty destination repository |
73 if len(repo): |
73 if len(repo): |
74 return False, None |
74 return False, None |
75 |
75 |
|
76 # Streaming clone only works if all data is being requested. |
|
77 if pullop.heads: |
|
78 return False, None |
|
79 |
76 bundle2supported = False |
80 bundle2supported = False |
77 if pullop.canusebundle2: |
81 if pullop.canusebundle2: |
78 if b'v2' in pullop.remotebundle2caps.get(b'stream', []): |
82 if b'v2' in pullop.remotebundle2caps.get(b'stream', []): |
79 bundle2supported = True |
83 bundle2supported = True |
80 # else |
84 # else |
84 # Ensures legacy code path uses available bundle2. |
88 # Ensures legacy code path uses available bundle2. |
85 if bundle2supported and not bundle2: |
89 if bundle2supported and not bundle2: |
86 return False, None |
90 return False, None |
87 # Ensures bundle2 doesn't try to do a stream clone if it isn't supported. |
91 # Ensures bundle2 doesn't try to do a stream clone if it isn't supported. |
88 elif bundle2 and not bundle2supported: |
92 elif bundle2 and not bundle2supported: |
89 return False, None |
|
90 |
|
91 # Streaming clone only works if all data is being requested. |
|
92 if pullop.heads: |
|
93 return False, None |
93 return False, None |
94 |
94 |
95 streamrequested = pullop.streamclonerequested |
95 streamrequested = pullop.streamclonerequested |
96 |
96 |
97 # If we don't have a preference, let the server decide for us. This |
97 # If we don't have a preference, let the server decide for us. This |