Mercurial > public > mercurial-scm > hg
diff rust/rhg/src/commands/files.rs @ 52034:b7d99348ea36
rust-files: also return filenode and flags when listing a revision's files
This is going to be useful when implementing parts of `update` and makes it
so we don't have to fetch the manifest and each entry twice.
author | Rapha?l Gom?s <rgomes@octobus.net> |
---|---|
date | Mon, 30 Sep 2024 12:10:35 +0200 |
parents | 788113f056d4 |
children | 7c105b953ca4 |
line wrap: on
line diff
--- a/rust/rhg/src/commands/files.rs Mon Sep 30 12:08:49 2024 +0200 +++ b/rust/rhg/src/commands/files.rs Mon Sep 30 12:10:35 2024 +0200 @@ -90,7 +90,15 @@ if let Some(rev) = rev { let files = list_rev_tracked_files(repo, rev, matcher) .map_err(|e| (e, rev.as_ref()))?; - display_files(invocation.ui, repo, relative_paths, files.iter()) + display_files( + invocation.ui, + repo, + relative_paths, + files.iter().map::<Result<_, CommandError>, _>(|f| { + let (f, _, _) = f?; + Ok(f) + }), + ) } else { // The dirstate always reflects the sparse narrowspec. let dirstate = repo.dirstate_map()?;