I have the following setup: ~/project (clone of upstream) ~/project-dev (clone of project, with default path set to ../project) When I do "hg -R default id" from project-dev it outputs: abort: There is no Mercurial repository here (.hg not found) When I do "hg -R default out" from project-dev it outputs: abort: repository /home/project not found!
"hg help -v" says -R --repository REPO repository root directory or name of overlay bundle file There is no indication that it should be possible to specify an "url" (which can have aliases as described in "hg help urls") as -R option. The whole purpose of -R is to use another .hg than the local one, so I wouldn't expect the local .hg (or its paths definitions) to be used at all. The error messages do however seem confusing.
It definitely accepts and expands the url/alias, though, but seems to assume a '..' too many. I.e. I have a repo in c:\src\lala\crew with default = ..\crew, but hg -R default log complains there is no c:\crew, instead of c:\src\crew, where the repo is located. Either it shouldn't work at all, or it should work correctly :).
A couple of notes: 1. hg help -R most definitely accepts URLs and aliases. You can use file://... or a path alias from .hg/hgrc (as long as it's absolute). 2. This seems to be related to ui.fixconfig(). It converts hg -R ../foo into hg -R /home/foo for whatever reason. I'm not sure why it only does it for -R and not for anything else. Since we already support "hg in foo" where foo = ../relative/path, we definitely should support relative path aliases for -R.
Fixed by http://hg.intevation.org/mercurial/crew/rev/42ca7aef28d3 Brodie Rao <brodie@bitheap.org> dispatch: properly handle relative path aliases used with -R (issue2376)
--- Bug imported by bugzilla@serpentine.com 2012-05-12 09:12 EDT --- This bug was previously known as _bug_ 2376 at http://mercurial.selenic.com/bts/issue2376