1 Valid URLs are of the form:: |
|
2 |
|
3 local/filesystem/path[#revision] |
|
4 file://local/filesystem/path[#revision] |
|
5 http://[user[:pass]@]host[:port]/[path][#revision] |
|
6 https://[user[:pass]@]host[:port]/[path][#revision] |
|
7 ssh://[user[:pass]@]host[:port]/[path][#revision] |
|
8 |
|
9 Paths in the local filesystem can either point to Mercurial |
|
10 repositories or to bundle files (as created by 'hg bundle' or 'hg |
|
11 incoming --bundle'). |
|
12 |
|
13 An optional identifier after # indicates a particular branch, tag, or |
|
14 changeset to use from the remote repository. See also 'hg help |
|
15 revisions'. |
|
16 |
|
17 Some features, such as pushing to http:// and https:// URLs are only |
|
18 possible if the feature is explicitly enabled on the remote Mercurial |
|
19 server. |
|
20 |
|
21 Some notes about using SSH with Mercurial: |
|
22 |
|
23 - SSH requires an accessible shell account on the destination machine |
|
24 and a copy of hg in the remote path or specified with as remotecmd. |
|
25 - path is relative to the remote user's home directory by default. Use |
|
26 an extra slash at the start of a path to specify an absolute path:: |
|
27 |
|
28 ssh://example.com//tmp/repository |
|
29 |
|
30 - Mercurial doesn't use its own compression via SSH; the right thing |
|
31 to do is to configure it in your ~/.ssh/config, e.g.:: |
|
32 |
|
33 Host *.mylocalnetwork.example.com |
|
34 Compression no |
|
35 Host * |
|
36 Compression yes |
|
37 |
|
38 Alternatively specify "ssh -C" as your ssh command in your hgrc or |
|
39 with the --ssh command line option. |
|
40 |
|
41 These URLs can all be stored in your hgrc with path aliases under the |
|
42 [paths] section like so:: |
|
43 |
|
44 [paths] |
|
45 alias1 = URL1 |
|
46 alias2 = URL2 |
|
47 ... |
|
48 |
|
49 You can then use the alias for any command that uses a URL (for |
|
50 example 'hg pull alias1' will be treated as 'hg pull URL1'). |
|
51 |
|
52 Two path aliases are special because they are used as defaults when |
|
53 you do not provide the URL to a command: |
|
54 |
|
55 default: |
|
56 When you create a repository with hg clone, the clone command saves |
|
57 the location of the source repository as the new repository's |
|
58 'default' path. This is then used when you omit path from push- and |
|
59 pull-like commands (including incoming and outgoing). |
|
60 |
|
61 default-push: |
|
62 The push command will look for a path named 'default-push', and |
|
63 prefer it over 'default' if both are defined. |
|