Mercurial > public > mercurial-scm > hg
comparison rust/rhg/src/commands/files.rs @ 46446:1dcd9c9975ed
rust: Fold find_root and check_requirements into Repo::find
Differential Revision: https://phab.mercurial-scm.org/D9906
author | Simon Sapin <simon.sapin@octobus.net> |
---|---|
date | Thu, 28 Jan 2021 20:31:42 +0100 |
parents | ca3f73cc3cf4 |
children | a6e4e4650bac |
comparison
equal
deleted
inserted
replaced
46445:ca3f73cc3cf4 | 46446:1dcd9c9975ed |
---|---|
46 } | 46 } |
47 | 47 |
48 impl<'a> Command for FilesCommand<'a> { | 48 impl<'a> Command for FilesCommand<'a> { |
49 fn run(&self, ui: &Ui) -> Result<(), CommandError> { | 49 fn run(&self, ui: &Ui) -> Result<(), CommandError> { |
50 let repo = Repo::find()?; | 50 let repo = Repo::find()?; |
51 repo.check_requirements()?; | |
52 if let Some(rev) = self.rev { | 51 if let Some(rev) = self.rev { |
53 let files = | 52 let files = |
54 list_rev_tracked_files(&repo, rev).map_err(|e| (e, rev))?; | 53 list_rev_tracked_files(&repo, rev).map_err(|e| (e, rev))?; |
55 self.display_files(ui, &repo, files.iter()) | 54 self.display_files(ui, &repo, files.iter()) |
56 } else { | 55 } else { |