Show More
@@ -1711,6 +1711,8 b' def _addpartsfromopts(ui, repo, bundler,' | |||||
1711 | part.addparam( |
|
1711 | part.addparam( | |
1712 | b'targetphase', b'%d' % phases.secret, mandatory=False |
|
1712 | b'targetphase', b'%d' % phases.secret, mandatory=False | |
1713 | ) |
|
1713 | ) | |
|
1714 | if b'exp-sidedata-flag' in repo.requirements: | |||
|
1715 | part.addparam(b'exp-sidedata', b'1') | |||
1714 |
|
1716 | |||
1715 | if opts.get(b'streamv2', False): |
|
1717 | if opts.get(b'streamv2', False): | |
1716 | addpartbundlestream2(bundler, repo, stream=True) |
|
1718 | addpartbundlestream2(bundler, repo, stream=True) | |
@@ -1930,7 +1932,14 b' def combinechangegroupresults(op):' | |||||
1930 |
|
1932 | |||
1931 |
|
1933 | |||
1932 | @parthandler( |
|
1934 | @parthandler( | |
1933 | b'changegroup', (b'version', b'nbchanges', b'treemanifest', b'targetphase') |
|
1935 | b'changegroup', | |
|
1936 | ( | |||
|
1937 | b'version', | |||
|
1938 | b'nbchanges', | |||
|
1939 | b'exp-sidedata', | |||
|
1940 | b'treemanifest', | |||
|
1941 | b'targetphase', | |||
|
1942 | ), | |||
1934 | ) |
|
1943 | ) | |
1935 | def handlechangegroup(op, inpart): |
|
1944 | def handlechangegroup(op, inpart): | |
1936 | """apply a changegroup part on the repo |
|
1945 | """apply a changegroup part on the repo | |
@@ -1965,6 +1974,14 b' def handlechangegroup(op, inpart):' | |||||
1965 | op.repo.ui, op.repo.requirements, op.repo.features |
|
1974 | op.repo.ui, op.repo.requirements, op.repo.features | |
1966 | ) |
|
1975 | ) | |
1967 | op.repo._writerequirements() |
|
1976 | op.repo._writerequirements() | |
|
1977 | ||||
|
1978 | bundlesidedata = bool(b'exp-sidedata' in inpart.params) | |||
|
1979 | reposidedata = bool(b'exp-sidedata-flag' in op.repo.requirements) | |||
|
1980 | if reposidedata and not bundlesidedata: | |||
|
1981 | msg = b"repository is using sidedata but the bundle source do not" | |||
|
1982 | hint = b'this is currently unsupported' | |||
|
1983 | raise error.Abort(msg, hint=hint) | |||
|
1984 | ||||
1968 | extrakwargs = {} |
|
1985 | extrakwargs = {} | |
1969 | targetphase = inpart.params.get(b'targetphase') |
|
1986 | targetphase = inpart.params.get(b'targetphase') | |
1970 | if targetphase is not None: |
|
1987 | if targetphase is not None: | |
@@ -2551,5 +2568,7 b' def widen_bundle(' | |||||
2551 | part.addparam(b'version', cgversion) |
|
2568 | part.addparam(b'version', cgversion) | |
2552 | if b'treemanifest' in repo.requirements: |
|
2569 | if b'treemanifest' in repo.requirements: | |
2553 | part.addparam(b'treemanifest', b'1') |
|
2570 | part.addparam(b'treemanifest', b'1') | |
|
2571 | if b'exp-sidedata-flag' in repo.requirements: | |||
|
2572 | part.addparam(b'exp-sidedata', b'1') | |||
2554 |
|
2573 | |||
2555 | return bundler |
|
2574 | return bundler |
@@ -1049,6 +1049,8 b' def _pushb2ctx(pushop, bundler):' | |||||
1049 | cgpart.addparam(b'version', version) |
|
1049 | cgpart.addparam(b'version', version) | |
1050 | if b'treemanifest' in pushop.repo.requirements: |
|
1050 | if b'treemanifest' in pushop.repo.requirements: | |
1051 | cgpart.addparam(b'treemanifest', b'1') |
|
1051 | cgpart.addparam(b'treemanifest', b'1') | |
|
1052 | if b'exp-sidedata-flag' in pushop.repo.requirements: | |||
|
1053 | cgpart.addparam(b'exp-sidedata', b'1') | |||
1052 |
|
1054 | |||
1053 | def handlereply(op): |
|
1055 | def handlereply(op): | |
1054 | """extract addchangegroup returns from server reply""" |
|
1056 | """extract addchangegroup returns from server reply""" | |
@@ -2511,6 +2513,9 b' def _getbundlechangegrouppart(' | |||||
2511 | if b'treemanifest' in repo.requirements: |
|
2513 | if b'treemanifest' in repo.requirements: | |
2512 | part.addparam(b'treemanifest', b'1') |
|
2514 | part.addparam(b'treemanifest', b'1') | |
2513 |
|
2515 | |||
|
2516 | if b'exp-sidedata-flag' in repo.requirements: | |||
|
2517 | part.addparam(b'exp-sidedata', b'1') | |||
|
2518 | ||||
2514 | if ( |
|
2519 | if ( | |
2515 | kwargs.get(r'narrow', False) |
|
2520 | kwargs.get(r'narrow', False) | |
2516 | and kwargs.get(r'narrow_acl', False) |
|
2521 | and kwargs.get(r'narrow_acl', False) |
General Comments 0
You need to be logged in to leave comments.
Login now