Are mercurial paths expanded recursively in hgrc?
In mercurial, you add lines to hgrc in the [paths] section to create aliases to push to and pull from. But can开发者_运维知识库 these be expanded recursively? For example:
# .hg/hgrc
[paths]
myserver = ssh://myserver/path/to/remote/repo
default = myserver
If I put that in my hgrc and try to do hg push default
, will it push to myserver?
No, they are not. A simple test with the following hgrc file:
[paths]
repo = C:\Temp\repo
default = repo
and then a push:
[C:\Temp\clone1] :hg push
abort: repository C:\Temp\clone1\repo not found!
... tells me that this doesn't work. You're going to have to copy the URL's.
Basically, it looks like the name is just understood as a local, relative path, from where the current repository resides.
精彩评论