Mercurial > public > mercurial-scm > hg
comparison mercurial/changegroup.py @ 47263:6c84fc9c9a90
changelogv2: introduce a "changelogv2" feature
Right now, this means using revlogv2, but only for the changelog. We will have
the format more unique in future changesets.
Differential Revision: https://phab.mercurial-scm.org/D10660
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Mon, 29 Mar 2021 22:40:54 +0200 |
parents | 2bd4b5218918 |
children | 3f00665bbea0 |
comparison
equal
deleted
inserted
replaced
47262:468e451fc0de | 47263:6c84fc9c9a90 |
---|---|
293 repo = repo.unfiltered() | 293 repo = repo.unfiltered() |
294 | 294 |
295 # Only useful if we're adding sidedata categories. If both peers have | 295 # Only useful if we're adding sidedata categories. If both peers have |
296 # the same categories, then we simply don't do anything. | 296 # the same categories, then we simply don't do anything. |
297 adding_sidedata = ( | 297 adding_sidedata = ( |
298 requirements.REVLOGV2_REQUIREMENT in repo.requirements | 298 ( |
299 requirements.REVLOGV2_REQUIREMENT in repo.requirements | |
300 or requirements.CHANGELOGV2_REQUIREMENT in repo.requirements | |
301 ) | |
299 and self.version == b'04' | 302 and self.version == b'04' |
300 and srctype == b'pull' | 303 and srctype == b'pull' |
301 ) | 304 ) |
302 if adding_sidedata: | 305 if adding_sidedata: |
303 sidedata_helpers = sidedatamod.get_sidedata_helpers( | 306 sidedata_helpers = sidedatamod.get_sidedata_helpers( |
1721 if not needv03: | 1724 if not needv03: |
1722 versions.discard(b'03') | 1725 versions.discard(b'03') |
1723 want_v4 = ( | 1726 want_v4 = ( |
1724 repo.ui.configbool(b'experimental', b'changegroup4') | 1727 repo.ui.configbool(b'experimental', b'changegroup4') |
1725 or requirements.REVLOGV2_REQUIREMENT in repo.requirements | 1728 or requirements.REVLOGV2_REQUIREMENT in repo.requirements |
1729 or requirements.CHANGELOGV2_REQUIREMENT in repo.requirements | |
1726 ) | 1730 ) |
1727 if not want_v4: | 1731 if not want_v4: |
1728 versions.discard(b'04') | 1732 versions.discard(b'04') |
1729 return versions | 1733 return versions |
1730 | 1734 |