Mercurial > hg
changeset 23858:22a979d1ae56
filelog: use censored revlog flag bit to quickly check if a node is censored
author | Mike Edgar <adgar@google.com> |
---|---|
date | Mon, 12 Jan 2015 15:29:36 -0500 |
parents | 8a3c132f93d2 |
children | 661b246bf1c4 |
files | mercurial/filelog.py |
diffstat | 1 files changed, 3 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/filelog.py Mon Jan 12 14:41:25 2015 -0500 +++ b/mercurial/filelog.py Mon Jan 12 15:29:36 2015 -0500 @@ -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,10 +107,6 @@ def _file(self, f): return filelog(self.opener, f) - def _iscensored(self, revornode): + def _iscensored(self, rev): """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