Mercurial > public > mercurial-scm > hg-stable
diff mercurial/changegroup.py @ 47092:5554aacd783f
sidedata: gate sidedata functionality to revlogv2 in more places
Since revlogv1 is not capable of storing sidedata, we prevent sidedata
mechanisms around the revlog layer from doing anything. We however keep the
ones that allow a revlogv1 repo to generate sidedata on-the-fly on a push, the
pull case simply does not add the sidedata to the revlog.
Differential Revision: https://phab.mercurial-scm.org/D10341
author | Rapha?l Gom?s <rgomes@octobus.net> |
---|---|
date | Thu, 08 Apr 2021 16:39:39 +0200 |
parents | 64cd1496bb70 |
children | 08e26ef4ad35 |
line wrap: on
line diff
--- a/mercurial/changegroup.py Tue Mar 30 17:03:02 2021 +0200 +++ b/mercurial/changegroup.py Thu Apr 08 16:39:39 2021 +0200 @@ -293,7 +293,12 @@ # Only useful if we're adding sidedata categories. If both peers have # the same categories, then we simply don't do anything. - if self.version == b'04' and srctype == b'pull': + adding_sidedata = ( + requirements.REVLOGV2_REQUIREMENT in repo.requirements + and self.version == b'04' + and srctype == b'pull' + ) + if adding_sidedata: sidedata_helpers = get_sidedata_helpers( repo, sidedata_categories or set(),