comparison mercurial/revlog.py @ 47075: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
comparison
equal deleted inserted replaced
47074:b409cdc6a139 47075:5554aacd783f
2244 2244
2245 revinfo = _revisioninfo(node, p1, p2, btext, textlen, cachedelta, flags) 2245 revinfo = _revisioninfo(node, p1, p2, btext, textlen, cachedelta, flags)
2246 2246
2247 deltainfo = deltacomputer.finddeltainfo(revinfo, fh) 2247 deltainfo = deltacomputer.finddeltainfo(revinfo, fh)
2248 2248
2249 if sidedata: 2249 if sidedata and self.version & 0xFFFF == REVLOGV2:
2250 serialized_sidedata = sidedatautil.serialize_sidedata(sidedata) 2250 serialized_sidedata = sidedatautil.serialize_sidedata(sidedata)
2251 sidedata_offset = offset + deltainfo.deltalen 2251 sidedata_offset = offset + deltainfo.deltalen
2252 else: 2252 else:
2253 serialized_sidedata = b"" 2253 serialized_sidedata = b""
2254 # Don't store the offset if the sidedata is empty, that way 2254 # Don't store the offset if the sidedata is empty, that way