# HG changeset patch # User Pierre-Yves David # Date 1697232106 -7200 # Node ID 2dec23658969c6c194fa6de1437b76677d8f0a4b # Parent 8d574691d915201bcc6bd4e86fb642a79ac5679a censor: accept censored revision during upgrade They can simply be passed by as censored. diff -r 8d574691d915 -r 2dec23658969 mercurial/revlog.py --- a/mercurial/revlog.py Fri Oct 13 22:40:10 2023 +0200 +++ b/mercurial/revlog.py Fri Oct 13 23:21:46 2023 +0200 @@ -3273,7 +3273,11 @@ sidedata = None if not cachedelta: - rawtext = self._revisiondata(rev) + try: + rawtext = self._revisiondata(rev) + except error.CensoredNodeError as censored: + assert flags & REVIDX_ISCENSORED + rawtext = censored.tombstone sidedata = self.sidedata(rev) if sidedata is None: sidedata = self.sidedata(rev) diff -r 8d574691d915 -r 2dec23658969 tests/test-censor.t --- a/tests/test-censor.t Fri Oct 13 22:40:10 2023 +0200 +++ b/tests/test-censor.t Fri Oct 13 23:21:46 2023 +0200 @@ -561,10 +561,6 @@ - changelog - manifest - transaction abort! - rollback completed - abort: file censored target:613bc869fceb - [255] $ hg verify --config censor.policy=ignore checking changesets checking manifests @@ -598,10 +594,6 @@ - changelog - manifest - transaction abort! - rollback completed - abort: file censored target:613bc869fceb - [255] $ hg verify --config censor.policy=ignore checking changesets checking manifests