# HG changeset patch # User Pierre-Yves David # Date 1722510769 -7200 # Node ID 4704c4c79f21288a65b02bced8261bf99a4b821e # Parent a891347058e7debc4424f3d7ee502826b1cb9ae6 manifest: use `read_delta_parents` when adjusting linkrev in remotefile Let's use the more accurate API. diff -r a891347058e7 -r 4704c4c79f21 hgext/remotefilelog/remotefilectx.py --- a/hgext/remotefilelog/remotefilectx.py Thu Aug 01 13:10:09 2024 +0200 +++ b/hgext/remotefilelog/remotefilectx.py Thu Aug 01 13:12:49 2024 +0200 @@ -100,7 +100,11 @@ if path in data[3]: # checking the 'files' field. # The file has been touched, check if the hash is what we're # looking for. - if fileid == mfl[data[0]].readfast().get(path): + # + # The change has to be against a parent, otherwise we might be + # missing linkrev worthy changes. + m = mfl[data[0]].read_delta_parents(exact=False) + if fileid == m.get(path): return rev # Couldn't find the linkrev. This should generally not happen, and will @@ -199,8 +203,10 @@ manifestnode, files = ancctx[0], ancctx[3] # If the file was touched in this ancestor, and the content is similar # to the one we are searching for. - if path in files and fnode == mfl[manifestnode].readfast().get(path): - return cl.node(ancrev) + if path in files: + m = mfl[manifestnode].read_delta_parents(exact=False) + if fnode == m.get(path): + return cl.node(ancrev) return None def _adjustlinknode(self, path, filelog, fnode, srcrev, inclusive=False):