comparison mercurial/context.py @ 46794:e2f7b2695ba1

merge with stable
author Matt Harbison <matt_harbison@yahoo.com>
date Thu, 18 Mar 2021 18:24:59 -0400
parents bc3f3b59d0a4 0d055849d5f9
children d4ba4d51f85f
comparison
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