Mercurial paths in hgrc

11,051

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
Share:
11,051
Ivan Pereira
Author by

Ivan Pereira

Updated on June 01, 2022

Comments

  • Ivan Pereira
    Ivan Pereira about 2 years

    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://[email protected]//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