rust/rhg/src/commands/cat.rs
changeset 49914 58074252db3c
parent 49913 c15b415d1bff
child 50768 067edf5083a1
equal deleted inserted replaced
49913:c15b415d1bff 49914:58074252db3c
    93     let rev = match rev {
    93     let rev = match rev {
    94         Some(r) => r.to_string(),
    94         Some(r) => r.to_string(),
    95         None => format!("{:x}", repo.dirstate_parents()?.p1),
    95         None => format!("{:x}", repo.dirstate_parents()?.p1),
    96     };
    96     };
    97 
    97 
    98     let output = cat(&repo, &rev, files).map_err(|e| (e, rev.as_str()))?;
    98     let output = cat(repo, &rev, files).map_err(|e| (e, rev.as_str()))?;
    99     for (_file, contents) in output.results {
    99     for (_file, contents) in output.results {
   100         invocation.ui.write_stdout(&contents)?;
   100         invocation.ui.write_stdout(&contents)?;
   101     }
   101     }
   102     if !output.missing.is_empty() {
   102     if !output.missing.is_empty() {
   103         let short = format!("{:x}", output.node.short()).into_bytes();
   103         let short = format!("{:x}", output.node.short()).into_bytes();