diff -r b63dee7bd0d9 -r a6b3c4c1019f mercurial/repository.py --- a/mercurial/repository.py Tue Sep 18 16:47:09 2018 -0700 +++ b/mercurial/repository.py Tue Sep 18 17:51:43 2018 -0700 @@ -691,6 +691,23 @@ even if it existed in the store previously. """ + def censorrevision(tr, node, tombstone=b''): + """Remove the content of a single revision. + + The specified ``node`` will have its content purged from storage. + Future attempts to access the revision data for this node will + result in failure. + + A ``tombstone`` message can optionally be stored. This message may be + displayed to users when they attempt to access the missing revision + data. + + Storage backends may have stored deltas against the previous content + in this revision. As part of censoring a revision, these storage + backends are expected to rewrite any internally stored deltas such + that they no longer reference the deleted content. + """ + def getstrippoint(minlink): """Find the minimum revision that must be stripped to strip a linkrev.