rust/rhg/src/commands/files.rs
changeset 46445 ca3f73cc3cf4
parent 46436 252d1bdba33d
child 46446 1dcd9c9975ed
equal deleted inserted replaced
46444:6c778d20c8c2 46445:ca3f73cc3cf4
    26         &self,
    26         &self,
    27         ui: &Ui,
    27         ui: &Ui,
    28         repo: &Repo,
    28         repo: &Repo,
    29         files: impl IntoIterator<Item = &'a HgPath>,
    29         files: impl IntoIterator<Item = &'a HgPath>,
    30     ) -> Result<(), CommandError> {
    30     ) -> Result<(), CommandError> {
    31         let cwd = std::env::current_dir()
    31         let cwd = hg::utils::current_dir()?;
    32             .or_else(|e| Err(CommandError::CurrentDirNotFound(e)))?;
       
    33         let rooted_cwd = cwd
    32         let rooted_cwd = cwd
    34             .strip_prefix(repo.working_directory_path())
    33             .strip_prefix(repo.working_directory_path())
    35             .expect("cwd was already checked within the repository");
    34             .expect("cwd was already checked within the repository");
    36         let rooted_cwd = HgPathBuf::from(get_bytes_from_path(rooted_cwd));
    35         let rooted_cwd = HgPathBuf::from(get_bytes_from_path(rooted_cwd));
    37 
    36