comparison mercurial/utils/storageutil.py @ 47349:24ea3ef35238

censor: do not process sidedata of censored revision while bundling The revision is censored, we should ignore it. Differential Revision: https://phab.mercurial-scm.org/D10801
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Sun, 30 May 2021 20:42:51 +0200
parents 8bd769b5c941
children 5026a0d37526
comparison
equal deleted inserted replaced
47348:3f00665bbea0 47349:24ea3ef35238
479 available.add(rev) 479 available.add(rev)
480 480
481 serialized_sidedata = None 481 serialized_sidedata = None
482 sidedata_flags = (0, 0) 482 sidedata_flags = (0, 0)
483 if sidedata_helpers: 483 if sidedata_helpers:
484 old_sidedata = store.sidedata(rev) 484 try:
485 sidedata, sidedata_flags = sidedatamod.run_sidedata_helpers( 485 old_sidedata = store.sidedata(rev)
486 store=store, 486 except error.CensoredNodeError:
487 sidedata_helpers=sidedata_helpers, 487 # skip any potential sidedata of the censored revision
488 sidedata=old_sidedata, 488 sidedata = {}
489 rev=rev, 489 else:
490 ) 490 sidedata, sidedata_flags = sidedatamod.run_sidedata_helpers(
491 store=store,
492 sidedata_helpers=sidedata_helpers,
493 sidedata=old_sidedata,
494 rev=rev,
495 )
491 if sidedata: 496 if sidedata:
492 serialized_sidedata = sidedatamod.serialize_sidedata(sidedata) 497 serialized_sidedata = sidedatamod.serialize_sidedata(sidedata)
493 498
494 flags = flagsfn(rev) if flagsfn else 0 499 flags = flagsfn(rev) if flagsfn else 0
495 protocol_flags = 0 500 protocol_flags = 0