rust/rhg/src/commands/cat.rs
changeset 46503 d8730ff51d5a
parent 46501 1ecaf09d9964
child 46592 80840b651721
--- a/rust/rhg/src/commands/cat.rs	Mon Feb 08 21:28:52 2021 +0100
+++ b/rust/rhg/src/commands/cat.rs	Mon Feb 08 21:37:30 2021 +0100
@@ -8,6 +8,7 @@
 use hg::utils::hg_path::HgPathBuf;
 use micro_timer::timed;
 use std::convert::TryFrom;
+use std::path::Path;
 
 pub const HELP_TEXT: &str = "
 Output the current or given revision of files
@@ -38,6 +39,7 @@
 pub fn run(
     ui: &Ui,
     config: &Config,
+    repo_path: Option<&Path>,
     args: &ArgMatches,
 ) -> Result<(), CommandError> {
     let rev = args.value_of("rev");
@@ -46,7 +48,7 @@
         None => vec![],
     };
 
-    let repo = Repo::find(config)?;
+    let repo = Repo::find(config, repo_path)?;
     let cwd = hg::utils::current_dir()?;
 
     let mut files = vec![];