Show More
@@ -180,6 +180,7 b' from .utils import (' | |||||
180 | stringutil, |
|
180 | stringutil, | |
181 | urlutil, |
|
181 | urlutil, | |
182 | ) |
|
182 | ) | |
|
183 | from .interfaces import repository | |||
183 |
|
184 | |||
184 | urlerr = util.urlerr |
|
185 | urlerr = util.urlerr | |
185 | urlreq = util.urlreq |
|
186 | urlreq = util.urlreq | |
@@ -1729,8 +1730,8 b' def _addpartsfromopts(ui, repo, bundler,' | |||||
1729 | part.addparam( |
|
1730 | part.addparam( | |
1730 | b'targetphase', b'%d' % phases.secret, mandatory=False |
|
1731 | b'targetphase', b'%d' % phases.secret, mandatory=False | |
1731 | ) |
|
1732 | ) | |
1732 | if b'exp-sidedata-flag' in repo.requirements: |
|
1733 | if repository.REPO_FEATURE_SIDE_DATA in repo.features: | |
1733 |
|
|
1734 | part.addparam(b'exp-sidedata', b'1') | |
1734 |
|
1735 | |||
1735 | if opts.get(b'streamv2', False): |
|
1736 | if opts.get(b'streamv2', False): | |
1736 | addpartbundlestream2(bundler, repo, stream=True) |
|
1737 | addpartbundlestream2(bundler, repo, stream=True) | |
@@ -2579,9 +2580,9 b' def widen_bundle(' | |||||
2579 | part.addparam(b'version', cgversion) |
|
2580 | part.addparam(b'version', cgversion) | |
2580 | if scmutil.istreemanifest(repo): |
|
2581 | if scmutil.istreemanifest(repo): | |
2581 | part.addparam(b'treemanifest', b'1') |
|
2582 | part.addparam(b'treemanifest', b'1') | |
2582 | if b'exp-sidedata-flag' in repo.requirements: |
|
2583 | if repository.REPO_FEATURE_SIDE_DATA in repo.features: | |
2583 |
|
|
2584 | part.addparam(b'exp-sidedata', b'1') | |
2584 |
|
|
2585 | wanted = format_remote_wanted_sidedata(repo) | |
2585 |
|
|
2586 | part.addparam(b'exp-wanted-sidedata', wanted) | |
2586 |
|
2587 | |||
2587 | return bundler |
|
2588 | return bundler |
@@ -43,6 +43,7 b' from .utils import (' | |||||
43 | stringutil, |
|
43 | stringutil, | |
44 | urlutil, |
|
44 | urlutil, | |
45 | ) |
|
45 | ) | |
|
46 | from .interfaces import repository | |||
46 |
|
47 | |||
47 | urlerr = util.urlerr |
|
48 | urlerr = util.urlerr | |
48 | urlreq = util.urlreq |
|
49 | urlreq = util.urlreq | |
@@ -893,7 +894,7 b' def _pushb2ctx(pushop, bundler):' | |||||
893 | cgpart.addparam(b'version', version) |
|
894 | cgpart.addparam(b'version', version) | |
894 | if scmutil.istreemanifest(pushop.repo): |
|
895 | if scmutil.istreemanifest(pushop.repo): | |
895 | cgpart.addparam(b'treemanifest', b'1') |
|
896 | cgpart.addparam(b'treemanifest', b'1') | |
896 | if b'exp-sidedata-flag' in pushop.repo.requirements: |
|
897 | if repository.REPO_FEATURE_SIDE_DATA in pushop.repo.features: | |
897 | cgpart.addparam(b'exp-sidedata', b'1') |
|
898 | cgpart.addparam(b'exp-sidedata', b'1') | |
898 |
|
899 | |||
899 | def handlereply(op): |
|
900 | def handlereply(op): | |
@@ -2427,7 +2428,7 b' def _getbundlechangegrouppart(' | |||||
2427 | if scmutil.istreemanifest(repo): |
|
2428 | if scmutil.istreemanifest(repo): | |
2428 | part.addparam(b'treemanifest', b'1') |
|
2429 | part.addparam(b'treemanifest', b'1') | |
2429 |
|
2430 | |||
2430 | if b'exp-sidedata-flag' in repo.requirements: |
|
2431 | if repository.REPO_FEATURE_SIDE_DATA in repo.features: | |
2431 | part.addparam(b'exp-sidedata', b'1') |
|
2432 | part.addparam(b'exp-sidedata', b'1') | |
2432 | sidedata = bundle2.format_remote_wanted_sidedata(repo) |
|
2433 | sidedata = bundle2.format_remote_wanted_sidedata(repo) | |
2433 | part.addparam(b'exp-wanted-sidedata', sidedata) |
|
2434 | part.addparam(b'exp-wanted-sidedata', sidedata) |
@@ -21,6 +21,8 b" REPO_FEATURE_SHARED_STORAGE = b'sharedst" | |||||
21 | REPO_FEATURE_LFS = b'lfs' |
|
21 | REPO_FEATURE_LFS = b'lfs' | |
22 | # Repository supports being stream cloned. |
|
22 | # Repository supports being stream cloned. | |
23 | REPO_FEATURE_STREAM_CLONE = b'streamclone' |
|
23 | REPO_FEATURE_STREAM_CLONE = b'streamclone' | |
|
24 | # Repository supports (at least) some sidedata to be stored | |||
|
25 | REPO_FEATURE_SIDE_DATA = b'side-data' | |||
24 | # Files storage may lack data for all ancestors. |
|
26 | # Files storage may lack data for all ancestors. | |
25 | REPO_FEATURE_SHALLOW_FILE_STORAGE = b'shallowfilestorage' |
|
27 | REPO_FEATURE_SHALLOW_FILE_STORAGE = b'shallowfilestorage' | |
26 |
|
28 |
@@ -737,6 +737,9 b' def makelocalrepository(baseui, path, in' | |||||
737 | storevfs = store.vfs |
|
737 | storevfs = store.vfs | |
738 | storevfs.options = resolvestorevfsoptions(ui, requirements, features) |
|
738 | storevfs.options = resolvestorevfsoptions(ui, requirements, features) | |
739 |
|
739 | |||
|
740 | if requirementsmod.REVLOGV2_REQUIREMENT in requirements: | |||
|
741 | features.add(repository.REPO_FEATURE_SIDE_DATA) | |||
|
742 | ||||
740 | # The cache vfs is used to manage cache files. |
|
743 | # The cache vfs is used to manage cache files. | |
741 | cachevfs = vfsmod.vfs(cachepath, cacheaudited=True) |
|
744 | cachevfs = vfsmod.vfs(cachepath, cacheaudited=True) | |
742 | cachevfs.createmode = store.createmode |
|
745 | cachevfs.createmode = store.createmode |
General Comments 0
You need to be logged in to leave comments.
Login now