mercurial/context.py
changeset 46794 e2f7b2695ba1
parent 46416 bc3f3b59d0a4
parent 46678 0d055849d5f9
child 46819 d4ba4d51f85f
equal deleted inserted replaced
46782:6b52cffd8d0a 46794:e2f7b2695ba1
   991             if self.size() - 4 == fctx.size():
   991             if self.size() - 4 == fctx.size():
   992                 # size() can match:
   992                 # size() can match:
   993                 # if file data starts with '\1\n', empty metadata block is
   993                 # if file data starts with '\1\n', empty metadata block is
   994                 # prepended, which adds 4 bytes to filelog.size().
   994                 # prepended, which adds 4 bytes to filelog.size().
   995                 return self._filelog.cmp(self._filenode, fctx.data())
   995                 return self._filelog.cmp(self._filenode, fctx.data())
   996         if self.size() == fctx.size():
   996         if self.size() == fctx.size() or self.flags() == b'l':
   997             # size() matches: need to compare content
   997             # size() matches: need to compare content
       
   998             # issue6456: Always compare symlinks because size can represent
       
   999             # encrypted string for EXT-4 encryption(fscrypt).
   998             return self._filelog.cmp(self._filenode, fctx.data())
  1000             return self._filelog.cmp(self._filenode, fctx.data())
   999 
  1001 
  1000         # size() differs
  1002         # size() differs
  1001         return True
  1003         return True
  1002 
  1004