--- a/mercurial/context.py Fri Jan 13 11:29:40 2012 -0600
+++ b/mercurial/context.py Fri Jan 13 11:29:53 2012 -0600
@@ -385,7 +385,11 @@
returns True if different than fctx.
"""
- if (fctx._filerev is None and self._repo._encodefilterpats
+ if (fctx._filerev is None
+ and (self._repo._encodefilterpats
+ # if file data starts with '\1\n', empty metadata block is
+ # prepended, which adds 4 bytes to fielog.size().
+ or self.size() - 4 == fctx.size())
or self.size() == fctx.size()):
return self._filelog.cmp(self._filenode, fctx.data())