mercurial/context.py
branchstable
changeset 15848 012b285cf643
parent 15337 cf5f9df6406b
child 15869 e5feebc1f3bb
child 15872 a3e2b9a1f063
equal deleted inserted replaced
15845:dffdc8c8f6d6 15848:012b285cf643
   366     def cmp(self, fctx):
   366     def cmp(self, fctx):
   367         """compare with other file context
   367         """compare with other file context
   368 
   368 
   369         returns True if different than fctx.
   369         returns True if different than fctx.
   370         """
   370         """
   371         if (fctx._filerev is None and self._repo._encodefilterpats
   371         if (fctx._filerev is None
       
   372             and (self._repo._encodefilterpats
       
   373                  # if file data starts with '\1\n', empty metadata block is
       
   374                  # prepended, which adds 4 bytes to fielog.size().
       
   375                  or self.size() - 4 == fctx.size())
   372             or self.size() == fctx.size()):
   376             or self.size() == fctx.size()):
   373             return self._filelog.cmp(self._filenode, fctx.data())
   377             return self._filelog.cmp(self._filenode, fctx.data())
   374 
   378 
   375         return True
   379         return True
   376 
   380