Mercurial > hg
diff rust/hg-core/src/operations/cat.rs @ 47964:796206e74b10
rhg: Reuse manifest when checking status of multiple ambiguous files
When `rhg status` cannot determine whether a file is clean based on mtime and
size alone, it needs to compare its contents with those found in the parent
commit. Previously, rhg would find the (same) manifest of that commit again
for every such file. This is lifted out of the loop and reused.
Differential Revision: https://phab.mercurial-scm.org/D11411
author | Simon Sapin <simon.sapin@octobus.net> |
---|---|
date | Mon, 13 Sep 2021 18:09:10 +0200 |
parents | 4d2a5ca060e3 |
children | 87e3f878e65f |
line wrap: on
line diff
--- a/rust/hg-core/src/operations/cat.rs Mon Sep 13 18:02:45 2021 +0200 +++ b/rust/hg-core/src/operations/cat.rs Mon Sep 13 18:09:10 2021 +0200 @@ -34,7 +34,7 @@ files: &'a [HgPathBuf], ) -> Result<CatOutput, RevlogError> { let rev = crate::revset::resolve_single(revset, repo)?; - let manifest = repo.manifest(rev)?; + let manifest = repo.manifest_for_rev(rev)?; let node = *repo .changelog()? .node_from_rev(rev)