comparison mercurial/changegroup.py @ 51779:acc2d0f08fc9

manifest: use the `read_delta_parents` method Let's use the more accurate API.
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Thu, 01 Aug 2024 13:15:10 +0200
parents ca7bde5dbafb
children e4954fd3d1c3
comparison
equal deleted inserted replaced
51778:4704c4c79f21 51779:acc2d0f08fc9
1828 Note that this means manifests must be completely sent to 1828 Note that this means manifests must be completely sent to
1829 the client before you can trust the list of files and 1829 the client before you can trust the list of files and
1830 treemanifests to send. 1830 treemanifests to send.
1831 """ 1831 """
1832 clnode = nodes[x] 1832 clnode = nodes[x]
1833 mdata = mfl.get(tree, x).readfast(shallow=True) 1833 mctx = mfl.get(tree, x)
1834 mdata = mctx.read_delta_parents(shallow=True, exact=False)
1834 for p, n, fl in mdata.iterentries(): 1835 for p, n, fl in mdata.iterentries():
1835 if fl == b't': # subdirectory manifest 1836 if fl == b't': # subdirectory manifest
1836 subtree = tree + p + b'/' 1837 subtree = tree + p + b'/'
1837 tmfclnodes = tmfnodes.setdefault(subtree, {}) 1838 tmfclnodes = tmfnodes.setdefault(subtree, {})
1838 tmfclnode = tmfclnodes.setdefault(n, clnode) 1839 tmfclnode = tmfclnodes.setdefault(n, clnode)