开发者

Mercurial paths in hgrc

开发者 https://www.devze.com 2023-02-15 19:20 出处:网络
I need to know if i it is possible to add in my hgrc file something like this: [paths] default = http://somehost.com/repos/

I need to know if i it is possible to add in my hgrc file something like this:

[paths]
default = http://somehost.com/repos/
live = ssh://user@host.com//home/user/public_html

I read some information about this in http://www.selenic.com/mercurial/hgrc.5.html#paths开发者_高级运维 But my problem is that i don't know how to use it. My guess is that it should be something like this:

hg pull @live

Maybe i'm missing some documentation.

Thanks


From hg help urls:

URLs can all be stored in your configuration file with path aliases under the [paths] section like so:

  [paths]
  alias1 = URL1
  alias2 = URL2
  ...

You can then use the alias for any command that uses a URL (for example hg pull alias1 will be treated as hg pull URL1).

Two path aliases are special because they are used as defaults when you do not provide the URL to a command:

  1. default
  2. default-push
0

精彩评论

暂无评论...
验证码 换一张
取 消