mercurial/context.py
changeset 15869 e5feebc1f3bb
parent 15822 d523b6e7ad26
parent 15848 012b285cf643
child 15895 933b9ff73750
equal deleted inserted replaced
15868:031c2e4424e1 15869:e5feebc1f3bb
   383     def cmp(self, fctx):
   383     def cmp(self, fctx):
   384         """compare with other file context
   384         """compare with other file context
   385 
   385 
   386         returns True if different than fctx.
   386         returns True if different than fctx.
   387         """
   387         """
   388         if (fctx._filerev is None and self._repo._encodefilterpats
   388         if (fctx._filerev is None
       
   389             and (self._repo._encodefilterpats
       
   390                  # if file data starts with '\1\n', empty metadata block is
       
   391                  # prepended, which adds 4 bytes to fielog.size().
       
   392                  or self.size() - 4 == fctx.size())
   389             or self.size() == fctx.size()):
   393             or self.size() == fctx.size()):
   390             return self._filelog.cmp(self._filenode, fctx.data())
   394             return self._filelog.cmp(self._filenode, fctx.data())
   391 
   395 
   392         return True
   396         return True
   393 
   397