rust/rhg/src/main.rs
changeset 46596 d2e61f00ee9d
parent 46593 5ce2aa7c2ad5
child 46601 755c31a1caf9
equal deleted inserted replaced
46595:98a455a62699 46596:d2e61f00ee9d
    68         let b = subcommand_args.values_of_os(name).into_iter().flatten();
    68         let b = subcommand_args.values_of_os(name).into_iter().flatten();
    69         a.chain(b)
    69         a.chain(b)
    70     };
    70     };
    71 
    71 
    72     let config_args = values_of_global_arg("config")
    72     let config_args = values_of_global_arg("config")
    73         // `get_bytes_from_path` works for OsStr the same as for Path
    73         .map(hg::utils::files::get_bytes_from_os_str);
    74         .map(hg::utils::files::get_bytes_from_path);
       
    75     let non_repo_config = &hg::config::Config::load(config_args)?;
    74     let non_repo_config = &hg::config::Config::load(config_args)?;
    76 
    75 
    77     let repo_path = value_of_global_arg("repository").map(Path::new);
    76     let repo_path = value_of_global_arg("repository").map(Path::new);
    78     let repo = match Repo::find(non_repo_config, repo_path) {
    77     let repo = match Repo::find(non_repo_config, repo_path) {
    79         Ok(repo) => Ok(repo),
    78         Ok(repo) => Ok(repo),