Debian Codegraph @

doc/html/topic-urls.html

raw
1 <?xml version="1.0" encoding="utf-8"?>
2 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
4 <head>
5 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
6 <meta name="generator" content="Docutils 0.21.2: https://docutils.sourceforge.io/" />
7 <title>URL Paths</title>
8 <link rel="stylesheet" href="../style.css" type="text/css" />
9 </head>
10 <body>
11 <div class="document" id="url-paths">
12 <span id="topic-urls"></span>
13 <h1 class="title">URL Paths</h1>
14
15 <p id="urls">Valid URLs are of the form:</p>
16 <pre class="literal-block">
17 local/filesystem/path[#revision]
18 file://local/filesystem/path[#revision]
19 http://[user[:pass]&#64;]host[:port]/[path][#revision]
20 https://[user[:pass]&#64;]host[:port]/[path][#revision]
21 ssh://[user&#64;]host[:port]/[path][#revision]
22 path://pathname
23 </pre>
24 <p>Paths in the local filesystem can either point to Mercurial
25 repositories or to bundle files (as created by <a class="reference external" href="hg-bundle.html"><tt class="docutils literal">hg bundle</tt></a> or
26 <a class="reference external" href="hg-incoming.html"><tt class="docutils literal">hg incoming <span class="pre">--bundle</span></tt></a>). See also <a class="reference external" href="hg-paths.html"><tt class="docutils literal">hg help paths</tt></a>.</p>
27 <p>An optional identifier after # indicates a particular branch, tag, or
28 changeset to use from the remote repository. See also <a class="reference external" href="topic-revisions.html"><tt class="docutils literal">hg help
29 revisions</tt></a>.</p>
30 <p>Some features, such as pushing to <a class="reference external" href="http://">http://</a> and <a class="reference external" href="https://">https://</a> URLs are only
31 possible if the feature is explicitly enabled on the remote Mercurial
32 server.</p>
33 <p>Note that the security of HTTPS URLs depends on proper configuration of
34 web.cacerts.</p>
35 <p>Some notes about using SSH with Mercurial:</p>
36 <ul>
37 <li><p class="first">SSH requires an accessible shell account on the destination machine
38 and a copy of hg in the remote path or specified with remotecmd.</p>
39 </li>
40 <li><p class="first">path is relative to the remote user's home directory by default. Use
41 an extra slash at the start of a path to specify an absolute path:</p>
42 <pre class="literal-block">
43 ssh://example.com//tmp/repository
44 </pre>
45 </li>
46 <li><p class="first">Mercurial doesn't use its own compression via SSH; the right thing
47 to do is to configure it in your ~/.ssh/config, e.g.:</p>
48 <pre class="literal-block">
49 Host *.mylocalnetwork.example.com
50 Compression no
51 Host *
52 Compression yes
53 </pre>
54 <p>Alternatively specify &quot;ssh -C&quot; as your ssh command in your
55 configuration file or with the --ssh command line option.</p>
56 </li>
57 </ul>
58 <p>These URLs can all be stored in your configuration file with path
59 aliases under the [paths] section like so:</p>
60 <pre class="literal-block">
61 [paths]
62 alias1 = URL1
63 alias2 = URL2
64 ...
65 </pre>
66 <p>You can then use the alias for any command that uses a URL (for
67 example <a class="reference external" href="hg-pull.html"><tt class="docutils literal">hg pull alias1</tt></a> will be treated as <a class="reference external" href="hg-pull.html"><tt class="docutils literal">hg pull URL1</tt></a>).</p>
68 <p>Two path aliases are special because they are used as defaults when
69 you do not provide the URL to a command:</p>
70 <dl class="docutils">
71 <dt>default:</dt>
72 <dd>When you create a repository with hg clone, the clone command saves
73 the location of the source repository as the new repository's
74 'default' path. This is then used when you omit path from push- and
75 pull-like commands (including incoming and outgoing).</dd>
76 <dt>default-push:</dt>
77 <dd>The push command will look for a path named 'default-push', and
78 prefer it over 'default' if both are defined.</dd>
79 </dl>
80 <p>These alias can also be use in the <cite>path://</cite> scheme:</p>
81 <pre class="literal-block">
82 [paths]
83 alias1 = URL1
84 alias2 = path://alias1
85 ...
86 </pre>
87 <p>check <a class="reference external" href="hgrc.5.html#paths"><tt class="docutils literal">hg help config.paths</tt></a> for details about the behavior of such &quot;sub-path&quot;.</p>
88 </div>
89 </body>
90 </html>