comparison mercurial/interfaces/repository.py @ 51777:a891347058e7

manifest: introduce a `read_delta_parents` method This new method have a clearer semantic and can be used by code that need this semantic. This should avoid bugs, allow for more targeted optimisation, and provide a clearer API. Users will be updated in subsequent changesets. This is also part of the wider effort to clarify and fix this API. one more method coming.
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Thu, 01 Aug 2024 13:10:09 +0200
parents e1fd715df257
children bcb825bf0c5e
comparison
equal deleted inserted replaced
51776:852bd109dd55 51777:a891347058e7
1208 its 't' flag. This only apply if the underlying manifest support it. 1208 its 't' flag. This only apply if the underlying manifest support it.
1209 1209
1210 The returned object conforms to the ``imanifestdict`` interface. 1210 The returned object conforms to the ``imanifestdict`` interface.
1211 """ 1211 """
1212 1212
1213 def read_delta_parents(*, shallow=False, exact=True):
1214 """return a diff from this revision against both parents.
1215
1216 If `exact` is False, this might return a superset of the diff, containing
1217 files that are actually present as is in one of the parents.
1218
1219 If `shallow` is True, this will read the delta for this directory,
1220 without recursively reading subdirectory manifests. Instead, any
1221 subdirectory entry will be reported as it appears in the manifest, i.e.
1222 the subdirectory will be reported among files and distinguished only by
1223 its 't' flag. This only apply if the underlying manifest support it.
1224
1225 The returned object conforms to the ``imanifestdict`` interface."""
1226
1213 def readfast(shallow=False): 1227 def readfast(shallow=False):
1214 """Calls either ``read()`` or ``readdelta()``. 1228 """Calls either ``read()`` or ``readdelta()``.
1215 1229
1216 The faster of the two options is called. 1230 The faster of the two options is called.
1217 """ 1231 """