rust/hg-core/src/repo.rs
changeset 46730 dfd35823635b
parent 46728 562a676e255a
child 46735 12d59eec7f1d
equal deleted inserted replaced
46729:6cd9f53aaed8 46730:dfd35823635b
    59             // Having an absolute path isn’t necessary here but can help code
    59             // Having an absolute path isn’t necessary here but can help code
    60             // elsewhere
    60             // elsewhere
    61             let absolute_root = current_dir()?.join(root);
    61             let absolute_root = current_dir()?.join(root);
    62             if absolute_root.join(".hg").is_dir() {
    62             if absolute_root.join(".hg").is_dir() {
    63                 Self::new_at_path(absolute_root, config)
    63                 Self::new_at_path(absolute_root, config)
       
    64             } else if absolute_root.is_file() {
       
    65                 Err(HgError::unsupported("bundle repository").into())
    64             } else {
    66             } else {
    65                 Err(RepoError::NotFound {
    67                 Err(RepoError::NotFound {
    66                     at: root.to_owned(),
    68                     at: root.to_owned(),
    67                 })
    69                 })
    68             }
    70             }