Patchwork D10102: rhg: Fall back to Python for bundle repositories

login
register
mail settings
Submitter phabricator
Date March 3, 2021, 6:25 p.m.
Message ID <differential-rev-PHID-DREV-ehnvy347nkv7otdyzj47-req@mercurial-scm.org>
Download mbox | patch
Permalink /patch/48417/
State Superseded
Headers show

Comments

phabricator - March 3, 2021, 6:25 p.m.
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/D10102

AFFECTED FILES
  rust/hg-core/src/repo.rs

CHANGE DETAILS




To: SimonSapin, #hg-reviewers
Cc: mercurial-patches, mercurial-devel

Patch

diff --git a/rust/hg-core/src/repo.rs b/rust/hg-core/src/repo.rs
--- a/rust/hg-core/src/repo.rs
+++ b/rust/hg-core/src/repo.rs
@@ -61,6 +61,8 @@ 
             let absolute_root = current_dir()?.join(root);
             if absolute_root.join(".hg").is_dir() {
                 Self::new_at_path(absolute_root, config)
+            } else if absolute_root.is_file() {
+                Err(HgError::unsupported("bundle repository").into())
             } else {
                 Err(RepoError::NotFound {
                     at: root.to_owned(),