mercurial/help/hgweb.txt
author Matt Mackall <mpm@selenic.com>
Thu, 12 Jan 2012 14:39:02 -0600
changeset 15858 14132a55d66b
parent 13839 8d960240faac
child 17104 5a9acb0b2086
permissions -rw-r--r--
run-tests: use a list comprehension instead of map
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
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
38182ed043b7 help: add some help for hgweb.config files
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
     2
repository, or a collection of them. In the latter case, a special
38182ed043b7 help: add some help for hgweb.config files
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
     3
configuration file can be used to specify the repository paths to use
38182ed043b7 help: add some help for hgweb.config files
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
     4
and global web configuration options.
38182ed043b7 help: add some help for hgweb.config files
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
     5
13838
c5709dfa5c1e patchbomb, help/hgweb: do not refer to config files as hgrc files
Martin Geisler <mg@aragost.com>
parents: 10999
diff changeset
     6
This file uses the same syntax as other Mercurial configuration files,
c5709dfa5c1e patchbomb, help/hgweb: do not refer to config files as hgrc files
Martin Geisler <mg@aragost.com>
parents: 10999
diff changeset
     7
but only the following sections are recognized:
10999
38182ed043b7 help: add some help for hgweb.config files
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
     8
38182ed043b7 help: add some help for hgweb.config files
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
     9
  - web
38182ed043b7 help: add some help for hgweb.config files
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
    10
  - paths
38182ed043b7 help: add some help for hgweb.config files
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
    11
  - collections
38182ed043b7 help: add some help for hgweb.config files
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
    12
38182ed043b7 help: add some help for hgweb.config files
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
    13
The ``web`` section can specify all the settings described in the web
13839
8d960240faac help/hgweb: add pointer to hgrc(5) location
Martin Geisler <mg@aragost.com>
parents: 13838
diff changeset
    14
section of the hgrc(5) documentation. See :hg:`help config` for
8d960240faac help/hgweb: add pointer to hgrc(5) location
Martin Geisler <mg@aragost.com>
parents: 13838
diff changeset
    15
information on where to find the manual page.
10999
38182ed043b7 help: add some help for hgweb.config files
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
    16
38182ed043b7 help: add some help for hgweb.config files
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
    17
The ``paths`` section provides mappings of physical repository
38182ed043b7 help: add some help for hgweb.config files
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
    18
paths to virtual ones. For instance::
38182ed043b7 help: add some help for hgweb.config files
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
    19
38182ed043b7 help: add some help for hgweb.config files
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
    20
  [paths]
38182ed043b7 help: add some help for hgweb.config files
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
    21
  projects/a = /foo/bar
38182ed043b7 help: add some help for hgweb.config files
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
    22
  projects/b = /baz/quux
38182ed043b7 help: add some help for hgweb.config files
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
    23
  web/root = /real/root/*
38182ed043b7 help: add some help for hgweb.config files
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
    24
  / = /real/root2/*
38182ed043b7 help: add some help for hgweb.config files
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
    25
  virtual/root2 = /real/root2/**
38182ed043b7 help: add some help for hgweb.config files
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
    26
38182ed043b7 help: add some help for hgweb.config files
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
    27
- 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
    28
  appear under the same directory in the web interface
38182ed043b7 help: add some help for hgweb.config files
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
    29
- The third entry maps every Mercurial repository found in '/real/root'
38182ed043b7 help: add some help for hgweb.config files
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
    30
  into 'web/root'. This format is preferred over the [collections] one,
38182ed043b7 help: add some help for hgweb.config files
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
    31
  since using absolute paths as configuration keys is not supported on every
38182ed043b7 help: add some help for hgweb.config files
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
    32
  platform (especially on Windows).
38182ed043b7 help: add some help for hgweb.config files
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
    33
- The fourth entry is a special case mapping all repositories in
38182ed043b7 help: add some help for hgweb.config files
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
    34
  '/real/root2' in the root of the virtual directory.
38182ed043b7 help: add some help for hgweb.config files
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
    35
- The fifth entry recursively finds all repositories under the real
38182ed043b7 help: add some help for hgweb.config files
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
    36
  root, and maps their relative paths under the virtual root.
38182ed043b7 help: add some help for hgweb.config files
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
    37
38182ed043b7 help: add some help for hgweb.config files
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
    38
The ``collections`` section provides mappings of trees of physical
38182ed043b7 help: add some help for hgweb.config files
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
    39
repositories paths to virtual ones, though the paths syntax is generally
38182ed043b7 help: add some help for hgweb.config files
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
    40
preferred. For instance::
38182ed043b7 help: add some help for hgweb.config files
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
    41
38182ed043b7 help: add some help for hgweb.config files
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
    42
  [collections]
38182ed043b7 help: add some help for hgweb.config files
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
    43
  /foo = /foo
38182ed043b7 help: add some help for hgweb.config files
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
    44
38182ed043b7 help: add some help for hgweb.config files
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
    45
Here, the left side will be stripped off all repositories found in the
38182ed043b7 help: add some help for hgweb.config files
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
    46
right side. Thus ``/foo/bar`` and ``foo/quux/baz`` will be listed as
38182ed043b7 help: add some help for hgweb.config files
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
    47
``bar`` and ``quux/baz`` respectively.