##// END OF EJS Templates
filelog: use censored revlog flag bit to quickly check if a node is censored
Mike Edgar -
r23858:22a979d1 default
parent child Browse files
Show More
@@ -85,7 +85,7 b' class filelog(revlog.revlog):'
85 return False
85 return False
86
86
87 # censored files compare against the empty file
87 # censored files compare against the empty file
88 if self._iscensored(node):
88 if self._iscensored(self.rev(node)):
89 return text != ''
89 return text != ''
90
90
91 # renaming a file produces a different hash, even if the data
91 # renaming a file produces a different hash, even if the data
@@ -107,10 +107,6 b' class filelog(revlog.revlog):'
107 def _file(self, f):
107 def _file(self, f):
108 return filelog(self.opener, f)
108 return filelog(self.opener, f)
109
109
110 def _iscensored(self, revornode):
110 def _iscensored(self, rev):
111 """Check if a file revision is censored."""
111 """Check if a file revision is censored."""
112 try:
112 return self.flags(rev) & revlog.REVIDX_ISCENSORED
113 self.revision(revornode)
114 return False
115 except error.CensoredNodeError:
116 return True
General Comments 0
You need to be logged in to leave comments. Login now