filectx: replace use of _filerev with _filenode
authorDurham Goode <durham@fb.com>
Mon, 08 Feb 2016 14:17:11 -0800
changeset 28116 ba8257cb53e8
parent 28115 bd279da57e4b
child 28117 41a0fb2b4bbc
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.
mercurial/context.py
--- a/mercurial/context.py	Wed Feb 03 15:53:48 2016 -0800
+++ b/mercurial/context.py	Mon Feb 08 14:17:11 2016 -0800
@@ -789,7 +789,7 @@
         if fctx._customcmp:
             return fctx.cmp(self)
 
-        if (fctx._filerev is None
+        if (fctx._filenode is None
             and (self._repo._encodefilterpats
                  # if file data starts with '\1\n', empty metadata block is
                  # prepended, which adds 4 bytes to filelog.size().