[PATCH 1 of 5] error: add metadata attribute to CensoredNodeError
Mike Edgar
adgar at google.com
Thu Nov 6 19:03:07 UTC 2014
# HG changeset patch
# User Mike Edgar <adgar at google.com>
# Date 1410735479 14400
# Sun Sep 14 18:57:59 2014 -0400
# Node ID f54bf90d831c689fc0c0be93d733851644dc8a86
# Parent 2d54aa5397cdb1c697673ba10b7618d5ac25c69e
error: add metadata attribute to CensoredNodeError
This attribute will be used to construct appropriate changegroup
deltas, preserving the censorship tombstone data, while still
treating censored nodes as an exceptional case in all code paths.
diff -r 2d54aa5397cd -r f54bf90d831c mercurial/error.py
--- a/mercurial/error.py Sat Oct 18 01:09:41 2014 -0700
+++ b/mercurial/error.py Sun Sep 14 18:57:59 2014 -0400
@@ -130,6 +130,7 @@
class CensoredNodeError(RevlogError):
"""error raised when content verification fails on a censored node"""
- def __init__(self, filename, node):
+ def __init__(self, filename, node, metadata):
+ self.metadata = metadata
from node import short
RevlogError.__init__(self, '%s:%s' % (filename, short(node)))
diff -r 2d54aa5397cd -r f54bf90d831c mercurial/filelog.py
--- a/mercurial/filelog.py Sat Oct 18 01:09:41 2014 -0700
+++ b/mercurial/filelog.py Sun Sep 14 18:57:59 2014 -0400
@@ -101,7 +101,7 @@
super(filelog, self).checkhash(text, p1, p2, node, rev=rev)
except error.RevlogError:
if _censoredtext(text):
- raise error.CensoredNodeError(self.indexfile, node)
+ raise error.CensoredNodeError(self.indexfile, node, text)
raise
def _file(self, f):
More information about the Mercurial-devel
mailing list