Mercurial > hg
annotate mercurial/helptext/hgweb.txt @ 52048:78fc666a3e94
rust-files: check for empty manifests caused by narrow
Explanations inline
author | Raphaël Gomès <rgomes@octobus.net> |
---|---|
date | Wed, 02 Oct 2024 13:39:43 +0200 |
parents | fe0daceb51d0 |
children | 51057ab0dffa |
rev | line source |
---|---|
10999
38182ed043b7
help: add some help for hgweb.config files
Matt Mackall <mpm@selenic.com>
parents:
diff
changeset
|
1 Mercurial's internal web server, hgweb, can serve either a single |
17104
5a9acb0b2086
help: improve hgweb help
Mads Kiilerich <mads@kiilerich.com>
parents:
13839
diff
changeset
|
2 repository, or a tree of repositories. In the second case, repository |
5a9acb0b2086
help: improve hgweb help
Mads Kiilerich <mads@kiilerich.com>
parents:
13839
diff
changeset
|
3 paths and global options can be defined using a dedicated |
5a9acb0b2086
help: improve hgweb help
Mads Kiilerich <mads@kiilerich.com>
parents:
13839
diff
changeset
|
4 configuration file common to :hg:`serve`, ``hgweb.wsgi``, |
5a9acb0b2086
help: improve hgweb help
Mads Kiilerich <mads@kiilerich.com>
parents:
13839
diff
changeset
|
5 ``hgweb.cgi`` and ``hgweb.fcgi``. |
10999
38182ed043b7
help: add some help for hgweb.config files
Matt Mackall <mpm@selenic.com>
parents:
diff
changeset
|
6 |
17104
5a9acb0b2086
help: improve hgweb help
Mads Kiilerich <mads@kiilerich.com>
parents:
13839
diff
changeset
|
7 This file uses the same syntax as other Mercurial configuration files |
5a9acb0b2086
help: improve hgweb help
Mads Kiilerich <mads@kiilerich.com>
parents:
13839
diff
changeset
|
8 but recognizes only the following sections: |
10999
38182ed043b7
help: add some help for hgweb.config files
Matt Mackall <mpm@selenic.com>
parents:
diff
changeset
|
9 |
38182ed043b7
help: add some help for hgweb.config files
Matt Mackall <mpm@selenic.com>
parents:
diff
changeset
|
10 - web |
38182ed043b7
help: add some help for hgweb.config files
Matt Mackall <mpm@selenic.com>
parents:
diff
changeset
|
11 - paths |
38182ed043b7
help: add some help for hgweb.config files
Matt Mackall <mpm@selenic.com>
parents:
diff
changeset
|
12 - collections |
38182ed043b7
help: add some help for hgweb.config files
Matt Mackall <mpm@selenic.com>
parents:
diff
changeset
|
13 |
17424
e7cfe3587ea4
fix trivial spelling errors
Mads Kiilerich <mads@kiilerich.com>
parents:
17333
diff
changeset
|
14 The ``web`` options are thoroughly described in :hg:`help config`. |
17104
5a9acb0b2086
help: improve hgweb help
Mads Kiilerich <mads@kiilerich.com>
parents:
13839
diff
changeset
|
15 |
5a9acb0b2086
help: improve hgweb help
Mads Kiilerich <mads@kiilerich.com>
parents:
13839
diff
changeset
|
16 The ``paths`` section maps URL paths to paths of repositories in the |
5a9acb0b2086
help: improve hgweb help
Mads Kiilerich <mads@kiilerich.com>
parents:
13839
diff
changeset
|
17 filesystem. hgweb will not expose the filesystem directly - only |
5a9acb0b2086
help: improve hgweb help
Mads Kiilerich <mads@kiilerich.com>
parents:
13839
diff
changeset
|
18 Mercurial repositories can be published and only according to the |
5a9acb0b2086
help: improve hgweb help
Mads Kiilerich <mads@kiilerich.com>
parents:
13839
diff
changeset
|
19 configuration. |
10999
38182ed043b7
help: add some help for hgweb.config files
Matt Mackall <mpm@selenic.com>
parents:
diff
changeset
|
20 |
17104
5a9acb0b2086
help: improve hgweb help
Mads Kiilerich <mads@kiilerich.com>
parents:
13839
diff
changeset
|
21 The left hand side is the path in the URL. Note that hgweb reserves |
5a9acb0b2086
help: improve hgweb help
Mads Kiilerich <mads@kiilerich.com>
parents:
13839
diff
changeset
|
22 subpaths like ``rev`` or ``file``, try using different names for |
5a9acb0b2086
help: improve hgweb help
Mads Kiilerich <mads@kiilerich.com>
parents:
13839
diff
changeset
|
23 nested repositories to avoid confusing effects. |
5a9acb0b2086
help: improve hgweb help
Mads Kiilerich <mads@kiilerich.com>
parents:
13839
diff
changeset
|
24 |
5a9acb0b2086
help: improve hgweb help
Mads Kiilerich <mads@kiilerich.com>
parents:
13839
diff
changeset
|
25 The right hand side is the path in the filesystem. If the specified |
5a9acb0b2086
help: improve hgweb help
Mads Kiilerich <mads@kiilerich.com>
parents:
13839
diff
changeset
|
26 path ends with ``*`` or ``**`` the filesystem will be searched |
5a9acb0b2086
help: improve hgweb help
Mads Kiilerich <mads@kiilerich.com>
parents:
13839
diff
changeset
|
27 recursively for repositories below that point. |
5a9acb0b2086
help: improve hgweb help
Mads Kiilerich <mads@kiilerich.com>
parents:
13839
diff
changeset
|
28 With ``*`` it will not recurse into the repositories it finds (except for |
5a9acb0b2086
help: improve hgweb help
Mads Kiilerich <mads@kiilerich.com>
parents:
13839
diff
changeset
|
29 ``.hg/patches``). |
5a9acb0b2086
help: improve hgweb help
Mads Kiilerich <mads@kiilerich.com>
parents:
13839
diff
changeset
|
30 With ``**`` it will also search inside repository working directories |
5a9acb0b2086
help: improve hgweb help
Mads Kiilerich <mads@kiilerich.com>
parents:
13839
diff
changeset
|
31 and possibly find subrepositories. |
5a9acb0b2086
help: improve hgweb help
Mads Kiilerich <mads@kiilerich.com>
parents:
13839
diff
changeset
|
32 |
5a9acb0b2086
help: improve hgweb help
Mads Kiilerich <mads@kiilerich.com>
parents:
13839
diff
changeset
|
33 In this example:: |
10999
38182ed043b7
help: add some help for hgweb.config files
Matt Mackall <mpm@selenic.com>
parents:
diff
changeset
|
34 |
38182ed043b7
help: add some help for hgweb.config files
Matt Mackall <mpm@selenic.com>
parents:
diff
changeset
|
35 [paths] |
17104
5a9acb0b2086
help: improve hgweb help
Mads Kiilerich <mads@kiilerich.com>
parents:
13839
diff
changeset
|
36 /projects/a = /srv/tmprepos/a |
5a9acb0b2086
help: improve hgweb help
Mads Kiilerich <mads@kiilerich.com>
parents:
13839
diff
changeset
|
37 /projects/b = c:/repos/b |
5a9acb0b2086
help: improve hgweb help
Mads Kiilerich <mads@kiilerich.com>
parents:
13839
diff
changeset
|
38 / = /srv/repos/* |
5a9acb0b2086
help: improve hgweb help
Mads Kiilerich <mads@kiilerich.com>
parents:
13839
diff
changeset
|
39 /user/bob = /home/bob/repos/** |
10999
38182ed043b7
help: add some help for hgweb.config files
Matt Mackall <mpm@selenic.com>
parents:
diff
changeset
|
40 |
38182ed043b7
help: add some help for hgweb.config files
Matt Mackall <mpm@selenic.com>
parents:
diff
changeset
|
41 - The first two entries make two repositories in different directories |
38182ed043b7
help: add some help for hgweb.config files
Matt Mackall <mpm@selenic.com>
parents:
diff
changeset
|
42 appear under the same directory in the web interface |
17104
5a9acb0b2086
help: improve hgweb help
Mads Kiilerich <mads@kiilerich.com>
parents:
13839
diff
changeset
|
43 - The third entry will publish every Mercurial repository found in |
5a9acb0b2086
help: improve hgweb help
Mads Kiilerich <mads@kiilerich.com>
parents:
13839
diff
changeset
|
44 ``/srv/repos/``, for instance the repository ``/srv/repos/quux/`` |
5a9acb0b2086
help: improve hgweb help
Mads Kiilerich <mads@kiilerich.com>
parents:
13839
diff
changeset
|
45 will appear as ``http://server/quux/`` |
5a9acb0b2086
help: improve hgweb help
Mads Kiilerich <mads@kiilerich.com>
parents:
13839
diff
changeset
|
46 - The fourth entry will publish both ``http://server/user/bob/quux/`` |
5a9acb0b2086
help: improve hgweb help
Mads Kiilerich <mads@kiilerich.com>
parents:
13839
diff
changeset
|
47 and ``http://server/user/bob/quux/testsubrepo/`` |
10999
38182ed043b7
help: add some help for hgweb.config files
Matt Mackall <mpm@selenic.com>
parents:
diff
changeset
|
48 |
17333
ba36e771f268
help/hgweb: fix spelling error
Javi Merino <cibervicho@gmail.com>
parents:
17104
diff
changeset
|
49 The ``collections`` section is deprecated and has been superseded by |
17104
5a9acb0b2086
help: improve hgweb help
Mads Kiilerich <mads@kiilerich.com>
parents:
13839
diff
changeset
|
50 ``paths``. |
24079
afe03a616525
help.hgweb: add a section describing URLs and common parameters
Gregory Szorc <gregory.szorc@gmail.com>
parents:
17424
diff
changeset
|
51 |
afe03a616525
help.hgweb: add a section describing URLs and common parameters
Gregory Szorc <gregory.szorc@gmail.com>
parents:
17424
diff
changeset
|
52 URLs and Common Arguments |
afe03a616525
help.hgweb: add a section describing URLs and common parameters
Gregory Szorc <gregory.szorc@gmail.com>
parents:
17424
diff
changeset
|
53 ========================= |
afe03a616525
help.hgweb: add a section describing URLs and common parameters
Gregory Szorc <gregory.szorc@gmail.com>
parents:
17424
diff
changeset
|
54 |
afe03a616525
help.hgweb: add a section describing URLs and common parameters
Gregory Szorc <gregory.szorc@gmail.com>
parents:
17424
diff
changeset
|
55 URLs under each repository have the form ``/{command}[/{arguments}]`` |
afe03a616525
help.hgweb: add a section describing URLs and common parameters
Gregory Szorc <gregory.szorc@gmail.com>
parents:
17424
diff
changeset
|
56 where ``{command}`` represents the name of a command or handler and |
afe03a616525
help.hgweb: add a section describing URLs and common parameters
Gregory Szorc <gregory.szorc@gmail.com>
parents:
17424
diff
changeset
|
57 ``{arguments}`` represents any number of additional URL parameters |
afe03a616525
help.hgweb: add a section describing URLs and common parameters
Gregory Szorc <gregory.szorc@gmail.com>
parents:
17424
diff
changeset
|
58 to that command. |
afe03a616525
help.hgweb: add a section describing URLs and common parameters
Gregory Szorc <gregory.szorc@gmail.com>
parents:
17424
diff
changeset
|
59 |
afe03a616525
help.hgweb: add a section describing URLs and common parameters
Gregory Szorc <gregory.szorc@gmail.com>
parents:
17424
diff
changeset
|
60 The web server has a default style associated with it. Styles map to |
afe03a616525
help.hgweb: add a section describing URLs and common parameters
Gregory Szorc <gregory.szorc@gmail.com>
parents:
17424
diff
changeset
|
61 a collection of named templates. Each template is used to render a |
afe03a616525
help.hgweb: add a section describing URLs and common parameters
Gregory Szorc <gregory.szorc@gmail.com>
parents:
17424
diff
changeset
|
62 specific piece of data, such as a changeset or diff. |
afe03a616525
help.hgweb: add a section describing URLs and common parameters
Gregory Szorc <gregory.szorc@gmail.com>
parents:
17424
diff
changeset
|
63 |
43886
fe0daceb51d0
hgweb: fix error in docstring
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
43632
diff
changeset
|
64 The style for the current request can be overridden two ways. First, |
24079
afe03a616525
help.hgweb: add a section describing URLs and common parameters
Gregory Szorc <gregory.szorc@gmail.com>
parents:
17424
diff
changeset
|
65 if ``{command}`` contains a hyphen (``-``), the text before the hyphen |
afe03a616525
help.hgweb: add a section describing URLs and common parameters
Gregory Szorc <gregory.szorc@gmail.com>
parents:
17424
diff
changeset
|
66 defines the style. For example, ``/atom-log`` will render the ``log`` |
afe03a616525
help.hgweb: add a section describing URLs and common parameters
Gregory Szorc <gregory.szorc@gmail.com>
parents:
17424
diff
changeset
|
67 command handler with the ``atom`` style. The second way to set the |
afe03a616525
help.hgweb: add a section describing URLs and common parameters
Gregory Szorc <gregory.szorc@gmail.com>
parents:
17424
diff
changeset
|
68 style is with the ``style`` query string argument. For example, |
afe03a616525
help.hgweb: add a section describing URLs and common parameters
Gregory Szorc <gregory.szorc@gmail.com>
parents:
17424
diff
changeset
|
69 ``/log?style=atom``. The hyphenated URL parameter is preferred. |
afe03a616525
help.hgweb: add a section describing URLs and common parameters
Gregory Szorc <gregory.szorc@gmail.com>
parents:
17424
diff
changeset
|
70 |
afe03a616525
help.hgweb: add a section describing URLs and common parameters
Gregory Szorc <gregory.szorc@gmail.com>
parents:
17424
diff
changeset
|
71 Not all templates are available for all styles. Attempting to use |
afe03a616525
help.hgweb: add a section describing URLs and common parameters
Gregory Szorc <gregory.szorc@gmail.com>
parents:
17424
diff
changeset
|
72 a style that doesn't have all templates defined may result in an error |
afe03a616525
help.hgweb: add a section describing URLs and common parameters
Gregory Szorc <gregory.szorc@gmail.com>
parents:
17424
diff
changeset
|
73 rendering the page. |
afe03a616525
help.hgweb: add a section describing URLs and common parameters
Gregory Szorc <gregory.szorc@gmail.com>
parents:
17424
diff
changeset
|
74 |
afe03a616525
help.hgweb: add a section describing URLs and common parameters
Gregory Szorc <gregory.szorc@gmail.com>
parents:
17424
diff
changeset
|
75 Many commands take a ``{revision}`` URL parameter. This defines the |
afe03a616525
help.hgweb: add a section describing URLs and common parameters
Gregory Szorc <gregory.szorc@gmail.com>
parents:
17424
diff
changeset
|
76 changeset to operate on. This is commonly specified as the short, |
26781
1aee2ab0f902
spelling: trivial spell checking
Mads Kiilerich <madski@unity3d.com>
parents:
24080
diff
changeset
|
77 12 digit hexadecimal abbreviation for the full 40 character unique |
24079
afe03a616525
help.hgweb: add a section describing URLs and common parameters
Gregory Szorc <gregory.szorc@gmail.com>
parents:
17424
diff
changeset
|
78 revision identifier. However, any value described by |
afe03a616525
help.hgweb: add a section describing URLs and common parameters
Gregory Szorc <gregory.szorc@gmail.com>
parents:
17424
diff
changeset
|
79 :hg:`help revisions` typically works. |
24080
a3f2ea1d4943
help: add web commands to help documentation
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24079
diff
changeset
|
80 |
a3f2ea1d4943
help: add web commands to help documentation
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24079
diff
changeset
|
81 Commands and URLs |
a3f2ea1d4943
help: add web commands to help documentation
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24079
diff
changeset
|
82 ================= |
a3f2ea1d4943
help: add web commands to help documentation
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24079
diff
changeset
|
83 |
a3f2ea1d4943
help: add web commands to help documentation
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24079
diff
changeset
|
84 The following web commands and their URLs are available: |
a3f2ea1d4943
help: add web commands to help documentation
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24079
diff
changeset
|
85 |
a3f2ea1d4943
help: add web commands to help documentation
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24079
diff
changeset
|
86 .. webcommandsmarker |