Mercurial > public > mercurial-scm > hg
comparison rust/rhg/src/commands/files.rs @ 52036:7c105b953ca4
rust-files: separate the listing of files from a revset and a revision
We won't need to parse a revset all the time, and an upcoming patch will make
use of this new util.
author | Rapha?l Gom?s <rgomes@octobus.net> |
---|---|
date | Mon, 30 Sep 2024 19:15:19 +0200 |
parents | b7d99348ea36 |
children | 393ad2685fb4 |
comparison
equal
deleted
inserted
replaced
52035:b8b3984deae3 | 52036:7c105b953ca4 |
---|---|
5 use crate::utils::path_utils::RelativizePaths; | 5 use crate::utils::path_utils::RelativizePaths; |
6 use clap::Arg; | 6 use clap::Arg; |
7 use hg::filepatterns::parse_pattern_args; | 7 use hg::filepatterns::parse_pattern_args; |
8 use hg::matchers::IntersectionMatcher; | 8 use hg::matchers::IntersectionMatcher; |
9 use hg::narrow; | 9 use hg::narrow; |
10 use hg::operations::list_rev_tracked_files; | 10 use hg::operations::list_revset_tracked_files; |
11 use hg::repo::Repo; | 11 use hg::repo::Repo; |
12 use hg::utils::files::get_bytes_from_os_str; | 12 use hg::utils::files::get_bytes_from_os_str; |
13 use hg::utils::filter_map_results; | 13 use hg::utils::filter_map_results; |
14 use hg::utils::hg_path::HgPath; | 14 use hg::utils::hg_path::HgPath; |
15 use rayon::prelude::*; | 15 use rayon::prelude::*; |
86 )) | 86 )) |
87 } | 87 } |
88 }; | 88 }; |
89 | 89 |
90 if let Some(rev) = rev { | 90 if let Some(rev) = rev { |
91 let files = list_rev_tracked_files(repo, rev, matcher) | 91 let files = list_revset_tracked_files(repo, rev, matcher) |
92 .map_err(|e| (e, rev.as_ref()))?; | 92 .map_err(|e| (e, rev.as_ref()))?; |
93 display_files( | 93 display_files( |
94 invocation.ui, | 94 invocation.ui, |
95 repo, | 95 repo, |
96 relative_paths, | 96 relative_paths, |