annotate mercurial-tests/testData/bin/help/urls.txt @ 1063:4b6661db8a8a Lakhnau-2020.2.x

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