[Updated] D10100: rhg: Print non-absolutized path in "repository {} not found" errors
SimonSapin
phabricator at mercurial-scm.org
Fri Mar 12 22:06:44 UTC 2021
SimonSapin edited the summary of this revision.
SimonSapin updated this revision to Diff 26287.
REPOSITORY
rHG Mercurial
CHANGES SINCE LAST UPDATE
https://phab.mercurial-scm.org/D10100?vs=26074&id=26287
BRANCH
default
CHANGES SINCE LAST ACTION
https://phab.mercurial-scm.org/D10100/new/
REVISION DETAIL
https://phab.mercurial-scm.org/D10100
AFFECTED FILES
rust/hg-core/src/repo.rs
CHANGE DETAILS
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
@@ -58,9 +58,9 @@
if let Some(root) = explicit_path {
// Having an absolute path isn’t necessary here but can help code
// elsewhere
- let root = current_dir()?.join(root);
- if root.join(".hg").is_dir() {
- Self::new_at_path(root, config)
+ let absolute_root = current_dir()?.join(root);
+ if absolute_root.join(".hg").is_dir() {
+ Self::new_at_path(absolute_root, config)
} else {
Err(RepoError::NotFound {
at: root.to_owned(),
To: SimonSapin, #hg-reviewers, Alphare, marmoute
Cc: marmoute, mercurial-patches
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mercurial-scm.org/pipermail/mercurial-patches/attachments/20210312/6e12699e/attachment-0002.html>
More information about the Mercurial-patches
mailing list