Show More
@@ -126,10 +126,6 b' ellipsisprocessor = (' | |||||
126 | ellipsisrawprocessor, |
|
126 | ellipsisrawprocessor, | |
127 | ) |
|
127 | ) | |
128 |
|
128 | |||
129 | def _censoredtext(text): |
|
|||
130 | m, offs = storageutil.parsemeta(text) |
|
|||
131 | return m and "censored" in m |
|
|||
132 |
|
||||
133 | def addflagprocessor(flag, processor): |
|
129 | def addflagprocessor(flag, processor): | |
134 | """Register a flag processor on a revision data flag. |
|
130 | """Register a flag processor on a revision data flag. | |
135 |
|
131 | |||
@@ -1706,7 +1702,7 b' class revlog(object):' | |||||
1706 | raise error.RevlogError(_("integrity check failed on %s:%s") |
|
1702 | raise error.RevlogError(_("integrity check failed on %s:%s") | |
1707 | % (self.indexfile, pycompat.bytestr(revornode))) |
|
1703 | % (self.indexfile, pycompat.bytestr(revornode))) | |
1708 | except error.RevlogError: |
|
1704 | except error.RevlogError: | |
1709 |
if self._censorable and |
|
1705 | if self._censorable and storageutil.iscensoredtext(text): | |
1710 | raise error.CensoredNodeError(self.indexfile, node, text) |
|
1706 | raise error.CensoredNodeError(self.indexfile, node, text) | |
1711 | raise |
|
1707 | raise | |
1712 |
|
1708 |
@@ -65,3 +65,7 b' def packmeta(meta, text):' | |||||
65 | keys = sorted(meta) |
|
65 | keys = sorted(meta) | |
66 | metatext = b''.join(b'%s: %s\n' % (k, meta[k]) for k in keys) |
|
66 | metatext = b''.join(b'%s: %s\n' % (k, meta[k]) for k in keys) | |
67 | return b'\x01\n%s\x01\n%s' % (metatext, text) |
|
67 | return b'\x01\n%s\x01\n%s' % (metatext, text) | |
|
68 | ||||
|
69 | def iscensoredtext(text): | |||
|
70 | meta = parsemeta(text)[0] | |||
|
71 | return meta and b'censored' in meta |
General Comments 0
You need to be logged in to leave comments.
Login now