author | Lucas Moscovicz <lmoscovicz@fb.com> |
Wed, 26 Feb 2014 12:36:36 -0800 | |
changeset 20566 | 98024950ade0 |
parent 17424 | e7cfe3587ea4 |
child 24079 | afe03a616525 |
permissions | -rw-r--r-- |
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``. |