Show More
@@ -1,84 +1,84 b'' | |||||
1 | Mercurial supports generating standalone "bundle" files that hold repository |
|
1 | Mercurial supports generating standalone "bundle" files that hold repository | |
2 | data. These "bundles" are typically saved locally and used later or exchanged |
|
2 | data. These "bundles" are typically saved locally and used later or exchanged | |
3 | between different repositories, possibly on different machines. Example |
|
3 | between different repositories, possibly on different machines. Example | |
4 | commands using bundles are :hg:`bundle` and :hg:`unbundle`. |
|
4 | commands using bundles are :hg:`bundle` and :hg:`unbundle`. | |
5 |
|
5 | |||
6 | Generation of bundle files is controlled by a "bundle specification" |
|
6 | Generation of bundle files is controlled by a "bundle specification" | |
7 | ("bundlespec") string. This string tells the bundle generation process how |
|
7 | ("bundlespec") string. This string tells the bundle generation process how | |
8 | to create the bundle. |
|
8 | to create the bundle. | |
9 |
|
9 | |||
10 | A "bundlespec" string is composed of the following elements: |
|
10 | A "bundlespec" string is composed of the following elements: | |
11 |
|
11 | |||
12 | type |
|
12 | type | |
13 | A string denoting the bundle format to use. |
|
13 | A string denoting the bundle format to use. | |
14 |
|
14 | |||
15 | compression |
|
15 | compression | |
16 | Denotes the compression engine to use compressing the raw bundle data. |
|
16 | Denotes the compression engine to use compressing the raw bundle data. | |
17 |
|
17 | |||
18 | parameters |
|
18 | parameters | |
19 | Arbitrary key-value parameters to further control bundle generation. |
|
19 | Arbitrary key-value parameters to further control bundle generation. | |
20 |
|
20 | |||
21 | A "bundlespec" string has the following formats: |
|
21 | A "bundlespec" string has the following formats: | |
22 |
|
22 | |||
23 | <type> |
|
23 | <type> | |
24 | The literal bundle format string is used. |
|
24 | The literal bundle format string is used. | |
25 |
|
25 | |||
26 | <compression>-<type> |
|
26 | <compression>-<type> | |
27 |
The compression engine and format are delimited by a hyp |
|
27 | The compression engine and format are delimited by a hyphen (``-``). | |
28 |
|
28 | |||
29 | Optional parameters follow the ``<type>``. Parameters are URI escaped |
|
29 | Optional parameters follow the ``<type>``. Parameters are URI escaped | |
30 | ``key=value`` pairs. Each pair is delimited by a semicolon (``;``). The |
|
30 | ``key=value`` pairs. Each pair is delimited by a semicolon (``;``). The | |
31 | first parameter begins after a ``;`` immediately following the ``<type>`` |
|
31 | first parameter begins after a ``;`` immediately following the ``<type>`` | |
32 | value. |
|
32 | value. | |
33 |
|
33 | |||
34 | Available Types |
|
34 | Available Types | |
35 | =============== |
|
35 | =============== | |
36 |
|
36 | |||
37 | The following bundle <type> strings are available: |
|
37 | The following bundle <type> strings are available: | |
38 |
|
38 | |||
39 | v1 |
|
39 | v1 | |
40 | Produces a legacy "changegroup" version 1 bundle. |
|
40 | Produces a legacy "changegroup" version 1 bundle. | |
41 |
|
41 | |||
42 | This format is compatible with nearly all Mercurial clients because it is |
|
42 | This format is compatible with nearly all Mercurial clients because it is | |
43 | the oldest. However, it has some limitations, which is why it is no longer |
|
43 | the oldest. However, it has some limitations, which is why it is no longer | |
44 | the default for new repositories. |
|
44 | the default for new repositories. | |
45 |
|
45 | |||
46 | ``v1`` bundles can be used with modern repositories using the "generaldelta" |
|
46 | ``v1`` bundles can be used with modern repositories using the "generaldelta" | |
47 | storage format. However, it may take longer to produce the bundle and the |
|
47 | storage format. However, it may take longer to produce the bundle and the | |
48 | resulting bundle may be significantly larger than a ``v2`` bundle. |
|
48 | resulting bundle may be significantly larger than a ``v2`` bundle. | |
49 |
|
49 | |||
50 | ``v1`` bundles can only use the ``gzip``, ``bzip2``, and ``none`` compression |
|
50 | ``v1`` bundles can only use the ``gzip``, ``bzip2``, and ``none`` compression | |
51 | formats. |
|
51 | formats. | |
52 |
|
52 | |||
53 | v2 |
|
53 | v2 | |
54 | Produces a version 2 bundle. |
|
54 | Produces a version 2 bundle. | |
55 |
|
55 | |||
56 | Version 2 bundles are an extensible format that can store additional |
|
56 | Version 2 bundles are an extensible format that can store additional | |
57 | repository data (such as bookmarks and phases information) and they can |
|
57 | repository data (such as bookmarks and phases information) and they can | |
58 | store data more efficiently, resulting in smaller bundles. |
|
58 | store data more efficiently, resulting in smaller bundles. | |
59 |
|
59 | |||
60 | Version 2 bundles can also use modern compression engines, such as |
|
60 | Version 2 bundles can also use modern compression engines, such as | |
61 | ``zstd``, making them faster to compress and often smaller. |
|
61 | ``zstd``, making them faster to compress and often smaller. | |
62 |
|
62 | |||
63 | Available Compression Engines |
|
63 | Available Compression Engines | |
64 | ============================= |
|
64 | ============================= | |
65 |
|
65 | |||
66 | The following bundle <compression> engines can be used: |
|
66 | The following bundle <compression> engines can be used: | |
67 |
|
67 | |||
68 | .. bundlecompressionmarker |
|
68 | .. bundlecompressionmarker | |
69 |
|
69 | |||
70 | Examples |
|
70 | Examples | |
71 | ======== |
|
71 | ======== | |
72 |
|
72 | |||
73 | ``v2`` |
|
73 | ``v2`` | |
74 | Produce a ``v2`` bundle using default options, including compression. |
|
74 | Produce a ``v2`` bundle using default options, including compression. | |
75 |
|
75 | |||
76 | ``none-v1`` |
|
76 | ``none-v1`` | |
77 | Produce a ``v2`` bundle with no compression. |
|
77 | Produce a ``v2`` bundle with no compression. | |
78 |
|
78 | |||
79 | ``zstd-v2`` |
|
79 | ``zstd-v2`` | |
80 | Produce a ``v2`` bundle with zstandard compression using default |
|
80 | Produce a ``v2`` bundle with zstandard compression using default | |
81 | settings. |
|
81 | settings. | |
82 |
|
82 | |||
83 | ``zstd-v1`` |
|
83 | ``zstd-v1`` | |
84 | This errors because ``zstd`` is not supported for ``v1`` types. |
|
84 | This errors because ``zstd`` is not supported for ``v1`` types. |
@@ -1,2410 +1,2410 b'' | |||||
1 | The Mercurial system uses a set of configuration files to control |
|
1 | The Mercurial system uses a set of configuration files to control | |
2 | aspects of its behavior. |
|
2 | aspects of its behavior. | |
3 |
|
3 | |||
4 | Troubleshooting |
|
4 | Troubleshooting | |
5 | =============== |
|
5 | =============== | |
6 |
|
6 | |||
7 | If you're having problems with your configuration, |
|
7 | If you're having problems with your configuration, | |
8 | :hg:`config --debug` can help you understand what is introducing |
|
8 | :hg:`config --debug` can help you understand what is introducing | |
9 | a setting into your environment. |
|
9 | a setting into your environment. | |
10 |
|
10 | |||
11 | See :hg:`help config.syntax` and :hg:`help config.files` |
|
11 | See :hg:`help config.syntax` and :hg:`help config.files` | |
12 | for information about how and where to override things. |
|
12 | for information about how and where to override things. | |
13 |
|
13 | |||
14 | Structure |
|
14 | Structure | |
15 | ========= |
|
15 | ========= | |
16 |
|
16 | |||
17 | The configuration files use a simple ini-file format. A configuration |
|
17 | The configuration files use a simple ini-file format. A configuration | |
18 | file consists of sections, led by a ``[section]`` header and followed |
|
18 | file consists of sections, led by a ``[section]`` header and followed | |
19 | by ``name = value`` entries:: |
|
19 | by ``name = value`` entries:: | |
20 |
|
20 | |||
21 | [ui] |
|
21 | [ui] | |
22 | username = Firstname Lastname <firstname.lastname@example.net> |
|
22 | username = Firstname Lastname <firstname.lastname@example.net> | |
23 | verbose = True |
|
23 | verbose = True | |
24 |
|
24 | |||
25 | The above entries will be referred to as ``ui.username`` and |
|
25 | The above entries will be referred to as ``ui.username`` and | |
26 | ``ui.verbose``, respectively. See :hg:`help config.syntax`. |
|
26 | ``ui.verbose``, respectively. See :hg:`help config.syntax`. | |
27 |
|
27 | |||
28 | Files |
|
28 | Files | |
29 | ===== |
|
29 | ===== | |
30 |
|
30 | |||
31 | Mercurial reads configuration data from several files, if they exist. |
|
31 | Mercurial reads configuration data from several files, if they exist. | |
32 | These files do not exist by default and you will have to create the |
|
32 | These files do not exist by default and you will have to create the | |
33 | appropriate configuration files yourself: |
|
33 | appropriate configuration files yourself: | |
34 |
|
34 | |||
35 | Local configuration is put into the per-repository ``<repo>/.hg/hgrc`` file. |
|
35 | Local configuration is put into the per-repository ``<repo>/.hg/hgrc`` file. | |
36 |
|
36 | |||
37 | Global configuration like the username setting is typically put into: |
|
37 | Global configuration like the username setting is typically put into: | |
38 |
|
38 | |||
39 | .. container:: windows |
|
39 | .. container:: windows | |
40 |
|
40 | |||
41 | - ``%USERPROFILE%\mercurial.ini`` (on Windows) |
|
41 | - ``%USERPROFILE%\mercurial.ini`` (on Windows) | |
42 |
|
42 | |||
43 | .. container:: unix.plan9 |
|
43 | .. container:: unix.plan9 | |
44 |
|
44 | |||
45 | - ``$HOME/.hgrc`` (on Unix, Plan9) |
|
45 | - ``$HOME/.hgrc`` (on Unix, Plan9) | |
46 |
|
46 | |||
47 | The names of these files depend on the system on which Mercurial is |
|
47 | The names of these files depend on the system on which Mercurial is | |
48 | installed. ``*.rc`` files from a single directory are read in |
|
48 | installed. ``*.rc`` files from a single directory are read in | |
49 | alphabetical order, later ones overriding earlier ones. Where multiple |
|
49 | alphabetical order, later ones overriding earlier ones. Where multiple | |
50 | paths are given below, settings from earlier paths override later |
|
50 | paths are given below, settings from earlier paths override later | |
51 | ones. |
|
51 | ones. | |
52 |
|
52 | |||
53 | .. container:: verbose.unix |
|
53 | .. container:: verbose.unix | |
54 |
|
54 | |||
55 | On Unix, the following files are consulted: |
|
55 | On Unix, the following files are consulted: | |
56 |
|
56 | |||
57 | - ``<repo>/.hg/hgrc`` (per-repository) |
|
57 | - ``<repo>/.hg/hgrc`` (per-repository) | |
58 | - ``$HOME/.hgrc`` (per-user) |
|
58 | - ``$HOME/.hgrc`` (per-user) | |
59 | - ``${XDG_CONFIG_HOME:-$HOME/.config}/hg/hgrc`` (per-user) |
|
59 | - ``${XDG_CONFIG_HOME:-$HOME/.config}/hg/hgrc`` (per-user) | |
60 | - ``<install-root>/etc/mercurial/hgrc`` (per-installation) |
|
60 | - ``<install-root>/etc/mercurial/hgrc`` (per-installation) | |
61 | - ``<install-root>/etc/mercurial/hgrc.d/*.rc`` (per-installation) |
|
61 | - ``<install-root>/etc/mercurial/hgrc.d/*.rc`` (per-installation) | |
62 | - ``/etc/mercurial/hgrc`` (per-system) |
|
62 | - ``/etc/mercurial/hgrc`` (per-system) | |
63 | - ``/etc/mercurial/hgrc.d/*.rc`` (per-system) |
|
63 | - ``/etc/mercurial/hgrc.d/*.rc`` (per-system) | |
64 | - ``<internal>/default.d/*.rc`` (defaults) |
|
64 | - ``<internal>/default.d/*.rc`` (defaults) | |
65 |
|
65 | |||
66 | .. container:: verbose.windows |
|
66 | .. container:: verbose.windows | |
67 |
|
67 | |||
68 | On Windows, the following files are consulted: |
|
68 | On Windows, the following files are consulted: | |
69 |
|
69 | |||
70 | - ``<repo>/.hg/hgrc`` (per-repository) |
|
70 | - ``<repo>/.hg/hgrc`` (per-repository) | |
71 | - ``%USERPROFILE%\.hgrc`` (per-user) |
|
71 | - ``%USERPROFILE%\.hgrc`` (per-user) | |
72 | - ``%USERPROFILE%\Mercurial.ini`` (per-user) |
|
72 | - ``%USERPROFILE%\Mercurial.ini`` (per-user) | |
73 | - ``%HOME%\.hgrc`` (per-user) |
|
73 | - ``%HOME%\.hgrc`` (per-user) | |
74 | - ``%HOME%\Mercurial.ini`` (per-user) |
|
74 | - ``%HOME%\Mercurial.ini`` (per-user) | |
75 | - ``HKEY_LOCAL_MACHINE\SOFTWARE\Mercurial`` (per-installation) |
|
75 | - ``HKEY_LOCAL_MACHINE\SOFTWARE\Mercurial`` (per-installation) | |
76 | - ``<install-dir>\hgrc.d\*.rc`` (per-installation) |
|
76 | - ``<install-dir>\hgrc.d\*.rc`` (per-installation) | |
77 | - ``<install-dir>\Mercurial.ini`` (per-installation) |
|
77 | - ``<install-dir>\Mercurial.ini`` (per-installation) | |
78 | - ``<internal>/default.d/*.rc`` (defaults) |
|
78 | - ``<internal>/default.d/*.rc`` (defaults) | |
79 |
|
79 | |||
80 | .. note:: |
|
80 | .. note:: | |
81 |
|
81 | |||
82 | The registry key ``HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Mercurial`` |
|
82 | The registry key ``HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Mercurial`` | |
83 | is used when running 32-bit Python on 64-bit Windows. |
|
83 | is used when running 32-bit Python on 64-bit Windows. | |
84 |
|
84 | |||
85 | .. container:: windows |
|
85 | .. container:: windows | |
86 |
|
86 | |||
87 | On Windows 9x, ``%HOME%`` is replaced by ``%APPDATA%``. |
|
87 | On Windows 9x, ``%HOME%`` is replaced by ``%APPDATA%``. | |
88 |
|
88 | |||
89 | .. container:: verbose.plan9 |
|
89 | .. container:: verbose.plan9 | |
90 |
|
90 | |||
91 | On Plan9, the following files are consulted: |
|
91 | On Plan9, the following files are consulted: | |
92 |
|
92 | |||
93 | - ``<repo>/.hg/hgrc`` (per-repository) |
|
93 | - ``<repo>/.hg/hgrc`` (per-repository) | |
94 | - ``$home/lib/hgrc`` (per-user) |
|
94 | - ``$home/lib/hgrc`` (per-user) | |
95 | - ``<install-root>/lib/mercurial/hgrc`` (per-installation) |
|
95 | - ``<install-root>/lib/mercurial/hgrc`` (per-installation) | |
96 | - ``<install-root>/lib/mercurial/hgrc.d/*.rc`` (per-installation) |
|
96 | - ``<install-root>/lib/mercurial/hgrc.d/*.rc`` (per-installation) | |
97 | - ``/lib/mercurial/hgrc`` (per-system) |
|
97 | - ``/lib/mercurial/hgrc`` (per-system) | |
98 | - ``/lib/mercurial/hgrc.d/*.rc`` (per-system) |
|
98 | - ``/lib/mercurial/hgrc.d/*.rc`` (per-system) | |
99 | - ``<internal>/default.d/*.rc`` (defaults) |
|
99 | - ``<internal>/default.d/*.rc`` (defaults) | |
100 |
|
100 | |||
101 | Per-repository configuration options only apply in a |
|
101 | Per-repository configuration options only apply in a | |
102 | particular repository. This file is not version-controlled, and |
|
102 | particular repository. This file is not version-controlled, and | |
103 | will not get transferred during a "clone" operation. Options in |
|
103 | will not get transferred during a "clone" operation. Options in | |
104 | this file override options in all other configuration files. |
|
104 | this file override options in all other configuration files. | |
105 |
|
105 | |||
106 | .. container:: unix.plan9 |
|
106 | .. container:: unix.plan9 | |
107 |
|
107 | |||
108 | On Plan 9 and Unix, most of this file will be ignored if it doesn't |
|
108 | On Plan 9 and Unix, most of this file will be ignored if it doesn't | |
109 | belong to a trusted user or to a trusted group. See |
|
109 | belong to a trusted user or to a trusted group. See | |
110 | :hg:`help config.trusted` for more details. |
|
110 | :hg:`help config.trusted` for more details. | |
111 |
|
111 | |||
112 | Per-user configuration file(s) are for the user running Mercurial. Options |
|
112 | Per-user configuration file(s) are for the user running Mercurial. Options | |
113 | in these files apply to all Mercurial commands executed by this user in any |
|
113 | in these files apply to all Mercurial commands executed by this user in any | |
114 | directory. Options in these files override per-system and per-installation |
|
114 | directory. Options in these files override per-system and per-installation | |
115 | options. |
|
115 | options. | |
116 |
|
116 | |||
117 | Per-installation configuration files are searched for in the |
|
117 | Per-installation configuration files are searched for in the | |
118 | directory where Mercurial is installed. ``<install-root>`` is the |
|
118 | directory where Mercurial is installed. ``<install-root>`` is the | |
119 | parent directory of the **hg** executable (or symlink) being run. |
|
119 | parent directory of the **hg** executable (or symlink) being run. | |
120 |
|
120 | |||
121 | .. container:: unix.plan9 |
|
121 | .. container:: unix.plan9 | |
122 |
|
122 | |||
123 | For example, if installed in ``/shared/tools/bin/hg``, Mercurial |
|
123 | For example, if installed in ``/shared/tools/bin/hg``, Mercurial | |
124 | will look in ``/shared/tools/etc/mercurial/hgrc``. Options in these |
|
124 | will look in ``/shared/tools/etc/mercurial/hgrc``. Options in these | |
125 | files apply to all Mercurial commands executed by any user in any |
|
125 | files apply to all Mercurial commands executed by any user in any | |
126 | directory. |
|
126 | directory. | |
127 |
|
127 | |||
128 | Per-installation configuration files are for the system on |
|
128 | Per-installation configuration files are for the system on | |
129 | which Mercurial is running. Options in these files apply to all |
|
129 | which Mercurial is running. Options in these files apply to all | |
130 | Mercurial commands executed by any user in any directory. Registry |
|
130 | Mercurial commands executed by any user in any directory. Registry | |
131 | keys contain PATH-like strings, every part of which must reference |
|
131 | keys contain PATH-like strings, every part of which must reference | |
132 | a ``Mercurial.ini`` file or be a directory where ``*.rc`` files will |
|
132 | a ``Mercurial.ini`` file or be a directory where ``*.rc`` files will | |
133 | be read. Mercurial checks each of these locations in the specified |
|
133 | be read. Mercurial checks each of these locations in the specified | |
134 | order until one or more configuration files are detected. |
|
134 | order until one or more configuration files are detected. | |
135 |
|
135 | |||
136 | Per-system configuration files are for the system on which Mercurial |
|
136 | Per-system configuration files are for the system on which Mercurial | |
137 | is running. Options in these files apply to all Mercurial commands |
|
137 | is running. Options in these files apply to all Mercurial commands | |
138 | executed by any user in any directory. Options in these files |
|
138 | executed by any user in any directory. Options in these files | |
139 | override per-installation options. |
|
139 | override per-installation options. | |
140 |
|
140 | |||
141 | Mercurial comes with some default configuration. The default configuration |
|
141 | Mercurial comes with some default configuration. The default configuration | |
142 | files are installed with Mercurial and will be overwritten on upgrades. Default |
|
142 | files are installed with Mercurial and will be overwritten on upgrades. Default | |
143 | configuration files should never be edited by users or administrators but can |
|
143 | configuration files should never be edited by users or administrators but can | |
144 | be overridden in other configuration files. So far the directory only contains |
|
144 | be overridden in other configuration files. So far the directory only contains | |
145 | merge tool configuration but packagers can also put other default configuration |
|
145 | merge tool configuration but packagers can also put other default configuration | |
146 | there. |
|
146 | there. | |
147 |
|
147 | |||
148 | Syntax |
|
148 | Syntax | |
149 | ====== |
|
149 | ====== | |
150 |
|
150 | |||
151 | A configuration file consists of sections, led by a ``[section]`` header |
|
151 | A configuration file consists of sections, led by a ``[section]`` header | |
152 | and followed by ``name = value`` entries (sometimes called |
|
152 | and followed by ``name = value`` entries (sometimes called | |
153 | ``configuration keys``):: |
|
153 | ``configuration keys``):: | |
154 |
|
154 | |||
155 | [spam] |
|
155 | [spam] | |
156 | eggs=ham |
|
156 | eggs=ham | |
157 | green= |
|
157 | green= | |
158 | eggs |
|
158 | eggs | |
159 |
|
159 | |||
160 | Each line contains one entry. If the lines that follow are indented, |
|
160 | Each line contains one entry. If the lines that follow are indented, | |
161 | they are treated as continuations of that entry. Leading whitespace is |
|
161 | they are treated as continuations of that entry. Leading whitespace is | |
162 | removed from values. Empty lines are skipped. Lines beginning with |
|
162 | removed from values. Empty lines are skipped. Lines beginning with | |
163 | ``#`` or ``;`` are ignored and may be used to provide comments. |
|
163 | ``#`` or ``;`` are ignored and may be used to provide comments. | |
164 |
|
164 | |||
165 | Configuration keys can be set multiple times, in which case Mercurial |
|
165 | Configuration keys can be set multiple times, in which case Mercurial | |
166 | will use the value that was configured last. As an example:: |
|
166 | will use the value that was configured last. As an example:: | |
167 |
|
167 | |||
168 | [spam] |
|
168 | [spam] | |
169 | eggs=large |
|
169 | eggs=large | |
170 | ham=serrano |
|
170 | ham=serrano | |
171 | eggs=small |
|
171 | eggs=small | |
172 |
|
172 | |||
173 | This would set the configuration key named ``eggs`` to ``small``. |
|
173 | This would set the configuration key named ``eggs`` to ``small``. | |
174 |
|
174 | |||
175 | It is also possible to define a section multiple times. A section can |
|
175 | It is also possible to define a section multiple times. A section can | |
176 | be redefined on the same and/or on different configuration files. For |
|
176 | be redefined on the same and/or on different configuration files. For | |
177 | example:: |
|
177 | example:: | |
178 |
|
178 | |||
179 | [foo] |
|
179 | [foo] | |
180 | eggs=large |
|
180 | eggs=large | |
181 | ham=serrano |
|
181 | ham=serrano | |
182 | eggs=small |
|
182 | eggs=small | |
183 |
|
183 | |||
184 | [bar] |
|
184 | [bar] | |
185 | eggs=ham |
|
185 | eggs=ham | |
186 | green= |
|
186 | green= | |
187 | eggs |
|
187 | eggs | |
188 |
|
188 | |||
189 | [foo] |
|
189 | [foo] | |
190 | ham=prosciutto |
|
190 | ham=prosciutto | |
191 | eggs=medium |
|
191 | eggs=medium | |
192 | bread=toasted |
|
192 | bread=toasted | |
193 |
|
193 | |||
194 | This would set the ``eggs``, ``ham``, and ``bread`` configuration keys |
|
194 | This would set the ``eggs``, ``ham``, and ``bread`` configuration keys | |
195 | of the ``foo`` section to ``medium``, ``prosciutto``, and ``toasted``, |
|
195 | of the ``foo`` section to ``medium``, ``prosciutto``, and ``toasted``, | |
196 | respectively. As you can see there only thing that matters is the last |
|
196 | respectively. As you can see there only thing that matters is the last | |
197 | value that was set for each of the configuration keys. |
|
197 | value that was set for each of the configuration keys. | |
198 |
|
198 | |||
199 | If a configuration key is set multiple times in different |
|
199 | If a configuration key is set multiple times in different | |
200 | configuration files the final value will depend on the order in which |
|
200 | configuration files the final value will depend on the order in which | |
201 | the different configuration files are read, with settings from earlier |
|
201 | the different configuration files are read, with settings from earlier | |
202 | paths overriding later ones as described on the ``Files`` section |
|
202 | paths overriding later ones as described on the ``Files`` section | |
203 | above. |
|
203 | above. | |
204 |
|
204 | |||
205 | A line of the form ``%include file`` will include ``file`` into the |
|
205 | A line of the form ``%include file`` will include ``file`` into the | |
206 | current configuration file. The inclusion is recursive, which means |
|
206 | current configuration file. The inclusion is recursive, which means | |
207 | that included files can include other files. Filenames are relative to |
|
207 | that included files can include other files. Filenames are relative to | |
208 | the configuration file in which the ``%include`` directive is found. |
|
208 | the configuration file in which the ``%include`` directive is found. | |
209 | Environment variables and ``~user`` constructs are expanded in |
|
209 | Environment variables and ``~user`` constructs are expanded in | |
210 | ``file``. This lets you do something like:: |
|
210 | ``file``. This lets you do something like:: | |
211 |
|
211 | |||
212 | %include ~/.hgrc.d/$HOST.rc |
|
212 | %include ~/.hgrc.d/$HOST.rc | |
213 |
|
213 | |||
214 | to include a different configuration file on each computer you use. |
|
214 | to include a different configuration file on each computer you use. | |
215 |
|
215 | |||
216 | A line with ``%unset name`` will remove ``name`` from the current |
|
216 | A line with ``%unset name`` will remove ``name`` from the current | |
217 | section, if it has been set previously. |
|
217 | section, if it has been set previously. | |
218 |
|
218 | |||
219 | The values are either free-form text strings, lists of text strings, |
|
219 | The values are either free-form text strings, lists of text strings, | |
220 | or Boolean values. Boolean values can be set to true using any of "1", |
|
220 | or Boolean values. Boolean values can be set to true using any of "1", | |
221 | "yes", "true", or "on" and to false using "0", "no", "false", or "off" |
|
221 | "yes", "true", or "on" and to false using "0", "no", "false", or "off" | |
222 | (all case insensitive). |
|
222 | (all case insensitive). | |
223 |
|
223 | |||
224 | List values are separated by whitespace or comma, except when values are |
|
224 | List values are separated by whitespace or comma, except when values are | |
225 | placed in double quotation marks:: |
|
225 | placed in double quotation marks:: | |
226 |
|
226 | |||
227 | allow_read = "John Doe, PhD", brian, betty |
|
227 | allow_read = "John Doe, PhD", brian, betty | |
228 |
|
228 | |||
229 | Quotation marks can be escaped by prefixing them with a backslash. Only |
|
229 | Quotation marks can be escaped by prefixing them with a backslash. Only | |
230 | quotation marks at the beginning of a word is counted as a quotation |
|
230 | quotation marks at the beginning of a word is counted as a quotation | |
231 | (e.g., ``foo"bar baz`` is the list of ``foo"bar`` and ``baz``). |
|
231 | (e.g., ``foo"bar baz`` is the list of ``foo"bar`` and ``baz``). | |
232 |
|
232 | |||
233 | Sections |
|
233 | Sections | |
234 | ======== |
|
234 | ======== | |
235 |
|
235 | |||
236 | This section describes the different sections that may appear in a |
|
236 | This section describes the different sections that may appear in a | |
237 | Mercurial configuration file, the purpose of each section, its possible |
|
237 | Mercurial configuration file, the purpose of each section, its possible | |
238 | keys, and their possible values. |
|
238 | keys, and their possible values. | |
239 |
|
239 | |||
240 | ``alias`` |
|
240 | ``alias`` | |
241 | --------- |
|
241 | --------- | |
242 |
|
242 | |||
243 | Defines command aliases. |
|
243 | Defines command aliases. | |
244 |
|
244 | |||
245 | Aliases allow you to define your own commands in terms of other |
|
245 | Aliases allow you to define your own commands in terms of other | |
246 | commands (or aliases), optionally including arguments. Positional |
|
246 | commands (or aliases), optionally including arguments. Positional | |
247 | arguments in the form of ``$1``, ``$2``, etc. in the alias definition |
|
247 | arguments in the form of ``$1``, ``$2``, etc. in the alias definition | |
248 | are expanded by Mercurial before execution. Positional arguments not |
|
248 | are expanded by Mercurial before execution. Positional arguments not | |
249 | already used by ``$N`` in the definition are put at the end of the |
|
249 | already used by ``$N`` in the definition are put at the end of the | |
250 | command to be executed. |
|
250 | command to be executed. | |
251 |
|
251 | |||
252 | Alias definitions consist of lines of the form:: |
|
252 | Alias definitions consist of lines of the form:: | |
253 |
|
253 | |||
254 | <alias> = <command> [<argument>]... |
|
254 | <alias> = <command> [<argument>]... | |
255 |
|
255 | |||
256 | For example, this definition:: |
|
256 | For example, this definition:: | |
257 |
|
257 | |||
258 | latest = log --limit 5 |
|
258 | latest = log --limit 5 | |
259 |
|
259 | |||
260 | creates a new command ``latest`` that shows only the five most recent |
|
260 | creates a new command ``latest`` that shows only the five most recent | |
261 | changesets. You can define subsequent aliases using earlier ones:: |
|
261 | changesets. You can define subsequent aliases using earlier ones:: | |
262 |
|
262 | |||
263 | stable5 = latest -b stable |
|
263 | stable5 = latest -b stable | |
264 |
|
264 | |||
265 | .. note:: |
|
265 | .. note:: | |
266 |
|
266 | |||
267 | It is possible to create aliases with the same names as |
|
267 | It is possible to create aliases with the same names as | |
268 | existing commands, which will then override the original |
|
268 | existing commands, which will then override the original | |
269 | definitions. This is almost always a bad idea! |
|
269 | definitions. This is almost always a bad idea! | |
270 |
|
270 | |||
271 | An alias can start with an exclamation point (``!``) to make it a |
|
271 | An alias can start with an exclamation point (``!``) to make it a | |
272 | shell alias. A shell alias is executed with the shell and will let you |
|
272 | shell alias. A shell alias is executed with the shell and will let you | |
273 | run arbitrary commands. As an example, :: |
|
273 | run arbitrary commands. As an example, :: | |
274 |
|
274 | |||
275 | echo = !echo $@ |
|
275 | echo = !echo $@ | |
276 |
|
276 | |||
277 | will let you do ``hg echo foo`` to have ``foo`` printed in your |
|
277 | will let you do ``hg echo foo`` to have ``foo`` printed in your | |
278 | terminal. A better example might be:: |
|
278 | terminal. A better example might be:: | |
279 |
|
279 | |||
280 | purge = !$HG status --no-status --unknown -0 re: | xargs -0 rm -f |
|
280 | purge = !$HG status --no-status --unknown -0 re: | xargs -0 rm -f | |
281 |
|
281 | |||
282 | which will make ``hg purge`` delete all unknown files in the |
|
282 | which will make ``hg purge`` delete all unknown files in the | |
283 | repository in the same manner as the purge extension. |
|
283 | repository in the same manner as the purge extension. | |
284 |
|
284 | |||
285 | Positional arguments like ``$1``, ``$2``, etc. in the alias definition |
|
285 | Positional arguments like ``$1``, ``$2``, etc. in the alias definition | |
286 | expand to the command arguments. Unmatched arguments are |
|
286 | expand to the command arguments. Unmatched arguments are | |
287 | removed. ``$0`` expands to the alias name and ``$@`` expands to all |
|
287 | removed. ``$0`` expands to the alias name and ``$@`` expands to all | |
288 | arguments separated by a space. ``"$@"`` (with quotes) expands to all |
|
288 | arguments separated by a space. ``"$@"`` (with quotes) expands to all | |
289 | arguments quoted individually and separated by a space. These expansions |
|
289 | arguments quoted individually and separated by a space. These expansions | |
290 | happen before the command is passed to the shell. |
|
290 | happen before the command is passed to the shell. | |
291 |
|
291 | |||
292 | Shell aliases are executed in an environment where ``$HG`` expands to |
|
292 | Shell aliases are executed in an environment where ``$HG`` expands to | |
293 | the path of the Mercurial that was used to execute the alias. This is |
|
293 | the path of the Mercurial that was used to execute the alias. This is | |
294 | useful when you want to call further Mercurial commands in a shell |
|
294 | useful when you want to call further Mercurial commands in a shell | |
295 | alias, as was done above for the purge alias. In addition, |
|
295 | alias, as was done above for the purge alias. In addition, | |
296 | ``$HG_ARGS`` expands to the arguments given to Mercurial. In the ``hg |
|
296 | ``$HG_ARGS`` expands to the arguments given to Mercurial. In the ``hg | |
297 | echo foo`` call above, ``$HG_ARGS`` would expand to ``echo foo``. |
|
297 | echo foo`` call above, ``$HG_ARGS`` would expand to ``echo foo``. | |
298 |
|
298 | |||
299 | .. note:: |
|
299 | .. note:: | |
300 |
|
300 | |||
301 | Some global configuration options such as ``-R`` are |
|
301 | Some global configuration options such as ``-R`` are | |
302 | processed before shell aliases and will thus not be passed to |
|
302 | processed before shell aliases and will thus not be passed to | |
303 | aliases. |
|
303 | aliases. | |
304 |
|
304 | |||
305 |
|
305 | |||
306 | ``annotate`` |
|
306 | ``annotate`` | |
307 | ------------ |
|
307 | ------------ | |
308 |
|
308 | |||
309 | Settings used when displaying file annotations. All values are |
|
309 | Settings used when displaying file annotations. All values are | |
310 | Booleans and default to False. See :hg:`help config.diff` for |
|
310 | Booleans and default to False. See :hg:`help config.diff` for | |
311 | related options for the diff command. |
|
311 | related options for the diff command. | |
312 |
|
312 | |||
313 | ``ignorews`` |
|
313 | ``ignorews`` | |
314 | Ignore white space when comparing lines. |
|
314 | Ignore white space when comparing lines. | |
315 |
|
315 | |||
316 | ``ignorewsamount`` |
|
316 | ``ignorewsamount`` | |
317 | Ignore changes in the amount of white space. |
|
317 | Ignore changes in the amount of white space. | |
318 |
|
318 | |||
319 | ``ignoreblanklines`` |
|
319 | ``ignoreblanklines`` | |
320 | Ignore changes whose lines are all blank. |
|
320 | Ignore changes whose lines are all blank. | |
321 |
|
321 | |||
322 |
|
322 | |||
323 | ``auth`` |
|
323 | ``auth`` | |
324 | -------- |
|
324 | -------- | |
325 |
|
325 | |||
326 | Authentication credentials and other authentication-like configuration |
|
326 | Authentication credentials and other authentication-like configuration | |
327 | for HTTP connections. This section allows you to store usernames and |
|
327 | for HTTP connections. This section allows you to store usernames and | |
328 | passwords for use when logging *into* HTTP servers. See |
|
328 | passwords for use when logging *into* HTTP servers. See | |
329 | :hg:`help config.web` if you want to configure *who* can login to |
|
329 | :hg:`help config.web` if you want to configure *who* can login to | |
330 | your HTTP server. |
|
330 | your HTTP server. | |
331 |
|
331 | |||
332 | The following options apply to all hosts. |
|
332 | The following options apply to all hosts. | |
333 |
|
333 | |||
334 | ``cookiefile`` |
|
334 | ``cookiefile`` | |
335 | Path to a file containing HTTP cookie lines. Cookies matching a |
|
335 | Path to a file containing HTTP cookie lines. Cookies matching a | |
336 | host will be sent automatically. |
|
336 | host will be sent automatically. | |
337 |
|
337 | |||
338 | The file format uses the Mozilla cookies.txt format, which defines cookies |
|
338 | The file format uses the Mozilla cookies.txt format, which defines cookies | |
339 | on their own lines. Each line contains 7 fields delimited by the tab |
|
339 | on their own lines. Each line contains 7 fields delimited by the tab | |
340 | character (domain, is_domain_cookie, path, is_secure, expires, name, |
|
340 | character (domain, is_domain_cookie, path, is_secure, expires, name, | |
341 | value). For more info, do an Internet search for "Netscape cookies.txt |
|
341 | value). For more info, do an Internet search for "Netscape cookies.txt | |
342 | format." |
|
342 | format." | |
343 |
|
343 | |||
344 | Note: the cookies parser does not handle port numbers on domains. You |
|
344 | Note: the cookies parser does not handle port numbers on domains. You | |
345 | will need to remove ports from the domain for the cookie to be recognized. |
|
345 | will need to remove ports from the domain for the cookie to be recognized. | |
346 | This could result in a cookie being disclosed to an unwanted server. |
|
346 | This could result in a cookie being disclosed to an unwanted server. | |
347 |
|
347 | |||
348 | The cookies file is read-only. |
|
348 | The cookies file is read-only. | |
349 |
|
349 | |||
350 | Other options in this section are grouped by name and have the following |
|
350 | Other options in this section are grouped by name and have the following | |
351 | format:: |
|
351 | format:: | |
352 |
|
352 | |||
353 | <name>.<argument> = <value> |
|
353 | <name>.<argument> = <value> | |
354 |
|
354 | |||
355 | where ``<name>`` is used to group arguments into authentication |
|
355 | where ``<name>`` is used to group arguments into authentication | |
356 | entries. Example:: |
|
356 | entries. Example:: | |
357 |
|
357 | |||
358 | foo.prefix = hg.intevation.de/mercurial |
|
358 | foo.prefix = hg.intevation.de/mercurial | |
359 | foo.username = foo |
|
359 | foo.username = foo | |
360 | foo.password = bar |
|
360 | foo.password = bar | |
361 | foo.schemes = http https |
|
361 | foo.schemes = http https | |
362 |
|
362 | |||
363 | bar.prefix = secure.example.org |
|
363 | bar.prefix = secure.example.org | |
364 | bar.key = path/to/file.key |
|
364 | bar.key = path/to/file.key | |
365 | bar.cert = path/to/file.cert |
|
365 | bar.cert = path/to/file.cert | |
366 | bar.schemes = https |
|
366 | bar.schemes = https | |
367 |
|
367 | |||
368 | Supported arguments: |
|
368 | Supported arguments: | |
369 |
|
369 | |||
370 | ``prefix`` |
|
370 | ``prefix`` | |
371 | Either ``*`` or a URI prefix with or without the scheme part. |
|
371 | Either ``*`` or a URI prefix with or without the scheme part. | |
372 | The authentication entry with the longest matching prefix is used |
|
372 | The authentication entry with the longest matching prefix is used | |
373 | (where ``*`` matches everything and counts as a match of length |
|
373 | (where ``*`` matches everything and counts as a match of length | |
374 | 1). If the prefix doesn't include a scheme, the match is performed |
|
374 | 1). If the prefix doesn't include a scheme, the match is performed | |
375 | against the URI with its scheme stripped as well, and the schemes |
|
375 | against the URI with its scheme stripped as well, and the schemes | |
376 | argument, q.v., is then subsequently consulted. |
|
376 | argument, q.v., is then subsequently consulted. | |
377 |
|
377 | |||
378 | ``username`` |
|
378 | ``username`` | |
379 | Optional. Username to authenticate with. If not given, and the |
|
379 | Optional. Username to authenticate with. If not given, and the | |
380 | remote site requires basic or digest authentication, the user will |
|
380 | remote site requires basic or digest authentication, the user will | |
381 | be prompted for it. Environment variables are expanded in the |
|
381 | be prompted for it. Environment variables are expanded in the | |
382 | username letting you do ``foo.username = $USER``. If the URI |
|
382 | username letting you do ``foo.username = $USER``. If the URI | |
383 | includes a username, only ``[auth]`` entries with a matching |
|
383 | includes a username, only ``[auth]`` entries with a matching | |
384 | username or without a username will be considered. |
|
384 | username or without a username will be considered. | |
385 |
|
385 | |||
386 | ``password`` |
|
386 | ``password`` | |
387 | Optional. Password to authenticate with. If not given, and the |
|
387 | Optional. Password to authenticate with. If not given, and the | |
388 | remote site requires basic or digest authentication, the user |
|
388 | remote site requires basic or digest authentication, the user | |
389 | will be prompted for it. |
|
389 | will be prompted for it. | |
390 |
|
390 | |||
391 | ``key`` |
|
391 | ``key`` | |
392 | Optional. PEM encoded client certificate key file. Environment |
|
392 | Optional. PEM encoded client certificate key file. Environment | |
393 | variables are expanded in the filename. |
|
393 | variables are expanded in the filename. | |
394 |
|
394 | |||
395 | ``cert`` |
|
395 | ``cert`` | |
396 | Optional. PEM encoded client certificate chain file. Environment |
|
396 | Optional. PEM encoded client certificate chain file. Environment | |
397 | variables are expanded in the filename. |
|
397 | variables are expanded in the filename. | |
398 |
|
398 | |||
399 | ``schemes`` |
|
399 | ``schemes`` | |
400 | Optional. Space separated list of URI schemes to use this |
|
400 | Optional. Space separated list of URI schemes to use this | |
401 | authentication entry with. Only used if the prefix doesn't include |
|
401 | authentication entry with. Only used if the prefix doesn't include | |
402 | a scheme. Supported schemes are http and https. They will match |
|
402 | a scheme. Supported schemes are http and https. They will match | |
403 | static-http and static-https respectively, as well. |
|
403 | static-http and static-https respectively, as well. | |
404 | (default: https) |
|
404 | (default: https) | |
405 |
|
405 | |||
406 | If no suitable authentication entry is found, the user is prompted |
|
406 | If no suitable authentication entry is found, the user is prompted | |
407 | for credentials as usual if required by the remote. |
|
407 | for credentials as usual if required by the remote. | |
408 |
|
408 | |||
409 | ``color`` |
|
409 | ``color`` | |
410 | --------- |
|
410 | --------- | |
411 |
|
411 | |||
412 | Configure the Mercurial color mode. For details about how to define your custom |
|
412 | Configure the Mercurial color mode. For details about how to define your custom | |
413 | effect and style see :hg:`help color`. |
|
413 | effect and style see :hg:`help color`. | |
414 |
|
414 | |||
415 | ``mode`` |
|
415 | ``mode`` | |
416 | String: control the method used to output color. One of ``auto``, ``ansi``, |
|
416 | String: control the method used to output color. One of ``auto``, ``ansi``, | |
417 | ``win32``, ``terminfo`` or ``debug``. In auto mode, Mercurial will |
|
417 | ``win32``, ``terminfo`` or ``debug``. In auto mode, Mercurial will | |
418 | use ANSI mode by default (or win32 mode on Windows) if it detects a |
|
418 | use ANSI mode by default (or win32 mode on Windows) if it detects a | |
419 | terminal. Any invalid value will disable color. |
|
419 | terminal. Any invalid value will disable color. | |
420 |
|
420 | |||
421 | ``pagermode`` |
|
421 | ``pagermode`` | |
422 | String: optinal override of ``color.mode`` used with pager. |
|
422 | String: optional override of ``color.mode`` used with pager. | |
423 |
|
423 | |||
424 | On some systems, terminfo mode may cause problems when using |
|
424 | On some systems, terminfo mode may cause problems when using | |
425 | color with ``less -R`` as a pager program. less with the -R option |
|
425 | color with ``less -R`` as a pager program. less with the -R option | |
426 | will only display ECMA-48 color codes, and terminfo mode may sometimes |
|
426 | will only display ECMA-48 color codes, and terminfo mode may sometimes | |
427 | emit codes that less doesn't understand. You can work around this by |
|
427 | emit codes that less doesn't understand. You can work around this by | |
428 | either using ansi mode (or auto mode), or by using less -r (which will |
|
428 | either using ansi mode (or auto mode), or by using less -r (which will | |
429 | pass through all terminal control codes, not just color control |
|
429 | pass through all terminal control codes, not just color control | |
430 | codes). |
|
430 | codes). | |
431 |
|
431 | |||
432 | On some systems (such as MSYS in Windows), the terminal may support |
|
432 | On some systems (such as MSYS in Windows), the terminal may support | |
433 | a different color mode than the pager program. |
|
433 | a different color mode than the pager program. | |
434 |
|
434 | |||
435 | ``commands`` |
|
435 | ``commands`` | |
436 | ------------ |
|
436 | ------------ | |
437 |
|
437 | |||
438 | ``status.relative`` |
|
438 | ``status.relative`` | |
439 | Make paths in :hg:`status` output relative to the current directory. |
|
439 | Make paths in :hg:`status` output relative to the current directory. | |
440 | (default: False) |
|
440 | (default: False) | |
441 |
|
441 | |||
442 | ``update.requiredest`` |
|
442 | ``update.requiredest`` | |
443 | Require that the user pass a destination when running :hg:`update`. |
|
443 | Require that the user pass a destination when running :hg:`update`. | |
444 | For example, :hg:`update .::` will be allowed, but a plain :hg:`update` |
|
444 | For example, :hg:`update .::` will be allowed, but a plain :hg:`update` | |
445 | will be disallowed. |
|
445 | will be disallowed. | |
446 | (default: False) |
|
446 | (default: False) | |
447 |
|
447 | |||
448 | ``committemplate`` |
|
448 | ``committemplate`` | |
449 | ------------------ |
|
449 | ------------------ | |
450 |
|
450 | |||
451 | ``changeset`` |
|
451 | ``changeset`` | |
452 | String: configuration in this section is used as the template to |
|
452 | String: configuration in this section is used as the template to | |
453 | customize the text shown in the editor when committing. |
|
453 | customize the text shown in the editor when committing. | |
454 |
|
454 | |||
455 | In addition to pre-defined template keywords, commit log specific one |
|
455 | In addition to pre-defined template keywords, commit log specific one | |
456 | below can be used for customization: |
|
456 | below can be used for customization: | |
457 |
|
457 | |||
458 | ``extramsg`` |
|
458 | ``extramsg`` | |
459 | String: Extra message (typically 'Leave message empty to abort |
|
459 | String: Extra message (typically 'Leave message empty to abort | |
460 | commit.'). This may be changed by some commands or extensions. |
|
460 | commit.'). This may be changed by some commands or extensions. | |
461 |
|
461 | |||
462 | For example, the template configuration below shows as same text as |
|
462 | For example, the template configuration below shows as same text as | |
463 | one shown by default:: |
|
463 | one shown by default:: | |
464 |
|
464 | |||
465 | [committemplate] |
|
465 | [committemplate] | |
466 | changeset = {desc}\n\n |
|
466 | changeset = {desc}\n\n | |
467 | HG: Enter commit message. Lines beginning with 'HG:' are removed. |
|
467 | HG: Enter commit message. Lines beginning with 'HG:' are removed. | |
468 | HG: {extramsg} |
|
468 | HG: {extramsg} | |
469 | HG: -- |
|
469 | HG: -- | |
470 | HG: user: {author}\n{ifeq(p2rev, "-1", "", |
|
470 | HG: user: {author}\n{ifeq(p2rev, "-1", "", | |
471 | "HG: branch merge\n") |
|
471 | "HG: branch merge\n") | |
472 | }HG: branch '{branch}'\n{if(activebookmark, |
|
472 | }HG: branch '{branch}'\n{if(activebookmark, | |
473 | "HG: bookmark '{activebookmark}'\n") }{subrepos % |
|
473 | "HG: bookmark '{activebookmark}'\n") }{subrepos % | |
474 | "HG: subrepo {subrepo}\n" }{file_adds % |
|
474 | "HG: subrepo {subrepo}\n" }{file_adds % | |
475 | "HG: added {file}\n" }{file_mods % |
|
475 | "HG: added {file}\n" }{file_mods % | |
476 | "HG: changed {file}\n" }{file_dels % |
|
476 | "HG: changed {file}\n" }{file_dels % | |
477 | "HG: removed {file}\n" }{if(files, "", |
|
477 | "HG: removed {file}\n" }{if(files, "", | |
478 | "HG: no files changed\n")} |
|
478 | "HG: no files changed\n")} | |
479 |
|
479 | |||
480 | ``diff()`` |
|
480 | ``diff()`` | |
481 | String: show the diff (see :hg:`help templates` for detail) |
|
481 | String: show the diff (see :hg:`help templates` for detail) | |
482 |
|
482 | |||
483 | Sometimes it is helpful to show the diff of the changeset in the editor without |
|
483 | Sometimes it is helpful to show the diff of the changeset in the editor without | |
484 | having to prefix 'HG: ' to each line so that highlighting works correctly. For |
|
484 | having to prefix 'HG: ' to each line so that highlighting works correctly. For | |
485 | this, Mercurial provides a special string which will ignore everything below |
|
485 | this, Mercurial provides a special string which will ignore everything below | |
486 | it:: |
|
486 | it:: | |
487 |
|
487 | |||
488 | HG: ------------------------ >8 ------------------------ |
|
488 | HG: ------------------------ >8 ------------------------ | |
489 |
|
489 | |||
490 | For example, the template configuration below will show the diff below the |
|
490 | For example, the template configuration below will show the diff below the | |
491 | extra message:: |
|
491 | extra message:: | |
492 |
|
492 | |||
493 | [committemplate] |
|
493 | [committemplate] | |
494 | changeset = {desc}\n\n |
|
494 | changeset = {desc}\n\n | |
495 | HG: Enter commit message. Lines beginning with 'HG:' are removed. |
|
495 | HG: Enter commit message. Lines beginning with 'HG:' are removed. | |
496 | HG: {extramsg} |
|
496 | HG: {extramsg} | |
497 | HG: ------------------------ >8 ------------------------ |
|
497 | HG: ------------------------ >8 ------------------------ | |
498 | HG: Do not touch the line above. |
|
498 | HG: Do not touch the line above. | |
499 | HG: Everything below will be removed. |
|
499 | HG: Everything below will be removed. | |
500 | {diff()} |
|
500 | {diff()} | |
501 |
|
501 | |||
502 | .. note:: |
|
502 | .. note:: | |
503 |
|
503 | |||
504 | For some problematic encodings (see :hg:`help win32mbcs` for |
|
504 | For some problematic encodings (see :hg:`help win32mbcs` for | |
505 | detail), this customization should be configured carefully, to |
|
505 | detail), this customization should be configured carefully, to | |
506 | avoid showing broken characters. |
|
506 | avoid showing broken characters. | |
507 |
|
507 | |||
508 | For example, if a multibyte character ending with backslash (0x5c) is |
|
508 | For example, if a multibyte character ending with backslash (0x5c) is | |
509 | followed by the ASCII character 'n' in the customized template, |
|
509 | followed by the ASCII character 'n' in the customized template, | |
510 | the sequence of backslash and 'n' is treated as line-feed unexpectedly |
|
510 | the sequence of backslash and 'n' is treated as line-feed unexpectedly | |
511 | (and the multibyte character is broken, too). |
|
511 | (and the multibyte character is broken, too). | |
512 |
|
512 | |||
513 | Customized template is used for commands below (``--edit`` may be |
|
513 | Customized template is used for commands below (``--edit`` may be | |
514 | required): |
|
514 | required): | |
515 |
|
515 | |||
516 | - :hg:`backout` |
|
516 | - :hg:`backout` | |
517 | - :hg:`commit` |
|
517 | - :hg:`commit` | |
518 | - :hg:`fetch` (for merge commit only) |
|
518 | - :hg:`fetch` (for merge commit only) | |
519 | - :hg:`graft` |
|
519 | - :hg:`graft` | |
520 | - :hg:`histedit` |
|
520 | - :hg:`histedit` | |
521 | - :hg:`import` |
|
521 | - :hg:`import` | |
522 | - :hg:`qfold`, :hg:`qnew` and :hg:`qrefresh` |
|
522 | - :hg:`qfold`, :hg:`qnew` and :hg:`qrefresh` | |
523 | - :hg:`rebase` |
|
523 | - :hg:`rebase` | |
524 | - :hg:`shelve` |
|
524 | - :hg:`shelve` | |
525 | - :hg:`sign` |
|
525 | - :hg:`sign` | |
526 | - :hg:`tag` |
|
526 | - :hg:`tag` | |
527 | - :hg:`transplant` |
|
527 | - :hg:`transplant` | |
528 |
|
528 | |||
529 | Configuring items below instead of ``changeset`` allows showing |
|
529 | Configuring items below instead of ``changeset`` allows showing | |
530 | customized message only for specific actions, or showing different |
|
530 | customized message only for specific actions, or showing different | |
531 | messages for each action. |
|
531 | messages for each action. | |
532 |
|
532 | |||
533 | - ``changeset.backout`` for :hg:`backout` |
|
533 | - ``changeset.backout`` for :hg:`backout` | |
534 | - ``changeset.commit.amend.merge`` for :hg:`commit --amend` on merges |
|
534 | - ``changeset.commit.amend.merge`` for :hg:`commit --amend` on merges | |
535 | - ``changeset.commit.amend.normal`` for :hg:`commit --amend` on other |
|
535 | - ``changeset.commit.amend.normal`` for :hg:`commit --amend` on other | |
536 | - ``changeset.commit.normal.merge`` for :hg:`commit` on merges |
|
536 | - ``changeset.commit.normal.merge`` for :hg:`commit` on merges | |
537 | - ``changeset.commit.normal.normal`` for :hg:`commit` on other |
|
537 | - ``changeset.commit.normal.normal`` for :hg:`commit` on other | |
538 | - ``changeset.fetch`` for :hg:`fetch` (impling merge commit) |
|
538 | - ``changeset.fetch`` for :hg:`fetch` (impling merge commit) | |
539 | - ``changeset.gpg.sign`` for :hg:`sign` |
|
539 | - ``changeset.gpg.sign`` for :hg:`sign` | |
540 | - ``changeset.graft`` for :hg:`graft` |
|
540 | - ``changeset.graft`` for :hg:`graft` | |
541 | - ``changeset.histedit.edit`` for ``edit`` of :hg:`histedit` |
|
541 | - ``changeset.histedit.edit`` for ``edit`` of :hg:`histedit` | |
542 | - ``changeset.histedit.fold`` for ``fold`` of :hg:`histedit` |
|
542 | - ``changeset.histedit.fold`` for ``fold`` of :hg:`histedit` | |
543 | - ``changeset.histedit.mess`` for ``mess`` of :hg:`histedit` |
|
543 | - ``changeset.histedit.mess`` for ``mess`` of :hg:`histedit` | |
544 | - ``changeset.histedit.pick`` for ``pick`` of :hg:`histedit` |
|
544 | - ``changeset.histedit.pick`` for ``pick`` of :hg:`histedit` | |
545 | - ``changeset.import.bypass`` for :hg:`import --bypass` |
|
545 | - ``changeset.import.bypass`` for :hg:`import --bypass` | |
546 | - ``changeset.import.normal.merge`` for :hg:`import` on merges |
|
546 | - ``changeset.import.normal.merge`` for :hg:`import` on merges | |
547 | - ``changeset.import.normal.normal`` for :hg:`import` on other |
|
547 | - ``changeset.import.normal.normal`` for :hg:`import` on other | |
548 | - ``changeset.mq.qnew`` for :hg:`qnew` |
|
548 | - ``changeset.mq.qnew`` for :hg:`qnew` | |
549 | - ``changeset.mq.qfold`` for :hg:`qfold` |
|
549 | - ``changeset.mq.qfold`` for :hg:`qfold` | |
550 | - ``changeset.mq.qrefresh`` for :hg:`qrefresh` |
|
550 | - ``changeset.mq.qrefresh`` for :hg:`qrefresh` | |
551 | - ``changeset.rebase.collapse`` for :hg:`rebase --collapse` |
|
551 | - ``changeset.rebase.collapse`` for :hg:`rebase --collapse` | |
552 | - ``changeset.rebase.merge`` for :hg:`rebase` on merges |
|
552 | - ``changeset.rebase.merge`` for :hg:`rebase` on merges | |
553 | - ``changeset.rebase.normal`` for :hg:`rebase` on other |
|
553 | - ``changeset.rebase.normal`` for :hg:`rebase` on other | |
554 | - ``changeset.shelve.shelve`` for :hg:`shelve` |
|
554 | - ``changeset.shelve.shelve`` for :hg:`shelve` | |
555 | - ``changeset.tag.add`` for :hg:`tag` without ``--remove`` |
|
555 | - ``changeset.tag.add`` for :hg:`tag` without ``--remove`` | |
556 | - ``changeset.tag.remove`` for :hg:`tag --remove` |
|
556 | - ``changeset.tag.remove`` for :hg:`tag --remove` | |
557 | - ``changeset.transplant.merge`` for :hg:`transplant` on merges |
|
557 | - ``changeset.transplant.merge`` for :hg:`transplant` on merges | |
558 | - ``changeset.transplant.normal`` for :hg:`transplant` on other |
|
558 | - ``changeset.transplant.normal`` for :hg:`transplant` on other | |
559 |
|
559 | |||
560 | These dot-separated lists of names are treated as hierarchical ones. |
|
560 | These dot-separated lists of names are treated as hierarchical ones. | |
561 | For example, ``changeset.tag.remove`` customizes the commit message |
|
561 | For example, ``changeset.tag.remove`` customizes the commit message | |
562 | only for :hg:`tag --remove`, but ``changeset.tag`` customizes the |
|
562 | only for :hg:`tag --remove`, but ``changeset.tag`` customizes the | |
563 | commit message for :hg:`tag` regardless of ``--remove`` option. |
|
563 | commit message for :hg:`tag` regardless of ``--remove`` option. | |
564 |
|
564 | |||
565 | When the external editor is invoked for a commit, the corresponding |
|
565 | When the external editor is invoked for a commit, the corresponding | |
566 | dot-separated list of names without the ``changeset.`` prefix |
|
566 | dot-separated list of names without the ``changeset.`` prefix | |
567 | (e.g. ``commit.normal.normal``) is in the ``HGEDITFORM`` environment |
|
567 | (e.g. ``commit.normal.normal``) is in the ``HGEDITFORM`` environment | |
568 | variable. |
|
568 | variable. | |
569 |
|
569 | |||
570 | In this section, items other than ``changeset`` can be referred from |
|
570 | In this section, items other than ``changeset`` can be referred from | |
571 | others. For example, the configuration to list committed files up |
|
571 | others. For example, the configuration to list committed files up | |
572 | below can be referred as ``{listupfiles}``:: |
|
572 | below can be referred as ``{listupfiles}``:: | |
573 |
|
573 | |||
574 | [committemplate] |
|
574 | [committemplate] | |
575 | listupfiles = {file_adds % |
|
575 | listupfiles = {file_adds % | |
576 | "HG: added {file}\n" }{file_mods % |
|
576 | "HG: added {file}\n" }{file_mods % | |
577 | "HG: changed {file}\n" }{file_dels % |
|
577 | "HG: changed {file}\n" }{file_dels % | |
578 | "HG: removed {file}\n" }{if(files, "", |
|
578 | "HG: removed {file}\n" }{if(files, "", | |
579 | "HG: no files changed\n")} |
|
579 | "HG: no files changed\n")} | |
580 |
|
580 | |||
581 | ``decode/encode`` |
|
581 | ``decode/encode`` | |
582 | ----------------- |
|
582 | ----------------- | |
583 |
|
583 | |||
584 | Filters for transforming files on checkout/checkin. This would |
|
584 | Filters for transforming files on checkout/checkin. This would | |
585 | typically be used for newline processing or other |
|
585 | typically be used for newline processing or other | |
586 | localization/canonicalization of files. |
|
586 | localization/canonicalization of files. | |
587 |
|
587 | |||
588 | Filters consist of a filter pattern followed by a filter command. |
|
588 | Filters consist of a filter pattern followed by a filter command. | |
589 | Filter patterns are globs by default, rooted at the repository root. |
|
589 | Filter patterns are globs by default, rooted at the repository root. | |
590 | For example, to match any file ending in ``.txt`` in the root |
|
590 | For example, to match any file ending in ``.txt`` in the root | |
591 | directory only, use the pattern ``*.txt``. To match any file ending |
|
591 | directory only, use the pattern ``*.txt``. To match any file ending | |
592 | in ``.c`` anywhere in the repository, use the pattern ``**.c``. |
|
592 | in ``.c`` anywhere in the repository, use the pattern ``**.c``. | |
593 | For each file only the first matching filter applies. |
|
593 | For each file only the first matching filter applies. | |
594 |
|
594 | |||
595 | The filter command can start with a specifier, either ``pipe:`` or |
|
595 | The filter command can start with a specifier, either ``pipe:`` or | |
596 | ``tempfile:``. If no specifier is given, ``pipe:`` is used by default. |
|
596 | ``tempfile:``. If no specifier is given, ``pipe:`` is used by default. | |
597 |
|
597 | |||
598 | A ``pipe:`` command must accept data on stdin and return the transformed |
|
598 | A ``pipe:`` command must accept data on stdin and return the transformed | |
599 | data on stdout. |
|
599 | data on stdout. | |
600 |
|
600 | |||
601 | Pipe example:: |
|
601 | Pipe example:: | |
602 |
|
602 | |||
603 | [encode] |
|
603 | [encode] | |
604 | # uncompress gzip files on checkin to improve delta compression |
|
604 | # uncompress gzip files on checkin to improve delta compression | |
605 | # note: not necessarily a good idea, just an example |
|
605 | # note: not necessarily a good idea, just an example | |
606 | *.gz = pipe: gunzip |
|
606 | *.gz = pipe: gunzip | |
607 |
|
607 | |||
608 | [decode] |
|
608 | [decode] | |
609 | # recompress gzip files when writing them to the working dir (we |
|
609 | # recompress gzip files when writing them to the working dir (we | |
610 | # can safely omit "pipe:", because it's the default) |
|
610 | # can safely omit "pipe:", because it's the default) | |
611 | *.gz = gzip |
|
611 | *.gz = gzip | |
612 |
|
612 | |||
613 | A ``tempfile:`` command is a template. The string ``INFILE`` is replaced |
|
613 | A ``tempfile:`` command is a template. The string ``INFILE`` is replaced | |
614 | with the name of a temporary file that contains the data to be |
|
614 | with the name of a temporary file that contains the data to be | |
615 | filtered by the command. The string ``OUTFILE`` is replaced with the name |
|
615 | filtered by the command. The string ``OUTFILE`` is replaced with the name | |
616 | of an empty temporary file, where the filtered data must be written by |
|
616 | of an empty temporary file, where the filtered data must be written by | |
617 | the command. |
|
617 | the command. | |
618 |
|
618 | |||
619 | .. container:: windows |
|
619 | .. container:: windows | |
620 |
|
620 | |||
621 | .. note:: |
|
621 | .. note:: | |
622 |
|
622 | |||
623 | The tempfile mechanism is recommended for Windows systems, |
|
623 | The tempfile mechanism is recommended for Windows systems, | |
624 | where the standard shell I/O redirection operators often have |
|
624 | where the standard shell I/O redirection operators often have | |
625 | strange effects and may corrupt the contents of your files. |
|
625 | strange effects and may corrupt the contents of your files. | |
626 |
|
626 | |||
627 | This filter mechanism is used internally by the ``eol`` extension to |
|
627 | This filter mechanism is used internally by the ``eol`` extension to | |
628 | translate line ending characters between Windows (CRLF) and Unix (LF) |
|
628 | translate line ending characters between Windows (CRLF) and Unix (LF) | |
629 | format. We suggest you use the ``eol`` extension for convenience. |
|
629 | format. We suggest you use the ``eol`` extension for convenience. | |
630 |
|
630 | |||
631 |
|
631 | |||
632 | ``defaults`` |
|
632 | ``defaults`` | |
633 | ------------ |
|
633 | ------------ | |
634 |
|
634 | |||
635 | (defaults are deprecated. Don't use them. Use aliases instead.) |
|
635 | (defaults are deprecated. Don't use them. Use aliases instead.) | |
636 |
|
636 | |||
637 | Use the ``[defaults]`` section to define command defaults, i.e. the |
|
637 | Use the ``[defaults]`` section to define command defaults, i.e. the | |
638 | default options/arguments to pass to the specified commands. |
|
638 | default options/arguments to pass to the specified commands. | |
639 |
|
639 | |||
640 | The following example makes :hg:`log` run in verbose mode, and |
|
640 | The following example makes :hg:`log` run in verbose mode, and | |
641 | :hg:`status` show only the modified files, by default:: |
|
641 | :hg:`status` show only the modified files, by default:: | |
642 |
|
642 | |||
643 | [defaults] |
|
643 | [defaults] | |
644 | log = -v |
|
644 | log = -v | |
645 | status = -m |
|
645 | status = -m | |
646 |
|
646 | |||
647 | The actual commands, instead of their aliases, must be used when |
|
647 | The actual commands, instead of their aliases, must be used when | |
648 | defining command defaults. The command defaults will also be applied |
|
648 | defining command defaults. The command defaults will also be applied | |
649 | to the aliases of the commands defined. |
|
649 | to the aliases of the commands defined. | |
650 |
|
650 | |||
651 |
|
651 | |||
652 | ``diff`` |
|
652 | ``diff`` | |
653 | -------- |
|
653 | -------- | |
654 |
|
654 | |||
655 | Settings used when displaying diffs. Everything except for ``unified`` |
|
655 | Settings used when displaying diffs. Everything except for ``unified`` | |
656 | is a Boolean and defaults to False. See :hg:`help config.annotate` |
|
656 | is a Boolean and defaults to False. See :hg:`help config.annotate` | |
657 | for related options for the annotate command. |
|
657 | for related options for the annotate command. | |
658 |
|
658 | |||
659 | ``git`` |
|
659 | ``git`` | |
660 | Use git extended diff format. |
|
660 | Use git extended diff format. | |
661 |
|
661 | |||
662 | ``nobinary`` |
|
662 | ``nobinary`` | |
663 | Omit git binary patches. |
|
663 | Omit git binary patches. | |
664 |
|
664 | |||
665 | ``nodates`` |
|
665 | ``nodates`` | |
666 | Don't include dates in diff headers. |
|
666 | Don't include dates in diff headers. | |
667 |
|
667 | |||
668 | ``noprefix`` |
|
668 | ``noprefix`` | |
669 | Omit 'a/' and 'b/' prefixes from filenames. Ignored in plain mode. |
|
669 | Omit 'a/' and 'b/' prefixes from filenames. Ignored in plain mode. | |
670 |
|
670 | |||
671 | ``showfunc`` |
|
671 | ``showfunc`` | |
672 | Show which function each change is in. |
|
672 | Show which function each change is in. | |
673 |
|
673 | |||
674 | ``ignorews`` |
|
674 | ``ignorews`` | |
675 | Ignore white space when comparing lines. |
|
675 | Ignore white space when comparing lines. | |
676 |
|
676 | |||
677 | ``ignorewsamount`` |
|
677 | ``ignorewsamount`` | |
678 | Ignore changes in the amount of white space. |
|
678 | Ignore changes in the amount of white space. | |
679 |
|
679 | |||
680 | ``ignoreblanklines`` |
|
680 | ``ignoreblanklines`` | |
681 | Ignore changes whose lines are all blank. |
|
681 | Ignore changes whose lines are all blank. | |
682 |
|
682 | |||
683 | ``unified`` |
|
683 | ``unified`` | |
684 | Number of lines of context to show. |
|
684 | Number of lines of context to show. | |
685 |
|
685 | |||
686 | ``email`` |
|
686 | ``email`` | |
687 | --------- |
|
687 | --------- | |
688 |
|
688 | |||
689 | Settings for extensions that send email messages. |
|
689 | Settings for extensions that send email messages. | |
690 |
|
690 | |||
691 | ``from`` |
|
691 | ``from`` | |
692 | Optional. Email address to use in "From" header and SMTP envelope |
|
692 | Optional. Email address to use in "From" header and SMTP envelope | |
693 | of outgoing messages. |
|
693 | of outgoing messages. | |
694 |
|
694 | |||
695 | ``to`` |
|
695 | ``to`` | |
696 | Optional. Comma-separated list of recipients' email addresses. |
|
696 | Optional. Comma-separated list of recipients' email addresses. | |
697 |
|
697 | |||
698 | ``cc`` |
|
698 | ``cc`` | |
699 | Optional. Comma-separated list of carbon copy recipients' |
|
699 | Optional. Comma-separated list of carbon copy recipients' | |
700 | email addresses. |
|
700 | email addresses. | |
701 |
|
701 | |||
702 | ``bcc`` |
|
702 | ``bcc`` | |
703 | Optional. Comma-separated list of blind carbon copy recipients' |
|
703 | Optional. Comma-separated list of blind carbon copy recipients' | |
704 | email addresses. |
|
704 | email addresses. | |
705 |
|
705 | |||
706 | ``method`` |
|
706 | ``method`` | |
707 | Optional. Method to use to send email messages. If value is ``smtp`` |
|
707 | Optional. Method to use to send email messages. If value is ``smtp`` | |
708 | (default), use SMTP (see the ``[smtp]`` section for configuration). |
|
708 | (default), use SMTP (see the ``[smtp]`` section for configuration). | |
709 | Otherwise, use as name of program to run that acts like sendmail |
|
709 | Otherwise, use as name of program to run that acts like sendmail | |
710 | (takes ``-f`` option for sender, list of recipients on command line, |
|
710 | (takes ``-f`` option for sender, list of recipients on command line, | |
711 | message on stdin). Normally, setting this to ``sendmail`` or |
|
711 | message on stdin). Normally, setting this to ``sendmail`` or | |
712 | ``/usr/sbin/sendmail`` is enough to use sendmail to send messages. |
|
712 | ``/usr/sbin/sendmail`` is enough to use sendmail to send messages. | |
713 |
|
713 | |||
714 | ``charsets`` |
|
714 | ``charsets`` | |
715 | Optional. Comma-separated list of character sets considered |
|
715 | Optional. Comma-separated list of character sets considered | |
716 | convenient for recipients. Addresses, headers, and parts not |
|
716 | convenient for recipients. Addresses, headers, and parts not | |
717 | containing patches of outgoing messages will be encoded in the |
|
717 | containing patches of outgoing messages will be encoded in the | |
718 | first character set to which conversion from local encoding |
|
718 | first character set to which conversion from local encoding | |
719 | (``$HGENCODING``, ``ui.fallbackencoding``) succeeds. If correct |
|
719 | (``$HGENCODING``, ``ui.fallbackencoding``) succeeds. If correct | |
720 | conversion fails, the text in question is sent as is. |
|
720 | conversion fails, the text in question is sent as is. | |
721 | (default: '') |
|
721 | (default: '') | |
722 |
|
722 | |||
723 | Order of outgoing email character sets: |
|
723 | Order of outgoing email character sets: | |
724 |
|
724 | |||
725 | 1. ``us-ascii``: always first, regardless of settings |
|
725 | 1. ``us-ascii``: always first, regardless of settings | |
726 | 2. ``email.charsets``: in order given by user |
|
726 | 2. ``email.charsets``: in order given by user | |
727 | 3. ``ui.fallbackencoding``: if not in email.charsets |
|
727 | 3. ``ui.fallbackencoding``: if not in email.charsets | |
728 | 4. ``$HGENCODING``: if not in email.charsets |
|
728 | 4. ``$HGENCODING``: if not in email.charsets | |
729 | 5. ``utf-8``: always last, regardless of settings |
|
729 | 5. ``utf-8``: always last, regardless of settings | |
730 |
|
730 | |||
731 | Email example:: |
|
731 | Email example:: | |
732 |
|
732 | |||
733 | [email] |
|
733 | [email] | |
734 | from = Joseph User <joe.user@example.com> |
|
734 | from = Joseph User <joe.user@example.com> | |
735 | method = /usr/sbin/sendmail |
|
735 | method = /usr/sbin/sendmail | |
736 | # charsets for western Europeans |
|
736 | # charsets for western Europeans | |
737 | # us-ascii, utf-8 omitted, as they are tried first and last |
|
737 | # us-ascii, utf-8 omitted, as they are tried first and last | |
738 | charsets = iso-8859-1, iso-8859-15, windows-1252 |
|
738 | charsets = iso-8859-1, iso-8859-15, windows-1252 | |
739 |
|
739 | |||
740 |
|
740 | |||
741 | ``extensions`` |
|
741 | ``extensions`` | |
742 | -------------- |
|
742 | -------------- | |
743 |
|
743 | |||
744 | Mercurial has an extension mechanism for adding new features. To |
|
744 | Mercurial has an extension mechanism for adding new features. To | |
745 | enable an extension, create an entry for it in this section. |
|
745 | enable an extension, create an entry for it in this section. | |
746 |
|
746 | |||
747 | If you know that the extension is already in Python's search path, |
|
747 | If you know that the extension is already in Python's search path, | |
748 | you can give the name of the module, followed by ``=``, with nothing |
|
748 | you can give the name of the module, followed by ``=``, with nothing | |
749 | after the ``=``. |
|
749 | after the ``=``. | |
750 |
|
750 | |||
751 | Otherwise, give a name that you choose, followed by ``=``, followed by |
|
751 | Otherwise, give a name that you choose, followed by ``=``, followed by | |
752 | the path to the ``.py`` file (including the file name extension) that |
|
752 | the path to the ``.py`` file (including the file name extension) that | |
753 | defines the extension. |
|
753 | defines the extension. | |
754 |
|
754 | |||
755 | To explicitly disable an extension that is enabled in an hgrc of |
|
755 | To explicitly disable an extension that is enabled in an hgrc of | |
756 | broader scope, prepend its path with ``!``, as in ``foo = !/ext/path`` |
|
756 | broader scope, prepend its path with ``!``, as in ``foo = !/ext/path`` | |
757 | or ``foo = !`` when path is not supplied. |
|
757 | or ``foo = !`` when path is not supplied. | |
758 |
|
758 | |||
759 | Example for ``~/.hgrc``:: |
|
759 | Example for ``~/.hgrc``:: | |
760 |
|
760 | |||
761 | [extensions] |
|
761 | [extensions] | |
762 | # (the churn extension will get loaded from Mercurial's path) |
|
762 | # (the churn extension will get loaded from Mercurial's path) | |
763 | churn = |
|
763 | churn = | |
764 | # (this extension will get loaded from the file specified) |
|
764 | # (this extension will get loaded from the file specified) | |
765 | myfeature = ~/.hgext/myfeature.py |
|
765 | myfeature = ~/.hgext/myfeature.py | |
766 |
|
766 | |||
767 |
|
767 | |||
768 | ``format`` |
|
768 | ``format`` | |
769 | ---------- |
|
769 | ---------- | |
770 |
|
770 | |||
771 | ``usegeneraldelta`` |
|
771 | ``usegeneraldelta`` | |
772 | Enable or disable the "generaldelta" repository format which improves |
|
772 | Enable or disable the "generaldelta" repository format which improves | |
773 | repository compression by allowing "revlog" to store delta against arbitrary |
|
773 | repository compression by allowing "revlog" to store delta against arbitrary | |
774 | revision instead of the previous stored one. This provides significant |
|
774 | revision instead of the previous stored one. This provides significant | |
775 | improvement for repositories with branches. |
|
775 | improvement for repositories with branches. | |
776 |
|
776 | |||
777 | Repositories with this on-disk format require Mercurial version 1.9. |
|
777 | Repositories with this on-disk format require Mercurial version 1.9. | |
778 |
|
778 | |||
779 | Enabled by default. |
|
779 | Enabled by default. | |
780 |
|
780 | |||
781 | ``dotencode`` |
|
781 | ``dotencode`` | |
782 | Enable or disable the "dotencode" repository format which enhances |
|
782 | Enable or disable the "dotencode" repository format which enhances | |
783 | the "fncache" repository format (which has to be enabled to use |
|
783 | the "fncache" repository format (which has to be enabled to use | |
784 | dotencode) to avoid issues with filenames starting with ._ on |
|
784 | dotencode) to avoid issues with filenames starting with ._ on | |
785 | Mac OS X and spaces on Windows. |
|
785 | Mac OS X and spaces on Windows. | |
786 |
|
786 | |||
787 | Repositories with this on-disk format require Mercurial version 1.7. |
|
787 | Repositories with this on-disk format require Mercurial version 1.7. | |
788 |
|
788 | |||
789 | Enabled by default. |
|
789 | Enabled by default. | |
790 |
|
790 | |||
791 | ``usefncache`` |
|
791 | ``usefncache`` | |
792 | Enable or disable the "fncache" repository format which enhances |
|
792 | Enable or disable the "fncache" repository format which enhances | |
793 | the "store" repository format (which has to be enabled to use |
|
793 | the "store" repository format (which has to be enabled to use | |
794 | fncache) to allow longer filenames and avoids using Windows |
|
794 | fncache) to allow longer filenames and avoids using Windows | |
795 | reserved names, e.g. "nul". |
|
795 | reserved names, e.g. "nul". | |
796 |
|
796 | |||
797 | Repositories with this on-disk format require Mercurial version 1.1. |
|
797 | Repositories with this on-disk format require Mercurial version 1.1. | |
798 |
|
798 | |||
799 | Enabled by default. |
|
799 | Enabled by default. | |
800 |
|
800 | |||
801 | ``usestore`` |
|
801 | ``usestore`` | |
802 | Enable or disable the "store" repository format which improves |
|
802 | Enable or disable the "store" repository format which improves | |
803 | compatibility with systems that fold case or otherwise mangle |
|
803 | compatibility with systems that fold case or otherwise mangle | |
804 | filenames. Disabling this option will allow you to store longer filenames |
|
804 | filenames. Disabling this option will allow you to store longer filenames | |
805 | in some situations at the expense of compatibility. |
|
805 | in some situations at the expense of compatibility. | |
806 |
|
806 | |||
807 | Repositories with this on-disk format require Mercurial version 0.9.4. |
|
807 | Repositories with this on-disk format require Mercurial version 0.9.4. | |
808 |
|
808 | |||
809 | Enabled by default. |
|
809 | Enabled by default. | |
810 |
|
810 | |||
811 | ``graph`` |
|
811 | ``graph`` | |
812 | --------- |
|
812 | --------- | |
813 |
|
813 | |||
814 | Web graph view configuration. This section let you change graph |
|
814 | Web graph view configuration. This section let you change graph | |
815 | elements display properties by branches, for instance to make the |
|
815 | elements display properties by branches, for instance to make the | |
816 | ``default`` branch stand out. |
|
816 | ``default`` branch stand out. | |
817 |
|
817 | |||
818 | Each line has the following format:: |
|
818 | Each line has the following format:: | |
819 |
|
819 | |||
820 | <branch>.<argument> = <value> |
|
820 | <branch>.<argument> = <value> | |
821 |
|
821 | |||
822 | where ``<branch>`` is the name of the branch being |
|
822 | where ``<branch>`` is the name of the branch being | |
823 | customized. Example:: |
|
823 | customized. Example:: | |
824 |
|
824 | |||
825 | [graph] |
|
825 | [graph] | |
826 | # 2px width |
|
826 | # 2px width | |
827 | default.width = 2 |
|
827 | default.width = 2 | |
828 | # red color |
|
828 | # red color | |
829 | default.color = FF0000 |
|
829 | default.color = FF0000 | |
830 |
|
830 | |||
831 | Supported arguments: |
|
831 | Supported arguments: | |
832 |
|
832 | |||
833 | ``width`` |
|
833 | ``width`` | |
834 | Set branch edges width in pixels. |
|
834 | Set branch edges width in pixels. | |
835 |
|
835 | |||
836 | ``color`` |
|
836 | ``color`` | |
837 | Set branch edges color in hexadecimal RGB notation. |
|
837 | Set branch edges color in hexadecimal RGB notation. | |
838 |
|
838 | |||
839 | ``hooks`` |
|
839 | ``hooks`` | |
840 | --------- |
|
840 | --------- | |
841 |
|
841 | |||
842 | Commands or Python functions that get automatically executed by |
|
842 | Commands or Python functions that get automatically executed by | |
843 | various actions such as starting or finishing a commit. Multiple |
|
843 | various actions such as starting or finishing a commit. Multiple | |
844 | hooks can be run for the same action by appending a suffix to the |
|
844 | hooks can be run for the same action by appending a suffix to the | |
845 | action. Overriding a site-wide hook can be done by changing its |
|
845 | action. Overriding a site-wide hook can be done by changing its | |
846 | value or setting it to an empty string. Hooks can be prioritized |
|
846 | value or setting it to an empty string. Hooks can be prioritized | |
847 | by adding a prefix of ``priority.`` to the hook name on a new line |
|
847 | by adding a prefix of ``priority.`` to the hook name on a new line | |
848 | and setting the priority. The default priority is 0. |
|
848 | and setting the priority. The default priority is 0. | |
849 |
|
849 | |||
850 | Example ``.hg/hgrc``:: |
|
850 | Example ``.hg/hgrc``:: | |
851 |
|
851 | |||
852 | [hooks] |
|
852 | [hooks] | |
853 | # update working directory after adding changesets |
|
853 | # update working directory after adding changesets | |
854 | changegroup.update = hg update |
|
854 | changegroup.update = hg update | |
855 | # do not use the site-wide hook |
|
855 | # do not use the site-wide hook | |
856 | incoming = |
|
856 | incoming = | |
857 | incoming.email = /my/email/hook |
|
857 | incoming.email = /my/email/hook | |
858 | incoming.autobuild = /my/build/hook |
|
858 | incoming.autobuild = /my/build/hook | |
859 | # force autobuild hook to run before other incoming hooks |
|
859 | # force autobuild hook to run before other incoming hooks | |
860 | priority.incoming.autobuild = 1 |
|
860 | priority.incoming.autobuild = 1 | |
861 |
|
861 | |||
862 | Most hooks are run with environment variables set that give useful |
|
862 | Most hooks are run with environment variables set that give useful | |
863 | additional information. For each hook below, the environment variables |
|
863 | additional information. For each hook below, the environment variables | |
864 | it is passed are listed with names of the form ``$HG_foo``. The |
|
864 | it is passed are listed with names of the form ``$HG_foo``. The | |
865 | ``$HG_HOOKTYPE`` and ``$HG_HOOKNAME`` variables are set for all hooks. |
|
865 | ``$HG_HOOKTYPE`` and ``$HG_HOOKNAME`` variables are set for all hooks. | |
866 | their respectively contains the type of hook which triggered the run and |
|
866 | their respectively contains the type of hook which triggered the run and | |
867 | the full name of the hooks in the config. In the example about this will |
|
867 | the full name of the hooks in the config. In the example about this will | |
868 | be ``$HG_HOOKTYPE=incoming`` and ``$HG_HOOKNAME=incoming.email``. |
|
868 | be ``$HG_HOOKTYPE=incoming`` and ``$HG_HOOKNAME=incoming.email``. | |
869 |
|
869 | |||
870 | ``changegroup`` |
|
870 | ``changegroup`` | |
871 | Run after a changegroup has been added via push, pull or unbundle. ID of the |
|
871 | Run after a changegroup has been added via push, pull or unbundle. ID of the | |
872 | first new changeset is in ``$HG_NODE`` and last in ``$HG_NODE_LAST``. URL |
|
872 | first new changeset is in ``$HG_NODE`` and last in ``$HG_NODE_LAST``. URL | |
873 | from which changes came is in ``$HG_URL``. |
|
873 | from which changes came is in ``$HG_URL``. | |
874 |
|
874 | |||
875 | ``commit`` |
|
875 | ``commit`` | |
876 | Run after a changeset has been created in the local repository. ID |
|
876 | Run after a changeset has been created in the local repository. ID | |
877 | of the newly created changeset is in ``$HG_NODE``. Parent changeset |
|
877 | of the newly created changeset is in ``$HG_NODE``. Parent changeset | |
878 | IDs are in ``$HG_PARENT1`` and ``$HG_PARENT2``. |
|
878 | IDs are in ``$HG_PARENT1`` and ``$HG_PARENT2``. | |
879 |
|
879 | |||
880 | ``incoming`` |
|
880 | ``incoming`` | |
881 | Run after a changeset has been pulled, pushed, or unbundled into |
|
881 | Run after a changeset has been pulled, pushed, or unbundled into | |
882 | the local repository. The ID of the newly arrived changeset is in |
|
882 | the local repository. The ID of the newly arrived changeset is in | |
883 | ``$HG_NODE``. URL that was source of changes came is in ``$HG_URL``. |
|
883 | ``$HG_NODE``. URL that was source of changes came is in ``$HG_URL``. | |
884 |
|
884 | |||
885 | ``outgoing`` |
|
885 | ``outgoing`` | |
886 | Run after sending changes from local repository to another. ID of |
|
886 | Run after sending changes from local repository to another. ID of | |
887 | first changeset sent is in ``$HG_NODE``. Source of operation is in |
|
887 | first changeset sent is in ``$HG_NODE``. Source of operation is in | |
888 | ``$HG_SOURCE``; Also see :hg:`help config.hooks.preoutgoing` hook. |
|
888 | ``$HG_SOURCE``; Also see :hg:`help config.hooks.preoutgoing` hook. | |
889 |
|
889 | |||
890 | ``post-<command>`` |
|
890 | ``post-<command>`` | |
891 | Run after successful invocations of the associated command. The |
|
891 | Run after successful invocations of the associated command. The | |
892 | contents of the command line are passed as ``$HG_ARGS`` and the result |
|
892 | contents of the command line are passed as ``$HG_ARGS`` and the result | |
893 | code in ``$HG_RESULT``. Parsed command line arguments are passed as |
|
893 | code in ``$HG_RESULT``. Parsed command line arguments are passed as | |
894 | ``$HG_PATS`` and ``$HG_OPTS``. These contain string representations of |
|
894 | ``$HG_PATS`` and ``$HG_OPTS``. These contain string representations of | |
895 | the python data internally passed to <command>. ``$HG_OPTS`` is a |
|
895 | the python data internally passed to <command>. ``$HG_OPTS`` is a | |
896 | dictionary of options (with unspecified options set to their defaults). |
|
896 | dictionary of options (with unspecified options set to their defaults). | |
897 | ``$HG_PATS`` is a list of arguments. Hook failure is ignored. |
|
897 | ``$HG_PATS`` is a list of arguments. Hook failure is ignored. | |
898 |
|
898 | |||
899 | ``fail-<command>`` |
|
899 | ``fail-<command>`` | |
900 | Run after a failed invocation of an associated command. The contents |
|
900 | Run after a failed invocation of an associated command. The contents | |
901 | of the command line are passed as ``$HG_ARGS``. Parsed command line |
|
901 | of the command line are passed as ``$HG_ARGS``. Parsed command line | |
902 | arguments are passed as ``$HG_PATS`` and ``$HG_OPTS``. These contain |
|
902 | arguments are passed as ``$HG_PATS`` and ``$HG_OPTS``. These contain | |
903 | string representations of the python data internally passed to |
|
903 | string representations of the python data internally passed to | |
904 | <command>. ``$HG_OPTS`` is a dictionary of options (with unspecified |
|
904 | <command>. ``$HG_OPTS`` is a dictionary of options (with unspecified | |
905 | options set to their defaults). ``$HG_PATS`` is a list of arguments. |
|
905 | options set to their defaults). ``$HG_PATS`` is a list of arguments. | |
906 | Hook failure is ignored. |
|
906 | Hook failure is ignored. | |
907 |
|
907 | |||
908 | ``pre-<command>`` |
|
908 | ``pre-<command>`` | |
909 | Run before executing the associated command. The contents of the |
|
909 | Run before executing the associated command. The contents of the | |
910 | command line are passed as ``$HG_ARGS``. Parsed command line arguments |
|
910 | command line are passed as ``$HG_ARGS``. Parsed command line arguments | |
911 | are passed as ``$HG_PATS`` and ``$HG_OPTS``. These contain string |
|
911 | are passed as ``$HG_PATS`` and ``$HG_OPTS``. These contain string | |
912 | representations of the data internally passed to <command>. ``$HG_OPTS`` |
|
912 | representations of the data internally passed to <command>. ``$HG_OPTS`` | |
913 | is a dictionary of options (with unspecified options set to their |
|
913 | is a dictionary of options (with unspecified options set to their | |
914 | defaults). ``$HG_PATS`` is a list of arguments. If the hook returns |
|
914 | defaults). ``$HG_PATS`` is a list of arguments. If the hook returns | |
915 | failure, the command doesn't execute and Mercurial returns the failure |
|
915 | failure, the command doesn't execute and Mercurial returns the failure | |
916 | code. |
|
916 | code. | |
917 |
|
917 | |||
918 | ``prechangegroup`` |
|
918 | ``prechangegroup`` | |
919 | Run before a changegroup is added via push, pull or unbundle. Exit |
|
919 | Run before a changegroup is added via push, pull or unbundle. Exit | |
920 | status 0 allows the changegroup to proceed. Non-zero status will |
|
920 | status 0 allows the changegroup to proceed. Non-zero status will | |
921 | cause the push, pull or unbundle to fail. URL from which changes |
|
921 | cause the push, pull or unbundle to fail. URL from which changes | |
922 | will come is in ``$HG_URL``. |
|
922 | will come is in ``$HG_URL``. | |
923 |
|
923 | |||
924 | ``precommit`` |
|
924 | ``precommit`` | |
925 | Run before starting a local commit. Exit status 0 allows the |
|
925 | Run before starting a local commit. Exit status 0 allows the | |
926 | commit to proceed. Non-zero status will cause the commit to fail. |
|
926 | commit to proceed. Non-zero status will cause the commit to fail. | |
927 | Parent changeset IDs are in ``$HG_PARENT1`` and ``$HG_PARENT2``. |
|
927 | Parent changeset IDs are in ``$HG_PARENT1`` and ``$HG_PARENT2``. | |
928 |
|
928 | |||
929 | ``prelistkeys`` |
|
929 | ``prelistkeys`` | |
930 | Run before listing pushkeys (like bookmarks) in the |
|
930 | Run before listing pushkeys (like bookmarks) in the | |
931 | repository. Non-zero status will cause failure. The key namespace is |
|
931 | repository. Non-zero status will cause failure. The key namespace is | |
932 | in ``$HG_NAMESPACE``. |
|
932 | in ``$HG_NAMESPACE``. | |
933 |
|
933 | |||
934 | ``preoutgoing`` |
|
934 | ``preoutgoing`` | |
935 | Run before collecting changes to send from the local repository to |
|
935 | Run before collecting changes to send from the local repository to | |
936 | another. Non-zero status will cause failure. This lets you prevent |
|
936 | another. Non-zero status will cause failure. This lets you prevent | |
937 | pull over HTTP or SSH. Also prevents against local pull, push |
|
937 | pull over HTTP or SSH. Also prevents against local pull, push | |
938 | (outbound) or bundle commands, but not effective, since you can |
|
938 | (outbound) or bundle commands, but not effective, since you can | |
939 | just copy files instead then. Source of operation is in |
|
939 | just copy files instead then. Source of operation is in | |
940 | ``$HG_SOURCE``. If "serve", operation is happening on behalf of remote |
|
940 | ``$HG_SOURCE``. If "serve", operation is happening on behalf of remote | |
941 | SSH or HTTP repository. If "push", "pull" or "bundle", operation |
|
941 | SSH or HTTP repository. If "push", "pull" or "bundle", operation | |
942 | is happening on behalf of repository on same system. |
|
942 | is happening on behalf of repository on same system. | |
943 |
|
943 | |||
944 | ``prepushkey`` |
|
944 | ``prepushkey`` | |
945 | Run before a pushkey (like a bookmark) is added to the |
|
945 | Run before a pushkey (like a bookmark) is added to the | |
946 | repository. Non-zero status will cause the key to be rejected. The |
|
946 | repository. Non-zero status will cause the key to be rejected. The | |
947 | key namespace is in ``$HG_NAMESPACE``, the key is in ``$HG_KEY``, |
|
947 | key namespace is in ``$HG_NAMESPACE``, the key is in ``$HG_KEY``, | |
948 | the old value (if any) is in ``$HG_OLD``, and the new value is in |
|
948 | the old value (if any) is in ``$HG_OLD``, and the new value is in | |
949 | ``$HG_NEW``. |
|
949 | ``$HG_NEW``. | |
950 |
|
950 | |||
951 | ``pretag`` |
|
951 | ``pretag`` | |
952 | Run before creating a tag. Exit status 0 allows the tag to be |
|
952 | Run before creating a tag. Exit status 0 allows the tag to be | |
953 | created. Non-zero status will cause the tag to fail. ID of |
|
953 | created. Non-zero status will cause the tag to fail. ID of | |
954 | changeset to tag is in ``$HG_NODE``. Name of tag is in ``$HG_TAG``. Tag is |
|
954 | changeset to tag is in ``$HG_NODE``. Name of tag is in ``$HG_TAG``. Tag is | |
955 | local if ``$HG_LOCAL=1``, in repository if ``$HG_LOCAL=0``. |
|
955 | local if ``$HG_LOCAL=1``, in repository if ``$HG_LOCAL=0``. | |
956 |
|
956 | |||
957 | ``pretxnopen`` |
|
957 | ``pretxnopen`` | |
958 | Run before any new repository transaction is open. The reason for the |
|
958 | Run before any new repository transaction is open. The reason for the | |
959 | transaction will be in ``$HG_TXNNAME`` and a unique identifier for the |
|
959 | transaction will be in ``$HG_TXNNAME`` and a unique identifier for the | |
960 | transaction will be in ``HG_TXNID``. A non-zero status will prevent the |
|
960 | transaction will be in ``HG_TXNID``. A non-zero status will prevent the | |
961 | transaction from being opened. |
|
961 | transaction from being opened. | |
962 |
|
962 | |||
963 | ``pretxnclose`` |
|
963 | ``pretxnclose`` | |
964 | Run right before the transaction is actually finalized. Any repository change |
|
964 | Run right before the transaction is actually finalized. Any repository change | |
965 | will be visible to the hook program. This lets you validate the transaction |
|
965 | will be visible to the hook program. This lets you validate the transaction | |
966 | content or change it. Exit status 0 allows the commit to proceed. Non-zero |
|
966 | content or change it. Exit status 0 allows the commit to proceed. Non-zero | |
967 | status will cause the transaction to be rolled back. The reason for the |
|
967 | status will cause the transaction to be rolled back. The reason for the | |
968 | transaction opening will be in ``$HG_TXNNAME`` and a unique identifier for |
|
968 | transaction opening will be in ``$HG_TXNNAME`` and a unique identifier for | |
969 | the transaction will be in ``HG_TXNID``. The rest of the available data will |
|
969 | the transaction will be in ``HG_TXNID``. The rest of the available data will | |
970 | vary according the transaction type. New changesets will add ``$HG_NODE`` (id |
|
970 | vary according the transaction type. New changesets will add ``$HG_NODE`` (id | |
971 | of the first added changeset), ``$HG_NODE_LAST`` (id of the last added |
|
971 | of the first added changeset), ``$HG_NODE_LAST`` (id of the last added | |
972 | changeset), ``$HG_URL`` and ``$HG_SOURCE`` variables, bookmarks and phases |
|
972 | changeset), ``$HG_URL`` and ``$HG_SOURCE`` variables, bookmarks and phases | |
973 | changes will set ``HG_BOOKMARK_MOVED`` and ``HG_PHASES_MOVED`` to ``1``, etc. |
|
973 | changes will set ``HG_BOOKMARK_MOVED`` and ``HG_PHASES_MOVED`` to ``1``, etc. | |
974 |
|
974 | |||
975 | ``txnclose`` |
|
975 | ``txnclose`` | |
976 | Run after any repository transaction has been committed. At this |
|
976 | Run after any repository transaction has been committed. At this | |
977 | point, the transaction can no longer be rolled back. The hook will run |
|
977 | point, the transaction can no longer be rolled back. The hook will run | |
978 | after the lock is released. See :hg:`help config.hooks.pretxnclose` docs for |
|
978 | after the lock is released. See :hg:`help config.hooks.pretxnclose` docs for | |
979 | details about available variables. |
|
979 | details about available variables. | |
980 |
|
980 | |||
981 | ``txnabort`` |
|
981 | ``txnabort`` | |
982 | Run when a transaction is aborted. See :hg:`help config.hooks.pretxnclose` |
|
982 | Run when a transaction is aborted. See :hg:`help config.hooks.pretxnclose` | |
983 | docs for details about available variables. |
|
983 | docs for details about available variables. | |
984 |
|
984 | |||
985 | ``pretxnchangegroup`` |
|
985 | ``pretxnchangegroup`` | |
986 | Run after a changegroup has been added via push, pull or unbundle, but before |
|
986 | Run after a changegroup has been added via push, pull or unbundle, but before | |
987 | the transaction has been committed. Changegroup is visible to hook program. |
|
987 | the transaction has been committed. Changegroup is visible to hook program. | |
988 | This lets you validate incoming changes before accepting them. Passed the ID |
|
988 | This lets you validate incoming changes before accepting them. Passed the ID | |
989 | of the first new changeset in ``$HG_NODE`` and last in ``$HG_NODE_LAST``. |
|
989 | of the first new changeset in ``$HG_NODE`` and last in ``$HG_NODE_LAST``. | |
990 | Exit status 0 allows the transaction to commit. Non-zero status will cause |
|
990 | Exit status 0 allows the transaction to commit. Non-zero status will cause | |
991 | the transaction to be rolled back and the push, pull or unbundle will fail. |
|
991 | the transaction to be rolled back and the push, pull or unbundle will fail. | |
992 | URL that was source of changes is in ``$HG_URL``. |
|
992 | URL that was source of changes is in ``$HG_URL``. | |
993 |
|
993 | |||
994 | ``pretxncommit`` |
|
994 | ``pretxncommit`` | |
995 | Run after a changeset has been created but the transaction not yet |
|
995 | Run after a changeset has been created but the transaction not yet | |
996 | committed. Changeset is visible to hook program. This lets you |
|
996 | committed. Changeset is visible to hook program. This lets you | |
997 | validate commit message and changes. Exit status 0 allows the |
|
997 | validate commit message and changes. Exit status 0 allows the | |
998 | commit to proceed. Non-zero status will cause the transaction to |
|
998 | commit to proceed. Non-zero status will cause the transaction to | |
999 | be rolled back. ID of changeset is in ``$HG_NODE``. Parent changeset |
|
999 | be rolled back. ID of changeset is in ``$HG_NODE``. Parent changeset | |
1000 | IDs are in ``$HG_PARENT1`` and ``$HG_PARENT2``. |
|
1000 | IDs are in ``$HG_PARENT1`` and ``$HG_PARENT2``. | |
1001 |
|
1001 | |||
1002 | ``preupdate`` |
|
1002 | ``preupdate`` | |
1003 | Run before updating the working directory. Exit status 0 allows |
|
1003 | Run before updating the working directory. Exit status 0 allows | |
1004 | the update to proceed. Non-zero status will prevent the update. |
|
1004 | the update to proceed. Non-zero status will prevent the update. | |
1005 | Changeset ID of first new parent is in ``$HG_PARENT1``. If merge, ID |
|
1005 | Changeset ID of first new parent is in ``$HG_PARENT1``. If merge, ID | |
1006 | of second new parent is in ``$HG_PARENT2``. |
|
1006 | of second new parent is in ``$HG_PARENT2``. | |
1007 |
|
1007 | |||
1008 | ``listkeys`` |
|
1008 | ``listkeys`` | |
1009 | Run after listing pushkeys (like bookmarks) in the repository. The |
|
1009 | Run after listing pushkeys (like bookmarks) in the repository. The | |
1010 | key namespace is in ``$HG_NAMESPACE``. ``$HG_VALUES`` is a |
|
1010 | key namespace is in ``$HG_NAMESPACE``. ``$HG_VALUES`` is a | |
1011 | dictionary containing the keys and values. |
|
1011 | dictionary containing the keys and values. | |
1012 |
|
1012 | |||
1013 | ``pushkey`` |
|
1013 | ``pushkey`` | |
1014 | Run after a pushkey (like a bookmark) is added to the |
|
1014 | Run after a pushkey (like a bookmark) is added to the | |
1015 | repository. The key namespace is in ``$HG_NAMESPACE``, the key is in |
|
1015 | repository. The key namespace is in ``$HG_NAMESPACE``, the key is in | |
1016 | ``$HG_KEY``, the old value (if any) is in ``$HG_OLD``, and the new |
|
1016 | ``$HG_KEY``, the old value (if any) is in ``$HG_OLD``, and the new | |
1017 | value is in ``$HG_NEW``. |
|
1017 | value is in ``$HG_NEW``. | |
1018 |
|
1018 | |||
1019 | ``tag`` |
|
1019 | ``tag`` | |
1020 | Run after a tag is created. ID of tagged changeset is in ``$HG_NODE``. |
|
1020 | Run after a tag is created. ID of tagged changeset is in ``$HG_NODE``. | |
1021 | Name of tag is in ``$HG_TAG``. Tag is local if ``$HG_LOCAL=1``, in |
|
1021 | Name of tag is in ``$HG_TAG``. Tag is local if ``$HG_LOCAL=1``, in | |
1022 | repository if ``$HG_LOCAL=0``. |
|
1022 | repository if ``$HG_LOCAL=0``. | |
1023 |
|
1023 | |||
1024 | ``update`` |
|
1024 | ``update`` | |
1025 | Run after updating the working directory. Changeset ID of first |
|
1025 | Run after updating the working directory. Changeset ID of first | |
1026 | new parent is in ``$HG_PARENT1``. If merge, ID of second new parent is |
|
1026 | new parent is in ``$HG_PARENT1``. If merge, ID of second new parent is | |
1027 | in ``$HG_PARENT2``. If the update succeeded, ``$HG_ERROR=0``. If the |
|
1027 | in ``$HG_PARENT2``. If the update succeeded, ``$HG_ERROR=0``. If the | |
1028 | update failed (e.g. because conflicts not resolved), ``$HG_ERROR=1``. |
|
1028 | update failed (e.g. because conflicts not resolved), ``$HG_ERROR=1``. | |
1029 |
|
1029 | |||
1030 | .. note:: |
|
1030 | .. note:: | |
1031 |
|
1031 | |||
1032 | It is generally better to use standard hooks rather than the |
|
1032 | It is generally better to use standard hooks rather than the | |
1033 | generic pre- and post- command hooks as they are guaranteed to be |
|
1033 | generic pre- and post- command hooks as they are guaranteed to be | |
1034 | called in the appropriate contexts for influencing transactions. |
|
1034 | called in the appropriate contexts for influencing transactions. | |
1035 | Also, hooks like "commit" will be called in all contexts that |
|
1035 | Also, hooks like "commit" will be called in all contexts that | |
1036 | generate a commit (e.g. tag) and not just the commit command. |
|
1036 | generate a commit (e.g. tag) and not just the commit command. | |
1037 |
|
1037 | |||
1038 | .. note:: |
|
1038 | .. note:: | |
1039 |
|
1039 | |||
1040 | Environment variables with empty values may not be passed to |
|
1040 | Environment variables with empty values may not be passed to | |
1041 | hooks on platforms such as Windows. As an example, ``$HG_PARENT2`` |
|
1041 | hooks on platforms such as Windows. As an example, ``$HG_PARENT2`` | |
1042 | will have an empty value under Unix-like platforms for non-merge |
|
1042 | will have an empty value under Unix-like platforms for non-merge | |
1043 | changesets, while it will not be available at all under Windows. |
|
1043 | changesets, while it will not be available at all under Windows. | |
1044 |
|
1044 | |||
1045 | The syntax for Python hooks is as follows:: |
|
1045 | The syntax for Python hooks is as follows:: | |
1046 |
|
1046 | |||
1047 | hookname = python:modulename.submodule.callable |
|
1047 | hookname = python:modulename.submodule.callable | |
1048 | hookname = python:/path/to/python/module.py:callable |
|
1048 | hookname = python:/path/to/python/module.py:callable | |
1049 |
|
1049 | |||
1050 | Python hooks are run within the Mercurial process. Each hook is |
|
1050 | Python hooks are run within the Mercurial process. Each hook is | |
1051 | called with at least three keyword arguments: a ui object (keyword |
|
1051 | called with at least three keyword arguments: a ui object (keyword | |
1052 | ``ui``), a repository object (keyword ``repo``), and a ``hooktype`` |
|
1052 | ``ui``), a repository object (keyword ``repo``), and a ``hooktype`` | |
1053 | keyword that tells what kind of hook is used. Arguments listed as |
|
1053 | keyword that tells what kind of hook is used. Arguments listed as | |
1054 | environment variables above are passed as keyword arguments, with no |
|
1054 | environment variables above are passed as keyword arguments, with no | |
1055 | ``HG_`` prefix, and names in lower case. |
|
1055 | ``HG_`` prefix, and names in lower case. | |
1056 |
|
1056 | |||
1057 | If a Python hook returns a "true" value or raises an exception, this |
|
1057 | If a Python hook returns a "true" value or raises an exception, this | |
1058 | is treated as a failure. |
|
1058 | is treated as a failure. | |
1059 |
|
1059 | |||
1060 |
|
1060 | |||
1061 | ``hostfingerprints`` |
|
1061 | ``hostfingerprints`` | |
1062 | -------------------- |
|
1062 | -------------------- | |
1063 |
|
1063 | |||
1064 | (Deprecated. Use ``[hostsecurity]``'s ``fingerprints`` options instead.) |
|
1064 | (Deprecated. Use ``[hostsecurity]``'s ``fingerprints`` options instead.) | |
1065 |
|
1065 | |||
1066 | Fingerprints of the certificates of known HTTPS servers. |
|
1066 | Fingerprints of the certificates of known HTTPS servers. | |
1067 |
|
1067 | |||
1068 | A HTTPS connection to a server with a fingerprint configured here will |
|
1068 | A HTTPS connection to a server with a fingerprint configured here will | |
1069 | only succeed if the servers certificate matches the fingerprint. |
|
1069 | only succeed if the servers certificate matches the fingerprint. | |
1070 | This is very similar to how ssh known hosts works. |
|
1070 | This is very similar to how ssh known hosts works. | |
1071 |
|
1071 | |||
1072 | The fingerprint is the SHA-1 hash value of the DER encoded certificate. |
|
1072 | The fingerprint is the SHA-1 hash value of the DER encoded certificate. | |
1073 | Multiple values can be specified (separated by spaces or commas). This can |
|
1073 | Multiple values can be specified (separated by spaces or commas). This can | |
1074 | be used to define both old and new fingerprints while a host transitions |
|
1074 | be used to define both old and new fingerprints while a host transitions | |
1075 | to a new certificate. |
|
1075 | to a new certificate. | |
1076 |
|
1076 | |||
1077 | The CA chain and web.cacerts is not used for servers with a fingerprint. |
|
1077 | The CA chain and web.cacerts is not used for servers with a fingerprint. | |
1078 |
|
1078 | |||
1079 | For example:: |
|
1079 | For example:: | |
1080 |
|
1080 | |||
1081 | [hostfingerprints] |
|
1081 | [hostfingerprints] | |
1082 | hg.intevation.de = fc:e2:8d:d9:51:cd:cb:c1:4d:18:6b:b7:44:8d:49:72:57:e6:cd:33 |
|
1082 | hg.intevation.de = fc:e2:8d:d9:51:cd:cb:c1:4d:18:6b:b7:44:8d:49:72:57:e6:cd:33 | |
1083 | hg.intevation.org = fc:e2:8d:d9:51:cd:cb:c1:4d:18:6b:b7:44:8d:49:72:57:e6:cd:33 |
|
1083 | hg.intevation.org = fc:e2:8d:d9:51:cd:cb:c1:4d:18:6b:b7:44:8d:49:72:57:e6:cd:33 | |
1084 |
|
1084 | |||
1085 | ``hostsecurity`` |
|
1085 | ``hostsecurity`` | |
1086 | ---------------- |
|
1086 | ---------------- | |
1087 |
|
1087 | |||
1088 | Used to specify global and per-host security settings for connecting to |
|
1088 | Used to specify global and per-host security settings for connecting to | |
1089 | other machines. |
|
1089 | other machines. | |
1090 |
|
1090 | |||
1091 | The following options control default behavior for all hosts. |
|
1091 | The following options control default behavior for all hosts. | |
1092 |
|
1092 | |||
1093 | ``ciphers`` |
|
1093 | ``ciphers`` | |
1094 | Defines the cryptographic ciphers to use for connections. |
|
1094 | Defines the cryptographic ciphers to use for connections. | |
1095 |
|
1095 | |||
1096 | Value must be a valid OpenSSL Cipher List Format as documented at |
|
1096 | Value must be a valid OpenSSL Cipher List Format as documented at | |
1097 | https://www.openssl.org/docs/manmaster/apps/ciphers.html#CIPHER-LIST-FORMAT. |
|
1097 | https://www.openssl.org/docs/manmaster/apps/ciphers.html#CIPHER-LIST-FORMAT. | |
1098 |
|
1098 | |||
1099 | This setting is for advanced users only. Setting to incorrect values |
|
1099 | This setting is for advanced users only. Setting to incorrect values | |
1100 | can significantly lower connection security or decrease performance. |
|
1100 | can significantly lower connection security or decrease performance. | |
1101 | You have been warned. |
|
1101 | You have been warned. | |
1102 |
|
1102 | |||
1103 | This option requires Python 2.7. |
|
1103 | This option requires Python 2.7. | |
1104 |
|
1104 | |||
1105 | ``minimumprotocol`` |
|
1105 | ``minimumprotocol`` | |
1106 | Defines the minimum channel encryption protocol to use. |
|
1106 | Defines the minimum channel encryption protocol to use. | |
1107 |
|
1107 | |||
1108 | By default, the highest version of TLS supported by both client and server |
|
1108 | By default, the highest version of TLS supported by both client and server | |
1109 | is used. |
|
1109 | is used. | |
1110 |
|
1110 | |||
1111 | Allowed values are: ``tls1.0``, ``tls1.1``, ``tls1.2``. |
|
1111 | Allowed values are: ``tls1.0``, ``tls1.1``, ``tls1.2``. | |
1112 |
|
1112 | |||
1113 | When running on an old Python version, only ``tls1.0`` is allowed since |
|
1113 | When running on an old Python version, only ``tls1.0`` is allowed since | |
1114 | old versions of Python only support up to TLS 1.0. |
|
1114 | old versions of Python only support up to TLS 1.0. | |
1115 |
|
1115 | |||
1116 | When running a Python that supports modern TLS versions, the default is |
|
1116 | When running a Python that supports modern TLS versions, the default is | |
1117 | ``tls1.1``. ``tls1.0`` can still be used to allow TLS 1.0. However, this |
|
1117 | ``tls1.1``. ``tls1.0`` can still be used to allow TLS 1.0. However, this | |
1118 | weakens security and should only be used as a feature of last resort if |
|
1118 | weakens security and should only be used as a feature of last resort if | |
1119 | a server does not support TLS 1.1+. |
|
1119 | a server does not support TLS 1.1+. | |
1120 |
|
1120 | |||
1121 | Options in the ``[hostsecurity]`` section can have the form |
|
1121 | Options in the ``[hostsecurity]`` section can have the form | |
1122 | ``hostname``:``setting``. This allows multiple settings to be defined on a |
|
1122 | ``hostname``:``setting``. This allows multiple settings to be defined on a | |
1123 | per-host basis. |
|
1123 | per-host basis. | |
1124 |
|
1124 | |||
1125 | The following per-host settings can be defined. |
|
1125 | The following per-host settings can be defined. | |
1126 |
|
1126 | |||
1127 | ``ciphers`` |
|
1127 | ``ciphers`` | |
1128 | This behaves like ``ciphers`` as described above except it only applies |
|
1128 | This behaves like ``ciphers`` as described above except it only applies | |
1129 | to the host on which it is defined. |
|
1129 | to the host on which it is defined. | |
1130 |
|
1130 | |||
1131 | ``fingerprints`` |
|
1131 | ``fingerprints`` | |
1132 | A list of hashes of the DER encoded peer/remote certificate. Values have |
|
1132 | A list of hashes of the DER encoded peer/remote certificate. Values have | |
1133 | the form ``algorithm``:``fingerprint``. e.g. |
|
1133 | the form ``algorithm``:``fingerprint``. e.g. | |
1134 | ``sha256:c3ab8ff13720e8ad9047dd39466b3c8974e592c2fa383d4a3960714caef0c4f2``. |
|
1134 | ``sha256:c3ab8ff13720e8ad9047dd39466b3c8974e592c2fa383d4a3960714caef0c4f2``. | |
1135 |
|
1135 | |||
1136 | The following algorithms/prefixes are supported: ``sha1``, ``sha256``, |
|
1136 | The following algorithms/prefixes are supported: ``sha1``, ``sha256``, | |
1137 | ``sha512``. |
|
1137 | ``sha512``. | |
1138 |
|
1138 | |||
1139 | Use of ``sha256`` or ``sha512`` is preferred. |
|
1139 | Use of ``sha256`` or ``sha512`` is preferred. | |
1140 |
|
1140 | |||
1141 | If a fingerprint is specified, the CA chain is not validated for this |
|
1141 | If a fingerprint is specified, the CA chain is not validated for this | |
1142 | host and Mercurial will require the remote certificate to match one |
|
1142 | host and Mercurial will require the remote certificate to match one | |
1143 | of the fingerprints specified. This means if the server updates its |
|
1143 | of the fingerprints specified. This means if the server updates its | |
1144 | certificate, Mercurial will abort until a new fingerprint is defined. |
|
1144 | certificate, Mercurial will abort until a new fingerprint is defined. | |
1145 | This can provide stronger security than traditional CA-based validation |
|
1145 | This can provide stronger security than traditional CA-based validation | |
1146 | at the expense of convenience. |
|
1146 | at the expense of convenience. | |
1147 |
|
1147 | |||
1148 | This option takes precedence over ``verifycertsfile``. |
|
1148 | This option takes precedence over ``verifycertsfile``. | |
1149 |
|
1149 | |||
1150 | ``minimumprotocol`` |
|
1150 | ``minimumprotocol`` | |
1151 | This behaves like ``minimumprotocol`` as described above except it |
|
1151 | This behaves like ``minimumprotocol`` as described above except it | |
1152 | only applies to the host on which it is defined. |
|
1152 | only applies to the host on which it is defined. | |
1153 |
|
1153 | |||
1154 | ``verifycertsfile`` |
|
1154 | ``verifycertsfile`` | |
1155 | Path to file a containing a list of PEM encoded certificates used to |
|
1155 | Path to file a containing a list of PEM encoded certificates used to | |
1156 | verify the server certificate. Environment variables and ``~user`` |
|
1156 | verify the server certificate. Environment variables and ``~user`` | |
1157 | constructs are expanded in the filename. |
|
1157 | constructs are expanded in the filename. | |
1158 |
|
1158 | |||
1159 | The server certificate or the certificate's certificate authority (CA) |
|
1159 | The server certificate or the certificate's certificate authority (CA) | |
1160 | must match a certificate from this file or certificate verification |
|
1160 | must match a certificate from this file or certificate verification | |
1161 | will fail and connections to the server will be refused. |
|
1161 | will fail and connections to the server will be refused. | |
1162 |
|
1162 | |||
1163 | If defined, only certificates provided by this file will be used: |
|
1163 | If defined, only certificates provided by this file will be used: | |
1164 | ``web.cacerts`` and any system/default certificates will not be |
|
1164 | ``web.cacerts`` and any system/default certificates will not be | |
1165 | used. |
|
1165 | used. | |
1166 |
|
1166 | |||
1167 | This option has no effect if the per-host ``fingerprints`` option |
|
1167 | This option has no effect if the per-host ``fingerprints`` option | |
1168 | is set. |
|
1168 | is set. | |
1169 |
|
1169 | |||
1170 | The format of the file is as follows:: |
|
1170 | The format of the file is as follows:: | |
1171 |
|
1171 | |||
1172 | -----BEGIN CERTIFICATE----- |
|
1172 | -----BEGIN CERTIFICATE----- | |
1173 | ... (certificate in base64 PEM encoding) ... |
|
1173 | ... (certificate in base64 PEM encoding) ... | |
1174 | -----END CERTIFICATE----- |
|
1174 | -----END CERTIFICATE----- | |
1175 | -----BEGIN CERTIFICATE----- |
|
1175 | -----BEGIN CERTIFICATE----- | |
1176 | ... (certificate in base64 PEM encoding) ... |
|
1176 | ... (certificate in base64 PEM encoding) ... | |
1177 | -----END CERTIFICATE----- |
|
1177 | -----END CERTIFICATE----- | |
1178 |
|
1178 | |||
1179 | For example:: |
|
1179 | For example:: | |
1180 |
|
1180 | |||
1181 | [hostsecurity] |
|
1181 | [hostsecurity] | |
1182 | hg.example.com:fingerprints = sha256:c3ab8ff13720e8ad9047dd39466b3c8974e592c2fa383d4a3960714caef0c4f2 |
|
1182 | hg.example.com:fingerprints = sha256:c3ab8ff13720e8ad9047dd39466b3c8974e592c2fa383d4a3960714caef0c4f2 | |
1183 | hg2.example.com:fingerprints = sha1:914f1aff87249c09b6859b88b1906d30756491ca, sha1:fc:e2:8d:d9:51:cd:cb:c1:4d:18:6b:b7:44:8d:49:72:57:e6:cd:33 |
|
1183 | hg2.example.com:fingerprints = sha1:914f1aff87249c09b6859b88b1906d30756491ca, sha1:fc:e2:8d:d9:51:cd:cb:c1:4d:18:6b:b7:44:8d:49:72:57:e6:cd:33 | |
1184 | foo.example.com:verifycertsfile = /etc/ssl/trusted-ca-certs.pem |
|
1184 | foo.example.com:verifycertsfile = /etc/ssl/trusted-ca-certs.pem | |
1185 |
|
1185 | |||
1186 | To change the default minimum protocol version to TLS 1.2 but to allow TLS 1.1 |
|
1186 | To change the default minimum protocol version to TLS 1.2 but to allow TLS 1.1 | |
1187 | when connecting to ``hg.example.com``:: |
|
1187 | when connecting to ``hg.example.com``:: | |
1188 |
|
1188 | |||
1189 | [hostsecurity] |
|
1189 | [hostsecurity] | |
1190 | minimumprotocol = tls1.2 |
|
1190 | minimumprotocol = tls1.2 | |
1191 | hg.example.com:minimumprotocol = tls1.1 |
|
1191 | hg.example.com:minimumprotocol = tls1.1 | |
1192 |
|
1192 | |||
1193 | ``http_proxy`` |
|
1193 | ``http_proxy`` | |
1194 | -------------- |
|
1194 | -------------- | |
1195 |
|
1195 | |||
1196 | Used to access web-based Mercurial repositories through a HTTP |
|
1196 | Used to access web-based Mercurial repositories through a HTTP | |
1197 | proxy. |
|
1197 | proxy. | |
1198 |
|
1198 | |||
1199 | ``host`` |
|
1199 | ``host`` | |
1200 | Host name and (optional) port of the proxy server, for example |
|
1200 | Host name and (optional) port of the proxy server, for example | |
1201 | "myproxy:8000". |
|
1201 | "myproxy:8000". | |
1202 |
|
1202 | |||
1203 | ``no`` |
|
1203 | ``no`` | |
1204 | Optional. Comma-separated list of host names that should bypass |
|
1204 | Optional. Comma-separated list of host names that should bypass | |
1205 | the proxy. |
|
1205 | the proxy. | |
1206 |
|
1206 | |||
1207 | ``passwd`` |
|
1207 | ``passwd`` | |
1208 | Optional. Password to authenticate with at the proxy server. |
|
1208 | Optional. Password to authenticate with at the proxy server. | |
1209 |
|
1209 | |||
1210 | ``user`` |
|
1210 | ``user`` | |
1211 | Optional. User name to authenticate with at the proxy server. |
|
1211 | Optional. User name to authenticate with at the proxy server. | |
1212 |
|
1212 | |||
1213 | ``always`` |
|
1213 | ``always`` | |
1214 | Optional. Always use the proxy, even for localhost and any entries |
|
1214 | Optional. Always use the proxy, even for localhost and any entries | |
1215 | in ``http_proxy.no``. (default: False) |
|
1215 | in ``http_proxy.no``. (default: False) | |
1216 |
|
1216 | |||
1217 | ``merge`` |
|
1217 | ``merge`` | |
1218 | --------- |
|
1218 | --------- | |
1219 |
|
1219 | |||
1220 | This section specifies behavior during merges and updates. |
|
1220 | This section specifies behavior during merges and updates. | |
1221 |
|
1221 | |||
1222 | ``checkignored`` |
|
1222 | ``checkignored`` | |
1223 | Controls behavior when an ignored file on disk has the same name as a tracked |
|
1223 | Controls behavior when an ignored file on disk has the same name as a tracked | |
1224 | file in the changeset being merged or updated to, and has different |
|
1224 | file in the changeset being merged or updated to, and has different | |
1225 | contents. Options are ``abort``, ``warn`` and ``ignore``. With ``abort``, |
|
1225 | contents. Options are ``abort``, ``warn`` and ``ignore``. With ``abort``, | |
1226 | abort on such files. With ``warn``, warn on such files and back them up as |
|
1226 | abort on such files. With ``warn``, warn on such files and back them up as | |
1227 | ``.orig``. With ``ignore``, don't print a warning and back them up as |
|
1227 | ``.orig``. With ``ignore``, don't print a warning and back them up as | |
1228 | ``.orig``. (default: ``abort``) |
|
1228 | ``.orig``. (default: ``abort``) | |
1229 |
|
1229 | |||
1230 | ``checkunknown`` |
|
1230 | ``checkunknown`` | |
1231 | Controls behavior when an unknown file that isn't ignored has the same name |
|
1231 | Controls behavior when an unknown file that isn't ignored has the same name | |
1232 | as a tracked file in the changeset being merged or updated to, and has |
|
1232 | as a tracked file in the changeset being merged or updated to, and has | |
1233 | different contents. Similar to ``merge.checkignored``, except for files that |
|
1233 | different contents. Similar to ``merge.checkignored``, except for files that | |
1234 | are not ignored. (default: ``abort``) |
|
1234 | are not ignored. (default: ``abort``) | |
1235 |
|
1235 | |||
1236 | ``merge-patterns`` |
|
1236 | ``merge-patterns`` | |
1237 | ------------------ |
|
1237 | ------------------ | |
1238 |
|
1238 | |||
1239 | This section specifies merge tools to associate with particular file |
|
1239 | This section specifies merge tools to associate with particular file | |
1240 | patterns. Tools matched here will take precedence over the default |
|
1240 | patterns. Tools matched here will take precedence over the default | |
1241 | merge tool. Patterns are globs by default, rooted at the repository |
|
1241 | merge tool. Patterns are globs by default, rooted at the repository | |
1242 | root. |
|
1242 | root. | |
1243 |
|
1243 | |||
1244 | Example:: |
|
1244 | Example:: | |
1245 |
|
1245 | |||
1246 | [merge-patterns] |
|
1246 | [merge-patterns] | |
1247 | **.c = kdiff3 |
|
1247 | **.c = kdiff3 | |
1248 | **.jpg = myimgmerge |
|
1248 | **.jpg = myimgmerge | |
1249 |
|
1249 | |||
1250 | ``merge-tools`` |
|
1250 | ``merge-tools`` | |
1251 | --------------- |
|
1251 | --------------- | |
1252 |
|
1252 | |||
1253 | This section configures external merge tools to use for file-level |
|
1253 | This section configures external merge tools to use for file-level | |
1254 | merges. This section has likely been preconfigured at install time. |
|
1254 | merges. This section has likely been preconfigured at install time. | |
1255 | Use :hg:`config merge-tools` to check the existing configuration. |
|
1255 | Use :hg:`config merge-tools` to check the existing configuration. | |
1256 | Also see :hg:`help merge-tools` for more details. |
|
1256 | Also see :hg:`help merge-tools` for more details. | |
1257 |
|
1257 | |||
1258 | Example ``~/.hgrc``:: |
|
1258 | Example ``~/.hgrc``:: | |
1259 |
|
1259 | |||
1260 | [merge-tools] |
|
1260 | [merge-tools] | |
1261 | # Override stock tool location |
|
1261 | # Override stock tool location | |
1262 | kdiff3.executable = ~/bin/kdiff3 |
|
1262 | kdiff3.executable = ~/bin/kdiff3 | |
1263 | # Specify command line |
|
1263 | # Specify command line | |
1264 | kdiff3.args = $base $local $other -o $output |
|
1264 | kdiff3.args = $base $local $other -o $output | |
1265 | # Give higher priority |
|
1265 | # Give higher priority | |
1266 | kdiff3.priority = 1 |
|
1266 | kdiff3.priority = 1 | |
1267 |
|
1267 | |||
1268 | # Changing the priority of preconfigured tool |
|
1268 | # Changing the priority of preconfigured tool | |
1269 | meld.priority = 0 |
|
1269 | meld.priority = 0 | |
1270 |
|
1270 | |||
1271 | # Disable a preconfigured tool |
|
1271 | # Disable a preconfigured tool | |
1272 | vimdiff.disabled = yes |
|
1272 | vimdiff.disabled = yes | |
1273 |
|
1273 | |||
1274 | # Define new tool |
|
1274 | # Define new tool | |
1275 | myHtmlTool.args = -m $local $other $base $output |
|
1275 | myHtmlTool.args = -m $local $other $base $output | |
1276 | myHtmlTool.regkey = Software\FooSoftware\HtmlMerge |
|
1276 | myHtmlTool.regkey = Software\FooSoftware\HtmlMerge | |
1277 | myHtmlTool.priority = 1 |
|
1277 | myHtmlTool.priority = 1 | |
1278 |
|
1278 | |||
1279 | Supported arguments: |
|
1279 | Supported arguments: | |
1280 |
|
1280 | |||
1281 | ``priority`` |
|
1281 | ``priority`` | |
1282 | The priority in which to evaluate this tool. |
|
1282 | The priority in which to evaluate this tool. | |
1283 | (default: 0) |
|
1283 | (default: 0) | |
1284 |
|
1284 | |||
1285 | ``executable`` |
|
1285 | ``executable`` | |
1286 | Either just the name of the executable or its pathname. |
|
1286 | Either just the name of the executable or its pathname. | |
1287 |
|
1287 | |||
1288 | .. container:: windows |
|
1288 | .. container:: windows | |
1289 |
|
1289 | |||
1290 | On Windows, the path can use environment variables with ${ProgramFiles} |
|
1290 | On Windows, the path can use environment variables with ${ProgramFiles} | |
1291 | syntax. |
|
1291 | syntax. | |
1292 |
|
1292 | |||
1293 | (default: the tool name) |
|
1293 | (default: the tool name) | |
1294 |
|
1294 | |||
1295 | ``args`` |
|
1295 | ``args`` | |
1296 | The arguments to pass to the tool executable. You can refer to the |
|
1296 | The arguments to pass to the tool executable. You can refer to the | |
1297 | files being merged as well as the output file through these |
|
1297 | files being merged as well as the output file through these | |
1298 | variables: ``$base``, ``$local``, ``$other``, ``$output``. The meaning |
|
1298 | variables: ``$base``, ``$local``, ``$other``, ``$output``. The meaning | |
1299 | of ``$local`` and ``$other`` can vary depending on which action is being |
|
1299 | of ``$local`` and ``$other`` can vary depending on which action is being | |
1300 | performed. During and update or merge, ``$local`` represents the original |
|
1300 | performed. During and update or merge, ``$local`` represents the original | |
1301 | state of the file, while ``$other`` represents the commit you are updating |
|
1301 | state of the file, while ``$other`` represents the commit you are updating | |
1302 | to or the commit you are merging with. During a rebase ``$local`` |
|
1302 | to or the commit you are merging with. During a rebase ``$local`` | |
1303 | represents the destination of the rebase, and ``$other`` represents the |
|
1303 | represents the destination of the rebase, and ``$other`` represents the | |
1304 | commit being rebased. |
|
1304 | commit being rebased. | |
1305 | (default: ``$local $base $other``) |
|
1305 | (default: ``$local $base $other``) | |
1306 |
|
1306 | |||
1307 | ``premerge`` |
|
1307 | ``premerge`` | |
1308 | Attempt to run internal non-interactive 3-way merge tool before |
|
1308 | Attempt to run internal non-interactive 3-way merge tool before | |
1309 | launching external tool. Options are ``true``, ``false``, ``keep`` or |
|
1309 | launching external tool. Options are ``true``, ``false``, ``keep`` or | |
1310 | ``keep-merge3``. The ``keep`` option will leave markers in the file if the |
|
1310 | ``keep-merge3``. The ``keep`` option will leave markers in the file if the | |
1311 | premerge fails. The ``keep-merge3`` will do the same but include information |
|
1311 | premerge fails. The ``keep-merge3`` will do the same but include information | |
1312 | about the base of the merge in the marker (see internal :merge3 in |
|
1312 | about the base of the merge in the marker (see internal :merge3 in | |
1313 | :hg:`help merge-tools`). |
|
1313 | :hg:`help merge-tools`). | |
1314 | (default: True) |
|
1314 | (default: True) | |
1315 |
|
1315 | |||
1316 | ``binary`` |
|
1316 | ``binary`` | |
1317 | This tool can merge binary files. (default: False, unless tool |
|
1317 | This tool can merge binary files. (default: False, unless tool | |
1318 | was selected by file pattern match) |
|
1318 | was selected by file pattern match) | |
1319 |
|
1319 | |||
1320 | ``symlink`` |
|
1320 | ``symlink`` | |
1321 | This tool can merge symlinks. (default: False) |
|
1321 | This tool can merge symlinks. (default: False) | |
1322 |
|
1322 | |||
1323 | ``check`` |
|
1323 | ``check`` | |
1324 | A list of merge success-checking options: |
|
1324 | A list of merge success-checking options: | |
1325 |
|
1325 | |||
1326 | ``changed`` |
|
1326 | ``changed`` | |
1327 | Ask whether merge was successful when the merged file shows no changes. |
|
1327 | Ask whether merge was successful when the merged file shows no changes. | |
1328 | ``conflicts`` |
|
1328 | ``conflicts`` | |
1329 | Check whether there are conflicts even though the tool reported success. |
|
1329 | Check whether there are conflicts even though the tool reported success. | |
1330 | ``prompt`` |
|
1330 | ``prompt`` | |
1331 | Always prompt for merge success, regardless of success reported by tool. |
|
1331 | Always prompt for merge success, regardless of success reported by tool. | |
1332 |
|
1332 | |||
1333 | ``fixeol`` |
|
1333 | ``fixeol`` | |
1334 | Attempt to fix up EOL changes caused by the merge tool. |
|
1334 | Attempt to fix up EOL changes caused by the merge tool. | |
1335 | (default: False) |
|
1335 | (default: False) | |
1336 |
|
1336 | |||
1337 | ``gui`` |
|
1337 | ``gui`` | |
1338 | This tool requires a graphical interface to run. (default: False) |
|
1338 | This tool requires a graphical interface to run. (default: False) | |
1339 |
|
1339 | |||
1340 | .. container:: windows |
|
1340 | .. container:: windows | |
1341 |
|
1341 | |||
1342 | ``regkey`` |
|
1342 | ``regkey`` | |
1343 | Windows registry key which describes install location of this |
|
1343 | Windows registry key which describes install location of this | |
1344 | tool. Mercurial will search for this key first under |
|
1344 | tool. Mercurial will search for this key first under | |
1345 | ``HKEY_CURRENT_USER`` and then under ``HKEY_LOCAL_MACHINE``. |
|
1345 | ``HKEY_CURRENT_USER`` and then under ``HKEY_LOCAL_MACHINE``. | |
1346 | (default: None) |
|
1346 | (default: None) | |
1347 |
|
1347 | |||
1348 | ``regkeyalt`` |
|
1348 | ``regkeyalt`` | |
1349 | An alternate Windows registry key to try if the first key is not |
|
1349 | An alternate Windows registry key to try if the first key is not | |
1350 | found. The alternate key uses the same ``regname`` and ``regappend`` |
|
1350 | found. The alternate key uses the same ``regname`` and ``regappend`` | |
1351 | semantics of the primary key. The most common use for this key |
|
1351 | semantics of the primary key. The most common use for this key | |
1352 | is to search for 32bit applications on 64bit operating systems. |
|
1352 | is to search for 32bit applications on 64bit operating systems. | |
1353 | (default: None) |
|
1353 | (default: None) | |
1354 |
|
1354 | |||
1355 | ``regname`` |
|
1355 | ``regname`` | |
1356 | Name of value to read from specified registry key. |
|
1356 | Name of value to read from specified registry key. | |
1357 | (default: the unnamed (default) value) |
|
1357 | (default: the unnamed (default) value) | |
1358 |
|
1358 | |||
1359 | ``regappend`` |
|
1359 | ``regappend`` | |
1360 | String to append to the value read from the registry, typically |
|
1360 | String to append to the value read from the registry, typically | |
1361 | the executable name of the tool. |
|
1361 | the executable name of the tool. | |
1362 | (default: None) |
|
1362 | (default: None) | |
1363 |
|
1363 | |||
1364 | ``pager`` |
|
1364 | ``pager`` | |
1365 | --------- |
|
1365 | --------- | |
1366 |
|
1366 | |||
1367 | Setting used to control when to paginate and with what external tool. See |
|
1367 | Setting used to control when to paginate and with what external tool. See | |
1368 | :hg:`help pager` for details. |
|
1368 | :hg:`help pager` for details. | |
1369 |
|
1369 | |||
1370 | ``pager`` |
|
1370 | ``pager`` | |
1371 | Define the external tool used as pager. |
|
1371 | Define the external tool used as pager. | |
1372 |
|
1372 | |||
1373 | If no pager is set, Mercurial uses the environment variable $PAGER. |
|
1373 | If no pager is set, Mercurial uses the environment variable $PAGER. | |
1374 | If neither pager.pager, nor $PAGER is set, a default pager will be |
|
1374 | If neither pager.pager, nor $PAGER is set, a default pager will be | |
1375 | used, typically `less` on Unix and `more` on Windows. Example:: |
|
1375 | used, typically `less` on Unix and `more` on Windows. Example:: | |
1376 |
|
1376 | |||
1377 | [pager] |
|
1377 | [pager] | |
1378 | pager = less -FRX |
|
1378 | pager = less -FRX | |
1379 |
|
1379 | |||
1380 | ``ignore`` |
|
1380 | ``ignore`` | |
1381 | List of commands to disable the pager for. Example:: |
|
1381 | List of commands to disable the pager for. Example:: | |
1382 |
|
1382 | |||
1383 | [pager] |
|
1383 | [pager] | |
1384 | ignore = version, help, update |
|
1384 | ignore = version, help, update | |
1385 |
|
1385 | |||
1386 | ``patch`` |
|
1386 | ``patch`` | |
1387 | --------- |
|
1387 | --------- | |
1388 |
|
1388 | |||
1389 | Settings used when applying patches, for instance through the 'import' |
|
1389 | Settings used when applying patches, for instance through the 'import' | |
1390 | command or with Mercurial Queues extension. |
|
1390 | command or with Mercurial Queues extension. | |
1391 |
|
1391 | |||
1392 | ``eol`` |
|
1392 | ``eol`` | |
1393 | When set to 'strict' patch content and patched files end of lines |
|
1393 | When set to 'strict' patch content and patched files end of lines | |
1394 | are preserved. When set to ``lf`` or ``crlf``, both files end of |
|
1394 | are preserved. When set to ``lf`` or ``crlf``, both files end of | |
1395 | lines are ignored when patching and the result line endings are |
|
1395 | lines are ignored when patching and the result line endings are | |
1396 | normalized to either LF (Unix) or CRLF (Windows). When set to |
|
1396 | normalized to either LF (Unix) or CRLF (Windows). When set to | |
1397 | ``auto``, end of lines are again ignored while patching but line |
|
1397 | ``auto``, end of lines are again ignored while patching but line | |
1398 | endings in patched files are normalized to their original setting |
|
1398 | endings in patched files are normalized to their original setting | |
1399 | on a per-file basis. If target file does not exist or has no end |
|
1399 | on a per-file basis. If target file does not exist or has no end | |
1400 | of line, patch line endings are preserved. |
|
1400 | of line, patch line endings are preserved. | |
1401 | (default: strict) |
|
1401 | (default: strict) | |
1402 |
|
1402 | |||
1403 | ``fuzz`` |
|
1403 | ``fuzz`` | |
1404 | The number of lines of 'fuzz' to allow when applying patches. This |
|
1404 | The number of lines of 'fuzz' to allow when applying patches. This | |
1405 | controls how much context the patcher is allowed to ignore when |
|
1405 | controls how much context the patcher is allowed to ignore when | |
1406 | trying to apply a patch. |
|
1406 | trying to apply a patch. | |
1407 | (default: 2) |
|
1407 | (default: 2) | |
1408 |
|
1408 | |||
1409 | ``paths`` |
|
1409 | ``paths`` | |
1410 | --------- |
|
1410 | --------- | |
1411 |
|
1411 | |||
1412 | Assigns symbolic names and behavior to repositories. |
|
1412 | Assigns symbolic names and behavior to repositories. | |
1413 |
|
1413 | |||
1414 | Options are symbolic names defining the URL or directory that is the |
|
1414 | Options are symbolic names defining the URL or directory that is the | |
1415 | location of the repository. Example:: |
|
1415 | location of the repository. Example:: | |
1416 |
|
1416 | |||
1417 | [paths] |
|
1417 | [paths] | |
1418 | my_server = https://example.com/my_repo |
|
1418 | my_server = https://example.com/my_repo | |
1419 | local_path = /home/me/repo |
|
1419 | local_path = /home/me/repo | |
1420 |
|
1420 | |||
1421 | These symbolic names can be used from the command line. To pull |
|
1421 | These symbolic names can be used from the command line. To pull | |
1422 | from ``my_server``: :hg:`pull my_server`. To push to ``local_path``: |
|
1422 | from ``my_server``: :hg:`pull my_server`. To push to ``local_path``: | |
1423 | :hg:`push local_path`. |
|
1423 | :hg:`push local_path`. | |
1424 |
|
1424 | |||
1425 | Options containing colons (``:``) denote sub-options that can influence |
|
1425 | Options containing colons (``:``) denote sub-options that can influence | |
1426 | behavior for that specific path. Example:: |
|
1426 | behavior for that specific path. Example:: | |
1427 |
|
1427 | |||
1428 | [paths] |
|
1428 | [paths] | |
1429 | my_server = https://example.com/my_path |
|
1429 | my_server = https://example.com/my_path | |
1430 | my_server:pushurl = ssh://example.com/my_path |
|
1430 | my_server:pushurl = ssh://example.com/my_path | |
1431 |
|
1431 | |||
1432 | The following sub-options can be defined: |
|
1432 | The following sub-options can be defined: | |
1433 |
|
1433 | |||
1434 | ``pushurl`` |
|
1434 | ``pushurl`` | |
1435 | The URL to use for push operations. If not defined, the location |
|
1435 | The URL to use for push operations. If not defined, the location | |
1436 | defined by the path's main entry is used. |
|
1436 | defined by the path's main entry is used. | |
1437 |
|
1437 | |||
1438 | ``pushrev`` |
|
1438 | ``pushrev`` | |
1439 | A revset defining which revisions to push by default. |
|
1439 | A revset defining which revisions to push by default. | |
1440 |
|
1440 | |||
1441 | When :hg:`push` is executed without a ``-r`` argument, the revset |
|
1441 | When :hg:`push` is executed without a ``-r`` argument, the revset | |
1442 | defined by this sub-option is evaluated to determine what to push. |
|
1442 | defined by this sub-option is evaluated to determine what to push. | |
1443 |
|
1443 | |||
1444 | For example, a value of ``.`` will push the working directory's |
|
1444 | For example, a value of ``.`` will push the working directory's | |
1445 | revision by default. |
|
1445 | revision by default. | |
1446 |
|
1446 | |||
1447 | Revsets specifying bookmarks will not result in the bookmark being |
|
1447 | Revsets specifying bookmarks will not result in the bookmark being | |
1448 | pushed. |
|
1448 | pushed. | |
1449 |
|
1449 | |||
1450 | The following special named paths exist: |
|
1450 | The following special named paths exist: | |
1451 |
|
1451 | |||
1452 | ``default`` |
|
1452 | ``default`` | |
1453 | The URL or directory to use when no source or remote is specified. |
|
1453 | The URL or directory to use when no source or remote is specified. | |
1454 |
|
1454 | |||
1455 | :hg:`clone` will automatically define this path to the location the |
|
1455 | :hg:`clone` will automatically define this path to the location the | |
1456 | repository was cloned from. |
|
1456 | repository was cloned from. | |
1457 |
|
1457 | |||
1458 | ``default-push`` |
|
1458 | ``default-push`` | |
1459 | (deprecated) The URL or directory for the default :hg:`push` location. |
|
1459 | (deprecated) The URL or directory for the default :hg:`push` location. | |
1460 | ``default:pushurl`` should be used instead. |
|
1460 | ``default:pushurl`` should be used instead. | |
1461 |
|
1461 | |||
1462 | ``phases`` |
|
1462 | ``phases`` | |
1463 | ---------- |
|
1463 | ---------- | |
1464 |
|
1464 | |||
1465 | Specifies default handling of phases. See :hg:`help phases` for more |
|
1465 | Specifies default handling of phases. See :hg:`help phases` for more | |
1466 | information about working with phases. |
|
1466 | information about working with phases. | |
1467 |
|
1467 | |||
1468 | ``publish`` |
|
1468 | ``publish`` | |
1469 | Controls draft phase behavior when working as a server. When true, |
|
1469 | Controls draft phase behavior when working as a server. When true, | |
1470 | pushed changesets are set to public in both client and server and |
|
1470 | pushed changesets are set to public in both client and server and | |
1471 | pulled or cloned changesets are set to public in the client. |
|
1471 | pulled or cloned changesets are set to public in the client. | |
1472 | (default: True) |
|
1472 | (default: True) | |
1473 |
|
1473 | |||
1474 | ``new-commit`` |
|
1474 | ``new-commit`` | |
1475 | Phase of newly-created commits. |
|
1475 | Phase of newly-created commits. | |
1476 | (default: draft) |
|
1476 | (default: draft) | |
1477 |
|
1477 | |||
1478 | ``checksubrepos`` |
|
1478 | ``checksubrepos`` | |
1479 | Check the phase of the current revision of each subrepository. Allowed |
|
1479 | Check the phase of the current revision of each subrepository. Allowed | |
1480 | values are "ignore", "follow" and "abort". For settings other than |
|
1480 | values are "ignore", "follow" and "abort". For settings other than | |
1481 | "ignore", the phase of the current revision of each subrepository is |
|
1481 | "ignore", the phase of the current revision of each subrepository is | |
1482 | checked before committing the parent repository. If any of those phases is |
|
1482 | checked before committing the parent repository. If any of those phases is | |
1483 | greater than the phase of the parent repository (e.g. if a subrepo is in a |
|
1483 | greater than the phase of the parent repository (e.g. if a subrepo is in a | |
1484 | "secret" phase while the parent repo is in "draft" phase), the commit is |
|
1484 | "secret" phase while the parent repo is in "draft" phase), the commit is | |
1485 | either aborted (if checksubrepos is set to "abort") or the higher phase is |
|
1485 | either aborted (if checksubrepos is set to "abort") or the higher phase is | |
1486 | used for the parent repository commit (if set to "follow"). |
|
1486 | used for the parent repository commit (if set to "follow"). | |
1487 | (default: follow) |
|
1487 | (default: follow) | |
1488 |
|
1488 | |||
1489 |
|
1489 | |||
1490 | ``profiling`` |
|
1490 | ``profiling`` | |
1491 | ------------- |
|
1491 | ------------- | |
1492 |
|
1492 | |||
1493 | Specifies profiling type, format, and file output. Two profilers are |
|
1493 | Specifies profiling type, format, and file output. Two profilers are | |
1494 | supported: an instrumenting profiler (named ``ls``), and a sampling |
|
1494 | supported: an instrumenting profiler (named ``ls``), and a sampling | |
1495 | profiler (named ``stat``). |
|
1495 | profiler (named ``stat``). | |
1496 |
|
1496 | |||
1497 | In this section description, 'profiling data' stands for the raw data |
|
1497 | In this section description, 'profiling data' stands for the raw data | |
1498 | collected during profiling, while 'profiling report' stands for a |
|
1498 | collected during profiling, while 'profiling report' stands for a | |
1499 | statistical text report generated from the profiling data. The |
|
1499 | statistical text report generated from the profiling data. The | |
1500 | profiling is done using lsprof. |
|
1500 | profiling is done using lsprof. | |
1501 |
|
1501 | |||
1502 | ``enabled`` |
|
1502 | ``enabled`` | |
1503 | Enable the profiler. |
|
1503 | Enable the profiler. | |
1504 | (default: false) |
|
1504 | (default: false) | |
1505 |
|
1505 | |||
1506 | This is equivalent to passing ``--profile`` on the command line. |
|
1506 | This is equivalent to passing ``--profile`` on the command line. | |
1507 |
|
1507 | |||
1508 | ``type`` |
|
1508 | ``type`` | |
1509 | The type of profiler to use. |
|
1509 | The type of profiler to use. | |
1510 | (default: stat) |
|
1510 | (default: stat) | |
1511 |
|
1511 | |||
1512 | ``ls`` |
|
1512 | ``ls`` | |
1513 | Use Python's built-in instrumenting profiler. This profiler |
|
1513 | Use Python's built-in instrumenting profiler. This profiler | |
1514 | works on all platforms, but each line number it reports is the |
|
1514 | works on all platforms, but each line number it reports is the | |
1515 | first line of a function. This restriction makes it difficult to |
|
1515 | first line of a function. This restriction makes it difficult to | |
1516 | identify the expensive parts of a non-trivial function. |
|
1516 | identify the expensive parts of a non-trivial function. | |
1517 | ``stat`` |
|
1517 | ``stat`` | |
1518 | Use a statistical profiler, statprof. This profiler is most |
|
1518 | Use a statistical profiler, statprof. This profiler is most | |
1519 | useful for profiling commands that run for longer than about 0.1 |
|
1519 | useful for profiling commands that run for longer than about 0.1 | |
1520 | seconds. |
|
1520 | seconds. | |
1521 |
|
1521 | |||
1522 | ``format`` |
|
1522 | ``format`` | |
1523 | Profiling format. Specific to the ``ls`` instrumenting profiler. |
|
1523 | Profiling format. Specific to the ``ls`` instrumenting profiler. | |
1524 | (default: text) |
|
1524 | (default: text) | |
1525 |
|
1525 | |||
1526 | ``text`` |
|
1526 | ``text`` | |
1527 | Generate a profiling report. When saving to a file, it should be |
|
1527 | Generate a profiling report. When saving to a file, it should be | |
1528 | noted that only the report is saved, and the profiling data is |
|
1528 | noted that only the report is saved, and the profiling data is | |
1529 | not kept. |
|
1529 | not kept. | |
1530 | ``kcachegrind`` |
|
1530 | ``kcachegrind`` | |
1531 | Format profiling data for kcachegrind use: when saving to a |
|
1531 | Format profiling data for kcachegrind use: when saving to a | |
1532 | file, the generated file can directly be loaded into |
|
1532 | file, the generated file can directly be loaded into | |
1533 | kcachegrind. |
|
1533 | kcachegrind. | |
1534 |
|
1534 | |||
1535 | ``statformat`` |
|
1535 | ``statformat`` | |
1536 | Profiling format for the ``stat`` profiler. |
|
1536 | Profiling format for the ``stat`` profiler. | |
1537 | (default: hotpath) |
|
1537 | (default: hotpath) | |
1538 |
|
1538 | |||
1539 | ``hotpath`` |
|
1539 | ``hotpath`` | |
1540 | Show a tree-based display containing the hot path of execution (where |
|
1540 | Show a tree-based display containing the hot path of execution (where | |
1541 | most time was spent). |
|
1541 | most time was spent). | |
1542 | ``bymethod`` |
|
1542 | ``bymethod`` | |
1543 | Show a table of methods ordered by how frequently they are active. |
|
1543 | Show a table of methods ordered by how frequently they are active. | |
1544 | ``byline`` |
|
1544 | ``byline`` | |
1545 | Show a table of lines in files ordered by how frequently they are active. |
|
1545 | Show a table of lines in files ordered by how frequently they are active. | |
1546 | ``json`` |
|
1546 | ``json`` | |
1547 | Render profiling data as JSON. |
|
1547 | Render profiling data as JSON. | |
1548 |
|
1548 | |||
1549 | ``frequency`` |
|
1549 | ``frequency`` | |
1550 | Sampling frequency. Specific to the ``stat`` sampling profiler. |
|
1550 | Sampling frequency. Specific to the ``stat`` sampling profiler. | |
1551 | (default: 1000) |
|
1551 | (default: 1000) | |
1552 |
|
1552 | |||
1553 | ``output`` |
|
1553 | ``output`` | |
1554 | File path where profiling data or report should be saved. If the |
|
1554 | File path where profiling data or report should be saved. If the | |
1555 | file exists, it is replaced. (default: None, data is printed on |
|
1555 | file exists, it is replaced. (default: None, data is printed on | |
1556 | stderr) |
|
1556 | stderr) | |
1557 |
|
1557 | |||
1558 | ``sort`` |
|
1558 | ``sort`` | |
1559 | Sort field. Specific to the ``ls`` instrumenting profiler. |
|
1559 | Sort field. Specific to the ``ls`` instrumenting profiler. | |
1560 | One of ``callcount``, ``reccallcount``, ``totaltime`` and |
|
1560 | One of ``callcount``, ``reccallcount``, ``totaltime`` and | |
1561 | ``inlinetime``. |
|
1561 | ``inlinetime``. | |
1562 | (default: inlinetime) |
|
1562 | (default: inlinetime) | |
1563 |
|
1563 | |||
1564 | ``limit`` |
|
1564 | ``limit`` | |
1565 | Number of lines to show. Specific to the ``ls`` instrumenting profiler. |
|
1565 | Number of lines to show. Specific to the ``ls`` instrumenting profiler. | |
1566 | (default: 30) |
|
1566 | (default: 30) | |
1567 |
|
1567 | |||
1568 | ``nested`` |
|
1568 | ``nested`` | |
1569 | Show at most this number of lines of drill-down info after each main entry. |
|
1569 | Show at most this number of lines of drill-down info after each main entry. | |
1570 | This can help explain the difference between Total and Inline. |
|
1570 | This can help explain the difference between Total and Inline. | |
1571 | Specific to the ``ls`` instrumenting profiler. |
|
1571 | Specific to the ``ls`` instrumenting profiler. | |
1572 | (default: 5) |
|
1572 | (default: 5) | |
1573 |
|
1573 | |||
1574 | ``progress`` |
|
1574 | ``progress`` | |
1575 | ------------ |
|
1575 | ------------ | |
1576 |
|
1576 | |||
1577 | Mercurial commands can draw progress bars that are as informative as |
|
1577 | Mercurial commands can draw progress bars that are as informative as | |
1578 | possible. Some progress bars only offer indeterminate information, while others |
|
1578 | possible. Some progress bars only offer indeterminate information, while others | |
1579 | have a definite end point. |
|
1579 | have a definite end point. | |
1580 |
|
1580 | |||
1581 | ``delay`` |
|
1581 | ``delay`` | |
1582 | Number of seconds (float) before showing the progress bar. (default: 3) |
|
1582 | Number of seconds (float) before showing the progress bar. (default: 3) | |
1583 |
|
1583 | |||
1584 | ``changedelay`` |
|
1584 | ``changedelay`` | |
1585 | Minimum delay before showing a new topic. When set to less than 3 * refresh, |
|
1585 | Minimum delay before showing a new topic. When set to less than 3 * refresh, | |
1586 | that value will be used instead. (default: 1) |
|
1586 | that value will be used instead. (default: 1) | |
1587 |
|
1587 | |||
1588 | ``refresh`` |
|
1588 | ``refresh`` | |
1589 | Time in seconds between refreshes of the progress bar. (default: 0.1) |
|
1589 | Time in seconds between refreshes of the progress bar. (default: 0.1) | |
1590 |
|
1590 | |||
1591 | ``format`` |
|
1591 | ``format`` | |
1592 | Format of the progress bar. |
|
1592 | Format of the progress bar. | |
1593 |
|
1593 | |||
1594 | Valid entries for the format field are ``topic``, ``bar``, ``number``, |
|
1594 | Valid entries for the format field are ``topic``, ``bar``, ``number``, | |
1595 | ``unit``, ``estimate``, ``speed``, and ``item``. ``item`` defaults to the |
|
1595 | ``unit``, ``estimate``, ``speed``, and ``item``. ``item`` defaults to the | |
1596 | last 20 characters of the item, but this can be changed by adding either |
|
1596 | last 20 characters of the item, but this can be changed by adding either | |
1597 | ``-<num>`` which would take the last num characters, or ``+<num>`` for the |
|
1597 | ``-<num>`` which would take the last num characters, or ``+<num>`` for the | |
1598 | first num characters. |
|
1598 | first num characters. | |
1599 |
|
1599 | |||
1600 | (default: topic bar number estimate) |
|
1600 | (default: topic bar number estimate) | |
1601 |
|
1601 | |||
1602 | ``width`` |
|
1602 | ``width`` | |
1603 | If set, the maximum width of the progress information (that is, min(width, |
|
1603 | If set, the maximum width of the progress information (that is, min(width, | |
1604 | term width) will be used). |
|
1604 | term width) will be used). | |
1605 |
|
1605 | |||
1606 | ``clear-complete`` |
|
1606 | ``clear-complete`` | |
1607 | Clear the progress bar after it's done. (default: True) |
|
1607 | Clear the progress bar after it's done. (default: True) | |
1608 |
|
1608 | |||
1609 | ``disable`` |
|
1609 | ``disable`` | |
1610 | If true, don't show a progress bar. |
|
1610 | If true, don't show a progress bar. | |
1611 |
|
1611 | |||
1612 | ``assume-tty`` |
|
1612 | ``assume-tty`` | |
1613 | If true, ALWAYS show a progress bar, unless disable is given. |
|
1613 | If true, ALWAYS show a progress bar, unless disable is given. | |
1614 |
|
1614 | |||
1615 | ``rebase`` |
|
1615 | ``rebase`` | |
1616 | ---------- |
|
1616 | ---------- | |
1617 |
|
1617 | |||
1618 | ``allowdivergence`` |
|
1618 | ``allowdivergence`` | |
1619 | Default to False, when True allow creating divergence when performing |
|
1619 | Default to False, when True allow creating divergence when performing | |
1620 | rebase of obsolete changesets. |
|
1620 | rebase of obsolete changesets. | |
1621 |
|
1621 | |||
1622 | ``revsetalias`` |
|
1622 | ``revsetalias`` | |
1623 | --------------- |
|
1623 | --------------- | |
1624 |
|
1624 | |||
1625 | Alias definitions for revsets. See :hg:`help revsets` for details. |
|
1625 | Alias definitions for revsets. See :hg:`help revsets` for details. | |
1626 |
|
1626 | |||
1627 | ``server`` |
|
1627 | ``server`` | |
1628 | ---------- |
|
1628 | ---------- | |
1629 |
|
1629 | |||
1630 | Controls generic server settings. |
|
1630 | Controls generic server settings. | |
1631 |
|
1631 | |||
1632 | ``compressionengines`` |
|
1632 | ``compressionengines`` | |
1633 | List of compression engines and their relative priority to advertise |
|
1633 | List of compression engines and their relative priority to advertise | |
1634 | to clients. |
|
1634 | to clients. | |
1635 |
|
1635 | |||
1636 | The order of compression engines determines their priority, the first |
|
1636 | The order of compression engines determines their priority, the first | |
1637 | having the highest priority. If a compression engine is not listed |
|
1637 | having the highest priority. If a compression engine is not listed | |
1638 | here, it won't be advertised to clients. |
|
1638 | here, it won't be advertised to clients. | |
1639 |
|
1639 | |||
1640 | If not set (the default), built-in defaults are used. Run |
|
1640 | If not set (the default), built-in defaults are used. Run | |
1641 | :hg:`debuginstall` to list available compression engines and their |
|
1641 | :hg:`debuginstall` to list available compression engines and their | |
1642 | default wire protocol priority. |
|
1642 | default wire protocol priority. | |
1643 |
|
1643 | |||
1644 | Older Mercurial clients only support zlib compression and this setting |
|
1644 | Older Mercurial clients only support zlib compression and this setting | |
1645 | has no effect for legacy clients. |
|
1645 | has no effect for legacy clients. | |
1646 |
|
1646 | |||
1647 | ``uncompressed`` |
|
1647 | ``uncompressed`` | |
1648 | Whether to allow clients to clone a repository using the |
|
1648 | Whether to allow clients to clone a repository using the | |
1649 | uncompressed streaming protocol. This transfers about 40% more |
|
1649 | uncompressed streaming protocol. This transfers about 40% more | |
1650 | data than a regular clone, but uses less memory and CPU on both |
|
1650 | data than a regular clone, but uses less memory and CPU on both | |
1651 | server and client. Over a LAN (100 Mbps or better) or a very fast |
|
1651 | server and client. Over a LAN (100 Mbps or better) or a very fast | |
1652 | WAN, an uncompressed streaming clone is a lot faster (~10x) than a |
|
1652 | WAN, an uncompressed streaming clone is a lot faster (~10x) than a | |
1653 | regular clone. Over most WAN connections (anything slower than |
|
1653 | regular clone. Over most WAN connections (anything slower than | |
1654 | about 6 Mbps), uncompressed streaming is slower, because of the |
|
1654 | about 6 Mbps), uncompressed streaming is slower, because of the | |
1655 | extra data transfer overhead. This mode will also temporarily hold |
|
1655 | extra data transfer overhead. This mode will also temporarily hold | |
1656 | the write lock while determining what data to transfer. |
|
1656 | the write lock while determining what data to transfer. | |
1657 | (default: True) |
|
1657 | (default: True) | |
1658 |
|
1658 | |||
1659 | ``preferuncompressed`` |
|
1659 | ``preferuncompressed`` | |
1660 | When set, clients will try to use the uncompressed streaming |
|
1660 | When set, clients will try to use the uncompressed streaming | |
1661 | protocol. (default: False) |
|
1661 | protocol. (default: False) | |
1662 |
|
1662 | |||
1663 | ``validate`` |
|
1663 | ``validate`` | |
1664 | Whether to validate the completeness of pushed changesets by |
|
1664 | Whether to validate the completeness of pushed changesets by | |
1665 | checking that all new file revisions specified in manifests are |
|
1665 | checking that all new file revisions specified in manifests are | |
1666 | present. (default: False) |
|
1666 | present. (default: False) | |
1667 |
|
1667 | |||
1668 | ``maxhttpheaderlen`` |
|
1668 | ``maxhttpheaderlen`` | |
1669 | Instruct HTTP clients not to send request headers longer than this |
|
1669 | Instruct HTTP clients not to send request headers longer than this | |
1670 | many bytes. (default: 1024) |
|
1670 | many bytes. (default: 1024) | |
1671 |
|
1671 | |||
1672 | ``bundle1`` |
|
1672 | ``bundle1`` | |
1673 | Whether to allow clients to push and pull using the legacy bundle1 |
|
1673 | Whether to allow clients to push and pull using the legacy bundle1 | |
1674 | exchange format. (default: True) |
|
1674 | exchange format. (default: True) | |
1675 |
|
1675 | |||
1676 | ``bundle1gd`` |
|
1676 | ``bundle1gd`` | |
1677 | Like ``bundle1`` but only used if the repository is using the |
|
1677 | Like ``bundle1`` but only used if the repository is using the | |
1678 | *generaldelta* storage format. (default: True) |
|
1678 | *generaldelta* storage format. (default: True) | |
1679 |
|
1679 | |||
1680 | ``bundle1.push`` |
|
1680 | ``bundle1.push`` | |
1681 | Whether to allow clients to push using the legacy bundle1 exchange |
|
1681 | Whether to allow clients to push using the legacy bundle1 exchange | |
1682 | format. (default: True) |
|
1682 | format. (default: True) | |
1683 |
|
1683 | |||
1684 | ``bundle1gd.push`` |
|
1684 | ``bundle1gd.push`` | |
1685 | Like ``bundle1.push`` but only used if the repository is using the |
|
1685 | Like ``bundle1.push`` but only used if the repository is using the | |
1686 | *generaldelta* storage format. (default: True) |
|
1686 | *generaldelta* storage format. (default: True) | |
1687 |
|
1687 | |||
1688 | ``bundle1.pull`` |
|
1688 | ``bundle1.pull`` | |
1689 | Whether to allow clients to pull using the legacy bundle1 exchange |
|
1689 | Whether to allow clients to pull using the legacy bundle1 exchange | |
1690 | format. (default: True) |
|
1690 | format. (default: True) | |
1691 |
|
1691 | |||
1692 | ``bundle1gd.pull`` |
|
1692 | ``bundle1gd.pull`` | |
1693 | Like ``bundle1.pull`` but only used if the repository is using the |
|
1693 | Like ``bundle1.pull`` but only used if the repository is using the | |
1694 | *generaldelta* storage format. (default: True) |
|
1694 | *generaldelta* storage format. (default: True) | |
1695 |
|
1695 | |||
1696 | Large repositories using the *generaldelta* storage format should |
|
1696 | Large repositories using the *generaldelta* storage format should | |
1697 | consider setting this option because converting *generaldelta* |
|
1697 | consider setting this option because converting *generaldelta* | |
1698 | repositories to the exchange format required by the bundle1 data |
|
1698 | repositories to the exchange format required by the bundle1 data | |
1699 | format can consume a lot of CPU. |
|
1699 | format can consume a lot of CPU. | |
1700 |
|
1700 | |||
1701 | ``zliblevel`` |
|
1701 | ``zliblevel`` | |
1702 | Integer between ``-1`` and ``9`` that controls the zlib compression level |
|
1702 | Integer between ``-1`` and ``9`` that controls the zlib compression level | |
1703 | for wire protocol commands that send zlib compressed output (notably the |
|
1703 | for wire protocol commands that send zlib compressed output (notably the | |
1704 | commands that send repository history data). |
|
1704 | commands that send repository history data). | |
1705 |
|
1705 | |||
1706 | The default (``-1``) uses the default zlib compression level, which is |
|
1706 | The default (``-1``) uses the default zlib compression level, which is | |
1707 | likely equivalent to ``6``. ``0`` means no compression. ``9`` means |
|
1707 | likely equivalent to ``6``. ``0`` means no compression. ``9`` means | |
1708 | maximum compression. |
|
1708 | maximum compression. | |
1709 |
|
1709 | |||
1710 | Setting this option allows server operators to make trade-offs between |
|
1710 | Setting this option allows server operators to make trade-offs between | |
1711 | bandwidth and CPU used. Lowering the compression lowers CPU utilization |
|
1711 | bandwidth and CPU used. Lowering the compression lowers CPU utilization | |
1712 | but sends more bytes to clients. |
|
1712 | but sends more bytes to clients. | |
1713 |
|
1713 | |||
1714 | This option only impacts the HTTP server. |
|
1714 | This option only impacts the HTTP server. | |
1715 |
|
1715 | |||
1716 | ``zstdlevel`` |
|
1716 | ``zstdlevel`` | |
1717 | Integer between ``1`` and ``22`` that controls the zstd compression level |
|
1717 | Integer between ``1`` and ``22`` that controls the zstd compression level | |
1718 | for wire protocol commands. ``1`` is the minimal amount of compression and |
|
1718 | for wire protocol commands. ``1`` is the minimal amount of compression and | |
1719 | ``22`` is the highest amount of compression. |
|
1719 | ``22`` is the highest amount of compression. | |
1720 |
|
1720 | |||
1721 | The default (``3``) should be significantly faster than zlib while likely |
|
1721 | The default (``3``) should be significantly faster than zlib while likely | |
1722 | delivering better compression ratios. |
|
1722 | delivering better compression ratios. | |
1723 |
|
1723 | |||
1724 | This option only impacts the HTTP server. |
|
1724 | This option only impacts the HTTP server. | |
1725 |
|
1725 | |||
1726 | See also ``server.zliblevel``. |
|
1726 | See also ``server.zliblevel``. | |
1727 |
|
1727 | |||
1728 | ``smtp`` |
|
1728 | ``smtp`` | |
1729 | -------- |
|
1729 | -------- | |
1730 |
|
1730 | |||
1731 | Configuration for extensions that need to send email messages. |
|
1731 | Configuration for extensions that need to send email messages. | |
1732 |
|
1732 | |||
1733 | ``host`` |
|
1733 | ``host`` | |
1734 | Host name of mail server, e.g. "mail.example.com". |
|
1734 | Host name of mail server, e.g. "mail.example.com". | |
1735 |
|
1735 | |||
1736 | ``port`` |
|
1736 | ``port`` | |
1737 | Optional. Port to connect to on mail server. (default: 465 if |
|
1737 | Optional. Port to connect to on mail server. (default: 465 if | |
1738 | ``tls`` is smtps; 25 otherwise) |
|
1738 | ``tls`` is smtps; 25 otherwise) | |
1739 |
|
1739 | |||
1740 | ``tls`` |
|
1740 | ``tls`` | |
1741 | Optional. Method to enable TLS when connecting to mail server: starttls, |
|
1741 | Optional. Method to enable TLS when connecting to mail server: starttls, | |
1742 | smtps or none. (default: none) |
|
1742 | smtps or none. (default: none) | |
1743 |
|
1743 | |||
1744 | ``username`` |
|
1744 | ``username`` | |
1745 | Optional. User name for authenticating with the SMTP server. |
|
1745 | Optional. User name for authenticating with the SMTP server. | |
1746 | (default: None) |
|
1746 | (default: None) | |
1747 |
|
1747 | |||
1748 | ``password`` |
|
1748 | ``password`` | |
1749 | Optional. Password for authenticating with the SMTP server. If not |
|
1749 | Optional. Password for authenticating with the SMTP server. If not | |
1750 | specified, interactive sessions will prompt the user for a |
|
1750 | specified, interactive sessions will prompt the user for a | |
1751 | password; non-interactive sessions will fail. (default: None) |
|
1751 | password; non-interactive sessions will fail. (default: None) | |
1752 |
|
1752 | |||
1753 | ``local_hostname`` |
|
1753 | ``local_hostname`` | |
1754 | Optional. The hostname that the sender can use to identify |
|
1754 | Optional. The hostname that the sender can use to identify | |
1755 | itself to the MTA. |
|
1755 | itself to the MTA. | |
1756 |
|
1756 | |||
1757 |
|
1757 | |||
1758 | ``subpaths`` |
|
1758 | ``subpaths`` | |
1759 | ------------ |
|
1759 | ------------ | |
1760 |
|
1760 | |||
1761 | Subrepository source URLs can go stale if a remote server changes name |
|
1761 | Subrepository source URLs can go stale if a remote server changes name | |
1762 | or becomes temporarily unavailable. This section lets you define |
|
1762 | or becomes temporarily unavailable. This section lets you define | |
1763 | rewrite rules of the form:: |
|
1763 | rewrite rules of the form:: | |
1764 |
|
1764 | |||
1765 | <pattern> = <replacement> |
|
1765 | <pattern> = <replacement> | |
1766 |
|
1766 | |||
1767 | where ``pattern`` is a regular expression matching a subrepository |
|
1767 | where ``pattern`` is a regular expression matching a subrepository | |
1768 | source URL and ``replacement`` is the replacement string used to |
|
1768 | source URL and ``replacement`` is the replacement string used to | |
1769 | rewrite it. Groups can be matched in ``pattern`` and referenced in |
|
1769 | rewrite it. Groups can be matched in ``pattern`` and referenced in | |
1770 | ``replacements``. For instance:: |
|
1770 | ``replacements``. For instance:: | |
1771 |
|
1771 | |||
1772 | http://server/(.*)-hg/ = http://hg.server/\1/ |
|
1772 | http://server/(.*)-hg/ = http://hg.server/\1/ | |
1773 |
|
1773 | |||
1774 | rewrites ``http://server/foo-hg/`` into ``http://hg.server/foo/``. |
|
1774 | rewrites ``http://server/foo-hg/`` into ``http://hg.server/foo/``. | |
1775 |
|
1775 | |||
1776 | Relative subrepository paths are first made absolute, and the |
|
1776 | Relative subrepository paths are first made absolute, and the | |
1777 | rewrite rules are then applied on the full (absolute) path. If ``pattern`` |
|
1777 | rewrite rules are then applied on the full (absolute) path. If ``pattern`` | |
1778 | doesn't match the full path, an attempt is made to apply it on the |
|
1778 | doesn't match the full path, an attempt is made to apply it on the | |
1779 | relative path alone. The rules are applied in definition order. |
|
1779 | relative path alone. The rules are applied in definition order. | |
1780 |
|
1780 | |||
1781 | ``templatealias`` |
|
1781 | ``templatealias`` | |
1782 | ----------------- |
|
1782 | ----------------- | |
1783 |
|
1783 | |||
1784 | Alias definitions for templates. See :hg:`help templates` for details. |
|
1784 | Alias definitions for templates. See :hg:`help templates` for details. | |
1785 |
|
1785 | |||
1786 | ``templates`` |
|
1786 | ``templates`` | |
1787 | ------------- |
|
1787 | ------------- | |
1788 |
|
1788 | |||
1789 | Use the ``[templates]`` section to define template strings. |
|
1789 | Use the ``[templates]`` section to define template strings. | |
1790 | See :hg:`help templates` for details. |
|
1790 | See :hg:`help templates` for details. | |
1791 |
|
1791 | |||
1792 | ``trusted`` |
|
1792 | ``trusted`` | |
1793 | ----------- |
|
1793 | ----------- | |
1794 |
|
1794 | |||
1795 | Mercurial will not use the settings in the |
|
1795 | Mercurial will not use the settings in the | |
1796 | ``.hg/hgrc`` file from a repository if it doesn't belong to a trusted |
|
1796 | ``.hg/hgrc`` file from a repository if it doesn't belong to a trusted | |
1797 | user or to a trusted group, as various hgrc features allow arbitrary |
|
1797 | user or to a trusted group, as various hgrc features allow arbitrary | |
1798 | commands to be run. This issue is often encountered when configuring |
|
1798 | commands to be run. This issue is often encountered when configuring | |
1799 | hooks or extensions for shared repositories or servers. However, |
|
1799 | hooks or extensions for shared repositories or servers. However, | |
1800 | the web interface will use some safe settings from the ``[web]`` |
|
1800 | the web interface will use some safe settings from the ``[web]`` | |
1801 | section. |
|
1801 | section. | |
1802 |
|
1802 | |||
1803 | This section specifies what users and groups are trusted. The |
|
1803 | This section specifies what users and groups are trusted. The | |
1804 | current user is always trusted. To trust everybody, list a user or a |
|
1804 | current user is always trusted. To trust everybody, list a user or a | |
1805 | group with name ``*``. These settings must be placed in an |
|
1805 | group with name ``*``. These settings must be placed in an | |
1806 | *already-trusted file* to take effect, such as ``$HOME/.hgrc`` of the |
|
1806 | *already-trusted file* to take effect, such as ``$HOME/.hgrc`` of the | |
1807 | user or service running Mercurial. |
|
1807 | user or service running Mercurial. | |
1808 |
|
1808 | |||
1809 | ``users`` |
|
1809 | ``users`` | |
1810 | Comma-separated list of trusted users. |
|
1810 | Comma-separated list of trusted users. | |
1811 |
|
1811 | |||
1812 | ``groups`` |
|
1812 | ``groups`` | |
1813 | Comma-separated list of trusted groups. |
|
1813 | Comma-separated list of trusted groups. | |
1814 |
|
1814 | |||
1815 |
|
1815 | |||
1816 | ``ui`` |
|
1816 | ``ui`` | |
1817 | ------ |
|
1817 | ------ | |
1818 |
|
1818 | |||
1819 | User interface controls. |
|
1819 | User interface controls. | |
1820 |
|
1820 | |||
1821 | ``archivemeta`` |
|
1821 | ``archivemeta`` | |
1822 | Whether to include the .hg_archival.txt file containing meta data |
|
1822 | Whether to include the .hg_archival.txt file containing meta data | |
1823 | (hashes for the repository base and for tip) in archives created |
|
1823 | (hashes for the repository base and for tip) in archives created | |
1824 | by the :hg:`archive` command or downloaded via hgweb. |
|
1824 | by the :hg:`archive` command or downloaded via hgweb. | |
1825 | (default: True) |
|
1825 | (default: True) | |
1826 |
|
1826 | |||
1827 | ``askusername`` |
|
1827 | ``askusername`` | |
1828 | Whether to prompt for a username when committing. If True, and |
|
1828 | Whether to prompt for a username when committing. If True, and | |
1829 | neither ``$HGUSER`` nor ``$EMAIL`` has been specified, then the user will |
|
1829 | neither ``$HGUSER`` nor ``$EMAIL`` has been specified, then the user will | |
1830 | be prompted to enter a username. If no username is entered, the |
|
1830 | be prompted to enter a username. If no username is entered, the | |
1831 | default ``USER@HOST`` is used instead. |
|
1831 | default ``USER@HOST`` is used instead. | |
1832 | (default: False) |
|
1832 | (default: False) | |
1833 |
|
1833 | |||
1834 | ``clonebundles`` |
|
1834 | ``clonebundles`` | |
1835 | Whether the "clone bundles" feature is enabled. |
|
1835 | Whether the "clone bundles" feature is enabled. | |
1836 |
|
1836 | |||
1837 | When enabled, :hg:`clone` may download and apply a server-advertised |
|
1837 | When enabled, :hg:`clone` may download and apply a server-advertised | |
1838 | bundle file from a URL instead of using the normal exchange mechanism. |
|
1838 | bundle file from a URL instead of using the normal exchange mechanism. | |
1839 |
|
1839 | |||
1840 | This can likely result in faster and more reliable clones. |
|
1840 | This can likely result in faster and more reliable clones. | |
1841 |
|
1841 | |||
1842 | (default: True) |
|
1842 | (default: True) | |
1843 |
|
1843 | |||
1844 | ``clonebundlefallback`` |
|
1844 | ``clonebundlefallback`` | |
1845 | Whether failure to apply an advertised "clone bundle" from a server |
|
1845 | Whether failure to apply an advertised "clone bundle" from a server | |
1846 | should result in fallback to a regular clone. |
|
1846 | should result in fallback to a regular clone. | |
1847 |
|
1847 | |||
1848 | This is disabled by default because servers advertising "clone |
|
1848 | This is disabled by default because servers advertising "clone | |
1849 | bundles" often do so to reduce server load. If advertised bundles |
|
1849 | bundles" often do so to reduce server load. If advertised bundles | |
1850 | start mass failing and clients automatically fall back to a regular |
|
1850 | start mass failing and clients automatically fall back to a regular | |
1851 | clone, this would add significant and unexpected load to the server |
|
1851 | clone, this would add significant and unexpected load to the server | |
1852 | since the server is expecting clone operations to be offloaded to |
|
1852 | since the server is expecting clone operations to be offloaded to | |
1853 | pre-generated bundles. Failing fast (the default behavior) ensures |
|
1853 | pre-generated bundles. Failing fast (the default behavior) ensures | |
1854 | clients don't overwhelm the server when "clone bundle" application |
|
1854 | clients don't overwhelm the server when "clone bundle" application | |
1855 | fails. |
|
1855 | fails. | |
1856 |
|
1856 | |||
1857 | (default: False) |
|
1857 | (default: False) | |
1858 |
|
1858 | |||
1859 | ``clonebundleprefers`` |
|
1859 | ``clonebundleprefers`` | |
1860 | Defines preferences for which "clone bundles" to use. |
|
1860 | Defines preferences for which "clone bundles" to use. | |
1861 |
|
1861 | |||
1862 | Servers advertising "clone bundles" may advertise multiple available |
|
1862 | Servers advertising "clone bundles" may advertise multiple available | |
1863 | bundles. Each bundle may have different attributes, such as the bundle |
|
1863 | bundles. Each bundle may have different attributes, such as the bundle | |
1864 | type and compression format. This option is used to prefer a particular |
|
1864 | type and compression format. This option is used to prefer a particular | |
1865 | bundle over another. |
|
1865 | bundle over another. | |
1866 |
|
1866 | |||
1867 | The following keys are defined by Mercurial: |
|
1867 | The following keys are defined by Mercurial: | |
1868 |
|
1868 | |||
1869 | BUNDLESPEC |
|
1869 | BUNDLESPEC | |
1870 | A bundle type specifier. These are strings passed to :hg:`bundle -t`. |
|
1870 | A bundle type specifier. These are strings passed to :hg:`bundle -t`. | |
1871 | e.g. ``gzip-v2`` or ``bzip2-v1``. |
|
1871 | e.g. ``gzip-v2`` or ``bzip2-v1``. | |
1872 |
|
1872 | |||
1873 | COMPRESSION |
|
1873 | COMPRESSION | |
1874 | The compression format of the bundle. e.g. ``gzip`` and ``bzip2``. |
|
1874 | The compression format of the bundle. e.g. ``gzip`` and ``bzip2``. | |
1875 |
|
1875 | |||
1876 | Server operators may define custom keys. |
|
1876 | Server operators may define custom keys. | |
1877 |
|
1877 | |||
1878 | Example values: ``COMPRESSION=bzip2``, |
|
1878 | Example values: ``COMPRESSION=bzip2``, | |
1879 | ``BUNDLESPEC=gzip-v2, COMPRESSION=gzip``. |
|
1879 | ``BUNDLESPEC=gzip-v2, COMPRESSION=gzip``. | |
1880 |
|
1880 | |||
1881 | By default, the first bundle advertised by the server is used. |
|
1881 | By default, the first bundle advertised by the server is used. | |
1882 |
|
1882 | |||
1883 | ``color`` |
|
1883 | ``color`` | |
1884 | When to colorize output. Possible value are Boolean ("yes" or "no"), or |
|
1884 | When to colorize output. Possible value are Boolean ("yes" or "no"), or | |
1885 | "debug", or "always". (default: "yes"). "yes" will use color whenever it |
|
1885 | "debug", or "always". (default: "yes"). "yes" will use color whenever it | |
1886 | seems possible. See :hg:`help color` for details. |
|
1886 | seems possible. See :hg:`help color` for details. | |
1887 |
|
1887 | |||
1888 | ``commitsubrepos`` |
|
1888 | ``commitsubrepos`` | |
1889 | Whether to commit modified subrepositories when committing the |
|
1889 | Whether to commit modified subrepositories when committing the | |
1890 | parent repository. If False and one subrepository has uncommitted |
|
1890 | parent repository. If False and one subrepository has uncommitted | |
1891 | changes, abort the commit. |
|
1891 | changes, abort the commit. | |
1892 | (default: False) |
|
1892 | (default: False) | |
1893 |
|
1893 | |||
1894 | ``debug`` |
|
1894 | ``debug`` | |
1895 | Print debugging information. (default: False) |
|
1895 | Print debugging information. (default: False) | |
1896 |
|
1896 | |||
1897 | ``editor`` |
|
1897 | ``editor`` | |
1898 | The editor to use during a commit. (default: ``$EDITOR`` or ``vi``) |
|
1898 | The editor to use during a commit. (default: ``$EDITOR`` or ``vi``) | |
1899 |
|
1899 | |||
1900 | ``fallbackencoding`` |
|
1900 | ``fallbackencoding`` | |
1901 | Encoding to try if it's not possible to decode the changelog using |
|
1901 | Encoding to try if it's not possible to decode the changelog using | |
1902 | UTF-8. (default: ISO-8859-1) |
|
1902 | UTF-8. (default: ISO-8859-1) | |
1903 |
|
1903 | |||
1904 | ``graphnodetemplate`` |
|
1904 | ``graphnodetemplate`` | |
1905 | The template used to print changeset nodes in an ASCII revision graph. |
|
1905 | The template used to print changeset nodes in an ASCII revision graph. | |
1906 | (default: ``{graphnode}``) |
|
1906 | (default: ``{graphnode}``) | |
1907 |
|
1907 | |||
1908 | ``ignore`` |
|
1908 | ``ignore`` | |
1909 | A file to read per-user ignore patterns from. This file should be |
|
1909 | A file to read per-user ignore patterns from. This file should be | |
1910 | in the same format as a repository-wide .hgignore file. Filenames |
|
1910 | in the same format as a repository-wide .hgignore file. Filenames | |
1911 | are relative to the repository root. This option supports hook syntax, |
|
1911 | are relative to the repository root. This option supports hook syntax, | |
1912 | so if you want to specify multiple ignore files, you can do so by |
|
1912 | so if you want to specify multiple ignore files, you can do so by | |
1913 | setting something like ``ignore.other = ~/.hgignore2``. For details |
|
1913 | setting something like ``ignore.other = ~/.hgignore2``. For details | |
1914 | of the ignore file format, see the ``hgignore(5)`` man page. |
|
1914 | of the ignore file format, see the ``hgignore(5)`` man page. | |
1915 |
|
1915 | |||
1916 | ``interactive`` |
|
1916 | ``interactive`` | |
1917 | Allow to prompt the user. (default: True) |
|
1917 | Allow to prompt the user. (default: True) | |
1918 |
|
1918 | |||
1919 | ``interface`` |
|
1919 | ``interface`` | |
1920 | Select the default interface for interactive features (default: text). |
|
1920 | Select the default interface for interactive features (default: text). | |
1921 | Possible values are 'text' and 'curses'. |
|
1921 | Possible values are 'text' and 'curses'. | |
1922 |
|
1922 | |||
1923 | ``interface.chunkselector`` |
|
1923 | ``interface.chunkselector`` | |
1924 | Select the interface for change recording (e.g. :hg:`commit -i`). |
|
1924 | Select the interface for change recording (e.g. :hg:`commit -i`). | |
1925 | Possible values are 'text' and 'curses'. |
|
1925 | Possible values are 'text' and 'curses'. | |
1926 | This config overrides the interface specified by ui.interface. |
|
1926 | This config overrides the interface specified by ui.interface. | |
1927 |
|
1927 | |||
1928 | ``logtemplate`` |
|
1928 | ``logtemplate`` | |
1929 | Template string for commands that print changesets. |
|
1929 | Template string for commands that print changesets. | |
1930 |
|
1930 | |||
1931 | ``merge`` |
|
1931 | ``merge`` | |
1932 | The conflict resolution program to use during a manual merge. |
|
1932 | The conflict resolution program to use during a manual merge. | |
1933 | For more information on merge tools see :hg:`help merge-tools`. |
|
1933 | For more information on merge tools see :hg:`help merge-tools`. | |
1934 | For configuring merge tools see the ``[merge-tools]`` section. |
|
1934 | For configuring merge tools see the ``[merge-tools]`` section. | |
1935 |
|
1935 | |||
1936 | ``mergemarkers`` |
|
1936 | ``mergemarkers`` | |
1937 | Sets the merge conflict marker label styling. The ``detailed`` |
|
1937 | Sets the merge conflict marker label styling. The ``detailed`` | |
1938 | style uses the ``mergemarkertemplate`` setting to style the labels. |
|
1938 | style uses the ``mergemarkertemplate`` setting to style the labels. | |
1939 | The ``basic`` style just uses 'local' and 'other' as the marker label. |
|
1939 | The ``basic`` style just uses 'local' and 'other' as the marker label. | |
1940 | One of ``basic`` or ``detailed``. |
|
1940 | One of ``basic`` or ``detailed``. | |
1941 | (default: ``basic``) |
|
1941 | (default: ``basic``) | |
1942 |
|
1942 | |||
1943 | ``mergemarkertemplate`` |
|
1943 | ``mergemarkertemplate`` | |
1944 | The template used to print the commit description next to each conflict |
|
1944 | The template used to print the commit description next to each conflict | |
1945 | marker during merge conflicts. See :hg:`help templates` for the template |
|
1945 | marker during merge conflicts. See :hg:`help templates` for the template | |
1946 | format. |
|
1946 | format. | |
1947 |
|
1947 | |||
1948 | Defaults to showing the hash, tags, branches, bookmarks, author, and |
|
1948 | Defaults to showing the hash, tags, branches, bookmarks, author, and | |
1949 | the first line of the commit description. |
|
1949 | the first line of the commit description. | |
1950 |
|
1950 | |||
1951 | If you use non-ASCII characters in names for tags, branches, bookmarks, |
|
1951 | If you use non-ASCII characters in names for tags, branches, bookmarks, | |
1952 | authors, and/or commit descriptions, you must pay attention to encodings of |
|
1952 | authors, and/or commit descriptions, you must pay attention to encodings of | |
1953 | managed files. At template expansion, non-ASCII characters use the encoding |
|
1953 | managed files. At template expansion, non-ASCII characters use the encoding | |
1954 | specified by the ``--encoding`` global option, ``HGENCODING`` or other |
|
1954 | specified by the ``--encoding`` global option, ``HGENCODING`` or other | |
1955 | environment variables that govern your locale. If the encoding of the merge |
|
1955 | environment variables that govern your locale. If the encoding of the merge | |
1956 | markers is different from the encoding of the merged files, |
|
1956 | markers is different from the encoding of the merged files, | |
1957 | serious problems may occur. |
|
1957 | serious problems may occur. | |
1958 |
|
1958 | |||
1959 | ``origbackuppath`` |
|
1959 | ``origbackuppath`` | |
1960 | The path to a directory used to store generated .orig files. If the path is |
|
1960 | The path to a directory used to store generated .orig files. If the path is | |
1961 | not a directory, one will be created. |
|
1961 | not a directory, one will be created. | |
1962 |
|
1962 | |||
1963 | ``paginate`` |
|
1963 | ``paginate`` | |
1964 | Control the pagination of command output (default: True). See :hg:`help pager` |
|
1964 | Control the pagination of command output (default: True). See :hg:`help pager` | |
1965 | for details. |
|
1965 | for details. | |
1966 |
|
1966 | |||
1967 | ``patch`` |
|
1967 | ``patch`` | |
1968 | An optional external tool that ``hg import`` and some extensions |
|
1968 | An optional external tool that ``hg import`` and some extensions | |
1969 | will use for applying patches. By default Mercurial uses an |
|
1969 | will use for applying patches. By default Mercurial uses an | |
1970 | internal patch utility. The external tool must work as the common |
|
1970 | internal patch utility. The external tool must work as the common | |
1971 | Unix ``patch`` program. In particular, it must accept a ``-p`` |
|
1971 | Unix ``patch`` program. In particular, it must accept a ``-p`` | |
1972 | argument to strip patch headers, a ``-d`` argument to specify the |
|
1972 | argument to strip patch headers, a ``-d`` argument to specify the | |
1973 | current directory, a file name to patch, and a patch file to take |
|
1973 | current directory, a file name to patch, and a patch file to take | |
1974 | from stdin. |
|
1974 | from stdin. | |
1975 |
|
1975 | |||
1976 | It is possible to specify a patch tool together with extra |
|
1976 | It is possible to specify a patch tool together with extra | |
1977 | arguments. For example, setting this option to ``patch --merge`` |
|
1977 | arguments. For example, setting this option to ``patch --merge`` | |
1978 | will use the ``patch`` program with its 2-way merge option. |
|
1978 | will use the ``patch`` program with its 2-way merge option. | |
1979 |
|
1979 | |||
1980 | ``portablefilenames`` |
|
1980 | ``portablefilenames`` | |
1981 | Check for portable filenames. Can be ``warn``, ``ignore`` or ``abort``. |
|
1981 | Check for portable filenames. Can be ``warn``, ``ignore`` or ``abort``. | |
1982 | (default: ``warn``) |
|
1982 | (default: ``warn``) | |
1983 |
|
1983 | |||
1984 | ``warn`` |
|
1984 | ``warn`` | |
1985 | Print a warning message on POSIX platforms, if a file with a non-portable |
|
1985 | Print a warning message on POSIX platforms, if a file with a non-portable | |
1986 | filename is added (e.g. a file with a name that can't be created on |
|
1986 | filename is added (e.g. a file with a name that can't be created on | |
1987 | Windows because it contains reserved parts like ``AUX``, reserved |
|
1987 | Windows because it contains reserved parts like ``AUX``, reserved | |
1988 | characters like ``:``, or would cause a case collision with an existing |
|
1988 | characters like ``:``, or would cause a case collision with an existing | |
1989 | file). |
|
1989 | file). | |
1990 |
|
1990 | |||
1991 | ``ignore`` |
|
1991 | ``ignore`` | |
1992 | Don't print a warning. |
|
1992 | Don't print a warning. | |
1993 |
|
1993 | |||
1994 | ``abort`` |
|
1994 | ``abort`` | |
1995 | The command is aborted. |
|
1995 | The command is aborted. | |
1996 |
|
1996 | |||
1997 | ``true`` |
|
1997 | ``true`` | |
1998 | Alias for ``warn``. |
|
1998 | Alias for ``warn``. | |
1999 |
|
1999 | |||
2000 | ``false`` |
|
2000 | ``false`` | |
2001 | Alias for ``ignore``. |
|
2001 | Alias for ``ignore``. | |
2002 |
|
2002 | |||
2003 | .. container:: windows |
|
2003 | .. container:: windows | |
2004 |
|
2004 | |||
2005 | On Windows, this configuration option is ignored and the command aborted. |
|
2005 | On Windows, this configuration option is ignored and the command aborted. | |
2006 |
|
2006 | |||
2007 | ``quiet`` |
|
2007 | ``quiet`` | |
2008 | Reduce the amount of output printed. |
|
2008 | Reduce the amount of output printed. | |
2009 | (default: False) |
|
2009 | (default: False) | |
2010 |
|
2010 | |||
2011 | ``remotecmd`` |
|
2011 | ``remotecmd`` | |
2012 | Remote command to use for clone/push/pull operations. |
|
2012 | Remote command to use for clone/push/pull operations. | |
2013 | (default: ``hg``) |
|
2013 | (default: ``hg``) | |
2014 |
|
2014 | |||
2015 | ``report_untrusted`` |
|
2015 | ``report_untrusted`` | |
2016 | Warn if a ``.hg/hgrc`` file is ignored due to not being owned by a |
|
2016 | Warn if a ``.hg/hgrc`` file is ignored due to not being owned by a | |
2017 | trusted user or group. |
|
2017 | trusted user or group. | |
2018 | (default: True) |
|
2018 | (default: True) | |
2019 |
|
2019 | |||
2020 | ``slash`` |
|
2020 | ``slash`` | |
2021 | Display paths using a slash (``/``) as the path separator. This |
|
2021 | Display paths using a slash (``/``) as the path separator. This | |
2022 | only makes a difference on systems where the default path |
|
2022 | only makes a difference on systems where the default path | |
2023 | separator is not the slash character (e.g. Windows uses the |
|
2023 | separator is not the slash character (e.g. Windows uses the | |
2024 | backslash character (``\``)). |
|
2024 | backslash character (``\``)). | |
2025 | (default: False) |
|
2025 | (default: False) | |
2026 |
|
2026 | |||
2027 | ``statuscopies`` |
|
2027 | ``statuscopies`` | |
2028 | Display copies in the status command. |
|
2028 | Display copies in the status command. | |
2029 |
|
2029 | |||
2030 | ``ssh`` |
|
2030 | ``ssh`` | |
2031 | Command to use for SSH connections. (default: ``ssh``) |
|
2031 | Command to use for SSH connections. (default: ``ssh``) | |
2032 |
|
2032 | |||
2033 | ``strict`` |
|
2033 | ``strict`` | |
2034 | Require exact command names, instead of allowing unambiguous |
|
2034 | Require exact command names, instead of allowing unambiguous | |
2035 | abbreviations. (default: False) |
|
2035 | abbreviations. (default: False) | |
2036 |
|
2036 | |||
2037 | ``style`` |
|
2037 | ``style`` | |
2038 | Name of style to use for command output. |
|
2038 | Name of style to use for command output. | |
2039 |
|
2039 | |||
2040 | ``supportcontact`` |
|
2040 | ``supportcontact`` | |
2041 | A URL where users should report a Mercurial traceback. Use this if you are a |
|
2041 | A URL where users should report a Mercurial traceback. Use this if you are a | |
2042 | large organisation with its own Mercurial deployment process and crash |
|
2042 | large organisation with its own Mercurial deployment process and crash | |
2043 | reports should be addressed to your internal support. |
|
2043 | reports should be addressed to your internal support. | |
2044 |
|
2044 | |||
2045 | ``textwidth`` |
|
2045 | ``textwidth`` | |
2046 | Maximum width of help text. A longer line generated by ``hg help`` or |
|
2046 | Maximum width of help text. A longer line generated by ``hg help`` or | |
2047 | ``hg subcommand --help`` will be broken after white space to get this |
|
2047 | ``hg subcommand --help`` will be broken after white space to get this | |
2048 | width or the terminal width, whichever comes first. |
|
2048 | width or the terminal width, whichever comes first. | |
2049 | A non-positive value will disable this and the terminal width will be |
|
2049 | A non-positive value will disable this and the terminal width will be | |
2050 | used. (default: 78) |
|
2050 | used. (default: 78) | |
2051 |
|
2051 | |||
2052 | ``timeout`` |
|
2052 | ``timeout`` | |
2053 | The timeout used when a lock is held (in seconds), a negative value |
|
2053 | The timeout used when a lock is held (in seconds), a negative value | |
2054 | means no timeout. (default: 600) |
|
2054 | means no timeout. (default: 600) | |
2055 |
|
2055 | |||
2056 | ``traceback`` |
|
2056 | ``traceback`` | |
2057 | Mercurial always prints a traceback when an unknown exception |
|
2057 | Mercurial always prints a traceback when an unknown exception | |
2058 | occurs. Setting this to True will make Mercurial print a traceback |
|
2058 | occurs. Setting this to True will make Mercurial print a traceback | |
2059 | on all exceptions, even those recognized by Mercurial (such as |
|
2059 | on all exceptions, even those recognized by Mercurial (such as | |
2060 | IOError or MemoryError). (default: False) |
|
2060 | IOError or MemoryError). (default: False) | |
2061 |
|
2061 | |||
2062 | ``username`` |
|
2062 | ``username`` | |
2063 | The committer of a changeset created when running "commit". |
|
2063 | The committer of a changeset created when running "commit". | |
2064 | Typically a person's name and email address, e.g. ``Fred Widget |
|
2064 | Typically a person's name and email address, e.g. ``Fred Widget | |
2065 | <fred@example.com>``. Environment variables in the |
|
2065 | <fred@example.com>``. Environment variables in the | |
2066 | username are expanded. |
|
2066 | username are expanded. | |
2067 |
|
2067 | |||
2068 | (default: ``$EMAIL`` or ``username@hostname``. If the username in |
|
2068 | (default: ``$EMAIL`` or ``username@hostname``. If the username in | |
2069 | hgrc is empty, e.g. if the system admin set ``username =`` in the |
|
2069 | hgrc is empty, e.g. if the system admin set ``username =`` in the | |
2070 | system hgrc, it has to be specified manually or in a different |
|
2070 | system hgrc, it has to be specified manually or in a different | |
2071 | hgrc file) |
|
2071 | hgrc file) | |
2072 |
|
2072 | |||
2073 | ``verbose`` |
|
2073 | ``verbose`` | |
2074 | Increase the amount of output printed. (default: False) |
|
2074 | Increase the amount of output printed. (default: False) | |
2075 |
|
2075 | |||
2076 |
|
2076 | |||
2077 | ``web`` |
|
2077 | ``web`` | |
2078 | ------- |
|
2078 | ------- | |
2079 |
|
2079 | |||
2080 | Web interface configuration. The settings in this section apply to |
|
2080 | Web interface configuration. The settings in this section apply to | |
2081 | both the builtin webserver (started by :hg:`serve`) and the script you |
|
2081 | both the builtin webserver (started by :hg:`serve`) and the script you | |
2082 | run through a webserver (``hgweb.cgi`` and the derivatives for FastCGI |
|
2082 | run through a webserver (``hgweb.cgi`` and the derivatives for FastCGI | |
2083 | and WSGI). |
|
2083 | and WSGI). | |
2084 |
|
2084 | |||
2085 | The Mercurial webserver does no authentication (it does not prompt for |
|
2085 | The Mercurial webserver does no authentication (it does not prompt for | |
2086 | usernames and passwords to validate *who* users are), but it does do |
|
2086 | usernames and passwords to validate *who* users are), but it does do | |
2087 | authorization (it grants or denies access for *authenticated users* |
|
2087 | authorization (it grants or denies access for *authenticated users* | |
2088 | based on settings in this section). You must either configure your |
|
2088 | based on settings in this section). You must either configure your | |
2089 | webserver to do authentication for you, or disable the authorization |
|
2089 | webserver to do authentication for you, or disable the authorization | |
2090 | checks. |
|
2090 | checks. | |
2091 |
|
2091 | |||
2092 | For a quick setup in a trusted environment, e.g., a private LAN, where |
|
2092 | For a quick setup in a trusted environment, e.g., a private LAN, where | |
2093 | you want it to accept pushes from anybody, you can use the following |
|
2093 | you want it to accept pushes from anybody, you can use the following | |
2094 | command line:: |
|
2094 | command line:: | |
2095 |
|
2095 | |||
2096 | $ hg --config web.allow_push=* --config web.push_ssl=False serve |
|
2096 | $ hg --config web.allow_push=* --config web.push_ssl=False serve | |
2097 |
|
2097 | |||
2098 | Note that this will allow anybody to push anything to the server and |
|
2098 | Note that this will allow anybody to push anything to the server and | |
2099 | that this should not be used for public servers. |
|
2099 | that this should not be used for public servers. | |
2100 |
|
2100 | |||
2101 | The full set of options is: |
|
2101 | The full set of options is: | |
2102 |
|
2102 | |||
2103 | ``accesslog`` |
|
2103 | ``accesslog`` | |
2104 | Where to output the access log. (default: stdout) |
|
2104 | Where to output the access log. (default: stdout) | |
2105 |
|
2105 | |||
2106 | ``address`` |
|
2106 | ``address`` | |
2107 | Interface address to bind to. (default: all) |
|
2107 | Interface address to bind to. (default: all) | |
2108 |
|
2108 | |||
2109 | ``allow_archive`` |
|
2109 | ``allow_archive`` | |
2110 | List of archive format (bz2, gz, zip) allowed for downloading. |
|
2110 | List of archive format (bz2, gz, zip) allowed for downloading. | |
2111 | (default: empty) |
|
2111 | (default: empty) | |
2112 |
|
2112 | |||
2113 | ``allowbz2`` |
|
2113 | ``allowbz2`` | |
2114 | (DEPRECATED) Whether to allow .tar.bz2 downloading of repository |
|
2114 | (DEPRECATED) Whether to allow .tar.bz2 downloading of repository | |
2115 | revisions. |
|
2115 | revisions. | |
2116 | (default: False) |
|
2116 | (default: False) | |
2117 |
|
2117 | |||
2118 | ``allowgz`` |
|
2118 | ``allowgz`` | |
2119 | (DEPRECATED) Whether to allow .tar.gz downloading of repository |
|
2119 | (DEPRECATED) Whether to allow .tar.gz downloading of repository | |
2120 | revisions. |
|
2120 | revisions. | |
2121 | (default: False) |
|
2121 | (default: False) | |
2122 |
|
2122 | |||
2123 | ``allowpull`` |
|
2123 | ``allowpull`` | |
2124 | Whether to allow pulling from the repository. (default: True) |
|
2124 | Whether to allow pulling from the repository. (default: True) | |
2125 |
|
2125 | |||
2126 | ``allow_push`` |
|
2126 | ``allow_push`` | |
2127 | Whether to allow pushing to the repository. If empty or not set, |
|
2127 | Whether to allow pushing to the repository. If empty or not set, | |
2128 | pushing is not allowed. If the special value ``*``, any remote |
|
2128 | pushing is not allowed. If the special value ``*``, any remote | |
2129 | user can push, including unauthenticated users. Otherwise, the |
|
2129 | user can push, including unauthenticated users. Otherwise, the | |
2130 | remote user must have been authenticated, and the authenticated |
|
2130 | remote user must have been authenticated, and the authenticated | |
2131 | user name must be present in this list. The contents of the |
|
2131 | user name must be present in this list. The contents of the | |
2132 | allow_push list are examined after the deny_push list. |
|
2132 | allow_push list are examined after the deny_push list. | |
2133 |
|
2133 | |||
2134 | ``allow_read`` |
|
2134 | ``allow_read`` | |
2135 | If the user has not already been denied repository access due to |
|
2135 | If the user has not already been denied repository access due to | |
2136 | the contents of deny_read, this list determines whether to grant |
|
2136 | the contents of deny_read, this list determines whether to grant | |
2137 | repository access to the user. If this list is not empty, and the |
|
2137 | repository access to the user. If this list is not empty, and the | |
2138 | user is unauthenticated or not present in the list, then access is |
|
2138 | user is unauthenticated or not present in the list, then access is | |
2139 | denied for the user. If the list is empty or not set, then access |
|
2139 | denied for the user. If the list is empty or not set, then access | |
2140 | is permitted to all users by default. Setting allow_read to the |
|
2140 | is permitted to all users by default. Setting allow_read to the | |
2141 | special value ``*`` is equivalent to it not being set (i.e. access |
|
2141 | special value ``*`` is equivalent to it not being set (i.e. access | |
2142 | is permitted to all users). The contents of the allow_read list are |
|
2142 | is permitted to all users). The contents of the allow_read list are | |
2143 | examined after the deny_read list. |
|
2143 | examined after the deny_read list. | |
2144 |
|
2144 | |||
2145 | ``allowzip`` |
|
2145 | ``allowzip`` | |
2146 | (DEPRECATED) Whether to allow .zip downloading of repository |
|
2146 | (DEPRECATED) Whether to allow .zip downloading of repository | |
2147 | revisions. This feature creates temporary files. |
|
2147 | revisions. This feature creates temporary files. | |
2148 | (default: False) |
|
2148 | (default: False) | |
2149 |
|
2149 | |||
2150 | ``archivesubrepos`` |
|
2150 | ``archivesubrepos`` | |
2151 | Whether to recurse into subrepositories when archiving. |
|
2151 | Whether to recurse into subrepositories when archiving. | |
2152 | (default: False) |
|
2152 | (default: False) | |
2153 |
|
2153 | |||
2154 | ``baseurl`` |
|
2154 | ``baseurl`` | |
2155 | Base URL to use when publishing URLs in other locations, so |
|
2155 | Base URL to use when publishing URLs in other locations, so | |
2156 | third-party tools like email notification hooks can construct |
|
2156 | third-party tools like email notification hooks can construct | |
2157 | URLs. Example: ``http://hgserver/repos/``. |
|
2157 | URLs. Example: ``http://hgserver/repos/``. | |
2158 |
|
2158 | |||
2159 | ``cacerts`` |
|
2159 | ``cacerts`` | |
2160 | Path to file containing a list of PEM encoded certificate |
|
2160 | Path to file containing a list of PEM encoded certificate | |
2161 | authority certificates. Environment variables and ``~user`` |
|
2161 | authority certificates. Environment variables and ``~user`` | |
2162 | constructs are expanded in the filename. If specified on the |
|
2162 | constructs are expanded in the filename. If specified on the | |
2163 | client, then it will verify the identity of remote HTTPS servers |
|
2163 | client, then it will verify the identity of remote HTTPS servers | |
2164 | with these certificates. |
|
2164 | with these certificates. | |
2165 |
|
2165 | |||
2166 | To disable SSL verification temporarily, specify ``--insecure`` from |
|
2166 | To disable SSL verification temporarily, specify ``--insecure`` from | |
2167 | command line. |
|
2167 | command line. | |
2168 |
|
2168 | |||
2169 | You can use OpenSSL's CA certificate file if your platform has |
|
2169 | You can use OpenSSL's CA certificate file if your platform has | |
2170 | one. On most Linux systems this will be |
|
2170 | one. On most Linux systems this will be | |
2171 | ``/etc/ssl/certs/ca-certificates.crt``. Otherwise you will have to |
|
2171 | ``/etc/ssl/certs/ca-certificates.crt``. Otherwise you will have to | |
2172 | generate this file manually. The form must be as follows:: |
|
2172 | generate this file manually. The form must be as follows:: | |
2173 |
|
2173 | |||
2174 | -----BEGIN CERTIFICATE----- |
|
2174 | -----BEGIN CERTIFICATE----- | |
2175 | ... (certificate in base64 PEM encoding) ... |
|
2175 | ... (certificate in base64 PEM encoding) ... | |
2176 | -----END CERTIFICATE----- |
|
2176 | -----END CERTIFICATE----- | |
2177 | -----BEGIN CERTIFICATE----- |
|
2177 | -----BEGIN CERTIFICATE----- | |
2178 | ... (certificate in base64 PEM encoding) ... |
|
2178 | ... (certificate in base64 PEM encoding) ... | |
2179 | -----END CERTIFICATE----- |
|
2179 | -----END CERTIFICATE----- | |
2180 |
|
2180 | |||
2181 | ``cache`` |
|
2181 | ``cache`` | |
2182 | Whether to support caching in hgweb. (default: True) |
|
2182 | Whether to support caching in hgweb. (default: True) | |
2183 |
|
2183 | |||
2184 | ``certificate`` |
|
2184 | ``certificate`` | |
2185 | Certificate to use when running :hg:`serve`. |
|
2185 | Certificate to use when running :hg:`serve`. | |
2186 |
|
2186 | |||
2187 | ``collapse`` |
|
2187 | ``collapse`` | |
2188 | With ``descend`` enabled, repositories in subdirectories are shown at |
|
2188 | With ``descend`` enabled, repositories in subdirectories are shown at | |
2189 | a single level alongside repositories in the current path. With |
|
2189 | a single level alongside repositories in the current path. With | |
2190 | ``collapse`` also enabled, repositories residing at a deeper level than |
|
2190 | ``collapse`` also enabled, repositories residing at a deeper level than | |
2191 | the current path are grouped behind navigable directory entries that |
|
2191 | the current path are grouped behind navigable directory entries that | |
2192 | lead to the locations of these repositories. In effect, this setting |
|
2192 | lead to the locations of these repositories. In effect, this setting | |
2193 | collapses each collection of repositories found within a subdirectory |
|
2193 | collapses each collection of repositories found within a subdirectory | |
2194 | into a single entry for that subdirectory. (default: False) |
|
2194 | into a single entry for that subdirectory. (default: False) | |
2195 |
|
2195 | |||
2196 | ``comparisoncontext`` |
|
2196 | ``comparisoncontext`` | |
2197 | Number of lines of context to show in side-by-side file comparison. If |
|
2197 | Number of lines of context to show in side-by-side file comparison. If | |
2198 | negative or the value ``full``, whole files are shown. (default: 5) |
|
2198 | negative or the value ``full``, whole files are shown. (default: 5) | |
2199 |
|
2199 | |||
2200 | This setting can be overridden by a ``context`` request parameter to the |
|
2200 | This setting can be overridden by a ``context`` request parameter to the | |
2201 | ``comparison`` command, taking the same values. |
|
2201 | ``comparison`` command, taking the same values. | |
2202 |
|
2202 | |||
2203 | ``contact`` |
|
2203 | ``contact`` | |
2204 | Name or email address of the person in charge of the repository. |
|
2204 | Name or email address of the person in charge of the repository. | |
2205 | (default: ui.username or ``$EMAIL`` or "unknown" if unset or empty) |
|
2205 | (default: ui.username or ``$EMAIL`` or "unknown" if unset or empty) | |
2206 |
|
2206 | |||
2207 | ``csp`` |
|
2207 | ``csp`` | |
2208 | Send a ``Content-Security-Policy`` HTTP header with this value. |
|
2208 | Send a ``Content-Security-Policy`` HTTP header with this value. | |
2209 |
|
2209 | |||
2210 | The value may contain a special string ``%nonce%``, which will be replaced |
|
2210 | The value may contain a special string ``%nonce%``, which will be replaced | |
2211 | by a randomly-generated one-time use value. If the value contains |
|
2211 | by a randomly-generated one-time use value. If the value contains | |
2212 | ``%nonce%``, ``web.cache`` will be disabled, as caching undermines the |
|
2212 | ``%nonce%``, ``web.cache`` will be disabled, as caching undermines the | |
2213 | one-time property of the nonce. This nonce will also be inserted into |
|
2213 | one-time property of the nonce. This nonce will also be inserted into | |
2214 | ``<script>`` elements containing inline JavaScript. |
|
2214 | ``<script>`` elements containing inline JavaScript. | |
2215 |
|
2215 | |||
2216 | Note: lots of HTML content sent by the server is derived from repository |
|
2216 | Note: lots of HTML content sent by the server is derived from repository | |
2217 | data. Please consider the potential for malicious repository data to |
|
2217 | data. Please consider the potential for malicious repository data to | |
2218 | "inject" itself into generated HTML content as part of your security |
|
2218 | "inject" itself into generated HTML content as part of your security | |
2219 | threat model. |
|
2219 | threat model. | |
2220 |
|
2220 | |||
2221 | ``deny_push`` |
|
2221 | ``deny_push`` | |
2222 | Whether to deny pushing to the repository. If empty or not set, |
|
2222 | Whether to deny pushing to the repository. If empty or not set, | |
2223 | push is not denied. If the special value ``*``, all remote users are |
|
2223 | push is not denied. If the special value ``*``, all remote users are | |
2224 | denied push. Otherwise, unauthenticated users are all denied, and |
|
2224 | denied push. Otherwise, unauthenticated users are all denied, and | |
2225 | any authenticated user name present in this list is also denied. The |
|
2225 | any authenticated user name present in this list is also denied. The | |
2226 | contents of the deny_push list are examined before the allow_push list. |
|
2226 | contents of the deny_push list are examined before the allow_push list. | |
2227 |
|
2227 | |||
2228 | ``deny_read`` |
|
2228 | ``deny_read`` | |
2229 | Whether to deny reading/viewing of the repository. If this list is |
|
2229 | Whether to deny reading/viewing of the repository. If this list is | |
2230 | not empty, unauthenticated users are all denied, and any |
|
2230 | not empty, unauthenticated users are all denied, and any | |
2231 | authenticated user name present in this list is also denied access to |
|
2231 | authenticated user name present in this list is also denied access to | |
2232 | the repository. If set to the special value ``*``, all remote users |
|
2232 | the repository. If set to the special value ``*``, all remote users | |
2233 | are denied access (rarely needed ;). If deny_read is empty or not set, |
|
2233 | are denied access (rarely needed ;). If deny_read is empty or not set, | |
2234 | the determination of repository access depends on the presence and |
|
2234 | the determination of repository access depends on the presence and | |
2235 | content of the allow_read list (see description). If both |
|
2235 | content of the allow_read list (see description). If both | |
2236 | deny_read and allow_read are empty or not set, then access is |
|
2236 | deny_read and allow_read are empty or not set, then access is | |
2237 | permitted to all users by default. If the repository is being |
|
2237 | permitted to all users by default. If the repository is being | |
2238 | served via hgwebdir, denied users will not be able to see it in |
|
2238 | served via hgwebdir, denied users will not be able to see it in | |
2239 | the list of repositories. The contents of the deny_read list have |
|
2239 | the list of repositories. The contents of the deny_read list have | |
2240 | priority over (are examined before) the contents of the allow_read |
|
2240 | priority over (are examined before) the contents of the allow_read | |
2241 | list. |
|
2241 | list. | |
2242 |
|
2242 | |||
2243 | ``descend`` |
|
2243 | ``descend`` | |
2244 | hgwebdir indexes will not descend into subdirectories. Only repositories |
|
2244 | hgwebdir indexes will not descend into subdirectories. Only repositories | |
2245 | directly in the current path will be shown (other repositories are still |
|
2245 | directly in the current path will be shown (other repositories are still | |
2246 | available from the index corresponding to their containing path). |
|
2246 | available from the index corresponding to their containing path). | |
2247 |
|
2247 | |||
2248 | ``description`` |
|
2248 | ``description`` | |
2249 | Textual description of the repository's purpose or contents. |
|
2249 | Textual description of the repository's purpose or contents. | |
2250 | (default: "unknown") |
|
2250 | (default: "unknown") | |
2251 |
|
2251 | |||
2252 | ``encoding`` |
|
2252 | ``encoding`` | |
2253 | Character encoding name. (default: the current locale charset) |
|
2253 | Character encoding name. (default: the current locale charset) | |
2254 | Example: "UTF-8". |
|
2254 | Example: "UTF-8". | |
2255 |
|
2255 | |||
2256 | ``errorlog`` |
|
2256 | ``errorlog`` | |
2257 | Where to output the error log. (default: stderr) |
|
2257 | Where to output the error log. (default: stderr) | |
2258 |
|
2258 | |||
2259 | ``guessmime`` |
|
2259 | ``guessmime`` | |
2260 | Control MIME types for raw download of file content. |
|
2260 | Control MIME types for raw download of file content. | |
2261 | Set to True to let hgweb guess the content type from the file |
|
2261 | Set to True to let hgweb guess the content type from the file | |
2262 | extension. This will serve HTML files as ``text/html`` and might |
|
2262 | extension. This will serve HTML files as ``text/html`` and might | |
2263 | allow cross-site scripting attacks when serving untrusted |
|
2263 | allow cross-site scripting attacks when serving untrusted | |
2264 | repositories. (default: False) |
|
2264 | repositories. (default: False) | |
2265 |
|
2265 | |||
2266 | ``hidden`` |
|
2266 | ``hidden`` | |
2267 | Whether to hide the repository in the hgwebdir index. |
|
2267 | Whether to hide the repository in the hgwebdir index. | |
2268 | (default: False) |
|
2268 | (default: False) | |
2269 |
|
2269 | |||
2270 | ``ipv6`` |
|
2270 | ``ipv6`` | |
2271 | Whether to use IPv6. (default: False) |
|
2271 | Whether to use IPv6. (default: False) | |
2272 |
|
2272 | |||
2273 | ``labels`` |
|
2273 | ``labels`` | |
2274 | List of string *labels* associated with the repository. |
|
2274 | List of string *labels* associated with the repository. | |
2275 |
|
2275 | |||
2276 | Labels are exposed as a template keyword and can be used to customize |
|
2276 | Labels are exposed as a template keyword and can be used to customize | |
2277 | output. e.g. the ``index`` template can group or filter repositories |
|
2277 | output. e.g. the ``index`` template can group or filter repositories | |
2278 | by labels and the ``summary`` template can display additional content |
|
2278 | by labels and the ``summary`` template can display additional content | |
2279 | if a specific label is present. |
|
2279 | if a specific label is present. | |
2280 |
|
2280 | |||
2281 | ``logoimg`` |
|
2281 | ``logoimg`` | |
2282 | File name of the logo image that some templates display on each page. |
|
2282 | File name of the logo image that some templates display on each page. | |
2283 | The file name is relative to ``staticurl``. That is, the full path to |
|
2283 | The file name is relative to ``staticurl``. That is, the full path to | |
2284 | the logo image is "staticurl/logoimg". |
|
2284 | the logo image is "staticurl/logoimg". | |
2285 | If unset, ``hglogo.png`` will be used. |
|
2285 | If unset, ``hglogo.png`` will be used. | |
2286 |
|
2286 | |||
2287 | ``logourl`` |
|
2287 | ``logourl`` | |
2288 | Base URL to use for logos. If unset, ``https://mercurial-scm.org/`` |
|
2288 | Base URL to use for logos. If unset, ``https://mercurial-scm.org/`` | |
2289 | will be used. |
|
2289 | will be used. | |
2290 |
|
2290 | |||
2291 | ``maxchanges`` |
|
2291 | ``maxchanges`` | |
2292 | Maximum number of changes to list on the changelog. (default: 10) |
|
2292 | Maximum number of changes to list on the changelog. (default: 10) | |
2293 |
|
2293 | |||
2294 | ``maxfiles`` |
|
2294 | ``maxfiles`` | |
2295 | Maximum number of files to list per changeset. (default: 10) |
|
2295 | Maximum number of files to list per changeset. (default: 10) | |
2296 |
|
2296 | |||
2297 | ``maxshortchanges`` |
|
2297 | ``maxshortchanges`` | |
2298 | Maximum number of changes to list on the shortlog, graph or filelog |
|
2298 | Maximum number of changes to list on the shortlog, graph or filelog | |
2299 | pages. (default: 60) |
|
2299 | pages. (default: 60) | |
2300 |
|
2300 | |||
2301 | ``name`` |
|
2301 | ``name`` | |
2302 | Repository name to use in the web interface. |
|
2302 | Repository name to use in the web interface. | |
2303 | (default: current working directory) |
|
2303 | (default: current working directory) | |
2304 |
|
2304 | |||
2305 | ``port`` |
|
2305 | ``port`` | |
2306 | Port to listen on. (default: 8000) |
|
2306 | Port to listen on. (default: 8000) | |
2307 |
|
2307 | |||
2308 | ``prefix`` |
|
2308 | ``prefix`` | |
2309 | Prefix path to serve from. (default: '' (server root)) |
|
2309 | Prefix path to serve from. (default: '' (server root)) | |
2310 |
|
2310 | |||
2311 | ``push_ssl`` |
|
2311 | ``push_ssl`` | |
2312 | Whether to require that inbound pushes be transported over SSL to |
|
2312 | Whether to require that inbound pushes be transported over SSL to | |
2313 | prevent password sniffing. (default: True) |
|
2313 | prevent password sniffing. (default: True) | |
2314 |
|
2314 | |||
2315 | ``refreshinterval`` |
|
2315 | ``refreshinterval`` | |
2316 | How frequently directory listings re-scan the filesystem for new |
|
2316 | How frequently directory listings re-scan the filesystem for new | |
2317 | repositories, in seconds. This is relevant when wildcards are used |
|
2317 | repositories, in seconds. This is relevant when wildcards are used | |
2318 | to define paths. Depending on how much filesystem traversal is |
|
2318 | to define paths. Depending on how much filesystem traversal is | |
2319 | required, refreshing may negatively impact performance. |
|
2319 | required, refreshing may negatively impact performance. | |
2320 |
|
2320 | |||
2321 | Values less than or equal to 0 always refresh. |
|
2321 | Values less than or equal to 0 always refresh. | |
2322 | (default: 20) |
|
2322 | (default: 20) | |
2323 |
|
2323 | |||
2324 | ``staticurl`` |
|
2324 | ``staticurl`` | |
2325 | Base URL to use for static files. If unset, static files (e.g. the |
|
2325 | Base URL to use for static files. If unset, static files (e.g. the | |
2326 | hgicon.png favicon) will be served by the CGI script itself. Use |
|
2326 | hgicon.png favicon) will be served by the CGI script itself. Use | |
2327 | this setting to serve them directly with the HTTP server. |
|
2327 | this setting to serve them directly with the HTTP server. | |
2328 | Example: ``http://hgserver/static/``. |
|
2328 | Example: ``http://hgserver/static/``. | |
2329 |
|
2329 | |||
2330 | ``stripes`` |
|
2330 | ``stripes`` | |
2331 | How many lines a "zebra stripe" should span in multi-line output. |
|
2331 | How many lines a "zebra stripe" should span in multi-line output. | |
2332 | Set to 0 to disable. (default: 1) |
|
2332 | Set to 0 to disable. (default: 1) | |
2333 |
|
2333 | |||
2334 | ``style`` |
|
2334 | ``style`` | |
2335 | Which template map style to use. The available options are the names of |
|
2335 | Which template map style to use. The available options are the names of | |
2336 | subdirectories in the HTML templates path. (default: ``paper``) |
|
2336 | subdirectories in the HTML templates path. (default: ``paper``) | |
2337 | Example: ``monoblue``. |
|
2337 | Example: ``monoblue``. | |
2338 |
|
2338 | |||
2339 | ``templates`` |
|
2339 | ``templates`` | |
2340 | Where to find the HTML templates. The default path to the HTML templates |
|
2340 | Where to find the HTML templates. The default path to the HTML templates | |
2341 | can be obtained from ``hg debuginstall``. |
|
2341 | can be obtained from ``hg debuginstall``. | |
2342 |
|
2342 | |||
2343 | ``websub`` |
|
2343 | ``websub`` | |
2344 | ---------- |
|
2344 | ---------- | |
2345 |
|
2345 | |||
2346 | Web substitution filter definition. You can use this section to |
|
2346 | Web substitution filter definition. You can use this section to | |
2347 | define a set of regular expression substitution patterns which |
|
2347 | define a set of regular expression substitution patterns which | |
2348 | let you automatically modify the hgweb server output. |
|
2348 | let you automatically modify the hgweb server output. | |
2349 |
|
2349 | |||
2350 | The default hgweb templates only apply these substitution patterns |
|
2350 | The default hgweb templates only apply these substitution patterns | |
2351 | on the revision description fields. You can apply them anywhere |
|
2351 | on the revision description fields. You can apply them anywhere | |
2352 | you want when you create your own templates by adding calls to the |
|
2352 | you want when you create your own templates by adding calls to the | |
2353 | "websub" filter (usually after calling the "escape" filter). |
|
2353 | "websub" filter (usually after calling the "escape" filter). | |
2354 |
|
2354 | |||
2355 | This can be used, for example, to convert issue references to links |
|
2355 | This can be used, for example, to convert issue references to links | |
2356 | to your issue tracker, or to convert "markdown-like" syntax into |
|
2356 | to your issue tracker, or to convert "markdown-like" syntax into | |
2357 | HTML (see the examples below). |
|
2357 | HTML (see the examples below). | |
2358 |
|
2358 | |||
2359 | Each entry in this section names a substitution filter. |
|
2359 | Each entry in this section names a substitution filter. | |
2360 | The value of each entry defines the substitution expression itself. |
|
2360 | The value of each entry defines the substitution expression itself. | |
2361 | The websub expressions follow the old interhg extension syntax, |
|
2361 | The websub expressions follow the old interhg extension syntax, | |
2362 | which in turn imitates the Unix sed replacement syntax:: |
|
2362 | which in turn imitates the Unix sed replacement syntax:: | |
2363 |
|
2363 | |||
2364 | patternname = s/SEARCH_REGEX/REPLACE_EXPRESSION/[i] |
|
2364 | patternname = s/SEARCH_REGEX/REPLACE_EXPRESSION/[i] | |
2365 |
|
2365 | |||
2366 | You can use any separator other than "/". The final "i" is optional |
|
2366 | You can use any separator other than "/". The final "i" is optional | |
2367 | and indicates that the search must be case insensitive. |
|
2367 | and indicates that the search must be case insensitive. | |
2368 |
|
2368 | |||
2369 | Examples:: |
|
2369 | Examples:: | |
2370 |
|
2370 | |||
2371 | [websub] |
|
2371 | [websub] | |
2372 | issues = s|issue(\d+)|<a href="http://bts.example.org/issue\1">issue\1</a>|i |
|
2372 | issues = s|issue(\d+)|<a href="http://bts.example.org/issue\1">issue\1</a>|i | |
2373 | italic = s/\b_(\S+)_\b/<i>\1<\/i>/ |
|
2373 | italic = s/\b_(\S+)_\b/<i>\1<\/i>/ | |
2374 | bold = s/\*\b(\S+)\b\*/<b>\1<\/b>/ |
|
2374 | bold = s/\*\b(\S+)\b\*/<b>\1<\/b>/ | |
2375 |
|
2375 | |||
2376 | ``worker`` |
|
2376 | ``worker`` | |
2377 | ---------- |
|
2377 | ---------- | |
2378 |
|
2378 | |||
2379 | Parallel master/worker configuration. We currently perform working |
|
2379 | Parallel master/worker configuration. We currently perform working | |
2380 | directory updates in parallel on Unix-like systems, which greatly |
|
2380 | directory updates in parallel on Unix-like systems, which greatly | |
2381 | helps performance. |
|
2381 | helps performance. | |
2382 |
|
2382 | |||
2383 | ``numcpus`` |
|
2383 | ``numcpus`` | |
2384 | Number of CPUs to use for parallel operations. A zero or |
|
2384 | Number of CPUs to use for parallel operations. A zero or | |
2385 | negative value is treated as ``use the default``. |
|
2385 | negative value is treated as ``use the default``. | |
2386 | (default: 4 or the number of CPUs on the system, whichever is larger) |
|
2386 | (default: 4 or the number of CPUs on the system, whichever is larger) | |
2387 |
|
2387 | |||
2388 | ``backgroundclose`` |
|
2388 | ``backgroundclose`` | |
2389 | Whether to enable closing file handles on background threads during certain |
|
2389 | Whether to enable closing file handles on background threads during certain | |
2390 | operations. Some platforms aren't very efficient at closing file |
|
2390 | operations. Some platforms aren't very efficient at closing file | |
2391 | handles that have been written or appended to. By performing file closing |
|
2391 | handles that have been written or appended to. By performing file closing | |
2392 | on background threads, file write rate can increase substantially. |
|
2392 | on background threads, file write rate can increase substantially. | |
2393 | (default: true on Windows, false elsewhere) |
|
2393 | (default: true on Windows, false elsewhere) | |
2394 |
|
2394 | |||
2395 | ``backgroundcloseminfilecount`` |
|
2395 | ``backgroundcloseminfilecount`` | |
2396 | Minimum number of files required to trigger background file closing. |
|
2396 | Minimum number of files required to trigger background file closing. | |
2397 | Operations not writing this many files won't start background close |
|
2397 | Operations not writing this many files won't start background close | |
2398 | threads. |
|
2398 | threads. | |
2399 | (default: 2048) |
|
2399 | (default: 2048) | |
2400 |
|
2400 | |||
2401 | ``backgroundclosemaxqueue`` |
|
2401 | ``backgroundclosemaxqueue`` | |
2402 | The maximum number of opened file handles waiting to be closed in the |
|
2402 | The maximum number of opened file handles waiting to be closed in the | |
2403 | background. This option only has an effect if ``backgroundclose`` is |
|
2403 | background. This option only has an effect if ``backgroundclose`` is | |
2404 | enabled. |
|
2404 | enabled. | |
2405 | (default: 384) |
|
2405 | (default: 384) | |
2406 |
|
2406 | |||
2407 | ``backgroundclosethreadcount`` |
|
2407 | ``backgroundclosethreadcount`` | |
2408 | Number of threads to process background file closes. Only relevant if |
|
2408 | Number of threads to process background file closes. Only relevant if | |
2409 | ``backgroundclose`` is enabled. |
|
2409 | ``backgroundclose`` is enabled. | |
2410 | (default: 4) |
|
2410 | (default: 4) |
@@ -1,188 +1,188 b'' | |||||
1 | Changegroups are representations of repository revlog data, specifically |
|
1 | Changegroups are representations of repository revlog data, specifically | |
2 | the changelog data, root/flat manifest data, treemanifest data, and |
|
2 | the changelog data, root/flat manifest data, treemanifest data, and | |
3 | filelogs. |
|
3 | filelogs. | |
4 |
|
4 | |||
5 | There are 3 versions of changegroups: ``1``, ``2``, and ``3``. From a |
|
5 | There are 3 versions of changegroups: ``1``, ``2``, and ``3``. From a | |
6 | high-level, versions ``1`` and ``2`` are almost exactly the same, with the |
|
6 | high-level, versions ``1`` and ``2`` are almost exactly the same, with the | |
7 | only difference being an additional item in the *delta header*. Version |
|
7 | only difference being an additional item in the *delta header*. Version | |
8 | ``3`` adds support for revlog flags in the *delta header* and optionally |
|
8 | ``3`` adds support for revlog flags in the *delta header* and optionally | |
9 | exchanging treemanifests (enabled by setting an option on the |
|
9 | exchanging treemanifests (enabled by setting an option on the | |
10 | ``changegroup`` part in the bundle2). |
|
10 | ``changegroup`` part in the bundle2). | |
11 |
|
11 | |||
12 | Changegroups when not exchanging treemanifests consist of 3 logical |
|
12 | Changegroups when not exchanging treemanifests consist of 3 logical | |
13 | segments:: |
|
13 | segments:: | |
14 |
|
14 | |||
15 | +---------------------------------+ |
|
15 | +---------------------------------+ | |
16 | | | | | |
|
16 | | | | | | |
17 | | changeset | manifest | filelogs | |
|
17 | | changeset | manifest | filelogs | | |
18 | | | | | |
|
18 | | | | | | |
19 | | | | | |
|
19 | | | | | | |
20 | +---------------------------------+ |
|
20 | +---------------------------------+ | |
21 |
|
21 | |||
22 | When exchanging treemanifests, there are 4 logical segments:: |
|
22 | When exchanging treemanifests, there are 4 logical segments:: | |
23 |
|
23 | |||
24 | +-------------------------------------------------+ |
|
24 | +-------------------------------------------------+ | |
25 | | | | | | |
|
25 | | | | | | | |
26 | | changeset | root | treemanifests | filelogs | |
|
26 | | changeset | root | treemanifests | filelogs | | |
27 | | | manifest | | | |
|
27 | | | manifest | | | | |
28 | | | | | | |
|
28 | | | | | | | |
29 | +-------------------------------------------------+ |
|
29 | +-------------------------------------------------+ | |
30 |
|
30 | |||
31 | The principle building block of each segment is a *chunk*. A *chunk* |
|
31 | The principle building block of each segment is a *chunk*. A *chunk* | |
32 | is a framed piece of data:: |
|
32 | is a framed piece of data:: | |
33 |
|
33 | |||
34 | +---------------------------------------+ |
|
34 | +---------------------------------------+ | |
35 | | | | |
|
35 | | | | | |
36 | | length | data | |
|
36 | | length | data | | |
37 | | (4 bytes) | (<length - 4> bytes) | |
|
37 | | (4 bytes) | (<length - 4> bytes) | | |
38 | | | | |
|
38 | | | | | |
39 | +---------------------------------------+ |
|
39 | +---------------------------------------+ | |
40 |
|
40 | |||
41 | All integers are big-endian signed integers. Each chunk starts with a 32-bit |
|
41 | All integers are big-endian signed integers. Each chunk starts with a 32-bit | |
42 | integer indicating the length of the entire chunk (including the length field |
|
42 | integer indicating the length of the entire chunk (including the length field | |
43 | itself). |
|
43 | itself). | |
44 |
|
44 | |||
45 | There is a special case chunk that has a value of 0 for the length |
|
45 | There is a special case chunk that has a value of 0 for the length | |
46 | (``0x00000000``). We call this an *empty chunk*. |
|
46 | (``0x00000000``). We call this an *empty chunk*. | |
47 |
|
47 | |||
48 | Delta Groups |
|
48 | Delta Groups | |
49 | ============ |
|
49 | ============ | |
50 |
|
50 | |||
51 | A *delta group* expresses the content of a revlog as a series of deltas, |
|
51 | A *delta group* expresses the content of a revlog as a series of deltas, | |
52 | or patches against previous revisions. |
|
52 | or patches against previous revisions. | |
53 |
|
53 | |||
54 | Delta groups consist of 0 or more *chunks* followed by the *empty chunk* |
|
54 | Delta groups consist of 0 or more *chunks* followed by the *empty chunk* | |
55 | to signal the end of the delta group:: |
|
55 | to signal the end of the delta group:: | |
56 |
|
56 | |||
57 | +------------------------------------------------------------------------+ |
|
57 | +------------------------------------------------------------------------+ | |
58 | | | | | | | |
|
58 | | | | | | | | |
59 | | chunk0 length | chunk0 data | chunk1 length | chunk1 data | 0x0 | |
|
59 | | chunk0 length | chunk0 data | chunk1 length | chunk1 data | 0x0 | | |
60 | | (4 bytes) | (various) | (4 bytes) | (various) | (4 bytes) | |
|
60 | | (4 bytes) | (various) | (4 bytes) | (various) | (4 bytes) | | |
61 | | | | | | | |
|
61 | | | | | | | | |
62 | +------------------------------------------------------------------------+ |
|
62 | +------------------------------------------------------------------------+ | |
63 |
|
63 | |||
64 | Each *chunk*'s data consists of the following:: |
|
64 | Each *chunk*'s data consists of the following:: | |
65 |
|
65 | |||
66 | +---------------------------------------+ |
|
66 | +---------------------------------------+ | |
67 | | | | |
|
67 | | | | | |
68 | | delta header | delta data | |
|
68 | | delta header | delta data | | |
69 | | (various by version) | (various) | |
|
69 | | (various by version) | (various) | | |
70 | | | | |
|
70 | | | | | |
71 | +---------------------------------------+ |
|
71 | +---------------------------------------+ | |
72 |
|
72 | |||
73 | The *delta data* is a series of *delta*s that describe a diff from an existing |
|
73 | The *delta data* is a series of *delta*s that describe a diff from an existing | |
74 | entry (either that the recipient already has, or previously specified in the |
|
74 | entry (either that the recipient already has, or previously specified in the | |
75 |
bundle |
|
75 | bundle/changegroup). | |
76 |
|
76 | |||
77 | The *delta header* is different between versions ``1``, ``2``, and |
|
77 | The *delta header* is different between versions ``1``, ``2``, and | |
78 | ``3`` of the changegroup format. |
|
78 | ``3`` of the changegroup format. | |
79 |
|
79 | |||
80 | Version 1 (headerlen=80):: |
|
80 | Version 1 (headerlen=80):: | |
81 |
|
81 | |||
82 | +------------------------------------------------------+ |
|
82 | +------------------------------------------------------+ | |
83 | | | | | | |
|
83 | | | | | | | |
84 | | node | p1 node | p2 node | link node | |
|
84 | | node | p1 node | p2 node | link node | | |
85 | | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) | |
|
85 | | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) | | |
86 | | | | | | |
|
86 | | | | | | | |
87 | +------------------------------------------------------+ |
|
87 | +------------------------------------------------------+ | |
88 |
|
88 | |||
89 | Version 2 (headerlen=100):: |
|
89 | Version 2 (headerlen=100):: | |
90 |
|
90 | |||
91 | +------------------------------------------------------------------+ |
|
91 | +------------------------------------------------------------------+ | |
92 | | | | | | | |
|
92 | | | | | | | | |
93 | | node | p1 node | p2 node | base node | link node | |
|
93 | | node | p1 node | p2 node | base node | link node | | |
94 | | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) | |
|
94 | | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) | | |
95 | | | | | | | |
|
95 | | | | | | | | |
96 | +------------------------------------------------------------------+ |
|
96 | +------------------------------------------------------------------+ | |
97 |
|
97 | |||
98 | Version 3 (headerlen=102):: |
|
98 | Version 3 (headerlen=102):: | |
99 |
|
99 | |||
100 | +------------------------------------------------------------------------------+ |
|
100 | +------------------------------------------------------------------------------+ | |
101 | | | | | | | | |
|
101 | | | | | | | | | |
102 | | node | p1 node | p2 node | base node | link node | flags | |
|
102 | | node | p1 node | p2 node | base node | link node | flags | | |
103 | | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) | (2 bytes) | |
|
103 | | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) | (2 bytes) | | |
104 | | | | | | | | |
|
104 | | | | | | | | | |
105 | +------------------------------------------------------------------------------+ |
|
105 | +------------------------------------------------------------------------------+ | |
106 |
|
106 | |||
107 | The *delta data* consists of ``chunklen - 4 - headerlen`` bytes, which contain a |
|
107 | The *delta data* consists of ``chunklen - 4 - headerlen`` bytes, which contain a | |
108 | series of *delta*s, densely packed (no separators). These deltas describe a diff |
|
108 | series of *delta*s, densely packed (no separators). These deltas describe a diff | |
109 | from an existing entry (either that the recipient already has, or previously |
|
109 | from an existing entry (either that the recipient already has, or previously | |
110 | specified in the bundle/changegroup). The format is described more fully in |
|
110 | specified in the bundle/changegroup). The format is described more fully in | |
111 | ``hg help internals.bdiff``, but briefly:: |
|
111 | ``hg help internals.bdiff``, but briefly:: | |
112 |
|
112 | |||
113 | +---------------------------------------------------------------+ |
|
113 | +---------------------------------------------------------------+ | |
114 | | | | | | |
|
114 | | | | | | | |
115 | | start offset | end offset | new length | content | |
|
115 | | start offset | end offset | new length | content | | |
116 | | (4 bytes) | (4 bytes) | (4 bytes) | (<new length> bytes) | |
|
116 | | (4 bytes) | (4 bytes) | (4 bytes) | (<new length> bytes) | | |
117 | | | | | | |
|
117 | | | | | | | |
118 | +---------------------------------------------------------------+ |
|
118 | +---------------------------------------------------------------+ | |
119 |
|
119 | |||
120 | Please note that the length field in the delta data does *not* include itself. |
|
120 | Please note that the length field in the delta data does *not* include itself. | |
121 |
|
121 | |||
122 | In version 1, the delta is always applied against the previous node from |
|
122 | In version 1, the delta is always applied against the previous node from | |
123 | the changegroup or the first parent if this is the first entry in the |
|
123 | the changegroup or the first parent if this is the first entry in the | |
124 | changegroup. |
|
124 | changegroup. | |
125 |
|
125 | |||
126 | In version 2 and up, the delta base node is encoded in the entry in the |
|
126 | In version 2 and up, the delta base node is encoded in the entry in the | |
127 | changegroup. This allows the delta to be expressed against any parent, |
|
127 | changegroup. This allows the delta to be expressed against any parent, | |
128 | which can result in smaller deltas and more efficient encoding of data. |
|
128 | which can result in smaller deltas and more efficient encoding of data. | |
129 |
|
129 | |||
130 | Changeset Segment |
|
130 | Changeset Segment | |
131 | ================= |
|
131 | ================= | |
132 |
|
132 | |||
133 | The *changeset segment* consists of a single *delta group* holding |
|
133 | The *changeset segment* consists of a single *delta group* holding | |
134 | changelog data. The *empty chunk* at the end of the *delta group* denotes |
|
134 | changelog data. The *empty chunk* at the end of the *delta group* denotes | |
135 | the boundary to the *manifest segment*. |
|
135 | the boundary to the *manifest segment*. | |
136 |
|
136 | |||
137 | Manifest Segment |
|
137 | Manifest Segment | |
138 | ================ |
|
138 | ================ | |
139 |
|
139 | |||
140 | The *manifest segment* consists of a single *delta group* holding manifest |
|
140 | The *manifest segment* consists of a single *delta group* holding manifest | |
141 | data. If treemanifests are in use, it contains only the manifest for the |
|
141 | data. If treemanifests are in use, it contains only the manifest for the | |
142 | root directory of the repository. Otherwise, it contains the entire |
|
142 | root directory of the repository. Otherwise, it contains the entire | |
143 | manifest data. The *empty chunk* at the end of the *delta group* denotes |
|
143 | manifest data. The *empty chunk* at the end of the *delta group* denotes | |
144 | the boundary to the next segment (either the *treemanifests segment* or the |
|
144 | the boundary to the next segment (either the *treemanifests segment* or the | |
145 | *filelogs segment*, depending on version and the request options). |
|
145 | *filelogs segment*, depending on version and the request options). | |
146 |
|
146 | |||
147 | Treemanifests Segment |
|
147 | Treemanifests Segment | |
148 | --------------------- |
|
148 | --------------------- | |
149 |
|
149 | |||
150 | The *treemanifests segment* only exists in changegroup version ``3``, and |
|
150 | The *treemanifests segment* only exists in changegroup version ``3``, and | |
151 | only if the 'treemanifest' param is part of the bundle2 changegroup part |
|
151 | only if the 'treemanifest' param is part of the bundle2 changegroup part | |
152 | (it is not possible to use changegroup version 3 outside of bundle2). |
|
152 | (it is not possible to use changegroup version 3 outside of bundle2). | |
153 | Aside from the filenames in the *treemanifests segment* containing a |
|
153 | Aside from the filenames in the *treemanifests segment* containing a | |
154 | trailing ``/`` character, it behaves identically to the *filelogs segment* |
|
154 | trailing ``/`` character, it behaves identically to the *filelogs segment* | |
155 | (see below). The final sub-segment is followed by an *empty chunk* (logically, |
|
155 | (see below). The final sub-segment is followed by an *empty chunk* (logically, | |
156 | a sub-segment with filename size 0). This denotes the boundary to the |
|
156 | a sub-segment with filename size 0). This denotes the boundary to the | |
157 | *filelogs segment*. |
|
157 | *filelogs segment*. | |
158 |
|
158 | |||
159 | Filelogs Segment |
|
159 | Filelogs Segment | |
160 | ================ |
|
160 | ================ | |
161 |
|
161 | |||
162 | The *filelogs segment* consists of multiple sub-segments, each |
|
162 | The *filelogs segment* consists of multiple sub-segments, each | |
163 | corresponding to an individual file whose data is being described:: |
|
163 | corresponding to an individual file whose data is being described:: | |
164 |
|
164 | |||
165 | +--------------------------------------------------+ |
|
165 | +--------------------------------------------------+ | |
166 | | | | | | | |
|
166 | | | | | | | | |
167 | | filelog0 | filelog1 | filelog2 | ... | 0x0 | |
|
167 | | filelog0 | filelog1 | filelog2 | ... | 0x0 | | |
168 | | | | | | (4 bytes) | |
|
168 | | | | | | (4 bytes) | | |
169 | | | | | | | |
|
169 | | | | | | | | |
170 | +--------------------------------------------------+ |
|
170 | +--------------------------------------------------+ | |
171 |
|
171 | |||
172 | The final filelog sub-segment is followed by an *empty chunk* (logically, |
|
172 | The final filelog sub-segment is followed by an *empty chunk* (logically, | |
173 | a sub-segment with filename size 0). This denotes the end of the segment |
|
173 | a sub-segment with filename size 0). This denotes the end of the segment | |
174 | and of the overall changegroup. |
|
174 | and of the overall changegroup. | |
175 |
|
175 | |||
176 | Each filelog sub-segment consists of the following:: |
|
176 | Each filelog sub-segment consists of the following:: | |
177 |
|
177 | |||
178 | +------------------------------------------------------+ |
|
178 | +------------------------------------------------------+ | |
179 | | | | | |
|
179 | | | | | | |
180 | | filename length | filename | delta group | |
|
180 | | filename length | filename | delta group | | |
181 | | (4 bytes) | (<length - 4> bytes) | (various) | |
|
181 | | (4 bytes) | (<length - 4> bytes) | (various) | | |
182 | | | | | |
|
182 | | | | | | |
183 | +------------------------------------------------------+ |
|
183 | +------------------------------------------------------+ | |
184 |
|
184 | |||
185 | That is, a *chunk* consisting of the filename (not terminated or padded) |
|
185 | That is, a *chunk* consisting of the filename (not terminated or padded) | |
186 | followed by N chunks constituting the *delta group* for this file. The |
|
186 | followed by N chunks constituting the *delta group* for this file. The | |
187 | *empty chunk* at the end of each *delta group* denotes the boundary to the |
|
187 | *empty chunk* at the end of each *delta group* denotes the boundary to the | |
188 | next filelog sub-segment. |
|
188 | next filelog sub-segment. |
@@ -1,192 +1,192 b'' | |||||
1 | Mercurial allows you to customize output of commands through |
|
1 | Mercurial allows you to customize output of commands through | |
2 | templates. You can either pass in a template or select an existing |
|
2 | templates. You can either pass in a template or select an existing | |
3 | template-style from the command line, via the --template option. |
|
3 | template-style from the command line, via the --template option. | |
4 |
|
4 | |||
5 | You can customize output for any "log-like" command: log, |
|
5 | You can customize output for any "log-like" command: log, | |
6 | outgoing, incoming, tip, parents, and heads. |
|
6 | outgoing, incoming, tip, parents, and heads. | |
7 |
|
7 | |||
8 | Some built-in styles are packaged with Mercurial. These can be listed |
|
8 | Some built-in styles are packaged with Mercurial. These can be listed | |
9 | with :hg:`log --template list`. Example usage:: |
|
9 | with :hg:`log --template list`. Example usage:: | |
10 |
|
10 | |||
11 | $ hg log -r1.0::1.1 --template changelog |
|
11 | $ hg log -r1.0::1.1 --template changelog | |
12 |
|
12 | |||
13 | A template is a piece of text, with markup to invoke variable |
|
13 | A template is a piece of text, with markup to invoke variable | |
14 | expansion:: |
|
14 | expansion:: | |
15 |
|
15 | |||
16 | $ hg log -r1 --template "{node}\n" |
|
16 | $ hg log -r1 --template "{node}\n" | |
17 | b56ce7b07c52de7d5fd79fb89701ea538af65746 |
|
17 | b56ce7b07c52de7d5fd79fb89701ea538af65746 | |
18 |
|
18 | |||
19 | Keywords |
|
19 | Keywords | |
20 | ======== |
|
20 | ======== | |
21 |
|
21 | |||
22 | Strings in curly braces are called keywords. The availability of |
|
22 | Strings in curly braces are called keywords. The availability of | |
23 | keywords depends on the exact context of the templater. These |
|
23 | keywords depends on the exact context of the templater. These | |
24 | keywords are usually available for templating a log-like command: |
|
24 | keywords are usually available for templating a log-like command: | |
25 |
|
25 | |||
26 | .. keywordsmarker |
|
26 | .. keywordsmarker | |
27 |
|
27 | |||
28 | The "date" keyword does not produce human-readable output. If you |
|
28 | The "date" keyword does not produce human-readable output. If you | |
29 | want to use a date in your output, you can use a filter to process |
|
29 | want to use a date in your output, you can use a filter to process | |
30 | it. Filters are functions which return a string based on the input |
|
30 | it. Filters are functions which return a string based on the input | |
31 | variable. Be sure to use the stringify filter first when you're |
|
31 | variable. Be sure to use the stringify filter first when you're | |
32 | applying a string-input filter to a list-like input variable. |
|
32 | applying a string-input filter to a list-like input variable. | |
33 | You can also use a chain of filters to get the desired output:: |
|
33 | You can also use a chain of filters to get the desired output:: | |
34 |
|
34 | |||
35 | $ hg tip --template "{date|isodate}\n" |
|
35 | $ hg tip --template "{date|isodate}\n" | |
36 | 2008-08-21 18:22 +0000 |
|
36 | 2008-08-21 18:22 +0000 | |
37 |
|
37 | |||
38 | Filters |
|
38 | Filters | |
39 | ======= |
|
39 | ======= | |
40 |
|
40 | |||
41 | List of filters: |
|
41 | List of filters: | |
42 |
|
42 | |||
43 | .. filtersmarker |
|
43 | .. filtersmarker | |
44 |
|
44 | |||
45 | Note that a filter is nothing more than a function call, i.e. |
|
45 | Note that a filter is nothing more than a function call, i.e. | |
46 | ``expr|filter`` is equivalent to ``filter(expr)``. |
|
46 | ``expr|filter`` is equivalent to ``filter(expr)``. | |
47 |
|
47 | |||
48 | Functions |
|
48 | Functions | |
49 | ========= |
|
49 | ========= | |
50 |
|
50 | |||
51 | In addition to filters, there are some basic built-in functions: |
|
51 | In addition to filters, there are some basic built-in functions: | |
52 |
|
52 | |||
53 | .. functionsmarker |
|
53 | .. functionsmarker | |
54 |
|
54 | |||
55 | Operators |
|
55 | Operators | |
56 | ========= |
|
56 | ========= | |
57 |
|
57 | |||
58 | We provide a limited set of infix arithmetic operations on integers:: |
|
58 | We provide a limited set of infix arithmetic operations on integers:: | |
59 |
|
59 | |||
60 | + for addition |
|
60 | + for addition | |
61 | - for subtraction |
|
61 | - for subtraction | |
62 | * for multiplication |
|
62 | * for multiplication | |
63 | / for floor division (division rounded to integer nearest -infinity) |
|
63 | / for floor division (division rounded to integer nearest -infinity) | |
64 |
|
64 | |||
65 | Division fulfils the law x = x / y + mod(x, y). |
|
65 | Division fulfills the law x = x / y + mod(x, y). | |
66 |
|
66 | |||
67 | Also, for any expression that returns a list, there is a list operator:: |
|
67 | Also, for any expression that returns a list, there is a list operator:: | |
68 |
|
68 | |||
69 | expr % "{template}" |
|
69 | expr % "{template}" | |
70 |
|
70 | |||
71 | As seen in the above example, ``{template}`` is interpreted as a template. |
|
71 | As seen in the above example, ``{template}`` is interpreted as a template. | |
72 | To prevent it from being interpreted, you can use an escape character ``\{`` |
|
72 | To prevent it from being interpreted, you can use an escape character ``\{`` | |
73 | or a raw string prefix, ``r'...'``. |
|
73 | or a raw string prefix, ``r'...'``. | |
74 |
|
74 | |||
75 | Aliases |
|
75 | Aliases | |
76 | ======= |
|
76 | ======= | |
77 |
|
77 | |||
78 | New keywords and functions can be defined in the ``templatealias`` section of |
|
78 | New keywords and functions can be defined in the ``templatealias`` section of | |
79 | a Mercurial configuration file:: |
|
79 | a Mercurial configuration file:: | |
80 |
|
80 | |||
81 | <alias> = <definition> |
|
81 | <alias> = <definition> | |
82 |
|
82 | |||
83 | Arguments of the form `a1`, `a2`, etc. are substituted from the alias into |
|
83 | Arguments of the form `a1`, `a2`, etc. are substituted from the alias into | |
84 | the definition. |
|
84 | the definition. | |
85 |
|
85 | |||
86 | For example, |
|
86 | For example, | |
87 |
|
87 | |||
88 | :: |
|
88 | :: | |
89 |
|
89 | |||
90 | [templatealias] |
|
90 | [templatealias] | |
91 | r = rev |
|
91 | r = rev | |
92 | rn = "{r}:{node|short}" |
|
92 | rn = "{r}:{node|short}" | |
93 | leftpad(s, w) = pad(s, w, ' ', True) |
|
93 | leftpad(s, w) = pad(s, w, ' ', True) | |
94 |
|
94 | |||
95 | defines two symbol aliases, ``r`` and ``rn``, and a function alias |
|
95 | defines two symbol aliases, ``r`` and ``rn``, and a function alias | |
96 | ``leftpad()``. |
|
96 | ``leftpad()``. | |
97 |
|
97 | |||
98 | It's also possible to specify complete template strings, using the |
|
98 | It's also possible to specify complete template strings, using the | |
99 | ``templates`` section. The syntax used is the general template string syntax. |
|
99 | ``templates`` section. The syntax used is the general template string syntax. | |
100 |
|
100 | |||
101 | For example, |
|
101 | For example, | |
102 |
|
102 | |||
103 | :: |
|
103 | :: | |
104 |
|
104 | |||
105 | [templates] |
|
105 | [templates] | |
106 | nodedate = "{node|short}: {date(date, "%Y-%m-%d")}\n" |
|
106 | nodedate = "{node|short}: {date(date, "%Y-%m-%d")}\n" | |
107 |
|
107 | |||
108 | defines a template, ``nodedate``, which can be called like:: |
|
108 | defines a template, ``nodedate``, which can be called like:: | |
109 |
|
109 | |||
110 | $ hg log -r . -Tnodedate |
|
110 | $ hg log -r . -Tnodedate | |
111 |
|
111 | |||
112 | Examples |
|
112 | Examples | |
113 | ======== |
|
113 | ======== | |
114 |
|
114 | |||
115 | Some sample command line templates: |
|
115 | Some sample command line templates: | |
116 |
|
116 | |||
117 | - Format lists, e.g. files:: |
|
117 | - Format lists, e.g. files:: | |
118 |
|
118 | |||
119 | $ hg log -r 0 --template "files:\n{files % ' {file}\n'}" |
|
119 | $ hg log -r 0 --template "files:\n{files % ' {file}\n'}" | |
120 |
|
120 | |||
121 | - Join the list of files with a ", ":: |
|
121 | - Join the list of files with a ", ":: | |
122 |
|
122 | |||
123 | $ hg log -r 0 --template "files: {join(files, ', ')}\n" |
|
123 | $ hg log -r 0 --template "files: {join(files, ', ')}\n" | |
124 |
|
124 | |||
125 | - Join the list of files ending with ".py" with a ", ":: |
|
125 | - Join the list of files ending with ".py" with a ", ":: | |
126 |
|
126 | |||
127 | $ hg log -r 0 --template "pythonfiles: {join(files('**.py'), ', ')}\n" |
|
127 | $ hg log -r 0 --template "pythonfiles: {join(files('**.py'), ', ')}\n" | |
128 |
|
128 | |||
129 | - Separate non-empty arguments by a " ":: |
|
129 | - Separate non-empty arguments by a " ":: | |
130 |
|
130 | |||
131 | $ hg log -r 0 --template "{separate(' ', node, bookmarks, tags}\n" |
|
131 | $ hg log -r 0 --template "{separate(' ', node, bookmarks, tags}\n" | |
132 |
|
132 | |||
133 | - Modify each line of a commit description:: |
|
133 | - Modify each line of a commit description:: | |
134 |
|
134 | |||
135 | $ hg log --template "{splitlines(desc) % '**** {line}\n'}" |
|
135 | $ hg log --template "{splitlines(desc) % '**** {line}\n'}" | |
136 |
|
136 | |||
137 | - Format date:: |
|
137 | - Format date:: | |
138 |
|
138 | |||
139 | $ hg log -r 0 --template "{date(date, '%Y')}\n" |
|
139 | $ hg log -r 0 --template "{date(date, '%Y')}\n" | |
140 |
|
140 | |||
141 | - Display date in UTC:: |
|
141 | - Display date in UTC:: | |
142 |
|
142 | |||
143 | $ hg log -r 0 --template "{localdate(date, 'UTC')|date}\n" |
|
143 | $ hg log -r 0 --template "{localdate(date, 'UTC')|date}\n" | |
144 |
|
144 | |||
145 | - Output the description set to a fill-width of 30:: |
|
145 | - Output the description set to a fill-width of 30:: | |
146 |
|
146 | |||
147 | $ hg log -r 0 --template "{fill(desc, 30)}" |
|
147 | $ hg log -r 0 --template "{fill(desc, 30)}" | |
148 |
|
148 | |||
149 | - Use a conditional to test for the default branch:: |
|
149 | - Use a conditional to test for the default branch:: | |
150 |
|
150 | |||
151 | $ hg log -r 0 --template "{ifeq(branch, 'default', 'on the main branch', |
|
151 | $ hg log -r 0 --template "{ifeq(branch, 'default', 'on the main branch', | |
152 | 'on branch {branch}')}\n" |
|
152 | 'on branch {branch}')}\n" | |
153 |
|
153 | |||
154 | - Append a newline if not empty:: |
|
154 | - Append a newline if not empty:: | |
155 |
|
155 | |||
156 | $ hg tip --template "{if(author, '{author}\n')}" |
|
156 | $ hg tip --template "{if(author, '{author}\n')}" | |
157 |
|
157 | |||
158 | - Label the output for use with the color extension:: |
|
158 | - Label the output for use with the color extension:: | |
159 |
|
159 | |||
160 | $ hg log -r 0 --template "{label('changeset.{phase}', node|short)}\n" |
|
160 | $ hg log -r 0 --template "{label('changeset.{phase}', node|short)}\n" | |
161 |
|
161 | |||
162 | - Invert the firstline filter, i.e. everything but the first line:: |
|
162 | - Invert the firstline filter, i.e. everything but the first line:: | |
163 |
|
163 | |||
164 | $ hg log -r 0 --template "{sub(r'^.*\n?\n?', '', desc)}\n" |
|
164 | $ hg log -r 0 --template "{sub(r'^.*\n?\n?', '', desc)}\n" | |
165 |
|
165 | |||
166 | - Display the contents of the 'extra' field, one per line:: |
|
166 | - Display the contents of the 'extra' field, one per line:: | |
167 |
|
167 | |||
168 | $ hg log -r 0 --template "{join(extras, '\n')}\n" |
|
168 | $ hg log -r 0 --template "{join(extras, '\n')}\n" | |
169 |
|
169 | |||
170 | - Mark the active bookmark with '*':: |
|
170 | - Mark the active bookmark with '*':: | |
171 |
|
171 | |||
172 | $ hg log --template "{bookmarks % '{bookmark}{ifeq(bookmark, active, '*')} '}\n" |
|
172 | $ hg log --template "{bookmarks % '{bookmark}{ifeq(bookmark, active, '*')} '}\n" | |
173 |
|
173 | |||
174 | - Find the previous release candidate tag, the distance and changes since the tag:: |
|
174 | - Find the previous release candidate tag, the distance and changes since the tag:: | |
175 |
|
175 | |||
176 | $ hg log -r . --template "{latesttag('re:^.*-rc$') % '{tag}, {changes}, {distance}'}\n" |
|
176 | $ hg log -r . --template "{latesttag('re:^.*-rc$') % '{tag}, {changes}, {distance}'}\n" | |
177 |
|
177 | |||
178 | - Mark the working copy parent with '@':: |
|
178 | - Mark the working copy parent with '@':: | |
179 |
|
179 | |||
180 | $ hg log --template "{ifcontains(rev, revset('.'), '@')}\n" |
|
180 | $ hg log --template "{ifcontains(rev, revset('.'), '@')}\n" | |
181 |
|
181 | |||
182 | - Show details of parent revisions:: |
|
182 | - Show details of parent revisions:: | |
183 |
|
183 | |||
184 | $ hg log --template "{revset('parents(%d)', rev) % '{desc|firstline}\n'}" |
|
184 | $ hg log --template "{revset('parents(%d)', rev) % '{desc|firstline}\n'}" | |
185 |
|
185 | |||
186 | - Show only commit descriptions that start with "template":: |
|
186 | - Show only commit descriptions that start with "template":: | |
187 |
|
187 | |||
188 | $ hg log --template "{startswith('template', firstline(desc))}\n" |
|
188 | $ hg log --template "{startswith('template', firstline(desc))}\n" | |
189 |
|
189 | |||
190 | - Print the first word of each line of a commit message:: |
|
190 | - Print the first word of each line of a commit message:: | |
191 |
|
191 | |||
192 | $ hg log --template "{word(0, desc)}\n" |
|
192 | $ hg log --template "{word(0, desc)}\n" |
@@ -1,3327 +1,3327 b'' | |||||
1 | Short help: |
|
1 | Short help: | |
2 |
|
2 | |||
3 | $ hg |
|
3 | $ hg | |
4 | Mercurial Distributed SCM |
|
4 | Mercurial Distributed SCM | |
5 |
|
5 | |||
6 | basic commands: |
|
6 | basic commands: | |
7 |
|
7 | |||
8 | add add the specified files on the next commit |
|
8 | add add the specified files on the next commit | |
9 | annotate show changeset information by line for each file |
|
9 | annotate show changeset information by line for each file | |
10 | clone make a copy of an existing repository |
|
10 | clone make a copy of an existing repository | |
11 | commit commit the specified files or all outstanding changes |
|
11 | commit commit the specified files or all outstanding changes | |
12 | diff diff repository (or selected files) |
|
12 | diff diff repository (or selected files) | |
13 | export dump the header and diffs for one or more changesets |
|
13 | export dump the header and diffs for one or more changesets | |
14 | forget forget the specified files on the next commit |
|
14 | forget forget the specified files on the next commit | |
15 | init create a new repository in the given directory |
|
15 | init create a new repository in the given directory | |
16 | log show revision history of entire repository or files |
|
16 | log show revision history of entire repository or files | |
17 | merge merge another revision into working directory |
|
17 | merge merge another revision into working directory | |
18 | pull pull changes from the specified source |
|
18 | pull pull changes from the specified source | |
19 | push push changes to the specified destination |
|
19 | push push changes to the specified destination | |
20 | remove remove the specified files on the next commit |
|
20 | remove remove the specified files on the next commit | |
21 | serve start stand-alone webserver |
|
21 | serve start stand-alone webserver | |
22 | status show changed files in the working directory |
|
22 | status show changed files in the working directory | |
23 | summary summarize working directory state |
|
23 | summary summarize working directory state | |
24 | update update working directory (or switch revisions) |
|
24 | update update working directory (or switch revisions) | |
25 |
|
25 | |||
26 | (use 'hg help' for the full list of commands or 'hg -v' for details) |
|
26 | (use 'hg help' for the full list of commands or 'hg -v' for details) | |
27 |
|
27 | |||
28 | $ hg -q |
|
28 | $ hg -q | |
29 | add add the specified files on the next commit |
|
29 | add add the specified files on the next commit | |
30 | annotate show changeset information by line for each file |
|
30 | annotate show changeset information by line for each file | |
31 | clone make a copy of an existing repository |
|
31 | clone make a copy of an existing repository | |
32 | commit commit the specified files or all outstanding changes |
|
32 | commit commit the specified files or all outstanding changes | |
33 | diff diff repository (or selected files) |
|
33 | diff diff repository (or selected files) | |
34 | export dump the header and diffs for one or more changesets |
|
34 | export dump the header and diffs for one or more changesets | |
35 | forget forget the specified files on the next commit |
|
35 | forget forget the specified files on the next commit | |
36 | init create a new repository in the given directory |
|
36 | init create a new repository in the given directory | |
37 | log show revision history of entire repository or files |
|
37 | log show revision history of entire repository or files | |
38 | merge merge another revision into working directory |
|
38 | merge merge another revision into working directory | |
39 | pull pull changes from the specified source |
|
39 | pull pull changes from the specified source | |
40 | push push changes to the specified destination |
|
40 | push push changes to the specified destination | |
41 | remove remove the specified files on the next commit |
|
41 | remove remove the specified files on the next commit | |
42 | serve start stand-alone webserver |
|
42 | serve start stand-alone webserver | |
43 | status show changed files in the working directory |
|
43 | status show changed files in the working directory | |
44 | summary summarize working directory state |
|
44 | summary summarize working directory state | |
45 | update update working directory (or switch revisions) |
|
45 | update update working directory (or switch revisions) | |
46 |
|
46 | |||
47 | $ hg help |
|
47 | $ hg help | |
48 | Mercurial Distributed SCM |
|
48 | Mercurial Distributed SCM | |
49 |
|
49 | |||
50 | list of commands: |
|
50 | list of commands: | |
51 |
|
51 | |||
52 | add add the specified files on the next commit |
|
52 | add add the specified files on the next commit | |
53 | addremove add all new files, delete all missing files |
|
53 | addremove add all new files, delete all missing files | |
54 | annotate show changeset information by line for each file |
|
54 | annotate show changeset information by line for each file | |
55 | archive create an unversioned archive of a repository revision |
|
55 | archive create an unversioned archive of a repository revision | |
56 | backout reverse effect of earlier changeset |
|
56 | backout reverse effect of earlier changeset | |
57 | bisect subdivision search of changesets |
|
57 | bisect subdivision search of changesets | |
58 | bookmarks create a new bookmark or list existing bookmarks |
|
58 | bookmarks create a new bookmark or list existing bookmarks | |
59 | branch set or show the current branch name |
|
59 | branch set or show the current branch name | |
60 | branches list repository named branches |
|
60 | branches list repository named branches | |
61 | bundle create a bundle file |
|
61 | bundle create a bundle file | |
62 | cat output the current or given revision of files |
|
62 | cat output the current or given revision of files | |
63 | clone make a copy of an existing repository |
|
63 | clone make a copy of an existing repository | |
64 | commit commit the specified files or all outstanding changes |
|
64 | commit commit the specified files or all outstanding changes | |
65 | config show combined config settings from all hgrc files |
|
65 | config show combined config settings from all hgrc files | |
66 | copy mark files as copied for the next commit |
|
66 | copy mark files as copied for the next commit | |
67 | diff diff repository (or selected files) |
|
67 | diff diff repository (or selected files) | |
68 | export dump the header and diffs for one or more changesets |
|
68 | export dump the header and diffs for one or more changesets | |
69 | files list tracked files |
|
69 | files list tracked files | |
70 | forget forget the specified files on the next commit |
|
70 | forget forget the specified files on the next commit | |
71 | graft copy changes from other branches onto the current branch |
|
71 | graft copy changes from other branches onto the current branch | |
72 | grep search revision history for a pattern in specified files |
|
72 | grep search revision history for a pattern in specified files | |
73 | heads show branch heads |
|
73 | heads show branch heads | |
74 | help show help for a given topic or a help overview |
|
74 | help show help for a given topic or a help overview | |
75 | identify identify the working directory or specified revision |
|
75 | identify identify the working directory or specified revision | |
76 | import import an ordered set of patches |
|
76 | import import an ordered set of patches | |
77 | incoming show new changesets found in source |
|
77 | incoming show new changesets found in source | |
78 | init create a new repository in the given directory |
|
78 | init create a new repository in the given directory | |
79 | log show revision history of entire repository or files |
|
79 | log show revision history of entire repository or files | |
80 | manifest output the current or given revision of the project manifest |
|
80 | manifest output the current or given revision of the project manifest | |
81 | merge merge another revision into working directory |
|
81 | merge merge another revision into working directory | |
82 | outgoing show changesets not found in the destination |
|
82 | outgoing show changesets not found in the destination | |
83 | paths show aliases for remote repositories |
|
83 | paths show aliases for remote repositories | |
84 | phase set or show the current phase name |
|
84 | phase set or show the current phase name | |
85 | pull pull changes from the specified source |
|
85 | pull pull changes from the specified source | |
86 | push push changes to the specified destination |
|
86 | push push changes to the specified destination | |
87 | recover roll back an interrupted transaction |
|
87 | recover roll back an interrupted transaction | |
88 | remove remove the specified files on the next commit |
|
88 | remove remove the specified files on the next commit | |
89 | rename rename files; equivalent of copy + remove |
|
89 | rename rename files; equivalent of copy + remove | |
90 | resolve redo merges or set/view the merge status of files |
|
90 | resolve redo merges or set/view the merge status of files | |
91 | revert restore files to their checkout state |
|
91 | revert restore files to their checkout state | |
92 | root print the root (top) of the current working directory |
|
92 | root print the root (top) of the current working directory | |
93 | serve start stand-alone webserver |
|
93 | serve start stand-alone webserver | |
94 | status show changed files in the working directory |
|
94 | status show changed files in the working directory | |
95 | summary summarize working directory state |
|
95 | summary summarize working directory state | |
96 | tag add one or more tags for the current or given revision |
|
96 | tag add one or more tags for the current or given revision | |
97 | tags list repository tags |
|
97 | tags list repository tags | |
98 | unbundle apply one or more bundle files |
|
98 | unbundle apply one or more bundle files | |
99 | update update working directory (or switch revisions) |
|
99 | update update working directory (or switch revisions) | |
100 | verify verify the integrity of the repository |
|
100 | verify verify the integrity of the repository | |
101 | version output version and copyright information |
|
101 | version output version and copyright information | |
102 |
|
102 | |||
103 | additional help topics: |
|
103 | additional help topics: | |
104 |
|
104 | |||
105 | bundlespec Bundle File Formats |
|
105 | bundlespec Bundle File Formats | |
106 | color Colorizing Outputs |
|
106 | color Colorizing Outputs | |
107 | config Configuration Files |
|
107 | config Configuration Files | |
108 | dates Date Formats |
|
108 | dates Date Formats | |
109 | diffs Diff Formats |
|
109 | diffs Diff Formats | |
110 | environment Environment Variables |
|
110 | environment Environment Variables | |
111 | extensions Using Additional Features |
|
111 | extensions Using Additional Features | |
112 | filesets Specifying File Sets |
|
112 | filesets Specifying File Sets | |
113 | glossary Glossary |
|
113 | glossary Glossary | |
114 | hgignore Syntax for Mercurial Ignore Files |
|
114 | hgignore Syntax for Mercurial Ignore Files | |
115 | hgweb Configuring hgweb |
|
115 | hgweb Configuring hgweb | |
116 | internals Technical implementation topics |
|
116 | internals Technical implementation topics | |
117 | merge-tools Merge Tools |
|
117 | merge-tools Merge Tools | |
118 | pager Pager Support |
|
118 | pager Pager Support | |
119 | patterns File Name Patterns |
|
119 | patterns File Name Patterns | |
120 | phases Working with Phases |
|
120 | phases Working with Phases | |
121 | revisions Specifying Revisions |
|
121 | revisions Specifying Revisions | |
122 | scripting Using Mercurial from scripts and automation |
|
122 | scripting Using Mercurial from scripts and automation | |
123 | subrepos Subrepositories |
|
123 | subrepos Subrepositories | |
124 | templating Template Usage |
|
124 | templating Template Usage | |
125 | urls URL Paths |
|
125 | urls URL Paths | |
126 |
|
126 | |||
127 | (use 'hg help -v' to show built-in aliases and global options) |
|
127 | (use 'hg help -v' to show built-in aliases and global options) | |
128 |
|
128 | |||
129 | $ hg -q help |
|
129 | $ hg -q help | |
130 | add add the specified files on the next commit |
|
130 | add add the specified files on the next commit | |
131 | addremove add all new files, delete all missing files |
|
131 | addremove add all new files, delete all missing files | |
132 | annotate show changeset information by line for each file |
|
132 | annotate show changeset information by line for each file | |
133 | archive create an unversioned archive of a repository revision |
|
133 | archive create an unversioned archive of a repository revision | |
134 | backout reverse effect of earlier changeset |
|
134 | backout reverse effect of earlier changeset | |
135 | bisect subdivision search of changesets |
|
135 | bisect subdivision search of changesets | |
136 | bookmarks create a new bookmark or list existing bookmarks |
|
136 | bookmarks create a new bookmark or list existing bookmarks | |
137 | branch set or show the current branch name |
|
137 | branch set or show the current branch name | |
138 | branches list repository named branches |
|
138 | branches list repository named branches | |
139 | bundle create a bundle file |
|
139 | bundle create a bundle file | |
140 | cat output the current or given revision of files |
|
140 | cat output the current or given revision of files | |
141 | clone make a copy of an existing repository |
|
141 | clone make a copy of an existing repository | |
142 | commit commit the specified files or all outstanding changes |
|
142 | commit commit the specified files or all outstanding changes | |
143 | config show combined config settings from all hgrc files |
|
143 | config show combined config settings from all hgrc files | |
144 | copy mark files as copied for the next commit |
|
144 | copy mark files as copied for the next commit | |
145 | diff diff repository (or selected files) |
|
145 | diff diff repository (or selected files) | |
146 | export dump the header and diffs for one or more changesets |
|
146 | export dump the header and diffs for one or more changesets | |
147 | files list tracked files |
|
147 | files list tracked files | |
148 | forget forget the specified files on the next commit |
|
148 | forget forget the specified files on the next commit | |
149 | graft copy changes from other branches onto the current branch |
|
149 | graft copy changes from other branches onto the current branch | |
150 | grep search revision history for a pattern in specified files |
|
150 | grep search revision history for a pattern in specified files | |
151 | heads show branch heads |
|
151 | heads show branch heads | |
152 | help show help for a given topic or a help overview |
|
152 | help show help for a given topic or a help overview | |
153 | identify identify the working directory or specified revision |
|
153 | identify identify the working directory or specified revision | |
154 | import import an ordered set of patches |
|
154 | import import an ordered set of patches | |
155 | incoming show new changesets found in source |
|
155 | incoming show new changesets found in source | |
156 | init create a new repository in the given directory |
|
156 | init create a new repository in the given directory | |
157 | log show revision history of entire repository or files |
|
157 | log show revision history of entire repository or files | |
158 | manifest output the current or given revision of the project manifest |
|
158 | manifest output the current or given revision of the project manifest | |
159 | merge merge another revision into working directory |
|
159 | merge merge another revision into working directory | |
160 | outgoing show changesets not found in the destination |
|
160 | outgoing show changesets not found in the destination | |
161 | paths show aliases for remote repositories |
|
161 | paths show aliases for remote repositories | |
162 | phase set or show the current phase name |
|
162 | phase set or show the current phase name | |
163 | pull pull changes from the specified source |
|
163 | pull pull changes from the specified source | |
164 | push push changes to the specified destination |
|
164 | push push changes to the specified destination | |
165 | recover roll back an interrupted transaction |
|
165 | recover roll back an interrupted transaction | |
166 | remove remove the specified files on the next commit |
|
166 | remove remove the specified files on the next commit | |
167 | rename rename files; equivalent of copy + remove |
|
167 | rename rename files; equivalent of copy + remove | |
168 | resolve redo merges or set/view the merge status of files |
|
168 | resolve redo merges or set/view the merge status of files | |
169 | revert restore files to their checkout state |
|
169 | revert restore files to their checkout state | |
170 | root print the root (top) of the current working directory |
|
170 | root print the root (top) of the current working directory | |
171 | serve start stand-alone webserver |
|
171 | serve start stand-alone webserver | |
172 | status show changed files in the working directory |
|
172 | status show changed files in the working directory | |
173 | summary summarize working directory state |
|
173 | summary summarize working directory state | |
174 | tag add one or more tags for the current or given revision |
|
174 | tag add one or more tags for the current or given revision | |
175 | tags list repository tags |
|
175 | tags list repository tags | |
176 | unbundle apply one or more bundle files |
|
176 | unbundle apply one or more bundle files | |
177 | update update working directory (or switch revisions) |
|
177 | update update working directory (or switch revisions) | |
178 | verify verify the integrity of the repository |
|
178 | verify verify the integrity of the repository | |
179 | version output version and copyright information |
|
179 | version output version and copyright information | |
180 |
|
180 | |||
181 | additional help topics: |
|
181 | additional help topics: | |
182 |
|
182 | |||
183 | bundlespec Bundle File Formats |
|
183 | bundlespec Bundle File Formats | |
184 | color Colorizing Outputs |
|
184 | color Colorizing Outputs | |
185 | config Configuration Files |
|
185 | config Configuration Files | |
186 | dates Date Formats |
|
186 | dates Date Formats | |
187 | diffs Diff Formats |
|
187 | diffs Diff Formats | |
188 | environment Environment Variables |
|
188 | environment Environment Variables | |
189 | extensions Using Additional Features |
|
189 | extensions Using Additional Features | |
190 | filesets Specifying File Sets |
|
190 | filesets Specifying File Sets | |
191 | glossary Glossary |
|
191 | glossary Glossary | |
192 | hgignore Syntax for Mercurial Ignore Files |
|
192 | hgignore Syntax for Mercurial Ignore Files | |
193 | hgweb Configuring hgweb |
|
193 | hgweb Configuring hgweb | |
194 | internals Technical implementation topics |
|
194 | internals Technical implementation topics | |
195 | merge-tools Merge Tools |
|
195 | merge-tools Merge Tools | |
196 | pager Pager Support |
|
196 | pager Pager Support | |
197 | patterns File Name Patterns |
|
197 | patterns File Name Patterns | |
198 | phases Working with Phases |
|
198 | phases Working with Phases | |
199 | revisions Specifying Revisions |
|
199 | revisions Specifying Revisions | |
200 | scripting Using Mercurial from scripts and automation |
|
200 | scripting Using Mercurial from scripts and automation | |
201 | subrepos Subrepositories |
|
201 | subrepos Subrepositories | |
202 | templating Template Usage |
|
202 | templating Template Usage | |
203 | urls URL Paths |
|
203 | urls URL Paths | |
204 |
|
204 | |||
205 | Test extension help: |
|
205 | Test extension help: | |
206 | $ hg help extensions --config extensions.rebase= --config extensions.children= |
|
206 | $ hg help extensions --config extensions.rebase= --config extensions.children= | |
207 | Using Additional Features |
|
207 | Using Additional Features | |
208 | """"""""""""""""""""""""" |
|
208 | """"""""""""""""""""""""" | |
209 |
|
209 | |||
210 | Mercurial has the ability to add new features through the use of |
|
210 | Mercurial has the ability to add new features through the use of | |
211 | extensions. Extensions may add new commands, add options to existing |
|
211 | extensions. Extensions may add new commands, add options to existing | |
212 | commands, change the default behavior of commands, or implement hooks. |
|
212 | commands, change the default behavior of commands, or implement hooks. | |
213 |
|
213 | |||
214 | To enable the "foo" extension, either shipped with Mercurial or in the |
|
214 | To enable the "foo" extension, either shipped with Mercurial or in the | |
215 | Python search path, create an entry for it in your configuration file, |
|
215 | Python search path, create an entry for it in your configuration file, | |
216 | like this: |
|
216 | like this: | |
217 |
|
217 | |||
218 | [extensions] |
|
218 | [extensions] | |
219 | foo = |
|
219 | foo = | |
220 |
|
220 | |||
221 | You may also specify the full path to an extension: |
|
221 | You may also specify the full path to an extension: | |
222 |
|
222 | |||
223 | [extensions] |
|
223 | [extensions] | |
224 | myfeature = ~/.hgext/myfeature.py |
|
224 | myfeature = ~/.hgext/myfeature.py | |
225 |
|
225 | |||
226 | See 'hg help config' for more information on configuration files. |
|
226 | See 'hg help config' for more information on configuration files. | |
227 |
|
227 | |||
228 | Extensions are not loaded by default for a variety of reasons: they can |
|
228 | Extensions are not loaded by default for a variety of reasons: they can | |
229 | increase startup overhead; they may be meant for advanced usage only; they |
|
229 | increase startup overhead; they may be meant for advanced usage only; they | |
230 | may provide potentially dangerous abilities (such as letting you destroy |
|
230 | may provide potentially dangerous abilities (such as letting you destroy | |
231 | or modify history); they might not be ready for prime time; or they may |
|
231 | or modify history); they might not be ready for prime time; or they may | |
232 | alter some usual behaviors of stock Mercurial. It is thus up to the user |
|
232 | alter some usual behaviors of stock Mercurial. It is thus up to the user | |
233 | to activate extensions as needed. |
|
233 | to activate extensions as needed. | |
234 |
|
234 | |||
235 | To explicitly disable an extension enabled in a configuration file of |
|
235 | To explicitly disable an extension enabled in a configuration file of | |
236 | broader scope, prepend its path with !: |
|
236 | broader scope, prepend its path with !: | |
237 |
|
237 | |||
238 | [extensions] |
|
238 | [extensions] | |
239 | # disabling extension bar residing in /path/to/extension/bar.py |
|
239 | # disabling extension bar residing in /path/to/extension/bar.py | |
240 | bar = !/path/to/extension/bar.py |
|
240 | bar = !/path/to/extension/bar.py | |
241 | # ditto, but no path was supplied for extension baz |
|
241 | # ditto, but no path was supplied for extension baz | |
242 | baz = ! |
|
242 | baz = ! | |
243 |
|
243 | |||
244 | enabled extensions: |
|
244 | enabled extensions: | |
245 |
|
245 | |||
246 | children command to display child changesets (DEPRECATED) |
|
246 | children command to display child changesets (DEPRECATED) | |
247 | rebase command to move sets of revisions to a different ancestor |
|
247 | rebase command to move sets of revisions to a different ancestor | |
248 |
|
248 | |||
249 | disabled extensions: |
|
249 | disabled extensions: | |
250 |
|
250 | |||
251 | acl hooks for controlling repository access |
|
251 | acl hooks for controlling repository access | |
252 | blackbox log repository events to a blackbox for debugging |
|
252 | blackbox log repository events to a blackbox for debugging | |
253 | bugzilla hooks for integrating with the Bugzilla bug tracker |
|
253 | bugzilla hooks for integrating with the Bugzilla bug tracker | |
254 | censor erase file content at a given revision |
|
254 | censor erase file content at a given revision | |
255 | churn command to display statistics about repository history |
|
255 | churn command to display statistics about repository history | |
256 | clonebundles advertise pre-generated bundles to seed clones |
|
256 | clonebundles advertise pre-generated bundles to seed clones | |
257 | convert import revisions from foreign VCS repositories into |
|
257 | convert import revisions from foreign VCS repositories into | |
258 | Mercurial |
|
258 | Mercurial | |
259 | eol automatically manage newlines in repository files |
|
259 | eol automatically manage newlines in repository files | |
260 | extdiff command to allow external programs to compare revisions |
|
260 | extdiff command to allow external programs to compare revisions | |
261 | factotum http authentication with factotum |
|
261 | factotum http authentication with factotum | |
262 | gpg commands to sign and verify changesets |
|
262 | gpg commands to sign and verify changesets | |
263 | hgk browse the repository in a graphical way |
|
263 | hgk browse the repository in a graphical way | |
264 | highlight syntax highlighting for hgweb (requires Pygments) |
|
264 | highlight syntax highlighting for hgweb (requires Pygments) | |
265 | histedit interactive history editing |
|
265 | histedit interactive history editing | |
266 | keyword expand keywords in tracked files |
|
266 | keyword expand keywords in tracked files | |
267 | largefiles track large binary files |
|
267 | largefiles track large binary files | |
268 | mq manage a stack of patches |
|
268 | mq manage a stack of patches | |
269 | notify hooks for sending email push notifications |
|
269 | notify hooks for sending email push notifications | |
270 | patchbomb command to send changesets as (a series of) patch emails |
|
270 | patchbomb command to send changesets as (a series of) patch emails | |
271 | purge command to delete untracked files from the working |
|
271 | purge command to delete untracked files from the working | |
272 | directory |
|
272 | directory | |
273 | relink recreates hardlinks between repository clones |
|
273 | relink recreates hardlinks between repository clones | |
274 | schemes extend schemes with shortcuts to repository swarms |
|
274 | schemes extend schemes with shortcuts to repository swarms | |
275 | share share a common history between several working directories |
|
275 | share share a common history between several working directories | |
276 | shelve save and restore changes to the working directory |
|
276 | shelve save and restore changes to the working directory | |
277 | strip strip changesets and their descendants from history |
|
277 | strip strip changesets and their descendants from history | |
278 | transplant command to transplant changesets from another branch |
|
278 | transplant command to transplant changesets from another branch | |
279 | win32mbcs allow the use of MBCS paths with problematic encodings |
|
279 | win32mbcs allow the use of MBCS paths with problematic encodings | |
280 | zeroconf discover and advertise repositories on the local network |
|
280 | zeroconf discover and advertise repositories on the local network | |
281 |
|
281 | |||
282 | Verify that extension keywords appear in help templates |
|
282 | Verify that extension keywords appear in help templates | |
283 |
|
283 | |||
284 | $ hg help --config extensions.transplant= templating|grep transplant > /dev/null |
|
284 | $ hg help --config extensions.transplant= templating|grep transplant > /dev/null | |
285 |
|
285 | |||
286 | Test short command list with verbose option |
|
286 | Test short command list with verbose option | |
287 |
|
287 | |||
288 | $ hg -v help shortlist |
|
288 | $ hg -v help shortlist | |
289 | Mercurial Distributed SCM |
|
289 | Mercurial Distributed SCM | |
290 |
|
290 | |||
291 | basic commands: |
|
291 | basic commands: | |
292 |
|
292 | |||
293 | add add the specified files on the next commit |
|
293 | add add the specified files on the next commit | |
294 | annotate, blame |
|
294 | annotate, blame | |
295 | show changeset information by line for each file |
|
295 | show changeset information by line for each file | |
296 | clone make a copy of an existing repository |
|
296 | clone make a copy of an existing repository | |
297 | commit, ci commit the specified files or all outstanding changes |
|
297 | commit, ci commit the specified files or all outstanding changes | |
298 | diff diff repository (or selected files) |
|
298 | diff diff repository (or selected files) | |
299 | export dump the header and diffs for one or more changesets |
|
299 | export dump the header and diffs for one or more changesets | |
300 | forget forget the specified files on the next commit |
|
300 | forget forget the specified files on the next commit | |
301 | init create a new repository in the given directory |
|
301 | init create a new repository in the given directory | |
302 | log, history show revision history of entire repository or files |
|
302 | log, history show revision history of entire repository or files | |
303 | merge merge another revision into working directory |
|
303 | merge merge another revision into working directory | |
304 | pull pull changes from the specified source |
|
304 | pull pull changes from the specified source | |
305 | push push changes to the specified destination |
|
305 | push push changes to the specified destination | |
306 | remove, rm remove the specified files on the next commit |
|
306 | remove, rm remove the specified files on the next commit | |
307 | serve start stand-alone webserver |
|
307 | serve start stand-alone webserver | |
308 | status, st show changed files in the working directory |
|
308 | status, st show changed files in the working directory | |
309 | summary, sum summarize working directory state |
|
309 | summary, sum summarize working directory state | |
310 | update, up, checkout, co |
|
310 | update, up, checkout, co | |
311 | update working directory (or switch revisions) |
|
311 | update working directory (or switch revisions) | |
312 |
|
312 | |||
313 | global options ([+] can be repeated): |
|
313 | global options ([+] can be repeated): | |
314 |
|
314 | |||
315 | -R --repository REPO repository root directory or name of overlay bundle |
|
315 | -R --repository REPO repository root directory or name of overlay bundle | |
316 | file |
|
316 | file | |
317 | --cwd DIR change working directory |
|
317 | --cwd DIR change working directory | |
318 | -y --noninteractive do not prompt, automatically pick the first choice for |
|
318 | -y --noninteractive do not prompt, automatically pick the first choice for | |
319 | all prompts |
|
319 | all prompts | |
320 | -q --quiet suppress output |
|
320 | -q --quiet suppress output | |
321 | -v --verbose enable additional output |
|
321 | -v --verbose enable additional output | |
322 | --color TYPE when to colorize (boolean, always, auto, never, or |
|
322 | --color TYPE when to colorize (boolean, always, auto, never, or | |
323 | debug) |
|
323 | debug) | |
324 | --config CONFIG [+] set/override config option (use 'section.name=value') |
|
324 | --config CONFIG [+] set/override config option (use 'section.name=value') | |
325 | --debug enable debugging output |
|
325 | --debug enable debugging output | |
326 | --debugger start debugger |
|
326 | --debugger start debugger | |
327 | --encoding ENCODE set the charset encoding (default: ascii) |
|
327 | --encoding ENCODE set the charset encoding (default: ascii) | |
328 | --encodingmode MODE set the charset encoding mode (default: strict) |
|
328 | --encodingmode MODE set the charset encoding mode (default: strict) | |
329 | --traceback always print a traceback on exception |
|
329 | --traceback always print a traceback on exception | |
330 | --time time how long the command takes |
|
330 | --time time how long the command takes | |
331 | --profile print command execution profile |
|
331 | --profile print command execution profile | |
332 | --version output version information and exit |
|
332 | --version output version information and exit | |
333 | -h --help display help and exit |
|
333 | -h --help display help and exit | |
334 | --hidden consider hidden changesets |
|
334 | --hidden consider hidden changesets | |
335 | --pager TYPE when to paginate (boolean, always, auto, or never) |
|
335 | --pager TYPE when to paginate (boolean, always, auto, or never) | |
336 | (default: auto) |
|
336 | (default: auto) | |
337 |
|
337 | |||
338 | (use 'hg help' for the full list of commands) |
|
338 | (use 'hg help' for the full list of commands) | |
339 |
|
339 | |||
340 | $ hg add -h |
|
340 | $ hg add -h | |
341 | hg add [OPTION]... [FILE]... |
|
341 | hg add [OPTION]... [FILE]... | |
342 |
|
342 | |||
343 | add the specified files on the next commit |
|
343 | add the specified files on the next commit | |
344 |
|
344 | |||
345 | Schedule files to be version controlled and added to the repository. |
|
345 | Schedule files to be version controlled and added to the repository. | |
346 |
|
346 | |||
347 | The files will be added to the repository at the next commit. To undo an |
|
347 | The files will be added to the repository at the next commit. To undo an | |
348 | add before that, see 'hg forget'. |
|
348 | add before that, see 'hg forget'. | |
349 |
|
349 | |||
350 | If no names are given, add all files to the repository (except files |
|
350 | If no names are given, add all files to the repository (except files | |
351 | matching ".hgignore"). |
|
351 | matching ".hgignore"). | |
352 |
|
352 | |||
353 | Returns 0 if all files are successfully added. |
|
353 | Returns 0 if all files are successfully added. | |
354 |
|
354 | |||
355 | options ([+] can be repeated): |
|
355 | options ([+] can be repeated): | |
356 |
|
356 | |||
357 | -I --include PATTERN [+] include names matching the given patterns |
|
357 | -I --include PATTERN [+] include names matching the given patterns | |
358 | -X --exclude PATTERN [+] exclude names matching the given patterns |
|
358 | -X --exclude PATTERN [+] exclude names matching the given patterns | |
359 | -S --subrepos recurse into subrepositories |
|
359 | -S --subrepos recurse into subrepositories | |
360 | -n --dry-run do not perform actions, just print output |
|
360 | -n --dry-run do not perform actions, just print output | |
361 |
|
361 | |||
362 | (some details hidden, use --verbose to show complete help) |
|
362 | (some details hidden, use --verbose to show complete help) | |
363 |
|
363 | |||
364 | Verbose help for add |
|
364 | Verbose help for add | |
365 |
|
365 | |||
366 | $ hg add -hv |
|
366 | $ hg add -hv | |
367 | hg add [OPTION]... [FILE]... |
|
367 | hg add [OPTION]... [FILE]... | |
368 |
|
368 | |||
369 | add the specified files on the next commit |
|
369 | add the specified files on the next commit | |
370 |
|
370 | |||
371 | Schedule files to be version controlled and added to the repository. |
|
371 | Schedule files to be version controlled and added to the repository. | |
372 |
|
372 | |||
373 | The files will be added to the repository at the next commit. To undo an |
|
373 | The files will be added to the repository at the next commit. To undo an | |
374 | add before that, see 'hg forget'. |
|
374 | add before that, see 'hg forget'. | |
375 |
|
375 | |||
376 | If no names are given, add all files to the repository (except files |
|
376 | If no names are given, add all files to the repository (except files | |
377 | matching ".hgignore"). |
|
377 | matching ".hgignore"). | |
378 |
|
378 | |||
379 | Examples: |
|
379 | Examples: | |
380 |
|
380 | |||
381 | - New (unknown) files are added automatically by 'hg add': |
|
381 | - New (unknown) files are added automatically by 'hg add': | |
382 |
|
382 | |||
383 | $ ls |
|
383 | $ ls | |
384 | foo.c |
|
384 | foo.c | |
385 | $ hg status |
|
385 | $ hg status | |
386 | ? foo.c |
|
386 | ? foo.c | |
387 | $ hg add |
|
387 | $ hg add | |
388 | adding foo.c |
|
388 | adding foo.c | |
389 | $ hg status |
|
389 | $ hg status | |
390 | A foo.c |
|
390 | A foo.c | |
391 |
|
391 | |||
392 | - Specific files to be added can be specified: |
|
392 | - Specific files to be added can be specified: | |
393 |
|
393 | |||
394 | $ ls |
|
394 | $ ls | |
395 | bar.c foo.c |
|
395 | bar.c foo.c | |
396 | $ hg status |
|
396 | $ hg status | |
397 | ? bar.c |
|
397 | ? bar.c | |
398 | ? foo.c |
|
398 | ? foo.c | |
399 | $ hg add bar.c |
|
399 | $ hg add bar.c | |
400 | $ hg status |
|
400 | $ hg status | |
401 | A bar.c |
|
401 | A bar.c | |
402 | ? foo.c |
|
402 | ? foo.c | |
403 |
|
403 | |||
404 | Returns 0 if all files are successfully added. |
|
404 | Returns 0 if all files are successfully added. | |
405 |
|
405 | |||
406 | options ([+] can be repeated): |
|
406 | options ([+] can be repeated): | |
407 |
|
407 | |||
408 | -I --include PATTERN [+] include names matching the given patterns |
|
408 | -I --include PATTERN [+] include names matching the given patterns | |
409 | -X --exclude PATTERN [+] exclude names matching the given patterns |
|
409 | -X --exclude PATTERN [+] exclude names matching the given patterns | |
410 | -S --subrepos recurse into subrepositories |
|
410 | -S --subrepos recurse into subrepositories | |
411 | -n --dry-run do not perform actions, just print output |
|
411 | -n --dry-run do not perform actions, just print output | |
412 |
|
412 | |||
413 | global options ([+] can be repeated): |
|
413 | global options ([+] can be repeated): | |
414 |
|
414 | |||
415 | -R --repository REPO repository root directory or name of overlay bundle |
|
415 | -R --repository REPO repository root directory or name of overlay bundle | |
416 | file |
|
416 | file | |
417 | --cwd DIR change working directory |
|
417 | --cwd DIR change working directory | |
418 | -y --noninteractive do not prompt, automatically pick the first choice for |
|
418 | -y --noninteractive do not prompt, automatically pick the first choice for | |
419 | all prompts |
|
419 | all prompts | |
420 | -q --quiet suppress output |
|
420 | -q --quiet suppress output | |
421 | -v --verbose enable additional output |
|
421 | -v --verbose enable additional output | |
422 | --color TYPE when to colorize (boolean, always, auto, never, or |
|
422 | --color TYPE when to colorize (boolean, always, auto, never, or | |
423 | debug) |
|
423 | debug) | |
424 | --config CONFIG [+] set/override config option (use 'section.name=value') |
|
424 | --config CONFIG [+] set/override config option (use 'section.name=value') | |
425 | --debug enable debugging output |
|
425 | --debug enable debugging output | |
426 | --debugger start debugger |
|
426 | --debugger start debugger | |
427 | --encoding ENCODE set the charset encoding (default: ascii) |
|
427 | --encoding ENCODE set the charset encoding (default: ascii) | |
428 | --encodingmode MODE set the charset encoding mode (default: strict) |
|
428 | --encodingmode MODE set the charset encoding mode (default: strict) | |
429 | --traceback always print a traceback on exception |
|
429 | --traceback always print a traceback on exception | |
430 | --time time how long the command takes |
|
430 | --time time how long the command takes | |
431 | --profile print command execution profile |
|
431 | --profile print command execution profile | |
432 | --version output version information and exit |
|
432 | --version output version information and exit | |
433 | -h --help display help and exit |
|
433 | -h --help display help and exit | |
434 | --hidden consider hidden changesets |
|
434 | --hidden consider hidden changesets | |
435 | --pager TYPE when to paginate (boolean, always, auto, or never) |
|
435 | --pager TYPE when to paginate (boolean, always, auto, or never) | |
436 | (default: auto) |
|
436 | (default: auto) | |
437 |
|
437 | |||
438 | Test the textwidth config option |
|
438 | Test the textwidth config option | |
439 |
|
439 | |||
440 | $ hg root -h --config ui.textwidth=50 |
|
440 | $ hg root -h --config ui.textwidth=50 | |
441 | hg root |
|
441 | hg root | |
442 |
|
442 | |||
443 | print the root (top) of the current working |
|
443 | print the root (top) of the current working | |
444 | directory |
|
444 | directory | |
445 |
|
445 | |||
446 | Print the root directory of the current |
|
446 | Print the root directory of the current | |
447 | repository. |
|
447 | repository. | |
448 |
|
448 | |||
449 | Returns 0 on success. |
|
449 | Returns 0 on success. | |
450 |
|
450 | |||
451 | (some details hidden, use --verbose to show |
|
451 | (some details hidden, use --verbose to show | |
452 | complete help) |
|
452 | complete help) | |
453 |
|
453 | |||
454 | Test help option with version option |
|
454 | Test help option with version option | |
455 |
|
455 | |||
456 | $ hg add -h --version |
|
456 | $ hg add -h --version | |
457 | Mercurial Distributed SCM (version *) (glob) |
|
457 | Mercurial Distributed SCM (version *) (glob) | |
458 | (see https://mercurial-scm.org for more information) |
|
458 | (see https://mercurial-scm.org for more information) | |
459 |
|
459 | |||
460 | Copyright (C) 2005-* Matt Mackall and others (glob) |
|
460 | Copyright (C) 2005-* Matt Mackall and others (glob) | |
461 | This is free software; see the source for copying conditions. There is NO |
|
461 | This is free software; see the source for copying conditions. There is NO | |
462 | warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
|
462 | warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | |
463 |
|
463 | |||
464 | $ hg add --skjdfks |
|
464 | $ hg add --skjdfks | |
465 | hg add: option --skjdfks not recognized |
|
465 | hg add: option --skjdfks not recognized | |
466 | hg add [OPTION]... [FILE]... |
|
466 | hg add [OPTION]... [FILE]... | |
467 |
|
467 | |||
468 | add the specified files on the next commit |
|
468 | add the specified files on the next commit | |
469 |
|
469 | |||
470 | options ([+] can be repeated): |
|
470 | options ([+] can be repeated): | |
471 |
|
471 | |||
472 | -I --include PATTERN [+] include names matching the given patterns |
|
472 | -I --include PATTERN [+] include names matching the given patterns | |
473 | -X --exclude PATTERN [+] exclude names matching the given patterns |
|
473 | -X --exclude PATTERN [+] exclude names matching the given patterns | |
474 | -S --subrepos recurse into subrepositories |
|
474 | -S --subrepos recurse into subrepositories | |
475 | -n --dry-run do not perform actions, just print output |
|
475 | -n --dry-run do not perform actions, just print output | |
476 |
|
476 | |||
477 | (use 'hg add -h' to show more help) |
|
477 | (use 'hg add -h' to show more help) | |
478 | [255] |
|
478 | [255] | |
479 |
|
479 | |||
480 | Test ambiguous command help |
|
480 | Test ambiguous command help | |
481 |
|
481 | |||
482 | $ hg help ad |
|
482 | $ hg help ad | |
483 | list of commands: |
|
483 | list of commands: | |
484 |
|
484 | |||
485 | add add the specified files on the next commit |
|
485 | add add the specified files on the next commit | |
486 | addremove add all new files, delete all missing files |
|
486 | addremove add all new files, delete all missing files | |
487 |
|
487 | |||
488 | (use 'hg help -v ad' to show built-in aliases and global options) |
|
488 | (use 'hg help -v ad' to show built-in aliases and global options) | |
489 |
|
489 | |||
490 | Test command without options |
|
490 | Test command without options | |
491 |
|
491 | |||
492 | $ hg help verify |
|
492 | $ hg help verify | |
493 | hg verify |
|
493 | hg verify | |
494 |
|
494 | |||
495 | verify the integrity of the repository |
|
495 | verify the integrity of the repository | |
496 |
|
496 | |||
497 | Verify the integrity of the current repository. |
|
497 | Verify the integrity of the current repository. | |
498 |
|
498 | |||
499 | This will perform an extensive check of the repository's integrity, |
|
499 | This will perform an extensive check of the repository's integrity, | |
500 | validating the hashes and checksums of each entry in the changelog, |
|
500 | validating the hashes and checksums of each entry in the changelog, | |
501 | manifest, and tracked files, as well as the integrity of their crosslinks |
|
501 | manifest, and tracked files, as well as the integrity of their crosslinks | |
502 | and indices. |
|
502 | and indices. | |
503 |
|
503 | |||
504 | Please see https://mercurial-scm.org/wiki/RepositoryCorruption for more |
|
504 | Please see https://mercurial-scm.org/wiki/RepositoryCorruption for more | |
505 | information about recovery from corruption of the repository. |
|
505 | information about recovery from corruption of the repository. | |
506 |
|
506 | |||
507 | Returns 0 on success, 1 if errors are encountered. |
|
507 | Returns 0 on success, 1 if errors are encountered. | |
508 |
|
508 | |||
509 | (some details hidden, use --verbose to show complete help) |
|
509 | (some details hidden, use --verbose to show complete help) | |
510 |
|
510 | |||
511 | $ hg help diff |
|
511 | $ hg help diff | |
512 | hg diff [OPTION]... ([-c REV] | [-r REV1 [-r REV2]]) [FILE]... |
|
512 | hg diff [OPTION]... ([-c REV] | [-r REV1 [-r REV2]]) [FILE]... | |
513 |
|
513 | |||
514 | diff repository (or selected files) |
|
514 | diff repository (or selected files) | |
515 |
|
515 | |||
516 | Show differences between revisions for the specified files. |
|
516 | Show differences between revisions for the specified files. | |
517 |
|
517 | |||
518 | Differences between files are shown using the unified diff format. |
|
518 | Differences between files are shown using the unified diff format. | |
519 |
|
519 | |||
520 | Note: |
|
520 | Note: | |
521 | 'hg diff' may generate unexpected results for merges, as it will |
|
521 | 'hg diff' may generate unexpected results for merges, as it will | |
522 | default to comparing against the working directory's first parent |
|
522 | default to comparing against the working directory's first parent | |
523 | changeset if no revisions are specified. |
|
523 | changeset if no revisions are specified. | |
524 |
|
524 | |||
525 | When two revision arguments are given, then changes are shown between |
|
525 | When two revision arguments are given, then changes are shown between | |
526 | those revisions. If only one revision is specified then that revision is |
|
526 | those revisions. If only one revision is specified then that revision is | |
527 | compared to the working directory, and, when no revisions are specified, |
|
527 | compared to the working directory, and, when no revisions are specified, | |
528 | the working directory files are compared to its first parent. |
|
528 | the working directory files are compared to its first parent. | |
529 |
|
529 | |||
530 | Alternatively you can specify -c/--change with a revision to see the |
|
530 | Alternatively you can specify -c/--change with a revision to see the | |
531 | changes in that changeset relative to its first parent. |
|
531 | changes in that changeset relative to its first parent. | |
532 |
|
532 | |||
533 | Without the -a/--text option, diff will avoid generating diffs of files it |
|
533 | Without the -a/--text option, diff will avoid generating diffs of files it | |
534 | detects as binary. With -a, diff will generate a diff anyway, probably |
|
534 | detects as binary. With -a, diff will generate a diff anyway, probably | |
535 | with undesirable results. |
|
535 | with undesirable results. | |
536 |
|
536 | |||
537 | Use the -g/--git option to generate diffs in the git extended diff format. |
|
537 | Use the -g/--git option to generate diffs in the git extended diff format. | |
538 | For more information, read 'hg help diffs'. |
|
538 | For more information, read 'hg help diffs'. | |
539 |
|
539 | |||
540 | Returns 0 on success. |
|
540 | Returns 0 on success. | |
541 |
|
541 | |||
542 | options ([+] can be repeated): |
|
542 | options ([+] can be repeated): | |
543 |
|
543 | |||
544 | -r --rev REV [+] revision |
|
544 | -r --rev REV [+] revision | |
545 | -c --change REV change made by revision |
|
545 | -c --change REV change made by revision | |
546 | -a --text treat all files as text |
|
546 | -a --text treat all files as text | |
547 | -g --git use git extended diff format |
|
547 | -g --git use git extended diff format | |
548 | --binary generate binary diffs in git mode (default) |
|
548 | --binary generate binary diffs in git mode (default) | |
549 | --nodates omit dates from diff headers |
|
549 | --nodates omit dates from diff headers | |
550 | --noprefix omit a/ and b/ prefixes from filenames |
|
550 | --noprefix omit a/ and b/ prefixes from filenames | |
551 | -p --show-function show which function each change is in |
|
551 | -p --show-function show which function each change is in | |
552 | --reverse produce a diff that undoes the changes |
|
552 | --reverse produce a diff that undoes the changes | |
553 | -w --ignore-all-space ignore white space when comparing lines |
|
553 | -w --ignore-all-space ignore white space when comparing lines | |
554 | -b --ignore-space-change ignore changes in the amount of white space |
|
554 | -b --ignore-space-change ignore changes in the amount of white space | |
555 | -B --ignore-blank-lines ignore changes whose lines are all blank |
|
555 | -B --ignore-blank-lines ignore changes whose lines are all blank | |
556 | -U --unified NUM number of lines of context to show |
|
556 | -U --unified NUM number of lines of context to show | |
557 | --stat output diffstat-style summary of changes |
|
557 | --stat output diffstat-style summary of changes | |
558 | --root DIR produce diffs relative to subdirectory |
|
558 | --root DIR produce diffs relative to subdirectory | |
559 | -I --include PATTERN [+] include names matching the given patterns |
|
559 | -I --include PATTERN [+] include names matching the given patterns | |
560 | -X --exclude PATTERN [+] exclude names matching the given patterns |
|
560 | -X --exclude PATTERN [+] exclude names matching the given patterns | |
561 | -S --subrepos recurse into subrepositories |
|
561 | -S --subrepos recurse into subrepositories | |
562 |
|
562 | |||
563 | (some details hidden, use --verbose to show complete help) |
|
563 | (some details hidden, use --verbose to show complete help) | |
564 |
|
564 | |||
565 | $ hg help status |
|
565 | $ hg help status | |
566 | hg status [OPTION]... [FILE]... |
|
566 | hg status [OPTION]... [FILE]... | |
567 |
|
567 | |||
568 | aliases: st |
|
568 | aliases: st | |
569 |
|
569 | |||
570 | show changed files in the working directory |
|
570 | show changed files in the working directory | |
571 |
|
571 | |||
572 | Show status of files in the repository. If names are given, only files |
|
572 | Show status of files in the repository. If names are given, only files | |
573 | that match are shown. Files that are clean or ignored or the source of a |
|
573 | that match are shown. Files that are clean or ignored or the source of a | |
574 | copy/move operation, are not listed unless -c/--clean, -i/--ignored, |
|
574 | copy/move operation, are not listed unless -c/--clean, -i/--ignored, | |
575 | -C/--copies or -A/--all are given. Unless options described with "show |
|
575 | -C/--copies or -A/--all are given. Unless options described with "show | |
576 | only ..." are given, the options -mardu are used. |
|
576 | only ..." are given, the options -mardu are used. | |
577 |
|
577 | |||
578 | Option -q/--quiet hides untracked (unknown and ignored) files unless |
|
578 | Option -q/--quiet hides untracked (unknown and ignored) files unless | |
579 | explicitly requested with -u/--unknown or -i/--ignored. |
|
579 | explicitly requested with -u/--unknown or -i/--ignored. | |
580 |
|
580 | |||
581 | Note: |
|
581 | Note: | |
582 | 'hg status' may appear to disagree with diff if permissions have |
|
582 | 'hg status' may appear to disagree with diff if permissions have | |
583 | changed or a merge has occurred. The standard diff format does not |
|
583 | changed or a merge has occurred. The standard diff format does not | |
584 | report permission changes and diff only reports changes relative to one |
|
584 | report permission changes and diff only reports changes relative to one | |
585 | merge parent. |
|
585 | merge parent. | |
586 |
|
586 | |||
587 | If one revision is given, it is used as the base revision. If two |
|
587 | If one revision is given, it is used as the base revision. If two | |
588 | revisions are given, the differences between them are shown. The --change |
|
588 | revisions are given, the differences between them are shown. The --change | |
589 | option can also be used as a shortcut to list the changed files of a |
|
589 | option can also be used as a shortcut to list the changed files of a | |
590 | revision from its first parent. |
|
590 | revision from its first parent. | |
591 |
|
591 | |||
592 | The codes used to show the status of files are: |
|
592 | The codes used to show the status of files are: | |
593 |
|
593 | |||
594 | M = modified |
|
594 | M = modified | |
595 | A = added |
|
595 | A = added | |
596 | R = removed |
|
596 | R = removed | |
597 | C = clean |
|
597 | C = clean | |
598 | ! = missing (deleted by non-hg command, but still tracked) |
|
598 | ! = missing (deleted by non-hg command, but still tracked) | |
599 | ? = not tracked |
|
599 | ? = not tracked | |
600 | I = ignored |
|
600 | I = ignored | |
601 | = origin of the previous file (with --copies) |
|
601 | = origin of the previous file (with --copies) | |
602 |
|
602 | |||
603 | Returns 0 on success. |
|
603 | Returns 0 on success. | |
604 |
|
604 | |||
605 | options ([+] can be repeated): |
|
605 | options ([+] can be repeated): | |
606 |
|
606 | |||
607 | -A --all show status of all files |
|
607 | -A --all show status of all files | |
608 | -m --modified show only modified files |
|
608 | -m --modified show only modified files | |
609 | -a --added show only added files |
|
609 | -a --added show only added files | |
610 | -r --removed show only removed files |
|
610 | -r --removed show only removed files | |
611 | -d --deleted show only deleted (but tracked) files |
|
611 | -d --deleted show only deleted (but tracked) files | |
612 | -c --clean show only files without changes |
|
612 | -c --clean show only files without changes | |
613 | -u --unknown show only unknown (not tracked) files |
|
613 | -u --unknown show only unknown (not tracked) files | |
614 | -i --ignored show only ignored files |
|
614 | -i --ignored show only ignored files | |
615 | -n --no-status hide status prefix |
|
615 | -n --no-status hide status prefix | |
616 | -C --copies show source of copied files |
|
616 | -C --copies show source of copied files | |
617 | -0 --print0 end filenames with NUL, for use with xargs |
|
617 | -0 --print0 end filenames with NUL, for use with xargs | |
618 | --rev REV [+] show difference from revision |
|
618 | --rev REV [+] show difference from revision | |
619 | --change REV list the changed files of a revision |
|
619 | --change REV list the changed files of a revision | |
620 | -I --include PATTERN [+] include names matching the given patterns |
|
620 | -I --include PATTERN [+] include names matching the given patterns | |
621 | -X --exclude PATTERN [+] exclude names matching the given patterns |
|
621 | -X --exclude PATTERN [+] exclude names matching the given patterns | |
622 | -S --subrepos recurse into subrepositories |
|
622 | -S --subrepos recurse into subrepositories | |
623 |
|
623 | |||
624 | (some details hidden, use --verbose to show complete help) |
|
624 | (some details hidden, use --verbose to show complete help) | |
625 |
|
625 | |||
626 | $ hg -q help status |
|
626 | $ hg -q help status | |
627 | hg status [OPTION]... [FILE]... |
|
627 | hg status [OPTION]... [FILE]... | |
628 |
|
628 | |||
629 | show changed files in the working directory |
|
629 | show changed files in the working directory | |
630 |
|
630 | |||
631 | $ hg help foo |
|
631 | $ hg help foo | |
632 | abort: no such help topic: foo |
|
632 | abort: no such help topic: foo | |
633 | (try 'hg help --keyword foo') |
|
633 | (try 'hg help --keyword foo') | |
634 | [255] |
|
634 | [255] | |
635 |
|
635 | |||
636 | $ hg skjdfks |
|
636 | $ hg skjdfks | |
637 | hg: unknown command 'skjdfks' |
|
637 | hg: unknown command 'skjdfks' | |
638 | Mercurial Distributed SCM |
|
638 | Mercurial Distributed SCM | |
639 |
|
639 | |||
640 | basic commands: |
|
640 | basic commands: | |
641 |
|
641 | |||
642 | add add the specified files on the next commit |
|
642 | add add the specified files on the next commit | |
643 | annotate show changeset information by line for each file |
|
643 | annotate show changeset information by line for each file | |
644 | clone make a copy of an existing repository |
|
644 | clone make a copy of an existing repository | |
645 | commit commit the specified files or all outstanding changes |
|
645 | commit commit the specified files or all outstanding changes | |
646 | diff diff repository (or selected files) |
|
646 | diff diff repository (or selected files) | |
647 | export dump the header and diffs for one or more changesets |
|
647 | export dump the header and diffs for one or more changesets | |
648 | forget forget the specified files on the next commit |
|
648 | forget forget the specified files on the next commit | |
649 | init create a new repository in the given directory |
|
649 | init create a new repository in the given directory | |
650 | log show revision history of entire repository or files |
|
650 | log show revision history of entire repository or files | |
651 | merge merge another revision into working directory |
|
651 | merge merge another revision into working directory | |
652 | pull pull changes from the specified source |
|
652 | pull pull changes from the specified source | |
653 | push push changes to the specified destination |
|
653 | push push changes to the specified destination | |
654 | remove remove the specified files on the next commit |
|
654 | remove remove the specified files on the next commit | |
655 | serve start stand-alone webserver |
|
655 | serve start stand-alone webserver | |
656 | status show changed files in the working directory |
|
656 | status show changed files in the working directory | |
657 | summary summarize working directory state |
|
657 | summary summarize working directory state | |
658 | update update working directory (or switch revisions) |
|
658 | update update working directory (or switch revisions) | |
659 |
|
659 | |||
660 | (use 'hg help' for the full list of commands or 'hg -v' for details) |
|
660 | (use 'hg help' for the full list of commands or 'hg -v' for details) | |
661 | [255] |
|
661 | [255] | |
662 |
|
662 | |||
663 |
|
663 | |||
664 | Make sure that we don't run afoul of the help system thinking that |
|
664 | Make sure that we don't run afoul of the help system thinking that | |
665 | this is a section and erroring out weirdly. |
|
665 | this is a section and erroring out weirdly. | |
666 |
|
666 | |||
667 | $ hg .log |
|
667 | $ hg .log | |
668 | hg: unknown command '.log' |
|
668 | hg: unknown command '.log' | |
669 | (did you mean log?) |
|
669 | (did you mean log?) | |
670 | [255] |
|
670 | [255] | |
671 |
|
671 | |||
672 | $ hg log. |
|
672 | $ hg log. | |
673 | hg: unknown command 'log.' |
|
673 | hg: unknown command 'log.' | |
674 | (did you mean log?) |
|
674 | (did you mean log?) | |
675 | [255] |
|
675 | [255] | |
676 | $ hg pu.lh |
|
676 | $ hg pu.lh | |
677 | hg: unknown command 'pu.lh' |
|
677 | hg: unknown command 'pu.lh' | |
678 | (did you mean one of pull, push?) |
|
678 | (did you mean one of pull, push?) | |
679 | [255] |
|
679 | [255] | |
680 |
|
680 | |||
681 | $ cat > helpext.py <<EOF |
|
681 | $ cat > helpext.py <<EOF | |
682 | > import os |
|
682 | > import os | |
683 | > from mercurial import cmdutil, commands |
|
683 | > from mercurial import cmdutil, commands | |
684 | > |
|
684 | > | |
685 | > cmdtable = {} |
|
685 | > cmdtable = {} | |
686 | > command = cmdutil.command(cmdtable) |
|
686 | > command = cmdutil.command(cmdtable) | |
687 | > |
|
687 | > | |
688 | > @command('nohelp', |
|
688 | > @command('nohelp', | |
689 | > [('', 'longdesc', 3, 'x'*90), |
|
689 | > [('', 'longdesc', 3, 'x'*90), | |
690 | > ('n', '', None, 'normal desc'), |
|
690 | > ('n', '', None, 'normal desc'), | |
691 | > ('', 'newline', '', 'line1\nline2')], |
|
691 | > ('', 'newline', '', 'line1\nline2')], | |
692 | > 'hg nohelp', |
|
692 | > 'hg nohelp', | |
693 | > norepo=True) |
|
693 | > norepo=True) | |
694 | > @command('debugoptADV', [('', 'aopt', None, 'option is (ADVANCED)')]) |
|
694 | > @command('debugoptADV', [('', 'aopt', None, 'option is (ADVANCED)')]) | |
695 | > @command('debugoptDEP', [('', 'dopt', None, 'option is (DEPRECATED)')]) |
|
695 | > @command('debugoptDEP', [('', 'dopt', None, 'option is (DEPRECATED)')]) | |
696 | > @command('debugoptEXP', [('', 'eopt', None, 'option is (EXPERIMENTAL)')]) |
|
696 | > @command('debugoptEXP', [('', 'eopt', None, 'option is (EXPERIMENTAL)')]) | |
697 | > def nohelp(ui, *args, **kwargs): |
|
697 | > def nohelp(ui, *args, **kwargs): | |
698 | > pass |
|
698 | > pass | |
699 | > |
|
699 | > | |
700 | > def uisetup(ui): |
|
700 | > def uisetup(ui): | |
701 | > ui.setconfig('alias', 'shellalias', '!echo hi', 'helpext') |
|
701 | > ui.setconfig('alias', 'shellalias', '!echo hi', 'helpext') | |
702 | > ui.setconfig('alias', 'hgalias', 'summary', 'helpext') |
|
702 | > ui.setconfig('alias', 'hgalias', 'summary', 'helpext') | |
703 | > |
|
703 | > | |
704 | > EOF |
|
704 | > EOF | |
705 | $ echo '[extensions]' >> $HGRCPATH |
|
705 | $ echo '[extensions]' >> $HGRCPATH | |
706 | $ echo "helpext = `pwd`/helpext.py" >> $HGRCPATH |
|
706 | $ echo "helpext = `pwd`/helpext.py" >> $HGRCPATH | |
707 |
|
707 | |||
708 | Test for aliases |
|
708 | Test for aliases | |
709 |
|
709 | |||
710 | $ hg help hgalias |
|
710 | $ hg help hgalias | |
711 | hg hgalias [--remote] |
|
711 | hg hgalias [--remote] | |
712 |
|
712 | |||
713 | alias for: hg summary |
|
713 | alias for: hg summary | |
714 |
|
714 | |||
715 | summarize working directory state |
|
715 | summarize working directory state | |
716 |
|
716 | |||
717 | This generates a brief summary of the working directory state, including |
|
717 | This generates a brief summary of the working directory state, including | |
718 | parents, branch, commit status, phase and available updates. |
|
718 | parents, branch, commit status, phase and available updates. | |
719 |
|
719 | |||
720 | With the --remote option, this will check the default paths for incoming |
|
720 | With the --remote option, this will check the default paths for incoming | |
721 | and outgoing changes. This can be time-consuming. |
|
721 | and outgoing changes. This can be time-consuming. | |
722 |
|
722 | |||
723 | Returns 0 on success. |
|
723 | Returns 0 on success. | |
724 |
|
724 | |||
725 | defined by: helpext |
|
725 | defined by: helpext | |
726 |
|
726 | |||
727 | options: |
|
727 | options: | |
728 |
|
728 | |||
729 | --remote check for push and pull |
|
729 | --remote check for push and pull | |
730 |
|
730 | |||
731 | (some details hidden, use --verbose to show complete help) |
|
731 | (some details hidden, use --verbose to show complete help) | |
732 |
|
732 | |||
733 | $ hg help shellalias |
|
733 | $ hg help shellalias | |
734 | hg shellalias |
|
734 | hg shellalias | |
735 |
|
735 | |||
736 | shell alias for: |
|
736 | shell alias for: | |
737 |
|
737 | |||
738 | echo hi |
|
738 | echo hi | |
739 |
|
739 | |||
740 | defined by: helpext |
|
740 | defined by: helpext | |
741 |
|
741 | |||
742 | (some details hidden, use --verbose to show complete help) |
|
742 | (some details hidden, use --verbose to show complete help) | |
743 |
|
743 | |||
744 | Test command with no help text |
|
744 | Test command with no help text | |
745 |
|
745 | |||
746 | $ hg help nohelp |
|
746 | $ hg help nohelp | |
747 | hg nohelp |
|
747 | hg nohelp | |
748 |
|
748 | |||
749 | (no help text available) |
|
749 | (no help text available) | |
750 |
|
750 | |||
751 | options: |
|
751 | options: | |
752 |
|
752 | |||
753 | --longdesc VALUE xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx |
|
753 | --longdesc VALUE xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx | |
754 | xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx (default: 3) |
|
754 | xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx (default: 3) | |
755 | -n -- normal desc |
|
755 | -n -- normal desc | |
756 | --newline VALUE line1 line2 |
|
756 | --newline VALUE line1 line2 | |
757 |
|
757 | |||
758 | (some details hidden, use --verbose to show complete help) |
|
758 | (some details hidden, use --verbose to show complete help) | |
759 |
|
759 | |||
760 | $ hg help -k nohelp |
|
760 | $ hg help -k nohelp | |
761 | Commands: |
|
761 | Commands: | |
762 |
|
762 | |||
763 | nohelp hg nohelp |
|
763 | nohelp hg nohelp | |
764 |
|
764 | |||
765 | Extension Commands: |
|
765 | Extension Commands: | |
766 |
|
766 | |||
767 | nohelp (no help text available) |
|
767 | nohelp (no help text available) | |
768 |
|
768 | |||
769 | Test that default list of commands omits extension commands |
|
769 | Test that default list of commands omits extension commands | |
770 |
|
770 | |||
771 | $ hg help |
|
771 | $ hg help | |
772 | Mercurial Distributed SCM |
|
772 | Mercurial Distributed SCM | |
773 |
|
773 | |||
774 | list of commands: |
|
774 | list of commands: | |
775 |
|
775 | |||
776 | add add the specified files on the next commit |
|
776 | add add the specified files on the next commit | |
777 | addremove add all new files, delete all missing files |
|
777 | addremove add all new files, delete all missing files | |
778 | annotate show changeset information by line for each file |
|
778 | annotate show changeset information by line for each file | |
779 | archive create an unversioned archive of a repository revision |
|
779 | archive create an unversioned archive of a repository revision | |
780 | backout reverse effect of earlier changeset |
|
780 | backout reverse effect of earlier changeset | |
781 | bisect subdivision search of changesets |
|
781 | bisect subdivision search of changesets | |
782 | bookmarks create a new bookmark or list existing bookmarks |
|
782 | bookmarks create a new bookmark or list existing bookmarks | |
783 | branch set or show the current branch name |
|
783 | branch set or show the current branch name | |
784 | branches list repository named branches |
|
784 | branches list repository named branches | |
785 | bundle create a bundle file |
|
785 | bundle create a bundle file | |
786 | cat output the current or given revision of files |
|
786 | cat output the current or given revision of files | |
787 | clone make a copy of an existing repository |
|
787 | clone make a copy of an existing repository | |
788 | commit commit the specified files or all outstanding changes |
|
788 | commit commit the specified files or all outstanding changes | |
789 | config show combined config settings from all hgrc files |
|
789 | config show combined config settings from all hgrc files | |
790 | copy mark files as copied for the next commit |
|
790 | copy mark files as copied for the next commit | |
791 | diff diff repository (or selected files) |
|
791 | diff diff repository (or selected files) | |
792 | export dump the header and diffs for one or more changesets |
|
792 | export dump the header and diffs for one or more changesets | |
793 | files list tracked files |
|
793 | files list tracked files | |
794 | forget forget the specified files on the next commit |
|
794 | forget forget the specified files on the next commit | |
795 | graft copy changes from other branches onto the current branch |
|
795 | graft copy changes from other branches onto the current branch | |
796 | grep search revision history for a pattern in specified files |
|
796 | grep search revision history for a pattern in specified files | |
797 | heads show branch heads |
|
797 | heads show branch heads | |
798 | help show help for a given topic or a help overview |
|
798 | help show help for a given topic or a help overview | |
799 | identify identify the working directory or specified revision |
|
799 | identify identify the working directory or specified revision | |
800 | import import an ordered set of patches |
|
800 | import import an ordered set of patches | |
801 | incoming show new changesets found in source |
|
801 | incoming show new changesets found in source | |
802 | init create a new repository in the given directory |
|
802 | init create a new repository in the given directory | |
803 | log show revision history of entire repository or files |
|
803 | log show revision history of entire repository or files | |
804 | manifest output the current or given revision of the project manifest |
|
804 | manifest output the current or given revision of the project manifest | |
805 | merge merge another revision into working directory |
|
805 | merge merge another revision into working directory | |
806 | outgoing show changesets not found in the destination |
|
806 | outgoing show changesets not found in the destination | |
807 | paths show aliases for remote repositories |
|
807 | paths show aliases for remote repositories | |
808 | phase set or show the current phase name |
|
808 | phase set or show the current phase name | |
809 | pull pull changes from the specified source |
|
809 | pull pull changes from the specified source | |
810 | push push changes to the specified destination |
|
810 | push push changes to the specified destination | |
811 | recover roll back an interrupted transaction |
|
811 | recover roll back an interrupted transaction | |
812 | remove remove the specified files on the next commit |
|
812 | remove remove the specified files on the next commit | |
813 | rename rename files; equivalent of copy + remove |
|
813 | rename rename files; equivalent of copy + remove | |
814 | resolve redo merges or set/view the merge status of files |
|
814 | resolve redo merges or set/view the merge status of files | |
815 | revert restore files to their checkout state |
|
815 | revert restore files to their checkout state | |
816 | root print the root (top) of the current working directory |
|
816 | root print the root (top) of the current working directory | |
817 | serve start stand-alone webserver |
|
817 | serve start stand-alone webserver | |
818 | status show changed files in the working directory |
|
818 | status show changed files in the working directory | |
819 | summary summarize working directory state |
|
819 | summary summarize working directory state | |
820 | tag add one or more tags for the current or given revision |
|
820 | tag add one or more tags for the current or given revision | |
821 | tags list repository tags |
|
821 | tags list repository tags | |
822 | unbundle apply one or more bundle files |
|
822 | unbundle apply one or more bundle files | |
823 | update update working directory (or switch revisions) |
|
823 | update update working directory (or switch revisions) | |
824 | verify verify the integrity of the repository |
|
824 | verify verify the integrity of the repository | |
825 | version output version and copyright information |
|
825 | version output version and copyright information | |
826 |
|
826 | |||
827 | enabled extensions: |
|
827 | enabled extensions: | |
828 |
|
828 | |||
829 | helpext (no help text available) |
|
829 | helpext (no help text available) | |
830 |
|
830 | |||
831 | additional help topics: |
|
831 | additional help topics: | |
832 |
|
832 | |||
833 | bundlespec Bundle File Formats |
|
833 | bundlespec Bundle File Formats | |
834 | color Colorizing Outputs |
|
834 | color Colorizing Outputs | |
835 | config Configuration Files |
|
835 | config Configuration Files | |
836 | dates Date Formats |
|
836 | dates Date Formats | |
837 | diffs Diff Formats |
|
837 | diffs Diff Formats | |
838 | environment Environment Variables |
|
838 | environment Environment Variables | |
839 | extensions Using Additional Features |
|
839 | extensions Using Additional Features | |
840 | filesets Specifying File Sets |
|
840 | filesets Specifying File Sets | |
841 | glossary Glossary |
|
841 | glossary Glossary | |
842 | hgignore Syntax for Mercurial Ignore Files |
|
842 | hgignore Syntax for Mercurial Ignore Files | |
843 | hgweb Configuring hgweb |
|
843 | hgweb Configuring hgweb | |
844 | internals Technical implementation topics |
|
844 | internals Technical implementation topics | |
845 | merge-tools Merge Tools |
|
845 | merge-tools Merge Tools | |
846 | pager Pager Support |
|
846 | pager Pager Support | |
847 | patterns File Name Patterns |
|
847 | patterns File Name Patterns | |
848 | phases Working with Phases |
|
848 | phases Working with Phases | |
849 | revisions Specifying Revisions |
|
849 | revisions Specifying Revisions | |
850 | scripting Using Mercurial from scripts and automation |
|
850 | scripting Using Mercurial from scripts and automation | |
851 | subrepos Subrepositories |
|
851 | subrepos Subrepositories | |
852 | templating Template Usage |
|
852 | templating Template Usage | |
853 | urls URL Paths |
|
853 | urls URL Paths | |
854 |
|
854 | |||
855 | (use 'hg help -v' to show built-in aliases and global options) |
|
855 | (use 'hg help -v' to show built-in aliases and global options) | |
856 |
|
856 | |||
857 |
|
857 | |||
858 | Test list of internal help commands |
|
858 | Test list of internal help commands | |
859 |
|
859 | |||
860 | $ hg help debug |
|
860 | $ hg help debug | |
861 | debug commands (internal and unsupported): |
|
861 | debug commands (internal and unsupported): | |
862 |
|
862 | |||
863 | debugancestor |
|
863 | debugancestor | |
864 | find the ancestor revision of two revisions in a given index |
|
864 | find the ancestor revision of two revisions in a given index | |
865 | debugapplystreamclonebundle |
|
865 | debugapplystreamclonebundle | |
866 | apply a stream clone bundle file |
|
866 | apply a stream clone bundle file | |
867 | debugbuilddag |
|
867 | debugbuilddag | |
868 | builds a repo with a given DAG from scratch in the current |
|
868 | builds a repo with a given DAG from scratch in the current | |
869 | empty repo |
|
869 | empty repo | |
870 | debugbundle lists the contents of a bundle |
|
870 | debugbundle lists the contents of a bundle | |
871 | debugcheckstate |
|
871 | debugcheckstate | |
872 | validate the correctness of the current dirstate |
|
872 | validate the correctness of the current dirstate | |
873 | debugcolor show available color, effects or style |
|
873 | debugcolor show available color, effects or style | |
874 | debugcommands |
|
874 | debugcommands | |
875 | list all available commands and options |
|
875 | list all available commands and options | |
876 | debugcomplete |
|
876 | debugcomplete | |
877 | returns the completion list associated with the given command |
|
877 | returns the completion list associated with the given command | |
878 | debugcreatestreamclonebundle |
|
878 | debugcreatestreamclonebundle | |
879 | create a stream clone bundle file |
|
879 | create a stream clone bundle file | |
880 | debugdag format the changelog or an index DAG as a concise textual |
|
880 | debugdag format the changelog or an index DAG as a concise textual | |
881 | description |
|
881 | description | |
882 | debugdata dump the contents of a data file revision |
|
882 | debugdata dump the contents of a data file revision | |
883 | debugdate parse and display a date |
|
883 | debugdate parse and display a date | |
884 | debugdeltachain |
|
884 | debugdeltachain | |
885 | dump information about delta chains in a revlog |
|
885 | dump information about delta chains in a revlog | |
886 | debugdirstate |
|
886 | debugdirstate | |
887 | show the contents of the current dirstate |
|
887 | show the contents of the current dirstate | |
888 | debugdiscovery |
|
888 | debugdiscovery | |
889 | runs the changeset discovery protocol in isolation |
|
889 | runs the changeset discovery protocol in isolation | |
890 | debugextensions |
|
890 | debugextensions | |
891 | show information about active extensions |
|
891 | show information about active extensions | |
892 | debugfileset parse and apply a fileset specification |
|
892 | debugfileset parse and apply a fileset specification | |
893 | debugfsinfo show information detected about current filesystem |
|
893 | debugfsinfo show information detected about current filesystem | |
894 | debuggetbundle |
|
894 | debuggetbundle | |
895 | retrieves a bundle from a repo |
|
895 | retrieves a bundle from a repo | |
896 | debugignore display the combined ignore pattern and information about |
|
896 | debugignore display the combined ignore pattern and information about | |
897 | ignored files |
|
897 | ignored files | |
898 | debugindex dump the contents of an index file |
|
898 | debugindex dump the contents of an index file | |
899 | debugindexdot |
|
899 | debugindexdot | |
900 | dump an index DAG as a graphviz dot file |
|
900 | dump an index DAG as a graphviz dot file | |
901 | debuginstall test Mercurial installation |
|
901 | debuginstall test Mercurial installation | |
902 | debugknown test whether node ids are known to a repo |
|
902 | debugknown test whether node ids are known to a repo | |
903 | debuglocks show or modify state of locks |
|
903 | debuglocks show or modify state of locks | |
904 | debugmergestate |
|
904 | debugmergestate | |
905 | print merge state |
|
905 | print merge state | |
906 | debugnamecomplete |
|
906 | debugnamecomplete | |
907 | complete "names" - tags, open branch names, bookmark names |
|
907 | complete "names" - tags, open branch names, bookmark names | |
908 | debugobsolete |
|
908 | debugobsolete | |
909 | create arbitrary obsolete marker |
|
909 | create arbitrary obsolete marker | |
910 | debugoptADV (no help text available) |
|
910 | debugoptADV (no help text available) | |
911 | debugoptDEP (no help text available) |
|
911 | debugoptDEP (no help text available) | |
912 | debugoptEXP (no help text available) |
|
912 | debugoptEXP (no help text available) | |
913 | debugpathcomplete |
|
913 | debugpathcomplete | |
914 | complete part or all of a tracked path |
|
914 | complete part or all of a tracked path | |
915 | debugpushkey access the pushkey key/value protocol |
|
915 | debugpushkey access the pushkey key/value protocol | |
916 | debugpvec (no help text available) |
|
916 | debugpvec (no help text available) | |
917 | debugrebuilddirstate |
|
917 | debugrebuilddirstate | |
918 | rebuild the dirstate as it would look like for the given |
|
918 | rebuild the dirstate as it would look like for the given | |
919 | revision |
|
919 | revision | |
920 | debugrebuildfncache |
|
920 | debugrebuildfncache | |
921 | rebuild the fncache file |
|
921 | rebuild the fncache file | |
922 | debugrename dump rename information |
|
922 | debugrename dump rename information | |
923 | debugrevlog show data and statistics about a revlog |
|
923 | debugrevlog show data and statistics about a revlog | |
924 | debugrevspec parse and apply a revision specification |
|
924 | debugrevspec parse and apply a revision specification | |
925 | debugsetparents |
|
925 | debugsetparents | |
926 | manually set the parents of the current working directory |
|
926 | manually set the parents of the current working directory | |
927 | debugsub (no help text available) |
|
927 | debugsub (no help text available) | |
928 | debugsuccessorssets |
|
928 | debugsuccessorssets | |
929 | show set of successors for revision |
|
929 | show set of successors for revision | |
930 | debugtemplate |
|
930 | debugtemplate | |
931 | parse and apply a template |
|
931 | parse and apply a template | |
932 | debugupgraderepo |
|
932 | debugupgraderepo | |
933 | upgrade a repository to use different features |
|
933 | upgrade a repository to use different features | |
934 | debugwalk show how files match on given patterns |
|
934 | debugwalk show how files match on given patterns | |
935 | debugwireargs |
|
935 | debugwireargs | |
936 | (no help text available) |
|
936 | (no help text available) | |
937 |
|
937 | |||
938 | (use 'hg help -v debug' to show built-in aliases and global options) |
|
938 | (use 'hg help -v debug' to show built-in aliases and global options) | |
939 |
|
939 | |||
940 | internals topic renders index of available sub-topics |
|
940 | internals topic renders index of available sub-topics | |
941 |
|
941 | |||
942 | $ hg help internals |
|
942 | $ hg help internals | |
943 | Technical implementation topics |
|
943 | Technical implementation topics | |
944 | """"""""""""""""""""""""""""""" |
|
944 | """"""""""""""""""""""""""""""" | |
945 |
|
945 | |||
946 | To access a subtopic, use "hg help internals.{subtopic-name}" |
|
946 | To access a subtopic, use "hg help internals.{subtopic-name}" | |
947 |
|
947 | |||
948 | bundles Bundles |
|
948 | bundles Bundles | |
949 | censor Censor |
|
949 | censor Censor | |
950 | changegroups Changegroups |
|
950 | changegroups Changegroups | |
951 | requirements Repository Requirements |
|
951 | requirements Repository Requirements | |
952 | revlogs Revision Logs |
|
952 | revlogs Revision Logs | |
953 | wireprotocol Wire Protocol |
|
953 | wireprotocol Wire Protocol | |
954 |
|
954 | |||
955 | sub-topics can be accessed |
|
955 | sub-topics can be accessed | |
956 |
|
956 | |||
957 | $ hg help internals.changegroups |
|
957 | $ hg help internals.changegroups | |
958 | Changegroups |
|
958 | Changegroups | |
959 | """""""""""" |
|
959 | """""""""""" | |
960 |
|
960 | |||
961 | Changegroups are representations of repository revlog data, specifically |
|
961 | Changegroups are representations of repository revlog data, specifically | |
962 | the changelog data, root/flat manifest data, treemanifest data, and |
|
962 | the changelog data, root/flat manifest data, treemanifest data, and | |
963 | filelogs. |
|
963 | filelogs. | |
964 |
|
964 | |||
965 | There are 3 versions of changegroups: "1", "2", and "3". From a high- |
|
965 | There are 3 versions of changegroups: "1", "2", and "3". From a high- | |
966 | level, versions "1" and "2" are almost exactly the same, with the only |
|
966 | level, versions "1" and "2" are almost exactly the same, with the only | |
967 | difference being an additional item in the *delta header*. Version "3" |
|
967 | difference being an additional item in the *delta header*. Version "3" | |
968 | adds support for revlog flags in the *delta header* and optionally |
|
968 | adds support for revlog flags in the *delta header* and optionally | |
969 | exchanging treemanifests (enabled by setting an option on the |
|
969 | exchanging treemanifests (enabled by setting an option on the | |
970 | "changegroup" part in the bundle2). |
|
970 | "changegroup" part in the bundle2). | |
971 |
|
971 | |||
972 | Changegroups when not exchanging treemanifests consist of 3 logical |
|
972 | Changegroups when not exchanging treemanifests consist of 3 logical | |
973 | segments: |
|
973 | segments: | |
974 |
|
974 | |||
975 | +---------------------------------+ |
|
975 | +---------------------------------+ | |
976 | | | | | |
|
976 | | | | | | |
977 | | changeset | manifest | filelogs | |
|
977 | | changeset | manifest | filelogs | | |
978 | | | | | |
|
978 | | | | | | |
979 | | | | | |
|
979 | | | | | | |
980 | +---------------------------------+ |
|
980 | +---------------------------------+ | |
981 |
|
981 | |||
982 | When exchanging treemanifests, there are 4 logical segments: |
|
982 | When exchanging treemanifests, there are 4 logical segments: | |
983 |
|
983 | |||
984 | +-------------------------------------------------+ |
|
984 | +-------------------------------------------------+ | |
985 | | | | | | |
|
985 | | | | | | | |
986 | | changeset | root | treemanifests | filelogs | |
|
986 | | changeset | root | treemanifests | filelogs | | |
987 | | | manifest | | | |
|
987 | | | manifest | | | | |
988 | | | | | | |
|
988 | | | | | | | |
989 | +-------------------------------------------------+ |
|
989 | +-------------------------------------------------+ | |
990 |
|
990 | |||
991 | The principle building block of each segment is a *chunk*. A *chunk* is a |
|
991 | The principle building block of each segment is a *chunk*. A *chunk* is a | |
992 | framed piece of data: |
|
992 | framed piece of data: | |
993 |
|
993 | |||
994 | +---------------------------------------+ |
|
994 | +---------------------------------------+ | |
995 | | | | |
|
995 | | | | | |
996 | | length | data | |
|
996 | | length | data | | |
997 | | (4 bytes) | (<length - 4> bytes) | |
|
997 | | (4 bytes) | (<length - 4> bytes) | | |
998 | | | | |
|
998 | | | | | |
999 | +---------------------------------------+ |
|
999 | +---------------------------------------+ | |
1000 |
|
1000 | |||
1001 | All integers are big-endian signed integers. Each chunk starts with a |
|
1001 | All integers are big-endian signed integers. Each chunk starts with a | |
1002 | 32-bit integer indicating the length of the entire chunk (including the |
|
1002 | 32-bit integer indicating the length of the entire chunk (including the | |
1003 | length field itself). |
|
1003 | length field itself). | |
1004 |
|
1004 | |||
1005 | There is a special case chunk that has a value of 0 for the length |
|
1005 | There is a special case chunk that has a value of 0 for the length | |
1006 | ("0x00000000"). We call this an *empty chunk*. |
|
1006 | ("0x00000000"). We call this an *empty chunk*. | |
1007 |
|
1007 | |||
1008 | Delta Groups |
|
1008 | Delta Groups | |
1009 | ============ |
|
1009 | ============ | |
1010 |
|
1010 | |||
1011 | A *delta group* expresses the content of a revlog as a series of deltas, |
|
1011 | A *delta group* expresses the content of a revlog as a series of deltas, | |
1012 | or patches against previous revisions. |
|
1012 | or patches against previous revisions. | |
1013 |
|
1013 | |||
1014 | Delta groups consist of 0 or more *chunks* followed by the *empty chunk* |
|
1014 | Delta groups consist of 0 or more *chunks* followed by the *empty chunk* | |
1015 | to signal the end of the delta group: |
|
1015 | to signal the end of the delta group: | |
1016 |
|
1016 | |||
1017 | +------------------------------------------------------------------------+ |
|
1017 | +------------------------------------------------------------------------+ | |
1018 | | | | | | | |
|
1018 | | | | | | | | |
1019 | | chunk0 length | chunk0 data | chunk1 length | chunk1 data | 0x0 | |
|
1019 | | chunk0 length | chunk0 data | chunk1 length | chunk1 data | 0x0 | | |
1020 | | (4 bytes) | (various) | (4 bytes) | (various) | (4 bytes) | |
|
1020 | | (4 bytes) | (various) | (4 bytes) | (various) | (4 bytes) | | |
1021 | | | | | | | |
|
1021 | | | | | | | | |
1022 | +------------------------------------------------------------------------+ |
|
1022 | +------------------------------------------------------------------------+ | |
1023 |
|
1023 | |||
1024 | Each *chunk*'s data consists of the following: |
|
1024 | Each *chunk*'s data consists of the following: | |
1025 |
|
1025 | |||
1026 | +---------------------------------------+ |
|
1026 | +---------------------------------------+ | |
1027 | | | | |
|
1027 | | | | | |
1028 | | delta header | delta data | |
|
1028 | | delta header | delta data | | |
1029 | | (various by version) | (various) | |
|
1029 | | (various by version) | (various) | | |
1030 | | | | |
|
1030 | | | | | |
1031 | +---------------------------------------+ |
|
1031 | +---------------------------------------+ | |
1032 |
|
1032 | |||
1033 | The *delta data* is a series of *delta*s that describe a diff from an |
|
1033 | The *delta data* is a series of *delta*s that describe a diff from an | |
1034 | existing entry (either that the recipient already has, or previously |
|
1034 | existing entry (either that the recipient already has, or previously | |
1035 |
specified in the bundle |
|
1035 | specified in the bundle/changegroup). | |
1036 |
|
1036 | |||
1037 | The *delta header* is different between versions "1", "2", and "3" of the |
|
1037 | The *delta header* is different between versions "1", "2", and "3" of the | |
1038 | changegroup format. |
|
1038 | changegroup format. | |
1039 |
|
1039 | |||
1040 | Version 1 (headerlen=80): |
|
1040 | Version 1 (headerlen=80): | |
1041 |
|
1041 | |||
1042 | +------------------------------------------------------+ |
|
1042 | +------------------------------------------------------+ | |
1043 | | | | | | |
|
1043 | | | | | | | |
1044 | | node | p1 node | p2 node | link node | |
|
1044 | | node | p1 node | p2 node | link node | | |
1045 | | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) | |
|
1045 | | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) | | |
1046 | | | | | | |
|
1046 | | | | | | | |
1047 | +------------------------------------------------------+ |
|
1047 | +------------------------------------------------------+ | |
1048 |
|
1048 | |||
1049 | Version 2 (headerlen=100): |
|
1049 | Version 2 (headerlen=100): | |
1050 |
|
1050 | |||
1051 | +------------------------------------------------------------------+ |
|
1051 | +------------------------------------------------------------------+ | |
1052 | | | | | | | |
|
1052 | | | | | | | | |
1053 | | node | p1 node | p2 node | base node | link node | |
|
1053 | | node | p1 node | p2 node | base node | link node | | |
1054 | | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) | |
|
1054 | | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) | | |
1055 | | | | | | | |
|
1055 | | | | | | | | |
1056 | +------------------------------------------------------------------+ |
|
1056 | +------------------------------------------------------------------+ | |
1057 |
|
1057 | |||
1058 | Version 3 (headerlen=102): |
|
1058 | Version 3 (headerlen=102): | |
1059 |
|
1059 | |||
1060 | +------------------------------------------------------------------------------+ |
|
1060 | +------------------------------------------------------------------------------+ | |
1061 | | | | | | | | |
|
1061 | | | | | | | | | |
1062 | | node | p1 node | p2 node | base node | link node | flags | |
|
1062 | | node | p1 node | p2 node | base node | link node | flags | | |
1063 | | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) | (2 bytes) | |
|
1063 | | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) | (2 bytes) | | |
1064 | | | | | | | | |
|
1064 | | | | | | | | | |
1065 | +------------------------------------------------------------------------------+ |
|
1065 | +------------------------------------------------------------------------------+ | |
1066 |
|
1066 | |||
1067 | The *delta data* consists of "chunklen - 4 - headerlen" bytes, which |
|
1067 | The *delta data* consists of "chunklen - 4 - headerlen" bytes, which | |
1068 | contain a series of *delta*s, densely packed (no separators). These deltas |
|
1068 | contain a series of *delta*s, densely packed (no separators). These deltas | |
1069 | describe a diff from an existing entry (either that the recipient already |
|
1069 | describe a diff from an existing entry (either that the recipient already | |
1070 | has, or previously specified in the bundle/changegroup). The format is |
|
1070 | has, or previously specified in the bundle/changegroup). The format is | |
1071 | described more fully in "hg help internals.bdiff", but briefly: |
|
1071 | described more fully in "hg help internals.bdiff", but briefly: | |
1072 |
|
1072 | |||
1073 | +---------------------------------------------------------------+ |
|
1073 | +---------------------------------------------------------------+ | |
1074 | | | | | | |
|
1074 | | | | | | | |
1075 | | start offset | end offset | new length | content | |
|
1075 | | start offset | end offset | new length | content | | |
1076 | | (4 bytes) | (4 bytes) | (4 bytes) | (<new length> bytes) | |
|
1076 | | (4 bytes) | (4 bytes) | (4 bytes) | (<new length> bytes) | | |
1077 | | | | | | |
|
1077 | | | | | | | |
1078 | +---------------------------------------------------------------+ |
|
1078 | +---------------------------------------------------------------+ | |
1079 |
|
1079 | |||
1080 | Please note that the length field in the delta data does *not* include |
|
1080 | Please note that the length field in the delta data does *not* include | |
1081 | itself. |
|
1081 | itself. | |
1082 |
|
1082 | |||
1083 | In version 1, the delta is always applied against the previous node from |
|
1083 | In version 1, the delta is always applied against the previous node from | |
1084 | the changegroup or the first parent if this is the first entry in the |
|
1084 | the changegroup or the first parent if this is the first entry in the | |
1085 | changegroup. |
|
1085 | changegroup. | |
1086 |
|
1086 | |||
1087 | In version 2 and up, the delta base node is encoded in the entry in the |
|
1087 | In version 2 and up, the delta base node is encoded in the entry in the | |
1088 | changegroup. This allows the delta to be expressed against any parent, |
|
1088 | changegroup. This allows the delta to be expressed against any parent, | |
1089 | which can result in smaller deltas and more efficient encoding of data. |
|
1089 | which can result in smaller deltas and more efficient encoding of data. | |
1090 |
|
1090 | |||
1091 | Changeset Segment |
|
1091 | Changeset Segment | |
1092 | ================= |
|
1092 | ================= | |
1093 |
|
1093 | |||
1094 | The *changeset segment* consists of a single *delta group* holding |
|
1094 | The *changeset segment* consists of a single *delta group* holding | |
1095 | changelog data. The *empty chunk* at the end of the *delta group* denotes |
|
1095 | changelog data. The *empty chunk* at the end of the *delta group* denotes | |
1096 | the boundary to the *manifest segment*. |
|
1096 | the boundary to the *manifest segment*. | |
1097 |
|
1097 | |||
1098 | Manifest Segment |
|
1098 | Manifest Segment | |
1099 | ================ |
|
1099 | ================ | |
1100 |
|
1100 | |||
1101 | The *manifest segment* consists of a single *delta group* holding manifest |
|
1101 | The *manifest segment* consists of a single *delta group* holding manifest | |
1102 | data. If treemanifests are in use, it contains only the manifest for the |
|
1102 | data. If treemanifests are in use, it contains only the manifest for the | |
1103 | root directory of the repository. Otherwise, it contains the entire |
|
1103 | root directory of the repository. Otherwise, it contains the entire | |
1104 | manifest data. The *empty chunk* at the end of the *delta group* denotes |
|
1104 | manifest data. The *empty chunk* at the end of the *delta group* denotes | |
1105 | the boundary to the next segment (either the *treemanifests segment* or |
|
1105 | the boundary to the next segment (either the *treemanifests segment* or | |
1106 | the *filelogs segment*, depending on version and the request options). |
|
1106 | the *filelogs segment*, depending on version and the request options). | |
1107 |
|
1107 | |||
1108 | Treemanifests Segment |
|
1108 | Treemanifests Segment | |
1109 | --------------------- |
|
1109 | --------------------- | |
1110 |
|
1110 | |||
1111 | The *treemanifests segment* only exists in changegroup version "3", and |
|
1111 | The *treemanifests segment* only exists in changegroup version "3", and | |
1112 | only if the 'treemanifest' param is part of the bundle2 changegroup part |
|
1112 | only if the 'treemanifest' param is part of the bundle2 changegroup part | |
1113 | (it is not possible to use changegroup version 3 outside of bundle2). |
|
1113 | (it is not possible to use changegroup version 3 outside of bundle2). | |
1114 | Aside from the filenames in the *treemanifests segment* containing a |
|
1114 | Aside from the filenames in the *treemanifests segment* containing a | |
1115 | trailing "/" character, it behaves identically to the *filelogs segment* |
|
1115 | trailing "/" character, it behaves identically to the *filelogs segment* | |
1116 | (see below). The final sub-segment is followed by an *empty chunk* |
|
1116 | (see below). The final sub-segment is followed by an *empty chunk* | |
1117 | (logically, a sub-segment with filename size 0). This denotes the boundary |
|
1117 | (logically, a sub-segment with filename size 0). This denotes the boundary | |
1118 | to the *filelogs segment*. |
|
1118 | to the *filelogs segment*. | |
1119 |
|
1119 | |||
1120 | Filelogs Segment |
|
1120 | Filelogs Segment | |
1121 | ================ |
|
1121 | ================ | |
1122 |
|
1122 | |||
1123 | The *filelogs segment* consists of multiple sub-segments, each |
|
1123 | The *filelogs segment* consists of multiple sub-segments, each | |
1124 | corresponding to an individual file whose data is being described: |
|
1124 | corresponding to an individual file whose data is being described: | |
1125 |
|
1125 | |||
1126 | +--------------------------------------------------+ |
|
1126 | +--------------------------------------------------+ | |
1127 | | | | | | | |
|
1127 | | | | | | | | |
1128 | | filelog0 | filelog1 | filelog2 | ... | 0x0 | |
|
1128 | | filelog0 | filelog1 | filelog2 | ... | 0x0 | | |
1129 | | | | | | (4 bytes) | |
|
1129 | | | | | | (4 bytes) | | |
1130 | | | | | | | |
|
1130 | | | | | | | | |
1131 | +--------------------------------------------------+ |
|
1131 | +--------------------------------------------------+ | |
1132 |
|
1132 | |||
1133 | The final filelog sub-segment is followed by an *empty chunk* (logically, |
|
1133 | The final filelog sub-segment is followed by an *empty chunk* (logically, | |
1134 | a sub-segment with filename size 0). This denotes the end of the segment |
|
1134 | a sub-segment with filename size 0). This denotes the end of the segment | |
1135 | and of the overall changegroup. |
|
1135 | and of the overall changegroup. | |
1136 |
|
1136 | |||
1137 | Each filelog sub-segment consists of the following: |
|
1137 | Each filelog sub-segment consists of the following: | |
1138 |
|
1138 | |||
1139 | +------------------------------------------------------+ |
|
1139 | +------------------------------------------------------+ | |
1140 | | | | | |
|
1140 | | | | | | |
1141 | | filename length | filename | delta group | |
|
1141 | | filename length | filename | delta group | | |
1142 | | (4 bytes) | (<length - 4> bytes) | (various) | |
|
1142 | | (4 bytes) | (<length - 4> bytes) | (various) | | |
1143 | | | | | |
|
1143 | | | | | | |
1144 | +------------------------------------------------------+ |
|
1144 | +------------------------------------------------------+ | |
1145 |
|
1145 | |||
1146 | That is, a *chunk* consisting of the filename (not terminated or padded) |
|
1146 | That is, a *chunk* consisting of the filename (not terminated or padded) | |
1147 | followed by N chunks constituting the *delta group* for this file. The |
|
1147 | followed by N chunks constituting the *delta group* for this file. The | |
1148 | *empty chunk* at the end of each *delta group* denotes the boundary to the |
|
1148 | *empty chunk* at the end of each *delta group* denotes the boundary to the | |
1149 | next filelog sub-segment. |
|
1149 | next filelog sub-segment. | |
1150 |
|
1150 | |||
1151 | Test list of commands with command with no help text |
|
1151 | Test list of commands with command with no help text | |
1152 |
|
1152 | |||
1153 | $ hg help helpext |
|
1153 | $ hg help helpext | |
1154 | helpext extension - no help text available |
|
1154 | helpext extension - no help text available | |
1155 |
|
1155 | |||
1156 | list of commands: |
|
1156 | list of commands: | |
1157 |
|
1157 | |||
1158 | nohelp (no help text available) |
|
1158 | nohelp (no help text available) | |
1159 |
|
1159 | |||
1160 | (use 'hg help -v helpext' to show built-in aliases and global options) |
|
1160 | (use 'hg help -v helpext' to show built-in aliases and global options) | |
1161 |
|
1161 | |||
1162 |
|
1162 | |||
1163 | test advanced, deprecated and experimental options are hidden in command help |
|
1163 | test advanced, deprecated and experimental options are hidden in command help | |
1164 | $ hg help debugoptADV |
|
1164 | $ hg help debugoptADV | |
1165 | hg debugoptADV |
|
1165 | hg debugoptADV | |
1166 |
|
1166 | |||
1167 | (no help text available) |
|
1167 | (no help text available) | |
1168 |
|
1168 | |||
1169 | options: |
|
1169 | options: | |
1170 |
|
1170 | |||
1171 | (some details hidden, use --verbose to show complete help) |
|
1171 | (some details hidden, use --verbose to show complete help) | |
1172 | $ hg help debugoptDEP |
|
1172 | $ hg help debugoptDEP | |
1173 | hg debugoptDEP |
|
1173 | hg debugoptDEP | |
1174 |
|
1174 | |||
1175 | (no help text available) |
|
1175 | (no help text available) | |
1176 |
|
1176 | |||
1177 | options: |
|
1177 | options: | |
1178 |
|
1178 | |||
1179 | (some details hidden, use --verbose to show complete help) |
|
1179 | (some details hidden, use --verbose to show complete help) | |
1180 |
|
1180 | |||
1181 | $ hg help debugoptEXP |
|
1181 | $ hg help debugoptEXP | |
1182 | hg debugoptEXP |
|
1182 | hg debugoptEXP | |
1183 |
|
1183 | |||
1184 | (no help text available) |
|
1184 | (no help text available) | |
1185 |
|
1185 | |||
1186 | options: |
|
1186 | options: | |
1187 |
|
1187 | |||
1188 | (some details hidden, use --verbose to show complete help) |
|
1188 | (some details hidden, use --verbose to show complete help) | |
1189 |
|
1189 | |||
1190 | test advanced, deprecated and experimental options are shown with -v |
|
1190 | test advanced, deprecated and experimental options are shown with -v | |
1191 | $ hg help -v debugoptADV | grep aopt |
|
1191 | $ hg help -v debugoptADV | grep aopt | |
1192 | --aopt option is (ADVANCED) |
|
1192 | --aopt option is (ADVANCED) | |
1193 | $ hg help -v debugoptDEP | grep dopt |
|
1193 | $ hg help -v debugoptDEP | grep dopt | |
1194 | --dopt option is (DEPRECATED) |
|
1194 | --dopt option is (DEPRECATED) | |
1195 | $ hg help -v debugoptEXP | grep eopt |
|
1195 | $ hg help -v debugoptEXP | grep eopt | |
1196 | --eopt option is (EXPERIMENTAL) |
|
1196 | --eopt option is (EXPERIMENTAL) | |
1197 |
|
1197 | |||
1198 | #if gettext |
|
1198 | #if gettext | |
1199 | test deprecated option is hidden with translation with untranslated description |
|
1199 | test deprecated option is hidden with translation with untranslated description | |
1200 | (use many globy for not failing on changed transaction) |
|
1200 | (use many globy for not failing on changed transaction) | |
1201 | $ LANGUAGE=sv hg help debugoptDEP |
|
1201 | $ LANGUAGE=sv hg help debugoptDEP | |
1202 | hg debugoptDEP |
|
1202 | hg debugoptDEP | |
1203 |
|
1203 | |||
1204 | (*) (glob) |
|
1204 | (*) (glob) | |
1205 |
|
1205 | |||
1206 | options: |
|
1206 | options: | |
1207 |
|
1207 | |||
1208 | (some details hidden, use --verbose to show complete help) |
|
1208 | (some details hidden, use --verbose to show complete help) | |
1209 | #endif |
|
1209 | #endif | |
1210 |
|
1210 | |||
1211 | Test commands that collide with topics (issue4240) |
|
1211 | Test commands that collide with topics (issue4240) | |
1212 |
|
1212 | |||
1213 | $ hg config -hq |
|
1213 | $ hg config -hq | |
1214 | hg config [-u] [NAME]... |
|
1214 | hg config [-u] [NAME]... | |
1215 |
|
1215 | |||
1216 | show combined config settings from all hgrc files |
|
1216 | show combined config settings from all hgrc files | |
1217 | $ hg showconfig -hq |
|
1217 | $ hg showconfig -hq | |
1218 | hg config [-u] [NAME]... |
|
1218 | hg config [-u] [NAME]... | |
1219 |
|
1219 | |||
1220 | show combined config settings from all hgrc files |
|
1220 | show combined config settings from all hgrc files | |
1221 |
|
1221 | |||
1222 | Test a help topic |
|
1222 | Test a help topic | |
1223 |
|
1223 | |||
1224 | $ hg help dates |
|
1224 | $ hg help dates | |
1225 | Date Formats |
|
1225 | Date Formats | |
1226 | """""""""""" |
|
1226 | """""""""""" | |
1227 |
|
1227 | |||
1228 | Some commands allow the user to specify a date, e.g.: |
|
1228 | Some commands allow the user to specify a date, e.g.: | |
1229 |
|
1229 | |||
1230 | - backout, commit, import, tag: Specify the commit date. |
|
1230 | - backout, commit, import, tag: Specify the commit date. | |
1231 | - log, revert, update: Select revision(s) by date. |
|
1231 | - log, revert, update: Select revision(s) by date. | |
1232 |
|
1232 | |||
1233 | Many date formats are valid. Here are some examples: |
|
1233 | Many date formats are valid. Here are some examples: | |
1234 |
|
1234 | |||
1235 | - "Wed Dec 6 13:18:29 2006" (local timezone assumed) |
|
1235 | - "Wed Dec 6 13:18:29 2006" (local timezone assumed) | |
1236 | - "Dec 6 13:18 -0600" (year assumed, time offset provided) |
|
1236 | - "Dec 6 13:18 -0600" (year assumed, time offset provided) | |
1237 | - "Dec 6 13:18 UTC" (UTC and GMT are aliases for +0000) |
|
1237 | - "Dec 6 13:18 UTC" (UTC and GMT are aliases for +0000) | |
1238 | - "Dec 6" (midnight) |
|
1238 | - "Dec 6" (midnight) | |
1239 | - "13:18" (today assumed) |
|
1239 | - "13:18" (today assumed) | |
1240 | - "3:39" (3:39AM assumed) |
|
1240 | - "3:39" (3:39AM assumed) | |
1241 | - "3:39pm" (15:39) |
|
1241 | - "3:39pm" (15:39) | |
1242 | - "2006-12-06 13:18:29" (ISO 8601 format) |
|
1242 | - "2006-12-06 13:18:29" (ISO 8601 format) | |
1243 | - "2006-12-6 13:18" |
|
1243 | - "2006-12-6 13:18" | |
1244 | - "2006-12-6" |
|
1244 | - "2006-12-6" | |
1245 | - "12-6" |
|
1245 | - "12-6" | |
1246 | - "12/6" |
|
1246 | - "12/6" | |
1247 | - "12/6/6" (Dec 6 2006) |
|
1247 | - "12/6/6" (Dec 6 2006) | |
1248 | - "today" (midnight) |
|
1248 | - "today" (midnight) | |
1249 | - "yesterday" (midnight) |
|
1249 | - "yesterday" (midnight) | |
1250 | - "now" - right now |
|
1250 | - "now" - right now | |
1251 |
|
1251 | |||
1252 | Lastly, there is Mercurial's internal format: |
|
1252 | Lastly, there is Mercurial's internal format: | |
1253 |
|
1253 | |||
1254 | - "1165411109 0" (Wed Dec 6 13:18:29 2006 UTC) |
|
1254 | - "1165411109 0" (Wed Dec 6 13:18:29 2006 UTC) | |
1255 |
|
1255 | |||
1256 | This is the internal representation format for dates. The first number is |
|
1256 | This is the internal representation format for dates. The first number is | |
1257 | the number of seconds since the epoch (1970-01-01 00:00 UTC). The second |
|
1257 | the number of seconds since the epoch (1970-01-01 00:00 UTC). The second | |
1258 | is the offset of the local timezone, in seconds west of UTC (negative if |
|
1258 | is the offset of the local timezone, in seconds west of UTC (negative if | |
1259 | the timezone is east of UTC). |
|
1259 | the timezone is east of UTC). | |
1260 |
|
1260 | |||
1261 | The log command also accepts date ranges: |
|
1261 | The log command also accepts date ranges: | |
1262 |
|
1262 | |||
1263 | - "<DATE" - at or before a given date/time |
|
1263 | - "<DATE" - at or before a given date/time | |
1264 | - ">DATE" - on or after a given date/time |
|
1264 | - ">DATE" - on or after a given date/time | |
1265 | - "DATE to DATE" - a date range, inclusive |
|
1265 | - "DATE to DATE" - a date range, inclusive | |
1266 | - "-DAYS" - within a given number of days of today |
|
1266 | - "-DAYS" - within a given number of days of today | |
1267 |
|
1267 | |||
1268 | Test repeated config section name |
|
1268 | Test repeated config section name | |
1269 |
|
1269 | |||
1270 | $ hg help config.host |
|
1270 | $ hg help config.host | |
1271 | "http_proxy.host" |
|
1271 | "http_proxy.host" | |
1272 | Host name and (optional) port of the proxy server, for example |
|
1272 | Host name and (optional) port of the proxy server, for example | |
1273 | "myproxy:8000". |
|
1273 | "myproxy:8000". | |
1274 |
|
1274 | |||
1275 | "smtp.host" |
|
1275 | "smtp.host" | |
1276 | Host name of mail server, e.g. "mail.example.com". |
|
1276 | Host name of mail server, e.g. "mail.example.com". | |
1277 |
|
1277 | |||
1278 | Unrelated trailing paragraphs shouldn't be included |
|
1278 | Unrelated trailing paragraphs shouldn't be included | |
1279 |
|
1279 | |||
1280 | $ hg help config.extramsg | grep '^$' |
|
1280 | $ hg help config.extramsg | grep '^$' | |
1281 |
|
1281 | |||
1282 |
|
1282 | |||
1283 | Test capitalized section name |
|
1283 | Test capitalized section name | |
1284 |
|
1284 | |||
1285 | $ hg help scripting.HGPLAIN > /dev/null |
|
1285 | $ hg help scripting.HGPLAIN > /dev/null | |
1286 |
|
1286 | |||
1287 | Help subsection: |
|
1287 | Help subsection: | |
1288 |
|
1288 | |||
1289 | $ hg help config.charsets |grep "Email example:" > /dev/null |
|
1289 | $ hg help config.charsets |grep "Email example:" > /dev/null | |
1290 | [1] |
|
1290 | [1] | |
1291 |
|
1291 | |||
1292 | Show nested definitions |
|
1292 | Show nested definitions | |
1293 | ("profiling.type"[break]"ls"[break]"stat"[break]) |
|
1293 | ("profiling.type"[break]"ls"[break]"stat"[break]) | |
1294 |
|
1294 | |||
1295 | $ hg help config.type | egrep '^$'|wc -l |
|
1295 | $ hg help config.type | egrep '^$'|wc -l | |
1296 | \s*3 (re) |
|
1296 | \s*3 (re) | |
1297 |
|
1297 | |||
1298 | Separate sections from subsections |
|
1298 | Separate sections from subsections | |
1299 |
|
1299 | |||
1300 | $ hg help config.format | egrep '^ ("|-)|^\s*$' | uniq |
|
1300 | $ hg help config.format | egrep '^ ("|-)|^\s*$' | uniq | |
1301 | "format" |
|
1301 | "format" | |
1302 | -------- |
|
1302 | -------- | |
1303 |
|
1303 | |||
1304 | "usegeneraldelta" |
|
1304 | "usegeneraldelta" | |
1305 |
|
1305 | |||
1306 | "dotencode" |
|
1306 | "dotencode" | |
1307 |
|
1307 | |||
1308 | "usefncache" |
|
1308 | "usefncache" | |
1309 |
|
1309 | |||
1310 | "usestore" |
|
1310 | "usestore" | |
1311 |
|
1311 | |||
1312 | "profiling" |
|
1312 | "profiling" | |
1313 | ----------- |
|
1313 | ----------- | |
1314 |
|
1314 | |||
1315 | "format" |
|
1315 | "format" | |
1316 |
|
1316 | |||
1317 | "progress" |
|
1317 | "progress" | |
1318 | ---------- |
|
1318 | ---------- | |
1319 |
|
1319 | |||
1320 | "format" |
|
1320 | "format" | |
1321 |
|
1321 | |||
1322 |
|
1322 | |||
1323 | Last item in help config.*: |
|
1323 | Last item in help config.*: | |
1324 |
|
1324 | |||
1325 | $ hg help config.`hg help config|grep '^ "'| \ |
|
1325 | $ hg help config.`hg help config|grep '^ "'| \ | |
1326 | > tail -1|sed 's![ "]*!!g'`| \ |
|
1326 | > tail -1|sed 's![ "]*!!g'`| \ | |
1327 | > grep 'hg help -c config' > /dev/null |
|
1327 | > grep 'hg help -c config' > /dev/null | |
1328 | [1] |
|
1328 | [1] | |
1329 |
|
1329 | |||
1330 | note to use help -c for general hg help config: |
|
1330 | note to use help -c for general hg help config: | |
1331 |
|
1331 | |||
1332 | $ hg help config |grep 'hg help -c config' > /dev/null |
|
1332 | $ hg help config |grep 'hg help -c config' > /dev/null | |
1333 |
|
1333 | |||
1334 | Test templating help |
|
1334 | Test templating help | |
1335 |
|
1335 | |||
1336 | $ hg help templating | egrep '(desc|diffstat|firstline|nonempty) ' |
|
1336 | $ hg help templating | egrep '(desc|diffstat|firstline|nonempty) ' | |
1337 | desc String. The text of the changeset description. |
|
1337 | desc String. The text of the changeset description. | |
1338 | diffstat String. Statistics of changes with the following format: |
|
1338 | diffstat String. Statistics of changes with the following format: | |
1339 | firstline Any text. Returns the first line of text. |
|
1339 | firstline Any text. Returns the first line of text. | |
1340 | nonempty Any text. Returns '(none)' if the string is empty. |
|
1340 | nonempty Any text. Returns '(none)' if the string is empty. | |
1341 |
|
1341 | |||
1342 | Test deprecated items |
|
1342 | Test deprecated items | |
1343 |
|
1343 | |||
1344 | $ hg help -v templating | grep currentbookmark |
|
1344 | $ hg help -v templating | grep currentbookmark | |
1345 | currentbookmark |
|
1345 | currentbookmark | |
1346 | $ hg help templating | (grep currentbookmark || true) |
|
1346 | $ hg help templating | (grep currentbookmark || true) | |
1347 |
|
1347 | |||
1348 | Test help hooks |
|
1348 | Test help hooks | |
1349 |
|
1349 | |||
1350 | $ cat > helphook1.py <<EOF |
|
1350 | $ cat > helphook1.py <<EOF | |
1351 | > from mercurial import help |
|
1351 | > from mercurial import help | |
1352 | > |
|
1352 | > | |
1353 | > def rewrite(ui, topic, doc): |
|
1353 | > def rewrite(ui, topic, doc): | |
1354 | > return doc + '\nhelphook1\n' |
|
1354 | > return doc + '\nhelphook1\n' | |
1355 | > |
|
1355 | > | |
1356 | > def extsetup(ui): |
|
1356 | > def extsetup(ui): | |
1357 | > help.addtopichook('revisions', rewrite) |
|
1357 | > help.addtopichook('revisions', rewrite) | |
1358 | > EOF |
|
1358 | > EOF | |
1359 | $ cat > helphook2.py <<EOF |
|
1359 | $ cat > helphook2.py <<EOF | |
1360 | > from mercurial import help |
|
1360 | > from mercurial import help | |
1361 | > |
|
1361 | > | |
1362 | > def rewrite(ui, topic, doc): |
|
1362 | > def rewrite(ui, topic, doc): | |
1363 | > return doc + '\nhelphook2\n' |
|
1363 | > return doc + '\nhelphook2\n' | |
1364 | > |
|
1364 | > | |
1365 | > def extsetup(ui): |
|
1365 | > def extsetup(ui): | |
1366 | > help.addtopichook('revisions', rewrite) |
|
1366 | > help.addtopichook('revisions', rewrite) | |
1367 | > EOF |
|
1367 | > EOF | |
1368 | $ echo '[extensions]' >> $HGRCPATH |
|
1368 | $ echo '[extensions]' >> $HGRCPATH | |
1369 | $ echo "helphook1 = `pwd`/helphook1.py" >> $HGRCPATH |
|
1369 | $ echo "helphook1 = `pwd`/helphook1.py" >> $HGRCPATH | |
1370 | $ echo "helphook2 = `pwd`/helphook2.py" >> $HGRCPATH |
|
1370 | $ echo "helphook2 = `pwd`/helphook2.py" >> $HGRCPATH | |
1371 | $ hg help revsets | grep helphook |
|
1371 | $ hg help revsets | grep helphook | |
1372 | helphook1 |
|
1372 | helphook1 | |
1373 | helphook2 |
|
1373 | helphook2 | |
1374 |
|
1374 | |||
1375 | help -c should only show debug --debug |
|
1375 | help -c should only show debug --debug | |
1376 |
|
1376 | |||
1377 | $ hg help -c --debug|egrep debug|wc -l|egrep '^\s*0\s*$' |
|
1377 | $ hg help -c --debug|egrep debug|wc -l|egrep '^\s*0\s*$' | |
1378 | [1] |
|
1378 | [1] | |
1379 |
|
1379 | |||
1380 | help -c should only show deprecated for -v |
|
1380 | help -c should only show deprecated for -v | |
1381 |
|
1381 | |||
1382 | $ hg help -c -v|egrep DEPRECATED|wc -l|egrep '^\s*0\s*$' |
|
1382 | $ hg help -c -v|egrep DEPRECATED|wc -l|egrep '^\s*0\s*$' | |
1383 | [1] |
|
1383 | [1] | |
1384 |
|
1384 | |||
1385 | Test -s / --system |
|
1385 | Test -s / --system | |
1386 |
|
1386 | |||
1387 | $ hg help config.files -s windows |grep 'etc/mercurial' | \ |
|
1387 | $ hg help config.files -s windows |grep 'etc/mercurial' | \ | |
1388 | > wc -l | sed -e 's/ //g' |
|
1388 | > wc -l | sed -e 's/ //g' | |
1389 | 0 |
|
1389 | 0 | |
1390 | $ hg help config.files --system unix | grep 'USER' | \ |
|
1390 | $ hg help config.files --system unix | grep 'USER' | \ | |
1391 | > wc -l | sed -e 's/ //g' |
|
1391 | > wc -l | sed -e 's/ //g' | |
1392 | 0 |
|
1392 | 0 | |
1393 |
|
1393 | |||
1394 | Test -e / -c / -k combinations |
|
1394 | Test -e / -c / -k combinations | |
1395 |
|
1395 | |||
1396 | $ hg help -c|egrep '^[A-Z].*:|^ debug' |
|
1396 | $ hg help -c|egrep '^[A-Z].*:|^ debug' | |
1397 | Commands: |
|
1397 | Commands: | |
1398 | $ hg help -e|egrep '^[A-Z].*:|^ debug' |
|
1398 | $ hg help -e|egrep '^[A-Z].*:|^ debug' | |
1399 | Extensions: |
|
1399 | Extensions: | |
1400 | $ hg help -k|egrep '^[A-Z].*:|^ debug' |
|
1400 | $ hg help -k|egrep '^[A-Z].*:|^ debug' | |
1401 | Topics: |
|
1401 | Topics: | |
1402 | Commands: |
|
1402 | Commands: | |
1403 | Extensions: |
|
1403 | Extensions: | |
1404 | Extension Commands: |
|
1404 | Extension Commands: | |
1405 | $ hg help -c schemes |
|
1405 | $ hg help -c schemes | |
1406 | abort: no such help topic: schemes |
|
1406 | abort: no such help topic: schemes | |
1407 | (try 'hg help --keyword schemes') |
|
1407 | (try 'hg help --keyword schemes') | |
1408 | [255] |
|
1408 | [255] | |
1409 | $ hg help -e schemes |head -1 |
|
1409 | $ hg help -e schemes |head -1 | |
1410 | schemes extension - extend schemes with shortcuts to repository swarms |
|
1410 | schemes extension - extend schemes with shortcuts to repository swarms | |
1411 | $ hg help -c -k dates |egrep '^(Topics|Extensions|Commands):' |
|
1411 | $ hg help -c -k dates |egrep '^(Topics|Extensions|Commands):' | |
1412 | Commands: |
|
1412 | Commands: | |
1413 | $ hg help -e -k a |egrep '^(Topics|Extensions|Commands):' |
|
1413 | $ hg help -e -k a |egrep '^(Topics|Extensions|Commands):' | |
1414 | Extensions: |
|
1414 | Extensions: | |
1415 | $ hg help -e -c -k date |egrep '^(Topics|Extensions|Commands):' |
|
1415 | $ hg help -e -c -k date |egrep '^(Topics|Extensions|Commands):' | |
1416 | Extensions: |
|
1416 | Extensions: | |
1417 | Commands: |
|
1417 | Commands: | |
1418 | $ hg help -c commit > /dev/null |
|
1418 | $ hg help -c commit > /dev/null | |
1419 | $ hg help -e -c commit > /dev/null |
|
1419 | $ hg help -e -c commit > /dev/null | |
1420 | $ hg help -e commit > /dev/null |
|
1420 | $ hg help -e commit > /dev/null | |
1421 | abort: no such help topic: commit |
|
1421 | abort: no such help topic: commit | |
1422 | (try 'hg help --keyword commit') |
|
1422 | (try 'hg help --keyword commit') | |
1423 | [255] |
|
1423 | [255] | |
1424 |
|
1424 | |||
1425 | Test keyword search help |
|
1425 | Test keyword search help | |
1426 |
|
1426 | |||
1427 | $ cat > prefixedname.py <<EOF |
|
1427 | $ cat > prefixedname.py <<EOF | |
1428 | > '''matched against word "clone" |
|
1428 | > '''matched against word "clone" | |
1429 | > ''' |
|
1429 | > ''' | |
1430 | > EOF |
|
1430 | > EOF | |
1431 | $ echo '[extensions]' >> $HGRCPATH |
|
1431 | $ echo '[extensions]' >> $HGRCPATH | |
1432 | $ echo "dot.dot.prefixedname = `pwd`/prefixedname.py" >> $HGRCPATH |
|
1432 | $ echo "dot.dot.prefixedname = `pwd`/prefixedname.py" >> $HGRCPATH | |
1433 | $ hg help -k clone |
|
1433 | $ hg help -k clone | |
1434 | Topics: |
|
1434 | Topics: | |
1435 |
|
1435 | |||
1436 | config Configuration Files |
|
1436 | config Configuration Files | |
1437 | extensions Using Additional Features |
|
1437 | extensions Using Additional Features | |
1438 | glossary Glossary |
|
1438 | glossary Glossary | |
1439 | phases Working with Phases |
|
1439 | phases Working with Phases | |
1440 | subrepos Subrepositories |
|
1440 | subrepos Subrepositories | |
1441 | urls URL Paths |
|
1441 | urls URL Paths | |
1442 |
|
1442 | |||
1443 | Commands: |
|
1443 | Commands: | |
1444 |
|
1444 | |||
1445 | bookmarks create a new bookmark or list existing bookmarks |
|
1445 | bookmarks create a new bookmark or list existing bookmarks | |
1446 | clone make a copy of an existing repository |
|
1446 | clone make a copy of an existing repository | |
1447 | paths show aliases for remote repositories |
|
1447 | paths show aliases for remote repositories | |
1448 | update update working directory (or switch revisions) |
|
1448 | update update working directory (or switch revisions) | |
1449 |
|
1449 | |||
1450 | Extensions: |
|
1450 | Extensions: | |
1451 |
|
1451 | |||
1452 | clonebundles advertise pre-generated bundles to seed clones |
|
1452 | clonebundles advertise pre-generated bundles to seed clones | |
1453 | prefixedname matched against word "clone" |
|
1453 | prefixedname matched against word "clone" | |
1454 | relink recreates hardlinks between repository clones |
|
1454 | relink recreates hardlinks between repository clones | |
1455 |
|
1455 | |||
1456 | Extension Commands: |
|
1456 | Extension Commands: | |
1457 |
|
1457 | |||
1458 | qclone clone main and patch repository at same time |
|
1458 | qclone clone main and patch repository at same time | |
1459 |
|
1459 | |||
1460 | Test unfound topic |
|
1460 | Test unfound topic | |
1461 |
|
1461 | |||
1462 | $ hg help nonexistingtopicthatwillneverexisteverever |
|
1462 | $ hg help nonexistingtopicthatwillneverexisteverever | |
1463 | abort: no such help topic: nonexistingtopicthatwillneverexisteverever |
|
1463 | abort: no such help topic: nonexistingtopicthatwillneverexisteverever | |
1464 | (try 'hg help --keyword nonexistingtopicthatwillneverexisteverever') |
|
1464 | (try 'hg help --keyword nonexistingtopicthatwillneverexisteverever') | |
1465 | [255] |
|
1465 | [255] | |
1466 |
|
1466 | |||
1467 | Test unfound keyword |
|
1467 | Test unfound keyword | |
1468 |
|
1468 | |||
1469 | $ hg help --keyword nonexistingwordthatwillneverexisteverever |
|
1469 | $ hg help --keyword nonexistingwordthatwillneverexisteverever | |
1470 | abort: no matches |
|
1470 | abort: no matches | |
1471 | (try 'hg help' for a list of topics) |
|
1471 | (try 'hg help' for a list of topics) | |
1472 | [255] |
|
1472 | [255] | |
1473 |
|
1473 | |||
1474 | Test omit indicating for help |
|
1474 | Test omit indicating for help | |
1475 |
|
1475 | |||
1476 | $ cat > addverboseitems.py <<EOF |
|
1476 | $ cat > addverboseitems.py <<EOF | |
1477 | > '''extension to test omit indicating. |
|
1477 | > '''extension to test omit indicating. | |
1478 | > |
|
1478 | > | |
1479 | > This paragraph is never omitted (for extension) |
|
1479 | > This paragraph is never omitted (for extension) | |
1480 | > |
|
1480 | > | |
1481 | > .. container:: verbose |
|
1481 | > .. container:: verbose | |
1482 | > |
|
1482 | > | |
1483 | > This paragraph is omitted, |
|
1483 | > This paragraph is omitted, | |
1484 | > if :hg:\`help\` is invoked without \`\`-v\`\` (for extension) |
|
1484 | > if :hg:\`help\` is invoked without \`\`-v\`\` (for extension) | |
1485 | > |
|
1485 | > | |
1486 | > This paragraph is never omitted, too (for extension) |
|
1486 | > This paragraph is never omitted, too (for extension) | |
1487 | > ''' |
|
1487 | > ''' | |
1488 | > |
|
1488 | > | |
1489 | > from mercurial import help, commands |
|
1489 | > from mercurial import help, commands | |
1490 | > testtopic = """This paragraph is never omitted (for topic). |
|
1490 | > testtopic = """This paragraph is never omitted (for topic). | |
1491 | > |
|
1491 | > | |
1492 | > .. container:: verbose |
|
1492 | > .. container:: verbose | |
1493 | > |
|
1493 | > | |
1494 | > This paragraph is omitted, |
|
1494 | > This paragraph is omitted, | |
1495 | > if :hg:\`help\` is invoked without \`\`-v\`\` (for topic) |
|
1495 | > if :hg:\`help\` is invoked without \`\`-v\`\` (for topic) | |
1496 | > |
|
1496 | > | |
1497 | > This paragraph is never omitted, too (for topic) |
|
1497 | > This paragraph is never omitted, too (for topic) | |
1498 | > """ |
|
1498 | > """ | |
1499 | > def extsetup(ui): |
|
1499 | > def extsetup(ui): | |
1500 | > help.helptable.append((["topic-containing-verbose"], |
|
1500 | > help.helptable.append((["topic-containing-verbose"], | |
1501 | > "This is the topic to test omit indicating.", |
|
1501 | > "This is the topic to test omit indicating.", | |
1502 | > lambda ui: testtopic)) |
|
1502 | > lambda ui: testtopic)) | |
1503 | > EOF |
|
1503 | > EOF | |
1504 | $ echo '[extensions]' >> $HGRCPATH |
|
1504 | $ echo '[extensions]' >> $HGRCPATH | |
1505 | $ echo "addverboseitems = `pwd`/addverboseitems.py" >> $HGRCPATH |
|
1505 | $ echo "addverboseitems = `pwd`/addverboseitems.py" >> $HGRCPATH | |
1506 | $ hg help addverboseitems |
|
1506 | $ hg help addverboseitems | |
1507 | addverboseitems extension - extension to test omit indicating. |
|
1507 | addverboseitems extension - extension to test omit indicating. | |
1508 |
|
1508 | |||
1509 | This paragraph is never omitted (for extension) |
|
1509 | This paragraph is never omitted (for extension) | |
1510 |
|
1510 | |||
1511 | This paragraph is never omitted, too (for extension) |
|
1511 | This paragraph is never omitted, too (for extension) | |
1512 |
|
1512 | |||
1513 | (some details hidden, use --verbose to show complete help) |
|
1513 | (some details hidden, use --verbose to show complete help) | |
1514 |
|
1514 | |||
1515 | no commands defined |
|
1515 | no commands defined | |
1516 | $ hg help -v addverboseitems |
|
1516 | $ hg help -v addverboseitems | |
1517 | addverboseitems extension - extension to test omit indicating. |
|
1517 | addverboseitems extension - extension to test omit indicating. | |
1518 |
|
1518 | |||
1519 | This paragraph is never omitted (for extension) |
|
1519 | This paragraph is never omitted (for extension) | |
1520 |
|
1520 | |||
1521 | This paragraph is omitted, if 'hg help' is invoked without "-v" (for |
|
1521 | This paragraph is omitted, if 'hg help' is invoked without "-v" (for | |
1522 | extension) |
|
1522 | extension) | |
1523 |
|
1523 | |||
1524 | This paragraph is never omitted, too (for extension) |
|
1524 | This paragraph is never omitted, too (for extension) | |
1525 |
|
1525 | |||
1526 | no commands defined |
|
1526 | no commands defined | |
1527 | $ hg help topic-containing-verbose |
|
1527 | $ hg help topic-containing-verbose | |
1528 | This is the topic to test omit indicating. |
|
1528 | This is the topic to test omit indicating. | |
1529 | """""""""""""""""""""""""""""""""""""""""" |
|
1529 | """""""""""""""""""""""""""""""""""""""""" | |
1530 |
|
1530 | |||
1531 | This paragraph is never omitted (for topic). |
|
1531 | This paragraph is never omitted (for topic). | |
1532 |
|
1532 | |||
1533 | This paragraph is never omitted, too (for topic) |
|
1533 | This paragraph is never omitted, too (for topic) | |
1534 |
|
1534 | |||
1535 | (some details hidden, use --verbose to show complete help) |
|
1535 | (some details hidden, use --verbose to show complete help) | |
1536 | $ hg help -v topic-containing-verbose |
|
1536 | $ hg help -v topic-containing-verbose | |
1537 | This is the topic to test omit indicating. |
|
1537 | This is the topic to test omit indicating. | |
1538 | """""""""""""""""""""""""""""""""""""""""" |
|
1538 | """""""""""""""""""""""""""""""""""""""""" | |
1539 |
|
1539 | |||
1540 | This paragraph is never omitted (for topic). |
|
1540 | This paragraph is never omitted (for topic). | |
1541 |
|
1541 | |||
1542 | This paragraph is omitted, if 'hg help' is invoked without "-v" (for |
|
1542 | This paragraph is omitted, if 'hg help' is invoked without "-v" (for | |
1543 | topic) |
|
1543 | topic) | |
1544 |
|
1544 | |||
1545 | This paragraph is never omitted, too (for topic) |
|
1545 | This paragraph is never omitted, too (for topic) | |
1546 |
|
1546 | |||
1547 | Test section lookup |
|
1547 | Test section lookup | |
1548 |
|
1548 | |||
1549 | $ hg help revset.merge |
|
1549 | $ hg help revset.merge | |
1550 | "merge()" |
|
1550 | "merge()" | |
1551 | Changeset is a merge changeset. |
|
1551 | Changeset is a merge changeset. | |
1552 |
|
1552 | |||
1553 | $ hg help glossary.dag |
|
1553 | $ hg help glossary.dag | |
1554 | DAG |
|
1554 | DAG | |
1555 | The repository of changesets of a distributed version control system |
|
1555 | The repository of changesets of a distributed version control system | |
1556 | (DVCS) can be described as a directed acyclic graph (DAG), consisting |
|
1556 | (DVCS) can be described as a directed acyclic graph (DAG), consisting | |
1557 | of nodes and edges, where nodes correspond to changesets and edges |
|
1557 | of nodes and edges, where nodes correspond to changesets and edges | |
1558 | imply a parent -> child relation. This graph can be visualized by |
|
1558 | imply a parent -> child relation. This graph can be visualized by | |
1559 | graphical tools such as 'hg log --graph'. In Mercurial, the DAG is |
|
1559 | graphical tools such as 'hg log --graph'. In Mercurial, the DAG is | |
1560 | limited by the requirement for children to have at most two parents. |
|
1560 | limited by the requirement for children to have at most two parents. | |
1561 |
|
1561 | |||
1562 |
|
1562 | |||
1563 | $ hg help hgrc.paths |
|
1563 | $ hg help hgrc.paths | |
1564 | "paths" |
|
1564 | "paths" | |
1565 | ------- |
|
1565 | ------- | |
1566 |
|
1566 | |||
1567 | Assigns symbolic names and behavior to repositories. |
|
1567 | Assigns symbolic names and behavior to repositories. | |
1568 |
|
1568 | |||
1569 | Options are symbolic names defining the URL or directory that is the |
|
1569 | Options are symbolic names defining the URL or directory that is the | |
1570 | location of the repository. Example: |
|
1570 | location of the repository. Example: | |
1571 |
|
1571 | |||
1572 | [paths] |
|
1572 | [paths] | |
1573 | my_server = https://example.com/my_repo |
|
1573 | my_server = https://example.com/my_repo | |
1574 | local_path = /home/me/repo |
|
1574 | local_path = /home/me/repo | |
1575 |
|
1575 | |||
1576 | These symbolic names can be used from the command line. To pull from |
|
1576 | These symbolic names can be used from the command line. To pull from | |
1577 | "my_server": 'hg pull my_server'. To push to "local_path": 'hg push |
|
1577 | "my_server": 'hg pull my_server'. To push to "local_path": 'hg push | |
1578 | local_path'. |
|
1578 | local_path'. | |
1579 |
|
1579 | |||
1580 | Options containing colons (":") denote sub-options that can influence |
|
1580 | Options containing colons (":") denote sub-options that can influence | |
1581 | behavior for that specific path. Example: |
|
1581 | behavior for that specific path. Example: | |
1582 |
|
1582 | |||
1583 | [paths] |
|
1583 | [paths] | |
1584 | my_server = https://example.com/my_path |
|
1584 | my_server = https://example.com/my_path | |
1585 | my_server:pushurl = ssh://example.com/my_path |
|
1585 | my_server:pushurl = ssh://example.com/my_path | |
1586 |
|
1586 | |||
1587 | The following sub-options can be defined: |
|
1587 | The following sub-options can be defined: | |
1588 |
|
1588 | |||
1589 | "pushurl" |
|
1589 | "pushurl" | |
1590 | The URL to use for push operations. If not defined, the location |
|
1590 | The URL to use for push operations. If not defined, the location | |
1591 | defined by the path's main entry is used. |
|
1591 | defined by the path's main entry is used. | |
1592 |
|
1592 | |||
1593 | "pushrev" |
|
1593 | "pushrev" | |
1594 | A revset defining which revisions to push by default. |
|
1594 | A revset defining which revisions to push by default. | |
1595 |
|
1595 | |||
1596 | When 'hg push' is executed without a "-r" argument, the revset defined |
|
1596 | When 'hg push' is executed without a "-r" argument, the revset defined | |
1597 | by this sub-option is evaluated to determine what to push. |
|
1597 | by this sub-option is evaluated to determine what to push. | |
1598 |
|
1598 | |||
1599 | For example, a value of "." will push the working directory's revision |
|
1599 | For example, a value of "." will push the working directory's revision | |
1600 | by default. |
|
1600 | by default. | |
1601 |
|
1601 | |||
1602 | Revsets specifying bookmarks will not result in the bookmark being |
|
1602 | Revsets specifying bookmarks will not result in the bookmark being | |
1603 | pushed. |
|
1603 | pushed. | |
1604 |
|
1604 | |||
1605 | The following special named paths exist: |
|
1605 | The following special named paths exist: | |
1606 |
|
1606 | |||
1607 | "default" |
|
1607 | "default" | |
1608 | The URL or directory to use when no source or remote is specified. |
|
1608 | The URL or directory to use when no source or remote is specified. | |
1609 |
|
1609 | |||
1610 | 'hg clone' will automatically define this path to the location the |
|
1610 | 'hg clone' will automatically define this path to the location the | |
1611 | repository was cloned from. |
|
1611 | repository was cloned from. | |
1612 |
|
1612 | |||
1613 | "default-push" |
|
1613 | "default-push" | |
1614 | (deprecated) The URL or directory for the default 'hg push' location. |
|
1614 | (deprecated) The URL or directory for the default 'hg push' location. | |
1615 | "default:pushurl" should be used instead. |
|
1615 | "default:pushurl" should be used instead. | |
1616 |
|
1616 | |||
1617 | $ hg help glossary.mcguffin |
|
1617 | $ hg help glossary.mcguffin | |
1618 | abort: help section not found: glossary.mcguffin |
|
1618 | abort: help section not found: glossary.mcguffin | |
1619 | [255] |
|
1619 | [255] | |
1620 |
|
1620 | |||
1621 | $ hg help glossary.mc.guffin |
|
1621 | $ hg help glossary.mc.guffin | |
1622 | abort: help section not found: glossary.mc.guffin |
|
1622 | abort: help section not found: glossary.mc.guffin | |
1623 | [255] |
|
1623 | [255] | |
1624 |
|
1624 | |||
1625 | $ hg help template.files |
|
1625 | $ hg help template.files | |
1626 | files List of strings. All files modified, added, or removed by |
|
1626 | files List of strings. All files modified, added, or removed by | |
1627 | this changeset. |
|
1627 | this changeset. | |
1628 | files(pattern) |
|
1628 | files(pattern) | |
1629 | All files of the current changeset matching the pattern. See |
|
1629 | All files of the current changeset matching the pattern. See | |
1630 | 'hg help patterns'. |
|
1630 | 'hg help patterns'. | |
1631 |
|
1631 | |||
1632 | Test section lookup by translated message |
|
1632 | Test section lookup by translated message | |
1633 |
|
1633 | |||
1634 | str.lower() instead of encoding.lower(str) on translated message might |
|
1634 | str.lower() instead of encoding.lower(str) on translated message might | |
1635 | make message meaningless, because some encoding uses 0x41(A) - 0x5a(Z) |
|
1635 | make message meaningless, because some encoding uses 0x41(A) - 0x5a(Z) | |
1636 | as the second or later byte of multi-byte character. |
|
1636 | as the second or later byte of multi-byte character. | |
1637 |
|
1637 | |||
1638 | For example, "\x8bL\x98^" (translation of "record" in ja_JP.cp932) |
|
1638 | For example, "\x8bL\x98^" (translation of "record" in ja_JP.cp932) | |
1639 | contains 0x4c (L). str.lower() replaces 0x4c(L) by 0x6c(l) and this |
|
1639 | contains 0x4c (L). str.lower() replaces 0x4c(L) by 0x6c(l) and this | |
1640 | replacement makes message meaningless. |
|
1640 | replacement makes message meaningless. | |
1641 |
|
1641 | |||
1642 | This tests that section lookup by translated string isn't broken by |
|
1642 | This tests that section lookup by translated string isn't broken by | |
1643 | such str.lower(). |
|
1643 | such str.lower(). | |
1644 |
|
1644 | |||
1645 | $ python <<EOF |
|
1645 | $ python <<EOF | |
1646 | > def escape(s): |
|
1646 | > def escape(s): | |
1647 | > return ''.join('\u%x' % ord(uc) for uc in s.decode('cp932')) |
|
1647 | > return ''.join('\u%x' % ord(uc) for uc in s.decode('cp932')) | |
1648 | > # translation of "record" in ja_JP.cp932 |
|
1648 | > # translation of "record" in ja_JP.cp932 | |
1649 | > upper = "\x8bL\x98^" |
|
1649 | > upper = "\x8bL\x98^" | |
1650 | > # str.lower()-ed section name should be treated as different one |
|
1650 | > # str.lower()-ed section name should be treated as different one | |
1651 | > lower = "\x8bl\x98^" |
|
1651 | > lower = "\x8bl\x98^" | |
1652 | > with open('ambiguous.py', 'w') as fp: |
|
1652 | > with open('ambiguous.py', 'w') as fp: | |
1653 | > fp.write("""# ambiguous section names in ja_JP.cp932 |
|
1653 | > fp.write("""# ambiguous section names in ja_JP.cp932 | |
1654 | > u'''summary of extension |
|
1654 | > u'''summary of extension | |
1655 | > |
|
1655 | > | |
1656 | > %s |
|
1656 | > %s | |
1657 | > ---- |
|
1657 | > ---- | |
1658 | > |
|
1658 | > | |
1659 | > Upper name should show only this message |
|
1659 | > Upper name should show only this message | |
1660 | > |
|
1660 | > | |
1661 | > %s |
|
1661 | > %s | |
1662 | > ---- |
|
1662 | > ---- | |
1663 | > |
|
1663 | > | |
1664 | > Lower name should show only this message |
|
1664 | > Lower name should show only this message | |
1665 | > |
|
1665 | > | |
1666 | > subsequent section |
|
1666 | > subsequent section | |
1667 | > ------------------ |
|
1667 | > ------------------ | |
1668 | > |
|
1668 | > | |
1669 | > This should be hidden at 'hg help ambiguous' with section name. |
|
1669 | > This should be hidden at 'hg help ambiguous' with section name. | |
1670 | > ''' |
|
1670 | > ''' | |
1671 | > """ % (escape(upper), escape(lower))) |
|
1671 | > """ % (escape(upper), escape(lower))) | |
1672 | > EOF |
|
1672 | > EOF | |
1673 |
|
1673 | |||
1674 | $ cat >> $HGRCPATH <<EOF |
|
1674 | $ cat >> $HGRCPATH <<EOF | |
1675 | > [extensions] |
|
1675 | > [extensions] | |
1676 | > ambiguous = ./ambiguous.py |
|
1676 | > ambiguous = ./ambiguous.py | |
1677 | > EOF |
|
1677 | > EOF | |
1678 |
|
1678 | |||
1679 | $ python <<EOF | sh |
|
1679 | $ python <<EOF | sh | |
1680 | > upper = "\x8bL\x98^" |
|
1680 | > upper = "\x8bL\x98^" | |
1681 | > print "hg --encoding cp932 help -e ambiguous.%s" % upper |
|
1681 | > print "hg --encoding cp932 help -e ambiguous.%s" % upper | |
1682 | > EOF |
|
1682 | > EOF | |
1683 | \x8bL\x98^ (esc) |
|
1683 | \x8bL\x98^ (esc) | |
1684 | ---- |
|
1684 | ---- | |
1685 |
|
1685 | |||
1686 | Upper name should show only this message |
|
1686 | Upper name should show only this message | |
1687 |
|
1687 | |||
1688 |
|
1688 | |||
1689 | $ python <<EOF | sh |
|
1689 | $ python <<EOF | sh | |
1690 | > lower = "\x8bl\x98^" |
|
1690 | > lower = "\x8bl\x98^" | |
1691 | > print "hg --encoding cp932 help -e ambiguous.%s" % lower |
|
1691 | > print "hg --encoding cp932 help -e ambiguous.%s" % lower | |
1692 | > EOF |
|
1692 | > EOF | |
1693 | \x8bl\x98^ (esc) |
|
1693 | \x8bl\x98^ (esc) | |
1694 | ---- |
|
1694 | ---- | |
1695 |
|
1695 | |||
1696 | Lower name should show only this message |
|
1696 | Lower name should show only this message | |
1697 |
|
1697 | |||
1698 |
|
1698 | |||
1699 | $ cat >> $HGRCPATH <<EOF |
|
1699 | $ cat >> $HGRCPATH <<EOF | |
1700 | > [extensions] |
|
1700 | > [extensions] | |
1701 | > ambiguous = ! |
|
1701 | > ambiguous = ! | |
1702 | > EOF |
|
1702 | > EOF | |
1703 |
|
1703 | |||
1704 | Show help content of disabled extensions |
|
1704 | Show help content of disabled extensions | |
1705 |
|
1705 | |||
1706 | $ cat >> $HGRCPATH <<EOF |
|
1706 | $ cat >> $HGRCPATH <<EOF | |
1707 | > [extensions] |
|
1707 | > [extensions] | |
1708 | > ambiguous = !./ambiguous.py |
|
1708 | > ambiguous = !./ambiguous.py | |
1709 | > EOF |
|
1709 | > EOF | |
1710 | $ hg help -e ambiguous |
|
1710 | $ hg help -e ambiguous | |
1711 | ambiguous extension - (no help text available) |
|
1711 | ambiguous extension - (no help text available) | |
1712 |
|
1712 | |||
1713 | (use 'hg help extensions' for information on enabling extensions) |
|
1713 | (use 'hg help extensions' for information on enabling extensions) | |
1714 |
|
1714 | |||
1715 | Test dynamic list of merge tools only shows up once |
|
1715 | Test dynamic list of merge tools only shows up once | |
1716 | $ hg help merge-tools |
|
1716 | $ hg help merge-tools | |
1717 | Merge Tools |
|
1717 | Merge Tools | |
1718 | """"""""""" |
|
1718 | """"""""""" | |
1719 |
|
1719 | |||
1720 | To merge files Mercurial uses merge tools. |
|
1720 | To merge files Mercurial uses merge tools. | |
1721 |
|
1721 | |||
1722 | A merge tool combines two different versions of a file into a merged file. |
|
1722 | A merge tool combines two different versions of a file into a merged file. | |
1723 | Merge tools are given the two files and the greatest common ancestor of |
|
1723 | Merge tools are given the two files and the greatest common ancestor of | |
1724 | the two file versions, so they can determine the changes made on both |
|
1724 | the two file versions, so they can determine the changes made on both | |
1725 | branches. |
|
1725 | branches. | |
1726 |
|
1726 | |||
1727 | Merge tools are used both for 'hg resolve', 'hg merge', 'hg update', 'hg |
|
1727 | Merge tools are used both for 'hg resolve', 'hg merge', 'hg update', 'hg | |
1728 | backout' and in several extensions. |
|
1728 | backout' and in several extensions. | |
1729 |
|
1729 | |||
1730 | Usually, the merge tool tries to automatically reconcile the files by |
|
1730 | Usually, the merge tool tries to automatically reconcile the files by | |
1731 | combining all non-overlapping changes that occurred separately in the two |
|
1731 | combining all non-overlapping changes that occurred separately in the two | |
1732 | different evolutions of the same initial base file. Furthermore, some |
|
1732 | different evolutions of the same initial base file. Furthermore, some | |
1733 | interactive merge programs make it easier to manually resolve conflicting |
|
1733 | interactive merge programs make it easier to manually resolve conflicting | |
1734 | merges, either in a graphical way, or by inserting some conflict markers. |
|
1734 | merges, either in a graphical way, or by inserting some conflict markers. | |
1735 | Mercurial does not include any interactive merge programs but relies on |
|
1735 | Mercurial does not include any interactive merge programs but relies on | |
1736 | external tools for that. |
|
1736 | external tools for that. | |
1737 |
|
1737 | |||
1738 | Available merge tools |
|
1738 | Available merge tools | |
1739 | ===================== |
|
1739 | ===================== | |
1740 |
|
1740 | |||
1741 | External merge tools and their properties are configured in the merge- |
|
1741 | External merge tools and their properties are configured in the merge- | |
1742 | tools configuration section - see hgrc(5) - but they can often just be |
|
1742 | tools configuration section - see hgrc(5) - but they can often just be | |
1743 | named by their executable. |
|
1743 | named by their executable. | |
1744 |
|
1744 | |||
1745 | A merge tool is generally usable if its executable can be found on the |
|
1745 | A merge tool is generally usable if its executable can be found on the | |
1746 | system and if it can handle the merge. The executable is found if it is an |
|
1746 | system and if it can handle the merge. The executable is found if it is an | |
1747 | absolute or relative executable path or the name of an application in the |
|
1747 | absolute or relative executable path or the name of an application in the | |
1748 | executable search path. The tool is assumed to be able to handle the merge |
|
1748 | executable search path. The tool is assumed to be able to handle the merge | |
1749 | if it can handle symlinks if the file is a symlink, if it can handle |
|
1749 | if it can handle symlinks if the file is a symlink, if it can handle | |
1750 | binary files if the file is binary, and if a GUI is available if the tool |
|
1750 | binary files if the file is binary, and if a GUI is available if the tool | |
1751 | requires a GUI. |
|
1751 | requires a GUI. | |
1752 |
|
1752 | |||
1753 | There are some internal merge tools which can be used. The internal merge |
|
1753 | There are some internal merge tools which can be used. The internal merge | |
1754 | tools are: |
|
1754 | tools are: | |
1755 |
|
1755 | |||
1756 | ":dump" |
|
1756 | ":dump" | |
1757 | Creates three versions of the files to merge, containing the contents of |
|
1757 | Creates three versions of the files to merge, containing the contents of | |
1758 | local, other and base. These files can then be used to perform a merge |
|
1758 | local, other and base. These files can then be used to perform a merge | |
1759 | manually. If the file to be merged is named "a.txt", these files will |
|
1759 | manually. If the file to be merged is named "a.txt", these files will | |
1760 | accordingly be named "a.txt.local", "a.txt.other" and "a.txt.base" and |
|
1760 | accordingly be named "a.txt.local", "a.txt.other" and "a.txt.base" and | |
1761 | they will be placed in the same directory as "a.txt". |
|
1761 | they will be placed in the same directory as "a.txt". | |
1762 |
|
1762 | |||
1763 | ":fail" |
|
1763 | ":fail" | |
1764 | Rather than attempting to merge files that were modified on both |
|
1764 | Rather than attempting to merge files that were modified on both | |
1765 | branches, it marks them as unresolved. The resolve command must be used |
|
1765 | branches, it marks them as unresolved. The resolve command must be used | |
1766 | to resolve these conflicts. |
|
1766 | to resolve these conflicts. | |
1767 |
|
1767 | |||
1768 | ":local" |
|
1768 | ":local" | |
1769 | Uses the local 'p1()' version of files as the merged version. |
|
1769 | Uses the local 'p1()' version of files as the merged version. | |
1770 |
|
1770 | |||
1771 | ":merge" |
|
1771 | ":merge" | |
1772 | Uses the internal non-interactive simple merge algorithm for merging |
|
1772 | Uses the internal non-interactive simple merge algorithm for merging | |
1773 | files. It will fail if there are any conflicts and leave markers in the |
|
1773 | files. It will fail if there are any conflicts and leave markers in the | |
1774 | partially merged file. Markers will have two sections, one for each side |
|
1774 | partially merged file. Markers will have two sections, one for each side | |
1775 | of merge. |
|
1775 | of merge. | |
1776 |
|
1776 | |||
1777 | ":merge-local" |
|
1777 | ":merge-local" | |
1778 | Like :merge, but resolve all conflicts non-interactively in favor of the |
|
1778 | Like :merge, but resolve all conflicts non-interactively in favor of the | |
1779 | local 'p1()' changes. |
|
1779 | local 'p1()' changes. | |
1780 |
|
1780 | |||
1781 | ":merge-other" |
|
1781 | ":merge-other" | |
1782 | Like :merge, but resolve all conflicts non-interactively in favor of the |
|
1782 | Like :merge, but resolve all conflicts non-interactively in favor of the | |
1783 | other 'p2()' changes. |
|
1783 | other 'p2()' changes. | |
1784 |
|
1784 | |||
1785 | ":merge3" |
|
1785 | ":merge3" | |
1786 | Uses the internal non-interactive simple merge algorithm for merging |
|
1786 | Uses the internal non-interactive simple merge algorithm for merging | |
1787 | files. It will fail if there are any conflicts and leave markers in the |
|
1787 | files. It will fail if there are any conflicts and leave markers in the | |
1788 | partially merged file. Marker will have three sections, one from each |
|
1788 | partially merged file. Marker will have three sections, one from each | |
1789 | side of the merge and one for the base content. |
|
1789 | side of the merge and one for the base content. | |
1790 |
|
1790 | |||
1791 | ":other" |
|
1791 | ":other" | |
1792 | Uses the other 'p2()' version of files as the merged version. |
|
1792 | Uses the other 'p2()' version of files as the merged version. | |
1793 |
|
1793 | |||
1794 | ":prompt" |
|
1794 | ":prompt" | |
1795 | Asks the user which of the local 'p1()' or the other 'p2()' version to |
|
1795 | Asks the user which of the local 'p1()' or the other 'p2()' version to | |
1796 | keep as the merged version. |
|
1796 | keep as the merged version. | |
1797 |
|
1797 | |||
1798 | ":tagmerge" |
|
1798 | ":tagmerge" | |
1799 | Uses the internal tag merge algorithm (experimental). |
|
1799 | Uses the internal tag merge algorithm (experimental). | |
1800 |
|
1800 | |||
1801 | ":union" |
|
1801 | ":union" | |
1802 | Uses the internal non-interactive simple merge algorithm for merging |
|
1802 | Uses the internal non-interactive simple merge algorithm for merging | |
1803 | files. It will use both left and right sides for conflict regions. No |
|
1803 | files. It will use both left and right sides for conflict regions. No | |
1804 | markers are inserted. |
|
1804 | markers are inserted. | |
1805 |
|
1805 | |||
1806 | Internal tools are always available and do not require a GUI but will by |
|
1806 | Internal tools are always available and do not require a GUI but will by | |
1807 | default not handle symlinks or binary files. |
|
1807 | default not handle symlinks or binary files. | |
1808 |
|
1808 | |||
1809 | Choosing a merge tool |
|
1809 | Choosing a merge tool | |
1810 | ===================== |
|
1810 | ===================== | |
1811 |
|
1811 | |||
1812 | Mercurial uses these rules when deciding which merge tool to use: |
|
1812 | Mercurial uses these rules when deciding which merge tool to use: | |
1813 |
|
1813 | |||
1814 | 1. If a tool has been specified with the --tool option to merge or |
|
1814 | 1. If a tool has been specified with the --tool option to merge or | |
1815 | resolve, it is used. If it is the name of a tool in the merge-tools |
|
1815 | resolve, it is used. If it is the name of a tool in the merge-tools | |
1816 | configuration, its configuration is used. Otherwise the specified tool |
|
1816 | configuration, its configuration is used. Otherwise the specified tool | |
1817 | must be executable by the shell. |
|
1817 | must be executable by the shell. | |
1818 | 2. If the "HGMERGE" environment variable is present, its value is used and |
|
1818 | 2. If the "HGMERGE" environment variable is present, its value is used and | |
1819 | must be executable by the shell. |
|
1819 | must be executable by the shell. | |
1820 | 3. If the filename of the file to be merged matches any of the patterns in |
|
1820 | 3. If the filename of the file to be merged matches any of the patterns in | |
1821 | the merge-patterns configuration section, the first usable merge tool |
|
1821 | the merge-patterns configuration section, the first usable merge tool | |
1822 | corresponding to a matching pattern is used. Here, binary capabilities |
|
1822 | corresponding to a matching pattern is used. Here, binary capabilities | |
1823 | of the merge tool are not considered. |
|
1823 | of the merge tool are not considered. | |
1824 | 4. If ui.merge is set it will be considered next. If the value is not the |
|
1824 | 4. If ui.merge is set it will be considered next. If the value is not the | |
1825 | name of a configured tool, the specified value is used and must be |
|
1825 | name of a configured tool, the specified value is used and must be | |
1826 | executable by the shell. Otherwise the named tool is used if it is |
|
1826 | executable by the shell. Otherwise the named tool is used if it is | |
1827 | usable. |
|
1827 | usable. | |
1828 | 5. If any usable merge tools are present in the merge-tools configuration |
|
1828 | 5. If any usable merge tools are present in the merge-tools configuration | |
1829 | section, the one with the highest priority is used. |
|
1829 | section, the one with the highest priority is used. | |
1830 | 6. If a program named "hgmerge" can be found on the system, it is used - |
|
1830 | 6. If a program named "hgmerge" can be found on the system, it is used - | |
1831 | but it will by default not be used for symlinks and binary files. |
|
1831 | but it will by default not be used for symlinks and binary files. | |
1832 | 7. If the file to be merged is not binary and is not a symlink, then |
|
1832 | 7. If the file to be merged is not binary and is not a symlink, then | |
1833 | internal ":merge" is used. |
|
1833 | internal ":merge" is used. | |
1834 | 8. The merge of the file fails and must be resolved before commit. |
|
1834 | 8. The merge of the file fails and must be resolved before commit. | |
1835 |
|
1835 | |||
1836 | Note: |
|
1836 | Note: | |
1837 | After selecting a merge program, Mercurial will by default attempt to |
|
1837 | After selecting a merge program, Mercurial will by default attempt to | |
1838 | merge the files using a simple merge algorithm first. Only if it |
|
1838 | merge the files using a simple merge algorithm first. Only if it | |
1839 | doesn't succeed because of conflicting changes Mercurial will actually |
|
1839 | doesn't succeed because of conflicting changes Mercurial will actually | |
1840 | execute the merge program. Whether to use the simple merge algorithm |
|
1840 | execute the merge program. Whether to use the simple merge algorithm | |
1841 | first can be controlled by the premerge setting of the merge tool. |
|
1841 | first can be controlled by the premerge setting of the merge tool. | |
1842 | Premerge is enabled by default unless the file is binary or a symlink. |
|
1842 | Premerge is enabled by default unless the file is binary or a symlink. | |
1843 |
|
1843 | |||
1844 | See the merge-tools and ui sections of hgrc(5) for details on the |
|
1844 | See the merge-tools and ui sections of hgrc(5) for details on the | |
1845 | configuration of merge tools. |
|
1845 | configuration of merge tools. | |
1846 |
|
1846 | |||
1847 | Compression engines listed in `hg help bundlespec` |
|
1847 | Compression engines listed in `hg help bundlespec` | |
1848 |
|
1848 | |||
1849 | $ hg help bundlespec | grep gzip |
|
1849 | $ hg help bundlespec | grep gzip | |
1850 | "v1" bundles can only use the "gzip", "bzip2", and "none" compression |
|
1850 | "v1" bundles can only use the "gzip", "bzip2", and "none" compression | |
1851 | An algorithm that produces smaller bundles than "gzip". |
|
1851 | An algorithm that produces smaller bundles than "gzip". | |
1852 | This engine will likely produce smaller bundles than "gzip" but will be |
|
1852 | This engine will likely produce smaller bundles than "gzip" but will be | |
1853 | "gzip" |
|
1853 | "gzip" | |
1854 | better compression than "gzip". It also frequently yields better (?) |
|
1854 | better compression than "gzip". It also frequently yields better (?) | |
1855 |
|
1855 | |||
1856 | Test usage of section marks in help documents |
|
1856 | Test usage of section marks in help documents | |
1857 |
|
1857 | |||
1858 | $ cd "$TESTDIR"/../doc |
|
1858 | $ cd "$TESTDIR"/../doc | |
1859 | $ python check-seclevel.py |
|
1859 | $ python check-seclevel.py | |
1860 | $ cd $TESTTMP |
|
1860 | $ cd $TESTTMP | |
1861 |
|
1861 | |||
1862 | #if serve |
|
1862 | #if serve | |
1863 |
|
1863 | |||
1864 | Test the help pages in hgweb. |
|
1864 | Test the help pages in hgweb. | |
1865 |
|
1865 | |||
1866 | Dish up an empty repo; serve it cold. |
|
1866 | Dish up an empty repo; serve it cold. | |
1867 |
|
1867 | |||
1868 | $ hg init "$TESTTMP/test" |
|
1868 | $ hg init "$TESTTMP/test" | |
1869 | $ hg serve -R "$TESTTMP/test" -n test -p $HGPORT -d --pid-file=hg.pid |
|
1869 | $ hg serve -R "$TESTTMP/test" -n test -p $HGPORT -d --pid-file=hg.pid | |
1870 | $ cat hg.pid >> $DAEMON_PIDS |
|
1870 | $ cat hg.pid >> $DAEMON_PIDS | |
1871 |
|
1871 | |||
1872 | $ get-with-headers.py $LOCALIP:$HGPORT "help" |
|
1872 | $ get-with-headers.py $LOCALIP:$HGPORT "help" | |
1873 | 200 Script output follows |
|
1873 | 200 Script output follows | |
1874 |
|
1874 | |||
1875 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> |
|
1875 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> | |
1876 | <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US"> |
|
1876 | <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US"> | |
1877 | <head> |
|
1877 | <head> | |
1878 | <link rel="icon" href="/static/hgicon.png" type="image/png" /> |
|
1878 | <link rel="icon" href="/static/hgicon.png" type="image/png" /> | |
1879 | <meta name="robots" content="index, nofollow" /> |
|
1879 | <meta name="robots" content="index, nofollow" /> | |
1880 | <link rel="stylesheet" href="/static/style-paper.css" type="text/css" /> |
|
1880 | <link rel="stylesheet" href="/static/style-paper.css" type="text/css" /> | |
1881 | <script type="text/javascript" src="/static/mercurial.js"></script> |
|
1881 | <script type="text/javascript" src="/static/mercurial.js"></script> | |
1882 |
|
1882 | |||
1883 | <title>Help: Index</title> |
|
1883 | <title>Help: Index</title> | |
1884 | </head> |
|
1884 | </head> | |
1885 | <body> |
|
1885 | <body> | |
1886 |
|
1886 | |||
1887 | <div class="container"> |
|
1887 | <div class="container"> | |
1888 | <div class="menu"> |
|
1888 | <div class="menu"> | |
1889 | <div class="logo"> |
|
1889 | <div class="logo"> | |
1890 | <a href="https://mercurial-scm.org/"> |
|
1890 | <a href="https://mercurial-scm.org/"> | |
1891 | <img src="/static/hglogo.png" alt="mercurial" /></a> |
|
1891 | <img src="/static/hglogo.png" alt="mercurial" /></a> | |
1892 | </div> |
|
1892 | </div> | |
1893 | <ul> |
|
1893 | <ul> | |
1894 | <li><a href="/shortlog">log</a></li> |
|
1894 | <li><a href="/shortlog">log</a></li> | |
1895 | <li><a href="/graph">graph</a></li> |
|
1895 | <li><a href="/graph">graph</a></li> | |
1896 | <li><a href="/tags">tags</a></li> |
|
1896 | <li><a href="/tags">tags</a></li> | |
1897 | <li><a href="/bookmarks">bookmarks</a></li> |
|
1897 | <li><a href="/bookmarks">bookmarks</a></li> | |
1898 | <li><a href="/branches">branches</a></li> |
|
1898 | <li><a href="/branches">branches</a></li> | |
1899 | </ul> |
|
1899 | </ul> | |
1900 | <ul> |
|
1900 | <ul> | |
1901 | <li class="active">help</li> |
|
1901 | <li class="active">help</li> | |
1902 | </ul> |
|
1902 | </ul> | |
1903 | </div> |
|
1903 | </div> | |
1904 |
|
1904 | |||
1905 | <div class="main"> |
|
1905 | <div class="main"> | |
1906 | <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2> |
|
1906 | <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2> | |
1907 | <form class="search" action="/log"> |
|
1907 | <form class="search" action="/log"> | |
1908 |
|
1908 | |||
1909 | <p><input name="rev" id="search1" type="text" size="30" /></p> |
|
1909 | <p><input name="rev" id="search1" type="text" size="30" /></p> | |
1910 | <div id="hint">Find changesets by keywords (author, files, the commit message), revision |
|
1910 | <div id="hint">Find changesets by keywords (author, files, the commit message), revision | |
1911 | number or hash, or <a href="/help/revsets">revset expression</a>.</div> |
|
1911 | number or hash, or <a href="/help/revsets">revset expression</a>.</div> | |
1912 | </form> |
|
1912 | </form> | |
1913 | <table class="bigtable"> |
|
1913 | <table class="bigtable"> | |
1914 | <tr><td colspan="2"><h2><a name="topics" href="#topics">Topics</a></h2></td></tr> |
|
1914 | <tr><td colspan="2"><h2><a name="topics" href="#topics">Topics</a></h2></td></tr> | |
1915 |
|
1915 | |||
1916 | <tr><td> |
|
1916 | <tr><td> | |
1917 | <a href="/help/bundlespec"> |
|
1917 | <a href="/help/bundlespec"> | |
1918 | bundlespec |
|
1918 | bundlespec | |
1919 | </a> |
|
1919 | </a> | |
1920 | </td><td> |
|
1920 | </td><td> | |
1921 | Bundle File Formats |
|
1921 | Bundle File Formats | |
1922 | </td></tr> |
|
1922 | </td></tr> | |
1923 | <tr><td> |
|
1923 | <tr><td> | |
1924 | <a href="/help/color"> |
|
1924 | <a href="/help/color"> | |
1925 | color |
|
1925 | color | |
1926 | </a> |
|
1926 | </a> | |
1927 | </td><td> |
|
1927 | </td><td> | |
1928 | Colorizing Outputs |
|
1928 | Colorizing Outputs | |
1929 | </td></tr> |
|
1929 | </td></tr> | |
1930 | <tr><td> |
|
1930 | <tr><td> | |
1931 | <a href="/help/config"> |
|
1931 | <a href="/help/config"> | |
1932 | config |
|
1932 | config | |
1933 | </a> |
|
1933 | </a> | |
1934 | </td><td> |
|
1934 | </td><td> | |
1935 | Configuration Files |
|
1935 | Configuration Files | |
1936 | </td></tr> |
|
1936 | </td></tr> | |
1937 | <tr><td> |
|
1937 | <tr><td> | |
1938 | <a href="/help/dates"> |
|
1938 | <a href="/help/dates"> | |
1939 | dates |
|
1939 | dates | |
1940 | </a> |
|
1940 | </a> | |
1941 | </td><td> |
|
1941 | </td><td> | |
1942 | Date Formats |
|
1942 | Date Formats | |
1943 | </td></tr> |
|
1943 | </td></tr> | |
1944 | <tr><td> |
|
1944 | <tr><td> | |
1945 | <a href="/help/diffs"> |
|
1945 | <a href="/help/diffs"> | |
1946 | diffs |
|
1946 | diffs | |
1947 | </a> |
|
1947 | </a> | |
1948 | </td><td> |
|
1948 | </td><td> | |
1949 | Diff Formats |
|
1949 | Diff Formats | |
1950 | </td></tr> |
|
1950 | </td></tr> | |
1951 | <tr><td> |
|
1951 | <tr><td> | |
1952 | <a href="/help/environment"> |
|
1952 | <a href="/help/environment"> | |
1953 | environment |
|
1953 | environment | |
1954 | </a> |
|
1954 | </a> | |
1955 | </td><td> |
|
1955 | </td><td> | |
1956 | Environment Variables |
|
1956 | Environment Variables | |
1957 | </td></tr> |
|
1957 | </td></tr> | |
1958 | <tr><td> |
|
1958 | <tr><td> | |
1959 | <a href="/help/extensions"> |
|
1959 | <a href="/help/extensions"> | |
1960 | extensions |
|
1960 | extensions | |
1961 | </a> |
|
1961 | </a> | |
1962 | </td><td> |
|
1962 | </td><td> | |
1963 | Using Additional Features |
|
1963 | Using Additional Features | |
1964 | </td></tr> |
|
1964 | </td></tr> | |
1965 | <tr><td> |
|
1965 | <tr><td> | |
1966 | <a href="/help/filesets"> |
|
1966 | <a href="/help/filesets"> | |
1967 | filesets |
|
1967 | filesets | |
1968 | </a> |
|
1968 | </a> | |
1969 | </td><td> |
|
1969 | </td><td> | |
1970 | Specifying File Sets |
|
1970 | Specifying File Sets | |
1971 | </td></tr> |
|
1971 | </td></tr> | |
1972 | <tr><td> |
|
1972 | <tr><td> | |
1973 | <a href="/help/glossary"> |
|
1973 | <a href="/help/glossary"> | |
1974 | glossary |
|
1974 | glossary | |
1975 | </a> |
|
1975 | </a> | |
1976 | </td><td> |
|
1976 | </td><td> | |
1977 | Glossary |
|
1977 | Glossary | |
1978 | </td></tr> |
|
1978 | </td></tr> | |
1979 | <tr><td> |
|
1979 | <tr><td> | |
1980 | <a href="/help/hgignore"> |
|
1980 | <a href="/help/hgignore"> | |
1981 | hgignore |
|
1981 | hgignore | |
1982 | </a> |
|
1982 | </a> | |
1983 | </td><td> |
|
1983 | </td><td> | |
1984 | Syntax for Mercurial Ignore Files |
|
1984 | Syntax for Mercurial Ignore Files | |
1985 | </td></tr> |
|
1985 | </td></tr> | |
1986 | <tr><td> |
|
1986 | <tr><td> | |
1987 | <a href="/help/hgweb"> |
|
1987 | <a href="/help/hgweb"> | |
1988 | hgweb |
|
1988 | hgweb | |
1989 | </a> |
|
1989 | </a> | |
1990 | </td><td> |
|
1990 | </td><td> | |
1991 | Configuring hgweb |
|
1991 | Configuring hgweb | |
1992 | </td></tr> |
|
1992 | </td></tr> | |
1993 | <tr><td> |
|
1993 | <tr><td> | |
1994 | <a href="/help/internals"> |
|
1994 | <a href="/help/internals"> | |
1995 | internals |
|
1995 | internals | |
1996 | </a> |
|
1996 | </a> | |
1997 | </td><td> |
|
1997 | </td><td> | |
1998 | Technical implementation topics |
|
1998 | Technical implementation topics | |
1999 | </td></tr> |
|
1999 | </td></tr> | |
2000 | <tr><td> |
|
2000 | <tr><td> | |
2001 | <a href="/help/merge-tools"> |
|
2001 | <a href="/help/merge-tools"> | |
2002 | merge-tools |
|
2002 | merge-tools | |
2003 | </a> |
|
2003 | </a> | |
2004 | </td><td> |
|
2004 | </td><td> | |
2005 | Merge Tools |
|
2005 | Merge Tools | |
2006 | </td></tr> |
|
2006 | </td></tr> | |
2007 | <tr><td> |
|
2007 | <tr><td> | |
2008 | <a href="/help/pager"> |
|
2008 | <a href="/help/pager"> | |
2009 | pager |
|
2009 | pager | |
2010 | </a> |
|
2010 | </a> | |
2011 | </td><td> |
|
2011 | </td><td> | |
2012 | Pager Support |
|
2012 | Pager Support | |
2013 | </td></tr> |
|
2013 | </td></tr> | |
2014 | <tr><td> |
|
2014 | <tr><td> | |
2015 | <a href="/help/patterns"> |
|
2015 | <a href="/help/patterns"> | |
2016 | patterns |
|
2016 | patterns | |
2017 | </a> |
|
2017 | </a> | |
2018 | </td><td> |
|
2018 | </td><td> | |
2019 | File Name Patterns |
|
2019 | File Name Patterns | |
2020 | </td></tr> |
|
2020 | </td></tr> | |
2021 | <tr><td> |
|
2021 | <tr><td> | |
2022 | <a href="/help/phases"> |
|
2022 | <a href="/help/phases"> | |
2023 | phases |
|
2023 | phases | |
2024 | </a> |
|
2024 | </a> | |
2025 | </td><td> |
|
2025 | </td><td> | |
2026 | Working with Phases |
|
2026 | Working with Phases | |
2027 | </td></tr> |
|
2027 | </td></tr> | |
2028 | <tr><td> |
|
2028 | <tr><td> | |
2029 | <a href="/help/revisions"> |
|
2029 | <a href="/help/revisions"> | |
2030 | revisions |
|
2030 | revisions | |
2031 | </a> |
|
2031 | </a> | |
2032 | </td><td> |
|
2032 | </td><td> | |
2033 | Specifying Revisions |
|
2033 | Specifying Revisions | |
2034 | </td></tr> |
|
2034 | </td></tr> | |
2035 | <tr><td> |
|
2035 | <tr><td> | |
2036 | <a href="/help/scripting"> |
|
2036 | <a href="/help/scripting"> | |
2037 | scripting |
|
2037 | scripting | |
2038 | </a> |
|
2038 | </a> | |
2039 | </td><td> |
|
2039 | </td><td> | |
2040 | Using Mercurial from scripts and automation |
|
2040 | Using Mercurial from scripts and automation | |
2041 | </td></tr> |
|
2041 | </td></tr> | |
2042 | <tr><td> |
|
2042 | <tr><td> | |
2043 | <a href="/help/subrepos"> |
|
2043 | <a href="/help/subrepos"> | |
2044 | subrepos |
|
2044 | subrepos | |
2045 | </a> |
|
2045 | </a> | |
2046 | </td><td> |
|
2046 | </td><td> | |
2047 | Subrepositories |
|
2047 | Subrepositories | |
2048 | </td></tr> |
|
2048 | </td></tr> | |
2049 | <tr><td> |
|
2049 | <tr><td> | |
2050 | <a href="/help/templating"> |
|
2050 | <a href="/help/templating"> | |
2051 | templating |
|
2051 | templating | |
2052 | </a> |
|
2052 | </a> | |
2053 | </td><td> |
|
2053 | </td><td> | |
2054 | Template Usage |
|
2054 | Template Usage | |
2055 | </td></tr> |
|
2055 | </td></tr> | |
2056 | <tr><td> |
|
2056 | <tr><td> | |
2057 | <a href="/help/urls"> |
|
2057 | <a href="/help/urls"> | |
2058 | urls |
|
2058 | urls | |
2059 | </a> |
|
2059 | </a> | |
2060 | </td><td> |
|
2060 | </td><td> | |
2061 | URL Paths |
|
2061 | URL Paths | |
2062 | </td></tr> |
|
2062 | </td></tr> | |
2063 | <tr><td> |
|
2063 | <tr><td> | |
2064 | <a href="/help/topic-containing-verbose"> |
|
2064 | <a href="/help/topic-containing-verbose"> | |
2065 | topic-containing-verbose |
|
2065 | topic-containing-verbose | |
2066 | </a> |
|
2066 | </a> | |
2067 | </td><td> |
|
2067 | </td><td> | |
2068 | This is the topic to test omit indicating. |
|
2068 | This is the topic to test omit indicating. | |
2069 | </td></tr> |
|
2069 | </td></tr> | |
2070 |
|
2070 | |||
2071 |
|
2071 | |||
2072 | <tr><td colspan="2"><h2><a name="main" href="#main">Main Commands</a></h2></td></tr> |
|
2072 | <tr><td colspan="2"><h2><a name="main" href="#main">Main Commands</a></h2></td></tr> | |
2073 |
|
2073 | |||
2074 | <tr><td> |
|
2074 | <tr><td> | |
2075 | <a href="/help/add"> |
|
2075 | <a href="/help/add"> | |
2076 | add |
|
2076 | add | |
2077 | </a> |
|
2077 | </a> | |
2078 | </td><td> |
|
2078 | </td><td> | |
2079 | add the specified files on the next commit |
|
2079 | add the specified files on the next commit | |
2080 | </td></tr> |
|
2080 | </td></tr> | |
2081 | <tr><td> |
|
2081 | <tr><td> | |
2082 | <a href="/help/annotate"> |
|
2082 | <a href="/help/annotate"> | |
2083 | annotate |
|
2083 | annotate | |
2084 | </a> |
|
2084 | </a> | |
2085 | </td><td> |
|
2085 | </td><td> | |
2086 | show changeset information by line for each file |
|
2086 | show changeset information by line for each file | |
2087 | </td></tr> |
|
2087 | </td></tr> | |
2088 | <tr><td> |
|
2088 | <tr><td> | |
2089 | <a href="/help/clone"> |
|
2089 | <a href="/help/clone"> | |
2090 | clone |
|
2090 | clone | |
2091 | </a> |
|
2091 | </a> | |
2092 | </td><td> |
|
2092 | </td><td> | |
2093 | make a copy of an existing repository |
|
2093 | make a copy of an existing repository | |
2094 | </td></tr> |
|
2094 | </td></tr> | |
2095 | <tr><td> |
|
2095 | <tr><td> | |
2096 | <a href="/help/commit"> |
|
2096 | <a href="/help/commit"> | |
2097 | commit |
|
2097 | commit | |
2098 | </a> |
|
2098 | </a> | |
2099 | </td><td> |
|
2099 | </td><td> | |
2100 | commit the specified files or all outstanding changes |
|
2100 | commit the specified files or all outstanding changes | |
2101 | </td></tr> |
|
2101 | </td></tr> | |
2102 | <tr><td> |
|
2102 | <tr><td> | |
2103 | <a href="/help/diff"> |
|
2103 | <a href="/help/diff"> | |
2104 | diff |
|
2104 | diff | |
2105 | </a> |
|
2105 | </a> | |
2106 | </td><td> |
|
2106 | </td><td> | |
2107 | diff repository (or selected files) |
|
2107 | diff repository (or selected files) | |
2108 | </td></tr> |
|
2108 | </td></tr> | |
2109 | <tr><td> |
|
2109 | <tr><td> | |
2110 | <a href="/help/export"> |
|
2110 | <a href="/help/export"> | |
2111 | export |
|
2111 | export | |
2112 | </a> |
|
2112 | </a> | |
2113 | </td><td> |
|
2113 | </td><td> | |
2114 | dump the header and diffs for one or more changesets |
|
2114 | dump the header and diffs for one or more changesets | |
2115 | </td></tr> |
|
2115 | </td></tr> | |
2116 | <tr><td> |
|
2116 | <tr><td> | |
2117 | <a href="/help/forget"> |
|
2117 | <a href="/help/forget"> | |
2118 | forget |
|
2118 | forget | |
2119 | </a> |
|
2119 | </a> | |
2120 | </td><td> |
|
2120 | </td><td> | |
2121 | forget the specified files on the next commit |
|
2121 | forget the specified files on the next commit | |
2122 | </td></tr> |
|
2122 | </td></tr> | |
2123 | <tr><td> |
|
2123 | <tr><td> | |
2124 | <a href="/help/init"> |
|
2124 | <a href="/help/init"> | |
2125 | init |
|
2125 | init | |
2126 | </a> |
|
2126 | </a> | |
2127 | </td><td> |
|
2127 | </td><td> | |
2128 | create a new repository in the given directory |
|
2128 | create a new repository in the given directory | |
2129 | </td></tr> |
|
2129 | </td></tr> | |
2130 | <tr><td> |
|
2130 | <tr><td> | |
2131 | <a href="/help/log"> |
|
2131 | <a href="/help/log"> | |
2132 | log |
|
2132 | log | |
2133 | </a> |
|
2133 | </a> | |
2134 | </td><td> |
|
2134 | </td><td> | |
2135 | show revision history of entire repository or files |
|
2135 | show revision history of entire repository or files | |
2136 | </td></tr> |
|
2136 | </td></tr> | |
2137 | <tr><td> |
|
2137 | <tr><td> | |
2138 | <a href="/help/merge"> |
|
2138 | <a href="/help/merge"> | |
2139 | merge |
|
2139 | merge | |
2140 | </a> |
|
2140 | </a> | |
2141 | </td><td> |
|
2141 | </td><td> | |
2142 | merge another revision into working directory |
|
2142 | merge another revision into working directory | |
2143 | </td></tr> |
|
2143 | </td></tr> | |
2144 | <tr><td> |
|
2144 | <tr><td> | |
2145 | <a href="/help/pull"> |
|
2145 | <a href="/help/pull"> | |
2146 | pull |
|
2146 | pull | |
2147 | </a> |
|
2147 | </a> | |
2148 | </td><td> |
|
2148 | </td><td> | |
2149 | pull changes from the specified source |
|
2149 | pull changes from the specified source | |
2150 | </td></tr> |
|
2150 | </td></tr> | |
2151 | <tr><td> |
|
2151 | <tr><td> | |
2152 | <a href="/help/push"> |
|
2152 | <a href="/help/push"> | |
2153 | push |
|
2153 | push | |
2154 | </a> |
|
2154 | </a> | |
2155 | </td><td> |
|
2155 | </td><td> | |
2156 | push changes to the specified destination |
|
2156 | push changes to the specified destination | |
2157 | </td></tr> |
|
2157 | </td></tr> | |
2158 | <tr><td> |
|
2158 | <tr><td> | |
2159 | <a href="/help/remove"> |
|
2159 | <a href="/help/remove"> | |
2160 | remove |
|
2160 | remove | |
2161 | </a> |
|
2161 | </a> | |
2162 | </td><td> |
|
2162 | </td><td> | |
2163 | remove the specified files on the next commit |
|
2163 | remove the specified files on the next commit | |
2164 | </td></tr> |
|
2164 | </td></tr> | |
2165 | <tr><td> |
|
2165 | <tr><td> | |
2166 | <a href="/help/serve"> |
|
2166 | <a href="/help/serve"> | |
2167 | serve |
|
2167 | serve | |
2168 | </a> |
|
2168 | </a> | |
2169 | </td><td> |
|
2169 | </td><td> | |
2170 | start stand-alone webserver |
|
2170 | start stand-alone webserver | |
2171 | </td></tr> |
|
2171 | </td></tr> | |
2172 | <tr><td> |
|
2172 | <tr><td> | |
2173 | <a href="/help/status"> |
|
2173 | <a href="/help/status"> | |
2174 | status |
|
2174 | status | |
2175 | </a> |
|
2175 | </a> | |
2176 | </td><td> |
|
2176 | </td><td> | |
2177 | show changed files in the working directory |
|
2177 | show changed files in the working directory | |
2178 | </td></tr> |
|
2178 | </td></tr> | |
2179 | <tr><td> |
|
2179 | <tr><td> | |
2180 | <a href="/help/summary"> |
|
2180 | <a href="/help/summary"> | |
2181 | summary |
|
2181 | summary | |
2182 | </a> |
|
2182 | </a> | |
2183 | </td><td> |
|
2183 | </td><td> | |
2184 | summarize working directory state |
|
2184 | summarize working directory state | |
2185 | </td></tr> |
|
2185 | </td></tr> | |
2186 | <tr><td> |
|
2186 | <tr><td> | |
2187 | <a href="/help/update"> |
|
2187 | <a href="/help/update"> | |
2188 | update |
|
2188 | update | |
2189 | </a> |
|
2189 | </a> | |
2190 | </td><td> |
|
2190 | </td><td> | |
2191 | update working directory (or switch revisions) |
|
2191 | update working directory (or switch revisions) | |
2192 | </td></tr> |
|
2192 | </td></tr> | |
2193 |
|
2193 | |||
2194 |
|
2194 | |||
2195 |
|
2195 | |||
2196 | <tr><td colspan="2"><h2><a name="other" href="#other">Other Commands</a></h2></td></tr> |
|
2196 | <tr><td colspan="2"><h2><a name="other" href="#other">Other Commands</a></h2></td></tr> | |
2197 |
|
2197 | |||
2198 | <tr><td> |
|
2198 | <tr><td> | |
2199 | <a href="/help/addremove"> |
|
2199 | <a href="/help/addremove"> | |
2200 | addremove |
|
2200 | addremove | |
2201 | </a> |
|
2201 | </a> | |
2202 | </td><td> |
|
2202 | </td><td> | |
2203 | add all new files, delete all missing files |
|
2203 | add all new files, delete all missing files | |
2204 | </td></tr> |
|
2204 | </td></tr> | |
2205 | <tr><td> |
|
2205 | <tr><td> | |
2206 | <a href="/help/archive"> |
|
2206 | <a href="/help/archive"> | |
2207 | archive |
|
2207 | archive | |
2208 | </a> |
|
2208 | </a> | |
2209 | </td><td> |
|
2209 | </td><td> | |
2210 | create an unversioned archive of a repository revision |
|
2210 | create an unversioned archive of a repository revision | |
2211 | </td></tr> |
|
2211 | </td></tr> | |
2212 | <tr><td> |
|
2212 | <tr><td> | |
2213 | <a href="/help/backout"> |
|
2213 | <a href="/help/backout"> | |
2214 | backout |
|
2214 | backout | |
2215 | </a> |
|
2215 | </a> | |
2216 | </td><td> |
|
2216 | </td><td> | |
2217 | reverse effect of earlier changeset |
|
2217 | reverse effect of earlier changeset | |
2218 | </td></tr> |
|
2218 | </td></tr> | |
2219 | <tr><td> |
|
2219 | <tr><td> | |
2220 | <a href="/help/bisect"> |
|
2220 | <a href="/help/bisect"> | |
2221 | bisect |
|
2221 | bisect | |
2222 | </a> |
|
2222 | </a> | |
2223 | </td><td> |
|
2223 | </td><td> | |
2224 | subdivision search of changesets |
|
2224 | subdivision search of changesets | |
2225 | </td></tr> |
|
2225 | </td></tr> | |
2226 | <tr><td> |
|
2226 | <tr><td> | |
2227 | <a href="/help/bookmarks"> |
|
2227 | <a href="/help/bookmarks"> | |
2228 | bookmarks |
|
2228 | bookmarks | |
2229 | </a> |
|
2229 | </a> | |
2230 | </td><td> |
|
2230 | </td><td> | |
2231 | create a new bookmark or list existing bookmarks |
|
2231 | create a new bookmark or list existing bookmarks | |
2232 | </td></tr> |
|
2232 | </td></tr> | |
2233 | <tr><td> |
|
2233 | <tr><td> | |
2234 | <a href="/help/branch"> |
|
2234 | <a href="/help/branch"> | |
2235 | branch |
|
2235 | branch | |
2236 | </a> |
|
2236 | </a> | |
2237 | </td><td> |
|
2237 | </td><td> | |
2238 | set or show the current branch name |
|
2238 | set or show the current branch name | |
2239 | </td></tr> |
|
2239 | </td></tr> | |
2240 | <tr><td> |
|
2240 | <tr><td> | |
2241 | <a href="/help/branches"> |
|
2241 | <a href="/help/branches"> | |
2242 | branches |
|
2242 | branches | |
2243 | </a> |
|
2243 | </a> | |
2244 | </td><td> |
|
2244 | </td><td> | |
2245 | list repository named branches |
|
2245 | list repository named branches | |
2246 | </td></tr> |
|
2246 | </td></tr> | |
2247 | <tr><td> |
|
2247 | <tr><td> | |
2248 | <a href="/help/bundle"> |
|
2248 | <a href="/help/bundle"> | |
2249 | bundle |
|
2249 | bundle | |
2250 | </a> |
|
2250 | </a> | |
2251 | </td><td> |
|
2251 | </td><td> | |
2252 | create a bundle file |
|
2252 | create a bundle file | |
2253 | </td></tr> |
|
2253 | </td></tr> | |
2254 | <tr><td> |
|
2254 | <tr><td> | |
2255 | <a href="/help/cat"> |
|
2255 | <a href="/help/cat"> | |
2256 | cat |
|
2256 | cat | |
2257 | </a> |
|
2257 | </a> | |
2258 | </td><td> |
|
2258 | </td><td> | |
2259 | output the current or given revision of files |
|
2259 | output the current or given revision of files | |
2260 | </td></tr> |
|
2260 | </td></tr> | |
2261 | <tr><td> |
|
2261 | <tr><td> | |
2262 | <a href="/help/config"> |
|
2262 | <a href="/help/config"> | |
2263 | config |
|
2263 | config | |
2264 | </a> |
|
2264 | </a> | |
2265 | </td><td> |
|
2265 | </td><td> | |
2266 | show combined config settings from all hgrc files |
|
2266 | show combined config settings from all hgrc files | |
2267 | </td></tr> |
|
2267 | </td></tr> | |
2268 | <tr><td> |
|
2268 | <tr><td> | |
2269 | <a href="/help/copy"> |
|
2269 | <a href="/help/copy"> | |
2270 | copy |
|
2270 | copy | |
2271 | </a> |
|
2271 | </a> | |
2272 | </td><td> |
|
2272 | </td><td> | |
2273 | mark files as copied for the next commit |
|
2273 | mark files as copied for the next commit | |
2274 | </td></tr> |
|
2274 | </td></tr> | |
2275 | <tr><td> |
|
2275 | <tr><td> | |
2276 | <a href="/help/files"> |
|
2276 | <a href="/help/files"> | |
2277 | files |
|
2277 | files | |
2278 | </a> |
|
2278 | </a> | |
2279 | </td><td> |
|
2279 | </td><td> | |
2280 | list tracked files |
|
2280 | list tracked files | |
2281 | </td></tr> |
|
2281 | </td></tr> | |
2282 | <tr><td> |
|
2282 | <tr><td> | |
2283 | <a href="/help/graft"> |
|
2283 | <a href="/help/graft"> | |
2284 | graft |
|
2284 | graft | |
2285 | </a> |
|
2285 | </a> | |
2286 | </td><td> |
|
2286 | </td><td> | |
2287 | copy changes from other branches onto the current branch |
|
2287 | copy changes from other branches onto the current branch | |
2288 | </td></tr> |
|
2288 | </td></tr> | |
2289 | <tr><td> |
|
2289 | <tr><td> | |
2290 | <a href="/help/grep"> |
|
2290 | <a href="/help/grep"> | |
2291 | grep |
|
2291 | grep | |
2292 | </a> |
|
2292 | </a> | |
2293 | </td><td> |
|
2293 | </td><td> | |
2294 | search revision history for a pattern in specified files |
|
2294 | search revision history for a pattern in specified files | |
2295 | </td></tr> |
|
2295 | </td></tr> | |
2296 | <tr><td> |
|
2296 | <tr><td> | |
2297 | <a href="/help/heads"> |
|
2297 | <a href="/help/heads"> | |
2298 | heads |
|
2298 | heads | |
2299 | </a> |
|
2299 | </a> | |
2300 | </td><td> |
|
2300 | </td><td> | |
2301 | show branch heads |
|
2301 | show branch heads | |
2302 | </td></tr> |
|
2302 | </td></tr> | |
2303 | <tr><td> |
|
2303 | <tr><td> | |
2304 | <a href="/help/help"> |
|
2304 | <a href="/help/help"> | |
2305 | help |
|
2305 | help | |
2306 | </a> |
|
2306 | </a> | |
2307 | </td><td> |
|
2307 | </td><td> | |
2308 | show help for a given topic or a help overview |
|
2308 | show help for a given topic or a help overview | |
2309 | </td></tr> |
|
2309 | </td></tr> | |
2310 | <tr><td> |
|
2310 | <tr><td> | |
2311 | <a href="/help/hgalias"> |
|
2311 | <a href="/help/hgalias"> | |
2312 | hgalias |
|
2312 | hgalias | |
2313 | </a> |
|
2313 | </a> | |
2314 | </td><td> |
|
2314 | </td><td> | |
2315 | summarize working directory state |
|
2315 | summarize working directory state | |
2316 | </td></tr> |
|
2316 | </td></tr> | |
2317 | <tr><td> |
|
2317 | <tr><td> | |
2318 | <a href="/help/identify"> |
|
2318 | <a href="/help/identify"> | |
2319 | identify |
|
2319 | identify | |
2320 | </a> |
|
2320 | </a> | |
2321 | </td><td> |
|
2321 | </td><td> | |
2322 | identify the working directory or specified revision |
|
2322 | identify the working directory or specified revision | |
2323 | </td></tr> |
|
2323 | </td></tr> | |
2324 | <tr><td> |
|
2324 | <tr><td> | |
2325 | <a href="/help/import"> |
|
2325 | <a href="/help/import"> | |
2326 | import |
|
2326 | import | |
2327 | </a> |
|
2327 | </a> | |
2328 | </td><td> |
|
2328 | </td><td> | |
2329 | import an ordered set of patches |
|
2329 | import an ordered set of patches | |
2330 | </td></tr> |
|
2330 | </td></tr> | |
2331 | <tr><td> |
|
2331 | <tr><td> | |
2332 | <a href="/help/incoming"> |
|
2332 | <a href="/help/incoming"> | |
2333 | incoming |
|
2333 | incoming | |
2334 | </a> |
|
2334 | </a> | |
2335 | </td><td> |
|
2335 | </td><td> | |
2336 | show new changesets found in source |
|
2336 | show new changesets found in source | |
2337 | </td></tr> |
|
2337 | </td></tr> | |
2338 | <tr><td> |
|
2338 | <tr><td> | |
2339 | <a href="/help/manifest"> |
|
2339 | <a href="/help/manifest"> | |
2340 | manifest |
|
2340 | manifest | |
2341 | </a> |
|
2341 | </a> | |
2342 | </td><td> |
|
2342 | </td><td> | |
2343 | output the current or given revision of the project manifest |
|
2343 | output the current or given revision of the project manifest | |
2344 | </td></tr> |
|
2344 | </td></tr> | |
2345 | <tr><td> |
|
2345 | <tr><td> | |
2346 | <a href="/help/nohelp"> |
|
2346 | <a href="/help/nohelp"> | |
2347 | nohelp |
|
2347 | nohelp | |
2348 | </a> |
|
2348 | </a> | |
2349 | </td><td> |
|
2349 | </td><td> | |
2350 | (no help text available) |
|
2350 | (no help text available) | |
2351 | </td></tr> |
|
2351 | </td></tr> | |
2352 | <tr><td> |
|
2352 | <tr><td> | |
2353 | <a href="/help/outgoing"> |
|
2353 | <a href="/help/outgoing"> | |
2354 | outgoing |
|
2354 | outgoing | |
2355 | </a> |
|
2355 | </a> | |
2356 | </td><td> |
|
2356 | </td><td> | |
2357 | show changesets not found in the destination |
|
2357 | show changesets not found in the destination | |
2358 | </td></tr> |
|
2358 | </td></tr> | |
2359 | <tr><td> |
|
2359 | <tr><td> | |
2360 | <a href="/help/paths"> |
|
2360 | <a href="/help/paths"> | |
2361 | paths |
|
2361 | paths | |
2362 | </a> |
|
2362 | </a> | |
2363 | </td><td> |
|
2363 | </td><td> | |
2364 | show aliases for remote repositories |
|
2364 | show aliases for remote repositories | |
2365 | </td></tr> |
|
2365 | </td></tr> | |
2366 | <tr><td> |
|
2366 | <tr><td> | |
2367 | <a href="/help/phase"> |
|
2367 | <a href="/help/phase"> | |
2368 | phase |
|
2368 | phase | |
2369 | </a> |
|
2369 | </a> | |
2370 | </td><td> |
|
2370 | </td><td> | |
2371 | set or show the current phase name |
|
2371 | set or show the current phase name | |
2372 | </td></tr> |
|
2372 | </td></tr> | |
2373 | <tr><td> |
|
2373 | <tr><td> | |
2374 | <a href="/help/recover"> |
|
2374 | <a href="/help/recover"> | |
2375 | recover |
|
2375 | recover | |
2376 | </a> |
|
2376 | </a> | |
2377 | </td><td> |
|
2377 | </td><td> | |
2378 | roll back an interrupted transaction |
|
2378 | roll back an interrupted transaction | |
2379 | </td></tr> |
|
2379 | </td></tr> | |
2380 | <tr><td> |
|
2380 | <tr><td> | |
2381 | <a href="/help/rename"> |
|
2381 | <a href="/help/rename"> | |
2382 | rename |
|
2382 | rename | |
2383 | </a> |
|
2383 | </a> | |
2384 | </td><td> |
|
2384 | </td><td> | |
2385 | rename files; equivalent of copy + remove |
|
2385 | rename files; equivalent of copy + remove | |
2386 | </td></tr> |
|
2386 | </td></tr> | |
2387 | <tr><td> |
|
2387 | <tr><td> | |
2388 | <a href="/help/resolve"> |
|
2388 | <a href="/help/resolve"> | |
2389 | resolve |
|
2389 | resolve | |
2390 | </a> |
|
2390 | </a> | |
2391 | </td><td> |
|
2391 | </td><td> | |
2392 | redo merges or set/view the merge status of files |
|
2392 | redo merges or set/view the merge status of files | |
2393 | </td></tr> |
|
2393 | </td></tr> | |
2394 | <tr><td> |
|
2394 | <tr><td> | |
2395 | <a href="/help/revert"> |
|
2395 | <a href="/help/revert"> | |
2396 | revert |
|
2396 | revert | |
2397 | </a> |
|
2397 | </a> | |
2398 | </td><td> |
|
2398 | </td><td> | |
2399 | restore files to their checkout state |
|
2399 | restore files to their checkout state | |
2400 | </td></tr> |
|
2400 | </td></tr> | |
2401 | <tr><td> |
|
2401 | <tr><td> | |
2402 | <a href="/help/root"> |
|
2402 | <a href="/help/root"> | |
2403 | root |
|
2403 | root | |
2404 | </a> |
|
2404 | </a> | |
2405 | </td><td> |
|
2405 | </td><td> | |
2406 | print the root (top) of the current working directory |
|
2406 | print the root (top) of the current working directory | |
2407 | </td></tr> |
|
2407 | </td></tr> | |
2408 | <tr><td> |
|
2408 | <tr><td> | |
2409 | <a href="/help/shellalias"> |
|
2409 | <a href="/help/shellalias"> | |
2410 | shellalias |
|
2410 | shellalias | |
2411 | </a> |
|
2411 | </a> | |
2412 | </td><td> |
|
2412 | </td><td> | |
2413 | (no help text available) |
|
2413 | (no help text available) | |
2414 | </td></tr> |
|
2414 | </td></tr> | |
2415 | <tr><td> |
|
2415 | <tr><td> | |
2416 | <a href="/help/tag"> |
|
2416 | <a href="/help/tag"> | |
2417 | tag |
|
2417 | tag | |
2418 | </a> |
|
2418 | </a> | |
2419 | </td><td> |
|
2419 | </td><td> | |
2420 | add one or more tags for the current or given revision |
|
2420 | add one or more tags for the current or given revision | |
2421 | </td></tr> |
|
2421 | </td></tr> | |
2422 | <tr><td> |
|
2422 | <tr><td> | |
2423 | <a href="/help/tags"> |
|
2423 | <a href="/help/tags"> | |
2424 | tags |
|
2424 | tags | |
2425 | </a> |
|
2425 | </a> | |
2426 | </td><td> |
|
2426 | </td><td> | |
2427 | list repository tags |
|
2427 | list repository tags | |
2428 | </td></tr> |
|
2428 | </td></tr> | |
2429 | <tr><td> |
|
2429 | <tr><td> | |
2430 | <a href="/help/unbundle"> |
|
2430 | <a href="/help/unbundle"> | |
2431 | unbundle |
|
2431 | unbundle | |
2432 | </a> |
|
2432 | </a> | |
2433 | </td><td> |
|
2433 | </td><td> | |
2434 | apply one or more bundle files |
|
2434 | apply one or more bundle files | |
2435 | </td></tr> |
|
2435 | </td></tr> | |
2436 | <tr><td> |
|
2436 | <tr><td> | |
2437 | <a href="/help/verify"> |
|
2437 | <a href="/help/verify"> | |
2438 | verify |
|
2438 | verify | |
2439 | </a> |
|
2439 | </a> | |
2440 | </td><td> |
|
2440 | </td><td> | |
2441 | verify the integrity of the repository |
|
2441 | verify the integrity of the repository | |
2442 | </td></tr> |
|
2442 | </td></tr> | |
2443 | <tr><td> |
|
2443 | <tr><td> | |
2444 | <a href="/help/version"> |
|
2444 | <a href="/help/version"> | |
2445 | version |
|
2445 | version | |
2446 | </a> |
|
2446 | </a> | |
2447 | </td><td> |
|
2447 | </td><td> | |
2448 | output version and copyright information |
|
2448 | output version and copyright information | |
2449 | </td></tr> |
|
2449 | </td></tr> | |
2450 |
|
2450 | |||
2451 |
|
2451 | |||
2452 | </table> |
|
2452 | </table> | |
2453 | </div> |
|
2453 | </div> | |
2454 | </div> |
|
2454 | </div> | |
2455 |
|
2455 | |||
2456 |
|
2456 | |||
2457 |
|
2457 | |||
2458 | </body> |
|
2458 | </body> | |
2459 | </html> |
|
2459 | </html> | |
2460 |
|
2460 | |||
2461 |
|
2461 | |||
2462 | $ get-with-headers.py $LOCALIP:$HGPORT "help/add" |
|
2462 | $ get-with-headers.py $LOCALIP:$HGPORT "help/add" | |
2463 | 200 Script output follows |
|
2463 | 200 Script output follows | |
2464 |
|
2464 | |||
2465 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> |
|
2465 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> | |
2466 | <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US"> |
|
2466 | <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US"> | |
2467 | <head> |
|
2467 | <head> | |
2468 | <link rel="icon" href="/static/hgicon.png" type="image/png" /> |
|
2468 | <link rel="icon" href="/static/hgicon.png" type="image/png" /> | |
2469 | <meta name="robots" content="index, nofollow" /> |
|
2469 | <meta name="robots" content="index, nofollow" /> | |
2470 | <link rel="stylesheet" href="/static/style-paper.css" type="text/css" /> |
|
2470 | <link rel="stylesheet" href="/static/style-paper.css" type="text/css" /> | |
2471 | <script type="text/javascript" src="/static/mercurial.js"></script> |
|
2471 | <script type="text/javascript" src="/static/mercurial.js"></script> | |
2472 |
|
2472 | |||
2473 | <title>Help: add</title> |
|
2473 | <title>Help: add</title> | |
2474 | </head> |
|
2474 | </head> | |
2475 | <body> |
|
2475 | <body> | |
2476 |
|
2476 | |||
2477 | <div class="container"> |
|
2477 | <div class="container"> | |
2478 | <div class="menu"> |
|
2478 | <div class="menu"> | |
2479 | <div class="logo"> |
|
2479 | <div class="logo"> | |
2480 | <a href="https://mercurial-scm.org/"> |
|
2480 | <a href="https://mercurial-scm.org/"> | |
2481 | <img src="/static/hglogo.png" alt="mercurial" /></a> |
|
2481 | <img src="/static/hglogo.png" alt="mercurial" /></a> | |
2482 | </div> |
|
2482 | </div> | |
2483 | <ul> |
|
2483 | <ul> | |
2484 | <li><a href="/shortlog">log</a></li> |
|
2484 | <li><a href="/shortlog">log</a></li> | |
2485 | <li><a href="/graph">graph</a></li> |
|
2485 | <li><a href="/graph">graph</a></li> | |
2486 | <li><a href="/tags">tags</a></li> |
|
2486 | <li><a href="/tags">tags</a></li> | |
2487 | <li><a href="/bookmarks">bookmarks</a></li> |
|
2487 | <li><a href="/bookmarks">bookmarks</a></li> | |
2488 | <li><a href="/branches">branches</a></li> |
|
2488 | <li><a href="/branches">branches</a></li> | |
2489 | </ul> |
|
2489 | </ul> | |
2490 | <ul> |
|
2490 | <ul> | |
2491 | <li class="active"><a href="/help">help</a></li> |
|
2491 | <li class="active"><a href="/help">help</a></li> | |
2492 | </ul> |
|
2492 | </ul> | |
2493 | </div> |
|
2493 | </div> | |
2494 |
|
2494 | |||
2495 | <div class="main"> |
|
2495 | <div class="main"> | |
2496 | <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2> |
|
2496 | <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2> | |
2497 | <h3>Help: add</h3> |
|
2497 | <h3>Help: add</h3> | |
2498 |
|
2498 | |||
2499 | <form class="search" action="/log"> |
|
2499 | <form class="search" action="/log"> | |
2500 |
|
2500 | |||
2501 | <p><input name="rev" id="search1" type="text" size="30" /></p> |
|
2501 | <p><input name="rev" id="search1" type="text" size="30" /></p> | |
2502 | <div id="hint">Find changesets by keywords (author, files, the commit message), revision |
|
2502 | <div id="hint">Find changesets by keywords (author, files, the commit message), revision | |
2503 | number or hash, or <a href="/help/revsets">revset expression</a>.</div> |
|
2503 | number or hash, or <a href="/help/revsets">revset expression</a>.</div> | |
2504 | </form> |
|
2504 | </form> | |
2505 | <div id="doc"> |
|
2505 | <div id="doc"> | |
2506 | <p> |
|
2506 | <p> | |
2507 | hg add [OPTION]... [FILE]... |
|
2507 | hg add [OPTION]... [FILE]... | |
2508 | </p> |
|
2508 | </p> | |
2509 | <p> |
|
2509 | <p> | |
2510 | add the specified files on the next commit |
|
2510 | add the specified files on the next commit | |
2511 | </p> |
|
2511 | </p> | |
2512 | <p> |
|
2512 | <p> | |
2513 | Schedule files to be version controlled and added to the |
|
2513 | Schedule files to be version controlled and added to the | |
2514 | repository. |
|
2514 | repository. | |
2515 | </p> |
|
2515 | </p> | |
2516 | <p> |
|
2516 | <p> | |
2517 | The files will be added to the repository at the next commit. To |
|
2517 | The files will be added to the repository at the next commit. To | |
2518 | undo an add before that, see 'hg forget'. |
|
2518 | undo an add before that, see 'hg forget'. | |
2519 | </p> |
|
2519 | </p> | |
2520 | <p> |
|
2520 | <p> | |
2521 | If no names are given, add all files to the repository (except |
|
2521 | If no names are given, add all files to the repository (except | |
2522 | files matching ".hgignore"). |
|
2522 | files matching ".hgignore"). | |
2523 | </p> |
|
2523 | </p> | |
2524 | <p> |
|
2524 | <p> | |
2525 | Examples: |
|
2525 | Examples: | |
2526 | </p> |
|
2526 | </p> | |
2527 | <ul> |
|
2527 | <ul> | |
2528 | <li> New (unknown) files are added automatically by 'hg add': |
|
2528 | <li> New (unknown) files are added automatically by 'hg add': | |
2529 | <pre> |
|
2529 | <pre> | |
2530 | \$ ls (re) |
|
2530 | \$ ls (re) | |
2531 | foo.c |
|
2531 | foo.c | |
2532 | \$ hg status (re) |
|
2532 | \$ hg status (re) | |
2533 | ? foo.c |
|
2533 | ? foo.c | |
2534 | \$ hg add (re) |
|
2534 | \$ hg add (re) | |
2535 | adding foo.c |
|
2535 | adding foo.c | |
2536 | \$ hg status (re) |
|
2536 | \$ hg status (re) | |
2537 | A foo.c |
|
2537 | A foo.c | |
2538 | </pre> |
|
2538 | </pre> | |
2539 | <li> Specific files to be added can be specified: |
|
2539 | <li> Specific files to be added can be specified: | |
2540 | <pre> |
|
2540 | <pre> | |
2541 | \$ ls (re) |
|
2541 | \$ ls (re) | |
2542 | bar.c foo.c |
|
2542 | bar.c foo.c | |
2543 | \$ hg status (re) |
|
2543 | \$ hg status (re) | |
2544 | ? bar.c |
|
2544 | ? bar.c | |
2545 | ? foo.c |
|
2545 | ? foo.c | |
2546 | \$ hg add bar.c (re) |
|
2546 | \$ hg add bar.c (re) | |
2547 | \$ hg status (re) |
|
2547 | \$ hg status (re) | |
2548 | A bar.c |
|
2548 | A bar.c | |
2549 | ? foo.c |
|
2549 | ? foo.c | |
2550 | </pre> |
|
2550 | </pre> | |
2551 | </ul> |
|
2551 | </ul> | |
2552 | <p> |
|
2552 | <p> | |
2553 | Returns 0 if all files are successfully added. |
|
2553 | Returns 0 if all files are successfully added. | |
2554 | </p> |
|
2554 | </p> | |
2555 | <p> |
|
2555 | <p> | |
2556 | options ([+] can be repeated): |
|
2556 | options ([+] can be repeated): | |
2557 | </p> |
|
2557 | </p> | |
2558 | <table> |
|
2558 | <table> | |
2559 | <tr><td>-I</td> |
|
2559 | <tr><td>-I</td> | |
2560 | <td>--include PATTERN [+]</td> |
|
2560 | <td>--include PATTERN [+]</td> | |
2561 | <td>include names matching the given patterns</td></tr> |
|
2561 | <td>include names matching the given patterns</td></tr> | |
2562 | <tr><td>-X</td> |
|
2562 | <tr><td>-X</td> | |
2563 | <td>--exclude PATTERN [+]</td> |
|
2563 | <td>--exclude PATTERN [+]</td> | |
2564 | <td>exclude names matching the given patterns</td></tr> |
|
2564 | <td>exclude names matching the given patterns</td></tr> | |
2565 | <tr><td>-S</td> |
|
2565 | <tr><td>-S</td> | |
2566 | <td>--subrepos</td> |
|
2566 | <td>--subrepos</td> | |
2567 | <td>recurse into subrepositories</td></tr> |
|
2567 | <td>recurse into subrepositories</td></tr> | |
2568 | <tr><td>-n</td> |
|
2568 | <tr><td>-n</td> | |
2569 | <td>--dry-run</td> |
|
2569 | <td>--dry-run</td> | |
2570 | <td>do not perform actions, just print output</td></tr> |
|
2570 | <td>do not perform actions, just print output</td></tr> | |
2571 | </table> |
|
2571 | </table> | |
2572 | <p> |
|
2572 | <p> | |
2573 | global options ([+] can be repeated): |
|
2573 | global options ([+] can be repeated): | |
2574 | </p> |
|
2574 | </p> | |
2575 | <table> |
|
2575 | <table> | |
2576 | <tr><td>-R</td> |
|
2576 | <tr><td>-R</td> | |
2577 | <td>--repository REPO</td> |
|
2577 | <td>--repository REPO</td> | |
2578 | <td>repository root directory or name of overlay bundle file</td></tr> |
|
2578 | <td>repository root directory or name of overlay bundle file</td></tr> | |
2579 | <tr><td></td> |
|
2579 | <tr><td></td> | |
2580 | <td>--cwd DIR</td> |
|
2580 | <td>--cwd DIR</td> | |
2581 | <td>change working directory</td></tr> |
|
2581 | <td>change working directory</td></tr> | |
2582 | <tr><td>-y</td> |
|
2582 | <tr><td>-y</td> | |
2583 | <td>--noninteractive</td> |
|
2583 | <td>--noninteractive</td> | |
2584 | <td>do not prompt, automatically pick the first choice for all prompts</td></tr> |
|
2584 | <td>do not prompt, automatically pick the first choice for all prompts</td></tr> | |
2585 | <tr><td>-q</td> |
|
2585 | <tr><td>-q</td> | |
2586 | <td>--quiet</td> |
|
2586 | <td>--quiet</td> | |
2587 | <td>suppress output</td></tr> |
|
2587 | <td>suppress output</td></tr> | |
2588 | <tr><td>-v</td> |
|
2588 | <tr><td>-v</td> | |
2589 | <td>--verbose</td> |
|
2589 | <td>--verbose</td> | |
2590 | <td>enable additional output</td></tr> |
|
2590 | <td>enable additional output</td></tr> | |
2591 | <tr><td></td> |
|
2591 | <tr><td></td> | |
2592 | <td>--color TYPE</td> |
|
2592 | <td>--color TYPE</td> | |
2593 | <td>when to colorize (boolean, always, auto, never, or debug)</td></tr> |
|
2593 | <td>when to colorize (boolean, always, auto, never, or debug)</td></tr> | |
2594 | <tr><td></td> |
|
2594 | <tr><td></td> | |
2595 | <td>--config CONFIG [+]</td> |
|
2595 | <td>--config CONFIG [+]</td> | |
2596 | <td>set/override config option (use 'section.name=value')</td></tr> |
|
2596 | <td>set/override config option (use 'section.name=value')</td></tr> | |
2597 | <tr><td></td> |
|
2597 | <tr><td></td> | |
2598 | <td>--debug</td> |
|
2598 | <td>--debug</td> | |
2599 | <td>enable debugging output</td></tr> |
|
2599 | <td>enable debugging output</td></tr> | |
2600 | <tr><td></td> |
|
2600 | <tr><td></td> | |
2601 | <td>--debugger</td> |
|
2601 | <td>--debugger</td> | |
2602 | <td>start debugger</td></tr> |
|
2602 | <td>start debugger</td></tr> | |
2603 | <tr><td></td> |
|
2603 | <tr><td></td> | |
2604 | <td>--encoding ENCODE</td> |
|
2604 | <td>--encoding ENCODE</td> | |
2605 | <td>set the charset encoding (default: ascii)</td></tr> |
|
2605 | <td>set the charset encoding (default: ascii)</td></tr> | |
2606 | <tr><td></td> |
|
2606 | <tr><td></td> | |
2607 | <td>--encodingmode MODE</td> |
|
2607 | <td>--encodingmode MODE</td> | |
2608 | <td>set the charset encoding mode (default: strict)</td></tr> |
|
2608 | <td>set the charset encoding mode (default: strict)</td></tr> | |
2609 | <tr><td></td> |
|
2609 | <tr><td></td> | |
2610 | <td>--traceback</td> |
|
2610 | <td>--traceback</td> | |
2611 | <td>always print a traceback on exception</td></tr> |
|
2611 | <td>always print a traceback on exception</td></tr> | |
2612 | <tr><td></td> |
|
2612 | <tr><td></td> | |
2613 | <td>--time</td> |
|
2613 | <td>--time</td> | |
2614 | <td>time how long the command takes</td></tr> |
|
2614 | <td>time how long the command takes</td></tr> | |
2615 | <tr><td></td> |
|
2615 | <tr><td></td> | |
2616 | <td>--profile</td> |
|
2616 | <td>--profile</td> | |
2617 | <td>print command execution profile</td></tr> |
|
2617 | <td>print command execution profile</td></tr> | |
2618 | <tr><td></td> |
|
2618 | <tr><td></td> | |
2619 | <td>--version</td> |
|
2619 | <td>--version</td> | |
2620 | <td>output version information and exit</td></tr> |
|
2620 | <td>output version information and exit</td></tr> | |
2621 | <tr><td>-h</td> |
|
2621 | <tr><td>-h</td> | |
2622 | <td>--help</td> |
|
2622 | <td>--help</td> | |
2623 | <td>display help and exit</td></tr> |
|
2623 | <td>display help and exit</td></tr> | |
2624 | <tr><td></td> |
|
2624 | <tr><td></td> | |
2625 | <td>--hidden</td> |
|
2625 | <td>--hidden</td> | |
2626 | <td>consider hidden changesets</td></tr> |
|
2626 | <td>consider hidden changesets</td></tr> | |
2627 | <tr><td></td> |
|
2627 | <tr><td></td> | |
2628 | <td>--pager TYPE</td> |
|
2628 | <td>--pager TYPE</td> | |
2629 | <td>when to paginate (boolean, always, auto, or never) (default: auto)</td></tr> |
|
2629 | <td>when to paginate (boolean, always, auto, or never) (default: auto)</td></tr> | |
2630 | </table> |
|
2630 | </table> | |
2631 |
|
2631 | |||
2632 | </div> |
|
2632 | </div> | |
2633 | </div> |
|
2633 | </div> | |
2634 | </div> |
|
2634 | </div> | |
2635 |
|
2635 | |||
2636 |
|
2636 | |||
2637 |
|
2637 | |||
2638 | </body> |
|
2638 | </body> | |
2639 | </html> |
|
2639 | </html> | |
2640 |
|
2640 | |||
2641 |
|
2641 | |||
2642 | $ get-with-headers.py $LOCALIP:$HGPORT "help/remove" |
|
2642 | $ get-with-headers.py $LOCALIP:$HGPORT "help/remove" | |
2643 | 200 Script output follows |
|
2643 | 200 Script output follows | |
2644 |
|
2644 | |||
2645 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> |
|
2645 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> | |
2646 | <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US"> |
|
2646 | <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US"> | |
2647 | <head> |
|
2647 | <head> | |
2648 | <link rel="icon" href="/static/hgicon.png" type="image/png" /> |
|
2648 | <link rel="icon" href="/static/hgicon.png" type="image/png" /> | |
2649 | <meta name="robots" content="index, nofollow" /> |
|
2649 | <meta name="robots" content="index, nofollow" /> | |
2650 | <link rel="stylesheet" href="/static/style-paper.css" type="text/css" /> |
|
2650 | <link rel="stylesheet" href="/static/style-paper.css" type="text/css" /> | |
2651 | <script type="text/javascript" src="/static/mercurial.js"></script> |
|
2651 | <script type="text/javascript" src="/static/mercurial.js"></script> | |
2652 |
|
2652 | |||
2653 | <title>Help: remove</title> |
|
2653 | <title>Help: remove</title> | |
2654 | </head> |
|
2654 | </head> | |
2655 | <body> |
|
2655 | <body> | |
2656 |
|
2656 | |||
2657 | <div class="container"> |
|
2657 | <div class="container"> | |
2658 | <div class="menu"> |
|
2658 | <div class="menu"> | |
2659 | <div class="logo"> |
|
2659 | <div class="logo"> | |
2660 | <a href="https://mercurial-scm.org/"> |
|
2660 | <a href="https://mercurial-scm.org/"> | |
2661 | <img src="/static/hglogo.png" alt="mercurial" /></a> |
|
2661 | <img src="/static/hglogo.png" alt="mercurial" /></a> | |
2662 | </div> |
|
2662 | </div> | |
2663 | <ul> |
|
2663 | <ul> | |
2664 | <li><a href="/shortlog">log</a></li> |
|
2664 | <li><a href="/shortlog">log</a></li> | |
2665 | <li><a href="/graph">graph</a></li> |
|
2665 | <li><a href="/graph">graph</a></li> | |
2666 | <li><a href="/tags">tags</a></li> |
|
2666 | <li><a href="/tags">tags</a></li> | |
2667 | <li><a href="/bookmarks">bookmarks</a></li> |
|
2667 | <li><a href="/bookmarks">bookmarks</a></li> | |
2668 | <li><a href="/branches">branches</a></li> |
|
2668 | <li><a href="/branches">branches</a></li> | |
2669 | </ul> |
|
2669 | </ul> | |
2670 | <ul> |
|
2670 | <ul> | |
2671 | <li class="active"><a href="/help">help</a></li> |
|
2671 | <li class="active"><a href="/help">help</a></li> | |
2672 | </ul> |
|
2672 | </ul> | |
2673 | </div> |
|
2673 | </div> | |
2674 |
|
2674 | |||
2675 | <div class="main"> |
|
2675 | <div class="main"> | |
2676 | <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2> |
|
2676 | <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2> | |
2677 | <h3>Help: remove</h3> |
|
2677 | <h3>Help: remove</h3> | |
2678 |
|
2678 | |||
2679 | <form class="search" action="/log"> |
|
2679 | <form class="search" action="/log"> | |
2680 |
|
2680 | |||
2681 | <p><input name="rev" id="search1" type="text" size="30" /></p> |
|
2681 | <p><input name="rev" id="search1" type="text" size="30" /></p> | |
2682 | <div id="hint">Find changesets by keywords (author, files, the commit message), revision |
|
2682 | <div id="hint">Find changesets by keywords (author, files, the commit message), revision | |
2683 | number or hash, or <a href="/help/revsets">revset expression</a>.</div> |
|
2683 | number or hash, or <a href="/help/revsets">revset expression</a>.</div> | |
2684 | </form> |
|
2684 | </form> | |
2685 | <div id="doc"> |
|
2685 | <div id="doc"> | |
2686 | <p> |
|
2686 | <p> | |
2687 | hg remove [OPTION]... FILE... |
|
2687 | hg remove [OPTION]... FILE... | |
2688 | </p> |
|
2688 | </p> | |
2689 | <p> |
|
2689 | <p> | |
2690 | aliases: rm |
|
2690 | aliases: rm | |
2691 | </p> |
|
2691 | </p> | |
2692 | <p> |
|
2692 | <p> | |
2693 | remove the specified files on the next commit |
|
2693 | remove the specified files on the next commit | |
2694 | </p> |
|
2694 | </p> | |
2695 | <p> |
|
2695 | <p> | |
2696 | Schedule the indicated files for removal from the current branch. |
|
2696 | Schedule the indicated files for removal from the current branch. | |
2697 | </p> |
|
2697 | </p> | |
2698 | <p> |
|
2698 | <p> | |
2699 | This command schedules the files to be removed at the next commit. |
|
2699 | This command schedules the files to be removed at the next commit. | |
2700 | To undo a remove before that, see 'hg revert'. To undo added |
|
2700 | To undo a remove before that, see 'hg revert'. To undo added | |
2701 | files, see 'hg forget'. |
|
2701 | files, see 'hg forget'. | |
2702 | </p> |
|
2702 | </p> | |
2703 | <p> |
|
2703 | <p> | |
2704 | -A/--after can be used to remove only files that have already |
|
2704 | -A/--after can be used to remove only files that have already | |
2705 | been deleted, -f/--force can be used to force deletion, and -Af |
|
2705 | been deleted, -f/--force can be used to force deletion, and -Af | |
2706 | can be used to remove files from the next revision without |
|
2706 | can be used to remove files from the next revision without | |
2707 | deleting them from the working directory. |
|
2707 | deleting them from the working directory. | |
2708 | </p> |
|
2708 | </p> | |
2709 | <p> |
|
2709 | <p> | |
2710 | The following table details the behavior of remove for different |
|
2710 | The following table details the behavior of remove for different | |
2711 | file states (columns) and option combinations (rows). The file |
|
2711 | file states (columns) and option combinations (rows). The file | |
2712 | states are Added [A], Clean [C], Modified [M] and Missing [!] |
|
2712 | states are Added [A], Clean [C], Modified [M] and Missing [!] | |
2713 | (as reported by 'hg status'). The actions are Warn, Remove |
|
2713 | (as reported by 'hg status'). The actions are Warn, Remove | |
2714 | (from branch) and Delete (from disk): |
|
2714 | (from branch) and Delete (from disk): | |
2715 | </p> |
|
2715 | </p> | |
2716 | <table> |
|
2716 | <table> | |
2717 | <tr><td>opt/state</td> |
|
2717 | <tr><td>opt/state</td> | |
2718 | <td>A</td> |
|
2718 | <td>A</td> | |
2719 | <td>C</td> |
|
2719 | <td>C</td> | |
2720 | <td>M</td> |
|
2720 | <td>M</td> | |
2721 | <td>!</td></tr> |
|
2721 | <td>!</td></tr> | |
2722 | <tr><td>none</td> |
|
2722 | <tr><td>none</td> | |
2723 | <td>W</td> |
|
2723 | <td>W</td> | |
2724 | <td>RD</td> |
|
2724 | <td>RD</td> | |
2725 | <td>W</td> |
|
2725 | <td>W</td> | |
2726 | <td>R</td></tr> |
|
2726 | <td>R</td></tr> | |
2727 | <tr><td>-f</td> |
|
2727 | <tr><td>-f</td> | |
2728 | <td>R</td> |
|
2728 | <td>R</td> | |
2729 | <td>RD</td> |
|
2729 | <td>RD</td> | |
2730 | <td>RD</td> |
|
2730 | <td>RD</td> | |
2731 | <td>R</td></tr> |
|
2731 | <td>R</td></tr> | |
2732 | <tr><td>-A</td> |
|
2732 | <tr><td>-A</td> | |
2733 | <td>W</td> |
|
2733 | <td>W</td> | |
2734 | <td>W</td> |
|
2734 | <td>W</td> | |
2735 | <td>W</td> |
|
2735 | <td>W</td> | |
2736 | <td>R</td></tr> |
|
2736 | <td>R</td></tr> | |
2737 | <tr><td>-Af</td> |
|
2737 | <tr><td>-Af</td> | |
2738 | <td>R</td> |
|
2738 | <td>R</td> | |
2739 | <td>R</td> |
|
2739 | <td>R</td> | |
2740 | <td>R</td> |
|
2740 | <td>R</td> | |
2741 | <td>R</td></tr> |
|
2741 | <td>R</td></tr> | |
2742 | </table> |
|
2742 | </table> | |
2743 | <p> |
|
2743 | <p> | |
2744 | <b>Note:</b> |
|
2744 | <b>Note:</b> | |
2745 | </p> |
|
2745 | </p> | |
2746 | <p> |
|
2746 | <p> | |
2747 | 'hg remove' never deletes files in Added [A] state from the |
|
2747 | 'hg remove' never deletes files in Added [A] state from the | |
2748 | working directory, not even if "--force" is specified. |
|
2748 | working directory, not even if "--force" is specified. | |
2749 | </p> |
|
2749 | </p> | |
2750 | <p> |
|
2750 | <p> | |
2751 | Returns 0 on success, 1 if any warnings encountered. |
|
2751 | Returns 0 on success, 1 if any warnings encountered. | |
2752 | </p> |
|
2752 | </p> | |
2753 | <p> |
|
2753 | <p> | |
2754 | options ([+] can be repeated): |
|
2754 | options ([+] can be repeated): | |
2755 | </p> |
|
2755 | </p> | |
2756 | <table> |
|
2756 | <table> | |
2757 | <tr><td>-A</td> |
|
2757 | <tr><td>-A</td> | |
2758 | <td>--after</td> |
|
2758 | <td>--after</td> | |
2759 | <td>record delete for missing files</td></tr> |
|
2759 | <td>record delete for missing files</td></tr> | |
2760 | <tr><td>-f</td> |
|
2760 | <tr><td>-f</td> | |
2761 | <td>--force</td> |
|
2761 | <td>--force</td> | |
2762 | <td>forget added files, delete modified files</td></tr> |
|
2762 | <td>forget added files, delete modified files</td></tr> | |
2763 | <tr><td>-S</td> |
|
2763 | <tr><td>-S</td> | |
2764 | <td>--subrepos</td> |
|
2764 | <td>--subrepos</td> | |
2765 | <td>recurse into subrepositories</td></tr> |
|
2765 | <td>recurse into subrepositories</td></tr> | |
2766 | <tr><td>-I</td> |
|
2766 | <tr><td>-I</td> | |
2767 | <td>--include PATTERN [+]</td> |
|
2767 | <td>--include PATTERN [+]</td> | |
2768 | <td>include names matching the given patterns</td></tr> |
|
2768 | <td>include names matching the given patterns</td></tr> | |
2769 | <tr><td>-X</td> |
|
2769 | <tr><td>-X</td> | |
2770 | <td>--exclude PATTERN [+]</td> |
|
2770 | <td>--exclude PATTERN [+]</td> | |
2771 | <td>exclude names matching the given patterns</td></tr> |
|
2771 | <td>exclude names matching the given patterns</td></tr> | |
2772 | </table> |
|
2772 | </table> | |
2773 | <p> |
|
2773 | <p> | |
2774 | global options ([+] can be repeated): |
|
2774 | global options ([+] can be repeated): | |
2775 | </p> |
|
2775 | </p> | |
2776 | <table> |
|
2776 | <table> | |
2777 | <tr><td>-R</td> |
|
2777 | <tr><td>-R</td> | |
2778 | <td>--repository REPO</td> |
|
2778 | <td>--repository REPO</td> | |
2779 | <td>repository root directory or name of overlay bundle file</td></tr> |
|
2779 | <td>repository root directory or name of overlay bundle file</td></tr> | |
2780 | <tr><td></td> |
|
2780 | <tr><td></td> | |
2781 | <td>--cwd DIR</td> |
|
2781 | <td>--cwd DIR</td> | |
2782 | <td>change working directory</td></tr> |
|
2782 | <td>change working directory</td></tr> | |
2783 | <tr><td>-y</td> |
|
2783 | <tr><td>-y</td> | |
2784 | <td>--noninteractive</td> |
|
2784 | <td>--noninteractive</td> | |
2785 | <td>do not prompt, automatically pick the first choice for all prompts</td></tr> |
|
2785 | <td>do not prompt, automatically pick the first choice for all prompts</td></tr> | |
2786 | <tr><td>-q</td> |
|
2786 | <tr><td>-q</td> | |
2787 | <td>--quiet</td> |
|
2787 | <td>--quiet</td> | |
2788 | <td>suppress output</td></tr> |
|
2788 | <td>suppress output</td></tr> | |
2789 | <tr><td>-v</td> |
|
2789 | <tr><td>-v</td> | |
2790 | <td>--verbose</td> |
|
2790 | <td>--verbose</td> | |
2791 | <td>enable additional output</td></tr> |
|
2791 | <td>enable additional output</td></tr> | |
2792 | <tr><td></td> |
|
2792 | <tr><td></td> | |
2793 | <td>--color TYPE</td> |
|
2793 | <td>--color TYPE</td> | |
2794 | <td>when to colorize (boolean, always, auto, never, or debug)</td></tr> |
|
2794 | <td>when to colorize (boolean, always, auto, never, or debug)</td></tr> | |
2795 | <tr><td></td> |
|
2795 | <tr><td></td> | |
2796 | <td>--config CONFIG [+]</td> |
|
2796 | <td>--config CONFIG [+]</td> | |
2797 | <td>set/override config option (use 'section.name=value')</td></tr> |
|
2797 | <td>set/override config option (use 'section.name=value')</td></tr> | |
2798 | <tr><td></td> |
|
2798 | <tr><td></td> | |
2799 | <td>--debug</td> |
|
2799 | <td>--debug</td> | |
2800 | <td>enable debugging output</td></tr> |
|
2800 | <td>enable debugging output</td></tr> | |
2801 | <tr><td></td> |
|
2801 | <tr><td></td> | |
2802 | <td>--debugger</td> |
|
2802 | <td>--debugger</td> | |
2803 | <td>start debugger</td></tr> |
|
2803 | <td>start debugger</td></tr> | |
2804 | <tr><td></td> |
|
2804 | <tr><td></td> | |
2805 | <td>--encoding ENCODE</td> |
|
2805 | <td>--encoding ENCODE</td> | |
2806 | <td>set the charset encoding (default: ascii)</td></tr> |
|
2806 | <td>set the charset encoding (default: ascii)</td></tr> | |
2807 | <tr><td></td> |
|
2807 | <tr><td></td> | |
2808 | <td>--encodingmode MODE</td> |
|
2808 | <td>--encodingmode MODE</td> | |
2809 | <td>set the charset encoding mode (default: strict)</td></tr> |
|
2809 | <td>set the charset encoding mode (default: strict)</td></tr> | |
2810 | <tr><td></td> |
|
2810 | <tr><td></td> | |
2811 | <td>--traceback</td> |
|
2811 | <td>--traceback</td> | |
2812 | <td>always print a traceback on exception</td></tr> |
|
2812 | <td>always print a traceback on exception</td></tr> | |
2813 | <tr><td></td> |
|
2813 | <tr><td></td> | |
2814 | <td>--time</td> |
|
2814 | <td>--time</td> | |
2815 | <td>time how long the command takes</td></tr> |
|
2815 | <td>time how long the command takes</td></tr> | |
2816 | <tr><td></td> |
|
2816 | <tr><td></td> | |
2817 | <td>--profile</td> |
|
2817 | <td>--profile</td> | |
2818 | <td>print command execution profile</td></tr> |
|
2818 | <td>print command execution profile</td></tr> | |
2819 | <tr><td></td> |
|
2819 | <tr><td></td> | |
2820 | <td>--version</td> |
|
2820 | <td>--version</td> | |
2821 | <td>output version information and exit</td></tr> |
|
2821 | <td>output version information and exit</td></tr> | |
2822 | <tr><td>-h</td> |
|
2822 | <tr><td>-h</td> | |
2823 | <td>--help</td> |
|
2823 | <td>--help</td> | |
2824 | <td>display help and exit</td></tr> |
|
2824 | <td>display help and exit</td></tr> | |
2825 | <tr><td></td> |
|
2825 | <tr><td></td> | |
2826 | <td>--hidden</td> |
|
2826 | <td>--hidden</td> | |
2827 | <td>consider hidden changesets</td></tr> |
|
2827 | <td>consider hidden changesets</td></tr> | |
2828 | <tr><td></td> |
|
2828 | <tr><td></td> | |
2829 | <td>--pager TYPE</td> |
|
2829 | <td>--pager TYPE</td> | |
2830 | <td>when to paginate (boolean, always, auto, or never) (default: auto)</td></tr> |
|
2830 | <td>when to paginate (boolean, always, auto, or never) (default: auto)</td></tr> | |
2831 | </table> |
|
2831 | </table> | |
2832 |
|
2832 | |||
2833 | </div> |
|
2833 | </div> | |
2834 | </div> |
|
2834 | </div> | |
2835 | </div> |
|
2835 | </div> | |
2836 |
|
2836 | |||
2837 |
|
2837 | |||
2838 |
|
2838 | |||
2839 | </body> |
|
2839 | </body> | |
2840 | </html> |
|
2840 | </html> | |
2841 |
|
2841 | |||
2842 |
|
2842 | |||
2843 | $ get-with-headers.py $LOCALIP:$HGPORT "help/dates" |
|
2843 | $ get-with-headers.py $LOCALIP:$HGPORT "help/dates" | |
2844 | 200 Script output follows |
|
2844 | 200 Script output follows | |
2845 |
|
2845 | |||
2846 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> |
|
2846 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> | |
2847 | <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US"> |
|
2847 | <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US"> | |
2848 | <head> |
|
2848 | <head> | |
2849 | <link rel="icon" href="/static/hgicon.png" type="image/png" /> |
|
2849 | <link rel="icon" href="/static/hgicon.png" type="image/png" /> | |
2850 | <meta name="robots" content="index, nofollow" /> |
|
2850 | <meta name="robots" content="index, nofollow" /> | |
2851 | <link rel="stylesheet" href="/static/style-paper.css" type="text/css" /> |
|
2851 | <link rel="stylesheet" href="/static/style-paper.css" type="text/css" /> | |
2852 | <script type="text/javascript" src="/static/mercurial.js"></script> |
|
2852 | <script type="text/javascript" src="/static/mercurial.js"></script> | |
2853 |
|
2853 | |||
2854 | <title>Help: dates</title> |
|
2854 | <title>Help: dates</title> | |
2855 | </head> |
|
2855 | </head> | |
2856 | <body> |
|
2856 | <body> | |
2857 |
|
2857 | |||
2858 | <div class="container"> |
|
2858 | <div class="container"> | |
2859 | <div class="menu"> |
|
2859 | <div class="menu"> | |
2860 | <div class="logo"> |
|
2860 | <div class="logo"> | |
2861 | <a href="https://mercurial-scm.org/"> |
|
2861 | <a href="https://mercurial-scm.org/"> | |
2862 | <img src="/static/hglogo.png" alt="mercurial" /></a> |
|
2862 | <img src="/static/hglogo.png" alt="mercurial" /></a> | |
2863 | </div> |
|
2863 | </div> | |
2864 | <ul> |
|
2864 | <ul> | |
2865 | <li><a href="/shortlog">log</a></li> |
|
2865 | <li><a href="/shortlog">log</a></li> | |
2866 | <li><a href="/graph">graph</a></li> |
|
2866 | <li><a href="/graph">graph</a></li> | |
2867 | <li><a href="/tags">tags</a></li> |
|
2867 | <li><a href="/tags">tags</a></li> | |
2868 | <li><a href="/bookmarks">bookmarks</a></li> |
|
2868 | <li><a href="/bookmarks">bookmarks</a></li> | |
2869 | <li><a href="/branches">branches</a></li> |
|
2869 | <li><a href="/branches">branches</a></li> | |
2870 | </ul> |
|
2870 | </ul> | |
2871 | <ul> |
|
2871 | <ul> | |
2872 | <li class="active"><a href="/help">help</a></li> |
|
2872 | <li class="active"><a href="/help">help</a></li> | |
2873 | </ul> |
|
2873 | </ul> | |
2874 | </div> |
|
2874 | </div> | |
2875 |
|
2875 | |||
2876 | <div class="main"> |
|
2876 | <div class="main"> | |
2877 | <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2> |
|
2877 | <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2> | |
2878 | <h3>Help: dates</h3> |
|
2878 | <h3>Help: dates</h3> | |
2879 |
|
2879 | |||
2880 | <form class="search" action="/log"> |
|
2880 | <form class="search" action="/log"> | |
2881 |
|
2881 | |||
2882 | <p><input name="rev" id="search1" type="text" size="30" /></p> |
|
2882 | <p><input name="rev" id="search1" type="text" size="30" /></p> | |
2883 | <div id="hint">Find changesets by keywords (author, files, the commit message), revision |
|
2883 | <div id="hint">Find changesets by keywords (author, files, the commit message), revision | |
2884 | number or hash, or <a href="/help/revsets">revset expression</a>.</div> |
|
2884 | number or hash, or <a href="/help/revsets">revset expression</a>.</div> | |
2885 | </form> |
|
2885 | </form> | |
2886 | <div id="doc"> |
|
2886 | <div id="doc"> | |
2887 | <h1>Date Formats</h1> |
|
2887 | <h1>Date Formats</h1> | |
2888 | <p> |
|
2888 | <p> | |
2889 | Some commands allow the user to specify a date, e.g.: |
|
2889 | Some commands allow the user to specify a date, e.g.: | |
2890 | </p> |
|
2890 | </p> | |
2891 | <ul> |
|
2891 | <ul> | |
2892 | <li> backout, commit, import, tag: Specify the commit date. |
|
2892 | <li> backout, commit, import, tag: Specify the commit date. | |
2893 | <li> log, revert, update: Select revision(s) by date. |
|
2893 | <li> log, revert, update: Select revision(s) by date. | |
2894 | </ul> |
|
2894 | </ul> | |
2895 | <p> |
|
2895 | <p> | |
2896 | Many date formats are valid. Here are some examples: |
|
2896 | Many date formats are valid. Here are some examples: | |
2897 | </p> |
|
2897 | </p> | |
2898 | <ul> |
|
2898 | <ul> | |
2899 | <li> "Wed Dec 6 13:18:29 2006" (local timezone assumed) |
|
2899 | <li> "Wed Dec 6 13:18:29 2006" (local timezone assumed) | |
2900 | <li> "Dec 6 13:18 -0600" (year assumed, time offset provided) |
|
2900 | <li> "Dec 6 13:18 -0600" (year assumed, time offset provided) | |
2901 | <li> "Dec 6 13:18 UTC" (UTC and GMT are aliases for +0000) |
|
2901 | <li> "Dec 6 13:18 UTC" (UTC and GMT are aliases for +0000) | |
2902 | <li> "Dec 6" (midnight) |
|
2902 | <li> "Dec 6" (midnight) | |
2903 | <li> "13:18" (today assumed) |
|
2903 | <li> "13:18" (today assumed) | |
2904 | <li> "3:39" (3:39AM assumed) |
|
2904 | <li> "3:39" (3:39AM assumed) | |
2905 | <li> "3:39pm" (15:39) |
|
2905 | <li> "3:39pm" (15:39) | |
2906 | <li> "2006-12-06 13:18:29" (ISO 8601 format) |
|
2906 | <li> "2006-12-06 13:18:29" (ISO 8601 format) | |
2907 | <li> "2006-12-6 13:18" |
|
2907 | <li> "2006-12-6 13:18" | |
2908 | <li> "2006-12-6" |
|
2908 | <li> "2006-12-6" | |
2909 | <li> "12-6" |
|
2909 | <li> "12-6" | |
2910 | <li> "12/6" |
|
2910 | <li> "12/6" | |
2911 | <li> "12/6/6" (Dec 6 2006) |
|
2911 | <li> "12/6/6" (Dec 6 2006) | |
2912 | <li> "today" (midnight) |
|
2912 | <li> "today" (midnight) | |
2913 | <li> "yesterday" (midnight) |
|
2913 | <li> "yesterday" (midnight) | |
2914 | <li> "now" - right now |
|
2914 | <li> "now" - right now | |
2915 | </ul> |
|
2915 | </ul> | |
2916 | <p> |
|
2916 | <p> | |
2917 | Lastly, there is Mercurial's internal format: |
|
2917 | Lastly, there is Mercurial's internal format: | |
2918 | </p> |
|
2918 | </p> | |
2919 | <ul> |
|
2919 | <ul> | |
2920 | <li> "1165411109 0" (Wed Dec 6 13:18:29 2006 UTC) |
|
2920 | <li> "1165411109 0" (Wed Dec 6 13:18:29 2006 UTC) | |
2921 | </ul> |
|
2921 | </ul> | |
2922 | <p> |
|
2922 | <p> | |
2923 | This is the internal representation format for dates. The first number |
|
2923 | This is the internal representation format for dates. The first number | |
2924 | is the number of seconds since the epoch (1970-01-01 00:00 UTC). The |
|
2924 | is the number of seconds since the epoch (1970-01-01 00:00 UTC). The | |
2925 | second is the offset of the local timezone, in seconds west of UTC |
|
2925 | second is the offset of the local timezone, in seconds west of UTC | |
2926 | (negative if the timezone is east of UTC). |
|
2926 | (negative if the timezone is east of UTC). | |
2927 | </p> |
|
2927 | </p> | |
2928 | <p> |
|
2928 | <p> | |
2929 | The log command also accepts date ranges: |
|
2929 | The log command also accepts date ranges: | |
2930 | </p> |
|
2930 | </p> | |
2931 | <ul> |
|
2931 | <ul> | |
2932 | <li> "<DATE" - at or before a given date/time |
|
2932 | <li> "<DATE" - at or before a given date/time | |
2933 | <li> ">DATE" - on or after a given date/time |
|
2933 | <li> ">DATE" - on or after a given date/time | |
2934 | <li> "DATE to DATE" - a date range, inclusive |
|
2934 | <li> "DATE to DATE" - a date range, inclusive | |
2935 | <li> "-DAYS" - within a given number of days of today |
|
2935 | <li> "-DAYS" - within a given number of days of today | |
2936 | </ul> |
|
2936 | </ul> | |
2937 |
|
2937 | |||
2938 | </div> |
|
2938 | </div> | |
2939 | </div> |
|
2939 | </div> | |
2940 | </div> |
|
2940 | </div> | |
2941 |
|
2941 | |||
2942 |
|
2942 | |||
2943 |
|
2943 | |||
2944 | </body> |
|
2944 | </body> | |
2945 | </html> |
|
2945 | </html> | |
2946 |
|
2946 | |||
2947 |
|
2947 | |||
2948 | Sub-topic indexes rendered properly |
|
2948 | Sub-topic indexes rendered properly | |
2949 |
|
2949 | |||
2950 | $ get-with-headers.py $LOCALIP:$HGPORT "help/internals" |
|
2950 | $ get-with-headers.py $LOCALIP:$HGPORT "help/internals" | |
2951 | 200 Script output follows |
|
2951 | 200 Script output follows | |
2952 |
|
2952 | |||
2953 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> |
|
2953 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> | |
2954 | <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US"> |
|
2954 | <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US"> | |
2955 | <head> |
|
2955 | <head> | |
2956 | <link rel="icon" href="/static/hgicon.png" type="image/png" /> |
|
2956 | <link rel="icon" href="/static/hgicon.png" type="image/png" /> | |
2957 | <meta name="robots" content="index, nofollow" /> |
|
2957 | <meta name="robots" content="index, nofollow" /> | |
2958 | <link rel="stylesheet" href="/static/style-paper.css" type="text/css" /> |
|
2958 | <link rel="stylesheet" href="/static/style-paper.css" type="text/css" /> | |
2959 | <script type="text/javascript" src="/static/mercurial.js"></script> |
|
2959 | <script type="text/javascript" src="/static/mercurial.js"></script> | |
2960 |
|
2960 | |||
2961 | <title>Help: internals</title> |
|
2961 | <title>Help: internals</title> | |
2962 | </head> |
|
2962 | </head> | |
2963 | <body> |
|
2963 | <body> | |
2964 |
|
2964 | |||
2965 | <div class="container"> |
|
2965 | <div class="container"> | |
2966 | <div class="menu"> |
|
2966 | <div class="menu"> | |
2967 | <div class="logo"> |
|
2967 | <div class="logo"> | |
2968 | <a href="https://mercurial-scm.org/"> |
|
2968 | <a href="https://mercurial-scm.org/"> | |
2969 | <img src="/static/hglogo.png" alt="mercurial" /></a> |
|
2969 | <img src="/static/hglogo.png" alt="mercurial" /></a> | |
2970 | </div> |
|
2970 | </div> | |
2971 | <ul> |
|
2971 | <ul> | |
2972 | <li><a href="/shortlog">log</a></li> |
|
2972 | <li><a href="/shortlog">log</a></li> | |
2973 | <li><a href="/graph">graph</a></li> |
|
2973 | <li><a href="/graph">graph</a></li> | |
2974 | <li><a href="/tags">tags</a></li> |
|
2974 | <li><a href="/tags">tags</a></li> | |
2975 | <li><a href="/bookmarks">bookmarks</a></li> |
|
2975 | <li><a href="/bookmarks">bookmarks</a></li> | |
2976 | <li><a href="/branches">branches</a></li> |
|
2976 | <li><a href="/branches">branches</a></li> | |
2977 | </ul> |
|
2977 | </ul> | |
2978 | <ul> |
|
2978 | <ul> | |
2979 | <li><a href="/help">help</a></li> |
|
2979 | <li><a href="/help">help</a></li> | |
2980 | </ul> |
|
2980 | </ul> | |
2981 | </div> |
|
2981 | </div> | |
2982 |
|
2982 | |||
2983 | <div class="main"> |
|
2983 | <div class="main"> | |
2984 | <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2> |
|
2984 | <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2> | |
2985 | <form class="search" action="/log"> |
|
2985 | <form class="search" action="/log"> | |
2986 |
|
2986 | |||
2987 | <p><input name="rev" id="search1" type="text" size="30" /></p> |
|
2987 | <p><input name="rev" id="search1" type="text" size="30" /></p> | |
2988 | <div id="hint">Find changesets by keywords (author, files, the commit message), revision |
|
2988 | <div id="hint">Find changesets by keywords (author, files, the commit message), revision | |
2989 | number or hash, or <a href="/help/revsets">revset expression</a>.</div> |
|
2989 | number or hash, or <a href="/help/revsets">revset expression</a>.</div> | |
2990 | </form> |
|
2990 | </form> | |
2991 | <table class="bigtable"> |
|
2991 | <table class="bigtable"> | |
2992 | <tr><td colspan="2"><h2><a name="topics" href="#topics">Topics</a></h2></td></tr> |
|
2992 | <tr><td colspan="2"><h2><a name="topics" href="#topics">Topics</a></h2></td></tr> | |
2993 |
|
2993 | |||
2994 | <tr><td> |
|
2994 | <tr><td> | |
2995 | <a href="/help/internals.bundles"> |
|
2995 | <a href="/help/internals.bundles"> | |
2996 | bundles |
|
2996 | bundles | |
2997 | </a> |
|
2997 | </a> | |
2998 | </td><td> |
|
2998 | </td><td> | |
2999 | Bundles |
|
2999 | Bundles | |
3000 | </td></tr> |
|
3000 | </td></tr> | |
3001 | <tr><td> |
|
3001 | <tr><td> | |
3002 | <a href="/help/internals.censor"> |
|
3002 | <a href="/help/internals.censor"> | |
3003 | censor |
|
3003 | censor | |
3004 | </a> |
|
3004 | </a> | |
3005 | </td><td> |
|
3005 | </td><td> | |
3006 | Censor |
|
3006 | Censor | |
3007 | </td></tr> |
|
3007 | </td></tr> | |
3008 | <tr><td> |
|
3008 | <tr><td> | |
3009 | <a href="/help/internals.changegroups"> |
|
3009 | <a href="/help/internals.changegroups"> | |
3010 | changegroups |
|
3010 | changegroups | |
3011 | </a> |
|
3011 | </a> | |
3012 | </td><td> |
|
3012 | </td><td> | |
3013 | Changegroups |
|
3013 | Changegroups | |
3014 | </td></tr> |
|
3014 | </td></tr> | |
3015 | <tr><td> |
|
3015 | <tr><td> | |
3016 | <a href="/help/internals.requirements"> |
|
3016 | <a href="/help/internals.requirements"> | |
3017 | requirements |
|
3017 | requirements | |
3018 | </a> |
|
3018 | </a> | |
3019 | </td><td> |
|
3019 | </td><td> | |
3020 | Repository Requirements |
|
3020 | Repository Requirements | |
3021 | </td></tr> |
|
3021 | </td></tr> | |
3022 | <tr><td> |
|
3022 | <tr><td> | |
3023 | <a href="/help/internals.revlogs"> |
|
3023 | <a href="/help/internals.revlogs"> | |
3024 | revlogs |
|
3024 | revlogs | |
3025 | </a> |
|
3025 | </a> | |
3026 | </td><td> |
|
3026 | </td><td> | |
3027 | Revision Logs |
|
3027 | Revision Logs | |
3028 | </td></tr> |
|
3028 | </td></tr> | |
3029 | <tr><td> |
|
3029 | <tr><td> | |
3030 | <a href="/help/internals.wireprotocol"> |
|
3030 | <a href="/help/internals.wireprotocol"> | |
3031 | wireprotocol |
|
3031 | wireprotocol | |
3032 | </a> |
|
3032 | </a> | |
3033 | </td><td> |
|
3033 | </td><td> | |
3034 | Wire Protocol |
|
3034 | Wire Protocol | |
3035 | </td></tr> |
|
3035 | </td></tr> | |
3036 |
|
3036 | |||
3037 |
|
3037 | |||
3038 |
|
3038 | |||
3039 |
|
3039 | |||
3040 |
|
3040 | |||
3041 | </table> |
|
3041 | </table> | |
3042 | </div> |
|
3042 | </div> | |
3043 | </div> |
|
3043 | </div> | |
3044 |
|
3044 | |||
3045 |
|
3045 | |||
3046 |
|
3046 | |||
3047 | </body> |
|
3047 | </body> | |
3048 | </html> |
|
3048 | </html> | |
3049 |
|
3049 | |||
3050 |
|
3050 | |||
3051 | Sub-topic topics rendered properly |
|
3051 | Sub-topic topics rendered properly | |
3052 |
|
3052 | |||
3053 | $ get-with-headers.py $LOCALIP:$HGPORT "help/internals.changegroups" |
|
3053 | $ get-with-headers.py $LOCALIP:$HGPORT "help/internals.changegroups" | |
3054 | 200 Script output follows |
|
3054 | 200 Script output follows | |
3055 |
|
3055 | |||
3056 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> |
|
3056 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> | |
3057 | <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US"> |
|
3057 | <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US"> | |
3058 | <head> |
|
3058 | <head> | |
3059 | <link rel="icon" href="/static/hgicon.png" type="image/png" /> |
|
3059 | <link rel="icon" href="/static/hgicon.png" type="image/png" /> | |
3060 | <meta name="robots" content="index, nofollow" /> |
|
3060 | <meta name="robots" content="index, nofollow" /> | |
3061 | <link rel="stylesheet" href="/static/style-paper.css" type="text/css" /> |
|
3061 | <link rel="stylesheet" href="/static/style-paper.css" type="text/css" /> | |
3062 | <script type="text/javascript" src="/static/mercurial.js"></script> |
|
3062 | <script type="text/javascript" src="/static/mercurial.js"></script> | |
3063 |
|
3063 | |||
3064 | <title>Help: internals.changegroups</title> |
|
3064 | <title>Help: internals.changegroups</title> | |
3065 | </head> |
|
3065 | </head> | |
3066 | <body> |
|
3066 | <body> | |
3067 |
|
3067 | |||
3068 | <div class="container"> |
|
3068 | <div class="container"> | |
3069 | <div class="menu"> |
|
3069 | <div class="menu"> | |
3070 | <div class="logo"> |
|
3070 | <div class="logo"> | |
3071 | <a href="https://mercurial-scm.org/"> |
|
3071 | <a href="https://mercurial-scm.org/"> | |
3072 | <img src="/static/hglogo.png" alt="mercurial" /></a> |
|
3072 | <img src="/static/hglogo.png" alt="mercurial" /></a> | |
3073 | </div> |
|
3073 | </div> | |
3074 | <ul> |
|
3074 | <ul> | |
3075 | <li><a href="/shortlog">log</a></li> |
|
3075 | <li><a href="/shortlog">log</a></li> | |
3076 | <li><a href="/graph">graph</a></li> |
|
3076 | <li><a href="/graph">graph</a></li> | |
3077 | <li><a href="/tags">tags</a></li> |
|
3077 | <li><a href="/tags">tags</a></li> | |
3078 | <li><a href="/bookmarks">bookmarks</a></li> |
|
3078 | <li><a href="/bookmarks">bookmarks</a></li> | |
3079 | <li><a href="/branches">branches</a></li> |
|
3079 | <li><a href="/branches">branches</a></li> | |
3080 | </ul> |
|
3080 | </ul> | |
3081 | <ul> |
|
3081 | <ul> | |
3082 | <li class="active"><a href="/help">help</a></li> |
|
3082 | <li class="active"><a href="/help">help</a></li> | |
3083 | </ul> |
|
3083 | </ul> | |
3084 | </div> |
|
3084 | </div> | |
3085 |
|
3085 | |||
3086 | <div class="main"> |
|
3086 | <div class="main"> | |
3087 | <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2> |
|
3087 | <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2> | |
3088 | <h3>Help: internals.changegroups</h3> |
|
3088 | <h3>Help: internals.changegroups</h3> | |
3089 |
|
3089 | |||
3090 | <form class="search" action="/log"> |
|
3090 | <form class="search" action="/log"> | |
3091 |
|
3091 | |||
3092 | <p><input name="rev" id="search1" type="text" size="30" /></p> |
|
3092 | <p><input name="rev" id="search1" type="text" size="30" /></p> | |
3093 | <div id="hint">Find changesets by keywords (author, files, the commit message), revision |
|
3093 | <div id="hint">Find changesets by keywords (author, files, the commit message), revision | |
3094 | number or hash, or <a href="/help/revsets">revset expression</a>.</div> |
|
3094 | number or hash, or <a href="/help/revsets">revset expression</a>.</div> | |
3095 | </form> |
|
3095 | </form> | |
3096 | <div id="doc"> |
|
3096 | <div id="doc"> | |
3097 | <h1>Changegroups</h1> |
|
3097 | <h1>Changegroups</h1> | |
3098 | <p> |
|
3098 | <p> | |
3099 | Changegroups are representations of repository revlog data, specifically |
|
3099 | Changegroups are representations of repository revlog data, specifically | |
3100 | the changelog data, root/flat manifest data, treemanifest data, and |
|
3100 | the changelog data, root/flat manifest data, treemanifest data, and | |
3101 | filelogs. |
|
3101 | filelogs. | |
3102 | </p> |
|
3102 | </p> | |
3103 | <p> |
|
3103 | <p> | |
3104 | There are 3 versions of changegroups: "1", "2", and "3". From a |
|
3104 | There are 3 versions of changegroups: "1", "2", and "3". From a | |
3105 | high-level, versions "1" and "2" are almost exactly the same, with the |
|
3105 | high-level, versions "1" and "2" are almost exactly the same, with the | |
3106 | only difference being an additional item in the *delta header*. Version |
|
3106 | only difference being an additional item in the *delta header*. Version | |
3107 | "3" adds support for revlog flags in the *delta header* and optionally |
|
3107 | "3" adds support for revlog flags in the *delta header* and optionally | |
3108 | exchanging treemanifests (enabled by setting an option on the |
|
3108 | exchanging treemanifests (enabled by setting an option on the | |
3109 | "changegroup" part in the bundle2). |
|
3109 | "changegroup" part in the bundle2). | |
3110 | </p> |
|
3110 | </p> | |
3111 | <p> |
|
3111 | <p> | |
3112 | Changegroups when not exchanging treemanifests consist of 3 logical |
|
3112 | Changegroups when not exchanging treemanifests consist of 3 logical | |
3113 | segments: |
|
3113 | segments: | |
3114 | </p> |
|
3114 | </p> | |
3115 | <pre> |
|
3115 | <pre> | |
3116 | +---------------------------------+ |
|
3116 | +---------------------------------+ | |
3117 | | | | | |
|
3117 | | | | | | |
3118 | | changeset | manifest | filelogs | |
|
3118 | | changeset | manifest | filelogs | | |
3119 | | | | | |
|
3119 | | | | | | |
3120 | | | | | |
|
3120 | | | | | | |
3121 | +---------------------------------+ |
|
3121 | +---------------------------------+ | |
3122 | </pre> |
|
3122 | </pre> | |
3123 | <p> |
|
3123 | <p> | |
3124 | When exchanging treemanifests, there are 4 logical segments: |
|
3124 | When exchanging treemanifests, there are 4 logical segments: | |
3125 | </p> |
|
3125 | </p> | |
3126 | <pre> |
|
3126 | <pre> | |
3127 | +-------------------------------------------------+ |
|
3127 | +-------------------------------------------------+ | |
3128 | | | | | | |
|
3128 | | | | | | | |
3129 | | changeset | root | treemanifests | filelogs | |
|
3129 | | changeset | root | treemanifests | filelogs | | |
3130 | | | manifest | | | |
|
3130 | | | manifest | | | | |
3131 | | | | | | |
|
3131 | | | | | | | |
3132 | +-------------------------------------------------+ |
|
3132 | +-------------------------------------------------+ | |
3133 | </pre> |
|
3133 | </pre> | |
3134 | <p> |
|
3134 | <p> | |
3135 | The principle building block of each segment is a *chunk*. A *chunk* |
|
3135 | The principle building block of each segment is a *chunk*. A *chunk* | |
3136 | is a framed piece of data: |
|
3136 | is a framed piece of data: | |
3137 | </p> |
|
3137 | </p> | |
3138 | <pre> |
|
3138 | <pre> | |
3139 | +---------------------------------------+ |
|
3139 | +---------------------------------------+ | |
3140 | | | | |
|
3140 | | | | | |
3141 | | length | data | |
|
3141 | | length | data | | |
3142 | | (4 bytes) | (<length - 4> bytes) | |
|
3142 | | (4 bytes) | (<length - 4> bytes) | | |
3143 | | | | |
|
3143 | | | | | |
3144 | +---------------------------------------+ |
|
3144 | +---------------------------------------+ | |
3145 | </pre> |
|
3145 | </pre> | |
3146 | <p> |
|
3146 | <p> | |
3147 | All integers are big-endian signed integers. Each chunk starts with a 32-bit |
|
3147 | All integers are big-endian signed integers. Each chunk starts with a 32-bit | |
3148 | integer indicating the length of the entire chunk (including the length field |
|
3148 | integer indicating the length of the entire chunk (including the length field | |
3149 | itself). |
|
3149 | itself). | |
3150 | </p> |
|
3150 | </p> | |
3151 | <p> |
|
3151 | <p> | |
3152 | There is a special case chunk that has a value of 0 for the length |
|
3152 | There is a special case chunk that has a value of 0 for the length | |
3153 | ("0x00000000"). We call this an *empty chunk*. |
|
3153 | ("0x00000000"). We call this an *empty chunk*. | |
3154 | </p> |
|
3154 | </p> | |
3155 | <h2>Delta Groups</h2> |
|
3155 | <h2>Delta Groups</h2> | |
3156 | <p> |
|
3156 | <p> | |
3157 | A *delta group* expresses the content of a revlog as a series of deltas, |
|
3157 | A *delta group* expresses the content of a revlog as a series of deltas, | |
3158 | or patches against previous revisions. |
|
3158 | or patches against previous revisions. | |
3159 | </p> |
|
3159 | </p> | |
3160 | <p> |
|
3160 | <p> | |
3161 | Delta groups consist of 0 or more *chunks* followed by the *empty chunk* |
|
3161 | Delta groups consist of 0 or more *chunks* followed by the *empty chunk* | |
3162 | to signal the end of the delta group: |
|
3162 | to signal the end of the delta group: | |
3163 | </p> |
|
3163 | </p> | |
3164 | <pre> |
|
3164 | <pre> | |
3165 | +------------------------------------------------------------------------+ |
|
3165 | +------------------------------------------------------------------------+ | |
3166 | | | | | | | |
|
3166 | | | | | | | | |
3167 | | chunk0 length | chunk0 data | chunk1 length | chunk1 data | 0x0 | |
|
3167 | | chunk0 length | chunk0 data | chunk1 length | chunk1 data | 0x0 | | |
3168 | | (4 bytes) | (various) | (4 bytes) | (various) | (4 bytes) | |
|
3168 | | (4 bytes) | (various) | (4 bytes) | (various) | (4 bytes) | | |
3169 | | | | | | | |
|
3169 | | | | | | | | |
3170 | +------------------------------------------------------------------------+ |
|
3170 | +------------------------------------------------------------------------+ | |
3171 | </pre> |
|
3171 | </pre> | |
3172 | <p> |
|
3172 | <p> | |
3173 | Each *chunk*'s data consists of the following: |
|
3173 | Each *chunk*'s data consists of the following: | |
3174 | </p> |
|
3174 | </p> | |
3175 | <pre> |
|
3175 | <pre> | |
3176 | +---------------------------------------+ |
|
3176 | +---------------------------------------+ | |
3177 | | | | |
|
3177 | | | | | |
3178 | | delta header | delta data | |
|
3178 | | delta header | delta data | | |
3179 | | (various by version) | (various) | |
|
3179 | | (various by version) | (various) | | |
3180 | | | | |
|
3180 | | | | | |
3181 | +---------------------------------------+ |
|
3181 | +---------------------------------------+ | |
3182 | </pre> |
|
3182 | </pre> | |
3183 | <p> |
|
3183 | <p> | |
3184 | The *delta data* is a series of *delta*s that describe a diff from an existing |
|
3184 | The *delta data* is a series of *delta*s that describe a diff from an existing | |
3185 | entry (either that the recipient already has, or previously specified in the |
|
3185 | entry (either that the recipient already has, or previously specified in the | |
3186 |
bundle |
|
3186 | bundle/changegroup). | |
3187 | </p> |
|
3187 | </p> | |
3188 | <p> |
|
3188 | <p> | |
3189 | The *delta header* is different between versions "1", "2", and |
|
3189 | The *delta header* is different between versions "1", "2", and | |
3190 | "3" of the changegroup format. |
|
3190 | "3" of the changegroup format. | |
3191 | </p> |
|
3191 | </p> | |
3192 | <p> |
|
3192 | <p> | |
3193 | Version 1 (headerlen=80): |
|
3193 | Version 1 (headerlen=80): | |
3194 | </p> |
|
3194 | </p> | |
3195 | <pre> |
|
3195 | <pre> | |
3196 | +------------------------------------------------------+ |
|
3196 | +------------------------------------------------------+ | |
3197 | | | | | | |
|
3197 | | | | | | | |
3198 | | node | p1 node | p2 node | link node | |
|
3198 | | node | p1 node | p2 node | link node | | |
3199 | | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) | |
|
3199 | | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) | | |
3200 | | | | | | |
|
3200 | | | | | | | |
3201 | +------------------------------------------------------+ |
|
3201 | +------------------------------------------------------+ | |
3202 | </pre> |
|
3202 | </pre> | |
3203 | <p> |
|
3203 | <p> | |
3204 | Version 2 (headerlen=100): |
|
3204 | Version 2 (headerlen=100): | |
3205 | </p> |
|
3205 | </p> | |
3206 | <pre> |
|
3206 | <pre> | |
3207 | +------------------------------------------------------------------+ |
|
3207 | +------------------------------------------------------------------+ | |
3208 | | | | | | | |
|
3208 | | | | | | | | |
3209 | | node | p1 node | p2 node | base node | link node | |
|
3209 | | node | p1 node | p2 node | base node | link node | | |
3210 | | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) | |
|
3210 | | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) | | |
3211 | | | | | | | |
|
3211 | | | | | | | | |
3212 | +------------------------------------------------------------------+ |
|
3212 | +------------------------------------------------------------------+ | |
3213 | </pre> |
|
3213 | </pre> | |
3214 | <p> |
|
3214 | <p> | |
3215 | Version 3 (headerlen=102): |
|
3215 | Version 3 (headerlen=102): | |
3216 | </p> |
|
3216 | </p> | |
3217 | <pre> |
|
3217 | <pre> | |
3218 | +------------------------------------------------------------------------------+ |
|
3218 | +------------------------------------------------------------------------------+ | |
3219 | | | | | | | | |
|
3219 | | | | | | | | | |
3220 | | node | p1 node | p2 node | base node | link node | flags | |
|
3220 | | node | p1 node | p2 node | base node | link node | flags | | |
3221 | | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) | (2 bytes) | |
|
3221 | | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) | (2 bytes) | | |
3222 | | | | | | | | |
|
3222 | | | | | | | | | |
3223 | +------------------------------------------------------------------------------+ |
|
3223 | +------------------------------------------------------------------------------+ | |
3224 | </pre> |
|
3224 | </pre> | |
3225 | <p> |
|
3225 | <p> | |
3226 | The *delta data* consists of "chunklen - 4 - headerlen" bytes, which contain a |
|
3226 | The *delta data* consists of "chunklen - 4 - headerlen" bytes, which contain a | |
3227 | series of *delta*s, densely packed (no separators). These deltas describe a diff |
|
3227 | series of *delta*s, densely packed (no separators). These deltas describe a diff | |
3228 | from an existing entry (either that the recipient already has, or previously |
|
3228 | from an existing entry (either that the recipient already has, or previously | |
3229 | specified in the bundle/changegroup). The format is described more fully in |
|
3229 | specified in the bundle/changegroup). The format is described more fully in | |
3230 | "hg help internals.bdiff", but briefly: |
|
3230 | "hg help internals.bdiff", but briefly: | |
3231 | </p> |
|
3231 | </p> | |
3232 | <pre> |
|
3232 | <pre> | |
3233 | +---------------------------------------------------------------+ |
|
3233 | +---------------------------------------------------------------+ | |
3234 | | | | | | |
|
3234 | | | | | | | |
3235 | | start offset | end offset | new length | content | |
|
3235 | | start offset | end offset | new length | content | | |
3236 | | (4 bytes) | (4 bytes) | (4 bytes) | (<new length> bytes) | |
|
3236 | | (4 bytes) | (4 bytes) | (4 bytes) | (<new length> bytes) | | |
3237 | | | | | | |
|
3237 | | | | | | | |
3238 | +---------------------------------------------------------------+ |
|
3238 | +---------------------------------------------------------------+ | |
3239 | </pre> |
|
3239 | </pre> | |
3240 | <p> |
|
3240 | <p> | |
3241 | Please note that the length field in the delta data does *not* include itself. |
|
3241 | Please note that the length field in the delta data does *not* include itself. | |
3242 | </p> |
|
3242 | </p> | |
3243 | <p> |
|
3243 | <p> | |
3244 | In version 1, the delta is always applied against the previous node from |
|
3244 | In version 1, the delta is always applied against the previous node from | |
3245 | the changegroup or the first parent if this is the first entry in the |
|
3245 | the changegroup or the first parent if this is the first entry in the | |
3246 | changegroup. |
|
3246 | changegroup. | |
3247 | </p> |
|
3247 | </p> | |
3248 | <p> |
|
3248 | <p> | |
3249 | In version 2 and up, the delta base node is encoded in the entry in the |
|
3249 | In version 2 and up, the delta base node is encoded in the entry in the | |
3250 | changegroup. This allows the delta to be expressed against any parent, |
|
3250 | changegroup. This allows the delta to be expressed against any parent, | |
3251 | which can result in smaller deltas and more efficient encoding of data. |
|
3251 | which can result in smaller deltas and more efficient encoding of data. | |
3252 | </p> |
|
3252 | </p> | |
3253 | <h2>Changeset Segment</h2> |
|
3253 | <h2>Changeset Segment</h2> | |
3254 | <p> |
|
3254 | <p> | |
3255 | The *changeset segment* consists of a single *delta group* holding |
|
3255 | The *changeset segment* consists of a single *delta group* holding | |
3256 | changelog data. The *empty chunk* at the end of the *delta group* denotes |
|
3256 | changelog data. The *empty chunk* at the end of the *delta group* denotes | |
3257 | the boundary to the *manifest segment*. |
|
3257 | the boundary to the *manifest segment*. | |
3258 | </p> |
|
3258 | </p> | |
3259 | <h2>Manifest Segment</h2> |
|
3259 | <h2>Manifest Segment</h2> | |
3260 | <p> |
|
3260 | <p> | |
3261 | The *manifest segment* consists of a single *delta group* holding manifest |
|
3261 | The *manifest segment* consists of a single *delta group* holding manifest | |
3262 | data. If treemanifests are in use, it contains only the manifest for the |
|
3262 | data. If treemanifests are in use, it contains only the manifest for the | |
3263 | root directory of the repository. Otherwise, it contains the entire |
|
3263 | root directory of the repository. Otherwise, it contains the entire | |
3264 | manifest data. The *empty chunk* at the end of the *delta group* denotes |
|
3264 | manifest data. The *empty chunk* at the end of the *delta group* denotes | |
3265 | the boundary to the next segment (either the *treemanifests segment* or the |
|
3265 | the boundary to the next segment (either the *treemanifests segment* or the | |
3266 | *filelogs segment*, depending on version and the request options). |
|
3266 | *filelogs segment*, depending on version and the request options). | |
3267 | </p> |
|
3267 | </p> | |
3268 | <h3>Treemanifests Segment</h3> |
|
3268 | <h3>Treemanifests Segment</h3> | |
3269 | <p> |
|
3269 | <p> | |
3270 | The *treemanifests segment* only exists in changegroup version "3", and |
|
3270 | The *treemanifests segment* only exists in changegroup version "3", and | |
3271 | only if the 'treemanifest' param is part of the bundle2 changegroup part |
|
3271 | only if the 'treemanifest' param is part of the bundle2 changegroup part | |
3272 | (it is not possible to use changegroup version 3 outside of bundle2). |
|
3272 | (it is not possible to use changegroup version 3 outside of bundle2). | |
3273 | Aside from the filenames in the *treemanifests segment* containing a |
|
3273 | Aside from the filenames in the *treemanifests segment* containing a | |
3274 | trailing "/" character, it behaves identically to the *filelogs segment* |
|
3274 | trailing "/" character, it behaves identically to the *filelogs segment* | |
3275 | (see below). The final sub-segment is followed by an *empty chunk* (logically, |
|
3275 | (see below). The final sub-segment is followed by an *empty chunk* (logically, | |
3276 | a sub-segment with filename size 0). This denotes the boundary to the |
|
3276 | a sub-segment with filename size 0). This denotes the boundary to the | |
3277 | *filelogs segment*. |
|
3277 | *filelogs segment*. | |
3278 | </p> |
|
3278 | </p> | |
3279 | <h2>Filelogs Segment</h2> |
|
3279 | <h2>Filelogs Segment</h2> | |
3280 | <p> |
|
3280 | <p> | |
3281 | The *filelogs segment* consists of multiple sub-segments, each |
|
3281 | The *filelogs segment* consists of multiple sub-segments, each | |
3282 | corresponding to an individual file whose data is being described: |
|
3282 | corresponding to an individual file whose data is being described: | |
3283 | </p> |
|
3283 | </p> | |
3284 | <pre> |
|
3284 | <pre> | |
3285 | +--------------------------------------------------+ |
|
3285 | +--------------------------------------------------+ | |
3286 | | | | | | | |
|
3286 | | | | | | | | |
3287 | | filelog0 | filelog1 | filelog2 | ... | 0x0 | |
|
3287 | | filelog0 | filelog1 | filelog2 | ... | 0x0 | | |
3288 | | | | | | (4 bytes) | |
|
3288 | | | | | | (4 bytes) | | |
3289 | | | | | | | |
|
3289 | | | | | | | | |
3290 | +--------------------------------------------------+ |
|
3290 | +--------------------------------------------------+ | |
3291 | </pre> |
|
3291 | </pre> | |
3292 | <p> |
|
3292 | <p> | |
3293 | The final filelog sub-segment is followed by an *empty chunk* (logically, |
|
3293 | The final filelog sub-segment is followed by an *empty chunk* (logically, | |
3294 | a sub-segment with filename size 0). This denotes the end of the segment |
|
3294 | a sub-segment with filename size 0). This denotes the end of the segment | |
3295 | and of the overall changegroup. |
|
3295 | and of the overall changegroup. | |
3296 | </p> |
|
3296 | </p> | |
3297 | <p> |
|
3297 | <p> | |
3298 | Each filelog sub-segment consists of the following: |
|
3298 | Each filelog sub-segment consists of the following: | |
3299 | </p> |
|
3299 | </p> | |
3300 | <pre> |
|
3300 | <pre> | |
3301 | +------------------------------------------------------+ |
|
3301 | +------------------------------------------------------+ | |
3302 | | | | | |
|
3302 | | | | | | |
3303 | | filename length | filename | delta group | |
|
3303 | | filename length | filename | delta group | | |
3304 | | (4 bytes) | (<length - 4> bytes) | (various) | |
|
3304 | | (4 bytes) | (<length - 4> bytes) | (various) | | |
3305 | | | | | |
|
3305 | | | | | | |
3306 | +------------------------------------------------------+ |
|
3306 | +------------------------------------------------------+ | |
3307 | </pre> |
|
3307 | </pre> | |
3308 | <p> |
|
3308 | <p> | |
3309 | That is, a *chunk* consisting of the filename (not terminated or padded) |
|
3309 | That is, a *chunk* consisting of the filename (not terminated or padded) | |
3310 | followed by N chunks constituting the *delta group* for this file. The |
|
3310 | followed by N chunks constituting the *delta group* for this file. The | |
3311 | *empty chunk* at the end of each *delta group* denotes the boundary to the |
|
3311 | *empty chunk* at the end of each *delta group* denotes the boundary to the | |
3312 | next filelog sub-segment. |
|
3312 | next filelog sub-segment. | |
3313 | </p> |
|
3313 | </p> | |
3314 |
|
3314 | |||
3315 | </div> |
|
3315 | </div> | |
3316 | </div> |
|
3316 | </div> | |
3317 | </div> |
|
3317 | </div> | |
3318 |
|
3318 | |||
3319 |
|
3319 | |||
3320 |
|
3320 | |||
3321 | </body> |
|
3321 | </body> | |
3322 | </html> |
|
3322 | </html> | |
3323 |
|
3323 | |||
3324 |
|
3324 | |||
3325 | $ killdaemons.py |
|
3325 | $ killdaemons.py | |
3326 |
|
3326 | |||
3327 | #endif |
|
3327 | #endif |
General Comments 0
You need to be logged in to leave comments.
Login now