Mercurial > hg-stable
diff mercurial/context.py @ 51836:9844bab33aee
manifest: use `read_delta_parents` when adjusting linkrev
Let's use the more accurate API.
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Thu, 01 Aug 2024 13:15:54 +0200 |
parents | 87a8190e66fe |
children | f4733654f144 |
line wrap: on
line diff
--- a/mercurial/context.py Thu Aug 01 13:15:10 2024 +0200 +++ b/mercurial/context.py Thu Aug 01 13:15:54 2024 +0200 @@ -1063,7 +1063,12 @@ if path in ac[3]: # checking the 'files' field. # The file has been touched, check if the content is # similar to the one we search for. - if fnode == mfl[ac[0]].readfast().get(path): + # + # If the content is similar to one of the parents, then it + # cannot be an adjusted linkrev + if fnode == ( + mfl[ac[0]].read_delta_parents(exact=False).get(path) + ): return a # In theory, we should never get out of that loop without a result. # But if manifest uses a buggy file revision (not children of the