equal
deleted
inserted
replaced
2 use crate::ui::Ui; |
2 use crate::ui::Ui; |
3 use clap::Arg; |
3 use clap::Arg; |
4 use hg::operations::list_rev_tracked_files; |
4 use hg::operations::list_rev_tracked_files; |
5 use hg::operations::Dirstate; |
5 use hg::operations::Dirstate; |
6 use hg::repo::Repo; |
6 use hg::repo::Repo; |
|
7 use hg::utils::current_dir; |
7 use hg::utils::files::{get_bytes_from_path, relativize_path}; |
8 use hg::utils::files::{get_bytes_from_path, relativize_path}; |
8 use hg::utils::hg_path::{HgPath, HgPathBuf}; |
9 use hg::utils::hg_path::{HgPath, HgPathBuf}; |
9 |
10 |
10 pub const HELP_TEXT: &str = " |
11 pub const HELP_TEXT: &str = " |
11 List tracked files. |
12 List tracked files. |
51 ui: &Ui, |
52 ui: &Ui, |
52 repo: &Repo, |
53 repo: &Repo, |
53 files: impl IntoIterator<Item = &'a HgPath>, |
54 files: impl IntoIterator<Item = &'a HgPath>, |
54 ) -> Result<(), CommandError> { |
55 ) -> Result<(), CommandError> { |
55 let cwd = HgPathBuf::from(get_bytes_from_path(hg::utils::current_dir()?)); |
56 let cwd = HgPathBuf::from(get_bytes_from_path(hg::utils::current_dir()?)); |
|
57 let working_directory = repo.working_directory_path(); |
|
58 let working_directory = current_dir()?.join(working_directory); // Make it absolute |
56 let working_directory = |
59 let working_directory = |
57 HgPathBuf::from(get_bytes_from_path(repo.working_directory_path())); |
60 HgPathBuf::from(get_bytes_from_path(working_directory)); |
58 |
61 |
59 let mut stdout = ui.stdout_buffer(); |
62 let mut stdout = ui.stdout_buffer(); |
60 |
63 |
61 for file in files { |
64 for file in files { |
62 let file = working_directory.join(file); |
65 let file = working_directory.join(file); |