Mercurial > public > mercurial-scm > hg-stable
diff hgext/sqlitestore.py @ 51290:ceeb8fa23cc8
censor: accept multiple revision in a single call
This is useful when dealing with corruption, as all the corrupted revision can
be dealt with in one go.
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Fri, 01 Dec 2023 22:56:08 +0100 |
parents | 4c6151b69085 |
children | 493034cc3265 |
line wrap: on
line diff
--- a/hgext/sqlitestore.py Fri Dec 01 22:46:46 2023 +0100 +++ b/hgext/sqlitestore.py Fri Dec 01 22:56:08 2023 +0100 @@ -810,7 +810,11 @@ return not empty - def censorrevision(self, tr, censornode, tombstone=b''): + def censorrevision(self, tr, censor_nodes, tombstone=b''): + for node in censor_nodes: + self._censor_one_revision(tr, node, tombstone=tombstone) + + def _censor_one_revision(self, tr, censornode, tombstone): tombstone = storageutil.packmeta({b'censored': tombstone}, b'') # This restriction is cargo culted from revlogs and makes no sense for