comparison mercurial/helptext/hgweb.txt @ 43632:2e017696181f

help: create packages for the help text These files need to be loaded as resources with PyOxidizer, instead of using filesystem representations. AFAICT, the resource loading mechanisms only work for the named package given to it, and can't reach into a subdirectory. While here, the `help` directory is renamed to `helptext`. Without this, trying to load external help text crashed in mercurial/help.py when importing `.i18n`, saying there's no `mercurial.help.i18n` module. Differential Revision: https://phab.mercurial-scm.org/D7376
author Matt Harbison <matt_harbison@yahoo.com>
date Wed, 13 Nov 2019 21:52:25 -0500
parents mercurial/help/hgweb.txt@1aee2ab0f902
children fe0daceb51d0
comparison
equal deleted inserted replaced
43631:d3c4368099ed 43632:2e017696181f
1 Mercurial's internal web server, hgweb, can serve either a single
2 repository, or a tree of repositories. In the second case, repository
3 paths and global options can be defined using a dedicated
4 configuration file common to :hg:`serve`, ``hgweb.wsgi``,
5 ``hgweb.cgi`` and ``hgweb.fcgi``.
6
7 This file uses the same syntax as other Mercurial configuration files
8 but recognizes only the following sections:
9
10 - web
11 - paths
12 - collections
13
14 The ``web`` options are thoroughly described in :hg:`help config`.
15
16 The ``paths`` section maps URL paths to paths of repositories in the
17 filesystem. hgweb will not expose the filesystem directly - only
18 Mercurial repositories can be published and only according to the
19 configuration.
20
21 The left hand side is the path in the URL. Note that hgweb reserves
22 subpaths like ``rev`` or ``file``, try using different names for
23 nested repositories to avoid confusing effects.
24
25 The right hand side is the path in the filesystem. If the specified
26 path ends with ``*`` or ``**`` the filesystem will be searched
27 recursively for repositories below that point.
28 With ``*`` it will not recurse into the repositories it finds (except for
29 ``.hg/patches``).
30 With ``**`` it will also search inside repository working directories
31 and possibly find subrepositories.
32
33 In this example::
34
35 [paths]
36 /projects/a = /srv/tmprepos/a
37 /projects/b = c:/repos/b
38 / = /srv/repos/*
39 /user/bob = /home/bob/repos/**
40
41 - The first two entries make two repositories in different directories
42 appear under the same directory in the web interface
43 - The third entry will publish every Mercurial repository found in
44 ``/srv/repos/``, for instance the repository ``/srv/repos/quux/``
45 will appear as ``http://server/quux/``
46 - The fourth entry will publish both ``http://server/user/bob/quux/``
47 and ``http://server/user/bob/quux/testsubrepo/``
48
49 The ``collections`` section is deprecated and has been superseded by
50 ``paths``.
51
52 URLs and Common Arguments
53 =========================
54
55 URLs under each repository have the form ``/{command}[/{arguments}]``
56 where ``{command}`` represents the name of a command or handler and
57 ``{arguments}`` represents any number of additional URL parameters
58 to that command.
59
60 The web server has a default style associated with it. Styles map to
61 a collection of named templates. Each template is used to render a
62 specific piece of data, such as a changeset or diff.
63
64 The style for the current request can be overwritten two ways. First,
65 if ``{command}`` contains a hyphen (``-``), the text before the hyphen
66 defines the style. For example, ``/atom-log`` will render the ``log``
67 command handler with the ``atom`` style. The second way to set the
68 style is with the ``style`` query string argument. For example,
69 ``/log?style=atom``. The hyphenated URL parameter is preferred.
70
71 Not all templates are available for all styles. Attempting to use
72 a style that doesn't have all templates defined may result in an error
73 rendering the page.
74
75 Many commands take a ``{revision}`` URL parameter. This defines the
76 changeset to operate on. This is commonly specified as the short,
77 12 digit hexadecimal abbreviation for the full 40 character unique
78 revision identifier. However, any value described by
79 :hg:`help revisions` typically works.
80
81 Commands and URLs
82 =================
83
84 The following web commands and their URLs are available:
85
86 .. webcommandsmarker