From patchwork Wed Mar 3 18:25:01 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: D10101: rhg: Fall back to Python on --repository with an URL From: phabricator X-Patchwork-Id: 48416 Message-Id: To: Phabricator Cc: mercurial-devel@mercurial-scm.org Date: Wed, 3 Mar 2021 18:25:01 +0000 SimonSapin created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D10101 AFFECTED FILES rust/rhg/src/main.rs CHANGE DETAILS To: SimonSapin, #hg-reviewers Cc: mercurial-patches, mercurial-devel diff --git a/rust/rhg/src/main.rs b/rust/rhg/src/main.rs --- a/rust/rhg/src/main.rs +++ b/rust/rhg/src/main.rs @@ -95,6 +95,20 @@ exit(&ui, on_unsupported, Err(error.into())) }); + if let Some(repo_path_bytes) = &early_args.repo { + if repo_path_bytes.contains(&b':') { + exit( + &ui, + OnUnsupported::from_config(&non_repo_config), + Err(CommandError::UnsupportedFeature { + message: format_bytes!( + b"URL-like --repository {}", + repo_path_bytes + ), + }), + ) + } + } let repo_path = early_args.repo.as_deref().map(get_path_from_bytes); let repo_result = match Repo::find(&non_repo_config, repo_path) { Ok(repo) => Ok(repo),