Show More
@@ -1,84 +1,84 b'' | |||
|
1 | 1 | Mercurial supports generating standalone "bundle" files that hold repository |
|
2 | 2 | data. These "bundles" are typically saved locally and used later or exchanged |
|
3 | 3 | between different repositories, possibly on different machines. Example |
|
4 | 4 | commands using bundles are :hg:`bundle` and :hg:`unbundle`. |
|
5 | 5 | |
|
6 | 6 | Generation of bundle files is controlled by a "bundle specification" |
|
7 | 7 | ("bundlespec") string. This string tells the bundle generation process how |
|
8 | 8 | to create the bundle. |
|
9 | 9 | |
|
10 | 10 | A "bundlespec" string is composed of the following elements: |
|
11 | 11 | |
|
12 | 12 | type |
|
13 | 13 | A string denoting the bundle format to use. |
|
14 | 14 | |
|
15 | 15 | compression |
|
16 | 16 | Denotes the compression engine to use compressing the raw bundle data. |
|
17 | 17 | |
|
18 | 18 | parameters |
|
19 | 19 | Arbitrary key-value parameters to further control bundle generation. |
|
20 | 20 | |
|
21 | 21 | A "bundlespec" string has the following formats: |
|
22 | 22 | |
|
23 | 23 | <type> |
|
24 | 24 | The literal bundle format string is used. |
|
25 | 25 | |
|
26 | 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 | 29 | Optional parameters follow the ``<type>``. Parameters are URI escaped |
|
30 | 30 | ``key=value`` pairs. Each pair is delimited by a semicolon (``;``). The |
|
31 | 31 | first parameter begins after a ``;`` immediately following the ``<type>`` |
|
32 | 32 | value. |
|
33 | 33 | |
|
34 | 34 | Available Types |
|
35 | 35 | =============== |
|
36 | 36 | |
|
37 | 37 | The following bundle <type> strings are available: |
|
38 | 38 | |
|
39 | 39 | v1 |
|
40 | 40 | Produces a legacy "changegroup" version 1 bundle. |
|
41 | 41 | |
|
42 | 42 | This format is compatible with nearly all Mercurial clients because it is |
|
43 | 43 | the oldest. However, it has some limitations, which is why it is no longer |
|
44 | 44 | the default for new repositories. |
|
45 | 45 | |
|
46 | 46 | ``v1`` bundles can be used with modern repositories using the "generaldelta" |
|
47 | 47 | storage format. However, it may take longer to produce the bundle and the |
|
48 | 48 | resulting bundle may be significantly larger than a ``v2`` bundle. |
|
49 | 49 | |
|
50 | 50 | ``v1`` bundles can only use the ``gzip``, ``bzip2``, and ``none`` compression |
|
51 | 51 | formats. |
|
52 | 52 | |
|
53 | 53 | v2 |
|
54 | 54 | Produces a version 2 bundle. |
|
55 | 55 | |
|
56 | 56 | Version 2 bundles are an extensible format that can store additional |
|
57 | 57 | repository data (such as bookmarks and phases information) and they can |
|
58 | 58 | store data more efficiently, resulting in smaller bundles. |
|
59 | 59 | |
|
60 | 60 | Version 2 bundles can also use modern compression engines, such as |
|
61 | 61 | ``zstd``, making them faster to compress and often smaller. |
|
62 | 62 | |
|
63 | 63 | Available Compression Engines |
|
64 | 64 | ============================= |
|
65 | 65 | |
|
66 | 66 | The following bundle <compression> engines can be used: |
|
67 | 67 | |
|
68 | 68 | .. bundlecompressionmarker |
|
69 | 69 | |
|
70 | 70 | Examples |
|
71 | 71 | ======== |
|
72 | 72 | |
|
73 | 73 | ``v2`` |
|
74 | 74 | Produce a ``v2`` bundle using default options, including compression. |
|
75 | 75 | |
|
76 | 76 | ``none-v1`` |
|
77 | 77 | Produce a ``v2`` bundle with no compression. |
|
78 | 78 | |
|
79 | 79 | ``zstd-v2`` |
|
80 | 80 | Produce a ``v2`` bundle with zstandard compression using default |
|
81 | 81 | settings. |
|
82 | 82 | |
|
83 | 83 | ``zstd-v1`` |
|
84 | 84 | This errors because ``zstd`` is not supported for ``v1`` types. |
@@ -1,2410 +1,2410 b'' | |||
|
1 | 1 | The Mercurial system uses a set of configuration files to control |
|
2 | 2 | aspects of its behavior. |
|
3 | 3 | |
|
4 | 4 | Troubleshooting |
|
5 | 5 | =============== |
|
6 | 6 | |
|
7 | 7 | If you're having problems with your configuration, |
|
8 | 8 | :hg:`config --debug` can help you understand what is introducing |
|
9 | 9 | a setting into your environment. |
|
10 | 10 | |
|
11 | 11 | See :hg:`help config.syntax` and :hg:`help config.files` |
|
12 | 12 | for information about how and where to override things. |
|
13 | 13 | |
|
14 | 14 | Structure |
|
15 | 15 | ========= |
|
16 | 16 | |
|
17 | 17 | The configuration files use a simple ini-file format. A configuration |
|
18 | 18 | file consists of sections, led by a ``[section]`` header and followed |
|
19 | 19 | by ``name = value`` entries:: |
|
20 | 20 | |
|
21 | 21 | [ui] |
|
22 | 22 | username = Firstname Lastname <firstname.lastname@example.net> |
|
23 | 23 | verbose = True |
|
24 | 24 | |
|
25 | 25 | The above entries will be referred to as ``ui.username`` and |
|
26 | 26 | ``ui.verbose``, respectively. See :hg:`help config.syntax`. |
|
27 | 27 | |
|
28 | 28 | Files |
|
29 | 29 | ===== |
|
30 | 30 | |
|
31 | 31 | Mercurial reads configuration data from several files, if they exist. |
|
32 | 32 | These files do not exist by default and you will have to create the |
|
33 | 33 | appropriate configuration files yourself: |
|
34 | 34 | |
|
35 | 35 | Local configuration is put into the per-repository ``<repo>/.hg/hgrc`` file. |
|
36 | 36 | |
|
37 | 37 | Global configuration like the username setting is typically put into: |
|
38 | 38 | |
|
39 | 39 | .. container:: windows |
|
40 | 40 | |
|
41 | 41 | - ``%USERPROFILE%\mercurial.ini`` (on Windows) |
|
42 | 42 | |
|
43 | 43 | .. container:: unix.plan9 |
|
44 | 44 | |
|
45 | 45 | - ``$HOME/.hgrc`` (on Unix, Plan9) |
|
46 | 46 | |
|
47 | 47 | The names of these files depend on the system on which Mercurial is |
|
48 | 48 | installed. ``*.rc`` files from a single directory are read in |
|
49 | 49 | alphabetical order, later ones overriding earlier ones. Where multiple |
|
50 | 50 | paths are given below, settings from earlier paths override later |
|
51 | 51 | ones. |
|
52 | 52 | |
|
53 | 53 | .. container:: verbose.unix |
|
54 | 54 | |
|
55 | 55 | On Unix, the following files are consulted: |
|
56 | 56 | |
|
57 | 57 | - ``<repo>/.hg/hgrc`` (per-repository) |
|
58 | 58 | - ``$HOME/.hgrc`` (per-user) |
|
59 | 59 | - ``${XDG_CONFIG_HOME:-$HOME/.config}/hg/hgrc`` (per-user) |
|
60 | 60 | - ``<install-root>/etc/mercurial/hgrc`` (per-installation) |
|
61 | 61 | - ``<install-root>/etc/mercurial/hgrc.d/*.rc`` (per-installation) |
|
62 | 62 | - ``/etc/mercurial/hgrc`` (per-system) |
|
63 | 63 | - ``/etc/mercurial/hgrc.d/*.rc`` (per-system) |
|
64 | 64 | - ``<internal>/default.d/*.rc`` (defaults) |
|
65 | 65 | |
|
66 | 66 | .. container:: verbose.windows |
|
67 | 67 | |
|
68 | 68 | On Windows, the following files are consulted: |
|
69 | 69 | |
|
70 | 70 | - ``<repo>/.hg/hgrc`` (per-repository) |
|
71 | 71 | - ``%USERPROFILE%\.hgrc`` (per-user) |
|
72 | 72 | - ``%USERPROFILE%\Mercurial.ini`` (per-user) |
|
73 | 73 | - ``%HOME%\.hgrc`` (per-user) |
|
74 | 74 | - ``%HOME%\Mercurial.ini`` (per-user) |
|
75 | 75 | - ``HKEY_LOCAL_MACHINE\SOFTWARE\Mercurial`` (per-installation) |
|
76 | 76 | - ``<install-dir>\hgrc.d\*.rc`` (per-installation) |
|
77 | 77 | - ``<install-dir>\Mercurial.ini`` (per-installation) |
|
78 | 78 | - ``<internal>/default.d/*.rc`` (defaults) |
|
79 | 79 | |
|
80 | 80 | .. note:: |
|
81 | 81 | |
|
82 | 82 | The registry key ``HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Mercurial`` |
|
83 | 83 | is used when running 32-bit Python on 64-bit Windows. |
|
84 | 84 | |
|
85 | 85 | .. container:: windows |
|
86 | 86 | |
|
87 | 87 | On Windows 9x, ``%HOME%`` is replaced by ``%APPDATA%``. |
|
88 | 88 | |
|
89 | 89 | .. container:: verbose.plan9 |
|
90 | 90 | |
|
91 | 91 | On Plan9, the following files are consulted: |
|
92 | 92 | |
|
93 | 93 | - ``<repo>/.hg/hgrc`` (per-repository) |
|
94 | 94 | - ``$home/lib/hgrc`` (per-user) |
|
95 | 95 | - ``<install-root>/lib/mercurial/hgrc`` (per-installation) |
|
96 | 96 | - ``<install-root>/lib/mercurial/hgrc.d/*.rc`` (per-installation) |
|
97 | 97 | - ``/lib/mercurial/hgrc`` (per-system) |
|
98 | 98 | - ``/lib/mercurial/hgrc.d/*.rc`` (per-system) |
|
99 | 99 | - ``<internal>/default.d/*.rc`` (defaults) |
|
100 | 100 | |
|
101 | 101 | Per-repository configuration options only apply in a |
|
102 | 102 | particular repository. This file is not version-controlled, and |
|
103 | 103 | will not get transferred during a "clone" operation. Options in |
|
104 | 104 | this file override options in all other configuration files. |
|
105 | 105 | |
|
106 | 106 | .. container:: unix.plan9 |
|
107 | 107 | |
|
108 | 108 | On Plan 9 and Unix, most of this file will be ignored if it doesn't |
|
109 | 109 | belong to a trusted user or to a trusted group. See |
|
110 | 110 | :hg:`help config.trusted` for more details. |
|
111 | 111 | |
|
112 | 112 | Per-user configuration file(s) are for the user running Mercurial. Options |
|
113 | 113 | in these files apply to all Mercurial commands executed by this user in any |
|
114 | 114 | directory. Options in these files override per-system and per-installation |
|
115 | 115 | options. |
|
116 | 116 | |
|
117 | 117 | Per-installation configuration files are searched for in the |
|
118 | 118 | directory where Mercurial is installed. ``<install-root>`` is the |
|
119 | 119 | parent directory of the **hg** executable (or symlink) being run. |
|
120 | 120 | |
|
121 | 121 | .. container:: unix.plan9 |
|
122 | 122 | |
|
123 | 123 | For example, if installed in ``/shared/tools/bin/hg``, Mercurial |
|
124 | 124 | will look in ``/shared/tools/etc/mercurial/hgrc``. Options in these |
|
125 | 125 | files apply to all Mercurial commands executed by any user in any |
|
126 | 126 | directory. |
|
127 | 127 | |
|
128 | 128 | Per-installation configuration files are for the system on |
|
129 | 129 | which Mercurial is running. Options in these files apply to all |
|
130 | 130 | Mercurial commands executed by any user in any directory. Registry |
|
131 | 131 | keys contain PATH-like strings, every part of which must reference |
|
132 | 132 | a ``Mercurial.ini`` file or be a directory where ``*.rc`` files will |
|
133 | 133 | be read. Mercurial checks each of these locations in the specified |
|
134 | 134 | order until one or more configuration files are detected. |
|
135 | 135 | |
|
136 | 136 | Per-system configuration files are for the system on which Mercurial |
|
137 | 137 | is running. Options in these files apply to all Mercurial commands |
|
138 | 138 | executed by any user in any directory. Options in these files |
|
139 | 139 | override per-installation options. |
|
140 | 140 | |
|
141 | 141 | Mercurial comes with some default configuration. The default configuration |
|
142 | 142 | files are installed with Mercurial and will be overwritten on upgrades. Default |
|
143 | 143 | configuration files should never be edited by users or administrators but can |
|
144 | 144 | be overridden in other configuration files. So far the directory only contains |
|
145 | 145 | merge tool configuration but packagers can also put other default configuration |
|
146 | 146 | there. |
|
147 | 147 | |
|
148 | 148 | Syntax |
|
149 | 149 | ====== |
|
150 | 150 | |
|
151 | 151 | A configuration file consists of sections, led by a ``[section]`` header |
|
152 | 152 | and followed by ``name = value`` entries (sometimes called |
|
153 | 153 | ``configuration keys``):: |
|
154 | 154 | |
|
155 | 155 | [spam] |
|
156 | 156 | eggs=ham |
|
157 | 157 | green= |
|
158 | 158 | eggs |
|
159 | 159 | |
|
160 | 160 | Each line contains one entry. If the lines that follow are indented, |
|
161 | 161 | they are treated as continuations of that entry. Leading whitespace is |
|
162 | 162 | removed from values. Empty lines are skipped. Lines beginning with |
|
163 | 163 | ``#`` or ``;`` are ignored and may be used to provide comments. |
|
164 | 164 | |
|
165 | 165 | Configuration keys can be set multiple times, in which case Mercurial |
|
166 | 166 | will use the value that was configured last. As an example:: |
|
167 | 167 | |
|
168 | 168 | [spam] |
|
169 | 169 | eggs=large |
|
170 | 170 | ham=serrano |
|
171 | 171 | eggs=small |
|
172 | 172 | |
|
173 | 173 | This would set the configuration key named ``eggs`` to ``small``. |
|
174 | 174 | |
|
175 | 175 | It is also possible to define a section multiple times. A section can |
|
176 | 176 | be redefined on the same and/or on different configuration files. For |
|
177 | 177 | example:: |
|
178 | 178 | |
|
179 | 179 | [foo] |
|
180 | 180 | eggs=large |
|
181 | 181 | ham=serrano |
|
182 | 182 | eggs=small |
|
183 | 183 | |
|
184 | 184 | [bar] |
|
185 | 185 | eggs=ham |
|
186 | 186 | green= |
|
187 | 187 | eggs |
|
188 | 188 | |
|
189 | 189 | [foo] |
|
190 | 190 | ham=prosciutto |
|
191 | 191 | eggs=medium |
|
192 | 192 | bread=toasted |
|
193 | 193 | |
|
194 | 194 | This would set the ``eggs``, ``ham``, and ``bread`` configuration keys |
|
195 | 195 | of the ``foo`` section to ``medium``, ``prosciutto``, and ``toasted``, |
|
196 | 196 | respectively. As you can see there only thing that matters is the last |
|
197 | 197 | value that was set for each of the configuration keys. |
|
198 | 198 | |
|
199 | 199 | If a configuration key is set multiple times in different |
|
200 | 200 | configuration files the final value will depend on the order in which |
|
201 | 201 | the different configuration files are read, with settings from earlier |
|
202 | 202 | paths overriding later ones as described on the ``Files`` section |
|
203 | 203 | above. |
|
204 | 204 | |
|
205 | 205 | A line of the form ``%include file`` will include ``file`` into the |
|
206 | 206 | current configuration file. The inclusion is recursive, which means |
|
207 | 207 | that included files can include other files. Filenames are relative to |
|
208 | 208 | the configuration file in which the ``%include`` directive is found. |
|
209 | 209 | Environment variables and ``~user`` constructs are expanded in |
|
210 | 210 | ``file``. This lets you do something like:: |
|
211 | 211 | |
|
212 | 212 | %include ~/.hgrc.d/$HOST.rc |
|
213 | 213 | |
|
214 | 214 | to include a different configuration file on each computer you use. |
|
215 | 215 | |
|
216 | 216 | A line with ``%unset name`` will remove ``name`` from the current |
|
217 | 217 | section, if it has been set previously. |
|
218 | 218 | |
|
219 | 219 | The values are either free-form text strings, lists of text strings, |
|
220 | 220 | or Boolean values. Boolean values can be set to true using any of "1", |
|
221 | 221 | "yes", "true", or "on" and to false using "0", "no", "false", or "off" |
|
222 | 222 | (all case insensitive). |
|
223 | 223 | |
|
224 | 224 | List values are separated by whitespace or comma, except when values are |
|
225 | 225 | placed in double quotation marks:: |
|
226 | 226 | |
|
227 | 227 | allow_read = "John Doe, PhD", brian, betty |
|
228 | 228 | |
|
229 | 229 | Quotation marks can be escaped by prefixing them with a backslash. Only |
|
230 | 230 | quotation marks at the beginning of a word is counted as a quotation |
|
231 | 231 | (e.g., ``foo"bar baz`` is the list of ``foo"bar`` and ``baz``). |
|
232 | 232 | |
|
233 | 233 | Sections |
|
234 | 234 | ======== |
|
235 | 235 | |
|
236 | 236 | This section describes the different sections that may appear in a |
|
237 | 237 | Mercurial configuration file, the purpose of each section, its possible |
|
238 | 238 | keys, and their possible values. |
|
239 | 239 | |
|
240 | 240 | ``alias`` |
|
241 | 241 | --------- |
|
242 | 242 | |
|
243 | 243 | Defines command aliases. |
|
244 | 244 | |
|
245 | 245 | Aliases allow you to define your own commands in terms of other |
|
246 | 246 | commands (or aliases), optionally including arguments. Positional |
|
247 | 247 | arguments in the form of ``$1``, ``$2``, etc. in the alias definition |
|
248 | 248 | are expanded by Mercurial before execution. Positional arguments not |
|
249 | 249 | already used by ``$N`` in the definition are put at the end of the |
|
250 | 250 | command to be executed. |
|
251 | 251 | |
|
252 | 252 | Alias definitions consist of lines of the form:: |
|
253 | 253 | |
|
254 | 254 | <alias> = <command> [<argument>]... |
|
255 | 255 | |
|
256 | 256 | For example, this definition:: |
|
257 | 257 | |
|
258 | 258 | latest = log --limit 5 |
|
259 | 259 | |
|
260 | 260 | creates a new command ``latest`` that shows only the five most recent |
|
261 | 261 | changesets. You can define subsequent aliases using earlier ones:: |
|
262 | 262 | |
|
263 | 263 | stable5 = latest -b stable |
|
264 | 264 | |
|
265 | 265 | .. note:: |
|
266 | 266 | |
|
267 | 267 | It is possible to create aliases with the same names as |
|
268 | 268 | existing commands, which will then override the original |
|
269 | 269 | definitions. This is almost always a bad idea! |
|
270 | 270 | |
|
271 | 271 | An alias can start with an exclamation point (``!``) to make it a |
|
272 | 272 | shell alias. A shell alias is executed with the shell and will let you |
|
273 | 273 | run arbitrary commands. As an example, :: |
|
274 | 274 | |
|
275 | 275 | echo = !echo $@ |
|
276 | 276 | |
|
277 | 277 | will let you do ``hg echo foo`` to have ``foo`` printed in your |
|
278 | 278 | terminal. A better example might be:: |
|
279 | 279 | |
|
280 | 280 | purge = !$HG status --no-status --unknown -0 re: | xargs -0 rm -f |
|
281 | 281 | |
|
282 | 282 | which will make ``hg purge`` delete all unknown files in the |
|
283 | 283 | repository in the same manner as the purge extension. |
|
284 | 284 | |
|
285 | 285 | Positional arguments like ``$1``, ``$2``, etc. in the alias definition |
|
286 | 286 | expand to the command arguments. Unmatched arguments are |
|
287 | 287 | removed. ``$0`` expands to the alias name and ``$@`` expands to all |
|
288 | 288 | arguments separated by a space. ``"$@"`` (with quotes) expands to all |
|
289 | 289 | arguments quoted individually and separated by a space. These expansions |
|
290 | 290 | happen before the command is passed to the shell. |
|
291 | 291 | |
|
292 | 292 | Shell aliases are executed in an environment where ``$HG`` expands to |
|
293 | 293 | the path of the Mercurial that was used to execute the alias. This is |
|
294 | 294 | useful when you want to call further Mercurial commands in a shell |
|
295 | 295 | alias, as was done above for the purge alias. In addition, |
|
296 | 296 | ``$HG_ARGS`` expands to the arguments given to Mercurial. In the ``hg |
|
297 | 297 | echo foo`` call above, ``$HG_ARGS`` would expand to ``echo foo``. |
|
298 | 298 | |
|
299 | 299 | .. note:: |
|
300 | 300 | |
|
301 | 301 | Some global configuration options such as ``-R`` are |
|
302 | 302 | processed before shell aliases and will thus not be passed to |
|
303 | 303 | aliases. |
|
304 | 304 | |
|
305 | 305 | |
|
306 | 306 | ``annotate`` |
|
307 | 307 | ------------ |
|
308 | 308 | |
|
309 | 309 | Settings used when displaying file annotations. All values are |
|
310 | 310 | Booleans and default to False. See :hg:`help config.diff` for |
|
311 | 311 | related options for the diff command. |
|
312 | 312 | |
|
313 | 313 | ``ignorews`` |
|
314 | 314 | Ignore white space when comparing lines. |
|
315 | 315 | |
|
316 | 316 | ``ignorewsamount`` |
|
317 | 317 | Ignore changes in the amount of white space. |
|
318 | 318 | |
|
319 | 319 | ``ignoreblanklines`` |
|
320 | 320 | Ignore changes whose lines are all blank. |
|
321 | 321 | |
|
322 | 322 | |
|
323 | 323 | ``auth`` |
|
324 | 324 | -------- |
|
325 | 325 | |
|
326 | 326 | Authentication credentials and other authentication-like configuration |
|
327 | 327 | for HTTP connections. This section allows you to store usernames and |
|
328 | 328 | passwords for use when logging *into* HTTP servers. See |
|
329 | 329 | :hg:`help config.web` if you want to configure *who* can login to |
|
330 | 330 | your HTTP server. |
|
331 | 331 | |
|
332 | 332 | The following options apply to all hosts. |
|
333 | 333 | |
|
334 | 334 | ``cookiefile`` |
|
335 | 335 | Path to a file containing HTTP cookie lines. Cookies matching a |
|
336 | 336 | host will be sent automatically. |
|
337 | 337 | |
|
338 | 338 | The file format uses the Mozilla cookies.txt format, which defines cookies |
|
339 | 339 | on their own lines. Each line contains 7 fields delimited by the tab |
|
340 | 340 | character (domain, is_domain_cookie, path, is_secure, expires, name, |
|
341 | 341 | value). For more info, do an Internet search for "Netscape cookies.txt |
|
342 | 342 | format." |
|
343 | 343 | |
|
344 | 344 | Note: the cookies parser does not handle port numbers on domains. You |
|
345 | 345 | will need to remove ports from the domain for the cookie to be recognized. |
|
346 | 346 | This could result in a cookie being disclosed to an unwanted server. |
|
347 | 347 | |
|
348 | 348 | The cookies file is read-only. |
|
349 | 349 | |
|
350 | 350 | Other options in this section are grouped by name and have the following |
|
351 | 351 | format:: |
|
352 | 352 | |
|
353 | 353 | <name>.<argument> = <value> |
|
354 | 354 | |
|
355 | 355 | where ``<name>`` is used to group arguments into authentication |
|
356 | 356 | entries. Example:: |
|
357 | 357 | |
|
358 | 358 | foo.prefix = hg.intevation.de/mercurial |
|
359 | 359 | foo.username = foo |
|
360 | 360 | foo.password = bar |
|
361 | 361 | foo.schemes = http https |
|
362 | 362 | |
|
363 | 363 | bar.prefix = secure.example.org |
|
364 | 364 | bar.key = path/to/file.key |
|
365 | 365 | bar.cert = path/to/file.cert |
|
366 | 366 | bar.schemes = https |
|
367 | 367 | |
|
368 | 368 | Supported arguments: |
|
369 | 369 | |
|
370 | 370 | ``prefix`` |
|
371 | 371 | Either ``*`` or a URI prefix with or without the scheme part. |
|
372 | 372 | The authentication entry with the longest matching prefix is used |
|
373 | 373 | (where ``*`` matches everything and counts as a match of length |
|
374 | 374 | 1). If the prefix doesn't include a scheme, the match is performed |
|
375 | 375 | against the URI with its scheme stripped as well, and the schemes |
|
376 | 376 | argument, q.v., is then subsequently consulted. |
|
377 | 377 | |
|
378 | 378 | ``username`` |
|
379 | 379 | Optional. Username to authenticate with. If not given, and the |
|
380 | 380 | remote site requires basic or digest authentication, the user will |
|
381 | 381 | be prompted for it. Environment variables are expanded in the |
|
382 | 382 | username letting you do ``foo.username = $USER``. If the URI |
|
383 | 383 | includes a username, only ``[auth]`` entries with a matching |
|
384 | 384 | username or without a username will be considered. |
|
385 | 385 | |
|
386 | 386 | ``password`` |
|
387 | 387 | Optional. Password to authenticate with. If not given, and the |
|
388 | 388 | remote site requires basic or digest authentication, the user |
|
389 | 389 | will be prompted for it. |
|
390 | 390 | |
|
391 | 391 | ``key`` |
|
392 | 392 | Optional. PEM encoded client certificate key file. Environment |
|
393 | 393 | variables are expanded in the filename. |
|
394 | 394 | |
|
395 | 395 | ``cert`` |
|
396 | 396 | Optional. PEM encoded client certificate chain file. Environment |
|
397 | 397 | variables are expanded in the filename. |
|
398 | 398 | |
|
399 | 399 | ``schemes`` |
|
400 | 400 | Optional. Space separated list of URI schemes to use this |
|
401 | 401 | authentication entry with. Only used if the prefix doesn't include |
|
402 | 402 | a scheme. Supported schemes are http and https. They will match |
|
403 | 403 | static-http and static-https respectively, as well. |
|
404 | 404 | (default: https) |
|
405 | 405 | |
|
406 | 406 | If no suitable authentication entry is found, the user is prompted |
|
407 | 407 | for credentials as usual if required by the remote. |
|
408 | 408 | |
|
409 | 409 | ``color`` |
|
410 | 410 | --------- |
|
411 | 411 | |
|
412 | 412 | Configure the Mercurial color mode. For details about how to define your custom |
|
413 | 413 | effect and style see :hg:`help color`. |
|
414 | 414 | |
|
415 | 415 | ``mode`` |
|
416 | 416 | String: control the method used to output color. One of ``auto``, ``ansi``, |
|
417 | 417 | ``win32``, ``terminfo`` or ``debug``. In auto mode, Mercurial will |
|
418 | 418 | use ANSI mode by default (or win32 mode on Windows) if it detects a |
|
419 | 419 | terminal. Any invalid value will disable color. |
|
420 | 420 | |
|
421 | 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 | 424 | On some systems, terminfo mode may cause problems when using |
|
425 | 425 | color with ``less -R`` as a pager program. less with the -R option |
|
426 | 426 | will only display ECMA-48 color codes, and terminfo mode may sometimes |
|
427 | 427 | emit codes that less doesn't understand. You can work around this by |
|
428 | 428 | either using ansi mode (or auto mode), or by using less -r (which will |
|
429 | 429 | pass through all terminal control codes, not just color control |
|
430 | 430 | codes). |
|
431 | 431 | |
|
432 | 432 | On some systems (such as MSYS in Windows), the terminal may support |
|
433 | 433 | a different color mode than the pager program. |
|
434 | 434 | |
|
435 | 435 | ``commands`` |
|
436 | 436 | ------------ |
|
437 | 437 | |
|
438 | 438 | ``status.relative`` |
|
439 | 439 | Make paths in :hg:`status` output relative to the current directory. |
|
440 | 440 | (default: False) |
|
441 | 441 | |
|
442 | 442 | ``update.requiredest`` |
|
443 | 443 | Require that the user pass a destination when running :hg:`update`. |
|
444 | 444 | For example, :hg:`update .::` will be allowed, but a plain :hg:`update` |
|
445 | 445 | will be disallowed. |
|
446 | 446 | (default: False) |
|
447 | 447 | |
|
448 | 448 | ``committemplate`` |
|
449 | 449 | ------------------ |
|
450 | 450 | |
|
451 | 451 | ``changeset`` |
|
452 | 452 | String: configuration in this section is used as the template to |
|
453 | 453 | customize the text shown in the editor when committing. |
|
454 | 454 | |
|
455 | 455 | In addition to pre-defined template keywords, commit log specific one |
|
456 | 456 | below can be used for customization: |
|
457 | 457 | |
|
458 | 458 | ``extramsg`` |
|
459 | 459 | String: Extra message (typically 'Leave message empty to abort |
|
460 | 460 | commit.'). This may be changed by some commands or extensions. |
|
461 | 461 | |
|
462 | 462 | For example, the template configuration below shows as same text as |
|
463 | 463 | one shown by default:: |
|
464 | 464 | |
|
465 | 465 | [committemplate] |
|
466 | 466 | changeset = {desc}\n\n |
|
467 | 467 | HG: Enter commit message. Lines beginning with 'HG:' are removed. |
|
468 | 468 | HG: {extramsg} |
|
469 | 469 | HG: -- |
|
470 | 470 | HG: user: {author}\n{ifeq(p2rev, "-1", "", |
|
471 | 471 | "HG: branch merge\n") |
|
472 | 472 | }HG: branch '{branch}'\n{if(activebookmark, |
|
473 | 473 | "HG: bookmark '{activebookmark}'\n") }{subrepos % |
|
474 | 474 | "HG: subrepo {subrepo}\n" }{file_adds % |
|
475 | 475 | "HG: added {file}\n" }{file_mods % |
|
476 | 476 | "HG: changed {file}\n" }{file_dels % |
|
477 | 477 | "HG: removed {file}\n" }{if(files, "", |
|
478 | 478 | "HG: no files changed\n")} |
|
479 | 479 | |
|
480 | 480 | ``diff()`` |
|
481 | 481 | String: show the diff (see :hg:`help templates` for detail) |
|
482 | 482 | |
|
483 | 483 | Sometimes it is helpful to show the diff of the changeset in the editor without |
|
484 | 484 | having to prefix 'HG: ' to each line so that highlighting works correctly. For |
|
485 | 485 | this, Mercurial provides a special string which will ignore everything below |
|
486 | 486 | it:: |
|
487 | 487 | |
|
488 | 488 | HG: ------------------------ >8 ------------------------ |
|
489 | 489 | |
|
490 | 490 | For example, the template configuration below will show the diff below the |
|
491 | 491 | extra message:: |
|
492 | 492 | |
|
493 | 493 | [committemplate] |
|
494 | 494 | changeset = {desc}\n\n |
|
495 | 495 | HG: Enter commit message. Lines beginning with 'HG:' are removed. |
|
496 | 496 | HG: {extramsg} |
|
497 | 497 | HG: ------------------------ >8 ------------------------ |
|
498 | 498 | HG: Do not touch the line above. |
|
499 | 499 | HG: Everything below will be removed. |
|
500 | 500 | {diff()} |
|
501 | 501 | |
|
502 | 502 | .. note:: |
|
503 | 503 | |
|
504 | 504 | For some problematic encodings (see :hg:`help win32mbcs` for |
|
505 | 505 | detail), this customization should be configured carefully, to |
|
506 | 506 | avoid showing broken characters. |
|
507 | 507 | |
|
508 | 508 | For example, if a multibyte character ending with backslash (0x5c) is |
|
509 | 509 | followed by the ASCII character 'n' in the customized template, |
|
510 | 510 | the sequence of backslash and 'n' is treated as line-feed unexpectedly |
|
511 | 511 | (and the multibyte character is broken, too). |
|
512 | 512 | |
|
513 | 513 | Customized template is used for commands below (``--edit`` may be |
|
514 | 514 | required): |
|
515 | 515 | |
|
516 | 516 | - :hg:`backout` |
|
517 | 517 | - :hg:`commit` |
|
518 | 518 | - :hg:`fetch` (for merge commit only) |
|
519 | 519 | - :hg:`graft` |
|
520 | 520 | - :hg:`histedit` |
|
521 | 521 | - :hg:`import` |
|
522 | 522 | - :hg:`qfold`, :hg:`qnew` and :hg:`qrefresh` |
|
523 | 523 | - :hg:`rebase` |
|
524 | 524 | - :hg:`shelve` |
|
525 | 525 | - :hg:`sign` |
|
526 | 526 | - :hg:`tag` |
|
527 | 527 | - :hg:`transplant` |
|
528 | 528 | |
|
529 | 529 | Configuring items below instead of ``changeset`` allows showing |
|
530 | 530 | customized message only for specific actions, or showing different |
|
531 | 531 | messages for each action. |
|
532 | 532 | |
|
533 | 533 | - ``changeset.backout`` for :hg:`backout` |
|
534 | 534 | - ``changeset.commit.amend.merge`` for :hg:`commit --amend` on merges |
|
535 | 535 | - ``changeset.commit.amend.normal`` for :hg:`commit --amend` on other |
|
536 | 536 | - ``changeset.commit.normal.merge`` for :hg:`commit` on merges |
|
537 | 537 | - ``changeset.commit.normal.normal`` for :hg:`commit` on other |
|
538 | 538 | - ``changeset.fetch`` for :hg:`fetch` (impling merge commit) |
|
539 | 539 | - ``changeset.gpg.sign`` for :hg:`sign` |
|
540 | 540 | - ``changeset.graft`` for :hg:`graft` |
|
541 | 541 | - ``changeset.histedit.edit`` for ``edit`` of :hg:`histedit` |
|
542 | 542 | - ``changeset.histedit.fold`` for ``fold`` of :hg:`histedit` |
|
543 | 543 | - ``changeset.histedit.mess`` for ``mess`` of :hg:`histedit` |
|
544 | 544 | - ``changeset.histedit.pick`` for ``pick`` of :hg:`histedit` |
|
545 | 545 | - ``changeset.import.bypass`` for :hg:`import --bypass` |
|
546 | 546 | - ``changeset.import.normal.merge`` for :hg:`import` on merges |
|
547 | 547 | - ``changeset.import.normal.normal`` for :hg:`import` on other |
|
548 | 548 | - ``changeset.mq.qnew`` for :hg:`qnew` |
|
549 | 549 | - ``changeset.mq.qfold`` for :hg:`qfold` |
|
550 | 550 | - ``changeset.mq.qrefresh`` for :hg:`qrefresh` |
|
551 | 551 | - ``changeset.rebase.collapse`` for :hg:`rebase --collapse` |
|
552 | 552 | - ``changeset.rebase.merge`` for :hg:`rebase` on merges |
|
553 | 553 | - ``changeset.rebase.normal`` for :hg:`rebase` on other |
|
554 | 554 | - ``changeset.shelve.shelve`` for :hg:`shelve` |
|
555 | 555 | - ``changeset.tag.add`` for :hg:`tag` without ``--remove`` |
|
556 | 556 | - ``changeset.tag.remove`` for :hg:`tag --remove` |
|
557 | 557 | - ``changeset.transplant.merge`` for :hg:`transplant` on merges |
|
558 | 558 | - ``changeset.transplant.normal`` for :hg:`transplant` on other |
|
559 | 559 | |
|
560 | 560 | These dot-separated lists of names are treated as hierarchical ones. |
|
561 | 561 | For example, ``changeset.tag.remove`` customizes the commit message |
|
562 | 562 | only for :hg:`tag --remove`, but ``changeset.tag`` customizes the |
|
563 | 563 | commit message for :hg:`tag` regardless of ``--remove`` option. |
|
564 | 564 | |
|
565 | 565 | When the external editor is invoked for a commit, the corresponding |
|
566 | 566 | dot-separated list of names without the ``changeset.`` prefix |
|
567 | 567 | (e.g. ``commit.normal.normal``) is in the ``HGEDITFORM`` environment |
|
568 | 568 | variable. |
|
569 | 569 | |
|
570 | 570 | In this section, items other than ``changeset`` can be referred from |
|
571 | 571 | others. For example, the configuration to list committed files up |
|
572 | 572 | below can be referred as ``{listupfiles}``:: |
|
573 | 573 | |
|
574 | 574 | [committemplate] |
|
575 | 575 | listupfiles = {file_adds % |
|
576 | 576 | "HG: added {file}\n" }{file_mods % |
|
577 | 577 | "HG: changed {file}\n" }{file_dels % |
|
578 | 578 | "HG: removed {file}\n" }{if(files, "", |
|
579 | 579 | "HG: no files changed\n")} |
|
580 | 580 | |
|
581 | 581 | ``decode/encode`` |
|
582 | 582 | ----------------- |
|
583 | 583 | |
|
584 | 584 | Filters for transforming files on checkout/checkin. This would |
|
585 | 585 | typically be used for newline processing or other |
|
586 | 586 | localization/canonicalization of files. |
|
587 | 587 | |
|
588 | 588 | Filters consist of a filter pattern followed by a filter command. |
|
589 | 589 | Filter patterns are globs by default, rooted at the repository root. |
|
590 | 590 | For example, to match any file ending in ``.txt`` in the root |
|
591 | 591 | directory only, use the pattern ``*.txt``. To match any file ending |
|
592 | 592 | in ``.c`` anywhere in the repository, use the pattern ``**.c``. |
|
593 | 593 | For each file only the first matching filter applies. |
|
594 | 594 | |
|
595 | 595 | The filter command can start with a specifier, either ``pipe:`` or |
|
596 | 596 | ``tempfile:``. If no specifier is given, ``pipe:`` is used by default. |
|
597 | 597 | |
|
598 | 598 | A ``pipe:`` command must accept data on stdin and return the transformed |
|
599 | 599 | data on stdout. |
|
600 | 600 | |
|
601 | 601 | Pipe example:: |
|
602 | 602 | |
|
603 | 603 | [encode] |
|
604 | 604 | # uncompress gzip files on checkin to improve delta compression |
|
605 | 605 | # note: not necessarily a good idea, just an example |
|
606 | 606 | *.gz = pipe: gunzip |
|
607 | 607 | |
|
608 | 608 | [decode] |
|
609 | 609 | # recompress gzip files when writing them to the working dir (we |
|
610 | 610 | # can safely omit "pipe:", because it's the default) |
|
611 | 611 | *.gz = gzip |
|
612 | 612 | |
|
613 | 613 | A ``tempfile:`` command is a template. The string ``INFILE`` is replaced |
|
614 | 614 | with the name of a temporary file that contains the data to be |
|
615 | 615 | filtered by the command. The string ``OUTFILE`` is replaced with the name |
|
616 | 616 | of an empty temporary file, where the filtered data must be written by |
|
617 | 617 | the command. |
|
618 | 618 | |
|
619 | 619 | .. container:: windows |
|
620 | 620 | |
|
621 | 621 | .. note:: |
|
622 | 622 | |
|
623 | 623 | The tempfile mechanism is recommended for Windows systems, |
|
624 | 624 | where the standard shell I/O redirection operators often have |
|
625 | 625 | strange effects and may corrupt the contents of your files. |
|
626 | 626 | |
|
627 | 627 | This filter mechanism is used internally by the ``eol`` extension to |
|
628 | 628 | translate line ending characters between Windows (CRLF) and Unix (LF) |
|
629 | 629 | format. We suggest you use the ``eol`` extension for convenience. |
|
630 | 630 | |
|
631 | 631 | |
|
632 | 632 | ``defaults`` |
|
633 | 633 | ------------ |
|
634 | 634 | |
|
635 | 635 | (defaults are deprecated. Don't use them. Use aliases instead.) |
|
636 | 636 | |
|
637 | 637 | Use the ``[defaults]`` section to define command defaults, i.e. the |
|
638 | 638 | default options/arguments to pass to the specified commands. |
|
639 | 639 | |
|
640 | 640 | The following example makes :hg:`log` run in verbose mode, and |
|
641 | 641 | :hg:`status` show only the modified files, by default:: |
|
642 | 642 | |
|
643 | 643 | [defaults] |
|
644 | 644 | log = -v |
|
645 | 645 | status = -m |
|
646 | 646 | |
|
647 | 647 | The actual commands, instead of their aliases, must be used when |
|
648 | 648 | defining command defaults. The command defaults will also be applied |
|
649 | 649 | to the aliases of the commands defined. |
|
650 | 650 | |
|
651 | 651 | |
|
652 | 652 | ``diff`` |
|
653 | 653 | -------- |
|
654 | 654 | |
|
655 | 655 | Settings used when displaying diffs. Everything except for ``unified`` |
|
656 | 656 | is a Boolean and defaults to False. See :hg:`help config.annotate` |
|
657 | 657 | for related options for the annotate command. |
|
658 | 658 | |
|
659 | 659 | ``git`` |
|
660 | 660 | Use git extended diff format. |
|
661 | 661 | |
|
662 | 662 | ``nobinary`` |
|
663 | 663 | Omit git binary patches. |
|
664 | 664 | |
|
665 | 665 | ``nodates`` |
|
666 | 666 | Don't include dates in diff headers. |
|
667 | 667 | |
|
668 | 668 | ``noprefix`` |
|
669 | 669 | Omit 'a/' and 'b/' prefixes from filenames. Ignored in plain mode. |
|
670 | 670 | |
|
671 | 671 | ``showfunc`` |
|
672 | 672 | Show which function each change is in. |
|
673 | 673 | |
|
674 | 674 | ``ignorews`` |
|
675 | 675 | Ignore white space when comparing lines. |
|
676 | 676 | |
|
677 | 677 | ``ignorewsamount`` |
|
678 | 678 | Ignore changes in the amount of white space. |
|
679 | 679 | |
|
680 | 680 | ``ignoreblanklines`` |
|
681 | 681 | Ignore changes whose lines are all blank. |
|
682 | 682 | |
|
683 | 683 | ``unified`` |
|
684 | 684 | Number of lines of context to show. |
|
685 | 685 | |
|
686 | 686 | ``email`` |
|
687 | 687 | --------- |
|
688 | 688 | |
|
689 | 689 | Settings for extensions that send email messages. |
|
690 | 690 | |
|
691 | 691 | ``from`` |
|
692 | 692 | Optional. Email address to use in "From" header and SMTP envelope |
|
693 | 693 | of outgoing messages. |
|
694 | 694 | |
|
695 | 695 | ``to`` |
|
696 | 696 | Optional. Comma-separated list of recipients' email addresses. |
|
697 | 697 | |
|
698 | 698 | ``cc`` |
|
699 | 699 | Optional. Comma-separated list of carbon copy recipients' |
|
700 | 700 | email addresses. |
|
701 | 701 | |
|
702 | 702 | ``bcc`` |
|
703 | 703 | Optional. Comma-separated list of blind carbon copy recipients' |
|
704 | 704 | email addresses. |
|
705 | 705 | |
|
706 | 706 | ``method`` |
|
707 | 707 | Optional. Method to use to send email messages. If value is ``smtp`` |
|
708 | 708 | (default), use SMTP (see the ``[smtp]`` section for configuration). |
|
709 | 709 | Otherwise, use as name of program to run that acts like sendmail |
|
710 | 710 | (takes ``-f`` option for sender, list of recipients on command line, |
|
711 | 711 | message on stdin). Normally, setting this to ``sendmail`` or |
|
712 | 712 | ``/usr/sbin/sendmail`` is enough to use sendmail to send messages. |
|
713 | 713 | |
|
714 | 714 | ``charsets`` |
|
715 | 715 | Optional. Comma-separated list of character sets considered |
|
716 | 716 | convenient for recipients. Addresses, headers, and parts not |
|
717 | 717 | containing patches of outgoing messages will be encoded in the |
|
718 | 718 | first character set to which conversion from local encoding |
|
719 | 719 | (``$HGENCODING``, ``ui.fallbackencoding``) succeeds. If correct |
|
720 | 720 | conversion fails, the text in question is sent as is. |
|
721 | 721 | (default: '') |
|
722 | 722 | |
|
723 | 723 | Order of outgoing email character sets: |
|
724 | 724 | |
|
725 | 725 | 1. ``us-ascii``: always first, regardless of settings |
|
726 | 726 | 2. ``email.charsets``: in order given by user |
|
727 | 727 | 3. ``ui.fallbackencoding``: if not in email.charsets |
|
728 | 728 | 4. ``$HGENCODING``: if not in email.charsets |
|
729 | 729 | 5. ``utf-8``: always last, regardless of settings |
|
730 | 730 | |
|
731 | 731 | Email example:: |
|
732 | 732 | |
|
733 | 733 | [email] |
|
734 | 734 | from = Joseph User <joe.user@example.com> |
|
735 | 735 | method = /usr/sbin/sendmail |
|
736 | 736 | # charsets for western Europeans |
|
737 | 737 | # us-ascii, utf-8 omitted, as they are tried first and last |
|
738 | 738 | charsets = iso-8859-1, iso-8859-15, windows-1252 |
|
739 | 739 | |
|
740 | 740 | |
|
741 | 741 | ``extensions`` |
|
742 | 742 | -------------- |
|
743 | 743 | |
|
744 | 744 | Mercurial has an extension mechanism for adding new features. To |
|
745 | 745 | enable an extension, create an entry for it in this section. |
|
746 | 746 | |
|
747 | 747 | If you know that the extension is already in Python's search path, |
|
748 | 748 | you can give the name of the module, followed by ``=``, with nothing |
|
749 | 749 | after the ``=``. |
|
750 | 750 | |
|
751 | 751 | Otherwise, give a name that you choose, followed by ``=``, followed by |
|
752 | 752 | the path to the ``.py`` file (including the file name extension) that |
|
753 | 753 | defines the extension. |
|
754 | 754 | |
|
755 | 755 | To explicitly disable an extension that is enabled in an hgrc of |
|
756 | 756 | broader scope, prepend its path with ``!``, as in ``foo = !/ext/path`` |
|
757 | 757 | or ``foo = !`` when path is not supplied. |
|
758 | 758 | |
|
759 | 759 | Example for ``~/.hgrc``:: |
|
760 | 760 | |
|
761 | 761 | [extensions] |
|
762 | 762 | # (the churn extension will get loaded from Mercurial's path) |
|
763 | 763 | churn = |
|
764 | 764 | # (this extension will get loaded from the file specified) |
|
765 | 765 | myfeature = ~/.hgext/myfeature.py |
|
766 | 766 | |
|
767 | 767 | |
|
768 | 768 | ``format`` |
|
769 | 769 | ---------- |
|
770 | 770 | |
|
771 | 771 | ``usegeneraldelta`` |
|
772 | 772 | Enable or disable the "generaldelta" repository format which improves |
|
773 | 773 | repository compression by allowing "revlog" to store delta against arbitrary |
|
774 | 774 | revision instead of the previous stored one. This provides significant |
|
775 | 775 | improvement for repositories with branches. |
|
776 | 776 | |
|
777 | 777 | Repositories with this on-disk format require Mercurial version 1.9. |
|
778 | 778 | |
|
779 | 779 | Enabled by default. |
|
780 | 780 | |
|
781 | 781 | ``dotencode`` |
|
782 | 782 | Enable or disable the "dotencode" repository format which enhances |
|
783 | 783 | the "fncache" repository format (which has to be enabled to use |
|
784 | 784 | dotencode) to avoid issues with filenames starting with ._ on |
|
785 | 785 | Mac OS X and spaces on Windows. |
|
786 | 786 | |
|
787 | 787 | Repositories with this on-disk format require Mercurial version 1.7. |
|
788 | 788 | |
|
789 | 789 | Enabled by default. |
|
790 | 790 | |
|
791 | 791 | ``usefncache`` |
|
792 | 792 | Enable or disable the "fncache" repository format which enhances |
|
793 | 793 | the "store" repository format (which has to be enabled to use |
|
794 | 794 | fncache) to allow longer filenames and avoids using Windows |
|
795 | 795 | reserved names, e.g. "nul". |
|
796 | 796 | |
|
797 | 797 | Repositories with this on-disk format require Mercurial version 1.1. |
|
798 | 798 | |
|
799 | 799 | Enabled by default. |
|
800 | 800 | |
|
801 | 801 | ``usestore`` |
|
802 | 802 | Enable or disable the "store" repository format which improves |
|
803 | 803 | compatibility with systems that fold case or otherwise mangle |
|
804 | 804 | filenames. Disabling this option will allow you to store longer filenames |
|
805 | 805 | in some situations at the expense of compatibility. |
|
806 | 806 | |
|
807 | 807 | Repositories with this on-disk format require Mercurial version 0.9.4. |
|
808 | 808 | |
|
809 | 809 | Enabled by default. |
|
810 | 810 | |
|
811 | 811 | ``graph`` |
|
812 | 812 | --------- |
|
813 | 813 | |
|
814 | 814 | Web graph view configuration. This section let you change graph |
|
815 | 815 | elements display properties by branches, for instance to make the |
|
816 | 816 | ``default`` branch stand out. |
|
817 | 817 | |
|
818 | 818 | Each line has the following format:: |
|
819 | 819 | |
|
820 | 820 | <branch>.<argument> = <value> |
|
821 | 821 | |
|
822 | 822 | where ``<branch>`` is the name of the branch being |
|
823 | 823 | customized. Example:: |
|
824 | 824 | |
|
825 | 825 | [graph] |
|
826 | 826 | # 2px width |
|
827 | 827 | default.width = 2 |
|
828 | 828 | # red color |
|
829 | 829 | default.color = FF0000 |
|
830 | 830 | |
|
831 | 831 | Supported arguments: |
|
832 | 832 | |
|
833 | 833 | ``width`` |
|
834 | 834 | Set branch edges width in pixels. |
|
835 | 835 | |
|
836 | 836 | ``color`` |
|
837 | 837 | Set branch edges color in hexadecimal RGB notation. |
|
838 | 838 | |
|
839 | 839 | ``hooks`` |
|
840 | 840 | --------- |
|
841 | 841 | |
|
842 | 842 | Commands or Python functions that get automatically executed by |
|
843 | 843 | various actions such as starting or finishing a commit. Multiple |
|
844 | 844 | hooks can be run for the same action by appending a suffix to the |
|
845 | 845 | action. Overriding a site-wide hook can be done by changing its |
|
846 | 846 | value or setting it to an empty string. Hooks can be prioritized |
|
847 | 847 | by adding a prefix of ``priority.`` to the hook name on a new line |
|
848 | 848 | and setting the priority. The default priority is 0. |
|
849 | 849 | |
|
850 | 850 | Example ``.hg/hgrc``:: |
|
851 | 851 | |
|
852 | 852 | [hooks] |
|
853 | 853 | # update working directory after adding changesets |
|
854 | 854 | changegroup.update = hg update |
|
855 | 855 | # do not use the site-wide hook |
|
856 | 856 | incoming = |
|
857 | 857 | incoming.email = /my/email/hook |
|
858 | 858 | incoming.autobuild = /my/build/hook |
|
859 | 859 | # force autobuild hook to run before other incoming hooks |
|
860 | 860 | priority.incoming.autobuild = 1 |
|
861 | 861 | |
|
862 | 862 | Most hooks are run with environment variables set that give useful |
|
863 | 863 | additional information. For each hook below, the environment variables |
|
864 | 864 | it is passed are listed with names of the form ``$HG_foo``. The |
|
865 | 865 | ``$HG_HOOKTYPE`` and ``$HG_HOOKNAME`` variables are set for all hooks. |
|
866 | 866 | their respectively contains the type of hook which triggered the run and |
|
867 | 867 | the full name of the hooks in the config. In the example about this will |
|
868 | 868 | be ``$HG_HOOKTYPE=incoming`` and ``$HG_HOOKNAME=incoming.email``. |
|
869 | 869 | |
|
870 | 870 | ``changegroup`` |
|
871 | 871 | Run after a changegroup has been added via push, pull or unbundle. ID of the |
|
872 | 872 | first new changeset is in ``$HG_NODE`` and last in ``$HG_NODE_LAST``. URL |
|
873 | 873 | from which changes came is in ``$HG_URL``. |
|
874 | 874 | |
|
875 | 875 | ``commit`` |
|
876 | 876 | Run after a changeset has been created in the local repository. ID |
|
877 | 877 | of the newly created changeset is in ``$HG_NODE``. Parent changeset |
|
878 | 878 | IDs are in ``$HG_PARENT1`` and ``$HG_PARENT2``. |
|
879 | 879 | |
|
880 | 880 | ``incoming`` |
|
881 | 881 | Run after a changeset has been pulled, pushed, or unbundled into |
|
882 | 882 | the local repository. The ID of the newly arrived changeset is in |
|
883 | 883 | ``$HG_NODE``. URL that was source of changes came is in ``$HG_URL``. |
|
884 | 884 | |
|
885 | 885 | ``outgoing`` |
|
886 | 886 | Run after sending changes from local repository to another. ID of |
|
887 | 887 | first changeset sent is in ``$HG_NODE``. Source of operation is in |
|
888 | 888 | ``$HG_SOURCE``; Also see :hg:`help config.hooks.preoutgoing` hook. |
|
889 | 889 | |
|
890 | 890 | ``post-<command>`` |
|
891 | 891 | Run after successful invocations of the associated command. The |
|
892 | 892 | contents of the command line are passed as ``$HG_ARGS`` and the result |
|
893 | 893 | code in ``$HG_RESULT``. Parsed command line arguments are passed as |
|
894 | 894 | ``$HG_PATS`` and ``$HG_OPTS``. These contain string representations of |
|
895 | 895 | the python data internally passed to <command>. ``$HG_OPTS`` is a |
|
896 | 896 | dictionary of options (with unspecified options set to their defaults). |
|
897 | 897 | ``$HG_PATS`` is a list of arguments. Hook failure is ignored. |
|
898 | 898 | |
|
899 | 899 | ``fail-<command>`` |
|
900 | 900 | Run after a failed invocation of an associated command. The contents |
|
901 | 901 | of the command line are passed as ``$HG_ARGS``. Parsed command line |
|
902 | 902 | arguments are passed as ``$HG_PATS`` and ``$HG_OPTS``. These contain |
|
903 | 903 | string representations of the python data internally passed to |
|
904 | 904 | <command>. ``$HG_OPTS`` is a dictionary of options (with unspecified |
|
905 | 905 | options set to their defaults). ``$HG_PATS`` is a list of arguments. |
|
906 | 906 | Hook failure is ignored. |
|
907 | 907 | |
|
908 | 908 | ``pre-<command>`` |
|
909 | 909 | Run before executing the associated command. The contents of the |
|
910 | 910 | command line are passed as ``$HG_ARGS``. Parsed command line arguments |
|
911 | 911 | are passed as ``$HG_PATS`` and ``$HG_OPTS``. These contain string |
|
912 | 912 | representations of the data internally passed to <command>. ``$HG_OPTS`` |
|
913 | 913 | is a dictionary of options (with unspecified options set to their |
|
914 | 914 | defaults). ``$HG_PATS`` is a list of arguments. If the hook returns |
|
915 | 915 | failure, the command doesn't execute and Mercurial returns the failure |
|
916 | 916 | code. |
|
917 | 917 | |
|
918 | 918 | ``prechangegroup`` |
|
919 | 919 | Run before a changegroup is added via push, pull or unbundle. Exit |
|
920 | 920 | status 0 allows the changegroup to proceed. Non-zero status will |
|
921 | 921 | cause the push, pull or unbundle to fail. URL from which changes |
|
922 | 922 | will come is in ``$HG_URL``. |
|
923 | 923 | |
|
924 | 924 | ``precommit`` |
|
925 | 925 | Run before starting a local commit. Exit status 0 allows the |
|
926 | 926 | commit to proceed. Non-zero status will cause the commit to fail. |
|
927 | 927 | Parent changeset IDs are in ``$HG_PARENT1`` and ``$HG_PARENT2``. |
|
928 | 928 | |
|
929 | 929 | ``prelistkeys`` |
|
930 | 930 | Run before listing pushkeys (like bookmarks) in the |
|
931 | 931 | repository. Non-zero status will cause failure. The key namespace is |
|
932 | 932 | in ``$HG_NAMESPACE``. |
|
933 | 933 | |
|
934 | 934 | ``preoutgoing`` |
|
935 | 935 | Run before collecting changes to send from the local repository to |
|
936 | 936 | another. Non-zero status will cause failure. This lets you prevent |
|
937 | 937 | pull over HTTP or SSH. Also prevents against local pull, push |
|
938 | 938 | (outbound) or bundle commands, but not effective, since you can |
|
939 | 939 | just copy files instead then. Source of operation is in |
|
940 | 940 | ``$HG_SOURCE``. If "serve", operation is happening on behalf of remote |
|
941 | 941 | SSH or HTTP repository. If "push", "pull" or "bundle", operation |
|
942 | 942 | is happening on behalf of repository on same system. |
|
943 | 943 | |
|
944 | 944 | ``prepushkey`` |
|
945 | 945 | Run before a pushkey (like a bookmark) is added to the |
|
946 | 946 | repository. Non-zero status will cause the key to be rejected. The |
|
947 | 947 | key namespace is in ``$HG_NAMESPACE``, the key is in ``$HG_KEY``, |
|
948 | 948 | the old value (if any) is in ``$HG_OLD``, and the new value is in |
|
949 | 949 | ``$HG_NEW``. |
|
950 | 950 | |
|
951 | 951 | ``pretag`` |
|
952 | 952 | Run before creating a tag. Exit status 0 allows the tag to be |
|
953 | 953 | created. Non-zero status will cause the tag to fail. ID of |
|
954 | 954 | changeset to tag is in ``$HG_NODE``. Name of tag is in ``$HG_TAG``. Tag is |
|
955 | 955 | local if ``$HG_LOCAL=1``, in repository if ``$HG_LOCAL=0``. |
|
956 | 956 | |
|
957 | 957 | ``pretxnopen`` |
|
958 | 958 | Run before any new repository transaction is open. The reason for the |
|
959 | 959 | transaction will be in ``$HG_TXNNAME`` and a unique identifier for the |
|
960 | 960 | transaction will be in ``HG_TXNID``. A non-zero status will prevent the |
|
961 | 961 | transaction from being opened. |
|
962 | 962 | |
|
963 | 963 | ``pretxnclose`` |
|
964 | 964 | Run right before the transaction is actually finalized. Any repository change |
|
965 | 965 | will be visible to the hook program. This lets you validate the transaction |
|
966 | 966 | content or change it. Exit status 0 allows the commit to proceed. Non-zero |
|
967 | 967 | status will cause the transaction to be rolled back. The reason for the |
|
968 | 968 | transaction opening will be in ``$HG_TXNNAME`` and a unique identifier for |
|
969 | 969 | the transaction will be in ``HG_TXNID``. The rest of the available data will |
|
970 | 970 | vary according the transaction type. New changesets will add ``$HG_NODE`` (id |
|
971 | 971 | of the first added changeset), ``$HG_NODE_LAST`` (id of the last added |
|
972 | 972 | changeset), ``$HG_URL`` and ``$HG_SOURCE`` variables, bookmarks and phases |
|
973 | 973 | changes will set ``HG_BOOKMARK_MOVED`` and ``HG_PHASES_MOVED`` to ``1``, etc. |
|
974 | 974 | |
|
975 | 975 | ``txnclose`` |
|
976 | 976 | Run after any repository transaction has been committed. At this |
|
977 | 977 | point, the transaction can no longer be rolled back. The hook will run |
|
978 | 978 | after the lock is released. See :hg:`help config.hooks.pretxnclose` docs for |
|
979 | 979 | details about available variables. |
|
980 | 980 | |
|
981 | 981 | ``txnabort`` |
|
982 | 982 | Run when a transaction is aborted. See :hg:`help config.hooks.pretxnclose` |
|
983 | 983 | docs for details about available variables. |
|
984 | 984 | |
|
985 | 985 | ``pretxnchangegroup`` |
|
986 | 986 | Run after a changegroup has been added via push, pull or unbundle, but before |
|
987 | 987 | the transaction has been committed. Changegroup is visible to hook program. |
|
988 | 988 | This lets you validate incoming changes before accepting them. Passed the ID |
|
989 | 989 | of the first new changeset in ``$HG_NODE`` and last in ``$HG_NODE_LAST``. |
|
990 | 990 | Exit status 0 allows the transaction to commit. Non-zero status will cause |
|
991 | 991 | the transaction to be rolled back and the push, pull or unbundle will fail. |
|
992 | 992 | URL that was source of changes is in ``$HG_URL``. |
|
993 | 993 | |
|
994 | 994 | ``pretxncommit`` |
|
995 | 995 | Run after a changeset has been created but the transaction not yet |
|
996 | 996 | committed. Changeset is visible to hook program. This lets you |
|
997 | 997 | validate commit message and changes. Exit status 0 allows the |
|
998 | 998 | commit to proceed. Non-zero status will cause the transaction to |
|
999 | 999 | be rolled back. ID of changeset is in ``$HG_NODE``. Parent changeset |
|
1000 | 1000 | IDs are in ``$HG_PARENT1`` and ``$HG_PARENT2``. |
|
1001 | 1001 | |
|
1002 | 1002 | ``preupdate`` |
|
1003 | 1003 | Run before updating the working directory. Exit status 0 allows |
|
1004 | 1004 | the update to proceed. Non-zero status will prevent the update. |
|
1005 | 1005 | Changeset ID of first new parent is in ``$HG_PARENT1``. If merge, ID |
|
1006 | 1006 | of second new parent is in ``$HG_PARENT2``. |
|
1007 | 1007 | |
|
1008 | 1008 | ``listkeys`` |
|
1009 | 1009 | Run after listing pushkeys (like bookmarks) in the repository. The |
|
1010 | 1010 | key namespace is in ``$HG_NAMESPACE``. ``$HG_VALUES`` is a |
|
1011 | 1011 | dictionary containing the keys and values. |
|
1012 | 1012 | |
|
1013 | 1013 | ``pushkey`` |
|
1014 | 1014 | Run after a pushkey (like a bookmark) is added to the |
|
1015 | 1015 | repository. The key namespace is in ``$HG_NAMESPACE``, the key is in |
|
1016 | 1016 | ``$HG_KEY``, the old value (if any) is in ``$HG_OLD``, and the new |
|
1017 | 1017 | value is in ``$HG_NEW``. |
|
1018 | 1018 | |
|
1019 | 1019 | ``tag`` |
|
1020 | 1020 | Run after a tag is created. ID of tagged changeset is in ``$HG_NODE``. |
|
1021 | 1021 | Name of tag is in ``$HG_TAG``. Tag is local if ``$HG_LOCAL=1``, in |
|
1022 | 1022 | repository if ``$HG_LOCAL=0``. |
|
1023 | 1023 | |
|
1024 | 1024 | ``update`` |
|
1025 | 1025 | Run after updating the working directory. Changeset ID of first |
|
1026 | 1026 | new parent is in ``$HG_PARENT1``. If merge, ID of second new parent is |
|
1027 | 1027 | in ``$HG_PARENT2``. If the update succeeded, ``$HG_ERROR=0``. If the |
|
1028 | 1028 | update failed (e.g. because conflicts not resolved), ``$HG_ERROR=1``. |
|
1029 | 1029 | |
|
1030 | 1030 | .. note:: |
|
1031 | 1031 | |
|
1032 | 1032 | It is generally better to use standard hooks rather than the |
|
1033 | 1033 | generic pre- and post- command hooks as they are guaranteed to be |
|
1034 | 1034 | called in the appropriate contexts for influencing transactions. |
|
1035 | 1035 | Also, hooks like "commit" will be called in all contexts that |
|
1036 | 1036 | generate a commit (e.g. tag) and not just the commit command. |
|
1037 | 1037 | |
|
1038 | 1038 | .. note:: |
|
1039 | 1039 | |
|
1040 | 1040 | Environment variables with empty values may not be passed to |
|
1041 | 1041 | hooks on platforms such as Windows. As an example, ``$HG_PARENT2`` |
|
1042 | 1042 | will have an empty value under Unix-like platforms for non-merge |
|
1043 | 1043 | changesets, while it will not be available at all under Windows. |
|
1044 | 1044 | |
|
1045 | 1045 | The syntax for Python hooks is as follows:: |
|
1046 | 1046 | |
|
1047 | 1047 | hookname = python:modulename.submodule.callable |
|
1048 | 1048 | hookname = python:/path/to/python/module.py:callable |
|
1049 | 1049 | |
|
1050 | 1050 | Python hooks are run within the Mercurial process. Each hook is |
|
1051 | 1051 | called with at least three keyword arguments: a ui object (keyword |
|
1052 | 1052 | ``ui``), a repository object (keyword ``repo``), and a ``hooktype`` |
|
1053 | 1053 | keyword that tells what kind of hook is used. Arguments listed as |
|
1054 | 1054 | environment variables above are passed as keyword arguments, with no |
|
1055 | 1055 | ``HG_`` prefix, and names in lower case. |
|
1056 | 1056 | |
|
1057 | 1057 | If a Python hook returns a "true" value or raises an exception, this |
|
1058 | 1058 | is treated as a failure. |
|
1059 | 1059 | |
|
1060 | 1060 | |
|
1061 | 1061 | ``hostfingerprints`` |
|
1062 | 1062 | -------------------- |
|
1063 | 1063 | |
|
1064 | 1064 | (Deprecated. Use ``[hostsecurity]``'s ``fingerprints`` options instead.) |
|
1065 | 1065 | |
|
1066 | 1066 | Fingerprints of the certificates of known HTTPS servers. |
|
1067 | 1067 | |
|
1068 | 1068 | A HTTPS connection to a server with a fingerprint configured here will |
|
1069 | 1069 | only succeed if the servers certificate matches the fingerprint. |
|
1070 | 1070 | This is very similar to how ssh known hosts works. |
|
1071 | 1071 | |
|
1072 | 1072 | The fingerprint is the SHA-1 hash value of the DER encoded certificate. |
|
1073 | 1073 | Multiple values can be specified (separated by spaces or commas). This can |
|
1074 | 1074 | be used to define both old and new fingerprints while a host transitions |
|
1075 | 1075 | to a new certificate. |
|
1076 | 1076 | |
|
1077 | 1077 | The CA chain and web.cacerts is not used for servers with a fingerprint. |
|
1078 | 1078 | |
|
1079 | 1079 | For example:: |
|
1080 | 1080 | |
|
1081 | 1081 | [hostfingerprints] |
|
1082 | 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 | 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 | 1085 | ``hostsecurity`` |
|
1086 | 1086 | ---------------- |
|
1087 | 1087 | |
|
1088 | 1088 | Used to specify global and per-host security settings for connecting to |
|
1089 | 1089 | other machines. |
|
1090 | 1090 | |
|
1091 | 1091 | The following options control default behavior for all hosts. |
|
1092 | 1092 | |
|
1093 | 1093 | ``ciphers`` |
|
1094 | 1094 | Defines the cryptographic ciphers to use for connections. |
|
1095 | 1095 | |
|
1096 | 1096 | Value must be a valid OpenSSL Cipher List Format as documented at |
|
1097 | 1097 | https://www.openssl.org/docs/manmaster/apps/ciphers.html#CIPHER-LIST-FORMAT. |
|
1098 | 1098 | |
|
1099 | 1099 | This setting is for advanced users only. Setting to incorrect values |
|
1100 | 1100 | can significantly lower connection security or decrease performance. |
|
1101 | 1101 | You have been warned. |
|
1102 | 1102 | |
|
1103 | 1103 | This option requires Python 2.7. |
|
1104 | 1104 | |
|
1105 | 1105 | ``minimumprotocol`` |
|
1106 | 1106 | Defines the minimum channel encryption protocol to use. |
|
1107 | 1107 | |
|
1108 | 1108 | By default, the highest version of TLS supported by both client and server |
|
1109 | 1109 | is used. |
|
1110 | 1110 | |
|
1111 | 1111 | Allowed values are: ``tls1.0``, ``tls1.1``, ``tls1.2``. |
|
1112 | 1112 | |
|
1113 | 1113 | When running on an old Python version, only ``tls1.0`` is allowed since |
|
1114 | 1114 | old versions of Python only support up to TLS 1.0. |
|
1115 | 1115 | |
|
1116 | 1116 | When running a Python that supports modern TLS versions, the default is |
|
1117 | 1117 | ``tls1.1``. ``tls1.0`` can still be used to allow TLS 1.0. However, this |
|
1118 | 1118 | weakens security and should only be used as a feature of last resort if |
|
1119 | 1119 | a server does not support TLS 1.1+. |
|
1120 | 1120 | |
|
1121 | 1121 | Options in the ``[hostsecurity]`` section can have the form |
|
1122 | 1122 | ``hostname``:``setting``. This allows multiple settings to be defined on a |
|
1123 | 1123 | per-host basis. |
|
1124 | 1124 | |
|
1125 | 1125 | The following per-host settings can be defined. |
|
1126 | 1126 | |
|
1127 | 1127 | ``ciphers`` |
|
1128 | 1128 | This behaves like ``ciphers`` as described above except it only applies |
|
1129 | 1129 | to the host on which it is defined. |
|
1130 | 1130 | |
|
1131 | 1131 | ``fingerprints`` |
|
1132 | 1132 | A list of hashes of the DER encoded peer/remote certificate. Values have |
|
1133 | 1133 | the form ``algorithm``:``fingerprint``. e.g. |
|
1134 | 1134 | ``sha256:c3ab8ff13720e8ad9047dd39466b3c8974e592c2fa383d4a3960714caef0c4f2``. |
|
1135 | 1135 | |
|
1136 | 1136 | The following algorithms/prefixes are supported: ``sha1``, ``sha256``, |
|
1137 | 1137 | ``sha512``. |
|
1138 | 1138 | |
|
1139 | 1139 | Use of ``sha256`` or ``sha512`` is preferred. |
|
1140 | 1140 | |
|
1141 | 1141 | If a fingerprint is specified, the CA chain is not validated for this |
|
1142 | 1142 | host and Mercurial will require the remote certificate to match one |
|
1143 | 1143 | of the fingerprints specified. This means if the server updates its |
|
1144 | 1144 | certificate, Mercurial will abort until a new fingerprint is defined. |
|
1145 | 1145 | This can provide stronger security than traditional CA-based validation |
|
1146 | 1146 | at the expense of convenience. |
|
1147 | 1147 | |
|
1148 | 1148 | This option takes precedence over ``verifycertsfile``. |
|
1149 | 1149 | |
|
1150 | 1150 | ``minimumprotocol`` |
|
1151 | 1151 | This behaves like ``minimumprotocol`` as described above except it |
|
1152 | 1152 | only applies to the host on which it is defined. |
|
1153 | 1153 | |
|
1154 | 1154 | ``verifycertsfile`` |
|
1155 | 1155 | Path to file a containing a list of PEM encoded certificates used to |
|
1156 | 1156 | verify the server certificate. Environment variables and ``~user`` |
|
1157 | 1157 | constructs are expanded in the filename. |
|
1158 | 1158 | |
|
1159 | 1159 | The server certificate or the certificate's certificate authority (CA) |
|
1160 | 1160 | must match a certificate from this file or certificate verification |
|
1161 | 1161 | will fail and connections to the server will be refused. |
|
1162 | 1162 | |
|
1163 | 1163 | If defined, only certificates provided by this file will be used: |
|
1164 | 1164 | ``web.cacerts`` and any system/default certificates will not be |
|
1165 | 1165 | used. |
|
1166 | 1166 | |
|
1167 | 1167 | This option has no effect if the per-host ``fingerprints`` option |
|
1168 | 1168 | is set. |
|
1169 | 1169 | |
|
1170 | 1170 | The format of the file is as follows:: |
|
1171 | 1171 | |
|
1172 | 1172 | -----BEGIN CERTIFICATE----- |
|
1173 | 1173 | ... (certificate in base64 PEM encoding) ... |
|
1174 | 1174 | -----END CERTIFICATE----- |
|
1175 | 1175 | -----BEGIN CERTIFICATE----- |
|
1176 | 1176 | ... (certificate in base64 PEM encoding) ... |
|
1177 | 1177 | -----END CERTIFICATE----- |
|
1178 | 1178 | |
|
1179 | 1179 | For example:: |
|
1180 | 1180 | |
|
1181 | 1181 | [hostsecurity] |
|
1182 | 1182 | hg.example.com:fingerprints = sha256:c3ab8ff13720e8ad9047dd39466b3c8974e592c2fa383d4a3960714caef0c4f2 |
|
1183 | 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 | 1184 | foo.example.com:verifycertsfile = /etc/ssl/trusted-ca-certs.pem |
|
1185 | 1185 | |
|
1186 | 1186 | To change the default minimum protocol version to TLS 1.2 but to allow TLS 1.1 |
|
1187 | 1187 | when connecting to ``hg.example.com``:: |
|
1188 | 1188 | |
|
1189 | 1189 | [hostsecurity] |
|
1190 | 1190 | minimumprotocol = tls1.2 |
|
1191 | 1191 | hg.example.com:minimumprotocol = tls1.1 |
|
1192 | 1192 | |
|
1193 | 1193 | ``http_proxy`` |
|
1194 | 1194 | -------------- |
|
1195 | 1195 | |
|
1196 | 1196 | Used to access web-based Mercurial repositories through a HTTP |
|
1197 | 1197 | proxy. |
|
1198 | 1198 | |
|
1199 | 1199 | ``host`` |
|
1200 | 1200 | Host name and (optional) port of the proxy server, for example |
|
1201 | 1201 | "myproxy:8000". |
|
1202 | 1202 | |
|
1203 | 1203 | ``no`` |
|
1204 | 1204 | Optional. Comma-separated list of host names that should bypass |
|
1205 | 1205 | the proxy. |
|
1206 | 1206 | |
|
1207 | 1207 | ``passwd`` |
|
1208 | 1208 | Optional. Password to authenticate with at the proxy server. |
|
1209 | 1209 | |
|
1210 | 1210 | ``user`` |
|
1211 | 1211 | Optional. User name to authenticate with at the proxy server. |
|
1212 | 1212 | |
|
1213 | 1213 | ``always`` |
|
1214 | 1214 | Optional. Always use the proxy, even for localhost and any entries |
|
1215 | 1215 | in ``http_proxy.no``. (default: False) |
|
1216 | 1216 | |
|
1217 | 1217 | ``merge`` |
|
1218 | 1218 | --------- |
|
1219 | 1219 | |
|
1220 | 1220 | This section specifies behavior during merges and updates. |
|
1221 | 1221 | |
|
1222 | 1222 | ``checkignored`` |
|
1223 | 1223 | Controls behavior when an ignored file on disk has the same name as a tracked |
|
1224 | 1224 | file in the changeset being merged or updated to, and has different |
|
1225 | 1225 | contents. Options are ``abort``, ``warn`` and ``ignore``. With ``abort``, |
|
1226 | 1226 | abort on such files. With ``warn``, warn on such files and back them up as |
|
1227 | 1227 | ``.orig``. With ``ignore``, don't print a warning and back them up as |
|
1228 | 1228 | ``.orig``. (default: ``abort``) |
|
1229 | 1229 | |
|
1230 | 1230 | ``checkunknown`` |
|
1231 | 1231 | Controls behavior when an unknown file that isn't ignored has the same name |
|
1232 | 1232 | as a tracked file in the changeset being merged or updated to, and has |
|
1233 | 1233 | different contents. Similar to ``merge.checkignored``, except for files that |
|
1234 | 1234 | are not ignored. (default: ``abort``) |
|
1235 | 1235 | |
|
1236 | 1236 | ``merge-patterns`` |
|
1237 | 1237 | ------------------ |
|
1238 | 1238 | |
|
1239 | 1239 | This section specifies merge tools to associate with particular file |
|
1240 | 1240 | patterns. Tools matched here will take precedence over the default |
|
1241 | 1241 | merge tool. Patterns are globs by default, rooted at the repository |
|
1242 | 1242 | root. |
|
1243 | 1243 | |
|
1244 | 1244 | Example:: |
|
1245 | 1245 | |
|
1246 | 1246 | [merge-patterns] |
|
1247 | 1247 | **.c = kdiff3 |
|
1248 | 1248 | **.jpg = myimgmerge |
|
1249 | 1249 | |
|
1250 | 1250 | ``merge-tools`` |
|
1251 | 1251 | --------------- |
|
1252 | 1252 | |
|
1253 | 1253 | This section configures external merge tools to use for file-level |
|
1254 | 1254 | merges. This section has likely been preconfigured at install time. |
|
1255 | 1255 | Use :hg:`config merge-tools` to check the existing configuration. |
|
1256 | 1256 | Also see :hg:`help merge-tools` for more details. |
|
1257 | 1257 | |
|
1258 | 1258 | Example ``~/.hgrc``:: |
|
1259 | 1259 | |
|
1260 | 1260 | [merge-tools] |
|
1261 | 1261 | # Override stock tool location |
|
1262 | 1262 | kdiff3.executable = ~/bin/kdiff3 |
|
1263 | 1263 | # Specify command line |
|
1264 | 1264 | kdiff3.args = $base $local $other -o $output |
|
1265 | 1265 | # Give higher priority |
|
1266 | 1266 | kdiff3.priority = 1 |
|
1267 | 1267 | |
|
1268 | 1268 | # Changing the priority of preconfigured tool |
|
1269 | 1269 | meld.priority = 0 |
|
1270 | 1270 | |
|
1271 | 1271 | # Disable a preconfigured tool |
|
1272 | 1272 | vimdiff.disabled = yes |
|
1273 | 1273 | |
|
1274 | 1274 | # Define new tool |
|
1275 | 1275 | myHtmlTool.args = -m $local $other $base $output |
|
1276 | 1276 | myHtmlTool.regkey = Software\FooSoftware\HtmlMerge |
|
1277 | 1277 | myHtmlTool.priority = 1 |
|
1278 | 1278 | |
|
1279 | 1279 | Supported arguments: |
|
1280 | 1280 | |
|
1281 | 1281 | ``priority`` |
|
1282 | 1282 | The priority in which to evaluate this tool. |
|
1283 | 1283 | (default: 0) |
|
1284 | 1284 | |
|
1285 | 1285 | ``executable`` |
|
1286 | 1286 | Either just the name of the executable or its pathname. |
|
1287 | 1287 | |
|
1288 | 1288 | .. container:: windows |
|
1289 | 1289 | |
|
1290 | 1290 | On Windows, the path can use environment variables with ${ProgramFiles} |
|
1291 | 1291 | syntax. |
|
1292 | 1292 | |
|
1293 | 1293 | (default: the tool name) |
|
1294 | 1294 | |
|
1295 | 1295 | ``args`` |
|
1296 | 1296 | The arguments to pass to the tool executable. You can refer to the |
|
1297 | 1297 | files being merged as well as the output file through these |
|
1298 | 1298 | variables: ``$base``, ``$local``, ``$other``, ``$output``. The meaning |
|
1299 | 1299 | of ``$local`` and ``$other`` can vary depending on which action is being |
|
1300 | 1300 | performed. During and update or merge, ``$local`` represents the original |
|
1301 | 1301 | state of the file, while ``$other`` represents the commit you are updating |
|
1302 | 1302 | to or the commit you are merging with. During a rebase ``$local`` |
|
1303 | 1303 | represents the destination of the rebase, and ``$other`` represents the |
|
1304 | 1304 | commit being rebased. |
|
1305 | 1305 | (default: ``$local $base $other``) |
|
1306 | 1306 | |
|
1307 | 1307 | ``premerge`` |
|
1308 | 1308 | Attempt to run internal non-interactive 3-way merge tool before |
|
1309 | 1309 | launching external tool. Options are ``true``, ``false``, ``keep`` or |
|
1310 | 1310 | ``keep-merge3``. The ``keep`` option will leave markers in the file if the |
|
1311 | 1311 | premerge fails. The ``keep-merge3`` will do the same but include information |
|
1312 | 1312 | about the base of the merge in the marker (see internal :merge3 in |
|
1313 | 1313 | :hg:`help merge-tools`). |
|
1314 | 1314 | (default: True) |
|
1315 | 1315 | |
|
1316 | 1316 | ``binary`` |
|
1317 | 1317 | This tool can merge binary files. (default: False, unless tool |
|
1318 | 1318 | was selected by file pattern match) |
|
1319 | 1319 | |
|
1320 | 1320 | ``symlink`` |
|
1321 | 1321 | This tool can merge symlinks. (default: False) |
|
1322 | 1322 | |
|
1323 | 1323 | ``check`` |
|
1324 | 1324 | A list of merge success-checking options: |
|
1325 | 1325 | |
|
1326 | 1326 | ``changed`` |
|
1327 | 1327 | Ask whether merge was successful when the merged file shows no changes. |
|
1328 | 1328 | ``conflicts`` |
|
1329 | 1329 | Check whether there are conflicts even though the tool reported success. |
|
1330 | 1330 | ``prompt`` |
|
1331 | 1331 | Always prompt for merge success, regardless of success reported by tool. |
|
1332 | 1332 | |
|
1333 | 1333 | ``fixeol`` |
|
1334 | 1334 | Attempt to fix up EOL changes caused by the merge tool. |
|
1335 | 1335 | (default: False) |
|
1336 | 1336 | |
|
1337 | 1337 | ``gui`` |
|
1338 | 1338 | This tool requires a graphical interface to run. (default: False) |
|
1339 | 1339 | |
|
1340 | 1340 | .. container:: windows |
|
1341 | 1341 | |
|
1342 | 1342 | ``regkey`` |
|
1343 | 1343 | Windows registry key which describes install location of this |
|
1344 | 1344 | tool. Mercurial will search for this key first under |
|
1345 | 1345 | ``HKEY_CURRENT_USER`` and then under ``HKEY_LOCAL_MACHINE``. |
|
1346 | 1346 | (default: None) |
|
1347 | 1347 | |
|
1348 | 1348 | ``regkeyalt`` |
|
1349 | 1349 | An alternate Windows registry key to try if the first key is not |
|
1350 | 1350 | found. The alternate key uses the same ``regname`` and ``regappend`` |
|
1351 | 1351 | semantics of the primary key. The most common use for this key |
|
1352 | 1352 | is to search for 32bit applications on 64bit operating systems. |
|
1353 | 1353 | (default: None) |
|
1354 | 1354 | |
|
1355 | 1355 | ``regname`` |
|
1356 | 1356 | Name of value to read from specified registry key. |
|
1357 | 1357 | (default: the unnamed (default) value) |
|
1358 | 1358 | |
|
1359 | 1359 | ``regappend`` |
|
1360 | 1360 | String to append to the value read from the registry, typically |
|
1361 | 1361 | the executable name of the tool. |
|
1362 | 1362 | (default: None) |
|
1363 | 1363 | |
|
1364 | 1364 | ``pager`` |
|
1365 | 1365 | --------- |
|
1366 | 1366 | |
|
1367 | 1367 | Setting used to control when to paginate and with what external tool. See |
|
1368 | 1368 | :hg:`help pager` for details. |
|
1369 | 1369 | |
|
1370 | 1370 | ``pager`` |
|
1371 | 1371 | Define the external tool used as pager. |
|
1372 | 1372 | |
|
1373 | 1373 | If no pager is set, Mercurial uses the environment variable $PAGER. |
|
1374 | 1374 | If neither pager.pager, nor $PAGER is set, a default pager will be |
|
1375 | 1375 | used, typically `less` on Unix and `more` on Windows. Example:: |
|
1376 | 1376 | |
|
1377 | 1377 | [pager] |
|
1378 | 1378 | pager = less -FRX |
|
1379 | 1379 | |
|
1380 | 1380 | ``ignore`` |
|
1381 | 1381 | List of commands to disable the pager for. Example:: |
|
1382 | 1382 | |
|
1383 | 1383 | [pager] |
|
1384 | 1384 | ignore = version, help, update |
|
1385 | 1385 | |
|
1386 | 1386 | ``patch`` |
|
1387 | 1387 | --------- |
|
1388 | 1388 | |
|
1389 | 1389 | Settings used when applying patches, for instance through the 'import' |
|
1390 | 1390 | command or with Mercurial Queues extension. |
|
1391 | 1391 | |
|
1392 | 1392 | ``eol`` |
|
1393 | 1393 | When set to 'strict' patch content and patched files end of lines |
|
1394 | 1394 | are preserved. When set to ``lf`` or ``crlf``, both files end of |
|
1395 | 1395 | lines are ignored when patching and the result line endings are |
|
1396 | 1396 | normalized to either LF (Unix) or CRLF (Windows). When set to |
|
1397 | 1397 | ``auto``, end of lines are again ignored while patching but line |
|
1398 | 1398 | endings in patched files are normalized to their original setting |
|
1399 | 1399 | on a per-file basis. If target file does not exist or has no end |
|
1400 | 1400 | of line, patch line endings are preserved. |
|
1401 | 1401 | (default: strict) |
|
1402 | 1402 | |
|
1403 | 1403 | ``fuzz`` |
|
1404 | 1404 | The number of lines of 'fuzz' to allow when applying patches. This |
|
1405 | 1405 | controls how much context the patcher is allowed to ignore when |
|
1406 | 1406 | trying to apply a patch. |
|
1407 | 1407 | (default: 2) |
|
1408 | 1408 | |
|
1409 | 1409 | ``paths`` |
|
1410 | 1410 | --------- |
|
1411 | 1411 | |
|
1412 | 1412 | Assigns symbolic names and behavior to repositories. |
|
1413 | 1413 | |
|
1414 | 1414 | Options are symbolic names defining the URL or directory that is the |
|
1415 | 1415 | location of the repository. Example:: |
|
1416 | 1416 | |
|
1417 | 1417 | [paths] |
|
1418 | 1418 | my_server = https://example.com/my_repo |
|
1419 | 1419 | local_path = /home/me/repo |
|
1420 | 1420 | |
|
1421 | 1421 | These symbolic names can be used from the command line. To pull |
|
1422 | 1422 | from ``my_server``: :hg:`pull my_server`. To push to ``local_path``: |
|
1423 | 1423 | :hg:`push local_path`. |
|
1424 | 1424 | |
|
1425 | 1425 | Options containing colons (``:``) denote sub-options that can influence |
|
1426 | 1426 | behavior for that specific path. Example:: |
|
1427 | 1427 | |
|
1428 | 1428 | [paths] |
|
1429 | 1429 | my_server = https://example.com/my_path |
|
1430 | 1430 | my_server:pushurl = ssh://example.com/my_path |
|
1431 | 1431 | |
|
1432 | 1432 | The following sub-options can be defined: |
|
1433 | 1433 | |
|
1434 | 1434 | ``pushurl`` |
|
1435 | 1435 | The URL to use for push operations. If not defined, the location |
|
1436 | 1436 | defined by the path's main entry is used. |
|
1437 | 1437 | |
|
1438 | 1438 | ``pushrev`` |
|
1439 | 1439 | A revset defining which revisions to push by default. |
|
1440 | 1440 | |
|
1441 | 1441 | When :hg:`push` is executed without a ``-r`` argument, the revset |
|
1442 | 1442 | defined by this sub-option is evaluated to determine what to push. |
|
1443 | 1443 | |
|
1444 | 1444 | For example, a value of ``.`` will push the working directory's |
|
1445 | 1445 | revision by default. |
|
1446 | 1446 | |
|
1447 | 1447 | Revsets specifying bookmarks will not result in the bookmark being |
|
1448 | 1448 | pushed. |
|
1449 | 1449 | |
|
1450 | 1450 | The following special named paths exist: |
|
1451 | 1451 | |
|
1452 | 1452 | ``default`` |
|
1453 | 1453 | The URL or directory to use when no source or remote is specified. |
|
1454 | 1454 | |
|
1455 | 1455 | :hg:`clone` will automatically define this path to the location the |
|
1456 | 1456 | repository was cloned from. |
|
1457 | 1457 | |
|
1458 | 1458 | ``default-push`` |
|
1459 | 1459 | (deprecated) The URL or directory for the default :hg:`push` location. |
|
1460 | 1460 | ``default:pushurl`` should be used instead. |
|
1461 | 1461 | |
|
1462 | 1462 | ``phases`` |
|
1463 | 1463 | ---------- |
|
1464 | 1464 | |
|
1465 | 1465 | Specifies default handling of phases. See :hg:`help phases` for more |
|
1466 | 1466 | information about working with phases. |
|
1467 | 1467 | |
|
1468 | 1468 | ``publish`` |
|
1469 | 1469 | Controls draft phase behavior when working as a server. When true, |
|
1470 | 1470 | pushed changesets are set to public in both client and server and |
|
1471 | 1471 | pulled or cloned changesets are set to public in the client. |
|
1472 | 1472 | (default: True) |
|
1473 | 1473 | |
|
1474 | 1474 | ``new-commit`` |
|
1475 | 1475 | Phase of newly-created commits. |
|
1476 | 1476 | (default: draft) |
|
1477 | 1477 | |
|
1478 | 1478 | ``checksubrepos`` |
|
1479 | 1479 | Check the phase of the current revision of each subrepository. Allowed |
|
1480 | 1480 | values are "ignore", "follow" and "abort". For settings other than |
|
1481 | 1481 | "ignore", the phase of the current revision of each subrepository is |
|
1482 | 1482 | checked before committing the parent repository. If any of those phases is |
|
1483 | 1483 | greater than the phase of the parent repository (e.g. if a subrepo is in a |
|
1484 | 1484 | "secret" phase while the parent repo is in "draft" phase), the commit is |
|
1485 | 1485 | either aborted (if checksubrepos is set to "abort") or the higher phase is |
|
1486 | 1486 | used for the parent repository commit (if set to "follow"). |
|
1487 | 1487 | (default: follow) |
|
1488 | 1488 | |
|
1489 | 1489 | |
|
1490 | 1490 | ``profiling`` |
|
1491 | 1491 | ------------- |
|
1492 | 1492 | |
|
1493 | 1493 | Specifies profiling type, format, and file output. Two profilers are |
|
1494 | 1494 | supported: an instrumenting profiler (named ``ls``), and a sampling |
|
1495 | 1495 | profiler (named ``stat``). |
|
1496 | 1496 | |
|
1497 | 1497 | In this section description, 'profiling data' stands for the raw data |
|
1498 | 1498 | collected during profiling, while 'profiling report' stands for a |
|
1499 | 1499 | statistical text report generated from the profiling data. The |
|
1500 | 1500 | profiling is done using lsprof. |
|
1501 | 1501 | |
|
1502 | 1502 | ``enabled`` |
|
1503 | 1503 | Enable the profiler. |
|
1504 | 1504 | (default: false) |
|
1505 | 1505 | |
|
1506 | 1506 | This is equivalent to passing ``--profile`` on the command line. |
|
1507 | 1507 | |
|
1508 | 1508 | ``type`` |
|
1509 | 1509 | The type of profiler to use. |
|
1510 | 1510 | (default: stat) |
|
1511 | 1511 | |
|
1512 | 1512 | ``ls`` |
|
1513 | 1513 | Use Python's built-in instrumenting profiler. This profiler |
|
1514 | 1514 | works on all platforms, but each line number it reports is the |
|
1515 | 1515 | first line of a function. This restriction makes it difficult to |
|
1516 | 1516 | identify the expensive parts of a non-trivial function. |
|
1517 | 1517 | ``stat`` |
|
1518 | 1518 | Use a statistical profiler, statprof. This profiler is most |
|
1519 | 1519 | useful for profiling commands that run for longer than about 0.1 |
|
1520 | 1520 | seconds. |
|
1521 | 1521 | |
|
1522 | 1522 | ``format`` |
|
1523 | 1523 | Profiling format. Specific to the ``ls`` instrumenting profiler. |
|
1524 | 1524 | (default: text) |
|
1525 | 1525 | |
|
1526 | 1526 | ``text`` |
|
1527 | 1527 | Generate a profiling report. When saving to a file, it should be |
|
1528 | 1528 | noted that only the report is saved, and the profiling data is |
|
1529 | 1529 | not kept. |
|
1530 | 1530 | ``kcachegrind`` |
|
1531 | 1531 | Format profiling data for kcachegrind use: when saving to a |
|
1532 | 1532 | file, the generated file can directly be loaded into |
|
1533 | 1533 | kcachegrind. |
|
1534 | 1534 | |
|
1535 | 1535 | ``statformat`` |
|
1536 | 1536 | Profiling format for the ``stat`` profiler. |
|
1537 | 1537 | (default: hotpath) |
|
1538 | 1538 | |
|
1539 | 1539 | ``hotpath`` |
|
1540 | 1540 | Show a tree-based display containing the hot path of execution (where |
|
1541 | 1541 | most time was spent). |
|
1542 | 1542 | ``bymethod`` |
|
1543 | 1543 | Show a table of methods ordered by how frequently they are active. |
|
1544 | 1544 | ``byline`` |
|
1545 | 1545 | Show a table of lines in files ordered by how frequently they are active. |
|
1546 | 1546 | ``json`` |
|
1547 | 1547 | Render profiling data as JSON. |
|
1548 | 1548 | |
|
1549 | 1549 | ``frequency`` |
|
1550 | 1550 | Sampling frequency. Specific to the ``stat`` sampling profiler. |
|
1551 | 1551 | (default: 1000) |
|
1552 | 1552 | |
|
1553 | 1553 | ``output`` |
|
1554 | 1554 | File path where profiling data or report should be saved. If the |
|
1555 | 1555 | file exists, it is replaced. (default: None, data is printed on |
|
1556 | 1556 | stderr) |
|
1557 | 1557 | |
|
1558 | 1558 | ``sort`` |
|
1559 | 1559 | Sort field. Specific to the ``ls`` instrumenting profiler. |
|
1560 | 1560 | One of ``callcount``, ``reccallcount``, ``totaltime`` and |
|
1561 | 1561 | ``inlinetime``. |
|
1562 | 1562 | (default: inlinetime) |
|
1563 | 1563 | |
|
1564 | 1564 | ``limit`` |
|
1565 | 1565 | Number of lines to show. Specific to the ``ls`` instrumenting profiler. |
|
1566 | 1566 | (default: 30) |
|
1567 | 1567 | |
|
1568 | 1568 | ``nested`` |
|
1569 | 1569 | Show at most this number of lines of drill-down info after each main entry. |
|
1570 | 1570 | This can help explain the difference between Total and Inline. |
|
1571 | 1571 | Specific to the ``ls`` instrumenting profiler. |
|
1572 | 1572 | (default: 5) |
|
1573 | 1573 | |
|
1574 | 1574 | ``progress`` |
|
1575 | 1575 | ------------ |
|
1576 | 1576 | |
|
1577 | 1577 | Mercurial commands can draw progress bars that are as informative as |
|
1578 | 1578 | possible. Some progress bars only offer indeterminate information, while others |
|
1579 | 1579 | have a definite end point. |
|
1580 | 1580 | |
|
1581 | 1581 | ``delay`` |
|
1582 | 1582 | Number of seconds (float) before showing the progress bar. (default: 3) |
|
1583 | 1583 | |
|
1584 | 1584 | ``changedelay`` |
|
1585 | 1585 | Minimum delay before showing a new topic. When set to less than 3 * refresh, |
|
1586 | 1586 | that value will be used instead. (default: 1) |
|
1587 | 1587 | |
|
1588 | 1588 | ``refresh`` |
|
1589 | 1589 | Time in seconds between refreshes of the progress bar. (default: 0.1) |
|
1590 | 1590 | |
|
1591 | 1591 | ``format`` |
|
1592 | 1592 | Format of the progress bar. |
|
1593 | 1593 | |
|
1594 | 1594 | Valid entries for the format field are ``topic``, ``bar``, ``number``, |
|
1595 | 1595 | ``unit``, ``estimate``, ``speed``, and ``item``. ``item`` defaults to the |
|
1596 | 1596 | last 20 characters of the item, but this can be changed by adding either |
|
1597 | 1597 | ``-<num>`` which would take the last num characters, or ``+<num>`` for the |
|
1598 | 1598 | first num characters. |
|
1599 | 1599 | |
|
1600 | 1600 | (default: topic bar number estimate) |
|
1601 | 1601 | |
|
1602 | 1602 | ``width`` |
|
1603 | 1603 | If set, the maximum width of the progress information (that is, min(width, |
|
1604 | 1604 | term width) will be used). |
|
1605 | 1605 | |
|
1606 | 1606 | ``clear-complete`` |
|
1607 | 1607 | Clear the progress bar after it's done. (default: True) |
|
1608 | 1608 | |
|
1609 | 1609 | ``disable`` |
|
1610 | 1610 | If true, don't show a progress bar. |
|
1611 | 1611 | |
|
1612 | 1612 | ``assume-tty`` |
|
1613 | 1613 | If true, ALWAYS show a progress bar, unless disable is given. |
|
1614 | 1614 | |
|
1615 | 1615 | ``rebase`` |
|
1616 | 1616 | ---------- |
|
1617 | 1617 | |
|
1618 | 1618 | ``allowdivergence`` |
|
1619 | 1619 | Default to False, when True allow creating divergence when performing |
|
1620 | 1620 | rebase of obsolete changesets. |
|
1621 | 1621 | |
|
1622 | 1622 | ``revsetalias`` |
|
1623 | 1623 | --------------- |
|
1624 | 1624 | |
|
1625 | 1625 | Alias definitions for revsets. See :hg:`help revsets` for details. |
|
1626 | 1626 | |
|
1627 | 1627 | ``server`` |
|
1628 | 1628 | ---------- |
|
1629 | 1629 | |
|
1630 | 1630 | Controls generic server settings. |
|
1631 | 1631 | |
|
1632 | 1632 | ``compressionengines`` |
|
1633 | 1633 | List of compression engines and their relative priority to advertise |
|
1634 | 1634 | to clients. |
|
1635 | 1635 | |
|
1636 | 1636 | The order of compression engines determines their priority, the first |
|
1637 | 1637 | having the highest priority. If a compression engine is not listed |
|
1638 | 1638 | here, it won't be advertised to clients. |
|
1639 | 1639 | |
|
1640 | 1640 | If not set (the default), built-in defaults are used. Run |
|
1641 | 1641 | :hg:`debuginstall` to list available compression engines and their |
|
1642 | 1642 | default wire protocol priority. |
|
1643 | 1643 | |
|
1644 | 1644 | Older Mercurial clients only support zlib compression and this setting |
|
1645 | 1645 | has no effect for legacy clients. |
|
1646 | 1646 | |
|
1647 | 1647 | ``uncompressed`` |
|
1648 | 1648 | Whether to allow clients to clone a repository using the |
|
1649 | 1649 | uncompressed streaming protocol. This transfers about 40% more |
|
1650 | 1650 | data than a regular clone, but uses less memory and CPU on both |
|
1651 | 1651 | server and client. Over a LAN (100 Mbps or better) or a very fast |
|
1652 | 1652 | WAN, an uncompressed streaming clone is a lot faster (~10x) than a |
|
1653 | 1653 | regular clone. Over most WAN connections (anything slower than |
|
1654 | 1654 | about 6 Mbps), uncompressed streaming is slower, because of the |
|
1655 | 1655 | extra data transfer overhead. This mode will also temporarily hold |
|
1656 | 1656 | the write lock while determining what data to transfer. |
|
1657 | 1657 | (default: True) |
|
1658 | 1658 | |
|
1659 | 1659 | ``preferuncompressed`` |
|
1660 | 1660 | When set, clients will try to use the uncompressed streaming |
|
1661 | 1661 | protocol. (default: False) |
|
1662 | 1662 | |
|
1663 | 1663 | ``validate`` |
|
1664 | 1664 | Whether to validate the completeness of pushed changesets by |
|
1665 | 1665 | checking that all new file revisions specified in manifests are |
|
1666 | 1666 | present. (default: False) |
|
1667 | 1667 | |
|
1668 | 1668 | ``maxhttpheaderlen`` |
|
1669 | 1669 | Instruct HTTP clients not to send request headers longer than this |
|
1670 | 1670 | many bytes. (default: 1024) |
|
1671 | 1671 | |
|
1672 | 1672 | ``bundle1`` |
|
1673 | 1673 | Whether to allow clients to push and pull using the legacy bundle1 |
|
1674 | 1674 | exchange format. (default: True) |
|
1675 | 1675 | |
|
1676 | 1676 | ``bundle1gd`` |
|
1677 | 1677 | Like ``bundle1`` but only used if the repository is using the |
|
1678 | 1678 | *generaldelta* storage format. (default: True) |
|
1679 | 1679 | |
|
1680 | 1680 | ``bundle1.push`` |
|
1681 | 1681 | Whether to allow clients to push using the legacy bundle1 exchange |
|
1682 | 1682 | format. (default: True) |
|
1683 | 1683 | |
|
1684 | 1684 | ``bundle1gd.push`` |
|
1685 | 1685 | Like ``bundle1.push`` but only used if the repository is using the |
|
1686 | 1686 | *generaldelta* storage format. (default: True) |
|
1687 | 1687 | |
|
1688 | 1688 | ``bundle1.pull`` |
|
1689 | 1689 | Whether to allow clients to pull using the legacy bundle1 exchange |
|
1690 | 1690 | format. (default: True) |
|
1691 | 1691 | |
|
1692 | 1692 | ``bundle1gd.pull`` |
|
1693 | 1693 | Like ``bundle1.pull`` but only used if the repository is using the |
|
1694 | 1694 | *generaldelta* storage format. (default: True) |
|
1695 | 1695 | |
|
1696 | 1696 | Large repositories using the *generaldelta* storage format should |
|
1697 | 1697 | consider setting this option because converting *generaldelta* |
|
1698 | 1698 | repositories to the exchange format required by the bundle1 data |
|
1699 | 1699 | format can consume a lot of CPU. |
|
1700 | 1700 | |
|
1701 | 1701 | ``zliblevel`` |
|
1702 | 1702 | Integer between ``-1`` and ``9`` that controls the zlib compression level |
|
1703 | 1703 | for wire protocol commands that send zlib compressed output (notably the |
|
1704 | 1704 | commands that send repository history data). |
|
1705 | 1705 | |
|
1706 | 1706 | The default (``-1``) uses the default zlib compression level, which is |
|
1707 | 1707 | likely equivalent to ``6``. ``0`` means no compression. ``9`` means |
|
1708 | 1708 | maximum compression. |
|
1709 | 1709 | |
|
1710 | 1710 | Setting this option allows server operators to make trade-offs between |
|
1711 | 1711 | bandwidth and CPU used. Lowering the compression lowers CPU utilization |
|
1712 | 1712 | but sends more bytes to clients. |
|
1713 | 1713 | |
|
1714 | 1714 | This option only impacts the HTTP server. |
|
1715 | 1715 | |
|
1716 | 1716 | ``zstdlevel`` |
|
1717 | 1717 | Integer between ``1`` and ``22`` that controls the zstd compression level |
|
1718 | 1718 | for wire protocol commands. ``1`` is the minimal amount of compression and |
|
1719 | 1719 | ``22`` is the highest amount of compression. |
|
1720 | 1720 | |
|
1721 | 1721 | The default (``3``) should be significantly faster than zlib while likely |
|
1722 | 1722 | delivering better compression ratios. |
|
1723 | 1723 | |
|
1724 | 1724 | This option only impacts the HTTP server. |
|
1725 | 1725 | |
|
1726 | 1726 | See also ``server.zliblevel``. |
|
1727 | 1727 | |
|
1728 | 1728 | ``smtp`` |
|
1729 | 1729 | -------- |
|
1730 | 1730 | |
|
1731 | 1731 | Configuration for extensions that need to send email messages. |
|
1732 | 1732 | |
|
1733 | 1733 | ``host`` |
|
1734 | 1734 | Host name of mail server, e.g. "mail.example.com". |
|
1735 | 1735 | |
|
1736 | 1736 | ``port`` |
|
1737 | 1737 | Optional. Port to connect to on mail server. (default: 465 if |
|
1738 | 1738 | ``tls`` is smtps; 25 otherwise) |
|
1739 | 1739 | |
|
1740 | 1740 | ``tls`` |
|
1741 | 1741 | Optional. Method to enable TLS when connecting to mail server: starttls, |
|
1742 | 1742 | smtps or none. (default: none) |
|
1743 | 1743 | |
|
1744 | 1744 | ``username`` |
|
1745 | 1745 | Optional. User name for authenticating with the SMTP server. |
|
1746 | 1746 | (default: None) |
|
1747 | 1747 | |
|
1748 | 1748 | ``password`` |
|
1749 | 1749 | Optional. Password for authenticating with the SMTP server. If not |
|
1750 | 1750 | specified, interactive sessions will prompt the user for a |
|
1751 | 1751 | password; non-interactive sessions will fail. (default: None) |
|
1752 | 1752 | |
|
1753 | 1753 | ``local_hostname`` |
|
1754 | 1754 | Optional. The hostname that the sender can use to identify |
|
1755 | 1755 | itself to the MTA. |
|
1756 | 1756 | |
|
1757 | 1757 | |
|
1758 | 1758 | ``subpaths`` |
|
1759 | 1759 | ------------ |
|
1760 | 1760 | |
|
1761 | 1761 | Subrepository source URLs can go stale if a remote server changes name |
|
1762 | 1762 | or becomes temporarily unavailable. This section lets you define |
|
1763 | 1763 | rewrite rules of the form:: |
|
1764 | 1764 | |
|
1765 | 1765 | <pattern> = <replacement> |
|
1766 | 1766 | |
|
1767 | 1767 | where ``pattern`` is a regular expression matching a subrepository |
|
1768 | 1768 | source URL and ``replacement`` is the replacement string used to |
|
1769 | 1769 | rewrite it. Groups can be matched in ``pattern`` and referenced in |
|
1770 | 1770 | ``replacements``. For instance:: |
|
1771 | 1771 | |
|
1772 | 1772 | http://server/(.*)-hg/ = http://hg.server/\1/ |
|
1773 | 1773 | |
|
1774 | 1774 | rewrites ``http://server/foo-hg/`` into ``http://hg.server/foo/``. |
|
1775 | 1775 | |
|
1776 | 1776 | Relative subrepository paths are first made absolute, and the |
|
1777 | 1777 | rewrite rules are then applied on the full (absolute) path. If ``pattern`` |
|
1778 | 1778 | doesn't match the full path, an attempt is made to apply it on the |
|
1779 | 1779 | relative path alone. The rules are applied in definition order. |
|
1780 | 1780 | |
|
1781 | 1781 | ``templatealias`` |
|
1782 | 1782 | ----------------- |
|
1783 | 1783 | |
|
1784 | 1784 | Alias definitions for templates. See :hg:`help templates` for details. |
|
1785 | 1785 | |
|
1786 | 1786 | ``templates`` |
|
1787 | 1787 | ------------- |
|
1788 | 1788 | |
|
1789 | 1789 | Use the ``[templates]`` section to define template strings. |
|
1790 | 1790 | See :hg:`help templates` for details. |
|
1791 | 1791 | |
|
1792 | 1792 | ``trusted`` |
|
1793 | 1793 | ----------- |
|
1794 | 1794 | |
|
1795 | 1795 | Mercurial will not use the settings in the |
|
1796 | 1796 | ``.hg/hgrc`` file from a repository if it doesn't belong to a trusted |
|
1797 | 1797 | user or to a trusted group, as various hgrc features allow arbitrary |
|
1798 | 1798 | commands to be run. This issue is often encountered when configuring |
|
1799 | 1799 | hooks or extensions for shared repositories or servers. However, |
|
1800 | 1800 | the web interface will use some safe settings from the ``[web]`` |
|
1801 | 1801 | section. |
|
1802 | 1802 | |
|
1803 | 1803 | This section specifies what users and groups are trusted. The |
|
1804 | 1804 | current user is always trusted. To trust everybody, list a user or a |
|
1805 | 1805 | group with name ``*``. These settings must be placed in an |
|
1806 | 1806 | *already-trusted file* to take effect, such as ``$HOME/.hgrc`` of the |
|
1807 | 1807 | user or service running Mercurial. |
|
1808 | 1808 | |
|
1809 | 1809 | ``users`` |
|
1810 | 1810 | Comma-separated list of trusted users. |
|
1811 | 1811 | |
|
1812 | 1812 | ``groups`` |
|
1813 | 1813 | Comma-separated list of trusted groups. |
|
1814 | 1814 | |
|
1815 | 1815 | |
|
1816 | 1816 | ``ui`` |
|
1817 | 1817 | ------ |
|
1818 | 1818 | |
|
1819 | 1819 | User interface controls. |
|
1820 | 1820 | |
|
1821 | 1821 | ``archivemeta`` |
|
1822 | 1822 | Whether to include the .hg_archival.txt file containing meta data |
|
1823 | 1823 | (hashes for the repository base and for tip) in archives created |
|
1824 | 1824 | by the :hg:`archive` command or downloaded via hgweb. |
|
1825 | 1825 | (default: True) |
|
1826 | 1826 | |
|
1827 | 1827 | ``askusername`` |
|
1828 | 1828 | Whether to prompt for a username when committing. If True, and |
|
1829 | 1829 | neither ``$HGUSER`` nor ``$EMAIL`` has been specified, then the user will |
|
1830 | 1830 | be prompted to enter a username. If no username is entered, the |
|
1831 | 1831 | default ``USER@HOST`` is used instead. |
|
1832 | 1832 | (default: False) |
|
1833 | 1833 | |
|
1834 | 1834 | ``clonebundles`` |
|
1835 | 1835 | Whether the "clone bundles" feature is enabled. |
|
1836 | 1836 | |
|
1837 | 1837 | When enabled, :hg:`clone` may download and apply a server-advertised |
|
1838 | 1838 | bundle file from a URL instead of using the normal exchange mechanism. |
|
1839 | 1839 | |
|
1840 | 1840 | This can likely result in faster and more reliable clones. |
|
1841 | 1841 | |
|
1842 | 1842 | (default: True) |
|
1843 | 1843 | |
|
1844 | 1844 | ``clonebundlefallback`` |
|
1845 | 1845 | Whether failure to apply an advertised "clone bundle" from a server |
|
1846 | 1846 | should result in fallback to a regular clone. |
|
1847 | 1847 | |
|
1848 | 1848 | This is disabled by default because servers advertising "clone |
|
1849 | 1849 | bundles" often do so to reduce server load. If advertised bundles |
|
1850 | 1850 | start mass failing and clients automatically fall back to a regular |
|
1851 | 1851 | clone, this would add significant and unexpected load to the server |
|
1852 | 1852 | since the server is expecting clone operations to be offloaded to |
|
1853 | 1853 | pre-generated bundles. Failing fast (the default behavior) ensures |
|
1854 | 1854 | clients don't overwhelm the server when "clone bundle" application |
|
1855 | 1855 | fails. |
|
1856 | 1856 | |
|
1857 | 1857 | (default: False) |
|
1858 | 1858 | |
|
1859 | 1859 | ``clonebundleprefers`` |
|
1860 | 1860 | Defines preferences for which "clone bundles" to use. |
|
1861 | 1861 | |
|
1862 | 1862 | Servers advertising "clone bundles" may advertise multiple available |
|
1863 | 1863 | bundles. Each bundle may have different attributes, such as the bundle |
|
1864 | 1864 | type and compression format. This option is used to prefer a particular |
|
1865 | 1865 | bundle over another. |
|
1866 | 1866 | |
|
1867 | 1867 | The following keys are defined by Mercurial: |
|
1868 | 1868 | |
|
1869 | 1869 | BUNDLESPEC |
|
1870 | 1870 | A bundle type specifier. These are strings passed to :hg:`bundle -t`. |
|
1871 | 1871 | e.g. ``gzip-v2`` or ``bzip2-v1``. |
|
1872 | 1872 | |
|
1873 | 1873 | COMPRESSION |
|
1874 | 1874 | The compression format of the bundle. e.g. ``gzip`` and ``bzip2``. |
|
1875 | 1875 | |
|
1876 | 1876 | Server operators may define custom keys. |
|
1877 | 1877 | |
|
1878 | 1878 | Example values: ``COMPRESSION=bzip2``, |
|
1879 | 1879 | ``BUNDLESPEC=gzip-v2, COMPRESSION=gzip``. |
|
1880 | 1880 | |
|
1881 | 1881 | By default, the first bundle advertised by the server is used. |
|
1882 | 1882 | |
|
1883 | 1883 | ``color`` |
|
1884 | 1884 | When to colorize output. Possible value are Boolean ("yes" or "no"), or |
|
1885 | 1885 | "debug", or "always". (default: "yes"). "yes" will use color whenever it |
|
1886 | 1886 | seems possible. See :hg:`help color` for details. |
|
1887 | 1887 | |
|
1888 | 1888 | ``commitsubrepos`` |
|
1889 | 1889 | Whether to commit modified subrepositories when committing the |
|
1890 | 1890 | parent repository. If False and one subrepository has uncommitted |
|
1891 | 1891 | changes, abort the commit. |
|
1892 | 1892 | (default: False) |
|
1893 | 1893 | |
|
1894 | 1894 | ``debug`` |
|
1895 | 1895 | Print debugging information. (default: False) |
|
1896 | 1896 | |
|
1897 | 1897 | ``editor`` |
|
1898 | 1898 | The editor to use during a commit. (default: ``$EDITOR`` or ``vi``) |
|
1899 | 1899 | |
|
1900 | 1900 | ``fallbackencoding`` |
|
1901 | 1901 | Encoding to try if it's not possible to decode the changelog using |
|
1902 | 1902 | UTF-8. (default: ISO-8859-1) |
|
1903 | 1903 | |
|
1904 | 1904 | ``graphnodetemplate`` |
|
1905 | 1905 | The template used to print changeset nodes in an ASCII revision graph. |
|
1906 | 1906 | (default: ``{graphnode}``) |
|
1907 | 1907 | |
|
1908 | 1908 | ``ignore`` |
|
1909 | 1909 | A file to read per-user ignore patterns from. This file should be |
|
1910 | 1910 | in the same format as a repository-wide .hgignore file. Filenames |
|
1911 | 1911 | are relative to the repository root. This option supports hook syntax, |
|
1912 | 1912 | so if you want to specify multiple ignore files, you can do so by |
|
1913 | 1913 | setting something like ``ignore.other = ~/.hgignore2``. For details |
|
1914 | 1914 | of the ignore file format, see the ``hgignore(5)`` man page. |
|
1915 | 1915 | |
|
1916 | 1916 | ``interactive`` |
|
1917 | 1917 | Allow to prompt the user. (default: True) |
|
1918 | 1918 | |
|
1919 | 1919 | ``interface`` |
|
1920 | 1920 | Select the default interface for interactive features (default: text). |
|
1921 | 1921 | Possible values are 'text' and 'curses'. |
|
1922 | 1922 | |
|
1923 | 1923 | ``interface.chunkselector`` |
|
1924 | 1924 | Select the interface for change recording (e.g. :hg:`commit -i`). |
|
1925 | 1925 | Possible values are 'text' and 'curses'. |
|
1926 | 1926 | This config overrides the interface specified by ui.interface. |
|
1927 | 1927 | |
|
1928 | 1928 | ``logtemplate`` |
|
1929 | 1929 | Template string for commands that print changesets. |
|
1930 | 1930 | |
|
1931 | 1931 | ``merge`` |
|
1932 | 1932 | The conflict resolution program to use during a manual merge. |
|
1933 | 1933 | For more information on merge tools see :hg:`help merge-tools`. |
|
1934 | 1934 | For configuring merge tools see the ``[merge-tools]`` section. |
|
1935 | 1935 | |
|
1936 | 1936 | ``mergemarkers`` |
|
1937 | 1937 | Sets the merge conflict marker label styling. The ``detailed`` |
|
1938 | 1938 | style uses the ``mergemarkertemplate`` setting to style the labels. |
|
1939 | 1939 | The ``basic`` style just uses 'local' and 'other' as the marker label. |
|
1940 | 1940 | One of ``basic`` or ``detailed``. |
|
1941 | 1941 | (default: ``basic``) |
|
1942 | 1942 | |
|
1943 | 1943 | ``mergemarkertemplate`` |
|
1944 | 1944 | The template used to print the commit description next to each conflict |
|
1945 | 1945 | marker during merge conflicts. See :hg:`help templates` for the template |
|
1946 | 1946 | format. |
|
1947 | 1947 | |
|
1948 | 1948 | Defaults to showing the hash, tags, branches, bookmarks, author, and |
|
1949 | 1949 | the first line of the commit description. |
|
1950 | 1950 | |
|
1951 | 1951 | If you use non-ASCII characters in names for tags, branches, bookmarks, |
|
1952 | 1952 | authors, and/or commit descriptions, you must pay attention to encodings of |
|
1953 | 1953 | managed files. At template expansion, non-ASCII characters use the encoding |
|
1954 | 1954 | specified by the ``--encoding`` global option, ``HGENCODING`` or other |
|
1955 | 1955 | environment variables that govern your locale. If the encoding of the merge |
|
1956 | 1956 | markers is different from the encoding of the merged files, |
|
1957 | 1957 | serious problems may occur. |
|
1958 | 1958 | |
|
1959 | 1959 | ``origbackuppath`` |
|
1960 | 1960 | The path to a directory used to store generated .orig files. If the path is |
|
1961 | 1961 | not a directory, one will be created. |
|
1962 | 1962 | |
|
1963 | 1963 | ``paginate`` |
|
1964 | 1964 | Control the pagination of command output (default: True). See :hg:`help pager` |
|
1965 | 1965 | for details. |
|
1966 | 1966 | |
|
1967 | 1967 | ``patch`` |
|
1968 | 1968 | An optional external tool that ``hg import`` and some extensions |
|
1969 | 1969 | will use for applying patches. By default Mercurial uses an |
|
1970 | 1970 | internal patch utility. The external tool must work as the common |
|
1971 | 1971 | Unix ``patch`` program. In particular, it must accept a ``-p`` |
|
1972 | 1972 | argument to strip patch headers, a ``-d`` argument to specify the |
|
1973 | 1973 | current directory, a file name to patch, and a patch file to take |
|
1974 | 1974 | from stdin. |
|
1975 | 1975 | |
|
1976 | 1976 | It is possible to specify a patch tool together with extra |
|
1977 | 1977 | arguments. For example, setting this option to ``patch --merge`` |
|
1978 | 1978 | will use the ``patch`` program with its 2-way merge option. |
|
1979 | 1979 | |
|
1980 | 1980 | ``portablefilenames`` |
|
1981 | 1981 | Check for portable filenames. Can be ``warn``, ``ignore`` or ``abort``. |
|
1982 | 1982 | (default: ``warn``) |
|
1983 | 1983 | |
|
1984 | 1984 | ``warn`` |
|
1985 | 1985 | Print a warning message on POSIX platforms, if a file with a non-portable |
|
1986 | 1986 | filename is added (e.g. a file with a name that can't be created on |
|
1987 | 1987 | Windows because it contains reserved parts like ``AUX``, reserved |
|
1988 | 1988 | characters like ``:``, or would cause a case collision with an existing |
|
1989 | 1989 | file). |
|
1990 | 1990 | |
|
1991 | 1991 | ``ignore`` |
|
1992 | 1992 | Don't print a warning. |
|
1993 | 1993 | |
|
1994 | 1994 | ``abort`` |
|
1995 | 1995 | The command is aborted. |
|
1996 | 1996 | |
|
1997 | 1997 | ``true`` |
|
1998 | 1998 | Alias for ``warn``. |
|
1999 | 1999 | |
|
2000 | 2000 | ``false`` |
|
2001 | 2001 | Alias for ``ignore``. |
|
2002 | 2002 | |
|
2003 | 2003 | .. container:: windows |
|
2004 | 2004 | |
|
2005 | 2005 | On Windows, this configuration option is ignored and the command aborted. |
|
2006 | 2006 | |
|
2007 | 2007 | ``quiet`` |
|
2008 | 2008 | Reduce the amount of output printed. |
|
2009 | 2009 | (default: False) |
|
2010 | 2010 | |
|
2011 | 2011 | ``remotecmd`` |
|
2012 | 2012 | Remote command to use for clone/push/pull operations. |
|
2013 | 2013 | (default: ``hg``) |
|
2014 | 2014 | |
|
2015 | 2015 | ``report_untrusted`` |
|
2016 | 2016 | Warn if a ``.hg/hgrc`` file is ignored due to not being owned by a |
|
2017 | 2017 | trusted user or group. |
|
2018 | 2018 | (default: True) |
|
2019 | 2019 | |
|
2020 | 2020 | ``slash`` |
|
2021 | 2021 | Display paths using a slash (``/``) as the path separator. This |
|
2022 | 2022 | only makes a difference on systems where the default path |
|
2023 | 2023 | separator is not the slash character (e.g. Windows uses the |
|
2024 | 2024 | backslash character (``\``)). |
|
2025 | 2025 | (default: False) |
|
2026 | 2026 | |
|
2027 | 2027 | ``statuscopies`` |
|
2028 | 2028 | Display copies in the status command. |
|
2029 | 2029 | |
|
2030 | 2030 | ``ssh`` |
|
2031 | 2031 | Command to use for SSH connections. (default: ``ssh``) |
|
2032 | 2032 | |
|
2033 | 2033 | ``strict`` |
|
2034 | 2034 | Require exact command names, instead of allowing unambiguous |
|
2035 | 2035 | abbreviations. (default: False) |
|
2036 | 2036 | |
|
2037 | 2037 | ``style`` |
|
2038 | 2038 | Name of style to use for command output. |
|
2039 | 2039 | |
|
2040 | 2040 | ``supportcontact`` |
|
2041 | 2041 | A URL where users should report a Mercurial traceback. Use this if you are a |
|
2042 | 2042 | large organisation with its own Mercurial deployment process and crash |
|
2043 | 2043 | reports should be addressed to your internal support. |
|
2044 | 2044 | |
|
2045 | 2045 | ``textwidth`` |
|
2046 | 2046 | Maximum width of help text. A longer line generated by ``hg help`` or |
|
2047 | 2047 | ``hg subcommand --help`` will be broken after white space to get this |
|
2048 | 2048 | width or the terminal width, whichever comes first. |
|
2049 | 2049 | A non-positive value will disable this and the terminal width will be |
|
2050 | 2050 | used. (default: 78) |
|
2051 | 2051 | |
|
2052 | 2052 | ``timeout`` |
|
2053 | 2053 | The timeout used when a lock is held (in seconds), a negative value |
|
2054 | 2054 | means no timeout. (default: 600) |
|
2055 | 2055 | |
|
2056 | 2056 | ``traceback`` |
|
2057 | 2057 | Mercurial always prints a traceback when an unknown exception |
|
2058 | 2058 | occurs. Setting this to True will make Mercurial print a traceback |
|
2059 | 2059 | on all exceptions, even those recognized by Mercurial (such as |
|
2060 | 2060 | IOError or MemoryError). (default: False) |
|
2061 | 2061 | |
|
2062 | 2062 | ``username`` |
|
2063 | 2063 | The committer of a changeset created when running "commit". |
|
2064 | 2064 | Typically a person's name and email address, e.g. ``Fred Widget |
|
2065 | 2065 | <fred@example.com>``. Environment variables in the |
|
2066 | 2066 | username are expanded. |
|
2067 | 2067 | |
|
2068 | 2068 | (default: ``$EMAIL`` or ``username@hostname``. If the username in |
|
2069 | 2069 | hgrc is empty, e.g. if the system admin set ``username =`` in the |
|
2070 | 2070 | system hgrc, it has to be specified manually or in a different |
|
2071 | 2071 | hgrc file) |
|
2072 | 2072 | |
|
2073 | 2073 | ``verbose`` |
|
2074 | 2074 | Increase the amount of output printed. (default: False) |
|
2075 | 2075 | |
|
2076 | 2076 | |
|
2077 | 2077 | ``web`` |
|
2078 | 2078 | ------- |
|
2079 | 2079 | |
|
2080 | 2080 | Web interface configuration. The settings in this section apply to |
|
2081 | 2081 | both the builtin webserver (started by :hg:`serve`) and the script you |
|
2082 | 2082 | run through a webserver (``hgweb.cgi`` and the derivatives for FastCGI |
|
2083 | 2083 | and WSGI). |
|
2084 | 2084 | |
|
2085 | 2085 | The Mercurial webserver does no authentication (it does not prompt for |
|
2086 | 2086 | usernames and passwords to validate *who* users are), but it does do |
|
2087 | 2087 | authorization (it grants or denies access for *authenticated users* |
|
2088 | 2088 | based on settings in this section). You must either configure your |
|
2089 | 2089 | webserver to do authentication for you, or disable the authorization |
|
2090 | 2090 | checks. |
|
2091 | 2091 | |
|
2092 | 2092 | For a quick setup in a trusted environment, e.g., a private LAN, where |
|
2093 | 2093 | you want it to accept pushes from anybody, you can use the following |
|
2094 | 2094 | command line:: |
|
2095 | 2095 | |
|
2096 | 2096 | $ hg --config web.allow_push=* --config web.push_ssl=False serve |
|
2097 | 2097 | |
|
2098 | 2098 | Note that this will allow anybody to push anything to the server and |
|
2099 | 2099 | that this should not be used for public servers. |
|
2100 | 2100 | |
|
2101 | 2101 | The full set of options is: |
|
2102 | 2102 | |
|
2103 | 2103 | ``accesslog`` |
|
2104 | 2104 | Where to output the access log. (default: stdout) |
|
2105 | 2105 | |
|
2106 | 2106 | ``address`` |
|
2107 | 2107 | Interface address to bind to. (default: all) |
|
2108 | 2108 | |
|
2109 | 2109 | ``allow_archive`` |
|
2110 | 2110 | List of archive format (bz2, gz, zip) allowed for downloading. |
|
2111 | 2111 | (default: empty) |
|
2112 | 2112 | |
|
2113 | 2113 | ``allowbz2`` |
|
2114 | 2114 | (DEPRECATED) Whether to allow .tar.bz2 downloading of repository |
|
2115 | 2115 | revisions. |
|
2116 | 2116 | (default: False) |
|
2117 | 2117 | |
|
2118 | 2118 | ``allowgz`` |
|
2119 | 2119 | (DEPRECATED) Whether to allow .tar.gz downloading of repository |
|
2120 | 2120 | revisions. |
|
2121 | 2121 | (default: False) |
|
2122 | 2122 | |
|
2123 | 2123 | ``allowpull`` |
|
2124 | 2124 | Whether to allow pulling from the repository. (default: True) |
|
2125 | 2125 | |
|
2126 | 2126 | ``allow_push`` |
|
2127 | 2127 | Whether to allow pushing to the repository. If empty or not set, |
|
2128 | 2128 | pushing is not allowed. If the special value ``*``, any remote |
|
2129 | 2129 | user can push, including unauthenticated users. Otherwise, the |
|
2130 | 2130 | remote user must have been authenticated, and the authenticated |
|
2131 | 2131 | user name must be present in this list. The contents of the |
|
2132 | 2132 | allow_push list are examined after the deny_push list. |
|
2133 | 2133 | |
|
2134 | 2134 | ``allow_read`` |
|
2135 | 2135 | If the user has not already been denied repository access due to |
|
2136 | 2136 | the contents of deny_read, this list determines whether to grant |
|
2137 | 2137 | repository access to the user. If this list is not empty, and the |
|
2138 | 2138 | user is unauthenticated or not present in the list, then access is |
|
2139 | 2139 | denied for the user. If the list is empty or not set, then access |
|
2140 | 2140 | is permitted to all users by default. Setting allow_read to the |
|
2141 | 2141 | special value ``*`` is equivalent to it not being set (i.e. access |
|
2142 | 2142 | is permitted to all users). The contents of the allow_read list are |
|
2143 | 2143 | examined after the deny_read list. |
|
2144 | 2144 | |
|
2145 | 2145 | ``allowzip`` |
|
2146 | 2146 | (DEPRECATED) Whether to allow .zip downloading of repository |
|
2147 | 2147 | revisions. This feature creates temporary files. |
|
2148 | 2148 | (default: False) |
|
2149 | 2149 | |
|
2150 | 2150 | ``archivesubrepos`` |
|
2151 | 2151 | Whether to recurse into subrepositories when archiving. |
|
2152 | 2152 | (default: False) |
|
2153 | 2153 | |
|
2154 | 2154 | ``baseurl`` |
|
2155 | 2155 | Base URL to use when publishing URLs in other locations, so |
|
2156 | 2156 | third-party tools like email notification hooks can construct |
|
2157 | 2157 | URLs. Example: ``http://hgserver/repos/``. |
|
2158 | 2158 | |
|
2159 | 2159 | ``cacerts`` |
|
2160 | 2160 | Path to file containing a list of PEM encoded certificate |
|
2161 | 2161 | authority certificates. Environment variables and ``~user`` |
|
2162 | 2162 | constructs are expanded in the filename. If specified on the |
|
2163 | 2163 | client, then it will verify the identity of remote HTTPS servers |
|
2164 | 2164 | with these certificates. |
|
2165 | 2165 | |
|
2166 | 2166 | To disable SSL verification temporarily, specify ``--insecure`` from |
|
2167 | 2167 | command line. |
|
2168 | 2168 | |
|
2169 | 2169 | You can use OpenSSL's CA certificate file if your platform has |
|
2170 | 2170 | one. On most Linux systems this will be |
|
2171 | 2171 | ``/etc/ssl/certs/ca-certificates.crt``. Otherwise you will have to |
|
2172 | 2172 | generate this file manually. The form must be as follows:: |
|
2173 | 2173 | |
|
2174 | 2174 | -----BEGIN CERTIFICATE----- |
|
2175 | 2175 | ... (certificate in base64 PEM encoding) ... |
|
2176 | 2176 | -----END CERTIFICATE----- |
|
2177 | 2177 | -----BEGIN CERTIFICATE----- |
|
2178 | 2178 | ... (certificate in base64 PEM encoding) ... |
|
2179 | 2179 | -----END CERTIFICATE----- |
|
2180 | 2180 | |
|
2181 | 2181 | ``cache`` |
|
2182 | 2182 | Whether to support caching in hgweb. (default: True) |
|
2183 | 2183 | |
|
2184 | 2184 | ``certificate`` |
|
2185 | 2185 | Certificate to use when running :hg:`serve`. |
|
2186 | 2186 | |
|
2187 | 2187 | ``collapse`` |
|
2188 | 2188 | With ``descend`` enabled, repositories in subdirectories are shown at |
|
2189 | 2189 | a single level alongside repositories in the current path. With |
|
2190 | 2190 | ``collapse`` also enabled, repositories residing at a deeper level than |
|
2191 | 2191 | the current path are grouped behind navigable directory entries that |
|
2192 | 2192 | lead to the locations of these repositories. In effect, this setting |
|
2193 | 2193 | collapses each collection of repositories found within a subdirectory |
|
2194 | 2194 | into a single entry for that subdirectory. (default: False) |
|
2195 | 2195 | |
|
2196 | 2196 | ``comparisoncontext`` |
|
2197 | 2197 | Number of lines of context to show in side-by-side file comparison. If |
|
2198 | 2198 | negative or the value ``full``, whole files are shown. (default: 5) |
|
2199 | 2199 | |
|
2200 | 2200 | This setting can be overridden by a ``context`` request parameter to the |
|
2201 | 2201 | ``comparison`` command, taking the same values. |
|
2202 | 2202 | |
|
2203 | 2203 | ``contact`` |
|
2204 | 2204 | Name or email address of the person in charge of the repository. |
|
2205 | 2205 | (default: ui.username or ``$EMAIL`` or "unknown" if unset or empty) |
|
2206 | 2206 | |
|
2207 | 2207 | ``csp`` |
|
2208 | 2208 | Send a ``Content-Security-Policy`` HTTP header with this value. |
|
2209 | 2209 | |
|
2210 | 2210 | The value may contain a special string ``%nonce%``, which will be replaced |
|
2211 | 2211 | by a randomly-generated one-time use value. If the value contains |
|
2212 | 2212 | ``%nonce%``, ``web.cache`` will be disabled, as caching undermines the |
|
2213 | 2213 | one-time property of the nonce. This nonce will also be inserted into |
|
2214 | 2214 | ``<script>`` elements containing inline JavaScript. |
|
2215 | 2215 | |
|
2216 | 2216 | Note: lots of HTML content sent by the server is derived from repository |
|
2217 | 2217 | data. Please consider the potential for malicious repository data to |
|
2218 | 2218 | "inject" itself into generated HTML content as part of your security |
|
2219 | 2219 | threat model. |
|
2220 | 2220 | |
|
2221 | 2221 | ``deny_push`` |
|
2222 | 2222 | Whether to deny pushing to the repository. If empty or not set, |
|
2223 | 2223 | push is not denied. If the special value ``*``, all remote users are |
|
2224 | 2224 | denied push. Otherwise, unauthenticated users are all denied, and |
|
2225 | 2225 | any authenticated user name present in this list is also denied. The |
|
2226 | 2226 | contents of the deny_push list are examined before the allow_push list. |
|
2227 | 2227 | |
|
2228 | 2228 | ``deny_read`` |
|
2229 | 2229 | Whether to deny reading/viewing of the repository. If this list is |
|
2230 | 2230 | not empty, unauthenticated users are all denied, and any |
|
2231 | 2231 | authenticated user name present in this list is also denied access to |
|
2232 | 2232 | the repository. If set to the special value ``*``, all remote users |
|
2233 | 2233 | are denied access (rarely needed ;). If deny_read is empty or not set, |
|
2234 | 2234 | the determination of repository access depends on the presence and |
|
2235 | 2235 | content of the allow_read list (see description). If both |
|
2236 | 2236 | deny_read and allow_read are empty or not set, then access is |
|
2237 | 2237 | permitted to all users by default. If the repository is being |
|
2238 | 2238 | served via hgwebdir, denied users will not be able to see it in |
|
2239 | 2239 | the list of repositories. The contents of the deny_read list have |
|
2240 | 2240 | priority over (are examined before) the contents of the allow_read |
|
2241 | 2241 | list. |
|
2242 | 2242 | |
|
2243 | 2243 | ``descend`` |
|
2244 | 2244 | hgwebdir indexes will not descend into subdirectories. Only repositories |
|
2245 | 2245 | directly in the current path will be shown (other repositories are still |
|
2246 | 2246 | available from the index corresponding to their containing path). |
|
2247 | 2247 | |
|
2248 | 2248 | ``description`` |
|
2249 | 2249 | Textual description of the repository's purpose or contents. |
|
2250 | 2250 | (default: "unknown") |
|
2251 | 2251 | |
|
2252 | 2252 | ``encoding`` |
|
2253 | 2253 | Character encoding name. (default: the current locale charset) |
|
2254 | 2254 | Example: "UTF-8". |
|
2255 | 2255 | |
|
2256 | 2256 | ``errorlog`` |
|
2257 | 2257 | Where to output the error log. (default: stderr) |
|
2258 | 2258 | |
|
2259 | 2259 | ``guessmime`` |
|
2260 | 2260 | Control MIME types for raw download of file content. |
|
2261 | 2261 | Set to True to let hgweb guess the content type from the file |
|
2262 | 2262 | extension. This will serve HTML files as ``text/html`` and might |
|
2263 | 2263 | allow cross-site scripting attacks when serving untrusted |
|
2264 | 2264 | repositories. (default: False) |
|
2265 | 2265 | |
|
2266 | 2266 | ``hidden`` |
|
2267 | 2267 | Whether to hide the repository in the hgwebdir index. |
|
2268 | 2268 | (default: False) |
|
2269 | 2269 | |
|
2270 | 2270 | ``ipv6`` |
|
2271 | 2271 | Whether to use IPv6. (default: False) |
|
2272 | 2272 | |
|
2273 | 2273 | ``labels`` |
|
2274 | 2274 | List of string *labels* associated with the repository. |
|
2275 | 2275 | |
|
2276 | 2276 | Labels are exposed as a template keyword and can be used to customize |
|
2277 | 2277 | output. e.g. the ``index`` template can group or filter repositories |
|
2278 | 2278 | by labels and the ``summary`` template can display additional content |
|
2279 | 2279 | if a specific label is present. |
|
2280 | 2280 | |
|
2281 | 2281 | ``logoimg`` |
|
2282 | 2282 | File name of the logo image that some templates display on each page. |
|
2283 | 2283 | The file name is relative to ``staticurl``. That is, the full path to |
|
2284 | 2284 | the logo image is "staticurl/logoimg". |
|
2285 | 2285 | If unset, ``hglogo.png`` will be used. |
|
2286 | 2286 | |
|
2287 | 2287 | ``logourl`` |
|
2288 | 2288 | Base URL to use for logos. If unset, ``https://mercurial-scm.org/`` |
|
2289 | 2289 | will be used. |
|
2290 | 2290 | |
|
2291 | 2291 | ``maxchanges`` |
|
2292 | 2292 | Maximum number of changes to list on the changelog. (default: 10) |
|
2293 | 2293 | |
|
2294 | 2294 | ``maxfiles`` |
|
2295 | 2295 | Maximum number of files to list per changeset. (default: 10) |
|
2296 | 2296 | |
|
2297 | 2297 | ``maxshortchanges`` |
|
2298 | 2298 | Maximum number of changes to list on the shortlog, graph or filelog |
|
2299 | 2299 | pages. (default: 60) |
|
2300 | 2300 | |
|
2301 | 2301 | ``name`` |
|
2302 | 2302 | Repository name to use in the web interface. |
|
2303 | 2303 | (default: current working directory) |
|
2304 | 2304 | |
|
2305 | 2305 | ``port`` |
|
2306 | 2306 | Port to listen on. (default: 8000) |
|
2307 | 2307 | |
|
2308 | 2308 | ``prefix`` |
|
2309 | 2309 | Prefix path to serve from. (default: '' (server root)) |
|
2310 | 2310 | |
|
2311 | 2311 | ``push_ssl`` |
|
2312 | 2312 | Whether to require that inbound pushes be transported over SSL to |
|
2313 | 2313 | prevent password sniffing. (default: True) |
|
2314 | 2314 | |
|
2315 | 2315 | ``refreshinterval`` |
|
2316 | 2316 | How frequently directory listings re-scan the filesystem for new |
|
2317 | 2317 | repositories, in seconds. This is relevant when wildcards are used |
|
2318 | 2318 | to define paths. Depending on how much filesystem traversal is |
|
2319 | 2319 | required, refreshing may negatively impact performance. |
|
2320 | 2320 | |
|
2321 | 2321 | Values less than or equal to 0 always refresh. |
|
2322 | 2322 | (default: 20) |
|
2323 | 2323 | |
|
2324 | 2324 | ``staticurl`` |
|
2325 | 2325 | Base URL to use for static files. If unset, static files (e.g. the |
|
2326 | 2326 | hgicon.png favicon) will be served by the CGI script itself. Use |
|
2327 | 2327 | this setting to serve them directly with the HTTP server. |
|
2328 | 2328 | Example: ``http://hgserver/static/``. |
|
2329 | 2329 | |
|
2330 | 2330 | ``stripes`` |
|
2331 | 2331 | How many lines a "zebra stripe" should span in multi-line output. |
|
2332 | 2332 | Set to 0 to disable. (default: 1) |
|
2333 | 2333 | |
|
2334 | 2334 | ``style`` |
|
2335 | 2335 | Which template map style to use. The available options are the names of |
|
2336 | 2336 | subdirectories in the HTML templates path. (default: ``paper``) |
|
2337 | 2337 | Example: ``monoblue``. |
|
2338 | 2338 | |
|
2339 | 2339 | ``templates`` |
|
2340 | 2340 | Where to find the HTML templates. The default path to the HTML templates |
|
2341 | 2341 | can be obtained from ``hg debuginstall``. |
|
2342 | 2342 | |
|
2343 | 2343 | ``websub`` |
|
2344 | 2344 | ---------- |
|
2345 | 2345 | |
|
2346 | 2346 | Web substitution filter definition. You can use this section to |
|
2347 | 2347 | define a set of regular expression substitution patterns which |
|
2348 | 2348 | let you automatically modify the hgweb server output. |
|
2349 | 2349 | |
|
2350 | 2350 | The default hgweb templates only apply these substitution patterns |
|
2351 | 2351 | on the revision description fields. You can apply them anywhere |
|
2352 | 2352 | you want when you create your own templates by adding calls to the |
|
2353 | 2353 | "websub" filter (usually after calling the "escape" filter). |
|
2354 | 2354 | |
|
2355 | 2355 | This can be used, for example, to convert issue references to links |
|
2356 | 2356 | to your issue tracker, or to convert "markdown-like" syntax into |
|
2357 | 2357 | HTML (see the examples below). |
|
2358 | 2358 | |
|
2359 | 2359 | Each entry in this section names a substitution filter. |
|
2360 | 2360 | The value of each entry defines the substitution expression itself. |
|
2361 | 2361 | The websub expressions follow the old interhg extension syntax, |
|
2362 | 2362 | which in turn imitates the Unix sed replacement syntax:: |
|
2363 | 2363 | |
|
2364 | 2364 | patternname = s/SEARCH_REGEX/REPLACE_EXPRESSION/[i] |
|
2365 | 2365 | |
|
2366 | 2366 | You can use any separator other than "/". The final "i" is optional |
|
2367 | 2367 | and indicates that the search must be case insensitive. |
|
2368 | 2368 | |
|
2369 | 2369 | Examples:: |
|
2370 | 2370 | |
|
2371 | 2371 | [websub] |
|
2372 | 2372 | issues = s|issue(\d+)|<a href="http://bts.example.org/issue\1">issue\1</a>|i |
|
2373 | 2373 | italic = s/\b_(\S+)_\b/<i>\1<\/i>/ |
|
2374 | 2374 | bold = s/\*\b(\S+)\b\*/<b>\1<\/b>/ |
|
2375 | 2375 | |
|
2376 | 2376 | ``worker`` |
|
2377 | 2377 | ---------- |
|
2378 | 2378 | |
|
2379 | 2379 | Parallel master/worker configuration. We currently perform working |
|
2380 | 2380 | directory updates in parallel on Unix-like systems, which greatly |
|
2381 | 2381 | helps performance. |
|
2382 | 2382 | |
|
2383 | 2383 | ``numcpus`` |
|
2384 | 2384 | Number of CPUs to use for parallel operations. A zero or |
|
2385 | 2385 | negative value is treated as ``use the default``. |
|
2386 | 2386 | (default: 4 or the number of CPUs on the system, whichever is larger) |
|
2387 | 2387 | |
|
2388 | 2388 | ``backgroundclose`` |
|
2389 | 2389 | Whether to enable closing file handles on background threads during certain |
|
2390 | 2390 | operations. Some platforms aren't very efficient at closing file |
|
2391 | 2391 | handles that have been written or appended to. By performing file closing |
|
2392 | 2392 | on background threads, file write rate can increase substantially. |
|
2393 | 2393 | (default: true on Windows, false elsewhere) |
|
2394 | 2394 | |
|
2395 | 2395 | ``backgroundcloseminfilecount`` |
|
2396 | 2396 | Minimum number of files required to trigger background file closing. |
|
2397 | 2397 | Operations not writing this many files won't start background close |
|
2398 | 2398 | threads. |
|
2399 | 2399 | (default: 2048) |
|
2400 | 2400 | |
|
2401 | 2401 | ``backgroundclosemaxqueue`` |
|
2402 | 2402 | The maximum number of opened file handles waiting to be closed in the |
|
2403 | 2403 | background. This option only has an effect if ``backgroundclose`` is |
|
2404 | 2404 | enabled. |
|
2405 | 2405 | (default: 384) |
|
2406 | 2406 | |
|
2407 | 2407 | ``backgroundclosethreadcount`` |
|
2408 | 2408 | Number of threads to process background file closes. Only relevant if |
|
2409 | 2409 | ``backgroundclose`` is enabled. |
|
2410 | 2410 | (default: 4) |
@@ -1,188 +1,188 b'' | |||
|
1 | 1 | Changegroups are representations of repository revlog data, specifically |
|
2 | 2 | the changelog data, root/flat manifest data, treemanifest data, and |
|
3 | 3 | filelogs. |
|
4 | 4 | |
|
5 | 5 | There are 3 versions of changegroups: ``1``, ``2``, and ``3``. From a |
|
6 | 6 | high-level, versions ``1`` and ``2`` are almost exactly the same, with the |
|
7 | 7 | only difference being an additional item in the *delta header*. Version |
|
8 | 8 | ``3`` adds support for revlog flags in the *delta header* and optionally |
|
9 | 9 | exchanging treemanifests (enabled by setting an option on the |
|
10 | 10 | ``changegroup`` part in the bundle2). |
|
11 | 11 | |
|
12 | 12 | Changegroups when not exchanging treemanifests consist of 3 logical |
|
13 | 13 | segments:: |
|
14 | 14 | |
|
15 | 15 | +---------------------------------+ |
|
16 | 16 | | | | | |
|
17 | 17 | | changeset | manifest | filelogs | |
|
18 | 18 | | | | | |
|
19 | 19 | | | | | |
|
20 | 20 | +---------------------------------+ |
|
21 | 21 | |
|
22 | 22 | When exchanging treemanifests, there are 4 logical segments:: |
|
23 | 23 | |
|
24 | 24 | +-------------------------------------------------+ |
|
25 | 25 | | | | | | |
|
26 | 26 | | changeset | root | treemanifests | filelogs | |
|
27 | 27 | | | manifest | | | |
|
28 | 28 | | | | | | |
|
29 | 29 | +-------------------------------------------------+ |
|
30 | 30 | |
|
31 | 31 | The principle building block of each segment is a *chunk*. A *chunk* |
|
32 | 32 | is a framed piece of data:: |
|
33 | 33 | |
|
34 | 34 | +---------------------------------------+ |
|
35 | 35 | | | | |
|
36 | 36 | | length | data | |
|
37 | 37 | | (4 bytes) | (<length - 4> bytes) | |
|
38 | 38 | | | | |
|
39 | 39 | +---------------------------------------+ |
|
40 | 40 | |
|
41 | 41 | All integers are big-endian signed integers. Each chunk starts with a 32-bit |
|
42 | 42 | integer indicating the length of the entire chunk (including the length field |
|
43 | 43 | itself). |
|
44 | 44 | |
|
45 | 45 | There is a special case chunk that has a value of 0 for the length |
|
46 | 46 | (``0x00000000``). We call this an *empty chunk*. |
|
47 | 47 | |
|
48 | 48 | Delta Groups |
|
49 | 49 | ============ |
|
50 | 50 | |
|
51 | 51 | A *delta group* expresses the content of a revlog as a series of deltas, |
|
52 | 52 | or patches against previous revisions. |
|
53 | 53 | |
|
54 | 54 | Delta groups consist of 0 or more *chunks* followed by the *empty chunk* |
|
55 | 55 | to signal the end of the delta group:: |
|
56 | 56 | |
|
57 | 57 | +------------------------------------------------------------------------+ |
|
58 | 58 | | | | | | | |
|
59 | 59 | | chunk0 length | chunk0 data | chunk1 length | chunk1 data | 0x0 | |
|
60 | 60 | | (4 bytes) | (various) | (4 bytes) | (various) | (4 bytes) | |
|
61 | 61 | | | | | | | |
|
62 | 62 | +------------------------------------------------------------------------+ |
|
63 | 63 | |
|
64 | 64 | Each *chunk*'s data consists of the following:: |
|
65 | 65 | |
|
66 | 66 | +---------------------------------------+ |
|
67 | 67 | | | | |
|
68 | 68 | | delta header | delta data | |
|
69 | 69 | | (various by version) | (various) | |
|
70 | 70 | | | | |
|
71 | 71 | +---------------------------------------+ |
|
72 | 72 | |
|
73 | 73 | The *delta data* is a series of *delta*s that describe a diff from an existing |
|
74 | 74 | entry (either that the recipient already has, or previously specified in the |
|
75 |
bundle |
|
|
75 | bundle/changegroup). | |
|
76 | 76 | |
|
77 | 77 | The *delta header* is different between versions ``1``, ``2``, and |
|
78 | 78 | ``3`` of the changegroup format. |
|
79 | 79 | |
|
80 | 80 | Version 1 (headerlen=80):: |
|
81 | 81 | |
|
82 | 82 | +------------------------------------------------------+ |
|
83 | 83 | | | | | | |
|
84 | 84 | | node | p1 node | p2 node | link node | |
|
85 | 85 | | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) | |
|
86 | 86 | | | | | | |
|
87 | 87 | +------------------------------------------------------+ |
|
88 | 88 | |
|
89 | 89 | Version 2 (headerlen=100):: |
|
90 | 90 | |
|
91 | 91 | +------------------------------------------------------------------+ |
|
92 | 92 | | | | | | | |
|
93 | 93 | | node | p1 node | p2 node | base node | link node | |
|
94 | 94 | | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) | |
|
95 | 95 | | | | | | | |
|
96 | 96 | +------------------------------------------------------------------+ |
|
97 | 97 | |
|
98 | 98 | Version 3 (headerlen=102):: |
|
99 | 99 | |
|
100 | 100 | +------------------------------------------------------------------------------+ |
|
101 | 101 | | | | | | | | |
|
102 | 102 | | node | p1 node | p2 node | base node | link node | flags | |
|
103 | 103 | | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) | (2 bytes) | |
|
104 | 104 | | | | | | | | |
|
105 | 105 | +------------------------------------------------------------------------------+ |
|
106 | 106 | |
|
107 | 107 | The *delta data* consists of ``chunklen - 4 - headerlen`` bytes, which contain a |
|
108 | 108 | series of *delta*s, densely packed (no separators). These deltas describe a diff |
|
109 | 109 | from an existing entry (either that the recipient already has, or previously |
|
110 | 110 | specified in the bundle/changegroup). The format is described more fully in |
|
111 | 111 | ``hg help internals.bdiff``, but briefly:: |
|
112 | 112 | |
|
113 | 113 | +---------------------------------------------------------------+ |
|
114 | 114 | | | | | | |
|
115 | 115 | | start offset | end offset | new length | content | |
|
116 | 116 | | (4 bytes) | (4 bytes) | (4 bytes) | (<new length> bytes) | |
|
117 | 117 | | | | | | |
|
118 | 118 | +---------------------------------------------------------------+ |
|
119 | 119 | |
|
120 | 120 | Please note that the length field in the delta data does *not* include itself. |
|
121 | 121 | |
|
122 | 122 | In version 1, the delta is always applied against the previous node from |
|
123 | 123 | the changegroup or the first parent if this is the first entry in the |
|
124 | 124 | changegroup. |
|
125 | 125 | |
|
126 | 126 | In version 2 and up, the delta base node is encoded in the entry in the |
|
127 | 127 | changegroup. This allows the delta to be expressed against any parent, |
|
128 | 128 | which can result in smaller deltas and more efficient encoding of data. |
|
129 | 129 | |
|
130 | 130 | Changeset Segment |
|
131 | 131 | ================= |
|
132 | 132 | |
|
133 | 133 | The *changeset segment* consists of a single *delta group* holding |
|
134 | 134 | changelog data. The *empty chunk* at the end of the *delta group* denotes |
|
135 | 135 | the boundary to the *manifest segment*. |
|
136 | 136 | |
|
137 | 137 | Manifest Segment |
|
138 | 138 | ================ |
|
139 | 139 | |
|
140 | 140 | The *manifest segment* consists of a single *delta group* holding manifest |
|
141 | 141 | data. If treemanifests are in use, it contains only the manifest for the |
|
142 | 142 | root directory of the repository. Otherwise, it contains the entire |
|
143 | 143 | manifest data. The *empty chunk* at the end of the *delta group* denotes |
|
144 | 144 | the boundary to the next segment (either the *treemanifests segment* or the |
|
145 | 145 | *filelogs segment*, depending on version and the request options). |
|
146 | 146 | |
|
147 | 147 | Treemanifests Segment |
|
148 | 148 | --------------------- |
|
149 | 149 | |
|
150 | 150 | The *treemanifests segment* only exists in changegroup version ``3``, and |
|
151 | 151 | only if the 'treemanifest' param is part of the bundle2 changegroup part |
|
152 | 152 | (it is not possible to use changegroup version 3 outside of bundle2). |
|
153 | 153 | Aside from the filenames in the *treemanifests segment* containing a |
|
154 | 154 | trailing ``/`` character, it behaves identically to the *filelogs segment* |
|
155 | 155 | (see below). The final sub-segment is followed by an *empty chunk* (logically, |
|
156 | 156 | a sub-segment with filename size 0). This denotes the boundary to the |
|
157 | 157 | *filelogs segment*. |
|
158 | 158 | |
|
159 | 159 | Filelogs Segment |
|
160 | 160 | ================ |
|
161 | 161 | |
|
162 | 162 | The *filelogs segment* consists of multiple sub-segments, each |
|
163 | 163 | corresponding to an individual file whose data is being described:: |
|
164 | 164 | |
|
165 | 165 | +--------------------------------------------------+ |
|
166 | 166 | | | | | | | |
|
167 | 167 | | filelog0 | filelog1 | filelog2 | ... | 0x0 | |
|
168 | 168 | | | | | | (4 bytes) | |
|
169 | 169 | | | | | | | |
|
170 | 170 | +--------------------------------------------------+ |
|
171 | 171 | |
|
172 | 172 | The final filelog sub-segment is followed by an *empty chunk* (logically, |
|
173 | 173 | a sub-segment with filename size 0). This denotes the end of the segment |
|
174 | 174 | and of the overall changegroup. |
|
175 | 175 | |
|
176 | 176 | Each filelog sub-segment consists of the following:: |
|
177 | 177 | |
|
178 | 178 | +------------------------------------------------------+ |
|
179 | 179 | | | | | |
|
180 | 180 | | filename length | filename | delta group | |
|
181 | 181 | | (4 bytes) | (<length - 4> bytes) | (various) | |
|
182 | 182 | | | | | |
|
183 | 183 | +------------------------------------------------------+ |
|
184 | 184 | |
|
185 | 185 | That is, a *chunk* consisting of the filename (not terminated or padded) |
|
186 | 186 | followed by N chunks constituting the *delta group* for this file. The |
|
187 | 187 | *empty chunk* at the end of each *delta group* denotes the boundary to the |
|
188 | 188 | next filelog sub-segment. |
@@ -1,192 +1,192 b'' | |||
|
1 | 1 | Mercurial allows you to customize output of commands through |
|
2 | 2 | templates. You can either pass in a template or select an existing |
|
3 | 3 | template-style from the command line, via the --template option. |
|
4 | 4 | |
|
5 | 5 | You can customize output for any "log-like" command: log, |
|
6 | 6 | outgoing, incoming, tip, parents, and heads. |
|
7 | 7 | |
|
8 | 8 | Some built-in styles are packaged with Mercurial. These can be listed |
|
9 | 9 | with :hg:`log --template list`. Example usage:: |
|
10 | 10 | |
|
11 | 11 | $ hg log -r1.0::1.1 --template changelog |
|
12 | 12 | |
|
13 | 13 | A template is a piece of text, with markup to invoke variable |
|
14 | 14 | expansion:: |
|
15 | 15 | |
|
16 | 16 | $ hg log -r1 --template "{node}\n" |
|
17 | 17 | b56ce7b07c52de7d5fd79fb89701ea538af65746 |
|
18 | 18 | |
|
19 | 19 | Keywords |
|
20 | 20 | ======== |
|
21 | 21 | |
|
22 | 22 | Strings in curly braces are called keywords. The availability of |
|
23 | 23 | keywords depends on the exact context of the templater. These |
|
24 | 24 | keywords are usually available for templating a log-like command: |
|
25 | 25 | |
|
26 | 26 | .. keywordsmarker |
|
27 | 27 | |
|
28 | 28 | The "date" keyword does not produce human-readable output. If you |
|
29 | 29 | want to use a date in your output, you can use a filter to process |
|
30 | 30 | it. Filters are functions which return a string based on the input |
|
31 | 31 | variable. Be sure to use the stringify filter first when you're |
|
32 | 32 | applying a string-input filter to a list-like input variable. |
|
33 | 33 | You can also use a chain of filters to get the desired output:: |
|
34 | 34 | |
|
35 | 35 | $ hg tip --template "{date|isodate}\n" |
|
36 | 36 | 2008-08-21 18:22 +0000 |
|
37 | 37 | |
|
38 | 38 | Filters |
|
39 | 39 | ======= |
|
40 | 40 | |
|
41 | 41 | List of filters: |
|
42 | 42 | |
|
43 | 43 | .. filtersmarker |
|
44 | 44 | |
|
45 | 45 | Note that a filter is nothing more than a function call, i.e. |
|
46 | 46 | ``expr|filter`` is equivalent to ``filter(expr)``. |
|
47 | 47 | |
|
48 | 48 | Functions |
|
49 | 49 | ========= |
|
50 | 50 | |
|
51 | 51 | In addition to filters, there are some basic built-in functions: |
|
52 | 52 | |
|
53 | 53 | .. functionsmarker |
|
54 | 54 | |
|
55 | 55 | Operators |
|
56 | 56 | ========= |
|
57 | 57 | |
|
58 | 58 | We provide a limited set of infix arithmetic operations on integers:: |
|
59 | 59 | |
|
60 | 60 | + for addition |
|
61 | 61 | - for subtraction |
|
62 | 62 | * for multiplication |
|
63 | 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 | 67 | Also, for any expression that returns a list, there is a list operator:: |
|
68 | 68 | |
|
69 | 69 | expr % "{template}" |
|
70 | 70 | |
|
71 | 71 | As seen in the above example, ``{template}`` is interpreted as a template. |
|
72 | 72 | To prevent it from being interpreted, you can use an escape character ``\{`` |
|
73 | 73 | or a raw string prefix, ``r'...'``. |
|
74 | 74 | |
|
75 | 75 | Aliases |
|
76 | 76 | ======= |
|
77 | 77 | |
|
78 | 78 | New keywords and functions can be defined in the ``templatealias`` section of |
|
79 | 79 | a Mercurial configuration file:: |
|
80 | 80 | |
|
81 | 81 | <alias> = <definition> |
|
82 | 82 | |
|
83 | 83 | Arguments of the form `a1`, `a2`, etc. are substituted from the alias into |
|
84 | 84 | the definition. |
|
85 | 85 | |
|
86 | 86 | For example, |
|
87 | 87 | |
|
88 | 88 | :: |
|
89 | 89 | |
|
90 | 90 | [templatealias] |
|
91 | 91 | r = rev |
|
92 | 92 | rn = "{r}:{node|short}" |
|
93 | 93 | leftpad(s, w) = pad(s, w, ' ', True) |
|
94 | 94 | |
|
95 | 95 | defines two symbol aliases, ``r`` and ``rn``, and a function alias |
|
96 | 96 | ``leftpad()``. |
|
97 | 97 | |
|
98 | 98 | It's also possible to specify complete template strings, using the |
|
99 | 99 | ``templates`` section. The syntax used is the general template string syntax. |
|
100 | 100 | |
|
101 | 101 | For example, |
|
102 | 102 | |
|
103 | 103 | :: |
|
104 | 104 | |
|
105 | 105 | [templates] |
|
106 | 106 | nodedate = "{node|short}: {date(date, "%Y-%m-%d")}\n" |
|
107 | 107 | |
|
108 | 108 | defines a template, ``nodedate``, which can be called like:: |
|
109 | 109 | |
|
110 | 110 | $ hg log -r . -Tnodedate |
|
111 | 111 | |
|
112 | 112 | Examples |
|
113 | 113 | ======== |
|
114 | 114 | |
|
115 | 115 | Some sample command line templates: |
|
116 | 116 | |
|
117 | 117 | - Format lists, e.g. files:: |
|
118 | 118 | |
|
119 | 119 | $ hg log -r 0 --template "files:\n{files % ' {file}\n'}" |
|
120 | 120 | |
|
121 | 121 | - Join the list of files with a ", ":: |
|
122 | 122 | |
|
123 | 123 | $ hg log -r 0 --template "files: {join(files, ', ')}\n" |
|
124 | 124 | |
|
125 | 125 | - Join the list of files ending with ".py" with a ", ":: |
|
126 | 126 | |
|
127 | 127 | $ hg log -r 0 --template "pythonfiles: {join(files('**.py'), ', ')}\n" |
|
128 | 128 | |
|
129 | 129 | - Separate non-empty arguments by a " ":: |
|
130 | 130 | |
|
131 | 131 | $ hg log -r 0 --template "{separate(' ', node, bookmarks, tags}\n" |
|
132 | 132 | |
|
133 | 133 | - Modify each line of a commit description:: |
|
134 | 134 | |
|
135 | 135 | $ hg log --template "{splitlines(desc) % '**** {line}\n'}" |
|
136 | 136 | |
|
137 | 137 | - Format date:: |
|
138 | 138 | |
|
139 | 139 | $ hg log -r 0 --template "{date(date, '%Y')}\n" |
|
140 | 140 | |
|
141 | 141 | - Display date in UTC:: |
|
142 | 142 | |
|
143 | 143 | $ hg log -r 0 --template "{localdate(date, 'UTC')|date}\n" |
|
144 | 144 | |
|
145 | 145 | - Output the description set to a fill-width of 30:: |
|
146 | 146 | |
|
147 | 147 | $ hg log -r 0 --template "{fill(desc, 30)}" |
|
148 | 148 | |
|
149 | 149 | - Use a conditional to test for the default branch:: |
|
150 | 150 | |
|
151 | 151 | $ hg log -r 0 --template "{ifeq(branch, 'default', 'on the main branch', |
|
152 | 152 | 'on branch {branch}')}\n" |
|
153 | 153 | |
|
154 | 154 | - Append a newline if not empty:: |
|
155 | 155 | |
|
156 | 156 | $ hg tip --template "{if(author, '{author}\n')}" |
|
157 | 157 | |
|
158 | 158 | - Label the output for use with the color extension:: |
|
159 | 159 | |
|
160 | 160 | $ hg log -r 0 --template "{label('changeset.{phase}', node|short)}\n" |
|
161 | 161 | |
|
162 | 162 | - Invert the firstline filter, i.e. everything but the first line:: |
|
163 | 163 | |
|
164 | 164 | $ hg log -r 0 --template "{sub(r'^.*\n?\n?', '', desc)}\n" |
|
165 | 165 | |
|
166 | 166 | - Display the contents of the 'extra' field, one per line:: |
|
167 | 167 | |
|
168 | 168 | $ hg log -r 0 --template "{join(extras, '\n')}\n" |
|
169 | 169 | |
|
170 | 170 | - Mark the active bookmark with '*':: |
|
171 | 171 | |
|
172 | 172 | $ hg log --template "{bookmarks % '{bookmark}{ifeq(bookmark, active, '*')} '}\n" |
|
173 | 173 | |
|
174 | 174 | - Find the previous release candidate tag, the distance and changes since the tag:: |
|
175 | 175 | |
|
176 | 176 | $ hg log -r . --template "{latesttag('re:^.*-rc$') % '{tag}, {changes}, {distance}'}\n" |
|
177 | 177 | |
|
178 | 178 | - Mark the working copy parent with '@':: |
|
179 | 179 | |
|
180 | 180 | $ hg log --template "{ifcontains(rev, revset('.'), '@')}\n" |
|
181 | 181 | |
|
182 | 182 | - Show details of parent revisions:: |
|
183 | 183 | |
|
184 | 184 | $ hg log --template "{revset('parents(%d)', rev) % '{desc|firstline}\n'}" |
|
185 | 185 | |
|
186 | 186 | - Show only commit descriptions that start with "template":: |
|
187 | 187 | |
|
188 | 188 | $ hg log --template "{startswith('template', firstline(desc))}\n" |
|
189 | 189 | |
|
190 | 190 | - Print the first word of each line of a commit message:: |
|
191 | 191 | |
|
192 | 192 | $ hg log --template "{word(0, desc)}\n" |
@@ -1,3327 +1,3327 b'' | |||
|
1 | 1 | Short help: |
|
2 | 2 | |
|
3 | 3 | $ hg |
|
4 | 4 | Mercurial Distributed SCM |
|
5 | 5 | |
|
6 | 6 | basic commands: |
|
7 | 7 | |
|
8 | 8 | add add the specified files on the next commit |
|
9 | 9 | annotate show changeset information by line for each file |
|
10 | 10 | clone make a copy of an existing repository |
|
11 | 11 | commit commit the specified files or all outstanding changes |
|
12 | 12 | diff diff repository (or selected files) |
|
13 | 13 | export dump the header and diffs for one or more changesets |
|
14 | 14 | forget forget the specified files on the next commit |
|
15 | 15 | init create a new repository in the given directory |
|
16 | 16 | log show revision history of entire repository or files |
|
17 | 17 | merge merge another revision into working directory |
|
18 | 18 | pull pull changes from the specified source |
|
19 | 19 | push push changes to the specified destination |
|
20 | 20 | remove remove the specified files on the next commit |
|
21 | 21 | serve start stand-alone webserver |
|
22 | 22 | status show changed files in the working directory |
|
23 | 23 | summary summarize working directory state |
|
24 | 24 | update update working directory (or switch revisions) |
|
25 | 25 | |
|
26 | 26 | (use 'hg help' for the full list of commands or 'hg -v' for details) |
|
27 | 27 | |
|
28 | 28 | $ hg -q |
|
29 | 29 | add add the specified files on the next commit |
|
30 | 30 | annotate show changeset information by line for each file |
|
31 | 31 | clone make a copy of an existing repository |
|
32 | 32 | commit commit the specified files or all outstanding changes |
|
33 | 33 | diff diff repository (or selected files) |
|
34 | 34 | export dump the header and diffs for one or more changesets |
|
35 | 35 | forget forget the specified files on the next commit |
|
36 | 36 | init create a new repository in the given directory |
|
37 | 37 | log show revision history of entire repository or files |
|
38 | 38 | merge merge another revision into working directory |
|
39 | 39 | pull pull changes from the specified source |
|
40 | 40 | push push changes to the specified destination |
|
41 | 41 | remove remove the specified files on the next commit |
|
42 | 42 | serve start stand-alone webserver |
|
43 | 43 | status show changed files in the working directory |
|
44 | 44 | summary summarize working directory state |
|
45 | 45 | update update working directory (or switch revisions) |
|
46 | 46 | |
|
47 | 47 | $ hg help |
|
48 | 48 | Mercurial Distributed SCM |
|
49 | 49 | |
|
50 | 50 | list of commands: |
|
51 | 51 | |
|
52 | 52 | add add the specified files on the next commit |
|
53 | 53 | addremove add all new files, delete all missing files |
|
54 | 54 | annotate show changeset information by line for each file |
|
55 | 55 | archive create an unversioned archive of a repository revision |
|
56 | 56 | backout reverse effect of earlier changeset |
|
57 | 57 | bisect subdivision search of changesets |
|
58 | 58 | bookmarks create a new bookmark or list existing bookmarks |
|
59 | 59 | branch set or show the current branch name |
|
60 | 60 | branches list repository named branches |
|
61 | 61 | bundle create a bundle file |
|
62 | 62 | cat output the current or given revision of files |
|
63 | 63 | clone make a copy of an existing repository |
|
64 | 64 | commit commit the specified files or all outstanding changes |
|
65 | 65 | config show combined config settings from all hgrc files |
|
66 | 66 | copy mark files as copied for the next commit |
|
67 | 67 | diff diff repository (or selected files) |
|
68 | 68 | export dump the header and diffs for one or more changesets |
|
69 | 69 | files list tracked files |
|
70 | 70 | forget forget the specified files on the next commit |
|
71 | 71 | graft copy changes from other branches onto the current branch |
|
72 | 72 | grep search revision history for a pattern in specified files |
|
73 | 73 | heads show branch heads |
|
74 | 74 | help show help for a given topic or a help overview |
|
75 | 75 | identify identify the working directory or specified revision |
|
76 | 76 | import import an ordered set of patches |
|
77 | 77 | incoming show new changesets found in source |
|
78 | 78 | init create a new repository in the given directory |
|
79 | 79 | log show revision history of entire repository or files |
|
80 | 80 | manifest output the current or given revision of the project manifest |
|
81 | 81 | merge merge another revision into working directory |
|
82 | 82 | outgoing show changesets not found in the destination |
|
83 | 83 | paths show aliases for remote repositories |
|
84 | 84 | phase set or show the current phase name |
|
85 | 85 | pull pull changes from the specified source |
|
86 | 86 | push push changes to the specified destination |
|
87 | 87 | recover roll back an interrupted transaction |
|
88 | 88 | remove remove the specified files on the next commit |
|
89 | 89 | rename rename files; equivalent of copy + remove |
|
90 | 90 | resolve redo merges or set/view the merge status of files |
|
91 | 91 | revert restore files to their checkout state |
|
92 | 92 | root print the root (top) of the current working directory |
|
93 | 93 | serve start stand-alone webserver |
|
94 | 94 | status show changed files in the working directory |
|
95 | 95 | summary summarize working directory state |
|
96 | 96 | tag add one or more tags for the current or given revision |
|
97 | 97 | tags list repository tags |
|
98 | 98 | unbundle apply one or more bundle files |
|
99 | 99 | update update working directory (or switch revisions) |
|
100 | 100 | verify verify the integrity of the repository |
|
101 | 101 | version output version and copyright information |
|
102 | 102 | |
|
103 | 103 | additional help topics: |
|
104 | 104 | |
|
105 | 105 | bundlespec Bundle File Formats |
|
106 | 106 | color Colorizing Outputs |
|
107 | 107 | config Configuration Files |
|
108 | 108 | dates Date Formats |
|
109 | 109 | diffs Diff Formats |
|
110 | 110 | environment Environment Variables |
|
111 | 111 | extensions Using Additional Features |
|
112 | 112 | filesets Specifying File Sets |
|
113 | 113 | glossary Glossary |
|
114 | 114 | hgignore Syntax for Mercurial Ignore Files |
|
115 | 115 | hgweb Configuring hgweb |
|
116 | 116 | internals Technical implementation topics |
|
117 | 117 | merge-tools Merge Tools |
|
118 | 118 | pager Pager Support |
|
119 | 119 | patterns File Name Patterns |
|
120 | 120 | phases Working with Phases |
|
121 | 121 | revisions Specifying Revisions |
|
122 | 122 | scripting Using Mercurial from scripts and automation |
|
123 | 123 | subrepos Subrepositories |
|
124 | 124 | templating Template Usage |
|
125 | 125 | urls URL Paths |
|
126 | 126 | |
|
127 | 127 | (use 'hg help -v' to show built-in aliases and global options) |
|
128 | 128 | |
|
129 | 129 | $ hg -q help |
|
130 | 130 | add add the specified files on the next commit |
|
131 | 131 | addremove add all new files, delete all missing files |
|
132 | 132 | annotate show changeset information by line for each file |
|
133 | 133 | archive create an unversioned archive of a repository revision |
|
134 | 134 | backout reverse effect of earlier changeset |
|
135 | 135 | bisect subdivision search of changesets |
|
136 | 136 | bookmarks create a new bookmark or list existing bookmarks |
|
137 | 137 | branch set or show the current branch name |
|
138 | 138 | branches list repository named branches |
|
139 | 139 | bundle create a bundle file |
|
140 | 140 | cat output the current or given revision of files |
|
141 | 141 | clone make a copy of an existing repository |
|
142 | 142 | commit commit the specified files or all outstanding changes |
|
143 | 143 | config show combined config settings from all hgrc files |
|
144 | 144 | copy mark files as copied for the next commit |
|
145 | 145 | diff diff repository (or selected files) |
|
146 | 146 | export dump the header and diffs for one or more changesets |
|
147 | 147 | files list tracked files |
|
148 | 148 | forget forget the specified files on the next commit |
|
149 | 149 | graft copy changes from other branches onto the current branch |
|
150 | 150 | grep search revision history for a pattern in specified files |
|
151 | 151 | heads show branch heads |
|
152 | 152 | help show help for a given topic or a help overview |
|
153 | 153 | identify identify the working directory or specified revision |
|
154 | 154 | import import an ordered set of patches |
|
155 | 155 | incoming show new changesets found in source |
|
156 | 156 | init create a new repository in the given directory |
|
157 | 157 | log show revision history of entire repository or files |
|
158 | 158 | manifest output the current or given revision of the project manifest |
|
159 | 159 | merge merge another revision into working directory |
|
160 | 160 | outgoing show changesets not found in the destination |
|
161 | 161 | paths show aliases for remote repositories |
|
162 | 162 | phase set or show the current phase name |
|
163 | 163 | pull pull changes from the specified source |
|
164 | 164 | push push changes to the specified destination |
|
165 | 165 | recover roll back an interrupted transaction |
|
166 | 166 | remove remove the specified files on the next commit |
|
167 | 167 | rename rename files; equivalent of copy + remove |
|
168 | 168 | resolve redo merges or set/view the merge status of files |
|
169 | 169 | revert restore files to their checkout state |
|
170 | 170 | root print the root (top) of the current working directory |
|
171 | 171 | serve start stand-alone webserver |
|
172 | 172 | status show changed files in the working directory |
|
173 | 173 | summary summarize working directory state |
|
174 | 174 | tag add one or more tags for the current or given revision |
|
175 | 175 | tags list repository tags |
|
176 | 176 | unbundle apply one or more bundle files |
|
177 | 177 | update update working directory (or switch revisions) |
|
178 | 178 | verify verify the integrity of the repository |
|
179 | 179 | version output version and copyright information |
|
180 | 180 | |
|
181 | 181 | additional help topics: |
|
182 | 182 | |
|
183 | 183 | bundlespec Bundle File Formats |
|
184 | 184 | color Colorizing Outputs |
|
185 | 185 | config Configuration Files |
|
186 | 186 | dates Date Formats |
|
187 | 187 | diffs Diff Formats |
|
188 | 188 | environment Environment Variables |
|
189 | 189 | extensions Using Additional Features |
|
190 | 190 | filesets Specifying File Sets |
|
191 | 191 | glossary Glossary |
|
192 | 192 | hgignore Syntax for Mercurial Ignore Files |
|
193 | 193 | hgweb Configuring hgweb |
|
194 | 194 | internals Technical implementation topics |
|
195 | 195 | merge-tools Merge Tools |
|
196 | 196 | pager Pager Support |
|
197 | 197 | patterns File Name Patterns |
|
198 | 198 | phases Working with Phases |
|
199 | 199 | revisions Specifying Revisions |
|
200 | 200 | scripting Using Mercurial from scripts and automation |
|
201 | 201 | subrepos Subrepositories |
|
202 | 202 | templating Template Usage |
|
203 | 203 | urls URL Paths |
|
204 | 204 | |
|
205 | 205 | Test extension help: |
|
206 | 206 | $ hg help extensions --config extensions.rebase= --config extensions.children= |
|
207 | 207 | Using Additional Features |
|
208 | 208 | """"""""""""""""""""""""" |
|
209 | 209 | |
|
210 | 210 | Mercurial has the ability to add new features through the use of |
|
211 | 211 | extensions. Extensions may add new commands, add options to existing |
|
212 | 212 | commands, change the default behavior of commands, or implement hooks. |
|
213 | 213 | |
|
214 | 214 | To enable the "foo" extension, either shipped with Mercurial or in the |
|
215 | 215 | Python search path, create an entry for it in your configuration file, |
|
216 | 216 | like this: |
|
217 | 217 | |
|
218 | 218 | [extensions] |
|
219 | 219 | foo = |
|
220 | 220 | |
|
221 | 221 | You may also specify the full path to an extension: |
|
222 | 222 | |
|
223 | 223 | [extensions] |
|
224 | 224 | myfeature = ~/.hgext/myfeature.py |
|
225 | 225 | |
|
226 | 226 | See 'hg help config' for more information on configuration files. |
|
227 | 227 | |
|
228 | 228 | Extensions are not loaded by default for a variety of reasons: they can |
|
229 | 229 | increase startup overhead; they may be meant for advanced usage only; they |
|
230 | 230 | may provide potentially dangerous abilities (such as letting you destroy |
|
231 | 231 | or modify history); they might not be ready for prime time; or they may |
|
232 | 232 | alter some usual behaviors of stock Mercurial. It is thus up to the user |
|
233 | 233 | to activate extensions as needed. |
|
234 | 234 | |
|
235 | 235 | To explicitly disable an extension enabled in a configuration file of |
|
236 | 236 | broader scope, prepend its path with !: |
|
237 | 237 | |
|
238 | 238 | [extensions] |
|
239 | 239 | # disabling extension bar residing in /path/to/extension/bar.py |
|
240 | 240 | bar = !/path/to/extension/bar.py |
|
241 | 241 | # ditto, but no path was supplied for extension baz |
|
242 | 242 | baz = ! |
|
243 | 243 | |
|
244 | 244 | enabled extensions: |
|
245 | 245 | |
|
246 | 246 | children command to display child changesets (DEPRECATED) |
|
247 | 247 | rebase command to move sets of revisions to a different ancestor |
|
248 | 248 | |
|
249 | 249 | disabled extensions: |
|
250 | 250 | |
|
251 | 251 | acl hooks for controlling repository access |
|
252 | 252 | blackbox log repository events to a blackbox for debugging |
|
253 | 253 | bugzilla hooks for integrating with the Bugzilla bug tracker |
|
254 | 254 | censor erase file content at a given revision |
|
255 | 255 | churn command to display statistics about repository history |
|
256 | 256 | clonebundles advertise pre-generated bundles to seed clones |
|
257 | 257 | convert import revisions from foreign VCS repositories into |
|
258 | 258 | Mercurial |
|
259 | 259 | eol automatically manage newlines in repository files |
|
260 | 260 | extdiff command to allow external programs to compare revisions |
|
261 | 261 | factotum http authentication with factotum |
|
262 | 262 | gpg commands to sign and verify changesets |
|
263 | 263 | hgk browse the repository in a graphical way |
|
264 | 264 | highlight syntax highlighting for hgweb (requires Pygments) |
|
265 | 265 | histedit interactive history editing |
|
266 | 266 | keyword expand keywords in tracked files |
|
267 | 267 | largefiles track large binary files |
|
268 | 268 | mq manage a stack of patches |
|
269 | 269 | notify hooks for sending email push notifications |
|
270 | 270 | patchbomb command to send changesets as (a series of) patch emails |
|
271 | 271 | purge command to delete untracked files from the working |
|
272 | 272 | directory |
|
273 | 273 | relink recreates hardlinks between repository clones |
|
274 | 274 | schemes extend schemes with shortcuts to repository swarms |
|
275 | 275 | share share a common history between several working directories |
|
276 | 276 | shelve save and restore changes to the working directory |
|
277 | 277 | strip strip changesets and their descendants from history |
|
278 | 278 | transplant command to transplant changesets from another branch |
|
279 | 279 | win32mbcs allow the use of MBCS paths with problematic encodings |
|
280 | 280 | zeroconf discover and advertise repositories on the local network |
|
281 | 281 | |
|
282 | 282 | Verify that extension keywords appear in help templates |
|
283 | 283 | |
|
284 | 284 | $ hg help --config extensions.transplant= templating|grep transplant > /dev/null |
|
285 | 285 | |
|
286 | 286 | Test short command list with verbose option |
|
287 | 287 | |
|
288 | 288 | $ hg -v help shortlist |
|
289 | 289 | Mercurial Distributed SCM |
|
290 | 290 | |
|
291 | 291 | basic commands: |
|
292 | 292 | |
|
293 | 293 | add add the specified files on the next commit |
|
294 | 294 | annotate, blame |
|
295 | 295 | show changeset information by line for each file |
|
296 | 296 | clone make a copy of an existing repository |
|
297 | 297 | commit, ci commit the specified files or all outstanding changes |
|
298 | 298 | diff diff repository (or selected files) |
|
299 | 299 | export dump the header and diffs for one or more changesets |
|
300 | 300 | forget forget the specified files on the next commit |
|
301 | 301 | init create a new repository in the given directory |
|
302 | 302 | log, history show revision history of entire repository or files |
|
303 | 303 | merge merge another revision into working directory |
|
304 | 304 | pull pull changes from the specified source |
|
305 | 305 | push push changes to the specified destination |
|
306 | 306 | remove, rm remove the specified files on the next commit |
|
307 | 307 | serve start stand-alone webserver |
|
308 | 308 | status, st show changed files in the working directory |
|
309 | 309 | summary, sum summarize working directory state |
|
310 | 310 | update, up, checkout, co |
|
311 | 311 | update working directory (or switch revisions) |
|
312 | 312 | |
|
313 | 313 | global options ([+] can be repeated): |
|
314 | 314 | |
|
315 | 315 | -R --repository REPO repository root directory or name of overlay bundle |
|
316 | 316 | file |
|
317 | 317 | --cwd DIR change working directory |
|
318 | 318 | -y --noninteractive do not prompt, automatically pick the first choice for |
|
319 | 319 | all prompts |
|
320 | 320 | -q --quiet suppress output |
|
321 | 321 | -v --verbose enable additional output |
|
322 | 322 | --color TYPE when to colorize (boolean, always, auto, never, or |
|
323 | 323 | debug) |
|
324 | 324 | --config CONFIG [+] set/override config option (use 'section.name=value') |
|
325 | 325 | --debug enable debugging output |
|
326 | 326 | --debugger start debugger |
|
327 | 327 | --encoding ENCODE set the charset encoding (default: ascii) |
|
328 | 328 | --encodingmode MODE set the charset encoding mode (default: strict) |
|
329 | 329 | --traceback always print a traceback on exception |
|
330 | 330 | --time time how long the command takes |
|
331 | 331 | --profile print command execution profile |
|
332 | 332 | --version output version information and exit |
|
333 | 333 | -h --help display help and exit |
|
334 | 334 | --hidden consider hidden changesets |
|
335 | 335 | --pager TYPE when to paginate (boolean, always, auto, or never) |
|
336 | 336 | (default: auto) |
|
337 | 337 | |
|
338 | 338 | (use 'hg help' for the full list of commands) |
|
339 | 339 | |
|
340 | 340 | $ hg add -h |
|
341 | 341 | hg add [OPTION]... [FILE]... |
|
342 | 342 | |
|
343 | 343 | add the specified files on the next commit |
|
344 | 344 | |
|
345 | 345 | Schedule files to be version controlled and added to the repository. |
|
346 | 346 | |
|
347 | 347 | The files will be added to the repository at the next commit. To undo an |
|
348 | 348 | add before that, see 'hg forget'. |
|
349 | 349 | |
|
350 | 350 | If no names are given, add all files to the repository (except files |
|
351 | 351 | matching ".hgignore"). |
|
352 | 352 | |
|
353 | 353 | Returns 0 if all files are successfully added. |
|
354 | 354 | |
|
355 | 355 | options ([+] can be repeated): |
|
356 | 356 | |
|
357 | 357 | -I --include PATTERN [+] include names matching the given patterns |
|
358 | 358 | -X --exclude PATTERN [+] exclude names matching the given patterns |
|
359 | 359 | -S --subrepos recurse into subrepositories |
|
360 | 360 | -n --dry-run do not perform actions, just print output |
|
361 | 361 | |
|
362 | 362 | (some details hidden, use --verbose to show complete help) |
|
363 | 363 | |
|
364 | 364 | Verbose help for add |
|
365 | 365 | |
|
366 | 366 | $ hg add -hv |
|
367 | 367 | hg add [OPTION]... [FILE]... |
|
368 | 368 | |
|
369 | 369 | add the specified files on the next commit |
|
370 | 370 | |
|
371 | 371 | Schedule files to be version controlled and added to the repository. |
|
372 | 372 | |
|
373 | 373 | The files will be added to the repository at the next commit. To undo an |
|
374 | 374 | add before that, see 'hg forget'. |
|
375 | 375 | |
|
376 | 376 | If no names are given, add all files to the repository (except files |
|
377 | 377 | matching ".hgignore"). |
|
378 | 378 | |
|
379 | 379 | Examples: |
|
380 | 380 | |
|
381 | 381 | - New (unknown) files are added automatically by 'hg add': |
|
382 | 382 | |
|
383 | 383 | $ ls |
|
384 | 384 | foo.c |
|
385 | 385 | $ hg status |
|
386 | 386 | ? foo.c |
|
387 | 387 | $ hg add |
|
388 | 388 | adding foo.c |
|
389 | 389 | $ hg status |
|
390 | 390 | A foo.c |
|
391 | 391 | |
|
392 | 392 | - Specific files to be added can be specified: |
|
393 | 393 | |
|
394 | 394 | $ ls |
|
395 | 395 | bar.c foo.c |
|
396 | 396 | $ hg status |
|
397 | 397 | ? bar.c |
|
398 | 398 | ? foo.c |
|
399 | 399 | $ hg add bar.c |
|
400 | 400 | $ hg status |
|
401 | 401 | A bar.c |
|
402 | 402 | ? foo.c |
|
403 | 403 | |
|
404 | 404 | Returns 0 if all files are successfully added. |
|
405 | 405 | |
|
406 | 406 | options ([+] can be repeated): |
|
407 | 407 | |
|
408 | 408 | -I --include PATTERN [+] include names matching the given patterns |
|
409 | 409 | -X --exclude PATTERN [+] exclude names matching the given patterns |
|
410 | 410 | -S --subrepos recurse into subrepositories |
|
411 | 411 | -n --dry-run do not perform actions, just print output |
|
412 | 412 | |
|
413 | 413 | global options ([+] can be repeated): |
|
414 | 414 | |
|
415 | 415 | -R --repository REPO repository root directory or name of overlay bundle |
|
416 | 416 | file |
|
417 | 417 | --cwd DIR change working directory |
|
418 | 418 | -y --noninteractive do not prompt, automatically pick the first choice for |
|
419 | 419 | all prompts |
|
420 | 420 | -q --quiet suppress output |
|
421 | 421 | -v --verbose enable additional output |
|
422 | 422 | --color TYPE when to colorize (boolean, always, auto, never, or |
|
423 | 423 | debug) |
|
424 | 424 | --config CONFIG [+] set/override config option (use 'section.name=value') |
|
425 | 425 | --debug enable debugging output |
|
426 | 426 | --debugger start debugger |
|
427 | 427 | --encoding ENCODE set the charset encoding (default: ascii) |
|
428 | 428 | --encodingmode MODE set the charset encoding mode (default: strict) |
|
429 | 429 | --traceback always print a traceback on exception |
|
430 | 430 | --time time how long the command takes |
|
431 | 431 | --profile print command execution profile |
|
432 | 432 | --version output version information and exit |
|
433 | 433 | -h --help display help and exit |
|
434 | 434 | --hidden consider hidden changesets |
|
435 | 435 | --pager TYPE when to paginate (boolean, always, auto, or never) |
|
436 | 436 | (default: auto) |
|
437 | 437 | |
|
438 | 438 | Test the textwidth config option |
|
439 | 439 | |
|
440 | 440 | $ hg root -h --config ui.textwidth=50 |
|
441 | 441 | hg root |
|
442 | 442 | |
|
443 | 443 | print the root (top) of the current working |
|
444 | 444 | directory |
|
445 | 445 | |
|
446 | 446 | Print the root directory of the current |
|
447 | 447 | repository. |
|
448 | 448 | |
|
449 | 449 | Returns 0 on success. |
|
450 | 450 | |
|
451 | 451 | (some details hidden, use --verbose to show |
|
452 | 452 | complete help) |
|
453 | 453 | |
|
454 | 454 | Test help option with version option |
|
455 | 455 | |
|
456 | 456 | $ hg add -h --version |
|
457 | 457 | Mercurial Distributed SCM (version *) (glob) |
|
458 | 458 | (see https://mercurial-scm.org for more information) |
|
459 | 459 | |
|
460 | 460 | Copyright (C) 2005-* Matt Mackall and others (glob) |
|
461 | 461 | This is free software; see the source for copying conditions. There is NO |
|
462 | 462 | warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
|
463 | 463 | |
|
464 | 464 | $ hg add --skjdfks |
|
465 | 465 | hg add: option --skjdfks not recognized |
|
466 | 466 | hg add [OPTION]... [FILE]... |
|
467 | 467 | |
|
468 | 468 | add the specified files on the next commit |
|
469 | 469 | |
|
470 | 470 | options ([+] can be repeated): |
|
471 | 471 | |
|
472 | 472 | -I --include PATTERN [+] include names matching the given patterns |
|
473 | 473 | -X --exclude PATTERN [+] exclude names matching the given patterns |
|
474 | 474 | -S --subrepos recurse into subrepositories |
|
475 | 475 | -n --dry-run do not perform actions, just print output |
|
476 | 476 | |
|
477 | 477 | (use 'hg add -h' to show more help) |
|
478 | 478 | [255] |
|
479 | 479 | |
|
480 | 480 | Test ambiguous command help |
|
481 | 481 | |
|
482 | 482 | $ hg help ad |
|
483 | 483 | list of commands: |
|
484 | 484 | |
|
485 | 485 | add add the specified files on the next commit |
|
486 | 486 | addremove add all new files, delete all missing files |
|
487 | 487 | |
|
488 | 488 | (use 'hg help -v ad' to show built-in aliases and global options) |
|
489 | 489 | |
|
490 | 490 | Test command without options |
|
491 | 491 | |
|
492 | 492 | $ hg help verify |
|
493 | 493 | hg verify |
|
494 | 494 | |
|
495 | 495 | verify the integrity of the repository |
|
496 | 496 | |
|
497 | 497 | Verify the integrity of the current repository. |
|
498 | 498 | |
|
499 | 499 | This will perform an extensive check of the repository's integrity, |
|
500 | 500 | validating the hashes and checksums of each entry in the changelog, |
|
501 | 501 | manifest, and tracked files, as well as the integrity of their crosslinks |
|
502 | 502 | and indices. |
|
503 | 503 | |
|
504 | 504 | Please see https://mercurial-scm.org/wiki/RepositoryCorruption for more |
|
505 | 505 | information about recovery from corruption of the repository. |
|
506 | 506 | |
|
507 | 507 | Returns 0 on success, 1 if errors are encountered. |
|
508 | 508 | |
|
509 | 509 | (some details hidden, use --verbose to show complete help) |
|
510 | 510 | |
|
511 | 511 | $ hg help diff |
|
512 | 512 | hg diff [OPTION]... ([-c REV] | [-r REV1 [-r REV2]]) [FILE]... |
|
513 | 513 | |
|
514 | 514 | diff repository (or selected files) |
|
515 | 515 | |
|
516 | 516 | Show differences between revisions for the specified files. |
|
517 | 517 | |
|
518 | 518 | Differences between files are shown using the unified diff format. |
|
519 | 519 | |
|
520 | 520 | Note: |
|
521 | 521 | 'hg diff' may generate unexpected results for merges, as it will |
|
522 | 522 | default to comparing against the working directory's first parent |
|
523 | 523 | changeset if no revisions are specified. |
|
524 | 524 | |
|
525 | 525 | When two revision arguments are given, then changes are shown between |
|
526 | 526 | those revisions. If only one revision is specified then that revision is |
|
527 | 527 | compared to the working directory, and, when no revisions are specified, |
|
528 | 528 | the working directory files are compared to its first parent. |
|
529 | 529 | |
|
530 | 530 | Alternatively you can specify -c/--change with a revision to see the |
|
531 | 531 | changes in that changeset relative to its first parent. |
|
532 | 532 | |
|
533 | 533 | Without the -a/--text option, diff will avoid generating diffs of files it |
|
534 | 534 | detects as binary. With -a, diff will generate a diff anyway, probably |
|
535 | 535 | with undesirable results. |
|
536 | 536 | |
|
537 | 537 | Use the -g/--git option to generate diffs in the git extended diff format. |
|
538 | 538 | For more information, read 'hg help diffs'. |
|
539 | 539 | |
|
540 | 540 | Returns 0 on success. |
|
541 | 541 | |
|
542 | 542 | options ([+] can be repeated): |
|
543 | 543 | |
|
544 | 544 | -r --rev REV [+] revision |
|
545 | 545 | -c --change REV change made by revision |
|
546 | 546 | -a --text treat all files as text |
|
547 | 547 | -g --git use git extended diff format |
|
548 | 548 | --binary generate binary diffs in git mode (default) |
|
549 | 549 | --nodates omit dates from diff headers |
|
550 | 550 | --noprefix omit a/ and b/ prefixes from filenames |
|
551 | 551 | -p --show-function show which function each change is in |
|
552 | 552 | --reverse produce a diff that undoes the changes |
|
553 | 553 | -w --ignore-all-space ignore white space when comparing lines |
|
554 | 554 | -b --ignore-space-change ignore changes in the amount of white space |
|
555 | 555 | -B --ignore-blank-lines ignore changes whose lines are all blank |
|
556 | 556 | -U --unified NUM number of lines of context to show |
|
557 | 557 | --stat output diffstat-style summary of changes |
|
558 | 558 | --root DIR produce diffs relative to subdirectory |
|
559 | 559 | -I --include PATTERN [+] include names matching the given patterns |
|
560 | 560 | -X --exclude PATTERN [+] exclude names matching the given patterns |
|
561 | 561 | -S --subrepos recurse into subrepositories |
|
562 | 562 | |
|
563 | 563 | (some details hidden, use --verbose to show complete help) |
|
564 | 564 | |
|
565 | 565 | $ hg help status |
|
566 | 566 | hg status [OPTION]... [FILE]... |
|
567 | 567 | |
|
568 | 568 | aliases: st |
|
569 | 569 | |
|
570 | 570 | show changed files in the working directory |
|
571 | 571 | |
|
572 | 572 | Show status of files in the repository. If names are given, only files |
|
573 | 573 | that match are shown. Files that are clean or ignored or the source of a |
|
574 | 574 | copy/move operation, are not listed unless -c/--clean, -i/--ignored, |
|
575 | 575 | -C/--copies or -A/--all are given. Unless options described with "show |
|
576 | 576 | only ..." are given, the options -mardu are used. |
|
577 | 577 | |
|
578 | 578 | Option -q/--quiet hides untracked (unknown and ignored) files unless |
|
579 | 579 | explicitly requested with -u/--unknown or -i/--ignored. |
|
580 | 580 | |
|
581 | 581 | Note: |
|
582 | 582 | 'hg status' may appear to disagree with diff if permissions have |
|
583 | 583 | changed or a merge has occurred. The standard diff format does not |
|
584 | 584 | report permission changes and diff only reports changes relative to one |
|
585 | 585 | merge parent. |
|
586 | 586 | |
|
587 | 587 | If one revision is given, it is used as the base revision. If two |
|
588 | 588 | revisions are given, the differences between them are shown. The --change |
|
589 | 589 | option can also be used as a shortcut to list the changed files of a |
|
590 | 590 | revision from its first parent. |
|
591 | 591 | |
|
592 | 592 | The codes used to show the status of files are: |
|
593 | 593 | |
|
594 | 594 | M = modified |
|
595 | 595 | A = added |
|
596 | 596 | R = removed |
|
597 | 597 | C = clean |
|
598 | 598 | ! = missing (deleted by non-hg command, but still tracked) |
|
599 | 599 | ? = not tracked |
|
600 | 600 | I = ignored |
|
601 | 601 | = origin of the previous file (with --copies) |
|
602 | 602 | |
|
603 | 603 | Returns 0 on success. |
|
604 | 604 | |
|
605 | 605 | options ([+] can be repeated): |
|
606 | 606 | |
|
607 | 607 | -A --all show status of all files |
|
608 | 608 | -m --modified show only modified files |
|
609 | 609 | -a --added show only added files |
|
610 | 610 | -r --removed show only removed files |
|
611 | 611 | -d --deleted show only deleted (but tracked) files |
|
612 | 612 | -c --clean show only files without changes |
|
613 | 613 | -u --unknown show only unknown (not tracked) files |
|
614 | 614 | -i --ignored show only ignored files |
|
615 | 615 | -n --no-status hide status prefix |
|
616 | 616 | -C --copies show source of copied files |
|
617 | 617 | -0 --print0 end filenames with NUL, for use with xargs |
|
618 | 618 | --rev REV [+] show difference from revision |
|
619 | 619 | --change REV list the changed files of a revision |
|
620 | 620 | -I --include PATTERN [+] include names matching the given patterns |
|
621 | 621 | -X --exclude PATTERN [+] exclude names matching the given patterns |
|
622 | 622 | -S --subrepos recurse into subrepositories |
|
623 | 623 | |
|
624 | 624 | (some details hidden, use --verbose to show complete help) |
|
625 | 625 | |
|
626 | 626 | $ hg -q help status |
|
627 | 627 | hg status [OPTION]... [FILE]... |
|
628 | 628 | |
|
629 | 629 | show changed files in the working directory |
|
630 | 630 | |
|
631 | 631 | $ hg help foo |
|
632 | 632 | abort: no such help topic: foo |
|
633 | 633 | (try 'hg help --keyword foo') |
|
634 | 634 | [255] |
|
635 | 635 | |
|
636 | 636 | $ hg skjdfks |
|
637 | 637 | hg: unknown command 'skjdfks' |
|
638 | 638 | Mercurial Distributed SCM |
|
639 | 639 | |
|
640 | 640 | basic commands: |
|
641 | 641 | |
|
642 | 642 | add add the specified files on the next commit |
|
643 | 643 | annotate show changeset information by line for each file |
|
644 | 644 | clone make a copy of an existing repository |
|
645 | 645 | commit commit the specified files or all outstanding changes |
|
646 | 646 | diff diff repository (or selected files) |
|
647 | 647 | export dump the header and diffs for one or more changesets |
|
648 | 648 | forget forget the specified files on the next commit |
|
649 | 649 | init create a new repository in the given directory |
|
650 | 650 | log show revision history of entire repository or files |
|
651 | 651 | merge merge another revision into working directory |
|
652 | 652 | pull pull changes from the specified source |
|
653 | 653 | push push changes to the specified destination |
|
654 | 654 | remove remove the specified files on the next commit |
|
655 | 655 | serve start stand-alone webserver |
|
656 | 656 | status show changed files in the working directory |
|
657 | 657 | summary summarize working directory state |
|
658 | 658 | update update working directory (or switch revisions) |
|
659 | 659 | |
|
660 | 660 | (use 'hg help' for the full list of commands or 'hg -v' for details) |
|
661 | 661 | [255] |
|
662 | 662 | |
|
663 | 663 | |
|
664 | 664 | Make sure that we don't run afoul of the help system thinking that |
|
665 | 665 | this is a section and erroring out weirdly. |
|
666 | 666 | |
|
667 | 667 | $ hg .log |
|
668 | 668 | hg: unknown command '.log' |
|
669 | 669 | (did you mean log?) |
|
670 | 670 | [255] |
|
671 | 671 | |
|
672 | 672 | $ hg log. |
|
673 | 673 | hg: unknown command 'log.' |
|
674 | 674 | (did you mean log?) |
|
675 | 675 | [255] |
|
676 | 676 | $ hg pu.lh |
|
677 | 677 | hg: unknown command 'pu.lh' |
|
678 | 678 | (did you mean one of pull, push?) |
|
679 | 679 | [255] |
|
680 | 680 | |
|
681 | 681 | $ cat > helpext.py <<EOF |
|
682 | 682 | > import os |
|
683 | 683 | > from mercurial import cmdutil, commands |
|
684 | 684 | > |
|
685 | 685 | > cmdtable = {} |
|
686 | 686 | > command = cmdutil.command(cmdtable) |
|
687 | 687 | > |
|
688 | 688 | > @command('nohelp', |
|
689 | 689 | > [('', 'longdesc', 3, 'x'*90), |
|
690 | 690 | > ('n', '', None, 'normal desc'), |
|
691 | 691 | > ('', 'newline', '', 'line1\nline2')], |
|
692 | 692 | > 'hg nohelp', |
|
693 | 693 | > norepo=True) |
|
694 | 694 | > @command('debugoptADV', [('', 'aopt', None, 'option is (ADVANCED)')]) |
|
695 | 695 | > @command('debugoptDEP', [('', 'dopt', None, 'option is (DEPRECATED)')]) |
|
696 | 696 | > @command('debugoptEXP', [('', 'eopt', None, 'option is (EXPERIMENTAL)')]) |
|
697 | 697 | > def nohelp(ui, *args, **kwargs): |
|
698 | 698 | > pass |
|
699 | 699 | > |
|
700 | 700 | > def uisetup(ui): |
|
701 | 701 | > ui.setconfig('alias', 'shellalias', '!echo hi', 'helpext') |
|
702 | 702 | > ui.setconfig('alias', 'hgalias', 'summary', 'helpext') |
|
703 | 703 | > |
|
704 | 704 | > EOF |
|
705 | 705 | $ echo '[extensions]' >> $HGRCPATH |
|
706 | 706 | $ echo "helpext = `pwd`/helpext.py" >> $HGRCPATH |
|
707 | 707 | |
|
708 | 708 | Test for aliases |
|
709 | 709 | |
|
710 | 710 | $ hg help hgalias |
|
711 | 711 | hg hgalias [--remote] |
|
712 | 712 | |
|
713 | 713 | alias for: hg summary |
|
714 | 714 | |
|
715 | 715 | summarize working directory state |
|
716 | 716 | |
|
717 | 717 | This generates a brief summary of the working directory state, including |
|
718 | 718 | parents, branch, commit status, phase and available updates. |
|
719 | 719 | |
|
720 | 720 | With the --remote option, this will check the default paths for incoming |
|
721 | 721 | and outgoing changes. This can be time-consuming. |
|
722 | 722 | |
|
723 | 723 | Returns 0 on success. |
|
724 | 724 | |
|
725 | 725 | defined by: helpext |
|
726 | 726 | |
|
727 | 727 | options: |
|
728 | 728 | |
|
729 | 729 | --remote check for push and pull |
|
730 | 730 | |
|
731 | 731 | (some details hidden, use --verbose to show complete help) |
|
732 | 732 | |
|
733 | 733 | $ hg help shellalias |
|
734 | 734 | hg shellalias |
|
735 | 735 | |
|
736 | 736 | shell alias for: |
|
737 | 737 | |
|
738 | 738 | echo hi |
|
739 | 739 | |
|
740 | 740 | defined by: helpext |
|
741 | 741 | |
|
742 | 742 | (some details hidden, use --verbose to show complete help) |
|
743 | 743 | |
|
744 | 744 | Test command with no help text |
|
745 | 745 | |
|
746 | 746 | $ hg help nohelp |
|
747 | 747 | hg nohelp |
|
748 | 748 | |
|
749 | 749 | (no help text available) |
|
750 | 750 | |
|
751 | 751 | options: |
|
752 | 752 | |
|
753 | 753 | --longdesc VALUE xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx |
|
754 | 754 | xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx (default: 3) |
|
755 | 755 | -n -- normal desc |
|
756 | 756 | --newline VALUE line1 line2 |
|
757 | 757 | |
|
758 | 758 | (some details hidden, use --verbose to show complete help) |
|
759 | 759 | |
|
760 | 760 | $ hg help -k nohelp |
|
761 | 761 | Commands: |
|
762 | 762 | |
|
763 | 763 | nohelp hg nohelp |
|
764 | 764 | |
|
765 | 765 | Extension Commands: |
|
766 | 766 | |
|
767 | 767 | nohelp (no help text available) |
|
768 | 768 | |
|
769 | 769 | Test that default list of commands omits extension commands |
|
770 | 770 | |
|
771 | 771 | $ hg help |
|
772 | 772 | Mercurial Distributed SCM |
|
773 | 773 | |
|
774 | 774 | list of commands: |
|
775 | 775 | |
|
776 | 776 | add add the specified files on the next commit |
|
777 | 777 | addremove add all new files, delete all missing files |
|
778 | 778 | annotate show changeset information by line for each file |
|
779 | 779 | archive create an unversioned archive of a repository revision |
|
780 | 780 | backout reverse effect of earlier changeset |
|
781 | 781 | bisect subdivision search of changesets |
|
782 | 782 | bookmarks create a new bookmark or list existing bookmarks |
|
783 | 783 | branch set or show the current branch name |
|
784 | 784 | branches list repository named branches |
|
785 | 785 | bundle create a bundle file |
|
786 | 786 | cat output the current or given revision of files |
|
787 | 787 | clone make a copy of an existing repository |
|
788 | 788 | commit commit the specified files or all outstanding changes |
|
789 | 789 | config show combined config settings from all hgrc files |
|
790 | 790 | copy mark files as copied for the next commit |
|
791 | 791 | diff diff repository (or selected files) |
|
792 | 792 | export dump the header and diffs for one or more changesets |
|
793 | 793 | files list tracked files |
|
794 | 794 | forget forget the specified files on the next commit |
|
795 | 795 | graft copy changes from other branches onto the current branch |
|
796 | 796 | grep search revision history for a pattern in specified files |
|
797 | 797 | heads show branch heads |
|
798 | 798 | help show help for a given topic or a help overview |
|
799 | 799 | identify identify the working directory or specified revision |
|
800 | 800 | import import an ordered set of patches |
|
801 | 801 | incoming show new changesets found in source |
|
802 | 802 | init create a new repository in the given directory |
|
803 | 803 | log show revision history of entire repository or files |
|
804 | 804 | manifest output the current or given revision of the project manifest |
|
805 | 805 | merge merge another revision into working directory |
|
806 | 806 | outgoing show changesets not found in the destination |
|
807 | 807 | paths show aliases for remote repositories |
|
808 | 808 | phase set or show the current phase name |
|
809 | 809 | pull pull changes from the specified source |
|
810 | 810 | push push changes to the specified destination |
|
811 | 811 | recover roll back an interrupted transaction |
|
812 | 812 | remove remove the specified files on the next commit |
|
813 | 813 | rename rename files; equivalent of copy + remove |
|
814 | 814 | resolve redo merges or set/view the merge status of files |
|
815 | 815 | revert restore files to their checkout state |
|
816 | 816 | root print the root (top) of the current working directory |
|
817 | 817 | serve start stand-alone webserver |
|
818 | 818 | status show changed files in the working directory |
|
819 | 819 | summary summarize working directory state |
|
820 | 820 | tag add one or more tags for the current or given revision |
|
821 | 821 | tags list repository tags |
|
822 | 822 | unbundle apply one or more bundle files |
|
823 | 823 | update update working directory (or switch revisions) |
|
824 | 824 | verify verify the integrity of the repository |
|
825 | 825 | version output version and copyright information |
|
826 | 826 | |
|
827 | 827 | enabled extensions: |
|
828 | 828 | |
|
829 | 829 | helpext (no help text available) |
|
830 | 830 | |
|
831 | 831 | additional help topics: |
|
832 | 832 | |
|
833 | 833 | bundlespec Bundle File Formats |
|
834 | 834 | color Colorizing Outputs |
|
835 | 835 | config Configuration Files |
|
836 | 836 | dates Date Formats |
|
837 | 837 | diffs Diff Formats |
|
838 | 838 | environment Environment Variables |
|
839 | 839 | extensions Using Additional Features |
|
840 | 840 | filesets Specifying File Sets |
|
841 | 841 | glossary Glossary |
|
842 | 842 | hgignore Syntax for Mercurial Ignore Files |
|
843 | 843 | hgweb Configuring hgweb |
|
844 | 844 | internals Technical implementation topics |
|
845 | 845 | merge-tools Merge Tools |
|
846 | 846 | pager Pager Support |
|
847 | 847 | patterns File Name Patterns |
|
848 | 848 | phases Working with Phases |
|
849 | 849 | revisions Specifying Revisions |
|
850 | 850 | scripting Using Mercurial from scripts and automation |
|
851 | 851 | subrepos Subrepositories |
|
852 | 852 | templating Template Usage |
|
853 | 853 | urls URL Paths |
|
854 | 854 | |
|
855 | 855 | (use 'hg help -v' to show built-in aliases and global options) |
|
856 | 856 | |
|
857 | 857 | |
|
858 | 858 | Test list of internal help commands |
|
859 | 859 | |
|
860 | 860 | $ hg help debug |
|
861 | 861 | debug commands (internal and unsupported): |
|
862 | 862 | |
|
863 | 863 | debugancestor |
|
864 | 864 | find the ancestor revision of two revisions in a given index |
|
865 | 865 | debugapplystreamclonebundle |
|
866 | 866 | apply a stream clone bundle file |
|
867 | 867 | debugbuilddag |
|
868 | 868 | builds a repo with a given DAG from scratch in the current |
|
869 | 869 | empty repo |
|
870 | 870 | debugbundle lists the contents of a bundle |
|
871 | 871 | debugcheckstate |
|
872 | 872 | validate the correctness of the current dirstate |
|
873 | 873 | debugcolor show available color, effects or style |
|
874 | 874 | debugcommands |
|
875 | 875 | list all available commands and options |
|
876 | 876 | debugcomplete |
|
877 | 877 | returns the completion list associated with the given command |
|
878 | 878 | debugcreatestreamclonebundle |
|
879 | 879 | create a stream clone bundle file |
|
880 | 880 | debugdag format the changelog or an index DAG as a concise textual |
|
881 | 881 | description |
|
882 | 882 | debugdata dump the contents of a data file revision |
|
883 | 883 | debugdate parse and display a date |
|
884 | 884 | debugdeltachain |
|
885 | 885 | dump information about delta chains in a revlog |
|
886 | 886 | debugdirstate |
|
887 | 887 | show the contents of the current dirstate |
|
888 | 888 | debugdiscovery |
|
889 | 889 | runs the changeset discovery protocol in isolation |
|
890 | 890 | debugextensions |
|
891 | 891 | show information about active extensions |
|
892 | 892 | debugfileset parse and apply a fileset specification |
|
893 | 893 | debugfsinfo show information detected about current filesystem |
|
894 | 894 | debuggetbundle |
|
895 | 895 | retrieves a bundle from a repo |
|
896 | 896 | debugignore display the combined ignore pattern and information about |
|
897 | 897 | ignored files |
|
898 | 898 | debugindex dump the contents of an index file |
|
899 | 899 | debugindexdot |
|
900 | 900 | dump an index DAG as a graphviz dot file |
|
901 | 901 | debuginstall test Mercurial installation |
|
902 | 902 | debugknown test whether node ids are known to a repo |
|
903 | 903 | debuglocks show or modify state of locks |
|
904 | 904 | debugmergestate |
|
905 | 905 | print merge state |
|
906 | 906 | debugnamecomplete |
|
907 | 907 | complete "names" - tags, open branch names, bookmark names |
|
908 | 908 | debugobsolete |
|
909 | 909 | create arbitrary obsolete marker |
|
910 | 910 | debugoptADV (no help text available) |
|
911 | 911 | debugoptDEP (no help text available) |
|
912 | 912 | debugoptEXP (no help text available) |
|
913 | 913 | debugpathcomplete |
|
914 | 914 | complete part or all of a tracked path |
|
915 | 915 | debugpushkey access the pushkey key/value protocol |
|
916 | 916 | debugpvec (no help text available) |
|
917 | 917 | debugrebuilddirstate |
|
918 | 918 | rebuild the dirstate as it would look like for the given |
|
919 | 919 | revision |
|
920 | 920 | debugrebuildfncache |
|
921 | 921 | rebuild the fncache file |
|
922 | 922 | debugrename dump rename information |
|
923 | 923 | debugrevlog show data and statistics about a revlog |
|
924 | 924 | debugrevspec parse and apply a revision specification |
|
925 | 925 | debugsetparents |
|
926 | 926 | manually set the parents of the current working directory |
|
927 | 927 | debugsub (no help text available) |
|
928 | 928 | debugsuccessorssets |
|
929 | 929 | show set of successors for revision |
|
930 | 930 | debugtemplate |
|
931 | 931 | parse and apply a template |
|
932 | 932 | debugupgraderepo |
|
933 | 933 | upgrade a repository to use different features |
|
934 | 934 | debugwalk show how files match on given patterns |
|
935 | 935 | debugwireargs |
|
936 | 936 | (no help text available) |
|
937 | 937 | |
|
938 | 938 | (use 'hg help -v debug' to show built-in aliases and global options) |
|
939 | 939 | |
|
940 | 940 | internals topic renders index of available sub-topics |
|
941 | 941 | |
|
942 | 942 | $ hg help internals |
|
943 | 943 | Technical implementation topics |
|
944 | 944 | """"""""""""""""""""""""""""""" |
|
945 | 945 | |
|
946 | 946 | To access a subtopic, use "hg help internals.{subtopic-name}" |
|
947 | 947 | |
|
948 | 948 | bundles Bundles |
|
949 | 949 | censor Censor |
|
950 | 950 | changegroups Changegroups |
|
951 | 951 | requirements Repository Requirements |
|
952 | 952 | revlogs Revision Logs |
|
953 | 953 | wireprotocol Wire Protocol |
|
954 | 954 | |
|
955 | 955 | sub-topics can be accessed |
|
956 | 956 | |
|
957 | 957 | $ hg help internals.changegroups |
|
958 | 958 | Changegroups |
|
959 | 959 | """""""""""" |
|
960 | 960 | |
|
961 | 961 | Changegroups are representations of repository revlog data, specifically |
|
962 | 962 | the changelog data, root/flat manifest data, treemanifest data, and |
|
963 | 963 | filelogs. |
|
964 | 964 | |
|
965 | 965 | There are 3 versions of changegroups: "1", "2", and "3". From a high- |
|
966 | 966 | level, versions "1" and "2" are almost exactly the same, with the only |
|
967 | 967 | difference being an additional item in the *delta header*. Version "3" |
|
968 | 968 | adds support for revlog flags in the *delta header* and optionally |
|
969 | 969 | exchanging treemanifests (enabled by setting an option on the |
|
970 | 970 | "changegroup" part in the bundle2). |
|
971 | 971 | |
|
972 | 972 | Changegroups when not exchanging treemanifests consist of 3 logical |
|
973 | 973 | segments: |
|
974 | 974 | |
|
975 | 975 | +---------------------------------+ |
|
976 | 976 | | | | | |
|
977 | 977 | | changeset | manifest | filelogs | |
|
978 | 978 | | | | | |
|
979 | 979 | | | | | |
|
980 | 980 | +---------------------------------+ |
|
981 | 981 | |
|
982 | 982 | When exchanging treemanifests, there are 4 logical segments: |
|
983 | 983 | |
|
984 | 984 | +-------------------------------------------------+ |
|
985 | 985 | | | | | | |
|
986 | 986 | | changeset | root | treemanifests | filelogs | |
|
987 | 987 | | | manifest | | | |
|
988 | 988 | | | | | | |
|
989 | 989 | +-------------------------------------------------+ |
|
990 | 990 | |
|
991 | 991 | The principle building block of each segment is a *chunk*. A *chunk* is a |
|
992 | 992 | framed piece of data: |
|
993 | 993 | |
|
994 | 994 | +---------------------------------------+ |
|
995 | 995 | | | | |
|
996 | 996 | | length | data | |
|
997 | 997 | | (4 bytes) | (<length - 4> bytes) | |
|
998 | 998 | | | | |
|
999 | 999 | +---------------------------------------+ |
|
1000 | 1000 | |
|
1001 | 1001 | All integers are big-endian signed integers. Each chunk starts with a |
|
1002 | 1002 | 32-bit integer indicating the length of the entire chunk (including the |
|
1003 | 1003 | length field itself). |
|
1004 | 1004 | |
|
1005 | 1005 | There is a special case chunk that has a value of 0 for the length |
|
1006 | 1006 | ("0x00000000"). We call this an *empty chunk*. |
|
1007 | 1007 | |
|
1008 | 1008 | Delta Groups |
|
1009 | 1009 | ============ |
|
1010 | 1010 | |
|
1011 | 1011 | A *delta group* expresses the content of a revlog as a series of deltas, |
|
1012 | 1012 | or patches against previous revisions. |
|
1013 | 1013 | |
|
1014 | 1014 | Delta groups consist of 0 or more *chunks* followed by the *empty chunk* |
|
1015 | 1015 | to signal the end of the delta group: |
|
1016 | 1016 | |
|
1017 | 1017 | +------------------------------------------------------------------------+ |
|
1018 | 1018 | | | | | | | |
|
1019 | 1019 | | chunk0 length | chunk0 data | chunk1 length | chunk1 data | 0x0 | |
|
1020 | 1020 | | (4 bytes) | (various) | (4 bytes) | (various) | (4 bytes) | |
|
1021 | 1021 | | | | | | | |
|
1022 | 1022 | +------------------------------------------------------------------------+ |
|
1023 | 1023 | |
|
1024 | 1024 | Each *chunk*'s data consists of the following: |
|
1025 | 1025 | |
|
1026 | 1026 | +---------------------------------------+ |
|
1027 | 1027 | | | | |
|
1028 | 1028 | | delta header | delta data | |
|
1029 | 1029 | | (various by version) | (various) | |
|
1030 | 1030 | | | | |
|
1031 | 1031 | +---------------------------------------+ |
|
1032 | 1032 | |
|
1033 | 1033 | The *delta data* is a series of *delta*s that describe a diff from an |
|
1034 | 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 | 1037 | The *delta header* is different between versions "1", "2", and "3" of the |
|
1038 | 1038 | changegroup format. |
|
1039 | 1039 | |
|
1040 | 1040 | Version 1 (headerlen=80): |
|
1041 | 1041 | |
|
1042 | 1042 | +------------------------------------------------------+ |
|
1043 | 1043 | | | | | | |
|
1044 | 1044 | | node | p1 node | p2 node | link node | |
|
1045 | 1045 | | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) | |
|
1046 | 1046 | | | | | | |
|
1047 | 1047 | +------------------------------------------------------+ |
|
1048 | 1048 | |
|
1049 | 1049 | Version 2 (headerlen=100): |
|
1050 | 1050 | |
|
1051 | 1051 | +------------------------------------------------------------------+ |
|
1052 | 1052 | | | | | | | |
|
1053 | 1053 | | node | p1 node | p2 node | base node | link node | |
|
1054 | 1054 | | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) | |
|
1055 | 1055 | | | | | | | |
|
1056 | 1056 | +------------------------------------------------------------------+ |
|
1057 | 1057 | |
|
1058 | 1058 | Version 3 (headerlen=102): |
|
1059 | 1059 | |
|
1060 | 1060 | +------------------------------------------------------------------------------+ |
|
1061 | 1061 | | | | | | | | |
|
1062 | 1062 | | node | p1 node | p2 node | base node | link node | flags | |
|
1063 | 1063 | | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) | (2 bytes) | |
|
1064 | 1064 | | | | | | | | |
|
1065 | 1065 | +------------------------------------------------------------------------------+ |
|
1066 | 1066 | |
|
1067 | 1067 | The *delta data* consists of "chunklen - 4 - headerlen" bytes, which |
|
1068 | 1068 | contain a series of *delta*s, densely packed (no separators). These deltas |
|
1069 | 1069 | describe a diff from an existing entry (either that the recipient already |
|
1070 | 1070 | has, or previously specified in the bundle/changegroup). The format is |
|
1071 | 1071 | described more fully in "hg help internals.bdiff", but briefly: |
|
1072 | 1072 | |
|
1073 | 1073 | +---------------------------------------------------------------+ |
|
1074 | 1074 | | | | | | |
|
1075 | 1075 | | start offset | end offset | new length | content | |
|
1076 | 1076 | | (4 bytes) | (4 bytes) | (4 bytes) | (<new length> bytes) | |
|
1077 | 1077 | | | | | | |
|
1078 | 1078 | +---------------------------------------------------------------+ |
|
1079 | 1079 | |
|
1080 | 1080 | Please note that the length field in the delta data does *not* include |
|
1081 | 1081 | itself. |
|
1082 | 1082 | |
|
1083 | 1083 | In version 1, the delta is always applied against the previous node from |
|
1084 | 1084 | the changegroup or the first parent if this is the first entry in the |
|
1085 | 1085 | changegroup. |
|
1086 | 1086 | |
|
1087 | 1087 | In version 2 and up, the delta base node is encoded in the entry in the |
|
1088 | 1088 | changegroup. This allows the delta to be expressed against any parent, |
|
1089 | 1089 | which can result in smaller deltas and more efficient encoding of data. |
|
1090 | 1090 | |
|
1091 | 1091 | Changeset Segment |
|
1092 | 1092 | ================= |
|
1093 | 1093 | |
|
1094 | 1094 | The *changeset segment* consists of a single *delta group* holding |
|
1095 | 1095 | changelog data. The *empty chunk* at the end of the *delta group* denotes |
|
1096 | 1096 | the boundary to the *manifest segment*. |
|
1097 | 1097 | |
|
1098 | 1098 | Manifest Segment |
|
1099 | 1099 | ================ |
|
1100 | 1100 | |
|
1101 | 1101 | The *manifest segment* consists of a single *delta group* holding manifest |
|
1102 | 1102 | data. If treemanifests are in use, it contains only the manifest for the |
|
1103 | 1103 | root directory of the repository. Otherwise, it contains the entire |
|
1104 | 1104 | manifest data. The *empty chunk* at the end of the *delta group* denotes |
|
1105 | 1105 | the boundary to the next segment (either the *treemanifests segment* or |
|
1106 | 1106 | the *filelogs segment*, depending on version and the request options). |
|
1107 | 1107 | |
|
1108 | 1108 | Treemanifests Segment |
|
1109 | 1109 | --------------------- |
|
1110 | 1110 | |
|
1111 | 1111 | The *treemanifests segment* only exists in changegroup version "3", and |
|
1112 | 1112 | only if the 'treemanifest' param is part of the bundle2 changegroup part |
|
1113 | 1113 | (it is not possible to use changegroup version 3 outside of bundle2). |
|
1114 | 1114 | Aside from the filenames in the *treemanifests segment* containing a |
|
1115 | 1115 | trailing "/" character, it behaves identically to the *filelogs segment* |
|
1116 | 1116 | (see below). The final sub-segment is followed by an *empty chunk* |
|
1117 | 1117 | (logically, a sub-segment with filename size 0). This denotes the boundary |
|
1118 | 1118 | to the *filelogs segment*. |
|
1119 | 1119 | |
|
1120 | 1120 | Filelogs Segment |
|
1121 | 1121 | ================ |
|
1122 | 1122 | |
|
1123 | 1123 | The *filelogs segment* consists of multiple sub-segments, each |
|
1124 | 1124 | corresponding to an individual file whose data is being described: |
|
1125 | 1125 | |
|
1126 | 1126 | +--------------------------------------------------+ |
|
1127 | 1127 | | | | | | | |
|
1128 | 1128 | | filelog0 | filelog1 | filelog2 | ... | 0x0 | |
|
1129 | 1129 | | | | | | (4 bytes) | |
|
1130 | 1130 | | | | | | | |
|
1131 | 1131 | +--------------------------------------------------+ |
|
1132 | 1132 | |
|
1133 | 1133 | The final filelog sub-segment is followed by an *empty chunk* (logically, |
|
1134 | 1134 | a sub-segment with filename size 0). This denotes the end of the segment |
|
1135 | 1135 | and of the overall changegroup. |
|
1136 | 1136 | |
|
1137 | 1137 | Each filelog sub-segment consists of the following: |
|
1138 | 1138 | |
|
1139 | 1139 | +------------------------------------------------------+ |
|
1140 | 1140 | | | | | |
|
1141 | 1141 | | filename length | filename | delta group | |
|
1142 | 1142 | | (4 bytes) | (<length - 4> bytes) | (various) | |
|
1143 | 1143 | | | | | |
|
1144 | 1144 | +------------------------------------------------------+ |
|
1145 | 1145 | |
|
1146 | 1146 | That is, a *chunk* consisting of the filename (not terminated or padded) |
|
1147 | 1147 | followed by N chunks constituting the *delta group* for this file. The |
|
1148 | 1148 | *empty chunk* at the end of each *delta group* denotes the boundary to the |
|
1149 | 1149 | next filelog sub-segment. |
|
1150 | 1150 | |
|
1151 | 1151 | Test list of commands with command with no help text |
|
1152 | 1152 | |
|
1153 | 1153 | $ hg help helpext |
|
1154 | 1154 | helpext extension - no help text available |
|
1155 | 1155 | |
|
1156 | 1156 | list of commands: |
|
1157 | 1157 | |
|
1158 | 1158 | nohelp (no help text available) |
|
1159 | 1159 | |
|
1160 | 1160 | (use 'hg help -v helpext' to show built-in aliases and global options) |
|
1161 | 1161 | |
|
1162 | 1162 | |
|
1163 | 1163 | test advanced, deprecated and experimental options are hidden in command help |
|
1164 | 1164 | $ hg help debugoptADV |
|
1165 | 1165 | hg debugoptADV |
|
1166 | 1166 | |
|
1167 | 1167 | (no help text available) |
|
1168 | 1168 | |
|
1169 | 1169 | options: |
|
1170 | 1170 | |
|
1171 | 1171 | (some details hidden, use --verbose to show complete help) |
|
1172 | 1172 | $ hg help debugoptDEP |
|
1173 | 1173 | hg debugoptDEP |
|
1174 | 1174 | |
|
1175 | 1175 | (no help text available) |
|
1176 | 1176 | |
|
1177 | 1177 | options: |
|
1178 | 1178 | |
|
1179 | 1179 | (some details hidden, use --verbose to show complete help) |
|
1180 | 1180 | |
|
1181 | 1181 | $ hg help debugoptEXP |
|
1182 | 1182 | hg debugoptEXP |
|
1183 | 1183 | |
|
1184 | 1184 | (no help text available) |
|
1185 | 1185 | |
|
1186 | 1186 | options: |
|
1187 | 1187 | |
|
1188 | 1188 | (some details hidden, use --verbose to show complete help) |
|
1189 | 1189 | |
|
1190 | 1190 | test advanced, deprecated and experimental options are shown with -v |
|
1191 | 1191 | $ hg help -v debugoptADV | grep aopt |
|
1192 | 1192 | --aopt option is (ADVANCED) |
|
1193 | 1193 | $ hg help -v debugoptDEP | grep dopt |
|
1194 | 1194 | --dopt option is (DEPRECATED) |
|
1195 | 1195 | $ hg help -v debugoptEXP | grep eopt |
|
1196 | 1196 | --eopt option is (EXPERIMENTAL) |
|
1197 | 1197 | |
|
1198 | 1198 | #if gettext |
|
1199 | 1199 | test deprecated option is hidden with translation with untranslated description |
|
1200 | 1200 | (use many globy for not failing on changed transaction) |
|
1201 | 1201 | $ LANGUAGE=sv hg help debugoptDEP |
|
1202 | 1202 | hg debugoptDEP |
|
1203 | 1203 | |
|
1204 | 1204 | (*) (glob) |
|
1205 | 1205 | |
|
1206 | 1206 | options: |
|
1207 | 1207 | |
|
1208 | 1208 | (some details hidden, use --verbose to show complete help) |
|
1209 | 1209 | #endif |
|
1210 | 1210 | |
|
1211 | 1211 | Test commands that collide with topics (issue4240) |
|
1212 | 1212 | |
|
1213 | 1213 | $ hg config -hq |
|
1214 | 1214 | hg config [-u] [NAME]... |
|
1215 | 1215 | |
|
1216 | 1216 | show combined config settings from all hgrc files |
|
1217 | 1217 | $ hg showconfig -hq |
|
1218 | 1218 | hg config [-u] [NAME]... |
|
1219 | 1219 | |
|
1220 | 1220 | show combined config settings from all hgrc files |
|
1221 | 1221 | |
|
1222 | 1222 | Test a help topic |
|
1223 | 1223 | |
|
1224 | 1224 | $ hg help dates |
|
1225 | 1225 | Date Formats |
|
1226 | 1226 | """""""""""" |
|
1227 | 1227 | |
|
1228 | 1228 | Some commands allow the user to specify a date, e.g.: |
|
1229 | 1229 | |
|
1230 | 1230 | - backout, commit, import, tag: Specify the commit date. |
|
1231 | 1231 | - log, revert, update: Select revision(s) by date. |
|
1232 | 1232 | |
|
1233 | 1233 | Many date formats are valid. Here are some examples: |
|
1234 | 1234 | |
|
1235 | 1235 | - "Wed Dec 6 13:18:29 2006" (local timezone assumed) |
|
1236 | 1236 | - "Dec 6 13:18 -0600" (year assumed, time offset provided) |
|
1237 | 1237 | - "Dec 6 13:18 UTC" (UTC and GMT are aliases for +0000) |
|
1238 | 1238 | - "Dec 6" (midnight) |
|
1239 | 1239 | - "13:18" (today assumed) |
|
1240 | 1240 | - "3:39" (3:39AM assumed) |
|
1241 | 1241 | - "3:39pm" (15:39) |
|
1242 | 1242 | - "2006-12-06 13:18:29" (ISO 8601 format) |
|
1243 | 1243 | - "2006-12-6 13:18" |
|
1244 | 1244 | - "2006-12-6" |
|
1245 | 1245 | - "12-6" |
|
1246 | 1246 | - "12/6" |
|
1247 | 1247 | - "12/6/6" (Dec 6 2006) |
|
1248 | 1248 | - "today" (midnight) |
|
1249 | 1249 | - "yesterday" (midnight) |
|
1250 | 1250 | - "now" - right now |
|
1251 | 1251 | |
|
1252 | 1252 | Lastly, there is Mercurial's internal format: |
|
1253 | 1253 | |
|
1254 | 1254 | - "1165411109 0" (Wed Dec 6 13:18:29 2006 UTC) |
|
1255 | 1255 | |
|
1256 | 1256 | This is the internal representation format for dates. The first number is |
|
1257 | 1257 | the number of seconds since the epoch (1970-01-01 00:00 UTC). The second |
|
1258 | 1258 | is the offset of the local timezone, in seconds west of UTC (negative if |
|
1259 | 1259 | the timezone is east of UTC). |
|
1260 | 1260 | |
|
1261 | 1261 | The log command also accepts date ranges: |
|
1262 | 1262 | |
|
1263 | 1263 | - "<DATE" - at or before a given date/time |
|
1264 | 1264 | - ">DATE" - on or after a given date/time |
|
1265 | 1265 | - "DATE to DATE" - a date range, inclusive |
|
1266 | 1266 | - "-DAYS" - within a given number of days of today |
|
1267 | 1267 | |
|
1268 | 1268 | Test repeated config section name |
|
1269 | 1269 | |
|
1270 | 1270 | $ hg help config.host |
|
1271 | 1271 | "http_proxy.host" |
|
1272 | 1272 | Host name and (optional) port of the proxy server, for example |
|
1273 | 1273 | "myproxy:8000". |
|
1274 | 1274 | |
|
1275 | 1275 | "smtp.host" |
|
1276 | 1276 | Host name of mail server, e.g. "mail.example.com". |
|
1277 | 1277 | |
|
1278 | 1278 | Unrelated trailing paragraphs shouldn't be included |
|
1279 | 1279 | |
|
1280 | 1280 | $ hg help config.extramsg | grep '^$' |
|
1281 | 1281 | |
|
1282 | 1282 | |
|
1283 | 1283 | Test capitalized section name |
|
1284 | 1284 | |
|
1285 | 1285 | $ hg help scripting.HGPLAIN > /dev/null |
|
1286 | 1286 | |
|
1287 | 1287 | Help subsection: |
|
1288 | 1288 | |
|
1289 | 1289 | $ hg help config.charsets |grep "Email example:" > /dev/null |
|
1290 | 1290 | [1] |
|
1291 | 1291 | |
|
1292 | 1292 | Show nested definitions |
|
1293 | 1293 | ("profiling.type"[break]"ls"[break]"stat"[break]) |
|
1294 | 1294 | |
|
1295 | 1295 | $ hg help config.type | egrep '^$'|wc -l |
|
1296 | 1296 | \s*3 (re) |
|
1297 | 1297 | |
|
1298 | 1298 | Separate sections from subsections |
|
1299 | 1299 | |
|
1300 | 1300 | $ hg help config.format | egrep '^ ("|-)|^\s*$' | uniq |
|
1301 | 1301 | "format" |
|
1302 | 1302 | -------- |
|
1303 | 1303 | |
|
1304 | 1304 | "usegeneraldelta" |
|
1305 | 1305 | |
|
1306 | 1306 | "dotencode" |
|
1307 | 1307 | |
|
1308 | 1308 | "usefncache" |
|
1309 | 1309 | |
|
1310 | 1310 | "usestore" |
|
1311 | 1311 | |
|
1312 | 1312 | "profiling" |
|
1313 | 1313 | ----------- |
|
1314 | 1314 | |
|
1315 | 1315 | "format" |
|
1316 | 1316 | |
|
1317 | 1317 | "progress" |
|
1318 | 1318 | ---------- |
|
1319 | 1319 | |
|
1320 | 1320 | "format" |
|
1321 | 1321 | |
|
1322 | 1322 | |
|
1323 | 1323 | Last item in help config.*: |
|
1324 | 1324 | |
|
1325 | 1325 | $ hg help config.`hg help config|grep '^ "'| \ |
|
1326 | 1326 | > tail -1|sed 's![ "]*!!g'`| \ |
|
1327 | 1327 | > grep 'hg help -c config' > /dev/null |
|
1328 | 1328 | [1] |
|
1329 | 1329 | |
|
1330 | 1330 | note to use help -c for general hg help config: |
|
1331 | 1331 | |
|
1332 | 1332 | $ hg help config |grep 'hg help -c config' > /dev/null |
|
1333 | 1333 | |
|
1334 | 1334 | Test templating help |
|
1335 | 1335 | |
|
1336 | 1336 | $ hg help templating | egrep '(desc|diffstat|firstline|nonempty) ' |
|
1337 | 1337 | desc String. The text of the changeset description. |
|
1338 | 1338 | diffstat String. Statistics of changes with the following format: |
|
1339 | 1339 | firstline Any text. Returns the first line of text. |
|
1340 | 1340 | nonempty Any text. Returns '(none)' if the string is empty. |
|
1341 | 1341 | |
|
1342 | 1342 | Test deprecated items |
|
1343 | 1343 | |
|
1344 | 1344 | $ hg help -v templating | grep currentbookmark |
|
1345 | 1345 | currentbookmark |
|
1346 | 1346 | $ hg help templating | (grep currentbookmark || true) |
|
1347 | 1347 | |
|
1348 | 1348 | Test help hooks |
|
1349 | 1349 | |
|
1350 | 1350 | $ cat > helphook1.py <<EOF |
|
1351 | 1351 | > from mercurial import help |
|
1352 | 1352 | > |
|
1353 | 1353 | > def rewrite(ui, topic, doc): |
|
1354 | 1354 | > return doc + '\nhelphook1\n' |
|
1355 | 1355 | > |
|
1356 | 1356 | > def extsetup(ui): |
|
1357 | 1357 | > help.addtopichook('revisions', rewrite) |
|
1358 | 1358 | > EOF |
|
1359 | 1359 | $ cat > helphook2.py <<EOF |
|
1360 | 1360 | > from mercurial import help |
|
1361 | 1361 | > |
|
1362 | 1362 | > def rewrite(ui, topic, doc): |
|
1363 | 1363 | > return doc + '\nhelphook2\n' |
|
1364 | 1364 | > |
|
1365 | 1365 | > def extsetup(ui): |
|
1366 | 1366 | > help.addtopichook('revisions', rewrite) |
|
1367 | 1367 | > EOF |
|
1368 | 1368 | $ echo '[extensions]' >> $HGRCPATH |
|
1369 | 1369 | $ echo "helphook1 = `pwd`/helphook1.py" >> $HGRCPATH |
|
1370 | 1370 | $ echo "helphook2 = `pwd`/helphook2.py" >> $HGRCPATH |
|
1371 | 1371 | $ hg help revsets | grep helphook |
|
1372 | 1372 | helphook1 |
|
1373 | 1373 | helphook2 |
|
1374 | 1374 | |
|
1375 | 1375 | help -c should only show debug --debug |
|
1376 | 1376 | |
|
1377 | 1377 | $ hg help -c --debug|egrep debug|wc -l|egrep '^\s*0\s*$' |
|
1378 | 1378 | [1] |
|
1379 | 1379 | |
|
1380 | 1380 | help -c should only show deprecated for -v |
|
1381 | 1381 | |
|
1382 | 1382 | $ hg help -c -v|egrep DEPRECATED|wc -l|egrep '^\s*0\s*$' |
|
1383 | 1383 | [1] |
|
1384 | 1384 | |
|
1385 | 1385 | Test -s / --system |
|
1386 | 1386 | |
|
1387 | 1387 | $ hg help config.files -s windows |grep 'etc/mercurial' | \ |
|
1388 | 1388 | > wc -l | sed -e 's/ //g' |
|
1389 | 1389 | 0 |
|
1390 | 1390 | $ hg help config.files --system unix | grep 'USER' | \ |
|
1391 | 1391 | > wc -l | sed -e 's/ //g' |
|
1392 | 1392 | 0 |
|
1393 | 1393 | |
|
1394 | 1394 | Test -e / -c / -k combinations |
|
1395 | 1395 | |
|
1396 | 1396 | $ hg help -c|egrep '^[A-Z].*:|^ debug' |
|
1397 | 1397 | Commands: |
|
1398 | 1398 | $ hg help -e|egrep '^[A-Z].*:|^ debug' |
|
1399 | 1399 | Extensions: |
|
1400 | 1400 | $ hg help -k|egrep '^[A-Z].*:|^ debug' |
|
1401 | 1401 | Topics: |
|
1402 | 1402 | Commands: |
|
1403 | 1403 | Extensions: |
|
1404 | 1404 | Extension Commands: |
|
1405 | 1405 | $ hg help -c schemes |
|
1406 | 1406 | abort: no such help topic: schemes |
|
1407 | 1407 | (try 'hg help --keyword schemes') |
|
1408 | 1408 | [255] |
|
1409 | 1409 | $ hg help -e schemes |head -1 |
|
1410 | 1410 | schemes extension - extend schemes with shortcuts to repository swarms |
|
1411 | 1411 | $ hg help -c -k dates |egrep '^(Topics|Extensions|Commands):' |
|
1412 | 1412 | Commands: |
|
1413 | 1413 | $ hg help -e -k a |egrep '^(Topics|Extensions|Commands):' |
|
1414 | 1414 | Extensions: |
|
1415 | 1415 | $ hg help -e -c -k date |egrep '^(Topics|Extensions|Commands):' |
|
1416 | 1416 | Extensions: |
|
1417 | 1417 | Commands: |
|
1418 | 1418 | $ hg help -c commit > /dev/null |
|
1419 | 1419 | $ hg help -e -c commit > /dev/null |
|
1420 | 1420 | $ hg help -e commit > /dev/null |
|
1421 | 1421 | abort: no such help topic: commit |
|
1422 | 1422 | (try 'hg help --keyword commit') |
|
1423 | 1423 | [255] |
|
1424 | 1424 | |
|
1425 | 1425 | Test keyword search help |
|
1426 | 1426 | |
|
1427 | 1427 | $ cat > prefixedname.py <<EOF |
|
1428 | 1428 | > '''matched against word "clone" |
|
1429 | 1429 | > ''' |
|
1430 | 1430 | > EOF |
|
1431 | 1431 | $ echo '[extensions]' >> $HGRCPATH |
|
1432 | 1432 | $ echo "dot.dot.prefixedname = `pwd`/prefixedname.py" >> $HGRCPATH |
|
1433 | 1433 | $ hg help -k clone |
|
1434 | 1434 | Topics: |
|
1435 | 1435 | |
|
1436 | 1436 | config Configuration Files |
|
1437 | 1437 | extensions Using Additional Features |
|
1438 | 1438 | glossary Glossary |
|
1439 | 1439 | phases Working with Phases |
|
1440 | 1440 | subrepos Subrepositories |
|
1441 | 1441 | urls URL Paths |
|
1442 | 1442 | |
|
1443 | 1443 | Commands: |
|
1444 | 1444 | |
|
1445 | 1445 | bookmarks create a new bookmark or list existing bookmarks |
|
1446 | 1446 | clone make a copy of an existing repository |
|
1447 | 1447 | paths show aliases for remote repositories |
|
1448 | 1448 | update update working directory (or switch revisions) |
|
1449 | 1449 | |
|
1450 | 1450 | Extensions: |
|
1451 | 1451 | |
|
1452 | 1452 | clonebundles advertise pre-generated bundles to seed clones |
|
1453 | 1453 | prefixedname matched against word "clone" |
|
1454 | 1454 | relink recreates hardlinks between repository clones |
|
1455 | 1455 | |
|
1456 | 1456 | Extension Commands: |
|
1457 | 1457 | |
|
1458 | 1458 | qclone clone main and patch repository at same time |
|
1459 | 1459 | |
|
1460 | 1460 | Test unfound topic |
|
1461 | 1461 | |
|
1462 | 1462 | $ hg help nonexistingtopicthatwillneverexisteverever |
|
1463 | 1463 | abort: no such help topic: nonexistingtopicthatwillneverexisteverever |
|
1464 | 1464 | (try 'hg help --keyword nonexistingtopicthatwillneverexisteverever') |
|
1465 | 1465 | [255] |
|
1466 | 1466 | |
|
1467 | 1467 | Test unfound keyword |
|
1468 | 1468 | |
|
1469 | 1469 | $ hg help --keyword nonexistingwordthatwillneverexisteverever |
|
1470 | 1470 | abort: no matches |
|
1471 | 1471 | (try 'hg help' for a list of topics) |
|
1472 | 1472 | [255] |
|
1473 | 1473 | |
|
1474 | 1474 | Test omit indicating for help |
|
1475 | 1475 | |
|
1476 | 1476 | $ cat > addverboseitems.py <<EOF |
|
1477 | 1477 | > '''extension to test omit indicating. |
|
1478 | 1478 | > |
|
1479 | 1479 | > This paragraph is never omitted (for extension) |
|
1480 | 1480 | > |
|
1481 | 1481 | > .. container:: verbose |
|
1482 | 1482 | > |
|
1483 | 1483 | > This paragraph is omitted, |
|
1484 | 1484 | > if :hg:\`help\` is invoked without \`\`-v\`\` (for extension) |
|
1485 | 1485 | > |
|
1486 | 1486 | > This paragraph is never omitted, too (for extension) |
|
1487 | 1487 | > ''' |
|
1488 | 1488 | > |
|
1489 | 1489 | > from mercurial import help, commands |
|
1490 | 1490 | > testtopic = """This paragraph is never omitted (for topic). |
|
1491 | 1491 | > |
|
1492 | 1492 | > .. container:: verbose |
|
1493 | 1493 | > |
|
1494 | 1494 | > This paragraph is omitted, |
|
1495 | 1495 | > if :hg:\`help\` is invoked without \`\`-v\`\` (for topic) |
|
1496 | 1496 | > |
|
1497 | 1497 | > This paragraph is never omitted, too (for topic) |
|
1498 | 1498 | > """ |
|
1499 | 1499 | > def extsetup(ui): |
|
1500 | 1500 | > help.helptable.append((["topic-containing-verbose"], |
|
1501 | 1501 | > "This is the topic to test omit indicating.", |
|
1502 | 1502 | > lambda ui: testtopic)) |
|
1503 | 1503 | > EOF |
|
1504 | 1504 | $ echo '[extensions]' >> $HGRCPATH |
|
1505 | 1505 | $ echo "addverboseitems = `pwd`/addverboseitems.py" >> $HGRCPATH |
|
1506 | 1506 | $ hg help addverboseitems |
|
1507 | 1507 | addverboseitems extension - extension to test omit indicating. |
|
1508 | 1508 | |
|
1509 | 1509 | This paragraph is never omitted (for extension) |
|
1510 | 1510 | |
|
1511 | 1511 | This paragraph is never omitted, too (for extension) |
|
1512 | 1512 | |
|
1513 | 1513 | (some details hidden, use --verbose to show complete help) |
|
1514 | 1514 | |
|
1515 | 1515 | no commands defined |
|
1516 | 1516 | $ hg help -v addverboseitems |
|
1517 | 1517 | addverboseitems extension - extension to test omit indicating. |
|
1518 | 1518 | |
|
1519 | 1519 | This paragraph is never omitted (for extension) |
|
1520 | 1520 | |
|
1521 | 1521 | This paragraph is omitted, if 'hg help' is invoked without "-v" (for |
|
1522 | 1522 | extension) |
|
1523 | 1523 | |
|
1524 | 1524 | This paragraph is never omitted, too (for extension) |
|
1525 | 1525 | |
|
1526 | 1526 | no commands defined |
|
1527 | 1527 | $ hg help topic-containing-verbose |
|
1528 | 1528 | This is the topic to test omit indicating. |
|
1529 | 1529 | """""""""""""""""""""""""""""""""""""""""" |
|
1530 | 1530 | |
|
1531 | 1531 | This paragraph is never omitted (for topic). |
|
1532 | 1532 | |
|
1533 | 1533 | This paragraph is never omitted, too (for topic) |
|
1534 | 1534 | |
|
1535 | 1535 | (some details hidden, use --verbose to show complete help) |
|
1536 | 1536 | $ hg help -v topic-containing-verbose |
|
1537 | 1537 | This is the topic to test omit indicating. |
|
1538 | 1538 | """""""""""""""""""""""""""""""""""""""""" |
|
1539 | 1539 | |
|
1540 | 1540 | This paragraph is never omitted (for topic). |
|
1541 | 1541 | |
|
1542 | 1542 | This paragraph is omitted, if 'hg help' is invoked without "-v" (for |
|
1543 | 1543 | topic) |
|
1544 | 1544 | |
|
1545 | 1545 | This paragraph is never omitted, too (for topic) |
|
1546 | 1546 | |
|
1547 | 1547 | Test section lookup |
|
1548 | 1548 | |
|
1549 | 1549 | $ hg help revset.merge |
|
1550 | 1550 | "merge()" |
|
1551 | 1551 | Changeset is a merge changeset. |
|
1552 | 1552 | |
|
1553 | 1553 | $ hg help glossary.dag |
|
1554 | 1554 | DAG |
|
1555 | 1555 | The repository of changesets of a distributed version control system |
|
1556 | 1556 | (DVCS) can be described as a directed acyclic graph (DAG), consisting |
|
1557 | 1557 | of nodes and edges, where nodes correspond to changesets and edges |
|
1558 | 1558 | imply a parent -> child relation. This graph can be visualized by |
|
1559 | 1559 | graphical tools such as 'hg log --graph'. In Mercurial, the DAG is |
|
1560 | 1560 | limited by the requirement for children to have at most two parents. |
|
1561 | 1561 | |
|
1562 | 1562 | |
|
1563 | 1563 | $ hg help hgrc.paths |
|
1564 | 1564 | "paths" |
|
1565 | 1565 | ------- |
|
1566 | 1566 | |
|
1567 | 1567 | Assigns symbolic names and behavior to repositories. |
|
1568 | 1568 | |
|
1569 | 1569 | Options are symbolic names defining the URL or directory that is the |
|
1570 | 1570 | location of the repository. Example: |
|
1571 | 1571 | |
|
1572 | 1572 | [paths] |
|
1573 | 1573 | my_server = https://example.com/my_repo |
|
1574 | 1574 | local_path = /home/me/repo |
|
1575 | 1575 | |
|
1576 | 1576 | These symbolic names can be used from the command line. To pull from |
|
1577 | 1577 | "my_server": 'hg pull my_server'. To push to "local_path": 'hg push |
|
1578 | 1578 | local_path'. |
|
1579 | 1579 | |
|
1580 | 1580 | Options containing colons (":") denote sub-options that can influence |
|
1581 | 1581 | behavior for that specific path. Example: |
|
1582 | 1582 | |
|
1583 | 1583 | [paths] |
|
1584 | 1584 | my_server = https://example.com/my_path |
|
1585 | 1585 | my_server:pushurl = ssh://example.com/my_path |
|
1586 | 1586 | |
|
1587 | 1587 | The following sub-options can be defined: |
|
1588 | 1588 | |
|
1589 | 1589 | "pushurl" |
|
1590 | 1590 | The URL to use for push operations. If not defined, the location |
|
1591 | 1591 | defined by the path's main entry is used. |
|
1592 | 1592 | |
|
1593 | 1593 | "pushrev" |
|
1594 | 1594 | A revset defining which revisions to push by default. |
|
1595 | 1595 | |
|
1596 | 1596 | When 'hg push' is executed without a "-r" argument, the revset defined |
|
1597 | 1597 | by this sub-option is evaluated to determine what to push. |
|
1598 | 1598 | |
|
1599 | 1599 | For example, a value of "." will push the working directory's revision |
|
1600 | 1600 | by default. |
|
1601 | 1601 | |
|
1602 | 1602 | Revsets specifying bookmarks will not result in the bookmark being |
|
1603 | 1603 | pushed. |
|
1604 | 1604 | |
|
1605 | 1605 | The following special named paths exist: |
|
1606 | 1606 | |
|
1607 | 1607 | "default" |
|
1608 | 1608 | The URL or directory to use when no source or remote is specified. |
|
1609 | 1609 | |
|
1610 | 1610 | 'hg clone' will automatically define this path to the location the |
|
1611 | 1611 | repository was cloned from. |
|
1612 | 1612 | |
|
1613 | 1613 | "default-push" |
|
1614 | 1614 | (deprecated) The URL or directory for the default 'hg push' location. |
|
1615 | 1615 | "default:pushurl" should be used instead. |
|
1616 | 1616 | |
|
1617 | 1617 | $ hg help glossary.mcguffin |
|
1618 | 1618 | abort: help section not found: glossary.mcguffin |
|
1619 | 1619 | [255] |
|
1620 | 1620 | |
|
1621 | 1621 | $ hg help glossary.mc.guffin |
|
1622 | 1622 | abort: help section not found: glossary.mc.guffin |
|
1623 | 1623 | [255] |
|
1624 | 1624 | |
|
1625 | 1625 | $ hg help template.files |
|
1626 | 1626 | files List of strings. All files modified, added, or removed by |
|
1627 | 1627 | this changeset. |
|
1628 | 1628 | files(pattern) |
|
1629 | 1629 | All files of the current changeset matching the pattern. See |
|
1630 | 1630 | 'hg help patterns'. |
|
1631 | 1631 | |
|
1632 | 1632 | Test section lookup by translated message |
|
1633 | 1633 | |
|
1634 | 1634 | str.lower() instead of encoding.lower(str) on translated message might |
|
1635 | 1635 | make message meaningless, because some encoding uses 0x41(A) - 0x5a(Z) |
|
1636 | 1636 | as the second or later byte of multi-byte character. |
|
1637 | 1637 | |
|
1638 | 1638 | For example, "\x8bL\x98^" (translation of "record" in ja_JP.cp932) |
|
1639 | 1639 | contains 0x4c (L). str.lower() replaces 0x4c(L) by 0x6c(l) and this |
|
1640 | 1640 | replacement makes message meaningless. |
|
1641 | 1641 | |
|
1642 | 1642 | This tests that section lookup by translated string isn't broken by |
|
1643 | 1643 | such str.lower(). |
|
1644 | 1644 | |
|
1645 | 1645 | $ python <<EOF |
|
1646 | 1646 | > def escape(s): |
|
1647 | 1647 | > return ''.join('\u%x' % ord(uc) for uc in s.decode('cp932')) |
|
1648 | 1648 | > # translation of "record" in ja_JP.cp932 |
|
1649 | 1649 | > upper = "\x8bL\x98^" |
|
1650 | 1650 | > # str.lower()-ed section name should be treated as different one |
|
1651 | 1651 | > lower = "\x8bl\x98^" |
|
1652 | 1652 | > with open('ambiguous.py', 'w') as fp: |
|
1653 | 1653 | > fp.write("""# ambiguous section names in ja_JP.cp932 |
|
1654 | 1654 | > u'''summary of extension |
|
1655 | 1655 | > |
|
1656 | 1656 | > %s |
|
1657 | 1657 | > ---- |
|
1658 | 1658 | > |
|
1659 | 1659 | > Upper name should show only this message |
|
1660 | 1660 | > |
|
1661 | 1661 | > %s |
|
1662 | 1662 | > ---- |
|
1663 | 1663 | > |
|
1664 | 1664 | > Lower name should show only this message |
|
1665 | 1665 | > |
|
1666 | 1666 | > subsequent section |
|
1667 | 1667 | > ------------------ |
|
1668 | 1668 | > |
|
1669 | 1669 | > This should be hidden at 'hg help ambiguous' with section name. |
|
1670 | 1670 | > ''' |
|
1671 | 1671 | > """ % (escape(upper), escape(lower))) |
|
1672 | 1672 | > EOF |
|
1673 | 1673 | |
|
1674 | 1674 | $ cat >> $HGRCPATH <<EOF |
|
1675 | 1675 | > [extensions] |
|
1676 | 1676 | > ambiguous = ./ambiguous.py |
|
1677 | 1677 | > EOF |
|
1678 | 1678 | |
|
1679 | 1679 | $ python <<EOF | sh |
|
1680 | 1680 | > upper = "\x8bL\x98^" |
|
1681 | 1681 | > print "hg --encoding cp932 help -e ambiguous.%s" % upper |
|
1682 | 1682 | > EOF |
|
1683 | 1683 | \x8bL\x98^ (esc) |
|
1684 | 1684 | ---- |
|
1685 | 1685 | |
|
1686 | 1686 | Upper name should show only this message |
|
1687 | 1687 | |
|
1688 | 1688 | |
|
1689 | 1689 | $ python <<EOF | sh |
|
1690 | 1690 | > lower = "\x8bl\x98^" |
|
1691 | 1691 | > print "hg --encoding cp932 help -e ambiguous.%s" % lower |
|
1692 | 1692 | > EOF |
|
1693 | 1693 | \x8bl\x98^ (esc) |
|
1694 | 1694 | ---- |
|
1695 | 1695 | |
|
1696 | 1696 | Lower name should show only this message |
|
1697 | 1697 | |
|
1698 | 1698 | |
|
1699 | 1699 | $ cat >> $HGRCPATH <<EOF |
|
1700 | 1700 | > [extensions] |
|
1701 | 1701 | > ambiguous = ! |
|
1702 | 1702 | > EOF |
|
1703 | 1703 | |
|
1704 | 1704 | Show help content of disabled extensions |
|
1705 | 1705 | |
|
1706 | 1706 | $ cat >> $HGRCPATH <<EOF |
|
1707 | 1707 | > [extensions] |
|
1708 | 1708 | > ambiguous = !./ambiguous.py |
|
1709 | 1709 | > EOF |
|
1710 | 1710 | $ hg help -e ambiguous |
|
1711 | 1711 | ambiguous extension - (no help text available) |
|
1712 | 1712 | |
|
1713 | 1713 | (use 'hg help extensions' for information on enabling extensions) |
|
1714 | 1714 | |
|
1715 | 1715 | Test dynamic list of merge tools only shows up once |
|
1716 | 1716 | $ hg help merge-tools |
|
1717 | 1717 | Merge Tools |
|
1718 | 1718 | """"""""""" |
|
1719 | 1719 | |
|
1720 | 1720 | To merge files Mercurial uses merge tools. |
|
1721 | 1721 | |
|
1722 | 1722 | A merge tool combines two different versions of a file into a merged file. |
|
1723 | 1723 | Merge tools are given the two files and the greatest common ancestor of |
|
1724 | 1724 | the two file versions, so they can determine the changes made on both |
|
1725 | 1725 | branches. |
|
1726 | 1726 | |
|
1727 | 1727 | Merge tools are used both for 'hg resolve', 'hg merge', 'hg update', 'hg |
|
1728 | 1728 | backout' and in several extensions. |
|
1729 | 1729 | |
|
1730 | 1730 | Usually, the merge tool tries to automatically reconcile the files by |
|
1731 | 1731 | combining all non-overlapping changes that occurred separately in the two |
|
1732 | 1732 | different evolutions of the same initial base file. Furthermore, some |
|
1733 | 1733 | interactive merge programs make it easier to manually resolve conflicting |
|
1734 | 1734 | merges, either in a graphical way, or by inserting some conflict markers. |
|
1735 | 1735 | Mercurial does not include any interactive merge programs but relies on |
|
1736 | 1736 | external tools for that. |
|
1737 | 1737 | |
|
1738 | 1738 | Available merge tools |
|
1739 | 1739 | ===================== |
|
1740 | 1740 | |
|
1741 | 1741 | External merge tools and their properties are configured in the merge- |
|
1742 | 1742 | tools configuration section - see hgrc(5) - but they can often just be |
|
1743 | 1743 | named by their executable. |
|
1744 | 1744 | |
|
1745 | 1745 | A merge tool is generally usable if its executable can be found on the |
|
1746 | 1746 | system and if it can handle the merge. The executable is found if it is an |
|
1747 | 1747 | absolute or relative executable path or the name of an application in the |
|
1748 | 1748 | executable search path. The tool is assumed to be able to handle the merge |
|
1749 | 1749 | if it can handle symlinks if the file is a symlink, if it can handle |
|
1750 | 1750 | binary files if the file is binary, and if a GUI is available if the tool |
|
1751 | 1751 | requires a GUI. |
|
1752 | 1752 | |
|
1753 | 1753 | There are some internal merge tools which can be used. The internal merge |
|
1754 | 1754 | tools are: |
|
1755 | 1755 | |
|
1756 | 1756 | ":dump" |
|
1757 | 1757 | Creates three versions of the files to merge, containing the contents of |
|
1758 | 1758 | local, other and base. These files can then be used to perform a merge |
|
1759 | 1759 | manually. If the file to be merged is named "a.txt", these files will |
|
1760 | 1760 | accordingly be named "a.txt.local", "a.txt.other" and "a.txt.base" and |
|
1761 | 1761 | they will be placed in the same directory as "a.txt". |
|
1762 | 1762 | |
|
1763 | 1763 | ":fail" |
|
1764 | 1764 | Rather than attempting to merge files that were modified on both |
|
1765 | 1765 | branches, it marks them as unresolved. The resolve command must be used |
|
1766 | 1766 | to resolve these conflicts. |
|
1767 | 1767 | |
|
1768 | 1768 | ":local" |
|
1769 | 1769 | Uses the local 'p1()' version of files as the merged version. |
|
1770 | 1770 | |
|
1771 | 1771 | ":merge" |
|
1772 | 1772 | Uses the internal non-interactive simple merge algorithm for merging |
|
1773 | 1773 | files. It will fail if there are any conflicts and leave markers in the |
|
1774 | 1774 | partially merged file. Markers will have two sections, one for each side |
|
1775 | 1775 | of merge. |
|
1776 | 1776 | |
|
1777 | 1777 | ":merge-local" |
|
1778 | 1778 | Like :merge, but resolve all conflicts non-interactively in favor of the |
|
1779 | 1779 | local 'p1()' changes. |
|
1780 | 1780 | |
|
1781 | 1781 | ":merge-other" |
|
1782 | 1782 | Like :merge, but resolve all conflicts non-interactively in favor of the |
|
1783 | 1783 | other 'p2()' changes. |
|
1784 | 1784 | |
|
1785 | 1785 | ":merge3" |
|
1786 | 1786 | Uses the internal non-interactive simple merge algorithm for merging |
|
1787 | 1787 | files. It will fail if there are any conflicts and leave markers in the |
|
1788 | 1788 | partially merged file. Marker will have three sections, one from each |
|
1789 | 1789 | side of the merge and one for the base content. |
|
1790 | 1790 | |
|
1791 | 1791 | ":other" |
|
1792 | 1792 | Uses the other 'p2()' version of files as the merged version. |
|
1793 | 1793 | |
|
1794 | 1794 | ":prompt" |
|
1795 | 1795 | Asks the user which of the local 'p1()' or the other 'p2()' version to |
|
1796 | 1796 | keep as the merged version. |
|
1797 | 1797 | |
|
1798 | 1798 | ":tagmerge" |
|
1799 | 1799 | Uses the internal tag merge algorithm (experimental). |
|
1800 | 1800 | |
|
1801 | 1801 | ":union" |
|
1802 | 1802 | Uses the internal non-interactive simple merge algorithm for merging |
|
1803 | 1803 | files. It will use both left and right sides for conflict regions. No |
|
1804 | 1804 | markers are inserted. |
|
1805 | 1805 | |
|
1806 | 1806 | Internal tools are always available and do not require a GUI but will by |
|
1807 | 1807 | default not handle symlinks or binary files. |
|
1808 | 1808 | |
|
1809 | 1809 | Choosing a merge tool |
|
1810 | 1810 | ===================== |
|
1811 | 1811 | |
|
1812 | 1812 | Mercurial uses these rules when deciding which merge tool to use: |
|
1813 | 1813 | |
|
1814 | 1814 | 1. If a tool has been specified with the --tool option to merge or |
|
1815 | 1815 | resolve, it is used. If it is the name of a tool in the merge-tools |
|
1816 | 1816 | configuration, its configuration is used. Otherwise the specified tool |
|
1817 | 1817 | must be executable by the shell. |
|
1818 | 1818 | 2. If the "HGMERGE" environment variable is present, its value is used and |
|
1819 | 1819 | must be executable by the shell. |
|
1820 | 1820 | 3. If the filename of the file to be merged matches any of the patterns in |
|
1821 | 1821 | the merge-patterns configuration section, the first usable merge tool |
|
1822 | 1822 | corresponding to a matching pattern is used. Here, binary capabilities |
|
1823 | 1823 | of the merge tool are not considered. |
|
1824 | 1824 | 4. If ui.merge is set it will be considered next. If the value is not the |
|
1825 | 1825 | name of a configured tool, the specified value is used and must be |
|
1826 | 1826 | executable by the shell. Otherwise the named tool is used if it is |
|
1827 | 1827 | usable. |
|
1828 | 1828 | 5. If any usable merge tools are present in the merge-tools configuration |
|
1829 | 1829 | section, the one with the highest priority is used. |
|
1830 | 1830 | 6. If a program named "hgmerge" can be found on the system, it is used - |
|
1831 | 1831 | but it will by default not be used for symlinks and binary files. |
|
1832 | 1832 | 7. If the file to be merged is not binary and is not a symlink, then |
|
1833 | 1833 | internal ":merge" is used. |
|
1834 | 1834 | 8. The merge of the file fails and must be resolved before commit. |
|
1835 | 1835 | |
|
1836 | 1836 | Note: |
|
1837 | 1837 | After selecting a merge program, Mercurial will by default attempt to |
|
1838 | 1838 | merge the files using a simple merge algorithm first. Only if it |
|
1839 | 1839 | doesn't succeed because of conflicting changes Mercurial will actually |
|
1840 | 1840 | execute the merge program. Whether to use the simple merge algorithm |
|
1841 | 1841 | first can be controlled by the premerge setting of the merge tool. |
|
1842 | 1842 | Premerge is enabled by default unless the file is binary or a symlink. |
|
1843 | 1843 | |
|
1844 | 1844 | See the merge-tools and ui sections of hgrc(5) for details on the |
|
1845 | 1845 | configuration of merge tools. |
|
1846 | 1846 | |
|
1847 | 1847 | Compression engines listed in `hg help bundlespec` |
|
1848 | 1848 | |
|
1849 | 1849 | $ hg help bundlespec | grep gzip |
|
1850 | 1850 | "v1" bundles can only use the "gzip", "bzip2", and "none" compression |
|
1851 | 1851 | An algorithm that produces smaller bundles than "gzip". |
|
1852 | 1852 | This engine will likely produce smaller bundles than "gzip" but will be |
|
1853 | 1853 | "gzip" |
|
1854 | 1854 | better compression than "gzip". It also frequently yields better (?) |
|
1855 | 1855 | |
|
1856 | 1856 | Test usage of section marks in help documents |
|
1857 | 1857 | |
|
1858 | 1858 | $ cd "$TESTDIR"/../doc |
|
1859 | 1859 | $ python check-seclevel.py |
|
1860 | 1860 | $ cd $TESTTMP |
|
1861 | 1861 | |
|
1862 | 1862 | #if serve |
|
1863 | 1863 | |
|
1864 | 1864 | Test the help pages in hgweb. |
|
1865 | 1865 | |
|
1866 | 1866 | Dish up an empty repo; serve it cold. |
|
1867 | 1867 | |
|
1868 | 1868 | $ hg init "$TESTTMP/test" |
|
1869 | 1869 | $ hg serve -R "$TESTTMP/test" -n test -p $HGPORT -d --pid-file=hg.pid |
|
1870 | 1870 | $ cat hg.pid >> $DAEMON_PIDS |
|
1871 | 1871 | |
|
1872 | 1872 | $ get-with-headers.py $LOCALIP:$HGPORT "help" |
|
1873 | 1873 | 200 Script output follows |
|
1874 | 1874 | |
|
1875 | 1875 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> |
|
1876 | 1876 | <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US"> |
|
1877 | 1877 | <head> |
|
1878 | 1878 | <link rel="icon" href="/static/hgicon.png" type="image/png" /> |
|
1879 | 1879 | <meta name="robots" content="index, nofollow" /> |
|
1880 | 1880 | <link rel="stylesheet" href="/static/style-paper.css" type="text/css" /> |
|
1881 | 1881 | <script type="text/javascript" src="/static/mercurial.js"></script> |
|
1882 | 1882 | |
|
1883 | 1883 | <title>Help: Index</title> |
|
1884 | 1884 | </head> |
|
1885 | 1885 | <body> |
|
1886 | 1886 | |
|
1887 | 1887 | <div class="container"> |
|
1888 | 1888 | <div class="menu"> |
|
1889 | 1889 | <div class="logo"> |
|
1890 | 1890 | <a href="https://mercurial-scm.org/"> |
|
1891 | 1891 | <img src="/static/hglogo.png" alt="mercurial" /></a> |
|
1892 | 1892 | </div> |
|
1893 | 1893 | <ul> |
|
1894 | 1894 | <li><a href="/shortlog">log</a></li> |
|
1895 | 1895 | <li><a href="/graph">graph</a></li> |
|
1896 | 1896 | <li><a href="/tags">tags</a></li> |
|
1897 | 1897 | <li><a href="/bookmarks">bookmarks</a></li> |
|
1898 | 1898 | <li><a href="/branches">branches</a></li> |
|
1899 | 1899 | </ul> |
|
1900 | 1900 | <ul> |
|
1901 | 1901 | <li class="active">help</li> |
|
1902 | 1902 | </ul> |
|
1903 | 1903 | </div> |
|
1904 | 1904 | |
|
1905 | 1905 | <div class="main"> |
|
1906 | 1906 | <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2> |
|
1907 | 1907 | <form class="search" action="/log"> |
|
1908 | 1908 | |
|
1909 | 1909 | <p><input name="rev" id="search1" type="text" size="30" /></p> |
|
1910 | 1910 | <div id="hint">Find changesets by keywords (author, files, the commit message), revision |
|
1911 | 1911 | number or hash, or <a href="/help/revsets">revset expression</a>.</div> |
|
1912 | 1912 | </form> |
|
1913 | 1913 | <table class="bigtable"> |
|
1914 | 1914 | <tr><td colspan="2"><h2><a name="topics" href="#topics">Topics</a></h2></td></tr> |
|
1915 | 1915 | |
|
1916 | 1916 | <tr><td> |
|
1917 | 1917 | <a href="/help/bundlespec"> |
|
1918 | 1918 | bundlespec |
|
1919 | 1919 | </a> |
|
1920 | 1920 | </td><td> |
|
1921 | 1921 | Bundle File Formats |
|
1922 | 1922 | </td></tr> |
|
1923 | 1923 | <tr><td> |
|
1924 | 1924 | <a href="/help/color"> |
|
1925 | 1925 | color |
|
1926 | 1926 | </a> |
|
1927 | 1927 | </td><td> |
|
1928 | 1928 | Colorizing Outputs |
|
1929 | 1929 | </td></tr> |
|
1930 | 1930 | <tr><td> |
|
1931 | 1931 | <a href="/help/config"> |
|
1932 | 1932 | config |
|
1933 | 1933 | </a> |
|
1934 | 1934 | </td><td> |
|
1935 | 1935 | Configuration Files |
|
1936 | 1936 | </td></tr> |
|
1937 | 1937 | <tr><td> |
|
1938 | 1938 | <a href="/help/dates"> |
|
1939 | 1939 | dates |
|
1940 | 1940 | </a> |
|
1941 | 1941 | </td><td> |
|
1942 | 1942 | Date Formats |
|
1943 | 1943 | </td></tr> |
|
1944 | 1944 | <tr><td> |
|
1945 | 1945 | <a href="/help/diffs"> |
|
1946 | 1946 | diffs |
|
1947 | 1947 | </a> |
|
1948 | 1948 | </td><td> |
|
1949 | 1949 | Diff Formats |
|
1950 | 1950 | </td></tr> |
|
1951 | 1951 | <tr><td> |
|
1952 | 1952 | <a href="/help/environment"> |
|
1953 | 1953 | environment |
|
1954 | 1954 | </a> |
|
1955 | 1955 | </td><td> |
|
1956 | 1956 | Environment Variables |
|
1957 | 1957 | </td></tr> |
|
1958 | 1958 | <tr><td> |
|
1959 | 1959 | <a href="/help/extensions"> |
|
1960 | 1960 | extensions |
|
1961 | 1961 | </a> |
|
1962 | 1962 | </td><td> |
|
1963 | 1963 | Using Additional Features |
|
1964 | 1964 | </td></tr> |
|
1965 | 1965 | <tr><td> |
|
1966 | 1966 | <a href="/help/filesets"> |
|
1967 | 1967 | filesets |
|
1968 | 1968 | </a> |
|
1969 | 1969 | </td><td> |
|
1970 | 1970 | Specifying File Sets |
|
1971 | 1971 | </td></tr> |
|
1972 | 1972 | <tr><td> |
|
1973 | 1973 | <a href="/help/glossary"> |
|
1974 | 1974 | glossary |
|
1975 | 1975 | </a> |
|
1976 | 1976 | </td><td> |
|
1977 | 1977 | Glossary |
|
1978 | 1978 | </td></tr> |
|
1979 | 1979 | <tr><td> |
|
1980 | 1980 | <a href="/help/hgignore"> |
|
1981 | 1981 | hgignore |
|
1982 | 1982 | </a> |
|
1983 | 1983 | </td><td> |
|
1984 | 1984 | Syntax for Mercurial Ignore Files |
|
1985 | 1985 | </td></tr> |
|
1986 | 1986 | <tr><td> |
|
1987 | 1987 | <a href="/help/hgweb"> |
|
1988 | 1988 | hgweb |
|
1989 | 1989 | </a> |
|
1990 | 1990 | </td><td> |
|
1991 | 1991 | Configuring hgweb |
|
1992 | 1992 | </td></tr> |
|
1993 | 1993 | <tr><td> |
|
1994 | 1994 | <a href="/help/internals"> |
|
1995 | 1995 | internals |
|
1996 | 1996 | </a> |
|
1997 | 1997 | </td><td> |
|
1998 | 1998 | Technical implementation topics |
|
1999 | 1999 | </td></tr> |
|
2000 | 2000 | <tr><td> |
|
2001 | 2001 | <a href="/help/merge-tools"> |
|
2002 | 2002 | merge-tools |
|
2003 | 2003 | </a> |
|
2004 | 2004 | </td><td> |
|
2005 | 2005 | Merge Tools |
|
2006 | 2006 | </td></tr> |
|
2007 | 2007 | <tr><td> |
|
2008 | 2008 | <a href="/help/pager"> |
|
2009 | 2009 | pager |
|
2010 | 2010 | </a> |
|
2011 | 2011 | </td><td> |
|
2012 | 2012 | Pager Support |
|
2013 | 2013 | </td></tr> |
|
2014 | 2014 | <tr><td> |
|
2015 | 2015 | <a href="/help/patterns"> |
|
2016 | 2016 | patterns |
|
2017 | 2017 | </a> |
|
2018 | 2018 | </td><td> |
|
2019 | 2019 | File Name Patterns |
|
2020 | 2020 | </td></tr> |
|
2021 | 2021 | <tr><td> |
|
2022 | 2022 | <a href="/help/phases"> |
|
2023 | 2023 | phases |
|
2024 | 2024 | </a> |
|
2025 | 2025 | </td><td> |
|
2026 | 2026 | Working with Phases |
|
2027 | 2027 | </td></tr> |
|
2028 | 2028 | <tr><td> |
|
2029 | 2029 | <a href="/help/revisions"> |
|
2030 | 2030 | revisions |
|
2031 | 2031 | </a> |
|
2032 | 2032 | </td><td> |
|
2033 | 2033 | Specifying Revisions |
|
2034 | 2034 | </td></tr> |
|
2035 | 2035 | <tr><td> |
|
2036 | 2036 | <a href="/help/scripting"> |
|
2037 | 2037 | scripting |
|
2038 | 2038 | </a> |
|
2039 | 2039 | </td><td> |
|
2040 | 2040 | Using Mercurial from scripts and automation |
|
2041 | 2041 | </td></tr> |
|
2042 | 2042 | <tr><td> |
|
2043 | 2043 | <a href="/help/subrepos"> |
|
2044 | 2044 | subrepos |
|
2045 | 2045 | </a> |
|
2046 | 2046 | </td><td> |
|
2047 | 2047 | Subrepositories |
|
2048 | 2048 | </td></tr> |
|
2049 | 2049 | <tr><td> |
|
2050 | 2050 | <a href="/help/templating"> |
|
2051 | 2051 | templating |
|
2052 | 2052 | </a> |
|
2053 | 2053 | </td><td> |
|
2054 | 2054 | Template Usage |
|
2055 | 2055 | </td></tr> |
|
2056 | 2056 | <tr><td> |
|
2057 | 2057 | <a href="/help/urls"> |
|
2058 | 2058 | urls |
|
2059 | 2059 | </a> |
|
2060 | 2060 | </td><td> |
|
2061 | 2061 | URL Paths |
|
2062 | 2062 | </td></tr> |
|
2063 | 2063 | <tr><td> |
|
2064 | 2064 | <a href="/help/topic-containing-verbose"> |
|
2065 | 2065 | topic-containing-verbose |
|
2066 | 2066 | </a> |
|
2067 | 2067 | </td><td> |
|
2068 | 2068 | This is the topic to test omit indicating. |
|
2069 | 2069 | </td></tr> |
|
2070 | 2070 | |
|
2071 | 2071 | |
|
2072 | 2072 | <tr><td colspan="2"><h2><a name="main" href="#main">Main Commands</a></h2></td></tr> |
|
2073 | 2073 | |
|
2074 | 2074 | <tr><td> |
|
2075 | 2075 | <a href="/help/add"> |
|
2076 | 2076 | add |
|
2077 | 2077 | </a> |
|
2078 | 2078 | </td><td> |
|
2079 | 2079 | add the specified files on the next commit |
|
2080 | 2080 | </td></tr> |
|
2081 | 2081 | <tr><td> |
|
2082 | 2082 | <a href="/help/annotate"> |
|
2083 | 2083 | annotate |
|
2084 | 2084 | </a> |
|
2085 | 2085 | </td><td> |
|
2086 | 2086 | show changeset information by line for each file |
|
2087 | 2087 | </td></tr> |
|
2088 | 2088 | <tr><td> |
|
2089 | 2089 | <a href="/help/clone"> |
|
2090 | 2090 | clone |
|
2091 | 2091 | </a> |
|
2092 | 2092 | </td><td> |
|
2093 | 2093 | make a copy of an existing repository |
|
2094 | 2094 | </td></tr> |
|
2095 | 2095 | <tr><td> |
|
2096 | 2096 | <a href="/help/commit"> |
|
2097 | 2097 | commit |
|
2098 | 2098 | </a> |
|
2099 | 2099 | </td><td> |
|
2100 | 2100 | commit the specified files or all outstanding changes |
|
2101 | 2101 | </td></tr> |
|
2102 | 2102 | <tr><td> |
|
2103 | 2103 | <a href="/help/diff"> |
|
2104 | 2104 | diff |
|
2105 | 2105 | </a> |
|
2106 | 2106 | </td><td> |
|
2107 | 2107 | diff repository (or selected files) |
|
2108 | 2108 | </td></tr> |
|
2109 | 2109 | <tr><td> |
|
2110 | 2110 | <a href="/help/export"> |
|
2111 | 2111 | export |
|
2112 | 2112 | </a> |
|
2113 | 2113 | </td><td> |
|
2114 | 2114 | dump the header and diffs for one or more changesets |
|
2115 | 2115 | </td></tr> |
|
2116 | 2116 | <tr><td> |
|
2117 | 2117 | <a href="/help/forget"> |
|
2118 | 2118 | forget |
|
2119 | 2119 | </a> |
|
2120 | 2120 | </td><td> |
|
2121 | 2121 | forget the specified files on the next commit |
|
2122 | 2122 | </td></tr> |
|
2123 | 2123 | <tr><td> |
|
2124 | 2124 | <a href="/help/init"> |
|
2125 | 2125 | init |
|
2126 | 2126 | </a> |
|
2127 | 2127 | </td><td> |
|
2128 | 2128 | create a new repository in the given directory |
|
2129 | 2129 | </td></tr> |
|
2130 | 2130 | <tr><td> |
|
2131 | 2131 | <a href="/help/log"> |
|
2132 | 2132 | log |
|
2133 | 2133 | </a> |
|
2134 | 2134 | </td><td> |
|
2135 | 2135 | show revision history of entire repository or files |
|
2136 | 2136 | </td></tr> |
|
2137 | 2137 | <tr><td> |
|
2138 | 2138 | <a href="/help/merge"> |
|
2139 | 2139 | merge |
|
2140 | 2140 | </a> |
|
2141 | 2141 | </td><td> |
|
2142 | 2142 | merge another revision into working directory |
|
2143 | 2143 | </td></tr> |
|
2144 | 2144 | <tr><td> |
|
2145 | 2145 | <a href="/help/pull"> |
|
2146 | 2146 | pull |
|
2147 | 2147 | </a> |
|
2148 | 2148 | </td><td> |
|
2149 | 2149 | pull changes from the specified source |
|
2150 | 2150 | </td></tr> |
|
2151 | 2151 | <tr><td> |
|
2152 | 2152 | <a href="/help/push"> |
|
2153 | 2153 | push |
|
2154 | 2154 | </a> |
|
2155 | 2155 | </td><td> |
|
2156 | 2156 | push changes to the specified destination |
|
2157 | 2157 | </td></tr> |
|
2158 | 2158 | <tr><td> |
|
2159 | 2159 | <a href="/help/remove"> |
|
2160 | 2160 | remove |
|
2161 | 2161 | </a> |
|
2162 | 2162 | </td><td> |
|
2163 | 2163 | remove the specified files on the next commit |
|
2164 | 2164 | </td></tr> |
|
2165 | 2165 | <tr><td> |
|
2166 | 2166 | <a href="/help/serve"> |
|
2167 | 2167 | serve |
|
2168 | 2168 | </a> |
|
2169 | 2169 | </td><td> |
|
2170 | 2170 | start stand-alone webserver |
|
2171 | 2171 | </td></tr> |
|
2172 | 2172 | <tr><td> |
|
2173 | 2173 | <a href="/help/status"> |
|
2174 | 2174 | status |
|
2175 | 2175 | </a> |
|
2176 | 2176 | </td><td> |
|
2177 | 2177 | show changed files in the working directory |
|
2178 | 2178 | </td></tr> |
|
2179 | 2179 | <tr><td> |
|
2180 | 2180 | <a href="/help/summary"> |
|
2181 | 2181 | summary |
|
2182 | 2182 | </a> |
|
2183 | 2183 | </td><td> |
|
2184 | 2184 | summarize working directory state |
|
2185 | 2185 | </td></tr> |
|
2186 | 2186 | <tr><td> |
|
2187 | 2187 | <a href="/help/update"> |
|
2188 | 2188 | update |
|
2189 | 2189 | </a> |
|
2190 | 2190 | </td><td> |
|
2191 | 2191 | update working directory (or switch revisions) |
|
2192 | 2192 | </td></tr> |
|
2193 | 2193 | |
|
2194 | 2194 | |
|
2195 | 2195 | |
|
2196 | 2196 | <tr><td colspan="2"><h2><a name="other" href="#other">Other Commands</a></h2></td></tr> |
|
2197 | 2197 | |
|
2198 | 2198 | <tr><td> |
|
2199 | 2199 | <a href="/help/addremove"> |
|
2200 | 2200 | addremove |
|
2201 | 2201 | </a> |
|
2202 | 2202 | </td><td> |
|
2203 | 2203 | add all new files, delete all missing files |
|
2204 | 2204 | </td></tr> |
|
2205 | 2205 | <tr><td> |
|
2206 | 2206 | <a href="/help/archive"> |
|
2207 | 2207 | archive |
|
2208 | 2208 | </a> |
|
2209 | 2209 | </td><td> |
|
2210 | 2210 | create an unversioned archive of a repository revision |
|
2211 | 2211 | </td></tr> |
|
2212 | 2212 | <tr><td> |
|
2213 | 2213 | <a href="/help/backout"> |
|
2214 | 2214 | backout |
|
2215 | 2215 | </a> |
|
2216 | 2216 | </td><td> |
|
2217 | 2217 | reverse effect of earlier changeset |
|
2218 | 2218 | </td></tr> |
|
2219 | 2219 | <tr><td> |
|
2220 | 2220 | <a href="/help/bisect"> |
|
2221 | 2221 | bisect |
|
2222 | 2222 | </a> |
|
2223 | 2223 | </td><td> |
|
2224 | 2224 | subdivision search of changesets |
|
2225 | 2225 | </td></tr> |
|
2226 | 2226 | <tr><td> |
|
2227 | 2227 | <a href="/help/bookmarks"> |
|
2228 | 2228 | bookmarks |
|
2229 | 2229 | </a> |
|
2230 | 2230 | </td><td> |
|
2231 | 2231 | create a new bookmark or list existing bookmarks |
|
2232 | 2232 | </td></tr> |
|
2233 | 2233 | <tr><td> |
|
2234 | 2234 | <a href="/help/branch"> |
|
2235 | 2235 | branch |
|
2236 | 2236 | </a> |
|
2237 | 2237 | </td><td> |
|
2238 | 2238 | set or show the current branch name |
|
2239 | 2239 | </td></tr> |
|
2240 | 2240 | <tr><td> |
|
2241 | 2241 | <a href="/help/branches"> |
|
2242 | 2242 | branches |
|
2243 | 2243 | </a> |
|
2244 | 2244 | </td><td> |
|
2245 | 2245 | list repository named branches |
|
2246 | 2246 | </td></tr> |
|
2247 | 2247 | <tr><td> |
|
2248 | 2248 | <a href="/help/bundle"> |
|
2249 | 2249 | bundle |
|
2250 | 2250 | </a> |
|
2251 | 2251 | </td><td> |
|
2252 | 2252 | create a bundle file |
|
2253 | 2253 | </td></tr> |
|
2254 | 2254 | <tr><td> |
|
2255 | 2255 | <a href="/help/cat"> |
|
2256 | 2256 | cat |
|
2257 | 2257 | </a> |
|
2258 | 2258 | </td><td> |
|
2259 | 2259 | output the current or given revision of files |
|
2260 | 2260 | </td></tr> |
|
2261 | 2261 | <tr><td> |
|
2262 | 2262 | <a href="/help/config"> |
|
2263 | 2263 | config |
|
2264 | 2264 | </a> |
|
2265 | 2265 | </td><td> |
|
2266 | 2266 | show combined config settings from all hgrc files |
|
2267 | 2267 | </td></tr> |
|
2268 | 2268 | <tr><td> |
|
2269 | 2269 | <a href="/help/copy"> |
|
2270 | 2270 | copy |
|
2271 | 2271 | </a> |
|
2272 | 2272 | </td><td> |
|
2273 | 2273 | mark files as copied for the next commit |
|
2274 | 2274 | </td></tr> |
|
2275 | 2275 | <tr><td> |
|
2276 | 2276 | <a href="/help/files"> |
|
2277 | 2277 | files |
|
2278 | 2278 | </a> |
|
2279 | 2279 | </td><td> |
|
2280 | 2280 | list tracked files |
|
2281 | 2281 | </td></tr> |
|
2282 | 2282 | <tr><td> |
|
2283 | 2283 | <a href="/help/graft"> |
|
2284 | 2284 | graft |
|
2285 | 2285 | </a> |
|
2286 | 2286 | </td><td> |
|
2287 | 2287 | copy changes from other branches onto the current branch |
|
2288 | 2288 | </td></tr> |
|
2289 | 2289 | <tr><td> |
|
2290 | 2290 | <a href="/help/grep"> |
|
2291 | 2291 | grep |
|
2292 | 2292 | </a> |
|
2293 | 2293 | </td><td> |
|
2294 | 2294 | search revision history for a pattern in specified files |
|
2295 | 2295 | </td></tr> |
|
2296 | 2296 | <tr><td> |
|
2297 | 2297 | <a href="/help/heads"> |
|
2298 | 2298 | heads |
|
2299 | 2299 | </a> |
|
2300 | 2300 | </td><td> |
|
2301 | 2301 | show branch heads |
|
2302 | 2302 | </td></tr> |
|
2303 | 2303 | <tr><td> |
|
2304 | 2304 | <a href="/help/help"> |
|
2305 | 2305 | help |
|
2306 | 2306 | </a> |
|
2307 | 2307 | </td><td> |
|
2308 | 2308 | show help for a given topic or a help overview |
|
2309 | 2309 | </td></tr> |
|
2310 | 2310 | <tr><td> |
|
2311 | 2311 | <a href="/help/hgalias"> |
|
2312 | 2312 | hgalias |
|
2313 | 2313 | </a> |
|
2314 | 2314 | </td><td> |
|
2315 | 2315 | summarize working directory state |
|
2316 | 2316 | </td></tr> |
|
2317 | 2317 | <tr><td> |
|
2318 | 2318 | <a href="/help/identify"> |
|
2319 | 2319 | identify |
|
2320 | 2320 | </a> |
|
2321 | 2321 | </td><td> |
|
2322 | 2322 | identify the working directory or specified revision |
|
2323 | 2323 | </td></tr> |
|
2324 | 2324 | <tr><td> |
|
2325 | 2325 | <a href="/help/import"> |
|
2326 | 2326 | import |
|
2327 | 2327 | </a> |
|
2328 | 2328 | </td><td> |
|
2329 | 2329 | import an ordered set of patches |
|
2330 | 2330 | </td></tr> |
|
2331 | 2331 | <tr><td> |
|
2332 | 2332 | <a href="/help/incoming"> |
|
2333 | 2333 | incoming |
|
2334 | 2334 | </a> |
|
2335 | 2335 | </td><td> |
|
2336 | 2336 | show new changesets found in source |
|
2337 | 2337 | </td></tr> |
|
2338 | 2338 | <tr><td> |
|
2339 | 2339 | <a href="/help/manifest"> |
|
2340 | 2340 | manifest |
|
2341 | 2341 | </a> |
|
2342 | 2342 | </td><td> |
|
2343 | 2343 | output the current or given revision of the project manifest |
|
2344 | 2344 | </td></tr> |
|
2345 | 2345 | <tr><td> |
|
2346 | 2346 | <a href="/help/nohelp"> |
|
2347 | 2347 | nohelp |
|
2348 | 2348 | </a> |
|
2349 | 2349 | </td><td> |
|
2350 | 2350 | (no help text available) |
|
2351 | 2351 | </td></tr> |
|
2352 | 2352 | <tr><td> |
|
2353 | 2353 | <a href="/help/outgoing"> |
|
2354 | 2354 | outgoing |
|
2355 | 2355 | </a> |
|
2356 | 2356 | </td><td> |
|
2357 | 2357 | show changesets not found in the destination |
|
2358 | 2358 | </td></tr> |
|
2359 | 2359 | <tr><td> |
|
2360 | 2360 | <a href="/help/paths"> |
|
2361 | 2361 | paths |
|
2362 | 2362 | </a> |
|
2363 | 2363 | </td><td> |
|
2364 | 2364 | show aliases for remote repositories |
|
2365 | 2365 | </td></tr> |
|
2366 | 2366 | <tr><td> |
|
2367 | 2367 | <a href="/help/phase"> |
|
2368 | 2368 | phase |
|
2369 | 2369 | </a> |
|
2370 | 2370 | </td><td> |
|
2371 | 2371 | set or show the current phase name |
|
2372 | 2372 | </td></tr> |
|
2373 | 2373 | <tr><td> |
|
2374 | 2374 | <a href="/help/recover"> |
|
2375 | 2375 | recover |
|
2376 | 2376 | </a> |
|
2377 | 2377 | </td><td> |
|
2378 | 2378 | roll back an interrupted transaction |
|
2379 | 2379 | </td></tr> |
|
2380 | 2380 | <tr><td> |
|
2381 | 2381 | <a href="/help/rename"> |
|
2382 | 2382 | rename |
|
2383 | 2383 | </a> |
|
2384 | 2384 | </td><td> |
|
2385 | 2385 | rename files; equivalent of copy + remove |
|
2386 | 2386 | </td></tr> |
|
2387 | 2387 | <tr><td> |
|
2388 | 2388 | <a href="/help/resolve"> |
|
2389 | 2389 | resolve |
|
2390 | 2390 | </a> |
|
2391 | 2391 | </td><td> |
|
2392 | 2392 | redo merges or set/view the merge status of files |
|
2393 | 2393 | </td></tr> |
|
2394 | 2394 | <tr><td> |
|
2395 | 2395 | <a href="/help/revert"> |
|
2396 | 2396 | revert |
|
2397 | 2397 | </a> |
|
2398 | 2398 | </td><td> |
|
2399 | 2399 | restore files to their checkout state |
|
2400 | 2400 | </td></tr> |
|
2401 | 2401 | <tr><td> |
|
2402 | 2402 | <a href="/help/root"> |
|
2403 | 2403 | root |
|
2404 | 2404 | </a> |
|
2405 | 2405 | </td><td> |
|
2406 | 2406 | print the root (top) of the current working directory |
|
2407 | 2407 | </td></tr> |
|
2408 | 2408 | <tr><td> |
|
2409 | 2409 | <a href="/help/shellalias"> |
|
2410 | 2410 | shellalias |
|
2411 | 2411 | </a> |
|
2412 | 2412 | </td><td> |
|
2413 | 2413 | (no help text available) |
|
2414 | 2414 | </td></tr> |
|
2415 | 2415 | <tr><td> |
|
2416 | 2416 | <a href="/help/tag"> |
|
2417 | 2417 | tag |
|
2418 | 2418 | </a> |
|
2419 | 2419 | </td><td> |
|
2420 | 2420 | add one or more tags for the current or given revision |
|
2421 | 2421 | </td></tr> |
|
2422 | 2422 | <tr><td> |
|
2423 | 2423 | <a href="/help/tags"> |
|
2424 | 2424 | tags |
|
2425 | 2425 | </a> |
|
2426 | 2426 | </td><td> |
|
2427 | 2427 | list repository tags |
|
2428 | 2428 | </td></tr> |
|
2429 | 2429 | <tr><td> |
|
2430 | 2430 | <a href="/help/unbundle"> |
|
2431 | 2431 | unbundle |
|
2432 | 2432 | </a> |
|
2433 | 2433 | </td><td> |
|
2434 | 2434 | apply one or more bundle files |
|
2435 | 2435 | </td></tr> |
|
2436 | 2436 | <tr><td> |
|
2437 | 2437 | <a href="/help/verify"> |
|
2438 | 2438 | verify |
|
2439 | 2439 | </a> |
|
2440 | 2440 | </td><td> |
|
2441 | 2441 | verify the integrity of the repository |
|
2442 | 2442 | </td></tr> |
|
2443 | 2443 | <tr><td> |
|
2444 | 2444 | <a href="/help/version"> |
|
2445 | 2445 | version |
|
2446 | 2446 | </a> |
|
2447 | 2447 | </td><td> |
|
2448 | 2448 | output version and copyright information |
|
2449 | 2449 | </td></tr> |
|
2450 | 2450 | |
|
2451 | 2451 | |
|
2452 | 2452 | </table> |
|
2453 | 2453 | </div> |
|
2454 | 2454 | </div> |
|
2455 | 2455 | |
|
2456 | 2456 | |
|
2457 | 2457 | |
|
2458 | 2458 | </body> |
|
2459 | 2459 | </html> |
|
2460 | 2460 | |
|
2461 | 2461 | |
|
2462 | 2462 | $ get-with-headers.py $LOCALIP:$HGPORT "help/add" |
|
2463 | 2463 | 200 Script output follows |
|
2464 | 2464 | |
|
2465 | 2465 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> |
|
2466 | 2466 | <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US"> |
|
2467 | 2467 | <head> |
|
2468 | 2468 | <link rel="icon" href="/static/hgicon.png" type="image/png" /> |
|
2469 | 2469 | <meta name="robots" content="index, nofollow" /> |
|
2470 | 2470 | <link rel="stylesheet" href="/static/style-paper.css" type="text/css" /> |
|
2471 | 2471 | <script type="text/javascript" src="/static/mercurial.js"></script> |
|
2472 | 2472 | |
|
2473 | 2473 | <title>Help: add</title> |
|
2474 | 2474 | </head> |
|
2475 | 2475 | <body> |
|
2476 | 2476 | |
|
2477 | 2477 | <div class="container"> |
|
2478 | 2478 | <div class="menu"> |
|
2479 | 2479 | <div class="logo"> |
|
2480 | 2480 | <a href="https://mercurial-scm.org/"> |
|
2481 | 2481 | <img src="/static/hglogo.png" alt="mercurial" /></a> |
|
2482 | 2482 | </div> |
|
2483 | 2483 | <ul> |
|
2484 | 2484 | <li><a href="/shortlog">log</a></li> |
|
2485 | 2485 | <li><a href="/graph">graph</a></li> |
|
2486 | 2486 | <li><a href="/tags">tags</a></li> |
|
2487 | 2487 | <li><a href="/bookmarks">bookmarks</a></li> |
|
2488 | 2488 | <li><a href="/branches">branches</a></li> |
|
2489 | 2489 | </ul> |
|
2490 | 2490 | <ul> |
|
2491 | 2491 | <li class="active"><a href="/help">help</a></li> |
|
2492 | 2492 | </ul> |
|
2493 | 2493 | </div> |
|
2494 | 2494 | |
|
2495 | 2495 | <div class="main"> |
|
2496 | 2496 | <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2> |
|
2497 | 2497 | <h3>Help: add</h3> |
|
2498 | 2498 | |
|
2499 | 2499 | <form class="search" action="/log"> |
|
2500 | 2500 | |
|
2501 | 2501 | <p><input name="rev" id="search1" type="text" size="30" /></p> |
|
2502 | 2502 | <div id="hint">Find changesets by keywords (author, files, the commit message), revision |
|
2503 | 2503 | number or hash, or <a href="/help/revsets">revset expression</a>.</div> |
|
2504 | 2504 | </form> |
|
2505 | 2505 | <div id="doc"> |
|
2506 | 2506 | <p> |
|
2507 | 2507 | hg add [OPTION]... [FILE]... |
|
2508 | 2508 | </p> |
|
2509 | 2509 | <p> |
|
2510 | 2510 | add the specified files on the next commit |
|
2511 | 2511 | </p> |
|
2512 | 2512 | <p> |
|
2513 | 2513 | Schedule files to be version controlled and added to the |
|
2514 | 2514 | repository. |
|
2515 | 2515 | </p> |
|
2516 | 2516 | <p> |
|
2517 | 2517 | The files will be added to the repository at the next commit. To |
|
2518 | 2518 | undo an add before that, see 'hg forget'. |
|
2519 | 2519 | </p> |
|
2520 | 2520 | <p> |
|
2521 | 2521 | If no names are given, add all files to the repository (except |
|
2522 | 2522 | files matching ".hgignore"). |
|
2523 | 2523 | </p> |
|
2524 | 2524 | <p> |
|
2525 | 2525 | Examples: |
|
2526 | 2526 | </p> |
|
2527 | 2527 | <ul> |
|
2528 | 2528 | <li> New (unknown) files are added automatically by 'hg add': |
|
2529 | 2529 | <pre> |
|
2530 | 2530 | \$ ls (re) |
|
2531 | 2531 | foo.c |
|
2532 | 2532 | \$ hg status (re) |
|
2533 | 2533 | ? foo.c |
|
2534 | 2534 | \$ hg add (re) |
|
2535 | 2535 | adding foo.c |
|
2536 | 2536 | \$ hg status (re) |
|
2537 | 2537 | A foo.c |
|
2538 | 2538 | </pre> |
|
2539 | 2539 | <li> Specific files to be added can be specified: |
|
2540 | 2540 | <pre> |
|
2541 | 2541 | \$ ls (re) |
|
2542 | 2542 | bar.c foo.c |
|
2543 | 2543 | \$ hg status (re) |
|
2544 | 2544 | ? bar.c |
|
2545 | 2545 | ? foo.c |
|
2546 | 2546 | \$ hg add bar.c (re) |
|
2547 | 2547 | \$ hg status (re) |
|
2548 | 2548 | A bar.c |
|
2549 | 2549 | ? foo.c |
|
2550 | 2550 | </pre> |
|
2551 | 2551 | </ul> |
|
2552 | 2552 | <p> |
|
2553 | 2553 | Returns 0 if all files are successfully added. |
|
2554 | 2554 | </p> |
|
2555 | 2555 | <p> |
|
2556 | 2556 | options ([+] can be repeated): |
|
2557 | 2557 | </p> |
|
2558 | 2558 | <table> |
|
2559 | 2559 | <tr><td>-I</td> |
|
2560 | 2560 | <td>--include PATTERN [+]</td> |
|
2561 | 2561 | <td>include names matching the given patterns</td></tr> |
|
2562 | 2562 | <tr><td>-X</td> |
|
2563 | 2563 | <td>--exclude PATTERN [+]</td> |
|
2564 | 2564 | <td>exclude names matching the given patterns</td></tr> |
|
2565 | 2565 | <tr><td>-S</td> |
|
2566 | 2566 | <td>--subrepos</td> |
|
2567 | 2567 | <td>recurse into subrepositories</td></tr> |
|
2568 | 2568 | <tr><td>-n</td> |
|
2569 | 2569 | <td>--dry-run</td> |
|
2570 | 2570 | <td>do not perform actions, just print output</td></tr> |
|
2571 | 2571 | </table> |
|
2572 | 2572 | <p> |
|
2573 | 2573 | global options ([+] can be repeated): |
|
2574 | 2574 | </p> |
|
2575 | 2575 | <table> |
|
2576 | 2576 | <tr><td>-R</td> |
|
2577 | 2577 | <td>--repository REPO</td> |
|
2578 | 2578 | <td>repository root directory or name of overlay bundle file</td></tr> |
|
2579 | 2579 | <tr><td></td> |
|
2580 | 2580 | <td>--cwd DIR</td> |
|
2581 | 2581 | <td>change working directory</td></tr> |
|
2582 | 2582 | <tr><td>-y</td> |
|
2583 | 2583 | <td>--noninteractive</td> |
|
2584 | 2584 | <td>do not prompt, automatically pick the first choice for all prompts</td></tr> |
|
2585 | 2585 | <tr><td>-q</td> |
|
2586 | 2586 | <td>--quiet</td> |
|
2587 | 2587 | <td>suppress output</td></tr> |
|
2588 | 2588 | <tr><td>-v</td> |
|
2589 | 2589 | <td>--verbose</td> |
|
2590 | 2590 | <td>enable additional output</td></tr> |
|
2591 | 2591 | <tr><td></td> |
|
2592 | 2592 | <td>--color TYPE</td> |
|
2593 | 2593 | <td>when to colorize (boolean, always, auto, never, or debug)</td></tr> |
|
2594 | 2594 | <tr><td></td> |
|
2595 | 2595 | <td>--config CONFIG [+]</td> |
|
2596 | 2596 | <td>set/override config option (use 'section.name=value')</td></tr> |
|
2597 | 2597 | <tr><td></td> |
|
2598 | 2598 | <td>--debug</td> |
|
2599 | 2599 | <td>enable debugging output</td></tr> |
|
2600 | 2600 | <tr><td></td> |
|
2601 | 2601 | <td>--debugger</td> |
|
2602 | 2602 | <td>start debugger</td></tr> |
|
2603 | 2603 | <tr><td></td> |
|
2604 | 2604 | <td>--encoding ENCODE</td> |
|
2605 | 2605 | <td>set the charset encoding (default: ascii)</td></tr> |
|
2606 | 2606 | <tr><td></td> |
|
2607 | 2607 | <td>--encodingmode MODE</td> |
|
2608 | 2608 | <td>set the charset encoding mode (default: strict)</td></tr> |
|
2609 | 2609 | <tr><td></td> |
|
2610 | 2610 | <td>--traceback</td> |
|
2611 | 2611 | <td>always print a traceback on exception</td></tr> |
|
2612 | 2612 | <tr><td></td> |
|
2613 | 2613 | <td>--time</td> |
|
2614 | 2614 | <td>time how long the command takes</td></tr> |
|
2615 | 2615 | <tr><td></td> |
|
2616 | 2616 | <td>--profile</td> |
|
2617 | 2617 | <td>print command execution profile</td></tr> |
|
2618 | 2618 | <tr><td></td> |
|
2619 | 2619 | <td>--version</td> |
|
2620 | 2620 | <td>output version information and exit</td></tr> |
|
2621 | 2621 | <tr><td>-h</td> |
|
2622 | 2622 | <td>--help</td> |
|
2623 | 2623 | <td>display help and exit</td></tr> |
|
2624 | 2624 | <tr><td></td> |
|
2625 | 2625 | <td>--hidden</td> |
|
2626 | 2626 | <td>consider hidden changesets</td></tr> |
|
2627 | 2627 | <tr><td></td> |
|
2628 | 2628 | <td>--pager TYPE</td> |
|
2629 | 2629 | <td>when to paginate (boolean, always, auto, or never) (default: auto)</td></tr> |
|
2630 | 2630 | </table> |
|
2631 | 2631 | |
|
2632 | 2632 | </div> |
|
2633 | 2633 | </div> |
|
2634 | 2634 | </div> |
|
2635 | 2635 | |
|
2636 | 2636 | |
|
2637 | 2637 | |
|
2638 | 2638 | </body> |
|
2639 | 2639 | </html> |
|
2640 | 2640 | |
|
2641 | 2641 | |
|
2642 | 2642 | $ get-with-headers.py $LOCALIP:$HGPORT "help/remove" |
|
2643 | 2643 | 200 Script output follows |
|
2644 | 2644 | |
|
2645 | 2645 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> |
|
2646 | 2646 | <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US"> |
|
2647 | 2647 | <head> |
|
2648 | 2648 | <link rel="icon" href="/static/hgicon.png" type="image/png" /> |
|
2649 | 2649 | <meta name="robots" content="index, nofollow" /> |
|
2650 | 2650 | <link rel="stylesheet" href="/static/style-paper.css" type="text/css" /> |
|
2651 | 2651 | <script type="text/javascript" src="/static/mercurial.js"></script> |
|
2652 | 2652 | |
|
2653 | 2653 | <title>Help: remove</title> |
|
2654 | 2654 | </head> |
|
2655 | 2655 | <body> |
|
2656 | 2656 | |
|
2657 | 2657 | <div class="container"> |
|
2658 | 2658 | <div class="menu"> |
|
2659 | 2659 | <div class="logo"> |
|
2660 | 2660 | <a href="https://mercurial-scm.org/"> |
|
2661 | 2661 | <img src="/static/hglogo.png" alt="mercurial" /></a> |
|
2662 | 2662 | </div> |
|
2663 | 2663 | <ul> |
|
2664 | 2664 | <li><a href="/shortlog">log</a></li> |
|
2665 | 2665 | <li><a href="/graph">graph</a></li> |
|
2666 | 2666 | <li><a href="/tags">tags</a></li> |
|
2667 | 2667 | <li><a href="/bookmarks">bookmarks</a></li> |
|
2668 | 2668 | <li><a href="/branches">branches</a></li> |
|
2669 | 2669 | </ul> |
|
2670 | 2670 | <ul> |
|
2671 | 2671 | <li class="active"><a href="/help">help</a></li> |
|
2672 | 2672 | </ul> |
|
2673 | 2673 | </div> |
|
2674 | 2674 | |
|
2675 | 2675 | <div class="main"> |
|
2676 | 2676 | <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2> |
|
2677 | 2677 | <h3>Help: remove</h3> |
|
2678 | 2678 | |
|
2679 | 2679 | <form class="search" action="/log"> |
|
2680 | 2680 | |
|
2681 | 2681 | <p><input name="rev" id="search1" type="text" size="30" /></p> |
|
2682 | 2682 | <div id="hint">Find changesets by keywords (author, files, the commit message), revision |
|
2683 | 2683 | number or hash, or <a href="/help/revsets">revset expression</a>.</div> |
|
2684 | 2684 | </form> |
|
2685 | 2685 | <div id="doc"> |
|
2686 | 2686 | <p> |
|
2687 | 2687 | hg remove [OPTION]... FILE... |
|
2688 | 2688 | </p> |
|
2689 | 2689 | <p> |
|
2690 | 2690 | aliases: rm |
|
2691 | 2691 | </p> |
|
2692 | 2692 | <p> |
|
2693 | 2693 | remove the specified files on the next commit |
|
2694 | 2694 | </p> |
|
2695 | 2695 | <p> |
|
2696 | 2696 | Schedule the indicated files for removal from the current branch. |
|
2697 | 2697 | </p> |
|
2698 | 2698 | <p> |
|
2699 | 2699 | This command schedules the files to be removed at the next commit. |
|
2700 | 2700 | To undo a remove before that, see 'hg revert'. To undo added |
|
2701 | 2701 | files, see 'hg forget'. |
|
2702 | 2702 | </p> |
|
2703 | 2703 | <p> |
|
2704 | 2704 | -A/--after can be used to remove only files that have already |
|
2705 | 2705 | been deleted, -f/--force can be used to force deletion, and -Af |
|
2706 | 2706 | can be used to remove files from the next revision without |
|
2707 | 2707 | deleting them from the working directory. |
|
2708 | 2708 | </p> |
|
2709 | 2709 | <p> |
|
2710 | 2710 | The following table details the behavior of remove for different |
|
2711 | 2711 | file states (columns) and option combinations (rows). The file |
|
2712 | 2712 | states are Added [A], Clean [C], Modified [M] and Missing [!] |
|
2713 | 2713 | (as reported by 'hg status'). The actions are Warn, Remove |
|
2714 | 2714 | (from branch) and Delete (from disk): |
|
2715 | 2715 | </p> |
|
2716 | 2716 | <table> |
|
2717 | 2717 | <tr><td>opt/state</td> |
|
2718 | 2718 | <td>A</td> |
|
2719 | 2719 | <td>C</td> |
|
2720 | 2720 | <td>M</td> |
|
2721 | 2721 | <td>!</td></tr> |
|
2722 | 2722 | <tr><td>none</td> |
|
2723 | 2723 | <td>W</td> |
|
2724 | 2724 | <td>RD</td> |
|
2725 | 2725 | <td>W</td> |
|
2726 | 2726 | <td>R</td></tr> |
|
2727 | 2727 | <tr><td>-f</td> |
|
2728 | 2728 | <td>R</td> |
|
2729 | 2729 | <td>RD</td> |
|
2730 | 2730 | <td>RD</td> |
|
2731 | 2731 | <td>R</td></tr> |
|
2732 | 2732 | <tr><td>-A</td> |
|
2733 | 2733 | <td>W</td> |
|
2734 | 2734 | <td>W</td> |
|
2735 | 2735 | <td>W</td> |
|
2736 | 2736 | <td>R</td></tr> |
|
2737 | 2737 | <tr><td>-Af</td> |
|
2738 | 2738 | <td>R</td> |
|
2739 | 2739 | <td>R</td> |
|
2740 | 2740 | <td>R</td> |
|
2741 | 2741 | <td>R</td></tr> |
|
2742 | 2742 | </table> |
|
2743 | 2743 | <p> |
|
2744 | 2744 | <b>Note:</b> |
|
2745 | 2745 | </p> |
|
2746 | 2746 | <p> |
|
2747 | 2747 | 'hg remove' never deletes files in Added [A] state from the |
|
2748 | 2748 | working directory, not even if "--force" is specified. |
|
2749 | 2749 | </p> |
|
2750 | 2750 | <p> |
|
2751 | 2751 | Returns 0 on success, 1 if any warnings encountered. |
|
2752 | 2752 | </p> |
|
2753 | 2753 | <p> |
|
2754 | 2754 | options ([+] can be repeated): |
|
2755 | 2755 | </p> |
|
2756 | 2756 | <table> |
|
2757 | 2757 | <tr><td>-A</td> |
|
2758 | 2758 | <td>--after</td> |
|
2759 | 2759 | <td>record delete for missing files</td></tr> |
|
2760 | 2760 | <tr><td>-f</td> |
|
2761 | 2761 | <td>--force</td> |
|
2762 | 2762 | <td>forget added files, delete modified files</td></tr> |
|
2763 | 2763 | <tr><td>-S</td> |
|
2764 | 2764 | <td>--subrepos</td> |
|
2765 | 2765 | <td>recurse into subrepositories</td></tr> |
|
2766 | 2766 | <tr><td>-I</td> |
|
2767 | 2767 | <td>--include PATTERN [+]</td> |
|
2768 | 2768 | <td>include names matching the given patterns</td></tr> |
|
2769 | 2769 | <tr><td>-X</td> |
|
2770 | 2770 | <td>--exclude PATTERN [+]</td> |
|
2771 | 2771 | <td>exclude names matching the given patterns</td></tr> |
|
2772 | 2772 | </table> |
|
2773 | 2773 | <p> |
|
2774 | 2774 | global options ([+] can be repeated): |
|
2775 | 2775 | </p> |
|
2776 | 2776 | <table> |
|
2777 | 2777 | <tr><td>-R</td> |
|
2778 | 2778 | <td>--repository REPO</td> |
|
2779 | 2779 | <td>repository root directory or name of overlay bundle file</td></tr> |
|
2780 | 2780 | <tr><td></td> |
|
2781 | 2781 | <td>--cwd DIR</td> |
|
2782 | 2782 | <td>change working directory</td></tr> |
|
2783 | 2783 | <tr><td>-y</td> |
|
2784 | 2784 | <td>--noninteractive</td> |
|
2785 | 2785 | <td>do not prompt, automatically pick the first choice for all prompts</td></tr> |
|
2786 | 2786 | <tr><td>-q</td> |
|
2787 | 2787 | <td>--quiet</td> |
|
2788 | 2788 | <td>suppress output</td></tr> |
|
2789 | 2789 | <tr><td>-v</td> |
|
2790 | 2790 | <td>--verbose</td> |
|
2791 | 2791 | <td>enable additional output</td></tr> |
|
2792 | 2792 | <tr><td></td> |
|
2793 | 2793 | <td>--color TYPE</td> |
|
2794 | 2794 | <td>when to colorize (boolean, always, auto, never, or debug)</td></tr> |
|
2795 | 2795 | <tr><td></td> |
|
2796 | 2796 | <td>--config CONFIG [+]</td> |
|
2797 | 2797 | <td>set/override config option (use 'section.name=value')</td></tr> |
|
2798 | 2798 | <tr><td></td> |
|
2799 | 2799 | <td>--debug</td> |
|
2800 | 2800 | <td>enable debugging output</td></tr> |
|
2801 | 2801 | <tr><td></td> |
|
2802 | 2802 | <td>--debugger</td> |
|
2803 | 2803 | <td>start debugger</td></tr> |
|
2804 | 2804 | <tr><td></td> |
|
2805 | 2805 | <td>--encoding ENCODE</td> |
|
2806 | 2806 | <td>set the charset encoding (default: ascii)</td></tr> |
|
2807 | 2807 | <tr><td></td> |
|
2808 | 2808 | <td>--encodingmode MODE</td> |
|
2809 | 2809 | <td>set the charset encoding mode (default: strict)</td></tr> |
|
2810 | 2810 | <tr><td></td> |
|
2811 | 2811 | <td>--traceback</td> |
|
2812 | 2812 | <td>always print a traceback on exception</td></tr> |
|
2813 | 2813 | <tr><td></td> |
|
2814 | 2814 | <td>--time</td> |
|
2815 | 2815 | <td>time how long the command takes</td></tr> |
|
2816 | 2816 | <tr><td></td> |
|
2817 | 2817 | <td>--profile</td> |
|
2818 | 2818 | <td>print command execution profile</td></tr> |
|
2819 | 2819 | <tr><td></td> |
|
2820 | 2820 | <td>--version</td> |
|
2821 | 2821 | <td>output version information and exit</td></tr> |
|
2822 | 2822 | <tr><td>-h</td> |
|
2823 | 2823 | <td>--help</td> |
|
2824 | 2824 | <td>display help and exit</td></tr> |
|
2825 | 2825 | <tr><td></td> |
|
2826 | 2826 | <td>--hidden</td> |
|
2827 | 2827 | <td>consider hidden changesets</td></tr> |
|
2828 | 2828 | <tr><td></td> |
|
2829 | 2829 | <td>--pager TYPE</td> |
|
2830 | 2830 | <td>when to paginate (boolean, always, auto, or never) (default: auto)</td></tr> |
|
2831 | 2831 | </table> |
|
2832 | 2832 | |
|
2833 | 2833 | </div> |
|
2834 | 2834 | </div> |
|
2835 | 2835 | </div> |
|
2836 | 2836 | |
|
2837 | 2837 | |
|
2838 | 2838 | |
|
2839 | 2839 | </body> |
|
2840 | 2840 | </html> |
|
2841 | 2841 | |
|
2842 | 2842 | |
|
2843 | 2843 | $ get-with-headers.py $LOCALIP:$HGPORT "help/dates" |
|
2844 | 2844 | 200 Script output follows |
|
2845 | 2845 | |
|
2846 | 2846 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> |
|
2847 | 2847 | <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US"> |
|
2848 | 2848 | <head> |
|
2849 | 2849 | <link rel="icon" href="/static/hgicon.png" type="image/png" /> |
|
2850 | 2850 | <meta name="robots" content="index, nofollow" /> |
|
2851 | 2851 | <link rel="stylesheet" href="/static/style-paper.css" type="text/css" /> |
|
2852 | 2852 | <script type="text/javascript" src="/static/mercurial.js"></script> |
|
2853 | 2853 | |
|
2854 | 2854 | <title>Help: dates</title> |
|
2855 | 2855 | </head> |
|
2856 | 2856 | <body> |
|
2857 | 2857 | |
|
2858 | 2858 | <div class="container"> |
|
2859 | 2859 | <div class="menu"> |
|
2860 | 2860 | <div class="logo"> |
|
2861 | 2861 | <a href="https://mercurial-scm.org/"> |
|
2862 | 2862 | <img src="/static/hglogo.png" alt="mercurial" /></a> |
|
2863 | 2863 | </div> |
|
2864 | 2864 | <ul> |
|
2865 | 2865 | <li><a href="/shortlog">log</a></li> |
|
2866 | 2866 | <li><a href="/graph">graph</a></li> |
|
2867 | 2867 | <li><a href="/tags">tags</a></li> |
|
2868 | 2868 | <li><a href="/bookmarks">bookmarks</a></li> |
|
2869 | 2869 | <li><a href="/branches">branches</a></li> |
|
2870 | 2870 | </ul> |
|
2871 | 2871 | <ul> |
|
2872 | 2872 | <li class="active"><a href="/help">help</a></li> |
|
2873 | 2873 | </ul> |
|
2874 | 2874 | </div> |
|
2875 | 2875 | |
|
2876 | 2876 | <div class="main"> |
|
2877 | 2877 | <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2> |
|
2878 | 2878 | <h3>Help: dates</h3> |
|
2879 | 2879 | |
|
2880 | 2880 | <form class="search" action="/log"> |
|
2881 | 2881 | |
|
2882 | 2882 | <p><input name="rev" id="search1" type="text" size="30" /></p> |
|
2883 | 2883 | <div id="hint">Find changesets by keywords (author, files, the commit message), revision |
|
2884 | 2884 | number or hash, or <a href="/help/revsets">revset expression</a>.</div> |
|
2885 | 2885 | </form> |
|
2886 | 2886 | <div id="doc"> |
|
2887 | 2887 | <h1>Date Formats</h1> |
|
2888 | 2888 | <p> |
|
2889 | 2889 | Some commands allow the user to specify a date, e.g.: |
|
2890 | 2890 | </p> |
|
2891 | 2891 | <ul> |
|
2892 | 2892 | <li> backout, commit, import, tag: Specify the commit date. |
|
2893 | 2893 | <li> log, revert, update: Select revision(s) by date. |
|
2894 | 2894 | </ul> |
|
2895 | 2895 | <p> |
|
2896 | 2896 | Many date formats are valid. Here are some examples: |
|
2897 | 2897 | </p> |
|
2898 | 2898 | <ul> |
|
2899 | 2899 | <li> "Wed Dec 6 13:18:29 2006" (local timezone assumed) |
|
2900 | 2900 | <li> "Dec 6 13:18 -0600" (year assumed, time offset provided) |
|
2901 | 2901 | <li> "Dec 6 13:18 UTC" (UTC and GMT are aliases for +0000) |
|
2902 | 2902 | <li> "Dec 6" (midnight) |
|
2903 | 2903 | <li> "13:18" (today assumed) |
|
2904 | 2904 | <li> "3:39" (3:39AM assumed) |
|
2905 | 2905 | <li> "3:39pm" (15:39) |
|
2906 | 2906 | <li> "2006-12-06 13:18:29" (ISO 8601 format) |
|
2907 | 2907 | <li> "2006-12-6 13:18" |
|
2908 | 2908 | <li> "2006-12-6" |
|
2909 | 2909 | <li> "12-6" |
|
2910 | 2910 | <li> "12/6" |
|
2911 | 2911 | <li> "12/6/6" (Dec 6 2006) |
|
2912 | 2912 | <li> "today" (midnight) |
|
2913 | 2913 | <li> "yesterday" (midnight) |
|
2914 | 2914 | <li> "now" - right now |
|
2915 | 2915 | </ul> |
|
2916 | 2916 | <p> |
|
2917 | 2917 | Lastly, there is Mercurial's internal format: |
|
2918 | 2918 | </p> |
|
2919 | 2919 | <ul> |
|
2920 | 2920 | <li> "1165411109 0" (Wed Dec 6 13:18:29 2006 UTC) |
|
2921 | 2921 | </ul> |
|
2922 | 2922 | <p> |
|
2923 | 2923 | This is the internal representation format for dates. The first number |
|
2924 | 2924 | is the number of seconds since the epoch (1970-01-01 00:00 UTC). The |
|
2925 | 2925 | second is the offset of the local timezone, in seconds west of UTC |
|
2926 | 2926 | (negative if the timezone is east of UTC). |
|
2927 | 2927 | </p> |
|
2928 | 2928 | <p> |
|
2929 | 2929 | The log command also accepts date ranges: |
|
2930 | 2930 | </p> |
|
2931 | 2931 | <ul> |
|
2932 | 2932 | <li> "<DATE" - at or before a given date/time |
|
2933 | 2933 | <li> ">DATE" - on or after a given date/time |
|
2934 | 2934 | <li> "DATE to DATE" - a date range, inclusive |
|
2935 | 2935 | <li> "-DAYS" - within a given number of days of today |
|
2936 | 2936 | </ul> |
|
2937 | 2937 | |
|
2938 | 2938 | </div> |
|
2939 | 2939 | </div> |
|
2940 | 2940 | </div> |
|
2941 | 2941 | |
|
2942 | 2942 | |
|
2943 | 2943 | |
|
2944 | 2944 | </body> |
|
2945 | 2945 | </html> |
|
2946 | 2946 | |
|
2947 | 2947 | |
|
2948 | 2948 | Sub-topic indexes rendered properly |
|
2949 | 2949 | |
|
2950 | 2950 | $ get-with-headers.py $LOCALIP:$HGPORT "help/internals" |
|
2951 | 2951 | 200 Script output follows |
|
2952 | 2952 | |
|
2953 | 2953 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> |
|
2954 | 2954 | <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US"> |
|
2955 | 2955 | <head> |
|
2956 | 2956 | <link rel="icon" href="/static/hgicon.png" type="image/png" /> |
|
2957 | 2957 | <meta name="robots" content="index, nofollow" /> |
|
2958 | 2958 | <link rel="stylesheet" href="/static/style-paper.css" type="text/css" /> |
|
2959 | 2959 | <script type="text/javascript" src="/static/mercurial.js"></script> |
|
2960 | 2960 | |
|
2961 | 2961 | <title>Help: internals</title> |
|
2962 | 2962 | </head> |
|
2963 | 2963 | <body> |
|
2964 | 2964 | |
|
2965 | 2965 | <div class="container"> |
|
2966 | 2966 | <div class="menu"> |
|
2967 | 2967 | <div class="logo"> |
|
2968 | 2968 | <a href="https://mercurial-scm.org/"> |
|
2969 | 2969 | <img src="/static/hglogo.png" alt="mercurial" /></a> |
|
2970 | 2970 | </div> |
|
2971 | 2971 | <ul> |
|
2972 | 2972 | <li><a href="/shortlog">log</a></li> |
|
2973 | 2973 | <li><a href="/graph">graph</a></li> |
|
2974 | 2974 | <li><a href="/tags">tags</a></li> |
|
2975 | 2975 | <li><a href="/bookmarks">bookmarks</a></li> |
|
2976 | 2976 | <li><a href="/branches">branches</a></li> |
|
2977 | 2977 | </ul> |
|
2978 | 2978 | <ul> |
|
2979 | 2979 | <li><a href="/help">help</a></li> |
|
2980 | 2980 | </ul> |
|
2981 | 2981 | </div> |
|
2982 | 2982 | |
|
2983 | 2983 | <div class="main"> |
|
2984 | 2984 | <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2> |
|
2985 | 2985 | <form class="search" action="/log"> |
|
2986 | 2986 | |
|
2987 | 2987 | <p><input name="rev" id="search1" type="text" size="30" /></p> |
|
2988 | 2988 | <div id="hint">Find changesets by keywords (author, files, the commit message), revision |
|
2989 | 2989 | number or hash, or <a href="/help/revsets">revset expression</a>.</div> |
|
2990 | 2990 | </form> |
|
2991 | 2991 | <table class="bigtable"> |
|
2992 | 2992 | <tr><td colspan="2"><h2><a name="topics" href="#topics">Topics</a></h2></td></tr> |
|
2993 | 2993 | |
|
2994 | 2994 | <tr><td> |
|
2995 | 2995 | <a href="/help/internals.bundles"> |
|
2996 | 2996 | bundles |
|
2997 | 2997 | </a> |
|
2998 | 2998 | </td><td> |
|
2999 | 2999 | Bundles |
|
3000 | 3000 | </td></tr> |
|
3001 | 3001 | <tr><td> |
|
3002 | 3002 | <a href="/help/internals.censor"> |
|
3003 | 3003 | censor |
|
3004 | 3004 | </a> |
|
3005 | 3005 | </td><td> |
|
3006 | 3006 | Censor |
|
3007 | 3007 | </td></tr> |
|
3008 | 3008 | <tr><td> |
|
3009 | 3009 | <a href="/help/internals.changegroups"> |
|
3010 | 3010 | changegroups |
|
3011 | 3011 | </a> |
|
3012 | 3012 | </td><td> |
|
3013 | 3013 | Changegroups |
|
3014 | 3014 | </td></tr> |
|
3015 | 3015 | <tr><td> |
|
3016 | 3016 | <a href="/help/internals.requirements"> |
|
3017 | 3017 | requirements |
|
3018 | 3018 | </a> |
|
3019 | 3019 | </td><td> |
|
3020 | 3020 | Repository Requirements |
|
3021 | 3021 | </td></tr> |
|
3022 | 3022 | <tr><td> |
|
3023 | 3023 | <a href="/help/internals.revlogs"> |
|
3024 | 3024 | revlogs |
|
3025 | 3025 | </a> |
|
3026 | 3026 | </td><td> |
|
3027 | 3027 | Revision Logs |
|
3028 | 3028 | </td></tr> |
|
3029 | 3029 | <tr><td> |
|
3030 | 3030 | <a href="/help/internals.wireprotocol"> |
|
3031 | 3031 | wireprotocol |
|
3032 | 3032 | </a> |
|
3033 | 3033 | </td><td> |
|
3034 | 3034 | Wire Protocol |
|
3035 | 3035 | </td></tr> |
|
3036 | 3036 | |
|
3037 | 3037 | |
|
3038 | 3038 | |
|
3039 | 3039 | |
|
3040 | 3040 | |
|
3041 | 3041 | </table> |
|
3042 | 3042 | </div> |
|
3043 | 3043 | </div> |
|
3044 | 3044 | |
|
3045 | 3045 | |
|
3046 | 3046 | |
|
3047 | 3047 | </body> |
|
3048 | 3048 | </html> |
|
3049 | 3049 | |
|
3050 | 3050 | |
|
3051 | 3051 | Sub-topic topics rendered properly |
|
3052 | 3052 | |
|
3053 | 3053 | $ get-with-headers.py $LOCALIP:$HGPORT "help/internals.changegroups" |
|
3054 | 3054 | 200 Script output follows |
|
3055 | 3055 | |
|
3056 | 3056 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> |
|
3057 | 3057 | <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US"> |
|
3058 | 3058 | <head> |
|
3059 | 3059 | <link rel="icon" href="/static/hgicon.png" type="image/png" /> |
|
3060 | 3060 | <meta name="robots" content="index, nofollow" /> |
|
3061 | 3061 | <link rel="stylesheet" href="/static/style-paper.css" type="text/css" /> |
|
3062 | 3062 | <script type="text/javascript" src="/static/mercurial.js"></script> |
|
3063 | 3063 | |
|
3064 | 3064 | <title>Help: internals.changegroups</title> |
|
3065 | 3065 | </head> |
|
3066 | 3066 | <body> |
|
3067 | 3067 | |
|
3068 | 3068 | <div class="container"> |
|
3069 | 3069 | <div class="menu"> |
|
3070 | 3070 | <div class="logo"> |
|
3071 | 3071 | <a href="https://mercurial-scm.org/"> |
|
3072 | 3072 | <img src="/static/hglogo.png" alt="mercurial" /></a> |
|
3073 | 3073 | </div> |
|
3074 | 3074 | <ul> |
|
3075 | 3075 | <li><a href="/shortlog">log</a></li> |
|
3076 | 3076 | <li><a href="/graph">graph</a></li> |
|
3077 | 3077 | <li><a href="/tags">tags</a></li> |
|
3078 | 3078 | <li><a href="/bookmarks">bookmarks</a></li> |
|
3079 | 3079 | <li><a href="/branches">branches</a></li> |
|
3080 | 3080 | </ul> |
|
3081 | 3081 | <ul> |
|
3082 | 3082 | <li class="active"><a href="/help">help</a></li> |
|
3083 | 3083 | </ul> |
|
3084 | 3084 | </div> |
|
3085 | 3085 | |
|
3086 | 3086 | <div class="main"> |
|
3087 | 3087 | <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2> |
|
3088 | 3088 | <h3>Help: internals.changegroups</h3> |
|
3089 | 3089 | |
|
3090 | 3090 | <form class="search" action="/log"> |
|
3091 | 3091 | |
|
3092 | 3092 | <p><input name="rev" id="search1" type="text" size="30" /></p> |
|
3093 | 3093 | <div id="hint">Find changesets by keywords (author, files, the commit message), revision |
|
3094 | 3094 | number or hash, or <a href="/help/revsets">revset expression</a>.</div> |
|
3095 | 3095 | </form> |
|
3096 | 3096 | <div id="doc"> |
|
3097 | 3097 | <h1>Changegroups</h1> |
|
3098 | 3098 | <p> |
|
3099 | 3099 | Changegroups are representations of repository revlog data, specifically |
|
3100 | 3100 | the changelog data, root/flat manifest data, treemanifest data, and |
|
3101 | 3101 | filelogs. |
|
3102 | 3102 | </p> |
|
3103 | 3103 | <p> |
|
3104 | 3104 | There are 3 versions of changegroups: "1", "2", and "3". From a |
|
3105 | 3105 | high-level, versions "1" and "2" are almost exactly the same, with the |
|
3106 | 3106 | only difference being an additional item in the *delta header*. Version |
|
3107 | 3107 | "3" adds support for revlog flags in the *delta header* and optionally |
|
3108 | 3108 | exchanging treemanifests (enabled by setting an option on the |
|
3109 | 3109 | "changegroup" part in the bundle2). |
|
3110 | 3110 | </p> |
|
3111 | 3111 | <p> |
|
3112 | 3112 | Changegroups when not exchanging treemanifests consist of 3 logical |
|
3113 | 3113 | segments: |
|
3114 | 3114 | </p> |
|
3115 | 3115 | <pre> |
|
3116 | 3116 | +---------------------------------+ |
|
3117 | 3117 | | | | | |
|
3118 | 3118 | | changeset | manifest | filelogs | |
|
3119 | 3119 | | | | | |
|
3120 | 3120 | | | | | |
|
3121 | 3121 | +---------------------------------+ |
|
3122 | 3122 | </pre> |
|
3123 | 3123 | <p> |
|
3124 | 3124 | When exchanging treemanifests, there are 4 logical segments: |
|
3125 | 3125 | </p> |
|
3126 | 3126 | <pre> |
|
3127 | 3127 | +-------------------------------------------------+ |
|
3128 | 3128 | | | | | | |
|
3129 | 3129 | | changeset | root | treemanifests | filelogs | |
|
3130 | 3130 | | | manifest | | | |
|
3131 | 3131 | | | | | | |
|
3132 | 3132 | +-------------------------------------------------+ |
|
3133 | 3133 | </pre> |
|
3134 | 3134 | <p> |
|
3135 | 3135 | The principle building block of each segment is a *chunk*. A *chunk* |
|
3136 | 3136 | is a framed piece of data: |
|
3137 | 3137 | </p> |
|
3138 | 3138 | <pre> |
|
3139 | 3139 | +---------------------------------------+ |
|
3140 | 3140 | | | | |
|
3141 | 3141 | | length | data | |
|
3142 | 3142 | | (4 bytes) | (<length - 4> bytes) | |
|
3143 | 3143 | | | | |
|
3144 | 3144 | +---------------------------------------+ |
|
3145 | 3145 | </pre> |
|
3146 | 3146 | <p> |
|
3147 | 3147 | All integers are big-endian signed integers. Each chunk starts with a 32-bit |
|
3148 | 3148 | integer indicating the length of the entire chunk (including the length field |
|
3149 | 3149 | itself). |
|
3150 | 3150 | </p> |
|
3151 | 3151 | <p> |
|
3152 | 3152 | There is a special case chunk that has a value of 0 for the length |
|
3153 | 3153 | ("0x00000000"). We call this an *empty chunk*. |
|
3154 | 3154 | </p> |
|
3155 | 3155 | <h2>Delta Groups</h2> |
|
3156 | 3156 | <p> |
|
3157 | 3157 | A *delta group* expresses the content of a revlog as a series of deltas, |
|
3158 | 3158 | or patches against previous revisions. |
|
3159 | 3159 | </p> |
|
3160 | 3160 | <p> |
|
3161 | 3161 | Delta groups consist of 0 or more *chunks* followed by the *empty chunk* |
|
3162 | 3162 | to signal the end of the delta group: |
|
3163 | 3163 | </p> |
|
3164 | 3164 | <pre> |
|
3165 | 3165 | +------------------------------------------------------------------------+ |
|
3166 | 3166 | | | | | | | |
|
3167 | 3167 | | chunk0 length | chunk0 data | chunk1 length | chunk1 data | 0x0 | |
|
3168 | 3168 | | (4 bytes) | (various) | (4 bytes) | (various) | (4 bytes) | |
|
3169 | 3169 | | | | | | | |
|
3170 | 3170 | +------------------------------------------------------------------------+ |
|
3171 | 3171 | </pre> |
|
3172 | 3172 | <p> |
|
3173 | 3173 | Each *chunk*'s data consists of the following: |
|
3174 | 3174 | </p> |
|
3175 | 3175 | <pre> |
|
3176 | 3176 | +---------------------------------------+ |
|
3177 | 3177 | | | | |
|
3178 | 3178 | | delta header | delta data | |
|
3179 | 3179 | | (various by version) | (various) | |
|
3180 | 3180 | | | | |
|
3181 | 3181 | +---------------------------------------+ |
|
3182 | 3182 | </pre> |
|
3183 | 3183 | <p> |
|
3184 | 3184 | The *delta data* is a series of *delta*s that describe a diff from an existing |
|
3185 | 3185 | entry (either that the recipient already has, or previously specified in the |
|
3186 |
bundle |
|
|
3186 | bundle/changegroup). | |
|
3187 | 3187 | </p> |
|
3188 | 3188 | <p> |
|
3189 | 3189 | The *delta header* is different between versions "1", "2", and |
|
3190 | 3190 | "3" of the changegroup format. |
|
3191 | 3191 | </p> |
|
3192 | 3192 | <p> |
|
3193 | 3193 | Version 1 (headerlen=80): |
|
3194 | 3194 | </p> |
|
3195 | 3195 | <pre> |
|
3196 | 3196 | +------------------------------------------------------+ |
|
3197 | 3197 | | | | | | |
|
3198 | 3198 | | node | p1 node | p2 node | link node | |
|
3199 | 3199 | | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) | |
|
3200 | 3200 | | | | | | |
|
3201 | 3201 | +------------------------------------------------------+ |
|
3202 | 3202 | </pre> |
|
3203 | 3203 | <p> |
|
3204 | 3204 | Version 2 (headerlen=100): |
|
3205 | 3205 | </p> |
|
3206 | 3206 | <pre> |
|
3207 | 3207 | +------------------------------------------------------------------+ |
|
3208 | 3208 | | | | | | | |
|
3209 | 3209 | | node | p1 node | p2 node | base node | link node | |
|
3210 | 3210 | | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) | |
|
3211 | 3211 | | | | | | | |
|
3212 | 3212 | +------------------------------------------------------------------+ |
|
3213 | 3213 | </pre> |
|
3214 | 3214 | <p> |
|
3215 | 3215 | Version 3 (headerlen=102): |
|
3216 | 3216 | </p> |
|
3217 | 3217 | <pre> |
|
3218 | 3218 | +------------------------------------------------------------------------------+ |
|
3219 | 3219 | | | | | | | | |
|
3220 | 3220 | | node | p1 node | p2 node | base node | link node | flags | |
|
3221 | 3221 | | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) | (2 bytes) | |
|
3222 | 3222 | | | | | | | | |
|
3223 | 3223 | +------------------------------------------------------------------------------+ |
|
3224 | 3224 | </pre> |
|
3225 | 3225 | <p> |
|
3226 | 3226 | The *delta data* consists of "chunklen - 4 - headerlen" bytes, which contain a |
|
3227 | 3227 | series of *delta*s, densely packed (no separators). These deltas describe a diff |
|
3228 | 3228 | from an existing entry (either that the recipient already has, or previously |
|
3229 | 3229 | specified in the bundle/changegroup). The format is described more fully in |
|
3230 | 3230 | "hg help internals.bdiff", but briefly: |
|
3231 | 3231 | </p> |
|
3232 | 3232 | <pre> |
|
3233 | 3233 | +---------------------------------------------------------------+ |
|
3234 | 3234 | | | | | | |
|
3235 | 3235 | | start offset | end offset | new length | content | |
|
3236 | 3236 | | (4 bytes) | (4 bytes) | (4 bytes) | (<new length> bytes) | |
|
3237 | 3237 | | | | | | |
|
3238 | 3238 | +---------------------------------------------------------------+ |
|
3239 | 3239 | </pre> |
|
3240 | 3240 | <p> |
|
3241 | 3241 | Please note that the length field in the delta data does *not* include itself. |
|
3242 | 3242 | </p> |
|
3243 | 3243 | <p> |
|
3244 | 3244 | In version 1, the delta is always applied against the previous node from |
|
3245 | 3245 | the changegroup or the first parent if this is the first entry in the |
|
3246 | 3246 | changegroup. |
|
3247 | 3247 | </p> |
|
3248 | 3248 | <p> |
|
3249 | 3249 | In version 2 and up, the delta base node is encoded in the entry in the |
|
3250 | 3250 | changegroup. This allows the delta to be expressed against any parent, |
|
3251 | 3251 | which can result in smaller deltas and more efficient encoding of data. |
|
3252 | 3252 | </p> |
|
3253 | 3253 | <h2>Changeset Segment</h2> |
|
3254 | 3254 | <p> |
|
3255 | 3255 | The *changeset segment* consists of a single *delta group* holding |
|
3256 | 3256 | changelog data. The *empty chunk* at the end of the *delta group* denotes |
|
3257 | 3257 | the boundary to the *manifest segment*. |
|
3258 | 3258 | </p> |
|
3259 | 3259 | <h2>Manifest Segment</h2> |
|
3260 | 3260 | <p> |
|
3261 | 3261 | The *manifest segment* consists of a single *delta group* holding manifest |
|
3262 | 3262 | data. If treemanifests are in use, it contains only the manifest for the |
|
3263 | 3263 | root directory of the repository. Otherwise, it contains the entire |
|
3264 | 3264 | manifest data. The *empty chunk* at the end of the *delta group* denotes |
|
3265 | 3265 | the boundary to the next segment (either the *treemanifests segment* or the |
|
3266 | 3266 | *filelogs segment*, depending on version and the request options). |
|
3267 | 3267 | </p> |
|
3268 | 3268 | <h3>Treemanifests Segment</h3> |
|
3269 | 3269 | <p> |
|
3270 | 3270 | The *treemanifests segment* only exists in changegroup version "3", and |
|
3271 | 3271 | only if the 'treemanifest' param is part of the bundle2 changegroup part |
|
3272 | 3272 | (it is not possible to use changegroup version 3 outside of bundle2). |
|
3273 | 3273 | Aside from the filenames in the *treemanifests segment* containing a |
|
3274 | 3274 | trailing "/" character, it behaves identically to the *filelogs segment* |
|
3275 | 3275 | (see below). The final sub-segment is followed by an *empty chunk* (logically, |
|
3276 | 3276 | a sub-segment with filename size 0). This denotes the boundary to the |
|
3277 | 3277 | *filelogs segment*. |
|
3278 | 3278 | </p> |
|
3279 | 3279 | <h2>Filelogs Segment</h2> |
|
3280 | 3280 | <p> |
|
3281 | 3281 | The *filelogs segment* consists of multiple sub-segments, each |
|
3282 | 3282 | corresponding to an individual file whose data is being described: |
|
3283 | 3283 | </p> |
|
3284 | 3284 | <pre> |
|
3285 | 3285 | +--------------------------------------------------+ |
|
3286 | 3286 | | | | | | | |
|
3287 | 3287 | | filelog0 | filelog1 | filelog2 | ... | 0x0 | |
|
3288 | 3288 | | | | | | (4 bytes) | |
|
3289 | 3289 | | | | | | | |
|
3290 | 3290 | +--------------------------------------------------+ |
|
3291 | 3291 | </pre> |
|
3292 | 3292 | <p> |
|
3293 | 3293 | The final filelog sub-segment is followed by an *empty chunk* (logically, |
|
3294 | 3294 | a sub-segment with filename size 0). This denotes the end of the segment |
|
3295 | 3295 | and of the overall changegroup. |
|
3296 | 3296 | </p> |
|
3297 | 3297 | <p> |
|
3298 | 3298 | Each filelog sub-segment consists of the following: |
|
3299 | 3299 | </p> |
|
3300 | 3300 | <pre> |
|
3301 | 3301 | +------------------------------------------------------+ |
|
3302 | 3302 | | | | | |
|
3303 | 3303 | | filename length | filename | delta group | |
|
3304 | 3304 | | (4 bytes) | (<length - 4> bytes) | (various) | |
|
3305 | 3305 | | | | | |
|
3306 | 3306 | +------------------------------------------------------+ |
|
3307 | 3307 | </pre> |
|
3308 | 3308 | <p> |
|
3309 | 3309 | That is, a *chunk* consisting of the filename (not terminated or padded) |
|
3310 | 3310 | followed by N chunks constituting the *delta group* for this file. The |
|
3311 | 3311 | *empty chunk* at the end of each *delta group* denotes the boundary to the |
|
3312 | 3312 | next filelog sub-segment. |
|
3313 | 3313 | </p> |
|
3314 | 3314 | |
|
3315 | 3315 | </div> |
|
3316 | 3316 | </div> |
|
3317 | 3317 | </div> |
|
3318 | 3318 | |
|
3319 | 3319 | |
|
3320 | 3320 | |
|
3321 | 3321 | </body> |
|
3322 | 3322 | </html> |
|
3323 | 3323 | |
|
3324 | 3324 | |
|
3325 | 3325 | $ killdaemons.py |
|
3326 | 3326 | |
|
3327 | 3327 | #endif |
General Comments 0
You need to be logged in to leave comments.
Login now