diff mercurial/error.py @ 24190:903c7e8c97ad

changegroup: emit full-replacement deltas if either revision is censored To ensure that exchanged deltas in the presence of censored revisions can always be applied to the recipient repository, the deltas must replace the entire base text. To make this restriction reasonably enforceable, the delta must do so with a single patch operation. For background and broader design of the censorship feature, see: http://mercurial.selenic.com/wiki/CensorPlan
author Mike Edgar <adgar@google.com>
date Wed, 21 Jan 2015 22:09:32 -0500
parents dcfdfd63bde4
children d2b81256db1e
line wrap: on
line diff
--- a/mercurial/error.py	Fri Feb 06 11:04:55 2015 -0800
+++ b/mercurial/error.py	Wed Jan 21 22:09:32 2015 -0500
@@ -138,11 +138,15 @@
     pass
 
 class CensoredNodeError(RevlogError):
-    """error raised when content verification fails on a censored node"""
+    """error raised when content verification fails on a censored node
 
-    def __init__(self, filename, node):
+    Also contains the tombstone data substituted for the uncensored data.
+    """
+
+    def __init__(self, filename, node, tombstone):
         from node import short
         RevlogError.__init__(self, '%s:%s' % (filename, short(node)))
+        self.tombstone = tombstone
 
 class CensoredBaseError(RevlogError):
     """error raised when a delta is rejected because its base is censored