Mercurial > public > mercurial-scm > hg-stable
diff mercurial/interfaces/repository.py @ 51837:bcb825bf0c5e
manifest: add a read_delta_new_entries method
This new method have a well defined semantic and can be adjusted by narrow as it
needs.
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Tue, 06 Aug 2024 02:12:08 +0200 |
parents | a891347058e7 |
children | f4733654f144 |
line wrap: on
line diff
--- a/mercurial/interfaces/repository.py Thu Aug 01 13:15:54 2024 +0200 +++ b/mercurial/interfaces/repository.py Tue Aug 06 02:12:08 2024 +0200 @@ -1224,6 +1224,21 @@ The returned object conforms to the ``imanifestdict`` interface.""" + def read_delta_new_entries(*, shallow=False): + """Return a manifest containing just the entries that might be new to + the repository. + + This is often equivalent to a diff against both parents, but without + garantee. For performance reason, It might contains more files in some cases. + + If `shallow` is True, this will read the delta for this directory, + without recursively reading subdirectory manifests. Instead, any + subdirectory entry will be reported as it appears in the manifest, i.e. + the subdirectory will be reported among files and distinguished only by + its 't' flag. This only apply if the underlying manifest support it. + + The returned object conforms to the ``imanifestdict`` interface.""" + def readfast(shallow=False): """Calls either ``read()`` or ``readdelta()``. @@ -1477,6 +1492,10 @@ """nodeconstants used by the current repository.""" ) + narrowed = interfaceutil.Attribute( + """True, is the manifest is narrowed by a matcher""" + ) + def __getitem__(node): """Obtain a manifest instance for a given binary node.