mercurial/helptext/urls.txt
author Georges Racinet on incendie.racinet.fr <georges@racinet.fr>
Tue, 17 Oct 2023 22:42:40 +0200
changeset 51224 43241f31cf5b
parent 46905 95a5ed7db9ca
permissions -rw-r--r--
rust-index: find_gca_candidates bit sets genericization This allows to use arbitratry size of inputs in `find_gca_candidates()`. We're genericizing so that the common case of up to 63 inputs can be treated with the efficient implementation backed by `u64`. Some complications with the borrow checker came, because arbitrary sized bit sets will not be `Copy`, hence mutating them keeps a mut ref on the `seen` vector. This is solved by some cloning, most of which can be avoided, preferably in a follow-up after proof that this works (hence after exposition to Python layer). As far as performance is concerned, calling `clone()` on a `Copy` object (good case when number of revs is less than 64) should end up just doing a copy, according to this excerpt of the `Clone` trait documentation: Types that are Copy should have a trivial implementation of Clone. More formally: if T: Copy, x: T, and y: &T, then let x = y.clone(); is equivalent to let x = *y;. Manual implementations should be careful to uphold this invariant; however, unsafe code must not rely on it to ensure memory safety. We kept the general structure, hence why there are some double negations. This also could be made nicer in a follow-up. The `NonStaticPoisonableBitSet` is included to ensure that the `PoisonableBitSet` trait is general enough (had to correct `vec_of_empty()` for instance). Moving the genericization one level to encompass the `seen` vector and not its elements would be better for performance, if worth it.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
9540
cad36e496640 help: un-indent help topics
Martin Geisler <mg@lazybytes.net>
parents: 9539
diff changeset
     1
Valid URLs are of the form::
cad36e496640 help: un-indent help topics
Martin Geisler <mg@lazybytes.net>
parents: 9539
diff changeset
     2
cad36e496640 help: un-indent help topics
Martin Geisler <mg@lazybytes.net>
parents: 9539
diff changeset
     3
  local/filesystem/path[#revision]
15533
10a4fab20ed9 help: Backed out changeset e99facd2cd2a, description of file urls
Mads Kiilerich <mads@kiilerich.com>
parents: 15495
diff changeset
     4
  file://local/filesystem/path[#revision]
9540
cad36e496640 help: un-indent help topics
Martin Geisler <mg@lazybytes.net>
parents: 9539
diff changeset
     5
  http://[user[:pass]@]host[:port]/[path][#revision]
cad36e496640 help: un-indent help topics
Martin Geisler <mg@lazybytes.net>
parents: 9539
diff changeset
     6
  https://[user[:pass]@]host[:port]/[path][#revision]
13304
e4b02eb825b1 help: ssh urls don't allow passwords
Matt Mackall <mpm@selenic.com>
parents: 12959
diff changeset
     7
  ssh://[user@]host[:port]/[path][#revision]
46905
95a5ed7db9ca help: document the `path://` url scheme
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43632
diff changeset
     8
  path://pathname
9539
c904e76e3834 help: move help topics from mercurial/help.py to help/*.txt
Martin Geisler <mg@lazybytes.net>
parents:
diff changeset
     9
9540
cad36e496640 help: un-indent help topics
Martin Geisler <mg@lazybytes.net>
parents: 9539
diff changeset
    10
Paths in the local filesystem can either point to Mercurial
19197
01d68fb07915 help: stop documentation markup appearing in generated help
Mike Williams <mrw@eandem.co.uk>
parents: 15533
diff changeset
    11
repositories or to bundle files (as created by :hg:`bundle` or
01d68fb07915 help: stop documentation markup appearing in generated help
Mike Williams <mrw@eandem.co.uk>
parents: 15533
diff changeset
    12
:hg:`incoming --bundle`). See also :hg:`help paths`.
9539
c904e76e3834 help: move help topics from mercurial/help.py to help/*.txt
Martin Geisler <mg@lazybytes.net>
parents:
diff changeset
    13
9540
cad36e496640 help: un-indent help topics
Martin Geisler <mg@lazybytes.net>
parents: 9539
diff changeset
    14
An optional identifier after # indicates a particular branch, tag, or
10973
49a07f441496 Use hg role in help strings
Martin Geisler <mg@aragost.com>
parents: 9999
diff changeset
    15
changeset to use from the remote repository. See also :hg:`help
49a07f441496 Use hg role in help strings
Martin Geisler <mg@aragost.com>
parents: 9999
diff changeset
    16
revisions`.
9539
c904e76e3834 help: move help topics from mercurial/help.py to help/*.txt
Martin Geisler <mg@lazybytes.net>
parents:
diff changeset
    17
9540
cad36e496640 help: un-indent help topics
Martin Geisler <mg@lazybytes.net>
parents: 9539
diff changeset
    18
Some features, such as pushing to http:// and https:// URLs are only
cad36e496640 help: un-indent help topics
Martin Geisler <mg@lazybytes.net>
parents: 9539
diff changeset
    19
possible if the feature is explicitly enabled on the remote Mercurial
cad36e496640 help: un-indent help topics
Martin Geisler <mg@lazybytes.net>
parents: 9539
diff changeset
    20
server.
9539
c904e76e3834 help: move help topics from mercurial/help.py to help/*.txt
Martin Geisler <mg@lazybytes.net>
parents:
diff changeset
    21
12593
01c373762b76 doc: clarify that https cert verification requires web.cacerts
Mads Kiilerich <mads@kiilerich.com>
parents: 12083
diff changeset
    22
Note that the security of HTTPS URLs depends on proper configuration of
01c373762b76 doc: clarify that https cert verification requires web.cacerts
Mads Kiilerich <mads@kiilerich.com>
parents: 12083
diff changeset
    23
web.cacerts.
01c373762b76 doc: clarify that https cert verification requires web.cacerts
Mads Kiilerich <mads@kiilerich.com>
parents: 12083
diff changeset
    24
9540
cad36e496640 help: un-indent help topics
Martin Geisler <mg@lazybytes.net>
parents: 9539
diff changeset
    25
Some notes about using SSH with Mercurial:
9539
c904e76e3834 help: move help topics from mercurial/help.py to help/*.txt
Martin Geisler <mg@lazybytes.net>
parents:
diff changeset
    26
9540
cad36e496640 help: un-indent help topics
Martin Geisler <mg@lazybytes.net>
parents: 9539
diff changeset
    27
- SSH requires an accessible shell account on the destination machine
36365
5da7b8cb6f75 help: fix wording describing SSH requirements
Josef 'Jeff' Sipek <jeffpc@josefsipek.net>
parents: 19197
diff changeset
    28
  and a copy of hg in the remote path or specified with remotecmd.
9540
cad36e496640 help: un-indent help topics
Martin Geisler <mg@lazybytes.net>
parents: 9539
diff changeset
    29
- path is relative to the remote user's home directory by default. Use
cad36e496640 help: un-indent help topics
Martin Geisler <mg@lazybytes.net>
parents: 9539
diff changeset
    30
  an extra slash at the start of a path to specify an absolute path::
9539
c904e76e3834 help: move help topics from mercurial/help.py to help/*.txt
Martin Geisler <mg@lazybytes.net>
parents:
diff changeset
    31
9540
cad36e496640 help: un-indent help topics
Martin Geisler <mg@lazybytes.net>
parents: 9539
diff changeset
    32
    ssh://example.com//tmp/repository
9539
c904e76e3834 help: move help topics from mercurial/help.py to help/*.txt
Martin Geisler <mg@lazybytes.net>
parents:
diff changeset
    33
9540
cad36e496640 help: un-indent help topics
Martin Geisler <mg@lazybytes.net>
parents: 9539
diff changeset
    34
- Mercurial doesn't use its own compression via SSH; the right thing
cad36e496640 help: un-indent help topics
Martin Geisler <mg@lazybytes.net>
parents: 9539
diff changeset
    35
  to do is to configure it in your ~/.ssh/config, e.g.::
9539
c904e76e3834 help: move help topics from mercurial/help.py to help/*.txt
Martin Geisler <mg@lazybytes.net>
parents:
diff changeset
    36
9540
cad36e496640 help: un-indent help topics
Martin Geisler <mg@lazybytes.net>
parents: 9539
diff changeset
    37
    Host *.mylocalnetwork.example.com
cad36e496640 help: un-indent help topics
Martin Geisler <mg@lazybytes.net>
parents: 9539
diff changeset
    38
      Compression no
cad36e496640 help: un-indent help topics
Martin Geisler <mg@lazybytes.net>
parents: 9539
diff changeset
    39
    Host *
cad36e496640 help: un-indent help topics
Martin Geisler <mg@lazybytes.net>
parents: 9539
diff changeset
    40
      Compression yes
cad36e496640 help: un-indent help topics
Martin Geisler <mg@lazybytes.net>
parents: 9539
diff changeset
    41
12083
ebfc46929f3e help: refer to user configuration file more consistently
Brodie Rao <brodie@bitheap.org>
parents: 10973
diff changeset
    42
  Alternatively specify "ssh -C" as your ssh command in your
ebfc46929f3e help: refer to user configuration file more consistently
Brodie Rao <brodie@bitheap.org>
parents: 10973
diff changeset
    43
  configuration file or with the --ssh command line option.
9539
c904e76e3834 help: move help topics from mercurial/help.py to help/*.txt
Martin Geisler <mg@lazybytes.net>
parents:
diff changeset
    44
12083
ebfc46929f3e help: refer to user configuration file more consistently
Brodie Rao <brodie@bitheap.org>
parents: 10973
diff changeset
    45
These URLs can all be stored in your configuration file with path
ebfc46929f3e help: refer to user configuration file more consistently
Brodie Rao <brodie@bitheap.org>
parents: 10973
diff changeset
    46
aliases under the [paths] section like so::
9539
c904e76e3834 help: move help topics from mercurial/help.py to help/*.txt
Martin Geisler <mg@lazybytes.net>
parents:
diff changeset
    47
9540
cad36e496640 help: un-indent help topics
Martin Geisler <mg@lazybytes.net>
parents: 9539
diff changeset
    48
  [paths]
cad36e496640 help: un-indent help topics
Martin Geisler <mg@lazybytes.net>
parents: 9539
diff changeset
    49
  alias1 = URL1
cad36e496640 help: un-indent help topics
Martin Geisler <mg@lazybytes.net>
parents: 9539
diff changeset
    50
  alias2 = URL2
cad36e496640 help: un-indent help topics
Martin Geisler <mg@lazybytes.net>
parents: 9539
diff changeset
    51
  ...
9539
c904e76e3834 help: move help topics from mercurial/help.py to help/*.txt
Martin Geisler <mg@lazybytes.net>
parents:
diff changeset
    52
9540
cad36e496640 help: un-indent help topics
Martin Geisler <mg@lazybytes.net>
parents: 9539
diff changeset
    53
You can then use the alias for any command that uses a URL (for
10973
49a07f441496 Use hg role in help strings
Martin Geisler <mg@aragost.com>
parents: 9999
diff changeset
    54
example :hg:`pull alias1` will be treated as :hg:`pull URL1`).
9539
c904e76e3834 help: move help topics from mercurial/help.py to help/*.txt
Martin Geisler <mg@lazybytes.net>
parents:
diff changeset
    55
9540
cad36e496640 help: un-indent help topics
Martin Geisler <mg@lazybytes.net>
parents: 9539
diff changeset
    56
Two path aliases are special because they are used as defaults when
cad36e496640 help: un-indent help topics
Martin Geisler <mg@lazybytes.net>
parents: 9539
diff changeset
    57
you do not provide the URL to a command:
9539
c904e76e3834 help: move help topics from mercurial/help.py to help/*.txt
Martin Geisler <mg@lazybytes.net>
parents:
diff changeset
    58
9540
cad36e496640 help: un-indent help topics
Martin Geisler <mg@lazybytes.net>
parents: 9539
diff changeset
    59
default:
cad36e496640 help: un-indent help topics
Martin Geisler <mg@lazybytes.net>
parents: 9539
diff changeset
    60
  When you create a repository with hg clone, the clone command saves
cad36e496640 help: un-indent help topics
Martin Geisler <mg@lazybytes.net>
parents: 9539
diff changeset
    61
  the location of the source repository as the new repository's
cad36e496640 help: un-indent help topics
Martin Geisler <mg@lazybytes.net>
parents: 9539
diff changeset
    62
  'default' path. This is then used when you omit path from push- and
cad36e496640 help: un-indent help topics
Martin Geisler <mg@lazybytes.net>
parents: 9539
diff changeset
    63
  pull-like commands (including incoming and outgoing).
9539
c904e76e3834 help: move help topics from mercurial/help.py to help/*.txt
Martin Geisler <mg@lazybytes.net>
parents:
diff changeset
    64
9540
cad36e496640 help: un-indent help topics
Martin Geisler <mg@lazybytes.net>
parents: 9539
diff changeset
    65
default-push:
cad36e496640 help: un-indent help topics
Martin Geisler <mg@lazybytes.net>
parents: 9539
diff changeset
    66
  The push command will look for a path named 'default-push', and
cad36e496640 help: un-indent help topics
Martin Geisler <mg@lazybytes.net>
parents: 9539
diff changeset
    67
  prefer it over 'default' if both are defined.
46905
95a5ed7db9ca help: document the `path://` url scheme
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43632
diff changeset
    68
95a5ed7db9ca help: document the `path://` url scheme
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43632
diff changeset
    69
These alias can also be use in the `path://` scheme::
95a5ed7db9ca help: document the `path://` url scheme
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43632
diff changeset
    70
95a5ed7db9ca help: document the `path://` url scheme
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43632
diff changeset
    71
  [paths]
95a5ed7db9ca help: document the `path://` url scheme
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43632
diff changeset
    72
  alias1 = URL1
95a5ed7db9ca help: document the `path://` url scheme
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43632
diff changeset
    73
  alias2 = path://alias1
95a5ed7db9ca help: document the `path://` url scheme
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43632
diff changeset
    74
  ...
95a5ed7db9ca help: document the `path://` url scheme
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43632
diff changeset
    75
95a5ed7db9ca help: document the `path://` url scheme
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43632
diff changeset
    76
check :hg:`help config.paths` for details about the behavior of such "sub-path".