1937 return |
1937 return |
1938 |
1938 |
1939 outgoing = _computeoutgoing(repo, heads, common) |
1939 outgoing = _computeoutgoing(repo, heads, common) |
1940 bundle2.addparttagsfnodescache(repo, bundler, outgoing) |
1940 bundle2.addparttagsfnodescache(repo, bundler, outgoing) |
1941 |
1941 |
|
1942 @getbundle2partsgenerator('cache:rev-branch-cache') |
|
1943 def _getbundlerevbranchcache(bundler, repo, source, bundlecaps=None, |
|
1944 b2caps=None, heads=None, common=None, |
|
1945 **kwargs): |
|
1946 """Transfer the rev-branch-cache mapping |
|
1947 |
|
1948 The payload is a series of data related to each branch |
|
1949 |
|
1950 1) branch name length |
|
1951 2) number of open heads |
|
1952 3) number of closed heads |
|
1953 4) open heads nodes |
|
1954 5) closed heads nodes |
|
1955 """ |
|
1956 # Don't send unless: |
|
1957 # - changeset are being exchanged, |
|
1958 # - the client supports it. |
|
1959 if not (kwargs.get(r'cg', True)) or 'rev-branch-cache' not in b2caps: |
|
1960 return |
|
1961 outgoing = _computeoutgoing(repo, heads, common) |
|
1962 bundle2.addpartrevbranchcache(repo, bundler, outgoing) |
|
1963 |
1942 def check_heads(repo, their_heads, context): |
1964 def check_heads(repo, their_heads, context): |
1943 """check if the heads of a repo have been modified |
1965 """check if the heads of a repo have been modified |
1944 |
1966 |
1945 Used by peer for unbundling. |
1967 Used by peer for unbundling. |
1946 """ |
1968 """ |