equal
deleted
inserted
replaced
1962 # the source and url passed here are overwritten by the one contained in |
1962 # the source and url passed here are overwritten by the one contained in |
1963 # the transaction.hookargs argument. So 'bundle2' is a placeholder |
1963 # the transaction.hookargs argument. So 'bundle2' is a placeholder |
1964 nbchangesets = None |
1964 nbchangesets = None |
1965 if b'nbchanges' in inpart.params: |
1965 if b'nbchanges' in inpart.params: |
1966 nbchangesets = int(inpart.params.get(b'nbchanges')) |
1966 nbchangesets = int(inpart.params.get(b'nbchanges')) |
1967 if ( |
1967 if b'treemanifest' in inpart.params and not scmutil.istreemanifest(op.repo): |
1968 b'treemanifest' in inpart.params |
|
1969 and requirements.TREEMANIFEST_REQUIREMENT not in op.repo.requirements |
|
1970 ): |
|
1971 if len(op.repo.changelog) != 0: |
1968 if len(op.repo.changelog) != 0: |
1972 raise error.Abort( |
1969 raise error.Abort( |
1973 _( |
1970 _( |
1974 b"bundle contains tree manifests, but local repo is " |
1971 b"bundle contains tree manifests, but local repo is " |
1975 b"non-empty and does not use tree manifests" |
1972 b"non-empty and does not use tree manifests" |
2575 changelog=False, |
2572 changelog=False, |
2576 ) |
2573 ) |
2577 |
2574 |
2578 part = bundler.newpart(b'changegroup', data=cgdata) |
2575 part = bundler.newpart(b'changegroup', data=cgdata) |
2579 part.addparam(b'version', cgversion) |
2576 part.addparam(b'version', cgversion) |
2580 if requirements.TREEMANIFEST_REQUIREMENT in repo.requirements: |
2577 if scmutil.istreemanifest(repo): |
2581 part.addparam(b'treemanifest', b'1') |
2578 part.addparam(b'treemanifest', b'1') |
2582 if b'exp-sidedata-flag' in repo.requirements: |
2579 if b'exp-sidedata-flag' in repo.requirements: |
2583 part.addparam(b'exp-sidedata', b'1') |
2580 part.addparam(b'exp-sidedata', b'1') |
2584 |
2581 |
2585 return bundler |
2582 return bundler |