diff mercurial/revlog.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 119790e1c67c
line wrap: on
line diff
--- a/mercurial/revlog.py	Tue Mar 30 17:03:02 2021 +0200
+++ b/mercurial/revlog.py	Thu Apr 08 16:39:39 2021 +0200
@@ -2246,7 +2246,7 @@
 
         deltainfo = deltacomputer.finddeltainfo(revinfo, fh)
 
-        if sidedata:
+        if sidedata and self.version & 0xFFFF == REVLOGV2:
             serialized_sidedata = sidedatautil.serialize_sidedata(sidedata)
             sidedata_offset = offset + deltainfo.deltalen
         else: