comparison rust/rhg/src/commands/files.rs @ 52375:393ad2685fb4

rust: make RevlogError AmbiguousPrefix case contain the actual prefix This brings the work started in `652149ed64f0` to its logical conclusion and makes the RevlogError self-sufficient so it can be directly converted to CommandError, without an extra rev text annotation. Without this change, it's confusing that the extra annotation is ignored in most-but-not-all cases.
author Arseniy Alekseyev <aalekseyev@janestreet.com>
date Tue, 26 Nov 2024 15:45:11 +0000
parents 7c105b953ca4
children 65f6f1fe43ef
comparison
equal deleted inserted replaced
52374:53dc147bc8b0 52375:393ad2685fb4
86 )) 86 ))
87 } 87 }
88 }; 88 };
89 89
90 if let Some(rev) = rev { 90 if let Some(rev) = rev {
91 let files = list_revset_tracked_files(repo, rev, matcher) 91 let files = list_revset_tracked_files(repo, rev, matcher)?;
92 .map_err(|e| (e, rev.as_ref()))?;
93 display_files( 92 display_files(
94 invocation.ui, 93 invocation.ui,
95 repo, 94 repo,
96 relative_paths, 95 relative_paths,
97 files.iter().map::<Result<_, CommandError>, _>(|f| { 96 files.iter().map::<Result<_, CommandError>, _>(|f| {