Skip to content
Snippets Groups Projects
Commit 22a979d1 authored by Mike Edgar's avatar Mike Edgar
Browse files

filelog: use censored revlog flag bit to quickly check if a node is censored

parent 8a3c132f
No related branches found
No related tags found
No related merge requests found
......@@ -85,7 +85,7 @@
return False
# censored files compare against the empty file
if self._iscensored(node):
if self._iscensored(self.rev(node)):
return text != ''
# renaming a file produces a different hash, even if the data
......@@ -107,5 +107,5 @@
def _file(self, f):
return filelog(self.opener, f)
def _iscensored(self, revornode):
def _iscensored(self, rev):
"""Check if a file revision is censored."""
......@@ -111,6 +111,2 @@
"""Check if a file revision is censored."""
try:
self.revision(revornode)
return False
except error.CensoredNodeError:
return True
return self.flags(rev) & revlog.REVIDX_ISCENSORED
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment