mercurial/changegroup.py
changeset 47092 5554aacd783f
parent 47090 64cd1496bb70
child 47093 08e26ef4ad35
--- 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(),