Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/context.py @ 28116:ba8257cb53e8
filectx: replace use of _filerev with _filenode
_filerev depends on the filelog implementation using revlogs and linkrevs.
Alternative implementations, like remotefilelog, do not have rev numbers, so
this call fails. Replacing it with _filenode means it doesn't rely on rev
numbers, and doesn't cost anything extra, since _filerev is using _filenode
under the hood anyway.
author | Durham Goode <durham@fb.com> |
---|---|
date | Mon, 08 Feb 2016 14:17:11 -0800 |
parents | d3f1b7ee5e70 |
children | 1778770e1982 |
comparison
equal
deleted
inserted
replaced
28115:bd279da57e4b | 28116:ba8257cb53e8 |
---|---|
787 returns True if different than fctx. | 787 returns True if different than fctx. |
788 """ | 788 """ |
789 if fctx._customcmp: | 789 if fctx._customcmp: |
790 return fctx.cmp(self) | 790 return fctx.cmp(self) |
791 | 791 |
792 if (fctx._filerev is None | 792 if (fctx._filenode is None |
793 and (self._repo._encodefilterpats | 793 and (self._repo._encodefilterpats |
794 # if file data starts with '\1\n', empty metadata block is | 794 # if file data starts with '\1\n', empty metadata block is |
795 # prepended, which adds 4 bytes to filelog.size(). | 795 # prepended, which adds 4 bytes to filelog.size(). |
796 or self.size() - 4 == fctx.size()) | 796 or self.size() - 4 == fctx.size()) |
797 or self.size() == fctx.size()): | 797 or self.size() == fctx.size()): |