mercurial/context.py
changeset 51780 9844bab33aee
parent 51773 87a8190e66fe
child 51859 f4733654f144
--- 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