mercurial/context.py
changeset 26977 bd19561b98d9
parent 26748 5ba0a99ff27f
child 26978 9b9d4bcc915e
equal deleted inserted replaced
26976:c48fee950ce4 26977:bd19561b98d9
   745     def isexec(self):
   745     def isexec(self):
   746         return 'x' in self.flags()
   746         return 'x' in self.flags()
   747     def islink(self):
   747     def islink(self):
   748         return 'l' in self.flags()
   748         return 'l' in self.flags()
   749 
   749 
       
   750     _customcmp = False
   750     def cmp(self, fctx):
   751     def cmp(self, fctx):
   751         """compare with other file context
   752         """compare with other file context
   752 
   753 
   753         returns True if different than fctx.
   754         returns True if different than fctx.
   754         """
   755         """
       
   756         if fctx._customcmp:
       
   757             return fctx.cmp(self)
       
   758 
   755         if (fctx._filerev is None
   759         if (fctx._filerev is None
   756             and (self._repo._encodefilterpats
   760             and (self._repo._encodefilterpats
   757                  # if file data starts with '\1\n', empty metadata block is
   761                  # if file data starts with '\1\n', empty metadata block is
   758                  # prepended, which adds 4 bytes to filelog.size().
   762                  # prepended, which adds 4 bytes to filelog.size().
   759                  or self.size() - 4 == fctx.size())
   763                  or self.size() - 4 == fctx.size())