rust/rhg/src/commands/cat.rs
changeset 45604 db11f8f39caf
parent 45542 33ded2d3f4fc
child 45937 2ad2745e0be9
equal deleted inserted replaced
45603:be951ca95b08 45604:db11f8f39caf
    38         let mut files = vec![];
    38         let mut files = vec![];
    39         for file in self.files.iter() {
    39         for file in self.files.iter() {
    40             let normalized = cwd.join(&file);
    40             let normalized = cwd.join(&file);
    41             let stripped = normalized
    41             let stripped = normalized
    42                 .strip_prefix(&root)
    42                 .strip_prefix(&root)
    43                 .map_err(|_| CommandErrorKind::Abort(None))?;
    43                 .or(Err(CommandErrorKind::Abort(None)))?;
    44             let hg_file = HgPathBuf::try_from(stripped.to_path_buf())
    44             let hg_file = HgPathBuf::try_from(stripped.to_path_buf())
    45                 .map_err(|_| CommandErrorKind::Abort(None))?;
    45                 .or(Err(CommandErrorKind::Abort(None)))?;
    46             files.push(hg_file);
    46             files.push(hg_file);
    47         }
    47         }
    48 
    48 
    49         match self.rev {
    49         match self.rev {
    50             Some(rev) => {
    50             Some(rev) => {