Show More
@@ -1924,9 +1924,20 b' def _find_stream_generator(version):' | |||||
1924 | return data |
|
1924 | return data | |
1925 |
|
1925 | |||
1926 | available[b'v2'] = generate |
|
1926 | available[b'v2'] = generate | |
|
1927 | # try to fetch a v3 generator | |||
|
1928 | generatev3 = getattr(mercurial.streamclone, "generatev3", None) | |||
|
1929 | if generatev3 is not None: | |||
|
1930 | ||||
|
1931 | def generate(repo): | |||
|
1932 | entries, bytes, data = generatev3(repo, None, None, True) | |||
|
1933 | return data | |||
|
1934 | ||||
|
1935 | available[b'v3-exp'] = generate | |||
|
1936 | ||||
1927 | # resolve the request |
|
1937 | # resolve the request | |
1928 | if version == b"latest": |
|
1938 | if version == b"latest": | |
1929 | latest_key = max(available) |
|
1939 | # latest is the highest non experimental version | |
|
1940 | latest_key = max(v for v in available if b'-exp' not in v) | |||
1930 | return available[latest_key] |
|
1941 | return available[latest_key] | |
1931 | elif version in available: |
|
1942 | elif version in available: | |
1932 | return available[version] |
|
1943 | return available[version] |
General Comments 0
You need to be logged in to leave comments.
Login now