Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Mercurial paths in hgrc

Tags:

mercurial

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

like image 841
balsagoth Avatar asked Mar 07 '11 12:03

balsagoth


1 Answers

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
like image 62
Tim Henigan Avatar answered Sep 28 '22 10:09

Tim Henigan