Show More
@@ -1,2158 +1,2166 | |||
|
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 | - ``<install-root>/etc/mercurial/hgrc`` (per-installation) |
|
60 | 60 | - ``<install-root>/etc/mercurial/hgrc.d/*.rc`` (per-installation) |
|
61 | 61 | - ``/etc/mercurial/hgrc`` (per-system) |
|
62 | 62 | - ``/etc/mercurial/hgrc.d/*.rc`` (per-system) |
|
63 | 63 | - ``<internal>/default.d/*.rc`` (defaults) |
|
64 | 64 | |
|
65 | 65 | .. container:: verbose.windows |
|
66 | 66 | |
|
67 | 67 | On Windows, the following files are consulted: |
|
68 | 68 | |
|
69 | 69 | - ``<repo>/.hg/hgrc`` (per-repository) |
|
70 | 70 | - ``%USERPROFILE%\.hgrc`` (per-user) |
|
71 | 71 | - ``%USERPROFILE%\Mercurial.ini`` (per-user) |
|
72 | 72 | - ``%HOME%\.hgrc`` (per-user) |
|
73 | 73 | - ``%HOME%\Mercurial.ini`` (per-user) |
|
74 | 74 | - ``HKEY_LOCAL_MACHINE\SOFTWARE\Mercurial`` (per-installation) |
|
75 | 75 | - ``<install-dir>\hgrc.d\*.rc`` (per-installation) |
|
76 | 76 | - ``<install-dir>\Mercurial.ini`` (per-installation) |
|
77 | 77 | - ``<internal>/default.d/*.rc`` (defaults) |
|
78 | 78 | |
|
79 | 79 | .. note:: |
|
80 | 80 | |
|
81 | 81 | The registry key ``HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Mercurial`` |
|
82 | 82 | is used when running 32-bit Python on 64-bit Windows. |
|
83 | 83 | |
|
84 | 84 | .. container:: windows |
|
85 | 85 | |
|
86 | 86 | On Windows 9x, ``%HOME%`` is replaced by ``%APPDATA%``. |
|
87 | 87 | |
|
88 | 88 | .. container:: verbose.plan9 |
|
89 | 89 | |
|
90 | 90 | On Plan9, the following files are consulted: |
|
91 | 91 | |
|
92 | 92 | - ``<repo>/.hg/hgrc`` (per-repository) |
|
93 | 93 | - ``$home/lib/hgrc`` (per-user) |
|
94 | 94 | - ``<install-root>/lib/mercurial/hgrc`` (per-installation) |
|
95 | 95 | - ``<install-root>/lib/mercurial/hgrc.d/*.rc`` (per-installation) |
|
96 | 96 | - ``/lib/mercurial/hgrc`` (per-system) |
|
97 | 97 | - ``/lib/mercurial/hgrc.d/*.rc`` (per-system) |
|
98 | 98 | - ``<internal>/default.d/*.rc`` (defaults) |
|
99 | 99 | |
|
100 | 100 | Per-repository configuration options only apply in a |
|
101 | 101 | particular repository. This file is not version-controlled, and |
|
102 | 102 | will not get transferred during a "clone" operation. Options in |
|
103 | 103 | this file override options in all other configuration files. |
|
104 | 104 | |
|
105 | 105 | .. container:: unix.plan9 |
|
106 | 106 | |
|
107 | 107 | On Plan 9 and Unix, most of this file will be ignored if it doesn't |
|
108 | 108 | belong to a trusted user or to a trusted group. See |
|
109 | 109 | :hg:`help config.trusted` for more details. |
|
110 | 110 | |
|
111 | 111 | Per-user configuration file(s) are for the user running Mercurial. Options |
|
112 | 112 | in these files apply to all Mercurial commands executed by this user in any |
|
113 | 113 | directory. Options in these files override per-system and per-installation |
|
114 | 114 | options. |
|
115 | 115 | |
|
116 | 116 | Per-installation configuration files are searched for in the |
|
117 | 117 | directory where Mercurial is installed. ``<install-root>`` is the |
|
118 | 118 | parent directory of the **hg** executable (or symlink) being run. |
|
119 | 119 | |
|
120 | 120 | .. container:: unix.plan9 |
|
121 | 121 | |
|
122 | 122 | For example, if installed in ``/shared/tools/bin/hg``, Mercurial |
|
123 | 123 | will look in ``/shared/tools/etc/mercurial/hgrc``. Options in these |
|
124 | 124 | files apply to all Mercurial commands executed by any user in any |
|
125 | 125 | directory. |
|
126 | 126 | |
|
127 | 127 | Per-installation configuration files are for the system on |
|
128 | 128 | which Mercurial is running. Options in these files apply to all |
|
129 | 129 | Mercurial commands executed by any user in any directory. Registry |
|
130 | 130 | keys contain PATH-like strings, every part of which must reference |
|
131 | 131 | a ``Mercurial.ini`` file or be a directory where ``*.rc`` files will |
|
132 | 132 | be read. Mercurial checks each of these locations in the specified |
|
133 | 133 | order until one or more configuration files are detected. |
|
134 | 134 | |
|
135 | 135 | Per-system configuration files are for the system on which Mercurial |
|
136 | 136 | is running. Options in these files apply to all Mercurial commands |
|
137 | 137 | executed by any user in any directory. Options in these files |
|
138 | 138 | override per-installation options. |
|
139 | 139 | |
|
140 | 140 | Mercurial comes with some default configuration. The default configuration |
|
141 | 141 | files are installed with Mercurial and will be overwritten on upgrades. Default |
|
142 | 142 | configuration files should never be edited by users or administrators but can |
|
143 | 143 | be overridden in other configuration files. So far the directory only contains |
|
144 | 144 | merge tool configuration but packagers can also put other default configuration |
|
145 | 145 | there. |
|
146 | 146 | |
|
147 | 147 | Syntax |
|
148 | 148 | ====== |
|
149 | 149 | |
|
150 | 150 | A configuration file consists of sections, led by a ``[section]`` header |
|
151 | 151 | and followed by ``name = value`` entries (sometimes called |
|
152 | 152 | ``configuration keys``):: |
|
153 | 153 | |
|
154 | 154 | [spam] |
|
155 | 155 | eggs=ham |
|
156 | 156 | green= |
|
157 | 157 | eggs |
|
158 | 158 | |
|
159 | 159 | Each line contains one entry. If the lines that follow are indented, |
|
160 | 160 | they are treated as continuations of that entry. Leading whitespace is |
|
161 | 161 | removed from values. Empty lines are skipped. Lines beginning with |
|
162 | 162 | ``#`` or ``;`` are ignored and may be used to provide comments. |
|
163 | 163 | |
|
164 | 164 | Configuration keys can be set multiple times, in which case Mercurial |
|
165 | 165 | will use the value that was configured last. As an example:: |
|
166 | 166 | |
|
167 | 167 | [spam] |
|
168 | 168 | eggs=large |
|
169 | 169 | ham=serrano |
|
170 | 170 | eggs=small |
|
171 | 171 | |
|
172 | 172 | This would set the configuration key named ``eggs`` to ``small``. |
|
173 | 173 | |
|
174 | 174 | It is also possible to define a section multiple times. A section can |
|
175 | 175 | be redefined on the same and/or on different configuration files. For |
|
176 | 176 | example:: |
|
177 | 177 | |
|
178 | 178 | [foo] |
|
179 | 179 | eggs=large |
|
180 | 180 | ham=serrano |
|
181 | 181 | eggs=small |
|
182 | 182 | |
|
183 | 183 | [bar] |
|
184 | 184 | eggs=ham |
|
185 | 185 | green= |
|
186 | 186 | eggs |
|
187 | 187 | |
|
188 | 188 | [foo] |
|
189 | 189 | ham=prosciutto |
|
190 | 190 | eggs=medium |
|
191 | 191 | bread=toasted |
|
192 | 192 | |
|
193 | 193 | This would set the ``eggs``, ``ham``, and ``bread`` configuration keys |
|
194 | 194 | of the ``foo`` section to ``medium``, ``prosciutto``, and ``toasted``, |
|
195 | 195 | respectively. As you can see there only thing that matters is the last |
|
196 | 196 | value that was set for each of the configuration keys. |
|
197 | 197 | |
|
198 | 198 | If a configuration key is set multiple times in different |
|
199 | 199 | configuration files the final value will depend on the order in which |
|
200 | 200 | the different configuration files are read, with settings from earlier |
|
201 | 201 | paths overriding later ones as described on the ``Files`` section |
|
202 | 202 | above. |
|
203 | 203 | |
|
204 | 204 | A line of the form ``%include file`` will include ``file`` into the |
|
205 | 205 | current configuration file. The inclusion is recursive, which means |
|
206 | 206 | that included files can include other files. Filenames are relative to |
|
207 | 207 | the configuration file in which the ``%include`` directive is found. |
|
208 | 208 | Environment variables and ``~user`` constructs are expanded in |
|
209 | 209 | ``file``. This lets you do something like:: |
|
210 | 210 | |
|
211 | 211 | %include ~/.hgrc.d/$HOST.rc |
|
212 | 212 | |
|
213 | 213 | to include a different configuration file on each computer you use. |
|
214 | 214 | |
|
215 | 215 | A line with ``%unset name`` will remove ``name`` from the current |
|
216 | 216 | section, if it has been set previously. |
|
217 | 217 | |
|
218 | 218 | The values are either free-form text strings, lists of text strings, |
|
219 | 219 | or Boolean values. Boolean values can be set to true using any of "1", |
|
220 | 220 | "yes", "true", or "on" and to false using "0", "no", "false", or "off" |
|
221 | 221 | (all case insensitive). |
|
222 | 222 | |
|
223 | 223 | List values are separated by whitespace or comma, except when values are |
|
224 | 224 | placed in double quotation marks:: |
|
225 | 225 | |
|
226 | 226 | allow_read = "John Doe, PhD", brian, betty |
|
227 | 227 | |
|
228 | 228 | Quotation marks can be escaped by prefixing them with a backslash. Only |
|
229 | 229 | quotation marks at the beginning of a word is counted as a quotation |
|
230 | 230 | (e.g., ``foo"bar baz`` is the list of ``foo"bar`` and ``baz``). |
|
231 | 231 | |
|
232 | 232 | Sections |
|
233 | 233 | ======== |
|
234 | 234 | |
|
235 | 235 | This section describes the different sections that may appear in a |
|
236 | 236 | Mercurial configuration file, the purpose of each section, its possible |
|
237 | 237 | keys, and their possible values. |
|
238 | 238 | |
|
239 | 239 | ``alias`` |
|
240 | 240 | --------- |
|
241 | 241 | |
|
242 | 242 | Defines command aliases. |
|
243 | 243 | |
|
244 | 244 | Aliases allow you to define your own commands in terms of other |
|
245 | 245 | commands (or aliases), optionally including arguments. Positional |
|
246 | 246 | arguments in the form of ``$1``, ``$2``, etc. in the alias definition |
|
247 | 247 | are expanded by Mercurial before execution. Positional arguments not |
|
248 | 248 | already used by ``$N`` in the definition are put at the end of the |
|
249 | 249 | command to be executed. |
|
250 | 250 | |
|
251 | 251 | Alias definitions consist of lines of the form:: |
|
252 | 252 | |
|
253 | 253 | <alias> = <command> [<argument>]... |
|
254 | 254 | |
|
255 | 255 | For example, this definition:: |
|
256 | 256 | |
|
257 | 257 | latest = log --limit 5 |
|
258 | 258 | |
|
259 | 259 | creates a new command ``latest`` that shows only the five most recent |
|
260 | 260 | changesets. You can define subsequent aliases using earlier ones:: |
|
261 | 261 | |
|
262 | 262 | stable5 = latest -b stable |
|
263 | 263 | |
|
264 | 264 | .. note:: |
|
265 | 265 | |
|
266 | 266 | It is possible to create aliases with the same names as |
|
267 | 267 | existing commands, which will then override the original |
|
268 | 268 | definitions. This is almost always a bad idea! |
|
269 | 269 | |
|
270 | 270 | An alias can start with an exclamation point (``!``) to make it a |
|
271 | 271 | shell alias. A shell alias is executed with the shell and will let you |
|
272 | 272 | run arbitrary commands. As an example, :: |
|
273 | 273 | |
|
274 | 274 | echo = !echo $@ |
|
275 | 275 | |
|
276 | 276 | will let you do ``hg echo foo`` to have ``foo`` printed in your |
|
277 | 277 | terminal. A better example might be:: |
|
278 | 278 | |
|
279 | 279 | purge = !$HG status --no-status --unknown -0 re: | xargs -0 rm |
|
280 | 280 | |
|
281 | 281 | which will make ``hg purge`` delete all unknown files in the |
|
282 | 282 | repository in the same manner as the purge extension. |
|
283 | 283 | |
|
284 | 284 | Positional arguments like ``$1``, ``$2``, etc. in the alias definition |
|
285 | 285 | expand to the command arguments. Unmatched arguments are |
|
286 | 286 | removed. ``$0`` expands to the alias name and ``$@`` expands to all |
|
287 | 287 | arguments separated by a space. ``"$@"`` (with quotes) expands to all |
|
288 | 288 | arguments quoted individually and separated by a space. These expansions |
|
289 | 289 | happen before the command is passed to the shell. |
|
290 | 290 | |
|
291 | 291 | Shell aliases are executed in an environment where ``$HG`` expands to |
|
292 | 292 | the path of the Mercurial that was used to execute the alias. This is |
|
293 | 293 | useful when you want to call further Mercurial commands in a shell |
|
294 | 294 | alias, as was done above for the purge alias. In addition, |
|
295 | 295 | ``$HG_ARGS`` expands to the arguments given to Mercurial. In the ``hg |
|
296 | 296 | echo foo`` call above, ``$HG_ARGS`` would expand to ``echo foo``. |
|
297 | 297 | |
|
298 | 298 | .. note:: |
|
299 | 299 | |
|
300 | 300 | Some global configuration options such as ``-R`` are |
|
301 | 301 | processed before shell aliases and will thus not be passed to |
|
302 | 302 | aliases. |
|
303 | 303 | |
|
304 | 304 | |
|
305 | 305 | ``annotate`` |
|
306 | 306 | ------------ |
|
307 | 307 | |
|
308 | 308 | Settings used when displaying file annotations. All values are |
|
309 | 309 | Booleans and default to False. See :hg:`help config.diff` for |
|
310 | 310 | related options for the diff command. |
|
311 | 311 | |
|
312 | 312 | ``ignorews`` |
|
313 | 313 | Ignore white space when comparing lines. |
|
314 | 314 | |
|
315 | 315 | ``ignorewsamount`` |
|
316 | 316 | Ignore changes in the amount of white space. |
|
317 | 317 | |
|
318 | 318 | ``ignoreblanklines`` |
|
319 | 319 | Ignore changes whose lines are all blank. |
|
320 | 320 | |
|
321 | 321 | |
|
322 | 322 | ``auth`` |
|
323 | 323 | -------- |
|
324 | 324 | |
|
325 | 325 | Authentication credentials for HTTP authentication. This section |
|
326 | 326 | allows you to store usernames and passwords for use when logging |
|
327 | 327 | *into* HTTP servers. See :hg:`help config.web` if |
|
328 | 328 | you want to configure *who* can login to your HTTP server. |
|
329 | 329 | |
|
330 | 330 | Each line has the following format:: |
|
331 | 331 | |
|
332 | 332 | <name>.<argument> = <value> |
|
333 | 333 | |
|
334 | 334 | where ``<name>`` is used to group arguments into authentication |
|
335 | 335 | entries. Example:: |
|
336 | 336 | |
|
337 | 337 | foo.prefix = hg.intevation.de/mercurial |
|
338 | 338 | foo.username = foo |
|
339 | 339 | foo.password = bar |
|
340 | 340 | foo.schemes = http https |
|
341 | 341 | |
|
342 | 342 | bar.prefix = secure.example.org |
|
343 | 343 | bar.key = path/to/file.key |
|
344 | 344 | bar.cert = path/to/file.cert |
|
345 | 345 | bar.schemes = https |
|
346 | 346 | |
|
347 | 347 | Supported arguments: |
|
348 | 348 | |
|
349 | 349 | ``prefix`` |
|
350 | 350 | Either ``*`` or a URI prefix with or without the scheme part. |
|
351 | 351 | The authentication entry with the longest matching prefix is used |
|
352 | 352 | (where ``*`` matches everything and counts as a match of length |
|
353 | 353 | 1). If the prefix doesn't include a scheme, the match is performed |
|
354 | 354 | against the URI with its scheme stripped as well, and the schemes |
|
355 | 355 | argument, q.v., is then subsequently consulted. |
|
356 | 356 | |
|
357 | 357 | ``username`` |
|
358 | 358 | Optional. Username to authenticate with. If not given, and the |
|
359 | 359 | remote site requires basic or digest authentication, the user will |
|
360 | 360 | be prompted for it. Environment variables are expanded in the |
|
361 | 361 | username letting you do ``foo.username = $USER``. If the URI |
|
362 | 362 | includes a username, only ``[auth]`` entries with a matching |
|
363 | 363 | username or without a username will be considered. |
|
364 | 364 | |
|
365 | 365 | ``password`` |
|
366 | 366 | Optional. Password to authenticate with. If not given, and the |
|
367 | 367 | remote site requires basic or digest authentication, the user |
|
368 | 368 | will be prompted for it. |
|
369 | 369 | |
|
370 | 370 | ``key`` |
|
371 | 371 | Optional. PEM encoded client certificate key file. Environment |
|
372 | 372 | variables are expanded in the filename. |
|
373 | 373 | |
|
374 | 374 | ``cert`` |
|
375 | 375 | Optional. PEM encoded client certificate chain file. Environment |
|
376 | 376 | variables are expanded in the filename. |
|
377 | 377 | |
|
378 | 378 | ``schemes`` |
|
379 | 379 | Optional. Space separated list of URI schemes to use this |
|
380 | 380 | authentication entry with. Only used if the prefix doesn't include |
|
381 | 381 | a scheme. Supported schemes are http and https. They will match |
|
382 | 382 | static-http and static-https respectively, as well. |
|
383 | 383 | (default: https) |
|
384 | 384 | |
|
385 | 385 | If no suitable authentication entry is found, the user is prompted |
|
386 | 386 | for credentials as usual if required by the remote. |
|
387 | 387 | |
|
388 | 388 | |
|
389 | 389 | ``committemplate`` |
|
390 | 390 | ------------------ |
|
391 | 391 | |
|
392 | 392 | ``changeset`` |
|
393 | 393 | String: configuration in this section is used as the template to |
|
394 | 394 | customize the text shown in the editor when committing. |
|
395 | 395 | |
|
396 | 396 | In addition to pre-defined template keywords, commit log specific one |
|
397 | 397 | below can be used for customization: |
|
398 | 398 | |
|
399 | 399 | ``extramsg`` |
|
400 | 400 | String: Extra message (typically 'Leave message empty to abort |
|
401 | 401 | commit.'). This may be changed by some commands or extensions. |
|
402 | 402 | |
|
403 | 403 | For example, the template configuration below shows as same text as |
|
404 | 404 | one shown by default:: |
|
405 | 405 | |
|
406 | 406 | [committemplate] |
|
407 | 407 | changeset = {desc}\n\n |
|
408 | 408 | HG: Enter commit message. Lines beginning with 'HG:' are removed. |
|
409 | 409 | HG: {extramsg} |
|
410 | 410 | HG: -- |
|
411 | 411 | HG: user: {author}\n{ifeq(p2rev, "-1", "", |
|
412 | 412 | "HG: branch merge\n") |
|
413 | 413 | }HG: branch '{branch}'\n{if(activebookmark, |
|
414 | 414 | "HG: bookmark '{activebookmark}'\n") }{subrepos % |
|
415 | 415 | "HG: subrepo {subrepo}\n" }{file_adds % |
|
416 | 416 | "HG: added {file}\n" }{file_mods % |
|
417 | 417 | "HG: changed {file}\n" }{file_dels % |
|
418 | 418 | "HG: removed {file}\n" }{if(files, "", |
|
419 | 419 | "HG: no files changed\n")} |
|
420 | 420 | |
|
421 | 421 | .. note:: |
|
422 | 422 | |
|
423 | 423 | For some problematic encodings (see :hg:`help win32mbcs` for |
|
424 | 424 | detail), this customization should be configured carefully, to |
|
425 | 425 | avoid showing broken characters. |
|
426 | 426 | |
|
427 | 427 | For example, if a multibyte character ending with backslash (0x5c) is |
|
428 | 428 | followed by the ASCII character 'n' in the customized template, |
|
429 | 429 | the sequence of backslash and 'n' is treated as line-feed unexpectedly |
|
430 | 430 | (and the multibyte character is broken, too). |
|
431 | 431 | |
|
432 | 432 | Customized template is used for commands below (``--edit`` may be |
|
433 | 433 | required): |
|
434 | 434 | |
|
435 | 435 | - :hg:`backout` |
|
436 | 436 | - :hg:`commit` |
|
437 | 437 | - :hg:`fetch` (for merge commit only) |
|
438 | 438 | - :hg:`graft` |
|
439 | 439 | - :hg:`histedit` |
|
440 | 440 | - :hg:`import` |
|
441 | 441 | - :hg:`qfold`, :hg:`qnew` and :hg:`qrefresh` |
|
442 | 442 | - :hg:`rebase` |
|
443 | 443 | - :hg:`shelve` |
|
444 | 444 | - :hg:`sign` |
|
445 | 445 | - :hg:`tag` |
|
446 | 446 | - :hg:`transplant` |
|
447 | 447 | |
|
448 | 448 | Configuring items below instead of ``changeset`` allows showing |
|
449 | 449 | customized message only for specific actions, or showing different |
|
450 | 450 | messages for each action. |
|
451 | 451 | |
|
452 | 452 | - ``changeset.backout`` for :hg:`backout` |
|
453 | 453 | - ``changeset.commit.amend.merge`` for :hg:`commit --amend` on merges |
|
454 | 454 | - ``changeset.commit.amend.normal`` for :hg:`commit --amend` on other |
|
455 | 455 | - ``changeset.commit.normal.merge`` for :hg:`commit` on merges |
|
456 | 456 | - ``changeset.commit.normal.normal`` for :hg:`commit` on other |
|
457 | 457 | - ``changeset.fetch`` for :hg:`fetch` (impling merge commit) |
|
458 | 458 | - ``changeset.gpg.sign`` for :hg:`sign` |
|
459 | 459 | - ``changeset.graft`` for :hg:`graft` |
|
460 | 460 | - ``changeset.histedit.edit`` for ``edit`` of :hg:`histedit` |
|
461 | 461 | - ``changeset.histedit.fold`` for ``fold`` of :hg:`histedit` |
|
462 | 462 | - ``changeset.histedit.mess`` for ``mess`` of :hg:`histedit` |
|
463 | 463 | - ``changeset.histedit.pick`` for ``pick`` of :hg:`histedit` |
|
464 | 464 | - ``changeset.import.bypass`` for :hg:`import --bypass` |
|
465 | 465 | - ``changeset.import.normal.merge`` for :hg:`import` on merges |
|
466 | 466 | - ``changeset.import.normal.normal`` for :hg:`import` on other |
|
467 | 467 | - ``changeset.mq.qnew`` for :hg:`qnew` |
|
468 | 468 | - ``changeset.mq.qfold`` for :hg:`qfold` |
|
469 | 469 | - ``changeset.mq.qrefresh`` for :hg:`qrefresh` |
|
470 | 470 | - ``changeset.rebase.collapse`` for :hg:`rebase --collapse` |
|
471 | 471 | - ``changeset.rebase.merge`` for :hg:`rebase` on merges |
|
472 | 472 | - ``changeset.rebase.normal`` for :hg:`rebase` on other |
|
473 | 473 | - ``changeset.shelve.shelve`` for :hg:`shelve` |
|
474 | 474 | - ``changeset.tag.add`` for :hg:`tag` without ``--remove`` |
|
475 | 475 | - ``changeset.tag.remove`` for :hg:`tag --remove` |
|
476 | 476 | - ``changeset.transplant.merge`` for :hg:`transplant` on merges |
|
477 | 477 | - ``changeset.transplant.normal`` for :hg:`transplant` on other |
|
478 | 478 | |
|
479 | 479 | These dot-separated lists of names are treated as hierarchical ones. |
|
480 | 480 | For example, ``changeset.tag.remove`` customizes the commit message |
|
481 | 481 | only for :hg:`tag --remove`, but ``changeset.tag`` customizes the |
|
482 | 482 | commit message for :hg:`tag` regardless of ``--remove`` option. |
|
483 | 483 | |
|
484 | 484 | When the external editor is invoked for a commit, the corresponding |
|
485 | 485 | dot-separated list of names without the ``changeset.`` prefix |
|
486 | 486 | (e.g. ``commit.normal.normal``) is in the ``HGEDITFORM`` environment |
|
487 | 487 | variable. |
|
488 | 488 | |
|
489 | 489 | In this section, items other than ``changeset`` can be referred from |
|
490 | 490 | others. For example, the configuration to list committed files up |
|
491 | 491 | below can be referred as ``{listupfiles}``:: |
|
492 | 492 | |
|
493 | 493 | [committemplate] |
|
494 | 494 | listupfiles = {file_adds % |
|
495 | 495 | "HG: added {file}\n" }{file_mods % |
|
496 | 496 | "HG: changed {file}\n" }{file_dels % |
|
497 | 497 | "HG: removed {file}\n" }{if(files, "", |
|
498 | 498 | "HG: no files changed\n")} |
|
499 | 499 | |
|
500 | 500 | ``decode/encode`` |
|
501 | 501 | ----------------- |
|
502 | 502 | |
|
503 | 503 | Filters for transforming files on checkout/checkin. This would |
|
504 | 504 | typically be used for newline processing or other |
|
505 | 505 | localization/canonicalization of files. |
|
506 | 506 | |
|
507 | 507 | Filters consist of a filter pattern followed by a filter command. |
|
508 | 508 | Filter patterns are globs by default, rooted at the repository root. |
|
509 | 509 | For example, to match any file ending in ``.txt`` in the root |
|
510 | 510 | directory only, use the pattern ``*.txt``. To match any file ending |
|
511 | 511 | in ``.c`` anywhere in the repository, use the pattern ``**.c``. |
|
512 | 512 | For each file only the first matching filter applies. |
|
513 | 513 | |
|
514 | 514 | The filter command can start with a specifier, either ``pipe:`` or |
|
515 | 515 | ``tempfile:``. If no specifier is given, ``pipe:`` is used by default. |
|
516 | 516 | |
|
517 | 517 | A ``pipe:`` command must accept data on stdin and return the transformed |
|
518 | 518 | data on stdout. |
|
519 | 519 | |
|
520 | 520 | Pipe example:: |
|
521 | 521 | |
|
522 | 522 | [encode] |
|
523 | 523 | # uncompress gzip files on checkin to improve delta compression |
|
524 | 524 | # note: not necessarily a good idea, just an example |
|
525 | 525 | *.gz = pipe: gunzip |
|
526 | 526 | |
|
527 | 527 | [decode] |
|
528 | 528 | # recompress gzip files when writing them to the working dir (we |
|
529 | 529 | # can safely omit "pipe:", because it's the default) |
|
530 | 530 | *.gz = gzip |
|
531 | 531 | |
|
532 | 532 | A ``tempfile:`` command is a template. The string ``INFILE`` is replaced |
|
533 | 533 | with the name of a temporary file that contains the data to be |
|
534 | 534 | filtered by the command. The string ``OUTFILE`` is replaced with the name |
|
535 | 535 | of an empty temporary file, where the filtered data must be written by |
|
536 | 536 | the command. |
|
537 | 537 | |
|
538 | 538 | .. container:: windows |
|
539 | 539 | |
|
540 | 540 | .. note:: |
|
541 | 541 | |
|
542 | 542 | The tempfile mechanism is recommended for Windows systems, |
|
543 | 543 | where the standard shell I/O redirection operators often have |
|
544 | 544 | strange effects and may corrupt the contents of your files. |
|
545 | 545 | |
|
546 | 546 | This filter mechanism is used internally by the ``eol`` extension to |
|
547 | 547 | translate line ending characters between Windows (CRLF) and Unix (LF) |
|
548 | 548 | format. We suggest you use the ``eol`` extension for convenience. |
|
549 | 549 | |
|
550 | 550 | |
|
551 | 551 | ``defaults`` |
|
552 | 552 | ------------ |
|
553 | 553 | |
|
554 | 554 | (defaults are deprecated. Don't use them. Use aliases instead.) |
|
555 | 555 | |
|
556 | 556 | Use the ``[defaults]`` section to define command defaults, i.e. the |
|
557 | 557 | default options/arguments to pass to the specified commands. |
|
558 | 558 | |
|
559 | 559 | The following example makes :hg:`log` run in verbose mode, and |
|
560 | 560 | :hg:`status` show only the modified files, by default:: |
|
561 | 561 | |
|
562 | 562 | [defaults] |
|
563 | 563 | log = -v |
|
564 | 564 | status = -m |
|
565 | 565 | |
|
566 | 566 | The actual commands, instead of their aliases, must be used when |
|
567 | 567 | defining command defaults. The command defaults will also be applied |
|
568 | 568 | to the aliases of the commands defined. |
|
569 | 569 | |
|
570 | 570 | |
|
571 | 571 | ``diff`` |
|
572 | 572 | -------- |
|
573 | 573 | |
|
574 | 574 | Settings used when displaying diffs. Everything except for ``unified`` |
|
575 | 575 | is a Boolean and defaults to False. See :hg:`help config.annotate` |
|
576 | 576 | for related options for the annotate command. |
|
577 | 577 | |
|
578 | 578 | ``git`` |
|
579 | 579 | Use git extended diff format. |
|
580 | 580 | |
|
581 | 581 | ``nobinary`` |
|
582 | 582 | Omit git binary patches. |
|
583 | 583 | |
|
584 | 584 | ``nodates`` |
|
585 | 585 | Don't include dates in diff headers. |
|
586 | 586 | |
|
587 | 587 | ``noprefix`` |
|
588 | 588 | Omit 'a/' and 'b/' prefixes from filenames. Ignored in plain mode. |
|
589 | 589 | |
|
590 | 590 | ``showfunc`` |
|
591 | 591 | Show which function each change is in. |
|
592 | 592 | |
|
593 | 593 | ``ignorews`` |
|
594 | 594 | Ignore white space when comparing lines. |
|
595 | 595 | |
|
596 | 596 | ``ignorewsamount`` |
|
597 | 597 | Ignore changes in the amount of white space. |
|
598 | 598 | |
|
599 | 599 | ``ignoreblanklines`` |
|
600 | 600 | Ignore changes whose lines are all blank. |
|
601 | 601 | |
|
602 | 602 | ``unified`` |
|
603 | 603 | Number of lines of context to show. |
|
604 | 604 | |
|
605 | 605 | ``email`` |
|
606 | 606 | --------- |
|
607 | 607 | |
|
608 | 608 | Settings for extensions that send email messages. |
|
609 | 609 | |
|
610 | 610 | ``from`` |
|
611 | 611 | Optional. Email address to use in "From" header and SMTP envelope |
|
612 | 612 | of outgoing messages. |
|
613 | 613 | |
|
614 | 614 | ``to`` |
|
615 | 615 | Optional. Comma-separated list of recipients' email addresses. |
|
616 | 616 | |
|
617 | 617 | ``cc`` |
|
618 | 618 | Optional. Comma-separated list of carbon copy recipients' |
|
619 | 619 | email addresses. |
|
620 | 620 | |
|
621 | 621 | ``bcc`` |
|
622 | 622 | Optional. Comma-separated list of blind carbon copy recipients' |
|
623 | 623 | email addresses. |
|
624 | 624 | |
|
625 | 625 | ``method`` |
|
626 | 626 | Optional. Method to use to send email messages. If value is ``smtp`` |
|
627 | 627 | (default), use SMTP (see the ``[smtp]`` section for configuration). |
|
628 | 628 | Otherwise, use as name of program to run that acts like sendmail |
|
629 | 629 | (takes ``-f`` option for sender, list of recipients on command line, |
|
630 | 630 | message on stdin). Normally, setting this to ``sendmail`` or |
|
631 | 631 | ``/usr/sbin/sendmail`` is enough to use sendmail to send messages. |
|
632 | 632 | |
|
633 | 633 | ``charsets`` |
|
634 | 634 | Optional. Comma-separated list of character sets considered |
|
635 | 635 | convenient for recipients. Addresses, headers, and parts not |
|
636 | 636 | containing patches of outgoing messages will be encoded in the |
|
637 | 637 | first character set to which conversion from local encoding |
|
638 | 638 | (``$HGENCODING``, ``ui.fallbackencoding``) succeeds. If correct |
|
639 | 639 | conversion fails, the text in question is sent as is. |
|
640 | 640 | (default: '') |
|
641 | 641 | |
|
642 | 642 | Order of outgoing email character sets: |
|
643 | 643 | |
|
644 | 644 | 1. ``us-ascii``: always first, regardless of settings |
|
645 | 645 | 2. ``email.charsets``: in order given by user |
|
646 | 646 | 3. ``ui.fallbackencoding``: if not in email.charsets |
|
647 | 647 | 4. ``$HGENCODING``: if not in email.charsets |
|
648 | 648 | 5. ``utf-8``: always last, regardless of settings |
|
649 | 649 | |
|
650 | 650 | Email example:: |
|
651 | 651 | |
|
652 | 652 | [email] |
|
653 | 653 | from = Joseph User <joe.user@example.com> |
|
654 | 654 | method = /usr/sbin/sendmail |
|
655 | 655 | # charsets for western Europeans |
|
656 | 656 | # us-ascii, utf-8 omitted, as they are tried first and last |
|
657 | 657 | charsets = iso-8859-1, iso-8859-15, windows-1252 |
|
658 | 658 | |
|
659 | 659 | |
|
660 | 660 | ``extensions`` |
|
661 | 661 | -------------- |
|
662 | 662 | |
|
663 | 663 | Mercurial has an extension mechanism for adding new features. To |
|
664 | 664 | enable an extension, create an entry for it in this section. |
|
665 | 665 | |
|
666 | 666 | If you know that the extension is already in Python's search path, |
|
667 | 667 | you can give the name of the module, followed by ``=``, with nothing |
|
668 | 668 | after the ``=``. |
|
669 | 669 | |
|
670 | 670 | Otherwise, give a name that you choose, followed by ``=``, followed by |
|
671 | 671 | the path to the ``.py`` file (including the file name extension) that |
|
672 | 672 | defines the extension. |
|
673 | 673 | |
|
674 | 674 | To explicitly disable an extension that is enabled in an hgrc of |
|
675 | 675 | broader scope, prepend its path with ``!``, as in ``foo = !/ext/path`` |
|
676 | 676 | or ``foo = !`` when path is not supplied. |
|
677 | 677 | |
|
678 | 678 | Example for ``~/.hgrc``:: |
|
679 | 679 | |
|
680 | 680 | [extensions] |
|
681 | 681 | # (the color extension will get loaded from Mercurial's path) |
|
682 | 682 | color = |
|
683 | 683 | # (this extension will get loaded from the file specified) |
|
684 | 684 | myfeature = ~/.hgext/myfeature.py |
|
685 | 685 | |
|
686 | 686 | |
|
687 | 687 | ``format`` |
|
688 | 688 | ---------- |
|
689 | 689 | |
|
690 | 690 | ``usegeneraldelta`` |
|
691 | 691 | Enable or disable the "generaldelta" repository format which improves |
|
692 | 692 | repository compression by allowing "revlog" to store delta against arbitrary |
|
693 | 693 | revision instead of the previous stored one. This provides significant |
|
694 | 694 | improvement for repositories with branches. |
|
695 | 695 | |
|
696 | 696 | Repositories with this on-disk format require Mercurial version 1.9. |
|
697 | 697 | |
|
698 | 698 | Enabled by default. |
|
699 | 699 | |
|
700 | 700 | ``dotencode`` |
|
701 | 701 | Enable or disable the "dotencode" repository format which enhances |
|
702 | 702 | the "fncache" repository format (which has to be enabled to use |
|
703 | 703 | dotencode) to avoid issues with filenames starting with ._ on |
|
704 | 704 | Mac OS X and spaces on Windows. |
|
705 | 705 | |
|
706 | 706 | Repositories with this on-disk format require Mercurial version 1.7. |
|
707 | 707 | |
|
708 | 708 | Enabled by default. |
|
709 | 709 | |
|
710 | 710 | ``usefncache`` |
|
711 | 711 | Enable or disable the "fncache" repository format which enhances |
|
712 | 712 | the "store" repository format (which has to be enabled to use |
|
713 | 713 | fncache) to allow longer filenames and avoids using Windows |
|
714 | 714 | reserved names, e.g. "nul". |
|
715 | 715 | |
|
716 | 716 | Repositories with this on-disk format require Mercurial version 1.1. |
|
717 | 717 | |
|
718 | 718 | Enabled by default. |
|
719 | 719 | |
|
720 | 720 | ``usestore`` |
|
721 | 721 | Enable or disable the "store" repository format which improves |
|
722 | 722 | compatibility with systems that fold case or otherwise mangle |
|
723 | 723 | filenames. Disabling this option will allow you to store longer filenames |
|
724 | 724 | in some situations at the expense of compatibility. |
|
725 | 725 | |
|
726 | 726 | Repositories with this on-disk format require Mercurial version 0.9.4. |
|
727 | 727 | |
|
728 | 728 | Enabled by default. |
|
729 | 729 | |
|
730 | 730 | ``graph`` |
|
731 | 731 | --------- |
|
732 | 732 | |
|
733 | 733 | Web graph view configuration. This section let you change graph |
|
734 | 734 | elements display properties by branches, for instance to make the |
|
735 | 735 | ``default`` branch stand out. |
|
736 | 736 | |
|
737 | 737 | Each line has the following format:: |
|
738 | 738 | |
|
739 | 739 | <branch>.<argument> = <value> |
|
740 | 740 | |
|
741 | 741 | where ``<branch>`` is the name of the branch being |
|
742 | 742 | customized. Example:: |
|
743 | 743 | |
|
744 | 744 | [graph] |
|
745 | 745 | # 2px width |
|
746 | 746 | default.width = 2 |
|
747 | 747 | # red color |
|
748 | 748 | default.color = FF0000 |
|
749 | 749 | |
|
750 | 750 | Supported arguments: |
|
751 | 751 | |
|
752 | 752 | ``width`` |
|
753 | 753 | Set branch edges width in pixels. |
|
754 | 754 | |
|
755 | 755 | ``color`` |
|
756 | 756 | Set branch edges color in hexadecimal RGB notation. |
|
757 | 757 | |
|
758 | 758 | ``hooks`` |
|
759 | 759 | --------- |
|
760 | 760 | |
|
761 | 761 | Commands or Python functions that get automatically executed by |
|
762 | 762 | various actions such as starting or finishing a commit. Multiple |
|
763 | 763 | hooks can be run for the same action by appending a suffix to the |
|
764 | 764 | action. Overriding a site-wide hook can be done by changing its |
|
765 | 765 | value or setting it to an empty string. Hooks can be prioritized |
|
766 | 766 | by adding a prefix of ``priority.`` to the hook name on a new line |
|
767 | 767 | and setting the priority. The default priority is 0. |
|
768 | 768 | |
|
769 | 769 | Example ``.hg/hgrc``:: |
|
770 | 770 | |
|
771 | 771 | [hooks] |
|
772 | 772 | # update working directory after adding changesets |
|
773 | 773 | changegroup.update = hg update |
|
774 | 774 | # do not use the site-wide hook |
|
775 | 775 | incoming = |
|
776 | 776 | incoming.email = /my/email/hook |
|
777 | 777 | incoming.autobuild = /my/build/hook |
|
778 | 778 | # force autobuild hook to run before other incoming hooks |
|
779 | 779 | priority.incoming.autobuild = 1 |
|
780 | 780 | |
|
781 | 781 | Most hooks are run with environment variables set that give useful |
|
782 | 782 | additional information. For each hook below, the environment |
|
783 | 783 | variables it is passed are listed with names of the form ``$HG_foo``. |
|
784 | 784 | |
|
785 | 785 | ``changegroup`` |
|
786 | 786 | Run after a changegroup has been added via push, pull or unbundle. ID of the |
|
787 | 787 | first new changeset is in ``$HG_NODE`` and last in ``$HG_NODE_LAST``. URL |
|
788 | 788 | from which changes came is in ``$HG_URL``. |
|
789 | 789 | |
|
790 | 790 | ``commit`` |
|
791 | 791 | Run after a changeset has been created in the local repository. ID |
|
792 | 792 | of the newly created changeset is in ``$HG_NODE``. Parent changeset |
|
793 | 793 | IDs are in ``$HG_PARENT1`` and ``$HG_PARENT2``. |
|
794 | 794 | |
|
795 | 795 | ``incoming`` |
|
796 | 796 | Run after a changeset has been pulled, pushed, or unbundled into |
|
797 | 797 | the local repository. The ID of the newly arrived changeset is in |
|
798 | 798 | ``$HG_NODE``. URL that was source of changes came is in ``$HG_URL``. |
|
799 | 799 | |
|
800 | 800 | ``outgoing`` |
|
801 | 801 | Run after sending changes from local repository to another. ID of |
|
802 | 802 | first changeset sent is in ``$HG_NODE``. Source of operation is in |
|
803 | 803 | ``$HG_SOURCE``; Also see :hg:`help config.hooks.preoutgoing` hook. |
|
804 | 804 | |
|
805 | 805 | ``post-<command>`` |
|
806 | 806 | Run after successful invocations of the associated command. The |
|
807 | 807 | contents of the command line are passed as ``$HG_ARGS`` and the result |
|
808 | 808 | code in ``$HG_RESULT``. Parsed command line arguments are passed as |
|
809 | 809 | ``$HG_PATS`` and ``$HG_OPTS``. These contain string representations of |
|
810 | 810 | the python data internally passed to <command>. ``$HG_OPTS`` is a |
|
811 | 811 | dictionary of options (with unspecified options set to their defaults). |
|
812 | 812 | ``$HG_PATS`` is a list of arguments. Hook failure is ignored. |
|
813 | 813 | |
|
814 | 814 | ``fail-<command>`` |
|
815 | 815 | Run after a failed invocation of an associated command. The contents |
|
816 | 816 | of the command line are passed as ``$HG_ARGS``. Parsed command line |
|
817 | 817 | arguments are passed as ``$HG_PATS`` and ``$HG_OPTS``. These contain |
|
818 | 818 | string representations of the python data internally passed to |
|
819 | 819 | <command>. ``$HG_OPTS`` is a dictionary of options (with unspecified |
|
820 | 820 | options set to their defaults). ``$HG_PATS`` is a list of arguments. |
|
821 | 821 | Hook failure is ignored. |
|
822 | 822 | |
|
823 | 823 | ``pre-<command>`` |
|
824 | 824 | Run before executing the associated command. The contents of the |
|
825 | 825 | command line are passed as ``$HG_ARGS``. Parsed command line arguments |
|
826 | 826 | are passed as ``$HG_PATS`` and ``$HG_OPTS``. These contain string |
|
827 | 827 | representations of the data internally passed to <command>. ``$HG_OPTS`` |
|
828 | 828 | is a dictionary of options (with unspecified options set to their |
|
829 | 829 | defaults). ``$HG_PATS`` is a list of arguments. If the hook returns |
|
830 | 830 | failure, the command doesn't execute and Mercurial returns the failure |
|
831 | 831 | code. |
|
832 | 832 | |
|
833 | 833 | ``prechangegroup`` |
|
834 | 834 | Run before a changegroup is added via push, pull or unbundle. Exit |
|
835 | 835 | status 0 allows the changegroup to proceed. Non-zero status will |
|
836 | 836 | cause the push, pull or unbundle to fail. URL from which changes |
|
837 | 837 | will come is in ``$HG_URL``. |
|
838 | 838 | |
|
839 | 839 | ``precommit`` |
|
840 | 840 | Run before starting a local commit. Exit status 0 allows the |
|
841 | 841 | commit to proceed. Non-zero status will cause the commit to fail. |
|
842 | 842 | Parent changeset IDs are in ``$HG_PARENT1`` and ``$HG_PARENT2``. |
|
843 | 843 | |
|
844 | 844 | ``prelistkeys`` |
|
845 | 845 | Run before listing pushkeys (like bookmarks) in the |
|
846 | 846 | repository. Non-zero status will cause failure. The key namespace is |
|
847 | 847 | in ``$HG_NAMESPACE``. |
|
848 | 848 | |
|
849 | 849 | ``preoutgoing`` |
|
850 | 850 | Run before collecting changes to send from the local repository to |
|
851 | 851 | another. Non-zero status will cause failure. This lets you prevent |
|
852 | 852 | pull over HTTP or SSH. Also prevents against local pull, push |
|
853 | 853 | (outbound) or bundle commands, but not effective, since you can |
|
854 | 854 | just copy files instead then. Source of operation is in |
|
855 | 855 | ``$HG_SOURCE``. If "serve", operation is happening on behalf of remote |
|
856 | 856 | SSH or HTTP repository. If "push", "pull" or "bundle", operation |
|
857 | 857 | is happening on behalf of repository on same system. |
|
858 | 858 | |
|
859 | 859 | ``prepushkey`` |
|
860 | 860 | Run before a pushkey (like a bookmark) is added to the |
|
861 | 861 | repository. Non-zero status will cause the key to be rejected. The |
|
862 | 862 | key namespace is in ``$HG_NAMESPACE``, the key is in ``$HG_KEY``, |
|
863 | 863 | the old value (if any) is in ``$HG_OLD``, and the new value is in |
|
864 | 864 | ``$HG_NEW``. |
|
865 | 865 | |
|
866 | 866 | ``pretag`` |
|
867 | 867 | Run before creating a tag. Exit status 0 allows the tag to be |
|
868 | 868 | created. Non-zero status will cause the tag to fail. ID of |
|
869 | 869 | changeset to tag is in ``$HG_NODE``. Name of tag is in ``$HG_TAG``. Tag is |
|
870 | 870 | local if ``$HG_LOCAL=1``, in repository if ``$HG_LOCAL=0``. |
|
871 | 871 | |
|
872 | 872 | ``pretxnopen`` |
|
873 | 873 | Run before any new repository transaction is open. The reason for the |
|
874 | 874 | transaction will be in ``$HG_TXNNAME`` and a unique identifier for the |
|
875 | 875 | transaction will be in ``HG_TXNID``. A non-zero status will prevent the |
|
876 | 876 | transaction from being opened. |
|
877 | 877 | |
|
878 | 878 | ``pretxnclose`` |
|
879 | 879 | Run right before the transaction is actually finalized. Any repository change |
|
880 | 880 | will be visible to the hook program. This lets you validate the transaction |
|
881 | 881 | content or change it. Exit status 0 allows the commit to proceed. Non-zero |
|
882 | 882 | status will cause the transaction to be rolled back. The reason for the |
|
883 | 883 | transaction opening will be in ``$HG_TXNNAME`` and a unique identifier for |
|
884 | 884 | the transaction will be in ``HG_TXNID``. The rest of the available data will |
|
885 | 885 | vary according the transaction type. New changesets will add ``$HG_NODE`` (id |
|
886 | 886 | of the first added changeset), ``$HG_NODE_LAST`` (id of the last added |
|
887 | 887 | changeset), ``$HG_URL`` and ``$HG_SOURCE`` variables, bookmarks and phases |
|
888 | 888 | changes will set ``HG_BOOKMARK_MOVED`` and ``HG_PHASES_MOVED`` to ``1``, etc. |
|
889 | 889 | |
|
890 | 890 | ``txnclose`` |
|
891 | 891 | Run after any repository transaction has been committed. At this |
|
892 | 892 | point, the transaction can no longer be rolled back. The hook will run |
|
893 | 893 | after the lock is released. See :hg:`help config.hooks.pretxnclose` docs for |
|
894 | 894 | details about available variables. |
|
895 | 895 | |
|
896 | 896 | ``txnabort`` |
|
897 | 897 | Run when a transaction is aborted. See :hg:`help config.hooks.pretxnclose` |
|
898 | 898 | docs for details about available variables. |
|
899 | 899 | |
|
900 | 900 | ``pretxnchangegroup`` |
|
901 | 901 | Run after a changegroup has been added via push, pull or unbundle, but before |
|
902 | 902 | the transaction has been committed. Changegroup is visible to hook program. |
|
903 | 903 | This lets you validate incoming changes before accepting them. Passed the ID |
|
904 | 904 | of the first new changeset in ``$HG_NODE`` and last in ``$HG_NODE_LAST``. |
|
905 | 905 | Exit status 0 allows the transaction to commit. Non-zero status will cause |
|
906 | 906 | the transaction to be rolled back and the push, pull or unbundle will fail. |
|
907 | 907 | URL that was source of changes is in ``$HG_URL``. |
|
908 | 908 | |
|
909 | 909 | ``pretxncommit`` |
|
910 | 910 | Run after a changeset has been created but the transaction not yet |
|
911 | 911 | committed. Changeset is visible to hook program. This lets you |
|
912 | 912 | validate commit message and changes. Exit status 0 allows the |
|
913 | 913 | commit to proceed. Non-zero status will cause the transaction to |
|
914 | 914 | be rolled back. ID of changeset is in ``$HG_NODE``. Parent changeset |
|
915 | 915 | IDs are in ``$HG_PARENT1`` and ``$HG_PARENT2``. |
|
916 | 916 | |
|
917 | 917 | ``preupdate`` |
|
918 | 918 | Run before updating the working directory. Exit status 0 allows |
|
919 | 919 | the update to proceed. Non-zero status will prevent the update. |
|
920 | 920 | Changeset ID of first new parent is in ``$HG_PARENT1``. If merge, ID |
|
921 | 921 | of second new parent is in ``$HG_PARENT2``. |
|
922 | 922 | |
|
923 | 923 | ``listkeys`` |
|
924 | 924 | Run after listing pushkeys (like bookmarks) in the repository. The |
|
925 | 925 | key namespace is in ``$HG_NAMESPACE``. ``$HG_VALUES`` is a |
|
926 | 926 | dictionary containing the keys and values. |
|
927 | 927 | |
|
928 | 928 | ``pushkey`` |
|
929 | 929 | Run after a pushkey (like a bookmark) is added to the |
|
930 | 930 | repository. The key namespace is in ``$HG_NAMESPACE``, the key is in |
|
931 | 931 | ``$HG_KEY``, the old value (if any) is in ``$HG_OLD``, and the new |
|
932 | 932 | value is in ``$HG_NEW``. |
|
933 | 933 | |
|
934 | 934 | ``tag`` |
|
935 | 935 | Run after a tag is created. ID of tagged changeset is in ``$HG_NODE``. |
|
936 | 936 | Name of tag is in ``$HG_TAG``. Tag is local if ``$HG_LOCAL=1``, in |
|
937 | 937 | repository if ``$HG_LOCAL=0``. |
|
938 | 938 | |
|
939 | 939 | ``update`` |
|
940 | 940 | Run after updating the working directory. Changeset ID of first |
|
941 | 941 | new parent is in ``$HG_PARENT1``. If merge, ID of second new parent is |
|
942 | 942 | in ``$HG_PARENT2``. If the update succeeded, ``$HG_ERROR=0``. If the |
|
943 | 943 | update failed (e.g. because conflicts not resolved), ``$HG_ERROR=1``. |
|
944 | 944 | |
|
945 | 945 | .. note:: |
|
946 | 946 | |
|
947 | 947 | It is generally better to use standard hooks rather than the |
|
948 | 948 | generic pre- and post- command hooks as they are guaranteed to be |
|
949 | 949 | called in the appropriate contexts for influencing transactions. |
|
950 | 950 | Also, hooks like "commit" will be called in all contexts that |
|
951 | 951 | generate a commit (e.g. tag) and not just the commit command. |
|
952 | 952 | |
|
953 | 953 | .. note:: |
|
954 | 954 | |
|
955 | 955 | Environment variables with empty values may not be passed to |
|
956 | 956 | hooks on platforms such as Windows. As an example, ``$HG_PARENT2`` |
|
957 | 957 | will have an empty value under Unix-like platforms for non-merge |
|
958 | 958 | changesets, while it will not be available at all under Windows. |
|
959 | 959 | |
|
960 | 960 | The syntax for Python hooks is as follows:: |
|
961 | 961 | |
|
962 | 962 | hookname = python:modulename.submodule.callable |
|
963 | 963 | hookname = python:/path/to/python/module.py:callable |
|
964 | 964 | |
|
965 | 965 | Python hooks are run within the Mercurial process. Each hook is |
|
966 | 966 | called with at least three keyword arguments: a ui object (keyword |
|
967 | 967 | ``ui``), a repository object (keyword ``repo``), and a ``hooktype`` |
|
968 | 968 | keyword that tells what kind of hook is used. Arguments listed as |
|
969 | 969 | environment variables above are passed as keyword arguments, with no |
|
970 | 970 | ``HG_`` prefix, and names in lower case. |
|
971 | 971 | |
|
972 | 972 | If a Python hook returns a "true" value or raises an exception, this |
|
973 | 973 | is treated as a failure. |
|
974 | 974 | |
|
975 | 975 | |
|
976 | 976 | ``hostfingerprints`` |
|
977 | 977 | -------------------- |
|
978 | 978 | |
|
979 | 979 | (Deprecated. Use ``[hostsecurity]``'s ``fingerprints`` options instead.) |
|
980 | 980 | |
|
981 | 981 | Fingerprints of the certificates of known HTTPS servers. |
|
982 | 982 | |
|
983 | 983 | A HTTPS connection to a server with a fingerprint configured here will |
|
984 | 984 | only succeed if the servers certificate matches the fingerprint. |
|
985 | 985 | This is very similar to how ssh known hosts works. |
|
986 | 986 | |
|
987 | 987 | The fingerprint is the SHA-1 hash value of the DER encoded certificate. |
|
988 | 988 | Multiple values can be specified (separated by spaces or commas). This can |
|
989 | 989 | be used to define both old and new fingerprints while a host transitions |
|
990 | 990 | to a new certificate. |
|
991 | 991 | |
|
992 | 992 | The CA chain and web.cacerts is not used for servers with a fingerprint. |
|
993 | 993 | |
|
994 | 994 | For example:: |
|
995 | 995 | |
|
996 | 996 | [hostfingerprints] |
|
997 | 997 | hg.intevation.de = fc:e2:8d:d9:51:cd:cb:c1:4d:18:6b:b7:44:8d:49:72:57:e6:cd:33 |
|
998 | 998 | hg.intevation.org = fc:e2:8d:d9:51:cd:cb:c1:4d:18:6b:b7:44:8d:49:72:57:e6:cd:33 |
|
999 | 999 | |
|
1000 | 1000 | ``hostsecurity`` |
|
1001 | 1001 | ---------------- |
|
1002 | 1002 | |
|
1003 | 1003 | Used to specify per-host security settings. |
|
1004 | 1004 | |
|
1005 | 1005 | Options in this section have the form ``hostname``:``setting``. This allows |
|
1006 | 1006 | multiple settings to be defined on a per-host basis. |
|
1007 | 1007 | |
|
1008 | 1008 | The following per-host settings can be defined. |
|
1009 | 1009 | |
|
1010 | 1010 | ``fingerprints`` |
|
1011 | 1011 | A list of hashes of the DER encoded peer/remote certificate. Values have |
|
1012 | 1012 | the form ``algorithm``:``fingerprint``. e.g. |
|
1013 | 1013 | ``sha256:c3ab8ff13720e8ad9047dd39466b3c8974e592c2fa383d4a3960714caef0c4f2``. |
|
1014 | 1014 | |
|
1015 | 1015 | The following algorithms/prefixes are supported: ``sha1``, ``sha256``, |
|
1016 | 1016 | ``sha512``. |
|
1017 | 1017 | |
|
1018 | 1018 | Use of ``sha256`` or ``sha512`` is preferred. |
|
1019 | 1019 | |
|
1020 | 1020 | If a fingerprint is specified, the CA chain is not validated for this |
|
1021 | 1021 | host and Mercurial will require the remote certificate to match one |
|
1022 | 1022 | of the fingerprints specified. This means if the server updates its |
|
1023 | 1023 | certificate, Mercurial will abort until a new fingerprint is defined. |
|
1024 | 1024 | This can provide stronger security than traditional CA-based validation |
|
1025 | 1025 | at the expense of convenience. |
|
1026 | 1026 | |
|
1027 | 1027 | This option takes precedence over ``verifycertsfile``. |
|
1028 | 1028 | |
|
1029 | 1029 | ``verifycertsfile`` |
|
1030 | 1030 | Path to file a containing a list of PEM encoded certificates used to |
|
1031 | 1031 | verify the server certificate. Environment variables and ``~user`` |
|
1032 | 1032 | constructs are expanded in the filename. |
|
1033 | 1033 | |
|
1034 | 1034 | The server certificate or the certificate's certificate authority (CA) |
|
1035 | 1035 | must match a certificate from this file or certificate verification |
|
1036 | 1036 | will fail and connections to the server will be refused. |
|
1037 | 1037 | |
|
1038 | 1038 | If defined, only certificates provided by this file will be used: |
|
1039 | 1039 | ``web.cacerts`` and any system/default certificates will not be |
|
1040 | 1040 | used. |
|
1041 | 1041 | |
|
1042 | 1042 | This option has no effect if the per-host ``fingerprints`` option |
|
1043 | 1043 | is set. |
|
1044 | 1044 | |
|
1045 | 1045 | The format of the file is as follows: |
|
1046 | 1046 | |
|
1047 | 1047 | -----BEGIN CERTIFICATE----- |
|
1048 | 1048 | ... (certificate in base64 PEM encoding) ... |
|
1049 | 1049 | -----END CERTIFICATE----- |
|
1050 | 1050 | -----BEGIN CERTIFICATE----- |
|
1051 | 1051 | ... (certificate in base64 PEM encoding) ... |
|
1052 | 1052 | -----END CERTIFICATE----- |
|
1053 | 1053 | |
|
1054 | 1054 | For example:: |
|
1055 | 1055 | |
|
1056 | 1056 | [hostsecurity] |
|
1057 | 1057 | hg.example.com:fingerprints = sha256:c3ab8ff13720e8ad9047dd39466b3c8974e592c2fa383d4a3960714caef0c4f2 |
|
1058 | 1058 | 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 |
|
1059 | 1059 | foo.example.com:verifycertsfile = /etc/ssl/trusted-ca-certs.pem |
|
1060 | 1060 | |
|
1061 | 1061 | ``http_proxy`` |
|
1062 | 1062 | -------------- |
|
1063 | 1063 | |
|
1064 | 1064 | Used to access web-based Mercurial repositories through a HTTP |
|
1065 | 1065 | proxy. |
|
1066 | 1066 | |
|
1067 | 1067 | ``host`` |
|
1068 | 1068 | Host name and (optional) port of the proxy server, for example |
|
1069 | 1069 | "myproxy:8000". |
|
1070 | 1070 | |
|
1071 | 1071 | ``no`` |
|
1072 | 1072 | Optional. Comma-separated list of host names that should bypass |
|
1073 | 1073 | the proxy. |
|
1074 | 1074 | |
|
1075 | 1075 | ``passwd`` |
|
1076 | 1076 | Optional. Password to authenticate with at the proxy server. |
|
1077 | 1077 | |
|
1078 | 1078 | ``user`` |
|
1079 | 1079 | Optional. User name to authenticate with at the proxy server. |
|
1080 | 1080 | |
|
1081 | 1081 | ``always`` |
|
1082 | 1082 | Optional. Always use the proxy, even for localhost and any entries |
|
1083 | 1083 | in ``http_proxy.no``. (default: False) |
|
1084 | 1084 | |
|
1085 | 1085 | ``merge`` |
|
1086 | 1086 | --------- |
|
1087 | 1087 | |
|
1088 | 1088 | This section specifies behavior during merges and updates. |
|
1089 | 1089 | |
|
1090 | 1090 | ``checkignored`` |
|
1091 | 1091 | Controls behavior when an ignored file on disk has the same name as a tracked |
|
1092 | 1092 | file in the changeset being merged or updated to, and has different |
|
1093 | 1093 | contents. Options are ``abort``, ``warn`` and ``ignore``. With ``abort``, |
|
1094 | 1094 | abort on such files. With ``warn``, warn on such files and back them up as |
|
1095 | 1095 | ``.orig``. With ``ignore``, don't print a warning and back them up as |
|
1096 | 1096 | ``.orig``. (default: ``abort``) |
|
1097 | 1097 | |
|
1098 | 1098 | ``checkunknown`` |
|
1099 | 1099 | Controls behavior when an unknown file that isn't ignored has the same name |
|
1100 | 1100 | as a tracked file in the changeset being merged or updated to, and has |
|
1101 | 1101 | different contents. Similar to ``merge.checkignored``, except for files that |
|
1102 | 1102 | are not ignored. (default: ``abort``) |
|
1103 | 1103 | |
|
1104 | 1104 | ``merge-patterns`` |
|
1105 | 1105 | ------------------ |
|
1106 | 1106 | |
|
1107 | 1107 | This section specifies merge tools to associate with particular file |
|
1108 | 1108 | patterns. Tools matched here will take precedence over the default |
|
1109 | 1109 | merge tool. Patterns are globs by default, rooted at the repository |
|
1110 | 1110 | root. |
|
1111 | 1111 | |
|
1112 | 1112 | Example:: |
|
1113 | 1113 | |
|
1114 | 1114 | [merge-patterns] |
|
1115 | 1115 | **.c = kdiff3 |
|
1116 | 1116 | **.jpg = myimgmerge |
|
1117 | 1117 | |
|
1118 | 1118 | ``merge-tools`` |
|
1119 | 1119 | --------------- |
|
1120 | 1120 | |
|
1121 | 1121 | This section configures external merge tools to use for file-level |
|
1122 | 1122 | merges. This section has likely been preconfigured at install time. |
|
1123 | 1123 | Use :hg:`config merge-tools` to check the existing configuration. |
|
1124 | 1124 | Also see :hg:`help merge-tools` for more details. |
|
1125 | 1125 | |
|
1126 | 1126 | Example ``~/.hgrc``:: |
|
1127 | 1127 | |
|
1128 | 1128 | [merge-tools] |
|
1129 | 1129 | # Override stock tool location |
|
1130 | 1130 | kdiff3.executable = ~/bin/kdiff3 |
|
1131 | 1131 | # Specify command line |
|
1132 | 1132 | kdiff3.args = $base $local $other -o $output |
|
1133 | 1133 | # Give higher priority |
|
1134 | 1134 | kdiff3.priority = 1 |
|
1135 | 1135 | |
|
1136 | 1136 | # Changing the priority of preconfigured tool |
|
1137 | 1137 | meld.priority = 0 |
|
1138 | 1138 | |
|
1139 | 1139 | # Disable a preconfigured tool |
|
1140 | 1140 | vimdiff.disabled = yes |
|
1141 | 1141 | |
|
1142 | 1142 | # Define new tool |
|
1143 | 1143 | myHtmlTool.args = -m $local $other $base $output |
|
1144 | 1144 | myHtmlTool.regkey = Software\FooSoftware\HtmlMerge |
|
1145 | 1145 | myHtmlTool.priority = 1 |
|
1146 | 1146 | |
|
1147 | 1147 | Supported arguments: |
|
1148 | 1148 | |
|
1149 | 1149 | ``priority`` |
|
1150 | 1150 | The priority in which to evaluate this tool. |
|
1151 | 1151 | (default: 0) |
|
1152 | 1152 | |
|
1153 | 1153 | ``executable`` |
|
1154 | 1154 | Either just the name of the executable or its pathname. |
|
1155 | 1155 | |
|
1156 | 1156 | .. container:: windows |
|
1157 | 1157 | |
|
1158 | 1158 | On Windows, the path can use environment variables with ${ProgramFiles} |
|
1159 | 1159 | syntax. |
|
1160 | 1160 | |
|
1161 | 1161 | (default: the tool name) |
|
1162 | 1162 | |
|
1163 | 1163 | ``args`` |
|
1164 | 1164 | The arguments to pass to the tool executable. You can refer to the |
|
1165 | 1165 | files being merged as well as the output file through these |
|
1166 | 1166 | variables: ``$base``, ``$local``, ``$other``, ``$output``. The meaning |
|
1167 | 1167 | of ``$local`` and ``$other`` can vary depending on which action is being |
|
1168 | 1168 | performed. During and update or merge, ``$local`` represents the original |
|
1169 | 1169 | state of the file, while ``$other`` represents the commit you are updating |
|
1170 | 1170 | to or the commit you are merging with. During a rebase ``$local`` |
|
1171 | 1171 | represents the destination of the rebase, and ``$other`` represents the |
|
1172 | 1172 | commit being rebased. |
|
1173 | 1173 | (default: ``$local $base $other``) |
|
1174 | 1174 | |
|
1175 | 1175 | ``premerge`` |
|
1176 | 1176 | Attempt to run internal non-interactive 3-way merge tool before |
|
1177 | 1177 | launching external tool. Options are ``true``, ``false``, ``keep`` or |
|
1178 | 1178 | ``keep-merge3``. The ``keep`` option will leave markers in the file if the |
|
1179 | 1179 | premerge fails. The ``keep-merge3`` will do the same but include information |
|
1180 | 1180 | about the base of the merge in the marker (see internal :merge3 in |
|
1181 | 1181 | :hg:`help merge-tools`). |
|
1182 | 1182 | (default: True) |
|
1183 | 1183 | |
|
1184 | 1184 | ``binary`` |
|
1185 | 1185 | This tool can merge binary files. (default: False, unless tool |
|
1186 | 1186 | was selected by file pattern match) |
|
1187 | 1187 | |
|
1188 | 1188 | ``symlink`` |
|
1189 | 1189 | This tool can merge symlinks. (default: False) |
|
1190 | 1190 | |
|
1191 | 1191 | ``check`` |
|
1192 | 1192 | A list of merge success-checking options: |
|
1193 | 1193 | |
|
1194 | 1194 | ``changed`` |
|
1195 | 1195 | Ask whether merge was successful when the merged file shows no changes. |
|
1196 | 1196 | ``conflicts`` |
|
1197 | 1197 | Check whether there are conflicts even though the tool reported success. |
|
1198 | 1198 | ``prompt`` |
|
1199 | 1199 | Always prompt for merge success, regardless of success reported by tool. |
|
1200 | 1200 | |
|
1201 | 1201 | ``fixeol`` |
|
1202 | 1202 | Attempt to fix up EOL changes caused by the merge tool. |
|
1203 | 1203 | (default: False) |
|
1204 | 1204 | |
|
1205 | 1205 | ``gui`` |
|
1206 | 1206 | This tool requires a graphical interface to run. (default: False) |
|
1207 | 1207 | |
|
1208 | 1208 | .. container:: windows |
|
1209 | 1209 | |
|
1210 | 1210 | ``regkey`` |
|
1211 | 1211 | Windows registry key which describes install location of this |
|
1212 | 1212 | tool. Mercurial will search for this key first under |
|
1213 | 1213 | ``HKEY_CURRENT_USER`` and then under ``HKEY_LOCAL_MACHINE``. |
|
1214 | 1214 | (default: None) |
|
1215 | 1215 | |
|
1216 | 1216 | ``regkeyalt`` |
|
1217 | 1217 | An alternate Windows registry key to try if the first key is not |
|
1218 | 1218 | found. The alternate key uses the same ``regname`` and ``regappend`` |
|
1219 | 1219 | semantics of the primary key. The most common use for this key |
|
1220 | 1220 | is to search for 32bit applications on 64bit operating systems. |
|
1221 | 1221 | (default: None) |
|
1222 | 1222 | |
|
1223 | 1223 | ``regname`` |
|
1224 | 1224 | Name of value to read from specified registry key. |
|
1225 | 1225 | (default: the unnamed (default) value) |
|
1226 | 1226 | |
|
1227 | 1227 | ``regappend`` |
|
1228 | 1228 | String to append to the value read from the registry, typically |
|
1229 | 1229 | the executable name of the tool. |
|
1230 | 1230 | (default: None) |
|
1231 | 1231 | |
|
1232 | 1232 | |
|
1233 | 1233 | ``patch`` |
|
1234 | 1234 | --------- |
|
1235 | 1235 | |
|
1236 | 1236 | Settings used when applying patches, for instance through the 'import' |
|
1237 | 1237 | command or with Mercurial Queues extension. |
|
1238 | 1238 | |
|
1239 | 1239 | ``eol`` |
|
1240 | 1240 | When set to 'strict' patch content and patched files end of lines |
|
1241 | 1241 | are preserved. When set to ``lf`` or ``crlf``, both files end of |
|
1242 | 1242 | lines are ignored when patching and the result line endings are |
|
1243 | 1243 | normalized to either LF (Unix) or CRLF (Windows). When set to |
|
1244 | 1244 | ``auto``, end of lines are again ignored while patching but line |
|
1245 | 1245 | endings in patched files are normalized to their original setting |
|
1246 | 1246 | on a per-file basis. If target file does not exist or has no end |
|
1247 | 1247 | of line, patch line endings are preserved. |
|
1248 | 1248 | (default: strict) |
|
1249 | 1249 | |
|
1250 | 1250 | ``fuzz`` |
|
1251 | 1251 | The number of lines of 'fuzz' to allow when applying patches. This |
|
1252 | 1252 | controls how much context the patcher is allowed to ignore when |
|
1253 | 1253 | trying to apply a patch. |
|
1254 | 1254 | (default: 2) |
|
1255 | 1255 | |
|
1256 | 1256 | ``paths`` |
|
1257 | 1257 | --------- |
|
1258 | 1258 | |
|
1259 | 1259 | Assigns symbolic names and behavior to repositories. |
|
1260 | 1260 | |
|
1261 | 1261 | Options are symbolic names defining the URL or directory that is the |
|
1262 | 1262 | location of the repository. Example:: |
|
1263 | 1263 | |
|
1264 | 1264 | [paths] |
|
1265 | 1265 | my_server = https://example.com/my_repo |
|
1266 | 1266 | local_path = /home/me/repo |
|
1267 | 1267 | |
|
1268 | 1268 | These symbolic names can be used from the command line. To pull |
|
1269 | 1269 | from ``my_server``: :hg:`pull my_server`. To push to ``local_path``: |
|
1270 | 1270 | :hg:`push local_path`. |
|
1271 | 1271 | |
|
1272 | 1272 | Options containing colons (``:``) denote sub-options that can influence |
|
1273 | 1273 | behavior for that specific path. Example:: |
|
1274 | 1274 | |
|
1275 | 1275 | [paths] |
|
1276 | 1276 | my_server = https://example.com/my_path |
|
1277 | 1277 | my_server:pushurl = ssh://example.com/my_path |
|
1278 | 1278 | |
|
1279 | 1279 | The following sub-options can be defined: |
|
1280 | 1280 | |
|
1281 | 1281 | ``pushurl`` |
|
1282 | 1282 | The URL to use for push operations. If not defined, the location |
|
1283 | 1283 | defined by the path's main entry is used. |
|
1284 | 1284 | |
|
1285 | 1285 | ``pushrev`` |
|
1286 | 1286 | A revset defining which revisions to push by default. |
|
1287 | 1287 | |
|
1288 | 1288 | When :hg:`push` is executed without a ``-r`` argument, the revset |
|
1289 | 1289 | defined by this sub-option is evaluated to determine what to push. |
|
1290 | 1290 | |
|
1291 | 1291 | For example, a value of ``.`` will push the working directory's |
|
1292 | 1292 | revision by default. |
|
1293 | 1293 | |
|
1294 | 1294 | Revsets specifying bookmarks will not result in the bookmark being |
|
1295 | 1295 | pushed. |
|
1296 | 1296 | |
|
1297 | 1297 | The following special named paths exist: |
|
1298 | 1298 | |
|
1299 | 1299 | ``default`` |
|
1300 | 1300 | The URL or directory to use when no source or remote is specified. |
|
1301 | 1301 | |
|
1302 | 1302 | :hg:`clone` will automatically define this path to the location the |
|
1303 | 1303 | repository was cloned from. |
|
1304 | 1304 | |
|
1305 | 1305 | ``default-push`` |
|
1306 | 1306 | (deprecated) The URL or directory for the default :hg:`push` location. |
|
1307 | 1307 | ``default:pushurl`` should be used instead. |
|
1308 | 1308 | |
|
1309 | 1309 | ``phases`` |
|
1310 | 1310 | ---------- |
|
1311 | 1311 | |
|
1312 | 1312 | Specifies default handling of phases. See :hg:`help phases` for more |
|
1313 | 1313 | information about working with phases. |
|
1314 | 1314 | |
|
1315 | 1315 | ``publish`` |
|
1316 | 1316 | Controls draft phase behavior when working as a server. When true, |
|
1317 | 1317 | pushed changesets are set to public in both client and server and |
|
1318 | 1318 | pulled or cloned changesets are set to public in the client. |
|
1319 | 1319 | (default: True) |
|
1320 | 1320 | |
|
1321 | 1321 | ``new-commit`` |
|
1322 | 1322 | Phase of newly-created commits. |
|
1323 | 1323 | (default: draft) |
|
1324 | 1324 | |
|
1325 | 1325 | ``checksubrepos`` |
|
1326 | 1326 | Check the phase of the current revision of each subrepository. Allowed |
|
1327 | 1327 | values are "ignore", "follow" and "abort". For settings other than |
|
1328 | 1328 | "ignore", the phase of the current revision of each subrepository is |
|
1329 | 1329 | checked before committing the parent repository. If any of those phases is |
|
1330 | 1330 | greater than the phase of the parent repository (e.g. if a subrepo is in a |
|
1331 | 1331 | "secret" phase while the parent repo is in "draft" phase), the commit is |
|
1332 | 1332 | either aborted (if checksubrepos is set to "abort") or the higher phase is |
|
1333 | 1333 | used for the parent repository commit (if set to "follow"). |
|
1334 | 1334 | (default: follow) |
|
1335 | 1335 | |
|
1336 | 1336 | |
|
1337 | 1337 | ``profiling`` |
|
1338 | 1338 | ------------- |
|
1339 | 1339 | |
|
1340 | 1340 | Specifies profiling type, format, and file output. Two profilers are |
|
1341 | 1341 | supported: an instrumenting profiler (named ``ls``), and a sampling |
|
1342 | 1342 | profiler (named ``stat``). |
|
1343 | 1343 | |
|
1344 | 1344 | In this section description, 'profiling data' stands for the raw data |
|
1345 | 1345 | collected during profiling, while 'profiling report' stands for a |
|
1346 | 1346 | statistical text report generated from the profiling data. The |
|
1347 | 1347 | profiling is done using lsprof. |
|
1348 | 1348 | |
|
1349 | 1349 | ``type`` |
|
1350 | 1350 | The type of profiler to use. |
|
1351 | 1351 | (default: ls) |
|
1352 | 1352 | |
|
1353 | 1353 | ``ls`` |
|
1354 | 1354 | Use Python's built-in instrumenting profiler. This profiler |
|
1355 | 1355 | works on all platforms, but each line number it reports is the |
|
1356 | 1356 | first line of a function. This restriction makes it difficult to |
|
1357 | 1357 | identify the expensive parts of a non-trivial function. |
|
1358 | 1358 | ``stat`` |
|
1359 | 1359 | Use a third-party statistical profiler, statprof. This profiler |
|
1360 | 1360 | currently runs only on Unix systems, and is most useful for |
|
1361 | 1361 | profiling commands that run for longer than about 0.1 seconds. |
|
1362 | 1362 | |
|
1363 | 1363 | ``format`` |
|
1364 | 1364 | Profiling format. Specific to the ``ls`` instrumenting profiler. |
|
1365 | 1365 | (default: text) |
|
1366 | 1366 | |
|
1367 | 1367 | ``text`` |
|
1368 | 1368 | Generate a profiling report. When saving to a file, it should be |
|
1369 | 1369 | noted that only the report is saved, and the profiling data is |
|
1370 | 1370 | not kept. |
|
1371 | 1371 | ``kcachegrind`` |
|
1372 | 1372 | Format profiling data for kcachegrind use: when saving to a |
|
1373 | 1373 | file, the generated file can directly be loaded into |
|
1374 | 1374 | kcachegrind. |
|
1375 | 1375 | |
|
1376 | 1376 | ``frequency`` |
|
1377 | 1377 | Sampling frequency. Specific to the ``stat`` sampling profiler. |
|
1378 | 1378 | (default: 1000) |
|
1379 | 1379 | |
|
1380 | 1380 | ``output`` |
|
1381 | 1381 | File path where profiling data or report should be saved. If the |
|
1382 | 1382 | file exists, it is replaced. (default: None, data is printed on |
|
1383 | 1383 | stderr) |
|
1384 | 1384 | |
|
1385 | 1385 | ``sort`` |
|
1386 | 1386 | Sort field. Specific to the ``ls`` instrumenting profiler. |
|
1387 | 1387 | One of ``callcount``, ``reccallcount``, ``totaltime`` and |
|
1388 | 1388 | ``inlinetime``. |
|
1389 | 1389 | (default: inlinetime) |
|
1390 | 1390 | |
|
1391 | 1391 | ``limit`` |
|
1392 | 1392 | Number of lines to show. Specific to the ``ls`` instrumenting profiler. |
|
1393 | 1393 | (default: 30) |
|
1394 | 1394 | |
|
1395 | 1395 | ``nested`` |
|
1396 | 1396 | Show at most this number of lines of drill-down info after each main entry. |
|
1397 | 1397 | This can help explain the difference between Total and Inline. |
|
1398 | 1398 | Specific to the ``ls`` instrumenting profiler. |
|
1399 | 1399 | (default: 5) |
|
1400 | 1400 | |
|
1401 | 1401 | ``progress`` |
|
1402 | 1402 | ------------ |
|
1403 | 1403 | |
|
1404 | 1404 | Mercurial commands can draw progress bars that are as informative as |
|
1405 | 1405 | possible. Some progress bars only offer indeterminate information, while others |
|
1406 | 1406 | have a definite end point. |
|
1407 | 1407 | |
|
1408 | 1408 | ``delay`` |
|
1409 | 1409 | Number of seconds (float) before showing the progress bar. (default: 3) |
|
1410 | 1410 | |
|
1411 | 1411 | ``changedelay`` |
|
1412 | 1412 | Minimum delay before showing a new topic. When set to less than 3 * refresh, |
|
1413 | 1413 | that value will be used instead. (default: 1) |
|
1414 | 1414 | |
|
1415 | 1415 | ``refresh`` |
|
1416 | 1416 | Time in seconds between refreshes of the progress bar. (default: 0.1) |
|
1417 | 1417 | |
|
1418 | 1418 | ``format`` |
|
1419 | 1419 | Format of the progress bar. |
|
1420 | 1420 | |
|
1421 | 1421 | Valid entries for the format field are ``topic``, ``bar``, ``number``, |
|
1422 | 1422 | ``unit``, ``estimate``, ``speed``, and ``item``. ``item`` defaults to the |
|
1423 | 1423 | last 20 characters of the item, but this can be changed by adding either |
|
1424 | 1424 | ``-<num>`` which would take the last num characters, or ``+<num>`` for the |
|
1425 | 1425 | first num characters. |
|
1426 | 1426 | |
|
1427 | 1427 | (default: topic bar number estimate) |
|
1428 | 1428 | |
|
1429 | 1429 | ``width`` |
|
1430 | 1430 | If set, the maximum width of the progress information (that is, min(width, |
|
1431 | 1431 | term width) will be used). |
|
1432 | 1432 | |
|
1433 | 1433 | ``clear-complete`` |
|
1434 | 1434 | Clear the progress bar after it's done. (default: True) |
|
1435 | 1435 | |
|
1436 | 1436 | ``disable`` |
|
1437 | 1437 | If true, don't show a progress bar. |
|
1438 | 1438 | |
|
1439 | 1439 | ``assume-tty`` |
|
1440 | 1440 | If true, ALWAYS show a progress bar, unless disable is given. |
|
1441 | 1441 | |
|
1442 | 1442 | ``rebase`` |
|
1443 | 1443 | ---------- |
|
1444 | 1444 | |
|
1445 | 1445 | ``allowdivergence`` |
|
1446 | 1446 | Default to False, when True allow creating divergence when performing |
|
1447 | 1447 | rebase of obsolete changesets. |
|
1448 | 1448 | |
|
1449 | 1449 | ``revsetalias`` |
|
1450 | 1450 | --------------- |
|
1451 | 1451 | |
|
1452 | 1452 | Alias definitions for revsets. See :hg:`help revsets` for details. |
|
1453 | 1453 | |
|
1454 | 1454 | ``server`` |
|
1455 | 1455 | ---------- |
|
1456 | 1456 | |
|
1457 | 1457 | Controls generic server settings. |
|
1458 | 1458 | |
|
1459 | 1459 | ``uncompressed`` |
|
1460 | 1460 | Whether to allow clients to clone a repository using the |
|
1461 | 1461 | uncompressed streaming protocol. This transfers about 40% more |
|
1462 | 1462 | data than a regular clone, but uses less memory and CPU on both |
|
1463 | 1463 | server and client. Over a LAN (100 Mbps or better) or a very fast |
|
1464 | 1464 | WAN, an uncompressed streaming clone is a lot faster (~10x) than a |
|
1465 | 1465 | regular clone. Over most WAN connections (anything slower than |
|
1466 | 1466 | about 6 Mbps), uncompressed streaming is slower, because of the |
|
1467 | 1467 | extra data transfer overhead. This mode will also temporarily hold |
|
1468 | 1468 | the write lock while determining what data to transfer. |
|
1469 | 1469 | (default: True) |
|
1470 | 1470 | |
|
1471 | 1471 | ``preferuncompressed`` |
|
1472 | 1472 | When set, clients will try to use the uncompressed streaming |
|
1473 | 1473 | protocol. (default: False) |
|
1474 | 1474 | |
|
1475 | 1475 | ``validate`` |
|
1476 | 1476 | Whether to validate the completeness of pushed changesets by |
|
1477 | 1477 | checking that all new file revisions specified in manifests are |
|
1478 | 1478 | present. (default: False) |
|
1479 | 1479 | |
|
1480 | 1480 | ``maxhttpheaderlen`` |
|
1481 | 1481 | Instruct HTTP clients not to send request headers longer than this |
|
1482 | 1482 | many bytes. (default: 1024) |
|
1483 | 1483 | |
|
1484 | 1484 | ``bundle1`` |
|
1485 | 1485 | Whether to allow clients to push and pull using the legacy bundle1 |
|
1486 | 1486 | exchange format. (default: True) |
|
1487 | 1487 | |
|
1488 | 1488 | ``bundle1gd`` |
|
1489 | 1489 | Like ``bundle1`` but only used if the repository is using the |
|
1490 | 1490 | *generaldelta* storage format. (default: True) |
|
1491 | 1491 | |
|
1492 | 1492 | ``bundle1.push`` |
|
1493 | 1493 | Whether to allow clients to push using the legacy bundle1 exchange |
|
1494 | 1494 | format. (default: True) |
|
1495 | 1495 | |
|
1496 | 1496 | ``bundle1gd.push`` |
|
1497 | 1497 | Like ``bundle1.push`` but only used if the repository is using the |
|
1498 | 1498 | *generaldelta* storage format. (default: True) |
|
1499 | 1499 | |
|
1500 | 1500 | ``bundle1.pull`` |
|
1501 | 1501 | Whether to allow clients to pull using the legacy bundle1 exchange |
|
1502 | 1502 | format. (default: True) |
|
1503 | 1503 | |
|
1504 | 1504 | ``bundle1gd.pull`` |
|
1505 | 1505 | Like ``bundle1.pull`` but only used if the repository is using the |
|
1506 | 1506 | *generaldelta* storage format. (default: True) |
|
1507 | 1507 | |
|
1508 | 1508 | Large repositories using the *generaldelta* storage format should |
|
1509 | 1509 | consider setting this option because converting *generaldelta* |
|
1510 | 1510 | repositories to the exchange format required by the bundle1 data |
|
1511 | 1511 | format can consume a lot of CPU. |
|
1512 | 1512 | |
|
1513 | 1513 | ``smtp`` |
|
1514 | 1514 | -------- |
|
1515 | 1515 | |
|
1516 | 1516 | Configuration for extensions that need to send email messages. |
|
1517 | 1517 | |
|
1518 | 1518 | ``host`` |
|
1519 | 1519 | Host name of mail server, e.g. "mail.example.com". |
|
1520 | 1520 | |
|
1521 | 1521 | ``port`` |
|
1522 | 1522 | Optional. Port to connect to on mail server. (default: 465 if |
|
1523 | 1523 | ``tls`` is smtps; 25 otherwise) |
|
1524 | 1524 | |
|
1525 | 1525 | ``tls`` |
|
1526 | 1526 | Optional. Method to enable TLS when connecting to mail server: starttls, |
|
1527 | 1527 | smtps or none. (default: none) |
|
1528 | 1528 | |
|
1529 | 1529 | ``username`` |
|
1530 | 1530 | Optional. User name for authenticating with the SMTP server. |
|
1531 | 1531 | (default: None) |
|
1532 | 1532 | |
|
1533 | 1533 | ``password`` |
|
1534 | 1534 | Optional. Password for authenticating with the SMTP server. If not |
|
1535 | 1535 | specified, interactive sessions will prompt the user for a |
|
1536 | 1536 | password; non-interactive sessions will fail. (default: None) |
|
1537 | 1537 | |
|
1538 | 1538 | ``local_hostname`` |
|
1539 | 1539 | Optional. The hostname that the sender can use to identify |
|
1540 | 1540 | itself to the MTA. |
|
1541 | 1541 | |
|
1542 | 1542 | |
|
1543 | 1543 | ``subpaths`` |
|
1544 | 1544 | ------------ |
|
1545 | 1545 | |
|
1546 | 1546 | Subrepository source URLs can go stale if a remote server changes name |
|
1547 | 1547 | or becomes temporarily unavailable. This section lets you define |
|
1548 | 1548 | rewrite rules of the form:: |
|
1549 | 1549 | |
|
1550 | 1550 | <pattern> = <replacement> |
|
1551 | 1551 | |
|
1552 | 1552 | where ``pattern`` is a regular expression matching a subrepository |
|
1553 | 1553 | source URL and ``replacement`` is the replacement string used to |
|
1554 | 1554 | rewrite it. Groups can be matched in ``pattern`` and referenced in |
|
1555 | 1555 | ``replacements``. For instance:: |
|
1556 | 1556 | |
|
1557 | 1557 | http://server/(.*)-hg/ = http://hg.server/\1/ |
|
1558 | 1558 | |
|
1559 | 1559 | rewrites ``http://server/foo-hg/`` into ``http://hg.server/foo/``. |
|
1560 | 1560 | |
|
1561 | 1561 | Relative subrepository paths are first made absolute, and the |
|
1562 | 1562 | rewrite rules are then applied on the full (absolute) path. If ``pattern`` |
|
1563 | 1563 | doesn't match the full path, an attempt is made to apply it on the |
|
1564 | 1564 | relative path alone. The rules are applied in definition order. |
|
1565 | 1565 | |
|
1566 | 1566 | ``templatealias`` |
|
1567 | 1567 | ----------------- |
|
1568 | 1568 | |
|
1569 | 1569 | Alias definitions for templates. See :hg:`help templates` for details. |
|
1570 | 1570 | |
|
1571 | 1571 | ``trusted`` |
|
1572 | 1572 | ----------- |
|
1573 | 1573 | |
|
1574 | 1574 | Mercurial will not use the settings in the |
|
1575 | 1575 | ``.hg/hgrc`` file from a repository if it doesn't belong to a trusted |
|
1576 | 1576 | user or to a trusted group, as various hgrc features allow arbitrary |
|
1577 | 1577 | commands to be run. This issue is often encountered when configuring |
|
1578 | 1578 | hooks or extensions for shared repositories or servers. However, |
|
1579 | 1579 | the web interface will use some safe settings from the ``[web]`` |
|
1580 | 1580 | section. |
|
1581 | 1581 | |
|
1582 | 1582 | This section specifies what users and groups are trusted. The |
|
1583 | 1583 | current user is always trusted. To trust everybody, list a user or a |
|
1584 | 1584 | group with name ``*``. These settings must be placed in an |
|
1585 | 1585 | *already-trusted file* to take effect, such as ``$HOME/.hgrc`` of the |
|
1586 | 1586 | user or service running Mercurial. |
|
1587 | 1587 | |
|
1588 | 1588 | ``users`` |
|
1589 | 1589 | Comma-separated list of trusted users. |
|
1590 | 1590 | |
|
1591 | 1591 | ``groups`` |
|
1592 | 1592 | Comma-separated list of trusted groups. |
|
1593 | 1593 | |
|
1594 | 1594 | |
|
1595 | 1595 | ``ui`` |
|
1596 | 1596 | ------ |
|
1597 | 1597 | |
|
1598 | 1598 | User interface controls. |
|
1599 | 1599 | |
|
1600 | 1600 | ``archivemeta`` |
|
1601 | 1601 | Whether to include the .hg_archival.txt file containing meta data |
|
1602 | 1602 | (hashes for the repository base and for tip) in archives created |
|
1603 | 1603 | by the :hg:`archive` command or downloaded via hgweb. |
|
1604 | 1604 | (default: True) |
|
1605 | 1605 | |
|
1606 | 1606 | ``askusername`` |
|
1607 | 1607 | Whether to prompt for a username when committing. If True, and |
|
1608 | 1608 | neither ``$HGUSER`` nor ``$EMAIL`` has been specified, then the user will |
|
1609 | 1609 | be prompted to enter a username. If no username is entered, the |
|
1610 | 1610 | default ``USER@HOST`` is used instead. |
|
1611 | 1611 | (default: False) |
|
1612 | 1612 | |
|
1613 | 1613 | ``clonebundles`` |
|
1614 | 1614 | Whether the "clone bundles" feature is enabled. |
|
1615 | 1615 | |
|
1616 | 1616 | When enabled, :hg:`clone` may download and apply a server-advertised |
|
1617 | 1617 | bundle file from a URL instead of using the normal exchange mechanism. |
|
1618 | 1618 | |
|
1619 | 1619 | This can likely result in faster and more reliable clones. |
|
1620 | 1620 | |
|
1621 | 1621 | (default: True) |
|
1622 | 1622 | |
|
1623 | 1623 | ``clonebundlefallback`` |
|
1624 | 1624 | Whether failure to apply an advertised "clone bundle" from a server |
|
1625 | 1625 | should result in fallback to a regular clone. |
|
1626 | 1626 | |
|
1627 | 1627 | This is disabled by default because servers advertising "clone |
|
1628 | 1628 | bundles" often do so to reduce server load. If advertised bundles |
|
1629 | 1629 | start mass failing and clients automatically fall back to a regular |
|
1630 | 1630 | clone, this would add significant and unexpected load to the server |
|
1631 | 1631 | since the server is expecting clone operations to be offloaded to |
|
1632 | 1632 | pre-generated bundles. Failing fast (the default behavior) ensures |
|
1633 | 1633 | clients don't overwhelm the server when "clone bundle" application |
|
1634 | 1634 | fails. |
|
1635 | 1635 | |
|
1636 | 1636 | (default: False) |
|
1637 | 1637 | |
|
1638 | 1638 | ``clonebundleprefers`` |
|
1639 | 1639 | Defines preferences for which "clone bundles" to use. |
|
1640 | 1640 | |
|
1641 | 1641 | Servers advertising "clone bundles" may advertise multiple available |
|
1642 | 1642 | bundles. Each bundle may have different attributes, such as the bundle |
|
1643 | 1643 | type and compression format. This option is used to prefer a particular |
|
1644 | 1644 | bundle over another. |
|
1645 | 1645 | |
|
1646 | 1646 | The following keys are defined by Mercurial: |
|
1647 | 1647 | |
|
1648 | 1648 | BUNDLESPEC |
|
1649 | 1649 | A bundle type specifier. These are strings passed to :hg:`bundle -t`. |
|
1650 | 1650 | e.g. ``gzip-v2`` or ``bzip2-v1``. |
|
1651 | 1651 | |
|
1652 | 1652 | COMPRESSION |
|
1653 | 1653 | The compression format of the bundle. e.g. ``gzip`` and ``bzip2``. |
|
1654 | 1654 | |
|
1655 | 1655 | Server operators may define custom keys. |
|
1656 | 1656 | |
|
1657 | 1657 | Example values: ``COMPRESSION=bzip2``, |
|
1658 | 1658 | ``BUNDLESPEC=gzip-v2, COMPRESSION=gzip``. |
|
1659 | 1659 | |
|
1660 | 1660 | By default, the first bundle advertised by the server is used. |
|
1661 | 1661 | |
|
1662 | 1662 | ``commitsubrepos`` |
|
1663 | 1663 | Whether to commit modified subrepositories when committing the |
|
1664 | 1664 | parent repository. If False and one subrepository has uncommitted |
|
1665 | 1665 | changes, abort the commit. |
|
1666 | 1666 | (default: False) |
|
1667 | 1667 | |
|
1668 | 1668 | ``debug`` |
|
1669 | 1669 | Print debugging information. (default: False) |
|
1670 | 1670 | |
|
1671 | 1671 | ``editor`` |
|
1672 | 1672 | The editor to use during a commit. (default: ``$EDITOR`` or ``vi``) |
|
1673 | 1673 | |
|
1674 | 1674 | ``fallbackencoding`` |
|
1675 | 1675 | Encoding to try if it's not possible to decode the changelog using |
|
1676 | 1676 | UTF-8. (default: ISO-8859-1) |
|
1677 | 1677 | |
|
1678 | 1678 | ``graphnodetemplate`` |
|
1679 | 1679 | The template used to print changeset nodes in an ASCII revision graph. |
|
1680 | 1680 | (default: ``{graphnode}``) |
|
1681 | 1681 | |
|
1682 | 1682 | ``ignore`` |
|
1683 | 1683 | A file to read per-user ignore patterns from. This file should be |
|
1684 | 1684 | in the same format as a repository-wide .hgignore file. Filenames |
|
1685 | 1685 | are relative to the repository root. This option supports hook syntax, |
|
1686 | 1686 | so if you want to specify multiple ignore files, you can do so by |
|
1687 | 1687 | setting something like ``ignore.other = ~/.hgignore2``. For details |
|
1688 | 1688 | of the ignore file format, see the ``hgignore(5)`` man page. |
|
1689 | 1689 | |
|
1690 | 1690 | ``interactive`` |
|
1691 | 1691 | Allow to prompt the user. (default: True) |
|
1692 | 1692 | |
|
1693 | 1693 | ``interface`` |
|
1694 | 1694 | Select the default interface for interactive features (default: text). |
|
1695 | 1695 | Possible values are 'text' and 'curses'. |
|
1696 | 1696 | |
|
1697 | 1697 | ``interface.chunkselector`` |
|
1698 | 1698 | Select the interface for change recording (e.g. :hg:`commit` -i). |
|
1699 | 1699 | Possible values are 'text' and 'curses'. |
|
1700 | 1700 | This config overrides the interface specified by ui.interface. |
|
1701 | 1701 | |
|
1702 | 1702 | ``logtemplate`` |
|
1703 | 1703 | Template string for commands that print changesets. |
|
1704 | 1704 | |
|
1705 | 1705 | ``merge`` |
|
1706 | 1706 | The conflict resolution program to use during a manual merge. |
|
1707 | 1707 | For more information on merge tools see :hg:`help merge-tools`. |
|
1708 | 1708 | For configuring merge tools see the ``[merge-tools]`` section. |
|
1709 | 1709 | |
|
1710 | 1710 | ``mergemarkers`` |
|
1711 | 1711 | Sets the merge conflict marker label styling. The ``detailed`` |
|
1712 | 1712 | style uses the ``mergemarkertemplate`` setting to style the labels. |
|
1713 | 1713 | The ``basic`` style just uses 'local' and 'other' as the marker label. |
|
1714 | 1714 | One of ``basic`` or ``detailed``. |
|
1715 | 1715 | (default: ``basic``) |
|
1716 | 1716 | |
|
1717 | 1717 | ``mergemarkertemplate`` |
|
1718 | 1718 | The template used to print the commit description next to each conflict |
|
1719 | 1719 | marker during merge conflicts. See :hg:`help templates` for the template |
|
1720 | 1720 | format. |
|
1721 | 1721 | |
|
1722 | 1722 | Defaults to showing the hash, tags, branches, bookmarks, author, and |
|
1723 | 1723 | the first line of the commit description. |
|
1724 | 1724 | |
|
1725 | 1725 | If you use non-ASCII characters in names for tags, branches, bookmarks, |
|
1726 | 1726 | authors, and/or commit descriptions, you must pay attention to encodings of |
|
1727 | 1727 | managed files. At template expansion, non-ASCII characters use the encoding |
|
1728 | 1728 | specified by the ``--encoding`` global option, ``HGENCODING`` or other |
|
1729 | 1729 | environment variables that govern your locale. If the encoding of the merge |
|
1730 | 1730 | markers is different from the encoding of the merged files, |
|
1731 | 1731 | serious problems may occur. |
|
1732 | 1732 | |
|
1733 | 1733 | ``origbackuppath`` |
|
1734 | 1734 | The path to a directory used to store generated .orig files. If the path is |
|
1735 | 1735 | not a directory, one will be created. |
|
1736 | 1736 | |
|
1737 | 1737 | ``patch`` |
|
1738 | 1738 | An optional external tool that ``hg import`` and some extensions |
|
1739 | 1739 | will use for applying patches. By default Mercurial uses an |
|
1740 | 1740 | internal patch utility. The external tool must work as the common |
|
1741 | 1741 | Unix ``patch`` program. In particular, it must accept a ``-p`` |
|
1742 | 1742 | argument to strip patch headers, a ``-d`` argument to specify the |
|
1743 | 1743 | current directory, a file name to patch, and a patch file to take |
|
1744 | 1744 | from stdin. |
|
1745 | 1745 | |
|
1746 | 1746 | It is possible to specify a patch tool together with extra |
|
1747 | 1747 | arguments. For example, setting this option to ``patch --merge`` |
|
1748 | 1748 | will use the ``patch`` program with its 2-way merge option. |
|
1749 | 1749 | |
|
1750 | 1750 | ``portablefilenames`` |
|
1751 | 1751 | Check for portable filenames. Can be ``warn``, ``ignore`` or ``abort``. |
|
1752 | 1752 | (default: ``warn``) |
|
1753 | 1753 | |
|
1754 | 1754 | ``warn`` |
|
1755 | 1755 | Print a warning message on POSIX platforms, if a file with a non-portable |
|
1756 | 1756 | filename is added (e.g. a file with a name that can't be created on |
|
1757 | 1757 | Windows because it contains reserved parts like ``AUX``, reserved |
|
1758 | 1758 | characters like ``:``, or would cause a case collision with an existing |
|
1759 | 1759 | file). |
|
1760 | 1760 | |
|
1761 | 1761 | ``ignore`` |
|
1762 | 1762 | Don't print a warning. |
|
1763 | 1763 | |
|
1764 | 1764 | ``abort`` |
|
1765 | 1765 | The command is aborted. |
|
1766 | 1766 | |
|
1767 | 1767 | ``true`` |
|
1768 | 1768 | Alias for ``warn``. |
|
1769 | 1769 | |
|
1770 | 1770 | ``false`` |
|
1771 | 1771 | Alias for ``ignore``. |
|
1772 | 1772 | |
|
1773 | 1773 | .. container:: windows |
|
1774 | 1774 | |
|
1775 | 1775 | On Windows, this configuration option is ignored and the command aborted. |
|
1776 | 1776 | |
|
1777 | 1777 | ``quiet`` |
|
1778 | 1778 | Reduce the amount of output printed. |
|
1779 | 1779 | (default: False) |
|
1780 | 1780 | |
|
1781 | 1781 | ``remotecmd`` |
|
1782 | 1782 | Remote command to use for clone/push/pull operations. |
|
1783 | 1783 | (default: ``hg``) |
|
1784 | 1784 | |
|
1785 | 1785 | ``report_untrusted`` |
|
1786 | 1786 | Warn if a ``.hg/hgrc`` file is ignored due to not being owned by a |
|
1787 | 1787 | trusted user or group. |
|
1788 | 1788 | (default: True) |
|
1789 | 1789 | |
|
1790 | 1790 | ``slash`` |
|
1791 | 1791 | Display paths using a slash (``/``) as the path separator. This |
|
1792 | 1792 | only makes a difference on systems where the default path |
|
1793 | 1793 | separator is not the slash character (e.g. Windows uses the |
|
1794 | 1794 | backslash character (``\``)). |
|
1795 | 1795 | (default: False) |
|
1796 | 1796 | |
|
1797 | 1797 | ``statuscopies`` |
|
1798 | 1798 | Display copies in the status command. |
|
1799 | 1799 | |
|
1800 | 1800 | ``ssh`` |
|
1801 | 1801 | Command to use for SSH connections. (default: ``ssh``) |
|
1802 | 1802 | |
|
1803 | 1803 | ``strict`` |
|
1804 | 1804 | Require exact command names, instead of allowing unambiguous |
|
1805 | 1805 | abbreviations. (default: False) |
|
1806 | 1806 | |
|
1807 | 1807 | ``style`` |
|
1808 | 1808 | Name of style to use for command output. |
|
1809 | 1809 | |
|
1810 | 1810 | ``supportcontact`` |
|
1811 | 1811 | A URL where users should report a Mercurial traceback. Use this if you are a |
|
1812 | 1812 | large organisation with its own Mercurial deployment process and crash |
|
1813 | 1813 | reports should be addressed to your internal support. |
|
1814 | 1814 | |
|
1815 | 1815 | ``textwidth`` |
|
1816 | 1816 | Maximum width of help text. A longer line generated by ``hg help`` or |
|
1817 | 1817 | ``hg subcommand --help`` will be broken after white space to get this |
|
1818 | 1818 | width or the terminal width, whichever comes first. |
|
1819 | 1819 | A non-positive value will disable this and the terminal width will be |
|
1820 | 1820 | used. (default: 78) |
|
1821 | 1821 | |
|
1822 | 1822 | ``timeout`` |
|
1823 | 1823 | The timeout used when a lock is held (in seconds), a negative value |
|
1824 | 1824 | means no timeout. (default: 600) |
|
1825 | 1825 | |
|
1826 | 1826 | ``traceback`` |
|
1827 | 1827 | Mercurial always prints a traceback when an unknown exception |
|
1828 | 1828 | occurs. Setting this to True will make Mercurial print a traceback |
|
1829 | 1829 | on all exceptions, even those recognized by Mercurial (such as |
|
1830 | 1830 | IOError or MemoryError). (default: False) |
|
1831 | 1831 | |
|
1832 | 1832 | ``username`` |
|
1833 | 1833 | The committer of a changeset created when running "commit". |
|
1834 | 1834 | Typically a person's name and email address, e.g. ``Fred Widget |
|
1835 | 1835 | <fred@example.com>``. Environment variables in the |
|
1836 | 1836 | username are expanded. |
|
1837 | 1837 | |
|
1838 | 1838 | (default: ``$EMAIL`` or ``username@hostname``. If the username in |
|
1839 | 1839 | hgrc is empty, e.g. if the system admin set ``username =`` in the |
|
1840 | 1840 | system hgrc, it has to be specified manually or in a different |
|
1841 | 1841 | hgrc file) |
|
1842 | 1842 | |
|
1843 | 1843 | ``verbose`` |
|
1844 | 1844 | Increase the amount of output printed. (default: False) |
|
1845 | 1845 | |
|
1846 | 1846 | |
|
1847 | 1847 | ``web`` |
|
1848 | 1848 | ------- |
|
1849 | 1849 | |
|
1850 | 1850 | Web interface configuration. The settings in this section apply to |
|
1851 | 1851 | both the builtin webserver (started by :hg:`serve`) and the script you |
|
1852 | 1852 | run through a webserver (``hgweb.cgi`` and the derivatives for FastCGI |
|
1853 | 1853 | and WSGI). |
|
1854 | 1854 | |
|
1855 | 1855 | The Mercurial webserver does no authentication (it does not prompt for |
|
1856 | 1856 | usernames and passwords to validate *who* users are), but it does do |
|
1857 | 1857 | authorization (it grants or denies access for *authenticated users* |
|
1858 | 1858 | based on settings in this section). You must either configure your |
|
1859 | 1859 | webserver to do authentication for you, or disable the authorization |
|
1860 | 1860 | checks. |
|
1861 | 1861 | |
|
1862 | 1862 | For a quick setup in a trusted environment, e.g., a private LAN, where |
|
1863 | 1863 | you want it to accept pushes from anybody, you can use the following |
|
1864 | 1864 | command line:: |
|
1865 | 1865 | |
|
1866 | 1866 | $ hg --config web.allow_push=* --config web.push_ssl=False serve |
|
1867 | 1867 | |
|
1868 | 1868 | Note that this will allow anybody to push anything to the server and |
|
1869 | 1869 | that this should not be used for public servers. |
|
1870 | 1870 | |
|
1871 | 1871 | The full set of options is: |
|
1872 | 1872 | |
|
1873 | 1873 | ``accesslog`` |
|
1874 | 1874 | Where to output the access log. (default: stdout) |
|
1875 | 1875 | |
|
1876 | 1876 | ``address`` |
|
1877 | 1877 | Interface address to bind to. (default: all) |
|
1878 | 1878 | |
|
1879 | 1879 | ``allow_archive`` |
|
1880 | 1880 | List of archive format (bz2, gz, zip) allowed for downloading. |
|
1881 | 1881 | (default: empty) |
|
1882 | 1882 | |
|
1883 | 1883 | ``allowbz2`` |
|
1884 | 1884 | (DEPRECATED) Whether to allow .tar.bz2 downloading of repository |
|
1885 | 1885 | revisions. |
|
1886 | 1886 | (default: False) |
|
1887 | 1887 | |
|
1888 | 1888 | ``allowgz`` |
|
1889 | 1889 | (DEPRECATED) Whether to allow .tar.gz downloading of repository |
|
1890 | 1890 | revisions. |
|
1891 | 1891 | (default: False) |
|
1892 | 1892 | |
|
1893 | 1893 | ``allowpull`` |
|
1894 | 1894 | Whether to allow pulling from the repository. (default: True) |
|
1895 | 1895 | |
|
1896 | 1896 | ``allow_push`` |
|
1897 | 1897 | Whether to allow pushing to the repository. If empty or not set, |
|
1898 | 1898 | pushing is not allowed. If the special value ``*``, any remote |
|
1899 | 1899 | user can push, including unauthenticated users. Otherwise, the |
|
1900 | 1900 | remote user must have been authenticated, and the authenticated |
|
1901 | 1901 | user name must be present in this list. The contents of the |
|
1902 | 1902 | allow_push list are examined after the deny_push list. |
|
1903 | 1903 | |
|
1904 | 1904 | ``allow_read`` |
|
1905 | 1905 | If the user has not already been denied repository access due to |
|
1906 | 1906 | the contents of deny_read, this list determines whether to grant |
|
1907 | 1907 | repository access to the user. If this list is not empty, and the |
|
1908 | 1908 | user is unauthenticated or not present in the list, then access is |
|
1909 | 1909 | denied for the user. If the list is empty or not set, then access |
|
1910 | 1910 | is permitted to all users by default. Setting allow_read to the |
|
1911 | 1911 | special value ``*`` is equivalent to it not being set (i.e. access |
|
1912 | 1912 | is permitted to all users). The contents of the allow_read list are |
|
1913 | 1913 | examined after the deny_read list. |
|
1914 | 1914 | |
|
1915 | 1915 | ``allowzip`` |
|
1916 | 1916 | (DEPRECATED) Whether to allow .zip downloading of repository |
|
1917 | 1917 | revisions. This feature creates temporary files. |
|
1918 | 1918 | (default: False) |
|
1919 | 1919 | |
|
1920 | 1920 | ``archivesubrepos`` |
|
1921 | 1921 | Whether to recurse into subrepositories when archiving. |
|
1922 | 1922 | (default: False) |
|
1923 | 1923 | |
|
1924 | 1924 | ``baseurl`` |
|
1925 | 1925 | Base URL to use when publishing URLs in other locations, so |
|
1926 | 1926 | third-party tools like email notification hooks can construct |
|
1927 | 1927 | URLs. Example: ``http://hgserver/repos/``. |
|
1928 | 1928 | |
|
1929 | 1929 | ``cacerts`` |
|
1930 | 1930 | Path to file containing a list of PEM encoded certificate |
|
1931 | 1931 | authority certificates. Environment variables and ``~user`` |
|
1932 | 1932 | constructs are expanded in the filename. If specified on the |
|
1933 | 1933 | client, then it will verify the identity of remote HTTPS servers |
|
1934 | 1934 | with these certificates. |
|
1935 | 1935 | |
|
1936 | 1936 | To disable SSL verification temporarily, specify ``--insecure`` from |
|
1937 | 1937 | command line. |
|
1938 | 1938 | |
|
1939 | 1939 | You can use OpenSSL's CA certificate file if your platform has |
|
1940 | 1940 | one. On most Linux systems this will be |
|
1941 | 1941 | ``/etc/ssl/certs/ca-certificates.crt``. Otherwise you will have to |
|
1942 | 1942 | generate this file manually. The form must be as follows:: |
|
1943 | 1943 | |
|
1944 | 1944 | -----BEGIN CERTIFICATE----- |
|
1945 | 1945 | ... (certificate in base64 PEM encoding) ... |
|
1946 | 1946 | -----END CERTIFICATE----- |
|
1947 | 1947 | -----BEGIN CERTIFICATE----- |
|
1948 | 1948 | ... (certificate in base64 PEM encoding) ... |
|
1949 | 1949 | -----END CERTIFICATE----- |
|
1950 | 1950 | |
|
1951 | 1951 | ``cache`` |
|
1952 | 1952 | Whether to support caching in hgweb. (default: True) |
|
1953 | 1953 | |
|
1954 | 1954 | ``certificate`` |
|
1955 | 1955 | Certificate to use when running :hg:`serve`. |
|
1956 | 1956 | |
|
1957 | 1957 | ``collapse`` |
|
1958 | 1958 | With ``descend`` enabled, repositories in subdirectories are shown at |
|
1959 | 1959 | a single level alongside repositories in the current path. With |
|
1960 | 1960 | ``collapse`` also enabled, repositories residing at a deeper level than |
|
1961 | 1961 | the current path are grouped behind navigable directory entries that |
|
1962 | 1962 | lead to the locations of these repositories. In effect, this setting |
|
1963 | 1963 | collapses each collection of repositories found within a subdirectory |
|
1964 | 1964 | into a single entry for that subdirectory. (default: False) |
|
1965 | 1965 | |
|
1966 | 1966 | ``comparisoncontext`` |
|
1967 | 1967 | Number of lines of context to show in side-by-side file comparison. If |
|
1968 | 1968 | negative or the value ``full``, whole files are shown. (default: 5) |
|
1969 | 1969 | |
|
1970 | 1970 | This setting can be overridden by a ``context`` request parameter to the |
|
1971 | 1971 | ``comparison`` command, taking the same values. |
|
1972 | 1972 | |
|
1973 | 1973 | ``contact`` |
|
1974 | 1974 | Name or email address of the person in charge of the repository. |
|
1975 | 1975 | (default: ui.username or ``$EMAIL`` or "unknown" if unset or empty) |
|
1976 | 1976 | |
|
1977 | 1977 | ``deny_push`` |
|
1978 | 1978 | Whether to deny pushing to the repository. If empty or not set, |
|
1979 | 1979 | push is not denied. If the special value ``*``, all remote users are |
|
1980 | 1980 | denied push. Otherwise, unauthenticated users are all denied, and |
|
1981 | 1981 | any authenticated user name present in this list is also denied. The |
|
1982 | 1982 | contents of the deny_push list are examined before the allow_push list. |
|
1983 | 1983 | |
|
1984 | 1984 | ``deny_read`` |
|
1985 | 1985 | Whether to deny reading/viewing of the repository. If this list is |
|
1986 | 1986 | not empty, unauthenticated users are all denied, and any |
|
1987 | 1987 | authenticated user name present in this list is also denied access to |
|
1988 | 1988 | the repository. If set to the special value ``*``, all remote users |
|
1989 | 1989 | are denied access (rarely needed ;). If deny_read is empty or not set, |
|
1990 | 1990 | the determination of repository access depends on the presence and |
|
1991 | 1991 | content of the allow_read list (see description). If both |
|
1992 | 1992 | deny_read and allow_read are empty or not set, then access is |
|
1993 | 1993 | permitted to all users by default. If the repository is being |
|
1994 | 1994 | served via hgwebdir, denied users will not be able to see it in |
|
1995 | 1995 | the list of repositories. The contents of the deny_read list have |
|
1996 | 1996 | priority over (are examined before) the contents of the allow_read |
|
1997 | 1997 | list. |
|
1998 | 1998 | |
|
1999 | 1999 | ``descend`` |
|
2000 | 2000 | hgwebdir indexes will not descend into subdirectories. Only repositories |
|
2001 | 2001 | directly in the current path will be shown (other repositories are still |
|
2002 | 2002 | available from the index corresponding to their containing path). |
|
2003 | 2003 | |
|
2004 | 2004 | ``description`` |
|
2005 | 2005 | Textual description of the repository's purpose or contents. |
|
2006 | 2006 | (default: "unknown") |
|
2007 | 2007 | |
|
2008 | 2008 | ``encoding`` |
|
2009 | 2009 | Character encoding name. (default: the current locale charset) |
|
2010 | 2010 | Example: "UTF-8". |
|
2011 | 2011 | |
|
2012 | 2012 | ``errorlog`` |
|
2013 | 2013 | Where to output the error log. (default: stderr) |
|
2014 | 2014 | |
|
2015 | 2015 | ``guessmime`` |
|
2016 | 2016 | Control MIME types for raw download of file content. |
|
2017 | 2017 | Set to True to let hgweb guess the content type from the file |
|
2018 | 2018 | extension. This will serve HTML files as ``text/html`` and might |
|
2019 | 2019 | allow cross-site scripting attacks when serving untrusted |
|
2020 | 2020 | repositories. (default: False) |
|
2021 | 2021 | |
|
2022 | 2022 | ``hidden`` |
|
2023 | 2023 | Whether to hide the repository in the hgwebdir index. |
|
2024 | 2024 | (default: False) |
|
2025 | 2025 | |
|
2026 | 2026 | ``ipv6`` |
|
2027 | 2027 | Whether to use IPv6. (default: False) |
|
2028 | 2028 | |
|
2029 | ``labels`` | |
|
2030 | List of string *labels* associated with the repository. | |
|
2031 | ||
|
2032 | Labels are exposed as a template keyword and can be used to customize | |
|
2033 | output. e.g. the ``index`` template can group or filter repositories | |
|
2034 | by labels and the ``summary`` template can display additional content | |
|
2035 | if a specific label is present. | |
|
2036 | ||
|
2029 | 2037 | ``logoimg`` |
|
2030 | 2038 | File name of the logo image that some templates display on each page. |
|
2031 | 2039 | The file name is relative to ``staticurl``. That is, the full path to |
|
2032 | 2040 | the logo image is "staticurl/logoimg". |
|
2033 | 2041 | If unset, ``hglogo.png`` will be used. |
|
2034 | 2042 | |
|
2035 | 2043 | ``logourl`` |
|
2036 | 2044 | Base URL to use for logos. If unset, ``https://mercurial-scm.org/`` |
|
2037 | 2045 | will be used. |
|
2038 | 2046 | |
|
2039 | 2047 | ``maxchanges`` |
|
2040 | 2048 | Maximum number of changes to list on the changelog. (default: 10) |
|
2041 | 2049 | |
|
2042 | 2050 | ``maxfiles`` |
|
2043 | 2051 | Maximum number of files to list per changeset. (default: 10) |
|
2044 | 2052 | |
|
2045 | 2053 | ``maxshortchanges`` |
|
2046 | 2054 | Maximum number of changes to list on the shortlog, graph or filelog |
|
2047 | 2055 | pages. (default: 60) |
|
2048 | 2056 | |
|
2049 | 2057 | ``name`` |
|
2050 | 2058 | Repository name to use in the web interface. |
|
2051 | 2059 | (default: current working directory) |
|
2052 | 2060 | |
|
2053 | 2061 | ``port`` |
|
2054 | 2062 | Port to listen on. (default: 8000) |
|
2055 | 2063 | |
|
2056 | 2064 | ``prefix`` |
|
2057 | 2065 | Prefix path to serve from. (default: '' (server root)) |
|
2058 | 2066 | |
|
2059 | 2067 | ``push_ssl`` |
|
2060 | 2068 | Whether to require that inbound pushes be transported over SSL to |
|
2061 | 2069 | prevent password sniffing. (default: True) |
|
2062 | 2070 | |
|
2063 | 2071 | ``refreshinterval`` |
|
2064 | 2072 | How frequently directory listings re-scan the filesystem for new |
|
2065 | 2073 | repositories, in seconds. This is relevant when wildcards are used |
|
2066 | 2074 | to define paths. Depending on how much filesystem traversal is |
|
2067 | 2075 | required, refreshing may negatively impact performance. |
|
2068 | 2076 | |
|
2069 | 2077 | Values less than or equal to 0 always refresh. |
|
2070 | 2078 | (default: 20) |
|
2071 | 2079 | |
|
2072 | 2080 | ``staticurl`` |
|
2073 | 2081 | Base URL to use for static files. If unset, static files (e.g. the |
|
2074 | 2082 | hgicon.png favicon) will be served by the CGI script itself. Use |
|
2075 | 2083 | this setting to serve them directly with the HTTP server. |
|
2076 | 2084 | Example: ``http://hgserver/static/``. |
|
2077 | 2085 | |
|
2078 | 2086 | ``stripes`` |
|
2079 | 2087 | How many lines a "zebra stripe" should span in multi-line output. |
|
2080 | 2088 | Set to 0 to disable. (default: 1) |
|
2081 | 2089 | |
|
2082 | 2090 | ``style`` |
|
2083 | 2091 | Which template map style to use. The available options are the names of |
|
2084 | 2092 | subdirectories in the HTML templates path. (default: ``paper``) |
|
2085 | 2093 | Example: ``monoblue``. |
|
2086 | 2094 | |
|
2087 | 2095 | ``templates`` |
|
2088 | 2096 | Where to find the HTML templates. The default path to the HTML templates |
|
2089 | 2097 | can be obtained from ``hg debuginstall``. |
|
2090 | 2098 | |
|
2091 | 2099 | ``websub`` |
|
2092 | 2100 | ---------- |
|
2093 | 2101 | |
|
2094 | 2102 | Web substitution filter definition. You can use this section to |
|
2095 | 2103 | define a set of regular expression substitution patterns which |
|
2096 | 2104 | let you automatically modify the hgweb server output. |
|
2097 | 2105 | |
|
2098 | 2106 | The default hgweb templates only apply these substitution patterns |
|
2099 | 2107 | on the revision description fields. You can apply them anywhere |
|
2100 | 2108 | you want when you create your own templates by adding calls to the |
|
2101 | 2109 | "websub" filter (usually after calling the "escape" filter). |
|
2102 | 2110 | |
|
2103 | 2111 | This can be used, for example, to convert issue references to links |
|
2104 | 2112 | to your issue tracker, or to convert "markdown-like" syntax into |
|
2105 | 2113 | HTML (see the examples below). |
|
2106 | 2114 | |
|
2107 | 2115 | Each entry in this section names a substitution filter. |
|
2108 | 2116 | The value of each entry defines the substitution expression itself. |
|
2109 | 2117 | The websub expressions follow the old interhg extension syntax, |
|
2110 | 2118 | which in turn imitates the Unix sed replacement syntax:: |
|
2111 | 2119 | |
|
2112 | 2120 | patternname = s/SEARCH_REGEX/REPLACE_EXPRESSION/[i] |
|
2113 | 2121 | |
|
2114 | 2122 | You can use any separator other than "/". The final "i" is optional |
|
2115 | 2123 | and indicates that the search must be case insensitive. |
|
2116 | 2124 | |
|
2117 | 2125 | Examples:: |
|
2118 | 2126 | |
|
2119 | 2127 | [websub] |
|
2120 | 2128 | issues = s|issue(\d+)|<a href="http://bts.example.org/issue\1">issue\1</a>|i |
|
2121 | 2129 | italic = s/\b_(\S+)_\b/<i>\1<\/i>/ |
|
2122 | 2130 | bold = s/\*\b(\S+)\b\*/<b>\1<\/b>/ |
|
2123 | 2131 | |
|
2124 | 2132 | ``worker`` |
|
2125 | 2133 | ---------- |
|
2126 | 2134 | |
|
2127 | 2135 | Parallel master/worker configuration. We currently perform working |
|
2128 | 2136 | directory updates in parallel on Unix-like systems, which greatly |
|
2129 | 2137 | helps performance. |
|
2130 | 2138 | |
|
2131 | 2139 | ``numcpus`` |
|
2132 | 2140 | Number of CPUs to use for parallel operations. A zero or |
|
2133 | 2141 | negative value is treated as ``use the default``. |
|
2134 | 2142 | (default: 4 or the number of CPUs on the system, whichever is larger) |
|
2135 | 2143 | |
|
2136 | 2144 | ``backgroundclose`` |
|
2137 | 2145 | Whether to enable closing file handles on background threads during certain |
|
2138 | 2146 | operations. Some platforms aren't very efficient at closing file |
|
2139 | 2147 | handles that have been written or appended to. By performing file closing |
|
2140 | 2148 | on background threads, file write rate can increase substantially. |
|
2141 | 2149 | (default: true on Windows, false elsewhere) |
|
2142 | 2150 | |
|
2143 | 2151 | ``backgroundcloseminfilecount`` |
|
2144 | 2152 | Minimum number of files required to trigger background file closing. |
|
2145 | 2153 | Operations not writing this many files won't start background close |
|
2146 | 2154 | threads. |
|
2147 | 2155 | (default: 2048) |
|
2148 | 2156 | |
|
2149 | 2157 | ``backgroundclosemaxqueue`` |
|
2150 | 2158 | The maximum number of opened file handles waiting to be closed in the |
|
2151 | 2159 | background. This option only has an effect if ``backgroundclose`` is |
|
2152 | 2160 | enabled. |
|
2153 | 2161 | (default: 384) |
|
2154 | 2162 | |
|
2155 | 2163 | ``backgroundclosethreadcount`` |
|
2156 | 2164 | Number of threads to process background file closes. Only relevant if |
|
2157 | 2165 | ``backgroundclose`` is enabled. |
|
2158 | 2166 | (default: 4) |
@@ -1,512 +1,515 | |||
|
1 | 1 | # hgweb/hgwebdir_mod.py - Web interface for a directory of repositories. |
|
2 | 2 | # |
|
3 | 3 | # Copyright 21 May 2005 - (c) 2005 Jake Edge <jake@edge2.net> |
|
4 | 4 | # Copyright 2005, 2006 Matt Mackall <mpm@selenic.com> |
|
5 | 5 | # |
|
6 | 6 | # This software may be used and distributed according to the terms of the |
|
7 | 7 | # GNU General Public License version 2 or any later version. |
|
8 | 8 | |
|
9 | 9 | from __future__ import absolute_import |
|
10 | 10 | |
|
11 | 11 | import os |
|
12 | 12 | import re |
|
13 | 13 | import time |
|
14 | 14 | |
|
15 | 15 | from ..i18n import _ |
|
16 | 16 | |
|
17 | 17 | from .common import ( |
|
18 | 18 | ErrorResponse, |
|
19 | 19 | HTTP_NOT_FOUND, |
|
20 | 20 | HTTP_OK, |
|
21 | 21 | HTTP_SERVER_ERROR, |
|
22 | 22 | get_contact, |
|
23 | 23 | get_mtime, |
|
24 | 24 | ismember, |
|
25 | 25 | paritygen, |
|
26 | 26 | staticfile, |
|
27 | 27 | ) |
|
28 | 28 | from .request import wsgirequest |
|
29 | 29 | |
|
30 | 30 | from .. import ( |
|
31 | 31 | encoding, |
|
32 | 32 | error, |
|
33 | 33 | hg, |
|
34 | 34 | scmutil, |
|
35 | 35 | templater, |
|
36 | 36 | ui as uimod, |
|
37 | 37 | util, |
|
38 | 38 | ) |
|
39 | 39 | |
|
40 | 40 | from . import ( |
|
41 | 41 | hgweb_mod, |
|
42 | 42 | webutil, |
|
43 | 43 | wsgicgi, |
|
44 | 44 | ) |
|
45 | 45 | |
|
46 | 46 | def cleannames(items): |
|
47 | 47 | return [(util.pconvert(name).strip('/'), path) for name, path in items] |
|
48 | 48 | |
|
49 | 49 | def findrepos(paths): |
|
50 | 50 | repos = [] |
|
51 | 51 | for prefix, root in cleannames(paths): |
|
52 | 52 | roothead, roottail = os.path.split(root) |
|
53 | 53 | # "foo = /bar/*" or "foo = /bar/**" lets every repo /bar/N in or below |
|
54 | 54 | # /bar/ be served as as foo/N . |
|
55 | 55 | # '*' will not search inside dirs with .hg (except .hg/patches), |
|
56 | 56 | # '**' will search inside dirs with .hg (and thus also find subrepos). |
|
57 | 57 | try: |
|
58 | 58 | recurse = {'*': False, '**': True}[roottail] |
|
59 | 59 | except KeyError: |
|
60 | 60 | repos.append((prefix, root)) |
|
61 | 61 | continue |
|
62 | 62 | roothead = os.path.normpath(os.path.abspath(roothead)) |
|
63 | 63 | paths = scmutil.walkrepos(roothead, followsym=True, recurse=recurse) |
|
64 | 64 | repos.extend(urlrepos(prefix, roothead, paths)) |
|
65 | 65 | return repos |
|
66 | 66 | |
|
67 | 67 | def urlrepos(prefix, roothead, paths): |
|
68 | 68 | """yield url paths and filesystem paths from a list of repo paths |
|
69 | 69 | |
|
70 | 70 | >>> conv = lambda seq: [(v, util.pconvert(p)) for v,p in seq] |
|
71 | 71 | >>> conv(urlrepos('hg', '/opt', ['/opt/r', '/opt/r/r', '/opt'])) |
|
72 | 72 | [('hg/r', '/opt/r'), ('hg/r/r', '/opt/r/r'), ('hg', '/opt')] |
|
73 | 73 | >>> conv(urlrepos('', '/opt', ['/opt/r', '/opt/r/r', '/opt'])) |
|
74 | 74 | [('r', '/opt/r'), ('r/r', '/opt/r/r'), ('', '/opt')] |
|
75 | 75 | """ |
|
76 | 76 | for path in paths: |
|
77 | 77 | path = os.path.normpath(path) |
|
78 | 78 | yield (prefix + '/' + |
|
79 | 79 | util.pconvert(path[len(roothead):]).lstrip('/')).strip('/'), path |
|
80 | 80 | |
|
81 | 81 | def geturlcgivars(baseurl, port): |
|
82 | 82 | """ |
|
83 | 83 | Extract CGI variables from baseurl |
|
84 | 84 | |
|
85 | 85 | >>> geturlcgivars("http://host.org/base", "80") |
|
86 | 86 | ('host.org', '80', '/base') |
|
87 | 87 | >>> geturlcgivars("http://host.org:8000/base", "80") |
|
88 | 88 | ('host.org', '8000', '/base') |
|
89 | 89 | >>> geturlcgivars('/base', 8000) |
|
90 | 90 | ('', '8000', '/base') |
|
91 | 91 | >>> geturlcgivars("base", '8000') |
|
92 | 92 | ('', '8000', '/base') |
|
93 | 93 | >>> geturlcgivars("http://host", '8000') |
|
94 | 94 | ('host', '8000', '/') |
|
95 | 95 | >>> geturlcgivars("http://host/", '8000') |
|
96 | 96 | ('host', '8000', '/') |
|
97 | 97 | """ |
|
98 | 98 | u = util.url(baseurl) |
|
99 | 99 | name = u.host or '' |
|
100 | 100 | if u.port: |
|
101 | 101 | port = u.port |
|
102 | 102 | path = u.path or "" |
|
103 | 103 | if not path.startswith('/'): |
|
104 | 104 | path = '/' + path |
|
105 | 105 | |
|
106 | 106 | return name, str(port), path |
|
107 | 107 | |
|
108 | 108 | class hgwebdir(object): |
|
109 | 109 | """HTTP server for multiple repositories. |
|
110 | 110 | |
|
111 | 111 | Given a configuration, different repositories will be served depending |
|
112 | 112 | on the request path. |
|
113 | 113 | |
|
114 | 114 | Instances are typically used as WSGI applications. |
|
115 | 115 | """ |
|
116 | 116 | def __init__(self, conf, baseui=None): |
|
117 | 117 | self.conf = conf |
|
118 | 118 | self.baseui = baseui |
|
119 | 119 | self.ui = None |
|
120 | 120 | self.lastrefresh = 0 |
|
121 | 121 | self.motd = None |
|
122 | 122 | self.refresh() |
|
123 | 123 | |
|
124 | 124 | def refresh(self): |
|
125 | 125 | refreshinterval = 20 |
|
126 | 126 | if self.ui: |
|
127 | 127 | refreshinterval = self.ui.configint('web', 'refreshinterval', |
|
128 | 128 | refreshinterval) |
|
129 | 129 | |
|
130 | 130 | # refreshinterval <= 0 means to always refresh. |
|
131 | 131 | if (refreshinterval > 0 and |
|
132 | 132 | self.lastrefresh + refreshinterval > time.time()): |
|
133 | 133 | return |
|
134 | 134 | |
|
135 | 135 | if self.baseui: |
|
136 | 136 | u = self.baseui.copy() |
|
137 | 137 | else: |
|
138 | 138 | u = uimod.ui() |
|
139 | 139 | u.setconfig('ui', 'report_untrusted', 'off', 'hgwebdir') |
|
140 | 140 | u.setconfig('ui', 'nontty', 'true', 'hgwebdir') |
|
141 | 141 | # displaying bundling progress bar while serving feels wrong and may |
|
142 | 142 | # break some wsgi implementations. |
|
143 | 143 | u.setconfig('progress', 'disable', 'true', 'hgweb') |
|
144 | 144 | |
|
145 | 145 | if not isinstance(self.conf, (dict, list, tuple)): |
|
146 | 146 | map = {'paths': 'hgweb-paths'} |
|
147 | 147 | if not os.path.exists(self.conf): |
|
148 | 148 | raise error.Abort(_('config file %s not found!') % self.conf) |
|
149 | 149 | u.readconfig(self.conf, remap=map, trust=True) |
|
150 | 150 | paths = [] |
|
151 | 151 | for name, ignored in u.configitems('hgweb-paths'): |
|
152 | 152 | for path in u.configlist('hgweb-paths', name): |
|
153 | 153 | paths.append((name, path)) |
|
154 | 154 | elif isinstance(self.conf, (list, tuple)): |
|
155 | 155 | paths = self.conf |
|
156 | 156 | elif isinstance(self.conf, dict): |
|
157 | 157 | paths = self.conf.items() |
|
158 | 158 | |
|
159 | 159 | repos = findrepos(paths) |
|
160 | 160 | for prefix, root in u.configitems('collections'): |
|
161 | 161 | prefix = util.pconvert(prefix) |
|
162 | 162 | for path in scmutil.walkrepos(root, followsym=True): |
|
163 | 163 | repo = os.path.normpath(path) |
|
164 | 164 | name = util.pconvert(repo) |
|
165 | 165 | if name.startswith(prefix): |
|
166 | 166 | name = name[len(prefix):] |
|
167 | 167 | repos.append((name.lstrip('/'), repo)) |
|
168 | 168 | |
|
169 | 169 | self.repos = repos |
|
170 | 170 | self.ui = u |
|
171 | 171 | encoding.encoding = self.ui.config('web', 'encoding', |
|
172 | 172 | encoding.encoding) |
|
173 | 173 | self.style = self.ui.config('web', 'style', 'paper') |
|
174 | 174 | self.templatepath = self.ui.config('web', 'templates', None) |
|
175 | 175 | self.stripecount = self.ui.config('web', 'stripes', 1) |
|
176 | 176 | if self.stripecount: |
|
177 | 177 | self.stripecount = int(self.stripecount) |
|
178 | 178 | self._baseurl = self.ui.config('web', 'baseurl') |
|
179 | 179 | prefix = self.ui.config('web', 'prefix', '') |
|
180 | 180 | if prefix.startswith('/'): |
|
181 | 181 | prefix = prefix[1:] |
|
182 | 182 | if prefix.endswith('/'): |
|
183 | 183 | prefix = prefix[:-1] |
|
184 | 184 | self.prefix = prefix |
|
185 | 185 | self.lastrefresh = time.time() |
|
186 | 186 | |
|
187 | 187 | def run(self): |
|
188 | 188 | if not os.environ.get('GATEWAY_INTERFACE', '').startswith("CGI/1."): |
|
189 | 189 | raise RuntimeError("This function is only intended to be " |
|
190 | 190 | "called while running as a CGI script.") |
|
191 | 191 | wsgicgi.launch(self) |
|
192 | 192 | |
|
193 | 193 | def __call__(self, env, respond): |
|
194 | 194 | req = wsgirequest(env, respond) |
|
195 | 195 | return self.run_wsgi(req) |
|
196 | 196 | |
|
197 | 197 | def read_allowed(self, ui, req): |
|
198 | 198 | """Check allow_read and deny_read config options of a repo's ui object |
|
199 | 199 | to determine user permissions. By default, with neither option set (or |
|
200 | 200 | both empty), allow all users to read the repo. There are two ways a |
|
201 | 201 | user can be denied read access: (1) deny_read is not empty, and the |
|
202 | 202 | user is unauthenticated or deny_read contains user (or *), and (2) |
|
203 | 203 | allow_read is not empty and the user is not in allow_read. Return True |
|
204 | 204 | if user is allowed to read the repo, else return False.""" |
|
205 | 205 | |
|
206 | 206 | user = req.env.get('REMOTE_USER') |
|
207 | 207 | |
|
208 | 208 | deny_read = ui.configlist('web', 'deny_read', untrusted=True) |
|
209 | 209 | if deny_read and (not user or ismember(ui, user, deny_read)): |
|
210 | 210 | return False |
|
211 | 211 | |
|
212 | 212 | allow_read = ui.configlist('web', 'allow_read', untrusted=True) |
|
213 | 213 | # by default, allow reading if no allow_read option has been set |
|
214 | 214 | if (not allow_read) or ismember(ui, user, allow_read): |
|
215 | 215 | return True |
|
216 | 216 | |
|
217 | 217 | return False |
|
218 | 218 | |
|
219 | 219 | def run_wsgi(self, req): |
|
220 | 220 | try: |
|
221 | 221 | self.refresh() |
|
222 | 222 | |
|
223 | 223 | virtual = req.env.get("PATH_INFO", "").strip('/') |
|
224 | 224 | tmpl = self.templater(req) |
|
225 | 225 | ctype = tmpl('mimetype', encoding=encoding.encoding) |
|
226 | 226 | ctype = templater.stringify(ctype) |
|
227 | 227 | |
|
228 | 228 | # a static file |
|
229 | 229 | if virtual.startswith('static/') or 'static' in req.form: |
|
230 | 230 | if virtual.startswith('static/'): |
|
231 | 231 | fname = virtual[7:] |
|
232 | 232 | else: |
|
233 | 233 | fname = req.form['static'][0] |
|
234 | 234 | static = self.ui.config("web", "static", None, |
|
235 | 235 | untrusted=False) |
|
236 | 236 | if not static: |
|
237 | 237 | tp = self.templatepath or templater.templatepaths() |
|
238 | 238 | if isinstance(tp, str): |
|
239 | 239 | tp = [tp] |
|
240 | 240 | static = [os.path.join(p, 'static') for p in tp] |
|
241 | 241 | staticfile(static, fname, req) |
|
242 | 242 | return [] |
|
243 | 243 | |
|
244 | 244 | # top-level index |
|
245 | 245 | elif not virtual: |
|
246 | 246 | req.respond(HTTP_OK, ctype) |
|
247 | 247 | return self.makeindex(req, tmpl) |
|
248 | 248 | |
|
249 | 249 | # nested indexes and hgwebs |
|
250 | 250 | |
|
251 | 251 | repos = dict(self.repos) |
|
252 | 252 | virtualrepo = virtual |
|
253 | 253 | while virtualrepo: |
|
254 | 254 | real = repos.get(virtualrepo) |
|
255 | 255 | if real: |
|
256 | 256 | req.env['REPO_NAME'] = virtualrepo |
|
257 | 257 | try: |
|
258 | 258 | # ensure caller gets private copy of ui |
|
259 | 259 | repo = hg.repository(self.ui.copy(), real) |
|
260 | 260 | return hgweb_mod.hgweb(repo).run_wsgi(req) |
|
261 | 261 | except IOError as inst: |
|
262 | 262 | msg = inst.strerror |
|
263 | 263 | raise ErrorResponse(HTTP_SERVER_ERROR, msg) |
|
264 | 264 | except error.RepoError as inst: |
|
265 | 265 | raise ErrorResponse(HTTP_SERVER_ERROR, str(inst)) |
|
266 | 266 | |
|
267 | 267 | up = virtualrepo.rfind('/') |
|
268 | 268 | if up < 0: |
|
269 | 269 | break |
|
270 | 270 | virtualrepo = virtualrepo[:up] |
|
271 | 271 | |
|
272 | 272 | # browse subdirectories |
|
273 | 273 | subdir = virtual + '/' |
|
274 | 274 | if [r for r in repos if r.startswith(subdir)]: |
|
275 | 275 | req.respond(HTTP_OK, ctype) |
|
276 | 276 | return self.makeindex(req, tmpl, subdir) |
|
277 | 277 | |
|
278 | 278 | # prefixes not found |
|
279 | 279 | req.respond(HTTP_NOT_FOUND, ctype) |
|
280 | 280 | return tmpl("notfound", repo=virtual) |
|
281 | 281 | |
|
282 | 282 | except ErrorResponse as err: |
|
283 | 283 | req.respond(err, ctype) |
|
284 | 284 | return tmpl('error', error=err.message or '') |
|
285 | 285 | finally: |
|
286 | 286 | tmpl = None |
|
287 | 287 | |
|
288 | 288 | def makeindex(self, req, tmpl, subdir=""): |
|
289 | 289 | |
|
290 | 290 | def archivelist(ui, nodeid, url): |
|
291 | 291 | allowed = ui.configlist("web", "allow_archive", untrusted=True) |
|
292 | 292 | archives = [] |
|
293 | 293 | for i in [('zip', '.zip'), ('gz', '.tar.gz'), ('bz2', '.tar.bz2')]: |
|
294 | 294 | if i[0] in allowed or ui.configbool("web", "allow" + i[0], |
|
295 | 295 | untrusted=True): |
|
296 | 296 | archives.append({"type" : i[0], "extension": i[1], |
|
297 | 297 | "node": nodeid, "url": url}) |
|
298 | 298 | return archives |
|
299 | 299 | |
|
300 | 300 | def rawentries(subdir="", **map): |
|
301 | 301 | |
|
302 | 302 | descend = self.ui.configbool('web', 'descend', True) |
|
303 | 303 | collapse = self.ui.configbool('web', 'collapse', False) |
|
304 | 304 | seenrepos = set() |
|
305 | 305 | seendirs = set() |
|
306 | 306 | for name, path in self.repos: |
|
307 | 307 | |
|
308 | 308 | if not name.startswith(subdir): |
|
309 | 309 | continue |
|
310 | 310 | name = name[len(subdir):] |
|
311 | 311 | directory = False |
|
312 | 312 | |
|
313 | 313 | if '/' in name: |
|
314 | 314 | if not descend: |
|
315 | 315 | continue |
|
316 | 316 | |
|
317 | 317 | nameparts = name.split('/') |
|
318 | 318 | rootname = nameparts[0] |
|
319 | 319 | |
|
320 | 320 | if not collapse: |
|
321 | 321 | pass |
|
322 | 322 | elif rootname in seendirs: |
|
323 | 323 | continue |
|
324 | 324 | elif rootname in seenrepos: |
|
325 | 325 | pass |
|
326 | 326 | else: |
|
327 | 327 | directory = True |
|
328 | 328 | name = rootname |
|
329 | 329 | |
|
330 | 330 | # redefine the path to refer to the directory |
|
331 | 331 | discarded = '/'.join(nameparts[1:]) |
|
332 | 332 | |
|
333 | 333 | # remove name parts plus accompanying slash |
|
334 | 334 | path = path[:-len(discarded) - 1] |
|
335 | 335 | |
|
336 | 336 | try: |
|
337 | 337 | r = hg.repository(self.ui, path) |
|
338 | 338 | directory = False |
|
339 | 339 | except (IOError, error.RepoError): |
|
340 | 340 | pass |
|
341 | 341 | |
|
342 | 342 | parts = [name] |
|
343 | 343 | if 'PATH_INFO' in req.env: |
|
344 | 344 | parts.insert(0, req.env['PATH_INFO'].rstrip('/')) |
|
345 | 345 | if req.env['SCRIPT_NAME']: |
|
346 | 346 | parts.insert(0, req.env['SCRIPT_NAME']) |
|
347 | 347 | url = re.sub(r'/+', '/', '/'.join(parts) + '/') |
|
348 | 348 | |
|
349 | 349 | # show either a directory entry or a repository |
|
350 | 350 | if directory: |
|
351 | 351 | # get the directory's time information |
|
352 | 352 | try: |
|
353 | 353 | d = (get_mtime(path), util.makedate()[1]) |
|
354 | 354 | except OSError: |
|
355 | 355 | continue |
|
356 | 356 | |
|
357 | 357 | # add '/' to the name to make it obvious that |
|
358 | 358 | # the entry is a directory, not a regular repository |
|
359 | 359 | row = {'contact': "", |
|
360 | 360 | 'contact_sort': "", |
|
361 | 361 | 'name': name + '/', |
|
362 | 362 | 'name_sort': name, |
|
363 | 363 | 'url': url, |
|
364 | 364 | 'description': "", |
|
365 | 365 | 'description_sort': "", |
|
366 | 366 | 'lastchange': d, |
|
367 | 367 | 'lastchange_sort': d[1]-d[0], |
|
368 | 368 | 'archives': [], |
|
369 |
'isdirectory': True |
|
|
369 | 'isdirectory': True, | |
|
370 | 'labels': [], | |
|
371 | } | |
|
370 | 372 | |
|
371 | 373 | seendirs.add(name) |
|
372 | 374 | yield row |
|
373 | 375 | continue |
|
374 | 376 | |
|
375 | 377 | u = self.ui.copy() |
|
376 | 378 | try: |
|
377 | 379 | u.readconfig(os.path.join(path, '.hg', 'hgrc')) |
|
378 | 380 | except Exception as e: |
|
379 | 381 | u.warn(_('error reading %s/.hg/hgrc: %s\n') % (path, e)) |
|
380 | 382 | continue |
|
381 | 383 | def get(section, name, default=None): |
|
382 | 384 | return u.config(section, name, default, untrusted=True) |
|
383 | 385 | |
|
384 | 386 | if u.configbool("web", "hidden", untrusted=True): |
|
385 | 387 | continue |
|
386 | 388 | |
|
387 | 389 | if not self.read_allowed(u, req): |
|
388 | 390 | continue |
|
389 | 391 | |
|
390 | 392 | # update time with local timezone |
|
391 | 393 | try: |
|
392 | 394 | r = hg.repository(self.ui, path) |
|
393 | 395 | except IOError: |
|
394 | 396 | u.warn(_('error accessing repository at %s\n') % path) |
|
395 | 397 | continue |
|
396 | 398 | except error.RepoError: |
|
397 | 399 | u.warn(_('error accessing repository at %s\n') % path) |
|
398 | 400 | continue |
|
399 | 401 | try: |
|
400 | 402 | d = (get_mtime(r.spath), util.makedate()[1]) |
|
401 | 403 | except OSError: |
|
402 | 404 | continue |
|
403 | 405 | |
|
404 | 406 | contact = get_contact(get) |
|
405 | 407 | description = get("web", "description", "") |
|
406 | 408 | seenrepos.add(name) |
|
407 | 409 | name = get("web", "name", name) |
|
408 | 410 | row = {'contact': contact or "unknown", |
|
409 | 411 | 'contact_sort': contact.upper() or "unknown", |
|
410 | 412 | 'name': name, |
|
411 | 413 | 'name_sort': name, |
|
412 | 414 | 'url': url, |
|
413 | 415 | 'description': description or "unknown", |
|
414 | 416 | 'description_sort': description.upper() or "unknown", |
|
415 | 417 | 'lastchange': d, |
|
416 | 418 | 'lastchange_sort': d[1]-d[0], |
|
417 | 419 | 'archives': archivelist(u, "tip", url), |
|
418 | 420 | 'isdirectory': None, |
|
421 | 'labels': u.configlist('web', 'labels', untrusted=True), | |
|
419 | 422 | } |
|
420 | 423 | |
|
421 | 424 | yield row |
|
422 | 425 | |
|
423 | 426 | sortdefault = None, False |
|
424 | 427 | def entries(sortcolumn="", descending=False, subdir="", **map): |
|
425 | 428 | rows = rawentries(subdir=subdir, **map) |
|
426 | 429 | |
|
427 | 430 | if sortcolumn and sortdefault != (sortcolumn, descending): |
|
428 | 431 | sortkey = '%s_sort' % sortcolumn |
|
429 | 432 | rows = sorted(rows, key=lambda x: x[sortkey], |
|
430 | 433 | reverse=descending) |
|
431 | 434 | for row, parity in zip(rows, paritygen(self.stripecount)): |
|
432 | 435 | row['parity'] = parity |
|
433 | 436 | yield row |
|
434 | 437 | |
|
435 | 438 | self.refresh() |
|
436 | 439 | sortable = ["name", "description", "contact", "lastchange"] |
|
437 | 440 | sortcolumn, descending = sortdefault |
|
438 | 441 | if 'sort' in req.form: |
|
439 | 442 | sortcolumn = req.form['sort'][0] |
|
440 | 443 | descending = sortcolumn.startswith('-') |
|
441 | 444 | if descending: |
|
442 | 445 | sortcolumn = sortcolumn[1:] |
|
443 | 446 | if sortcolumn not in sortable: |
|
444 | 447 | sortcolumn = "" |
|
445 | 448 | |
|
446 | 449 | sort = [("sort_%s" % column, |
|
447 | 450 | "%s%s" % ((not descending and column == sortcolumn) |
|
448 | 451 | and "-" or "", column)) |
|
449 | 452 | for column in sortable] |
|
450 | 453 | |
|
451 | 454 | self.refresh() |
|
452 | 455 | self.updatereqenv(req.env) |
|
453 | 456 | |
|
454 | 457 | return tmpl("index", entries=entries, subdir=subdir, |
|
455 | 458 | pathdef=hgweb_mod.makebreadcrumb('/' + subdir, self.prefix), |
|
456 | 459 | sortcolumn=sortcolumn, descending=descending, |
|
457 | 460 | **dict(sort)) |
|
458 | 461 | |
|
459 | 462 | def templater(self, req): |
|
460 | 463 | |
|
461 | 464 | def motd(**map): |
|
462 | 465 | if self.motd is not None: |
|
463 | 466 | yield self.motd |
|
464 | 467 | else: |
|
465 | 468 | yield config('web', 'motd', '') |
|
466 | 469 | |
|
467 | 470 | def config(section, name, default=None, untrusted=True): |
|
468 | 471 | return self.ui.config(section, name, default, untrusted) |
|
469 | 472 | |
|
470 | 473 | self.updatereqenv(req.env) |
|
471 | 474 | |
|
472 | 475 | url = req.env.get('SCRIPT_NAME', '') |
|
473 | 476 | if not url.endswith('/'): |
|
474 | 477 | url += '/' |
|
475 | 478 | |
|
476 | 479 | vars = {} |
|
477 | 480 | styles = ( |
|
478 | 481 | req.form.get('style', [None])[0], |
|
479 | 482 | config('web', 'style'), |
|
480 | 483 | 'paper' |
|
481 | 484 | ) |
|
482 | 485 | style, mapfile = templater.stylemap(styles, self.templatepath) |
|
483 | 486 | if style == styles[0]: |
|
484 | 487 | vars['style'] = style |
|
485 | 488 | |
|
486 | 489 | start = url[-1] == '?' and '&' or '?' |
|
487 | 490 | sessionvars = webutil.sessionvars(vars, start) |
|
488 | 491 | logourl = config('web', 'logourl', 'https://mercurial-scm.org/') |
|
489 | 492 | logoimg = config('web', 'logoimg', 'hglogo.png') |
|
490 | 493 | staticurl = config('web', 'staticurl') or url + 'static/' |
|
491 | 494 | if not staticurl.endswith('/'): |
|
492 | 495 | staticurl += '/' |
|
493 | 496 | |
|
494 | 497 | defaults = { |
|
495 | 498 | "encoding": encoding.encoding, |
|
496 | 499 | "motd": motd, |
|
497 | 500 | "url": url, |
|
498 | 501 | "logourl": logourl, |
|
499 | 502 | "logoimg": logoimg, |
|
500 | 503 | "staticurl": staticurl, |
|
501 | 504 | "sessionvars": sessionvars, |
|
502 | 505 | "style": style, |
|
503 | 506 | } |
|
504 | 507 | tmpl = templater.templater.frommapfile(mapfile, defaults=defaults) |
|
505 | 508 | return tmpl |
|
506 | 509 | |
|
507 | 510 | def updatereqenv(self, env): |
|
508 | 511 | if self._baseurl is not None: |
|
509 | 512 | name, port, path = geturlcgivars(self._baseurl, env['SERVER_PORT']) |
|
510 | 513 | env['SERVER_NAME'] = name |
|
511 | 514 | env['SERVER_PORT'] = port |
|
512 | 515 | env['SCRIPT_NAME'] = path |
@@ -1,1303 +1,1304 | |||
|
1 | 1 | # |
|
2 | 2 | # Copyright 21 May 2005 - (c) 2005 Jake Edge <jake@edge2.net> |
|
3 | 3 | # Copyright 2005-2007 Matt Mackall <mpm@selenic.com> |
|
4 | 4 | # |
|
5 | 5 | # This software may be used and distributed according to the terms of the |
|
6 | 6 | # GNU General Public License version 2 or any later version. |
|
7 | 7 | |
|
8 | 8 | from __future__ import absolute_import |
|
9 | 9 | |
|
10 | 10 | import cgi |
|
11 | 11 | import copy |
|
12 | 12 | import mimetypes |
|
13 | 13 | import os |
|
14 | 14 | import re |
|
15 | 15 | |
|
16 | 16 | from ..i18n import _ |
|
17 | 17 | from ..node import hex, short |
|
18 | 18 | |
|
19 | 19 | from .common import ( |
|
20 | 20 | ErrorResponse, |
|
21 | 21 | HTTP_FORBIDDEN, |
|
22 | 22 | HTTP_NOT_FOUND, |
|
23 | 23 | HTTP_OK, |
|
24 | 24 | get_contact, |
|
25 | 25 | paritygen, |
|
26 | 26 | staticfile, |
|
27 | 27 | ) |
|
28 | 28 | |
|
29 | 29 | from .. import ( |
|
30 | 30 | archival, |
|
31 | 31 | encoding, |
|
32 | 32 | error, |
|
33 | 33 | graphmod, |
|
34 | 34 | patch, |
|
35 | 35 | revset, |
|
36 | 36 | scmutil, |
|
37 | 37 | templatefilters, |
|
38 | 38 | templater, |
|
39 | 39 | util, |
|
40 | 40 | ) |
|
41 | 41 | |
|
42 | 42 | from . import ( |
|
43 | 43 | webutil, |
|
44 | 44 | ) |
|
45 | 45 | |
|
46 | 46 | __all__ = [] |
|
47 | 47 | commands = {} |
|
48 | 48 | |
|
49 | 49 | class webcommand(object): |
|
50 | 50 | """Decorator used to register a web command handler. |
|
51 | 51 | |
|
52 | 52 | The decorator takes as its positional arguments the name/path the |
|
53 | 53 | command should be accessible under. |
|
54 | 54 | |
|
55 | 55 | Usage: |
|
56 | 56 | |
|
57 | 57 | @webcommand('mycommand') |
|
58 | 58 | def mycommand(web, req, tmpl): |
|
59 | 59 | pass |
|
60 | 60 | """ |
|
61 | 61 | |
|
62 | 62 | def __init__(self, name): |
|
63 | 63 | self.name = name |
|
64 | 64 | |
|
65 | 65 | def __call__(self, func): |
|
66 | 66 | __all__.append(self.name) |
|
67 | 67 | commands[self.name] = func |
|
68 | 68 | return func |
|
69 | 69 | |
|
70 | 70 | @webcommand('log') |
|
71 | 71 | def log(web, req, tmpl): |
|
72 | 72 | """ |
|
73 | 73 | /log[/{revision}[/{path}]] |
|
74 | 74 | -------------------------- |
|
75 | 75 | |
|
76 | 76 | Show repository or file history. |
|
77 | 77 | |
|
78 | 78 | For URLs of the form ``/log/{revision}``, a list of changesets starting at |
|
79 | 79 | the specified changeset identifier is shown. If ``{revision}`` is not |
|
80 | 80 | defined, the default is ``tip``. This form is equivalent to the |
|
81 | 81 | ``changelog`` handler. |
|
82 | 82 | |
|
83 | 83 | For URLs of the form ``/log/{revision}/{file}``, the history for a specific |
|
84 | 84 | file will be shown. This form is equivalent to the ``filelog`` handler. |
|
85 | 85 | """ |
|
86 | 86 | |
|
87 | 87 | if 'file' in req.form and req.form['file'][0]: |
|
88 | 88 | return filelog(web, req, tmpl) |
|
89 | 89 | else: |
|
90 | 90 | return changelog(web, req, tmpl) |
|
91 | 91 | |
|
92 | 92 | @webcommand('rawfile') |
|
93 | 93 | def rawfile(web, req, tmpl): |
|
94 | 94 | guessmime = web.configbool('web', 'guessmime', False) |
|
95 | 95 | |
|
96 | 96 | path = webutil.cleanpath(web.repo, req.form.get('file', [''])[0]) |
|
97 | 97 | if not path: |
|
98 | 98 | content = manifest(web, req, tmpl) |
|
99 | 99 | req.respond(HTTP_OK, web.ctype) |
|
100 | 100 | return content |
|
101 | 101 | |
|
102 | 102 | try: |
|
103 | 103 | fctx = webutil.filectx(web.repo, req) |
|
104 | 104 | except error.LookupError as inst: |
|
105 | 105 | try: |
|
106 | 106 | content = manifest(web, req, tmpl) |
|
107 | 107 | req.respond(HTTP_OK, web.ctype) |
|
108 | 108 | return content |
|
109 | 109 | except ErrorResponse: |
|
110 | 110 | raise inst |
|
111 | 111 | |
|
112 | 112 | path = fctx.path() |
|
113 | 113 | text = fctx.data() |
|
114 | 114 | mt = 'application/binary' |
|
115 | 115 | if guessmime: |
|
116 | 116 | mt = mimetypes.guess_type(path)[0] |
|
117 | 117 | if mt is None: |
|
118 | 118 | if util.binary(text): |
|
119 | 119 | mt = 'application/binary' |
|
120 | 120 | else: |
|
121 | 121 | mt = 'text/plain' |
|
122 | 122 | if mt.startswith('text/'): |
|
123 | 123 | mt += '; charset="%s"' % encoding.encoding |
|
124 | 124 | |
|
125 | 125 | req.respond(HTTP_OK, mt, path, body=text) |
|
126 | 126 | return [] |
|
127 | 127 | |
|
128 | 128 | def _filerevision(web, req, tmpl, fctx): |
|
129 | 129 | f = fctx.path() |
|
130 | 130 | text = fctx.data() |
|
131 | 131 | parity = paritygen(web.stripecount) |
|
132 | 132 | |
|
133 | 133 | if util.binary(text): |
|
134 | 134 | mt = mimetypes.guess_type(f)[0] or 'application/octet-stream' |
|
135 | 135 | text = '(binary:%s)' % mt |
|
136 | 136 | |
|
137 | 137 | def lines(): |
|
138 | 138 | for lineno, t in enumerate(text.splitlines(True)): |
|
139 | 139 | yield {"line": t, |
|
140 | 140 | "lineid": "l%d" % (lineno + 1), |
|
141 | 141 | "linenumber": "% 6d" % (lineno + 1), |
|
142 | 142 | "parity": next(parity)} |
|
143 | 143 | |
|
144 | 144 | return tmpl("filerevision", |
|
145 | 145 | file=f, |
|
146 | 146 | path=webutil.up(f), |
|
147 | 147 | text=lines(), |
|
148 | 148 | symrev=webutil.symrevorshortnode(req, fctx), |
|
149 | 149 | rename=webutil.renamelink(fctx), |
|
150 | 150 | permissions=fctx.manifest().flags(f), |
|
151 | 151 | **webutil.commonentry(web.repo, fctx)) |
|
152 | 152 | |
|
153 | 153 | @webcommand('file') |
|
154 | 154 | def file(web, req, tmpl): |
|
155 | 155 | """ |
|
156 | 156 | /file/{revision}[/{path}] |
|
157 | 157 | ------------------------- |
|
158 | 158 | |
|
159 | 159 | Show information about a directory or file in the repository. |
|
160 | 160 | |
|
161 | 161 | Info about the ``path`` given as a URL parameter will be rendered. |
|
162 | 162 | |
|
163 | 163 | If ``path`` is a directory, information about the entries in that |
|
164 | 164 | directory will be rendered. This form is equivalent to the ``manifest`` |
|
165 | 165 | handler. |
|
166 | 166 | |
|
167 | 167 | If ``path`` is a file, information about that file will be shown via |
|
168 | 168 | the ``filerevision`` template. |
|
169 | 169 | |
|
170 | 170 | If ``path`` is not defined, information about the root directory will |
|
171 | 171 | be rendered. |
|
172 | 172 | """ |
|
173 | 173 | path = webutil.cleanpath(web.repo, req.form.get('file', [''])[0]) |
|
174 | 174 | if not path: |
|
175 | 175 | return manifest(web, req, tmpl) |
|
176 | 176 | try: |
|
177 | 177 | return _filerevision(web, req, tmpl, webutil.filectx(web.repo, req)) |
|
178 | 178 | except error.LookupError as inst: |
|
179 | 179 | try: |
|
180 | 180 | return manifest(web, req, tmpl) |
|
181 | 181 | except ErrorResponse: |
|
182 | 182 | raise inst |
|
183 | 183 | |
|
184 | 184 | def _search(web, req, tmpl): |
|
185 | 185 | MODE_REVISION = 'rev' |
|
186 | 186 | MODE_KEYWORD = 'keyword' |
|
187 | 187 | MODE_REVSET = 'revset' |
|
188 | 188 | |
|
189 | 189 | def revsearch(ctx): |
|
190 | 190 | yield ctx |
|
191 | 191 | |
|
192 | 192 | def keywordsearch(query): |
|
193 | 193 | lower = encoding.lower |
|
194 | 194 | qw = lower(query).split() |
|
195 | 195 | |
|
196 | 196 | def revgen(): |
|
197 | 197 | cl = web.repo.changelog |
|
198 | 198 | for i in xrange(len(web.repo) - 1, 0, -100): |
|
199 | 199 | l = [] |
|
200 | 200 | for j in cl.revs(max(0, i - 99), i): |
|
201 | 201 | ctx = web.repo[j] |
|
202 | 202 | l.append(ctx) |
|
203 | 203 | l.reverse() |
|
204 | 204 | for e in l: |
|
205 | 205 | yield e |
|
206 | 206 | |
|
207 | 207 | for ctx in revgen(): |
|
208 | 208 | miss = 0 |
|
209 | 209 | for q in qw: |
|
210 | 210 | if not (q in lower(ctx.user()) or |
|
211 | 211 | q in lower(ctx.description()) or |
|
212 | 212 | q in lower(" ".join(ctx.files()))): |
|
213 | 213 | miss = 1 |
|
214 | 214 | break |
|
215 | 215 | if miss: |
|
216 | 216 | continue |
|
217 | 217 | |
|
218 | 218 | yield ctx |
|
219 | 219 | |
|
220 | 220 | def revsetsearch(revs): |
|
221 | 221 | for r in revs: |
|
222 | 222 | yield web.repo[r] |
|
223 | 223 | |
|
224 | 224 | searchfuncs = { |
|
225 | 225 | MODE_REVISION: (revsearch, 'exact revision search'), |
|
226 | 226 | MODE_KEYWORD: (keywordsearch, 'literal keyword search'), |
|
227 | 227 | MODE_REVSET: (revsetsearch, 'revset expression search'), |
|
228 | 228 | } |
|
229 | 229 | |
|
230 | 230 | def getsearchmode(query): |
|
231 | 231 | try: |
|
232 | 232 | ctx = web.repo[query] |
|
233 | 233 | except (error.RepoError, error.LookupError): |
|
234 | 234 | # query is not an exact revision pointer, need to |
|
235 | 235 | # decide if it's a revset expression or keywords |
|
236 | 236 | pass |
|
237 | 237 | else: |
|
238 | 238 | return MODE_REVISION, ctx |
|
239 | 239 | |
|
240 | 240 | revdef = 'reverse(%s)' % query |
|
241 | 241 | try: |
|
242 | 242 | tree = revset.parse(revdef) |
|
243 | 243 | except error.ParseError: |
|
244 | 244 | # can't parse to a revset tree |
|
245 | 245 | return MODE_KEYWORD, query |
|
246 | 246 | |
|
247 | 247 | if revset.depth(tree) <= 2: |
|
248 | 248 | # no revset syntax used |
|
249 | 249 | return MODE_KEYWORD, query |
|
250 | 250 | |
|
251 | 251 | if any((token, (value or '')[:3]) == ('string', 're:') |
|
252 | 252 | for token, value, pos in revset.tokenize(revdef)): |
|
253 | 253 | return MODE_KEYWORD, query |
|
254 | 254 | |
|
255 | 255 | funcsused = revset.funcsused(tree) |
|
256 | 256 | if not funcsused.issubset(revset.safesymbols): |
|
257 | 257 | return MODE_KEYWORD, query |
|
258 | 258 | |
|
259 | 259 | mfunc = revset.match(web.repo.ui, revdef) |
|
260 | 260 | try: |
|
261 | 261 | revs = mfunc(web.repo) |
|
262 | 262 | return MODE_REVSET, revs |
|
263 | 263 | # ParseError: wrongly placed tokens, wrongs arguments, etc |
|
264 | 264 | # RepoLookupError: no such revision, e.g. in 'revision:' |
|
265 | 265 | # Abort: bookmark/tag not exists |
|
266 | 266 | # LookupError: ambiguous identifier, e.g. in '(bc)' on a large repo |
|
267 | 267 | except (error.ParseError, error.RepoLookupError, error.Abort, |
|
268 | 268 | LookupError): |
|
269 | 269 | return MODE_KEYWORD, query |
|
270 | 270 | |
|
271 | 271 | def changelist(**map): |
|
272 | 272 | count = 0 |
|
273 | 273 | |
|
274 | 274 | for ctx in searchfunc[0](funcarg): |
|
275 | 275 | count += 1 |
|
276 | 276 | n = ctx.node() |
|
277 | 277 | showtags = webutil.showtag(web.repo, tmpl, 'changelogtag', n) |
|
278 | 278 | files = webutil.listfilediffs(tmpl, ctx.files(), n, web.maxfiles) |
|
279 | 279 | |
|
280 | 280 | yield tmpl('searchentry', |
|
281 | 281 | parity=next(parity), |
|
282 | 282 | changelogtag=showtags, |
|
283 | 283 | files=files, |
|
284 | 284 | **webutil.commonentry(web.repo, ctx)) |
|
285 | 285 | |
|
286 | 286 | if count >= revcount: |
|
287 | 287 | break |
|
288 | 288 | |
|
289 | 289 | query = req.form['rev'][0] |
|
290 | 290 | revcount = web.maxchanges |
|
291 | 291 | if 'revcount' in req.form: |
|
292 | 292 | try: |
|
293 | 293 | revcount = int(req.form.get('revcount', [revcount])[0]) |
|
294 | 294 | revcount = max(revcount, 1) |
|
295 | 295 | tmpl.defaults['sessionvars']['revcount'] = revcount |
|
296 | 296 | except ValueError: |
|
297 | 297 | pass |
|
298 | 298 | |
|
299 | 299 | lessvars = copy.copy(tmpl.defaults['sessionvars']) |
|
300 | 300 | lessvars['revcount'] = max(revcount / 2, 1) |
|
301 | 301 | lessvars['rev'] = query |
|
302 | 302 | morevars = copy.copy(tmpl.defaults['sessionvars']) |
|
303 | 303 | morevars['revcount'] = revcount * 2 |
|
304 | 304 | morevars['rev'] = query |
|
305 | 305 | |
|
306 | 306 | mode, funcarg = getsearchmode(query) |
|
307 | 307 | |
|
308 | 308 | if 'forcekw' in req.form: |
|
309 | 309 | showforcekw = '' |
|
310 | 310 | showunforcekw = searchfuncs[mode][1] |
|
311 | 311 | mode = MODE_KEYWORD |
|
312 | 312 | funcarg = query |
|
313 | 313 | else: |
|
314 | 314 | if mode != MODE_KEYWORD: |
|
315 | 315 | showforcekw = searchfuncs[MODE_KEYWORD][1] |
|
316 | 316 | else: |
|
317 | 317 | showforcekw = '' |
|
318 | 318 | showunforcekw = '' |
|
319 | 319 | |
|
320 | 320 | searchfunc = searchfuncs[mode] |
|
321 | 321 | |
|
322 | 322 | tip = web.repo['tip'] |
|
323 | 323 | parity = paritygen(web.stripecount) |
|
324 | 324 | |
|
325 | 325 | return tmpl('search', query=query, node=tip.hex(), symrev='tip', |
|
326 | 326 | entries=changelist, archives=web.archivelist("tip"), |
|
327 | 327 | morevars=morevars, lessvars=lessvars, |
|
328 | 328 | modedesc=searchfunc[1], |
|
329 | 329 | showforcekw=showforcekw, showunforcekw=showunforcekw) |
|
330 | 330 | |
|
331 | 331 | @webcommand('changelog') |
|
332 | 332 | def changelog(web, req, tmpl, shortlog=False): |
|
333 | 333 | """ |
|
334 | 334 | /changelog[/{revision}] |
|
335 | 335 | ----------------------- |
|
336 | 336 | |
|
337 | 337 | Show information about multiple changesets. |
|
338 | 338 | |
|
339 | 339 | If the optional ``revision`` URL argument is absent, information about |
|
340 | 340 | all changesets starting at ``tip`` will be rendered. If the ``revision`` |
|
341 | 341 | argument is present, changesets will be shown starting from the specified |
|
342 | 342 | revision. |
|
343 | 343 | |
|
344 | 344 | If ``revision`` is absent, the ``rev`` query string argument may be |
|
345 | 345 | defined. This will perform a search for changesets. |
|
346 | 346 | |
|
347 | 347 | The argument for ``rev`` can be a single revision, a revision set, |
|
348 | 348 | or a literal keyword to search for in changeset data (equivalent to |
|
349 | 349 | :hg:`log -k`). |
|
350 | 350 | |
|
351 | 351 | The ``revcount`` query string argument defines the maximum numbers of |
|
352 | 352 | changesets to render. |
|
353 | 353 | |
|
354 | 354 | For non-searches, the ``changelog`` template will be rendered. |
|
355 | 355 | """ |
|
356 | 356 | |
|
357 | 357 | query = '' |
|
358 | 358 | if 'node' in req.form: |
|
359 | 359 | ctx = webutil.changectx(web.repo, req) |
|
360 | 360 | symrev = webutil.symrevorshortnode(req, ctx) |
|
361 | 361 | elif 'rev' in req.form: |
|
362 | 362 | return _search(web, req, tmpl) |
|
363 | 363 | else: |
|
364 | 364 | ctx = web.repo['tip'] |
|
365 | 365 | symrev = 'tip' |
|
366 | 366 | |
|
367 | 367 | def changelist(): |
|
368 | 368 | revs = [] |
|
369 | 369 | if pos != -1: |
|
370 | 370 | revs = web.repo.changelog.revs(pos, 0) |
|
371 | 371 | curcount = 0 |
|
372 | 372 | for rev in revs: |
|
373 | 373 | curcount += 1 |
|
374 | 374 | if curcount > revcount + 1: |
|
375 | 375 | break |
|
376 | 376 | |
|
377 | 377 | entry = webutil.changelistentry(web, web.repo[rev], tmpl) |
|
378 | 378 | entry['parity'] = next(parity) |
|
379 | 379 | yield entry |
|
380 | 380 | |
|
381 | 381 | if shortlog: |
|
382 | 382 | revcount = web.maxshortchanges |
|
383 | 383 | else: |
|
384 | 384 | revcount = web.maxchanges |
|
385 | 385 | |
|
386 | 386 | if 'revcount' in req.form: |
|
387 | 387 | try: |
|
388 | 388 | revcount = int(req.form.get('revcount', [revcount])[0]) |
|
389 | 389 | revcount = max(revcount, 1) |
|
390 | 390 | tmpl.defaults['sessionvars']['revcount'] = revcount |
|
391 | 391 | except ValueError: |
|
392 | 392 | pass |
|
393 | 393 | |
|
394 | 394 | lessvars = copy.copy(tmpl.defaults['sessionvars']) |
|
395 | 395 | lessvars['revcount'] = max(revcount / 2, 1) |
|
396 | 396 | morevars = copy.copy(tmpl.defaults['sessionvars']) |
|
397 | 397 | morevars['revcount'] = revcount * 2 |
|
398 | 398 | |
|
399 | 399 | count = len(web.repo) |
|
400 | 400 | pos = ctx.rev() |
|
401 | 401 | parity = paritygen(web.stripecount) |
|
402 | 402 | |
|
403 | 403 | changenav = webutil.revnav(web.repo).gen(pos, revcount, count) |
|
404 | 404 | |
|
405 | 405 | entries = list(changelist()) |
|
406 | 406 | latestentry = entries[:1] |
|
407 | 407 | if len(entries) > revcount: |
|
408 | 408 | nextentry = entries[-1:] |
|
409 | 409 | entries = entries[:-1] |
|
410 | 410 | else: |
|
411 | 411 | nextentry = [] |
|
412 | 412 | |
|
413 | 413 | return tmpl(shortlog and 'shortlog' or 'changelog', changenav=changenav, |
|
414 | 414 | node=ctx.hex(), rev=pos, symrev=symrev, changesets=count, |
|
415 | 415 | entries=entries, |
|
416 | 416 | latestentry=latestentry, nextentry=nextentry, |
|
417 | 417 | archives=web.archivelist("tip"), revcount=revcount, |
|
418 | 418 | morevars=morevars, lessvars=lessvars, query=query) |
|
419 | 419 | |
|
420 | 420 | @webcommand('shortlog') |
|
421 | 421 | def shortlog(web, req, tmpl): |
|
422 | 422 | """ |
|
423 | 423 | /shortlog |
|
424 | 424 | --------- |
|
425 | 425 | |
|
426 | 426 | Show basic information about a set of changesets. |
|
427 | 427 | |
|
428 | 428 | This accepts the same parameters as the ``changelog`` handler. The only |
|
429 | 429 | difference is the ``shortlog`` template will be rendered instead of the |
|
430 | 430 | ``changelog`` template. |
|
431 | 431 | """ |
|
432 | 432 | return changelog(web, req, tmpl, shortlog=True) |
|
433 | 433 | |
|
434 | 434 | @webcommand('changeset') |
|
435 | 435 | def changeset(web, req, tmpl): |
|
436 | 436 | """ |
|
437 | 437 | /changeset[/{revision}] |
|
438 | 438 | ----------------------- |
|
439 | 439 | |
|
440 | 440 | Show information about a single changeset. |
|
441 | 441 | |
|
442 | 442 | A URL path argument is the changeset identifier to show. See ``hg help |
|
443 | 443 | revisions`` for possible values. If not defined, the ``tip`` changeset |
|
444 | 444 | will be shown. |
|
445 | 445 | |
|
446 | 446 | The ``changeset`` template is rendered. Contents of the ``changesettag``, |
|
447 | 447 | ``changesetbookmark``, ``filenodelink``, ``filenolink``, and the many |
|
448 | 448 | templates related to diffs may all be used to produce the output. |
|
449 | 449 | """ |
|
450 | 450 | ctx = webutil.changectx(web.repo, req) |
|
451 | 451 | |
|
452 | 452 | return tmpl('changeset', **webutil.changesetentry(web, req, tmpl, ctx)) |
|
453 | 453 | |
|
454 | 454 | rev = webcommand('rev')(changeset) |
|
455 | 455 | |
|
456 | 456 | def decodepath(path): |
|
457 | 457 | """Hook for mapping a path in the repository to a path in the |
|
458 | 458 | working copy. |
|
459 | 459 | |
|
460 | 460 | Extensions (e.g., largefiles) can override this to remap files in |
|
461 | 461 | the virtual file system presented by the manifest command below.""" |
|
462 | 462 | return path |
|
463 | 463 | |
|
464 | 464 | @webcommand('manifest') |
|
465 | 465 | def manifest(web, req, tmpl): |
|
466 | 466 | """ |
|
467 | 467 | /manifest[/{revision}[/{path}]] |
|
468 | 468 | ------------------------------- |
|
469 | 469 | |
|
470 | 470 | Show information about a directory. |
|
471 | 471 | |
|
472 | 472 | If the URL path arguments are omitted, information about the root |
|
473 | 473 | directory for the ``tip`` changeset will be shown. |
|
474 | 474 | |
|
475 | 475 | Because this handler can only show information for directories, it |
|
476 | 476 | is recommended to use the ``file`` handler instead, as it can handle both |
|
477 | 477 | directories and files. |
|
478 | 478 | |
|
479 | 479 | The ``manifest`` template will be rendered for this handler. |
|
480 | 480 | """ |
|
481 | 481 | if 'node' in req.form: |
|
482 | 482 | ctx = webutil.changectx(web.repo, req) |
|
483 | 483 | symrev = webutil.symrevorshortnode(req, ctx) |
|
484 | 484 | else: |
|
485 | 485 | ctx = web.repo['tip'] |
|
486 | 486 | symrev = 'tip' |
|
487 | 487 | path = webutil.cleanpath(web.repo, req.form.get('file', [''])[0]) |
|
488 | 488 | mf = ctx.manifest() |
|
489 | 489 | node = ctx.node() |
|
490 | 490 | |
|
491 | 491 | files = {} |
|
492 | 492 | dirs = {} |
|
493 | 493 | parity = paritygen(web.stripecount) |
|
494 | 494 | |
|
495 | 495 | if path and path[-1] != "/": |
|
496 | 496 | path += "/" |
|
497 | 497 | l = len(path) |
|
498 | 498 | abspath = "/" + path |
|
499 | 499 | |
|
500 | 500 | for full, n in mf.iteritems(): |
|
501 | 501 | # the virtual path (working copy path) used for the full |
|
502 | 502 | # (repository) path |
|
503 | 503 | f = decodepath(full) |
|
504 | 504 | |
|
505 | 505 | if f[:l] != path: |
|
506 | 506 | continue |
|
507 | 507 | remain = f[l:] |
|
508 | 508 | elements = remain.split('/') |
|
509 | 509 | if len(elements) == 1: |
|
510 | 510 | files[remain] = full |
|
511 | 511 | else: |
|
512 | 512 | h = dirs # need to retain ref to dirs (root) |
|
513 | 513 | for elem in elements[0:-1]: |
|
514 | 514 | if elem not in h: |
|
515 | 515 | h[elem] = {} |
|
516 | 516 | h = h[elem] |
|
517 | 517 | if len(h) > 1: |
|
518 | 518 | break |
|
519 | 519 | h[None] = None # denotes files present |
|
520 | 520 | |
|
521 | 521 | if mf and not files and not dirs: |
|
522 | 522 | raise ErrorResponse(HTTP_NOT_FOUND, 'path not found: ' + path) |
|
523 | 523 | |
|
524 | 524 | def filelist(**map): |
|
525 | 525 | for f in sorted(files): |
|
526 | 526 | full = files[f] |
|
527 | 527 | |
|
528 | 528 | fctx = ctx.filectx(full) |
|
529 | 529 | yield {"file": full, |
|
530 | 530 | "parity": next(parity), |
|
531 | 531 | "basename": f, |
|
532 | 532 | "date": fctx.date(), |
|
533 | 533 | "size": fctx.size(), |
|
534 | 534 | "permissions": mf.flags(full)} |
|
535 | 535 | |
|
536 | 536 | def dirlist(**map): |
|
537 | 537 | for d in sorted(dirs): |
|
538 | 538 | |
|
539 | 539 | emptydirs = [] |
|
540 | 540 | h = dirs[d] |
|
541 | 541 | while isinstance(h, dict) and len(h) == 1: |
|
542 | 542 | k, v = h.items()[0] |
|
543 | 543 | if v: |
|
544 | 544 | emptydirs.append(k) |
|
545 | 545 | h = v |
|
546 | 546 | |
|
547 | 547 | path = "%s%s" % (abspath, d) |
|
548 | 548 | yield {"parity": next(parity), |
|
549 | 549 | "path": path, |
|
550 | 550 | "emptydirs": "/".join(emptydirs), |
|
551 | 551 | "basename": d} |
|
552 | 552 | |
|
553 | 553 | return tmpl("manifest", |
|
554 | 554 | symrev=symrev, |
|
555 | 555 | path=abspath, |
|
556 | 556 | up=webutil.up(abspath), |
|
557 | 557 | upparity=next(parity), |
|
558 | 558 | fentries=filelist, |
|
559 | 559 | dentries=dirlist, |
|
560 | 560 | archives=web.archivelist(hex(node)), |
|
561 | 561 | **webutil.commonentry(web.repo, ctx)) |
|
562 | 562 | |
|
563 | 563 | @webcommand('tags') |
|
564 | 564 | def tags(web, req, tmpl): |
|
565 | 565 | """ |
|
566 | 566 | /tags |
|
567 | 567 | ----- |
|
568 | 568 | |
|
569 | 569 | Show information about tags. |
|
570 | 570 | |
|
571 | 571 | No arguments are accepted. |
|
572 | 572 | |
|
573 | 573 | The ``tags`` template is rendered. |
|
574 | 574 | """ |
|
575 | 575 | i = list(reversed(web.repo.tagslist())) |
|
576 | 576 | parity = paritygen(web.stripecount) |
|
577 | 577 | |
|
578 | 578 | def entries(notip, latestonly, **map): |
|
579 | 579 | t = i |
|
580 | 580 | if notip: |
|
581 | 581 | t = [(k, n) for k, n in i if k != "tip"] |
|
582 | 582 | if latestonly: |
|
583 | 583 | t = t[:1] |
|
584 | 584 | for k, n in t: |
|
585 | 585 | yield {"parity": next(parity), |
|
586 | 586 | "tag": k, |
|
587 | 587 | "date": web.repo[n].date(), |
|
588 | 588 | "node": hex(n)} |
|
589 | 589 | |
|
590 | 590 | return tmpl("tags", |
|
591 | 591 | node=hex(web.repo.changelog.tip()), |
|
592 | 592 | entries=lambda **x: entries(False, False, **x), |
|
593 | 593 | entriesnotip=lambda **x: entries(True, False, **x), |
|
594 | 594 | latestentry=lambda **x: entries(True, True, **x)) |
|
595 | 595 | |
|
596 | 596 | @webcommand('bookmarks') |
|
597 | 597 | def bookmarks(web, req, tmpl): |
|
598 | 598 | """ |
|
599 | 599 | /bookmarks |
|
600 | 600 | ---------- |
|
601 | 601 | |
|
602 | 602 | Show information about bookmarks. |
|
603 | 603 | |
|
604 | 604 | No arguments are accepted. |
|
605 | 605 | |
|
606 | 606 | The ``bookmarks`` template is rendered. |
|
607 | 607 | """ |
|
608 | 608 | i = [b for b in web.repo._bookmarks.items() if b[1] in web.repo] |
|
609 | 609 | sortkey = lambda b: (web.repo[b[1]].rev(), b[0]) |
|
610 | 610 | i = sorted(i, key=sortkey, reverse=True) |
|
611 | 611 | parity = paritygen(web.stripecount) |
|
612 | 612 | |
|
613 | 613 | def entries(latestonly, **map): |
|
614 | 614 | t = i |
|
615 | 615 | if latestonly: |
|
616 | 616 | t = i[:1] |
|
617 | 617 | for k, n in t: |
|
618 | 618 | yield {"parity": next(parity), |
|
619 | 619 | "bookmark": k, |
|
620 | 620 | "date": web.repo[n].date(), |
|
621 | 621 | "node": hex(n)} |
|
622 | 622 | |
|
623 | 623 | if i: |
|
624 | 624 | latestrev = i[0][1] |
|
625 | 625 | else: |
|
626 | 626 | latestrev = -1 |
|
627 | 627 | |
|
628 | 628 | return tmpl("bookmarks", |
|
629 | 629 | node=hex(web.repo.changelog.tip()), |
|
630 | 630 | lastchange=[{"date": web.repo[latestrev].date()}], |
|
631 | 631 | entries=lambda **x: entries(latestonly=False, **x), |
|
632 | 632 | latestentry=lambda **x: entries(latestonly=True, **x)) |
|
633 | 633 | |
|
634 | 634 | @webcommand('branches') |
|
635 | 635 | def branches(web, req, tmpl): |
|
636 | 636 | """ |
|
637 | 637 | /branches |
|
638 | 638 | --------- |
|
639 | 639 | |
|
640 | 640 | Show information about branches. |
|
641 | 641 | |
|
642 | 642 | All known branches are contained in the output, even closed branches. |
|
643 | 643 | |
|
644 | 644 | No arguments are accepted. |
|
645 | 645 | |
|
646 | 646 | The ``branches`` template is rendered. |
|
647 | 647 | """ |
|
648 | 648 | entries = webutil.branchentries(web.repo, web.stripecount) |
|
649 | 649 | latestentry = webutil.branchentries(web.repo, web.stripecount, 1) |
|
650 | 650 | return tmpl('branches', node=hex(web.repo.changelog.tip()), |
|
651 | 651 | entries=entries, latestentry=latestentry) |
|
652 | 652 | |
|
653 | 653 | @webcommand('summary') |
|
654 | 654 | def summary(web, req, tmpl): |
|
655 | 655 | """ |
|
656 | 656 | /summary |
|
657 | 657 | -------- |
|
658 | 658 | |
|
659 | 659 | Show a summary of repository state. |
|
660 | 660 | |
|
661 | 661 | Information about the latest changesets, bookmarks, tags, and branches |
|
662 | 662 | is captured by this handler. |
|
663 | 663 | |
|
664 | 664 | The ``summary`` template is rendered. |
|
665 | 665 | """ |
|
666 | 666 | i = reversed(web.repo.tagslist()) |
|
667 | 667 | |
|
668 | 668 | def tagentries(**map): |
|
669 | 669 | parity = paritygen(web.stripecount) |
|
670 | 670 | count = 0 |
|
671 | 671 | for k, n in i: |
|
672 | 672 | if k == "tip": # skip tip |
|
673 | 673 | continue |
|
674 | 674 | |
|
675 | 675 | count += 1 |
|
676 | 676 | if count > 10: # limit to 10 tags |
|
677 | 677 | break |
|
678 | 678 | |
|
679 | 679 | yield tmpl("tagentry", |
|
680 | 680 | parity=next(parity), |
|
681 | 681 | tag=k, |
|
682 | 682 | node=hex(n), |
|
683 | 683 | date=web.repo[n].date()) |
|
684 | 684 | |
|
685 | 685 | def bookmarks(**map): |
|
686 | 686 | parity = paritygen(web.stripecount) |
|
687 | 687 | marks = [b for b in web.repo._bookmarks.items() if b[1] in web.repo] |
|
688 | 688 | sortkey = lambda b: (web.repo[b[1]].rev(), b[0]) |
|
689 | 689 | marks = sorted(marks, key=sortkey, reverse=True) |
|
690 | 690 | for k, n in marks[:10]: # limit to 10 bookmarks |
|
691 | 691 | yield {'parity': next(parity), |
|
692 | 692 | 'bookmark': k, |
|
693 | 693 | 'date': web.repo[n].date(), |
|
694 | 694 | 'node': hex(n)} |
|
695 | 695 | |
|
696 | 696 | def changelist(**map): |
|
697 | 697 | parity = paritygen(web.stripecount, offset=start - end) |
|
698 | 698 | l = [] # build a list in forward order for efficiency |
|
699 | 699 | revs = [] |
|
700 | 700 | if start < end: |
|
701 | 701 | revs = web.repo.changelog.revs(start, end - 1) |
|
702 | 702 | for i in revs: |
|
703 | 703 | ctx = web.repo[i] |
|
704 | 704 | |
|
705 | 705 | l.append(tmpl( |
|
706 | 706 | 'shortlogentry', |
|
707 | 707 | parity=next(parity), |
|
708 | 708 | **webutil.commonentry(web.repo, ctx))) |
|
709 | 709 | |
|
710 | 710 | for entry in reversed(l): |
|
711 | 711 | yield entry |
|
712 | 712 | |
|
713 | 713 | tip = web.repo['tip'] |
|
714 | 714 | count = len(web.repo) |
|
715 | 715 | start = max(0, count - web.maxchanges) |
|
716 | 716 | end = min(count, start + web.maxchanges) |
|
717 | 717 | |
|
718 | 718 | return tmpl("summary", |
|
719 | 719 | desc=web.config("web", "description", "unknown"), |
|
720 | 720 | owner=get_contact(web.config) or "unknown", |
|
721 | 721 | lastchange=tip.date(), |
|
722 | 722 | tags=tagentries, |
|
723 | 723 | bookmarks=bookmarks, |
|
724 | 724 | branches=webutil.branchentries(web.repo, web.stripecount, 10), |
|
725 | 725 | shortlog=changelist, |
|
726 | 726 | node=tip.hex(), |
|
727 | 727 | symrev='tip', |
|
728 |
archives=web.archivelist("tip") |
|
|
728 | archives=web.archivelist("tip"), | |
|
729 | labels=web.configlist('web', 'labels')) | |
|
729 | 730 | |
|
730 | 731 | @webcommand('filediff') |
|
731 | 732 | def filediff(web, req, tmpl): |
|
732 | 733 | """ |
|
733 | 734 | /diff/{revision}/{path} |
|
734 | 735 | ----------------------- |
|
735 | 736 | |
|
736 | 737 | Show how a file changed in a particular commit. |
|
737 | 738 | |
|
738 | 739 | The ``filediff`` template is rendered. |
|
739 | 740 | |
|
740 | 741 | This handler is registered under both the ``/diff`` and ``/filediff`` |
|
741 | 742 | paths. ``/diff`` is used in modern code. |
|
742 | 743 | """ |
|
743 | 744 | fctx, ctx = None, None |
|
744 | 745 | try: |
|
745 | 746 | fctx = webutil.filectx(web.repo, req) |
|
746 | 747 | except LookupError: |
|
747 | 748 | ctx = webutil.changectx(web.repo, req) |
|
748 | 749 | path = webutil.cleanpath(web.repo, req.form['file'][0]) |
|
749 | 750 | if path not in ctx.files(): |
|
750 | 751 | raise |
|
751 | 752 | |
|
752 | 753 | if fctx is not None: |
|
753 | 754 | path = fctx.path() |
|
754 | 755 | ctx = fctx.changectx() |
|
755 | 756 | |
|
756 | 757 | parity = paritygen(web.stripecount) |
|
757 | 758 | style = web.config('web', 'style', 'paper') |
|
758 | 759 | if 'style' in req.form: |
|
759 | 760 | style = req.form['style'][0] |
|
760 | 761 | |
|
761 | 762 | diffs = webutil.diffs(web.repo, tmpl, ctx, None, [path], parity, style) |
|
762 | 763 | if fctx is not None: |
|
763 | 764 | rename = webutil.renamelink(fctx) |
|
764 | 765 | ctx = fctx |
|
765 | 766 | else: |
|
766 | 767 | rename = [] |
|
767 | 768 | ctx = ctx |
|
768 | 769 | return tmpl("filediff", |
|
769 | 770 | file=path, |
|
770 | 771 | symrev=webutil.symrevorshortnode(req, ctx), |
|
771 | 772 | rename=rename, |
|
772 | 773 | diff=diffs, |
|
773 | 774 | **webutil.commonentry(web.repo, ctx)) |
|
774 | 775 | |
|
775 | 776 | diff = webcommand('diff')(filediff) |
|
776 | 777 | |
|
777 | 778 | @webcommand('comparison') |
|
778 | 779 | def comparison(web, req, tmpl): |
|
779 | 780 | """ |
|
780 | 781 | /comparison/{revision}/{path} |
|
781 | 782 | ----------------------------- |
|
782 | 783 | |
|
783 | 784 | Show a comparison between the old and new versions of a file from changes |
|
784 | 785 | made on a particular revision. |
|
785 | 786 | |
|
786 | 787 | This is similar to the ``diff`` handler. However, this form features |
|
787 | 788 | a split or side-by-side diff rather than a unified diff. |
|
788 | 789 | |
|
789 | 790 | The ``context`` query string argument can be used to control the lines of |
|
790 | 791 | context in the diff. |
|
791 | 792 | |
|
792 | 793 | The ``filecomparison`` template is rendered. |
|
793 | 794 | """ |
|
794 | 795 | ctx = webutil.changectx(web.repo, req) |
|
795 | 796 | if 'file' not in req.form: |
|
796 | 797 | raise ErrorResponse(HTTP_NOT_FOUND, 'file not given') |
|
797 | 798 | path = webutil.cleanpath(web.repo, req.form['file'][0]) |
|
798 | 799 | |
|
799 | 800 | parsecontext = lambda v: v == 'full' and -1 or int(v) |
|
800 | 801 | if 'context' in req.form: |
|
801 | 802 | context = parsecontext(req.form['context'][0]) |
|
802 | 803 | else: |
|
803 | 804 | context = parsecontext(web.config('web', 'comparisoncontext', '5')) |
|
804 | 805 | |
|
805 | 806 | def filelines(f): |
|
806 | 807 | if util.binary(f.data()): |
|
807 | 808 | mt = mimetypes.guess_type(f.path())[0] |
|
808 | 809 | if not mt: |
|
809 | 810 | mt = 'application/octet-stream' |
|
810 | 811 | return [_('(binary file %s, hash: %s)') % (mt, hex(f.filenode()))] |
|
811 | 812 | return f.data().splitlines() |
|
812 | 813 | |
|
813 | 814 | fctx = None |
|
814 | 815 | parent = ctx.p1() |
|
815 | 816 | leftrev = parent.rev() |
|
816 | 817 | leftnode = parent.node() |
|
817 | 818 | rightrev = ctx.rev() |
|
818 | 819 | rightnode = ctx.node() |
|
819 | 820 | if path in ctx: |
|
820 | 821 | fctx = ctx[path] |
|
821 | 822 | rightlines = filelines(fctx) |
|
822 | 823 | if path not in parent: |
|
823 | 824 | leftlines = () |
|
824 | 825 | else: |
|
825 | 826 | pfctx = parent[path] |
|
826 | 827 | leftlines = filelines(pfctx) |
|
827 | 828 | else: |
|
828 | 829 | rightlines = () |
|
829 | 830 | pfctx = ctx.parents()[0][path] |
|
830 | 831 | leftlines = filelines(pfctx) |
|
831 | 832 | |
|
832 | 833 | comparison = webutil.compare(tmpl, context, leftlines, rightlines) |
|
833 | 834 | if fctx is not None: |
|
834 | 835 | rename = webutil.renamelink(fctx) |
|
835 | 836 | ctx = fctx |
|
836 | 837 | else: |
|
837 | 838 | rename = [] |
|
838 | 839 | ctx = ctx |
|
839 | 840 | return tmpl('filecomparison', |
|
840 | 841 | file=path, |
|
841 | 842 | symrev=webutil.symrevorshortnode(req, ctx), |
|
842 | 843 | rename=rename, |
|
843 | 844 | leftrev=leftrev, |
|
844 | 845 | leftnode=hex(leftnode), |
|
845 | 846 | rightrev=rightrev, |
|
846 | 847 | rightnode=hex(rightnode), |
|
847 | 848 | comparison=comparison, |
|
848 | 849 | **webutil.commonentry(web.repo, ctx)) |
|
849 | 850 | |
|
850 | 851 | @webcommand('annotate') |
|
851 | 852 | def annotate(web, req, tmpl): |
|
852 | 853 | """ |
|
853 | 854 | /annotate/{revision}/{path} |
|
854 | 855 | --------------------------- |
|
855 | 856 | |
|
856 | 857 | Show changeset information for each line in a file. |
|
857 | 858 | |
|
858 | 859 | The ``fileannotate`` template is rendered. |
|
859 | 860 | """ |
|
860 | 861 | fctx = webutil.filectx(web.repo, req) |
|
861 | 862 | f = fctx.path() |
|
862 | 863 | parity = paritygen(web.stripecount) |
|
863 | 864 | diffopts = patch.difffeatureopts(web.repo.ui, untrusted=True, |
|
864 | 865 | section='annotate', whitespace=True) |
|
865 | 866 | |
|
866 | 867 | def annotate(**map): |
|
867 | 868 | if util.binary(fctx.data()): |
|
868 | 869 | mt = (mimetypes.guess_type(fctx.path())[0] |
|
869 | 870 | or 'application/octet-stream') |
|
870 | 871 | lines = enumerate([((fctx.filectx(fctx.filerev()), 1), |
|
871 | 872 | '(binary:%s)' % mt)]) |
|
872 | 873 | else: |
|
873 | 874 | lines = enumerate(fctx.annotate(follow=True, linenumber=True, |
|
874 | 875 | diffopts=diffopts)) |
|
875 | 876 | previousrev = None |
|
876 | 877 | for lineno, ((f, targetline), l) in lines: |
|
877 | 878 | rev = f.rev() |
|
878 | 879 | blockhead = rev != previousrev or None |
|
879 | 880 | previousrev = rev |
|
880 | 881 | yield {"parity": next(parity), |
|
881 | 882 | "node": f.hex(), |
|
882 | 883 | "rev": rev, |
|
883 | 884 | "author": f.user(), |
|
884 | 885 | "desc": f.description(), |
|
885 | 886 | "extra": f.extra(), |
|
886 | 887 | "file": f.path(), |
|
887 | 888 | "blockhead": blockhead, |
|
888 | 889 | "targetline": targetline, |
|
889 | 890 | "line": l, |
|
890 | 891 | "lineno": lineno + 1, |
|
891 | 892 | "lineid": "l%d" % (lineno + 1), |
|
892 | 893 | "linenumber": "% 6d" % (lineno + 1), |
|
893 | 894 | "revdate": f.date()} |
|
894 | 895 | |
|
895 | 896 | return tmpl("fileannotate", |
|
896 | 897 | file=f, |
|
897 | 898 | annotate=annotate, |
|
898 | 899 | path=webutil.up(f), |
|
899 | 900 | symrev=webutil.symrevorshortnode(req, fctx), |
|
900 | 901 | rename=webutil.renamelink(fctx), |
|
901 | 902 | permissions=fctx.manifest().flags(f), |
|
902 | 903 | **webutil.commonentry(web.repo, fctx)) |
|
903 | 904 | |
|
904 | 905 | @webcommand('filelog') |
|
905 | 906 | def filelog(web, req, tmpl): |
|
906 | 907 | """ |
|
907 | 908 | /filelog/{revision}/{path} |
|
908 | 909 | -------------------------- |
|
909 | 910 | |
|
910 | 911 | Show information about the history of a file in the repository. |
|
911 | 912 | |
|
912 | 913 | The ``revcount`` query string argument can be defined to control the |
|
913 | 914 | maximum number of entries to show. |
|
914 | 915 | |
|
915 | 916 | The ``filelog`` template will be rendered. |
|
916 | 917 | """ |
|
917 | 918 | |
|
918 | 919 | try: |
|
919 | 920 | fctx = webutil.filectx(web.repo, req) |
|
920 | 921 | f = fctx.path() |
|
921 | 922 | fl = fctx.filelog() |
|
922 | 923 | except error.LookupError: |
|
923 | 924 | f = webutil.cleanpath(web.repo, req.form['file'][0]) |
|
924 | 925 | fl = web.repo.file(f) |
|
925 | 926 | numrevs = len(fl) |
|
926 | 927 | if not numrevs: # file doesn't exist at all |
|
927 | 928 | raise |
|
928 | 929 | rev = webutil.changectx(web.repo, req).rev() |
|
929 | 930 | first = fl.linkrev(0) |
|
930 | 931 | if rev < first: # current rev is from before file existed |
|
931 | 932 | raise |
|
932 | 933 | frev = numrevs - 1 |
|
933 | 934 | while fl.linkrev(frev) > rev: |
|
934 | 935 | frev -= 1 |
|
935 | 936 | fctx = web.repo.filectx(f, fl.linkrev(frev)) |
|
936 | 937 | |
|
937 | 938 | revcount = web.maxshortchanges |
|
938 | 939 | if 'revcount' in req.form: |
|
939 | 940 | try: |
|
940 | 941 | revcount = int(req.form.get('revcount', [revcount])[0]) |
|
941 | 942 | revcount = max(revcount, 1) |
|
942 | 943 | tmpl.defaults['sessionvars']['revcount'] = revcount |
|
943 | 944 | except ValueError: |
|
944 | 945 | pass |
|
945 | 946 | |
|
946 | 947 | lessvars = copy.copy(tmpl.defaults['sessionvars']) |
|
947 | 948 | lessvars['revcount'] = max(revcount / 2, 1) |
|
948 | 949 | morevars = copy.copy(tmpl.defaults['sessionvars']) |
|
949 | 950 | morevars['revcount'] = revcount * 2 |
|
950 | 951 | |
|
951 | 952 | count = fctx.filerev() + 1 |
|
952 | 953 | start = max(0, fctx.filerev() - revcount + 1) # first rev on this page |
|
953 | 954 | end = min(count, start + revcount) # last rev on this page |
|
954 | 955 | parity = paritygen(web.stripecount, offset=start - end) |
|
955 | 956 | |
|
956 | 957 | def entries(): |
|
957 | 958 | l = [] |
|
958 | 959 | |
|
959 | 960 | repo = web.repo |
|
960 | 961 | revs = fctx.filelog().revs(start, end - 1) |
|
961 | 962 | for i in revs: |
|
962 | 963 | iterfctx = fctx.filectx(i) |
|
963 | 964 | |
|
964 | 965 | l.append(dict( |
|
965 | 966 | parity=next(parity), |
|
966 | 967 | filerev=i, |
|
967 | 968 | file=f, |
|
968 | 969 | rename=webutil.renamelink(iterfctx), |
|
969 | 970 | **webutil.commonentry(repo, iterfctx))) |
|
970 | 971 | for e in reversed(l): |
|
971 | 972 | yield e |
|
972 | 973 | |
|
973 | 974 | entries = list(entries()) |
|
974 | 975 | latestentry = entries[:1] |
|
975 | 976 | |
|
976 | 977 | revnav = webutil.filerevnav(web.repo, fctx.path()) |
|
977 | 978 | nav = revnav.gen(end - 1, revcount, count) |
|
978 | 979 | return tmpl("filelog", |
|
979 | 980 | file=f, |
|
980 | 981 | nav=nav, |
|
981 | 982 | symrev=webutil.symrevorshortnode(req, fctx), |
|
982 | 983 | entries=entries, |
|
983 | 984 | latestentry=latestentry, |
|
984 | 985 | revcount=revcount, |
|
985 | 986 | morevars=morevars, |
|
986 | 987 | lessvars=lessvars, |
|
987 | 988 | **webutil.commonentry(web.repo, fctx)) |
|
988 | 989 | |
|
989 | 990 | @webcommand('archive') |
|
990 | 991 | def archive(web, req, tmpl): |
|
991 | 992 | """ |
|
992 | 993 | /archive/{revision}.{format}[/{path}] |
|
993 | 994 | ------------------------------------- |
|
994 | 995 | |
|
995 | 996 | Obtain an archive of repository content. |
|
996 | 997 | |
|
997 | 998 | The content and type of the archive is defined by a URL path parameter. |
|
998 | 999 | ``format`` is the file extension of the archive type to be generated. e.g. |
|
999 | 1000 | ``zip`` or ``tar.bz2``. Not all archive types may be allowed by your |
|
1000 | 1001 | server configuration. |
|
1001 | 1002 | |
|
1002 | 1003 | The optional ``path`` URL parameter controls content to include in the |
|
1003 | 1004 | archive. If omitted, every file in the specified revision is present in the |
|
1004 | 1005 | archive. If included, only the specified file or contents of the specified |
|
1005 | 1006 | directory will be included in the archive. |
|
1006 | 1007 | |
|
1007 | 1008 | No template is used for this handler. Raw, binary content is generated. |
|
1008 | 1009 | """ |
|
1009 | 1010 | |
|
1010 | 1011 | type_ = req.form.get('type', [None])[0] |
|
1011 | 1012 | allowed = web.configlist("web", "allow_archive") |
|
1012 | 1013 | key = req.form['node'][0] |
|
1013 | 1014 | |
|
1014 | 1015 | if type_ not in web.archives: |
|
1015 | 1016 | msg = 'Unsupported archive type: %s' % type_ |
|
1016 | 1017 | raise ErrorResponse(HTTP_NOT_FOUND, msg) |
|
1017 | 1018 | |
|
1018 | 1019 | if not ((type_ in allowed or |
|
1019 | 1020 | web.configbool("web", "allow" + type_, False))): |
|
1020 | 1021 | msg = 'Archive type not allowed: %s' % type_ |
|
1021 | 1022 | raise ErrorResponse(HTTP_FORBIDDEN, msg) |
|
1022 | 1023 | |
|
1023 | 1024 | reponame = re.sub(r"\W+", "-", os.path.basename(web.reponame)) |
|
1024 | 1025 | cnode = web.repo.lookup(key) |
|
1025 | 1026 | arch_version = key |
|
1026 | 1027 | if cnode == key or key == 'tip': |
|
1027 | 1028 | arch_version = short(cnode) |
|
1028 | 1029 | name = "%s-%s" % (reponame, arch_version) |
|
1029 | 1030 | |
|
1030 | 1031 | ctx = webutil.changectx(web.repo, req) |
|
1031 | 1032 | pats = [] |
|
1032 | 1033 | matchfn = scmutil.match(ctx, []) |
|
1033 | 1034 | file = req.form.get('file', None) |
|
1034 | 1035 | if file: |
|
1035 | 1036 | pats = ['path:' + file[0]] |
|
1036 | 1037 | matchfn = scmutil.match(ctx, pats, default='path') |
|
1037 | 1038 | if pats: |
|
1038 | 1039 | files = [f for f in ctx.manifest().keys() if matchfn(f)] |
|
1039 | 1040 | if not files: |
|
1040 | 1041 | raise ErrorResponse(HTTP_NOT_FOUND, |
|
1041 | 1042 | 'file(s) not found: %s' % file[0]) |
|
1042 | 1043 | |
|
1043 | 1044 | mimetype, artype, extension, encoding = web.archivespecs[type_] |
|
1044 | 1045 | headers = [ |
|
1045 | 1046 | ('Content-Disposition', 'attachment; filename=%s%s' % (name, extension)) |
|
1046 | 1047 | ] |
|
1047 | 1048 | if encoding: |
|
1048 | 1049 | headers.append(('Content-Encoding', encoding)) |
|
1049 | 1050 | req.headers.extend(headers) |
|
1050 | 1051 | req.respond(HTTP_OK, mimetype) |
|
1051 | 1052 | |
|
1052 | 1053 | archival.archive(web.repo, req, cnode, artype, prefix=name, |
|
1053 | 1054 | matchfn=matchfn, |
|
1054 | 1055 | subrepos=web.configbool("web", "archivesubrepos")) |
|
1055 | 1056 | return [] |
|
1056 | 1057 | |
|
1057 | 1058 | |
|
1058 | 1059 | @webcommand('static') |
|
1059 | 1060 | def static(web, req, tmpl): |
|
1060 | 1061 | fname = req.form['file'][0] |
|
1061 | 1062 | # a repo owner may set web.static in .hg/hgrc to get any file |
|
1062 | 1063 | # readable by the user running the CGI script |
|
1063 | 1064 | static = web.config("web", "static", None, untrusted=False) |
|
1064 | 1065 | if not static: |
|
1065 | 1066 | tp = web.templatepath or templater.templatepaths() |
|
1066 | 1067 | if isinstance(tp, str): |
|
1067 | 1068 | tp = [tp] |
|
1068 | 1069 | static = [os.path.join(p, 'static') for p in tp] |
|
1069 | 1070 | staticfile(static, fname, req) |
|
1070 | 1071 | return [] |
|
1071 | 1072 | |
|
1072 | 1073 | @webcommand('graph') |
|
1073 | 1074 | def graph(web, req, tmpl): |
|
1074 | 1075 | """ |
|
1075 | 1076 | /graph[/{revision}] |
|
1076 | 1077 | ------------------- |
|
1077 | 1078 | |
|
1078 | 1079 | Show information about the graphical topology of the repository. |
|
1079 | 1080 | |
|
1080 | 1081 | Information rendered by this handler can be used to create visual |
|
1081 | 1082 | representations of repository topology. |
|
1082 | 1083 | |
|
1083 | 1084 | The ``revision`` URL parameter controls the starting changeset. |
|
1084 | 1085 | |
|
1085 | 1086 | The ``revcount`` query string argument can define the number of changesets |
|
1086 | 1087 | to show information for. |
|
1087 | 1088 | |
|
1088 | 1089 | This handler will render the ``graph`` template. |
|
1089 | 1090 | """ |
|
1090 | 1091 | |
|
1091 | 1092 | if 'node' in req.form: |
|
1092 | 1093 | ctx = webutil.changectx(web.repo, req) |
|
1093 | 1094 | symrev = webutil.symrevorshortnode(req, ctx) |
|
1094 | 1095 | else: |
|
1095 | 1096 | ctx = web.repo['tip'] |
|
1096 | 1097 | symrev = 'tip' |
|
1097 | 1098 | rev = ctx.rev() |
|
1098 | 1099 | |
|
1099 | 1100 | bg_height = 39 |
|
1100 | 1101 | revcount = web.maxshortchanges |
|
1101 | 1102 | if 'revcount' in req.form: |
|
1102 | 1103 | try: |
|
1103 | 1104 | revcount = int(req.form.get('revcount', [revcount])[0]) |
|
1104 | 1105 | revcount = max(revcount, 1) |
|
1105 | 1106 | tmpl.defaults['sessionvars']['revcount'] = revcount |
|
1106 | 1107 | except ValueError: |
|
1107 | 1108 | pass |
|
1108 | 1109 | |
|
1109 | 1110 | lessvars = copy.copy(tmpl.defaults['sessionvars']) |
|
1110 | 1111 | lessvars['revcount'] = max(revcount / 2, 1) |
|
1111 | 1112 | morevars = copy.copy(tmpl.defaults['sessionvars']) |
|
1112 | 1113 | morevars['revcount'] = revcount * 2 |
|
1113 | 1114 | |
|
1114 | 1115 | count = len(web.repo) |
|
1115 | 1116 | pos = rev |
|
1116 | 1117 | |
|
1117 | 1118 | uprev = min(max(0, count - 1), rev + revcount) |
|
1118 | 1119 | downrev = max(0, rev - revcount) |
|
1119 | 1120 | changenav = webutil.revnav(web.repo).gen(pos, revcount, count) |
|
1120 | 1121 | |
|
1121 | 1122 | tree = [] |
|
1122 | 1123 | if pos != -1: |
|
1123 | 1124 | allrevs = web.repo.changelog.revs(pos, 0) |
|
1124 | 1125 | revs = [] |
|
1125 | 1126 | for i in allrevs: |
|
1126 | 1127 | revs.append(i) |
|
1127 | 1128 | if len(revs) >= revcount: |
|
1128 | 1129 | break |
|
1129 | 1130 | |
|
1130 | 1131 | # We have to feed a baseset to dagwalker as it is expecting smartset |
|
1131 | 1132 | # object. This does not have a big impact on hgweb performance itself |
|
1132 | 1133 | # since hgweb graphing code is not itself lazy yet. |
|
1133 | 1134 | dag = graphmod.dagwalker(web.repo, revset.baseset(revs)) |
|
1134 | 1135 | # As we said one line above... not lazy. |
|
1135 | 1136 | tree = list(graphmod.colored(dag, web.repo)) |
|
1136 | 1137 | |
|
1137 | 1138 | def getcolumns(tree): |
|
1138 | 1139 | cols = 0 |
|
1139 | 1140 | for (id, type, ctx, vtx, edges) in tree: |
|
1140 | 1141 | if type != graphmod.CHANGESET: |
|
1141 | 1142 | continue |
|
1142 | 1143 | cols = max(cols, max([edge[0] for edge in edges] or [0]), |
|
1143 | 1144 | max([edge[1] for edge in edges] or [0])) |
|
1144 | 1145 | return cols |
|
1145 | 1146 | |
|
1146 | 1147 | def graphdata(usetuples, encodestr): |
|
1147 | 1148 | data = [] |
|
1148 | 1149 | |
|
1149 | 1150 | row = 0 |
|
1150 | 1151 | for (id, type, ctx, vtx, edges) in tree: |
|
1151 | 1152 | if type != graphmod.CHANGESET: |
|
1152 | 1153 | continue |
|
1153 | 1154 | node = str(ctx) |
|
1154 | 1155 | age = encodestr(templatefilters.age(ctx.date())) |
|
1155 | 1156 | desc = templatefilters.firstline(encodestr(ctx.description())) |
|
1156 | 1157 | desc = cgi.escape(templatefilters.nonempty(desc)) |
|
1157 | 1158 | user = cgi.escape(templatefilters.person(encodestr(ctx.user()))) |
|
1158 | 1159 | branch = cgi.escape(encodestr(ctx.branch())) |
|
1159 | 1160 | try: |
|
1160 | 1161 | branchnode = web.repo.branchtip(branch) |
|
1161 | 1162 | except error.RepoLookupError: |
|
1162 | 1163 | branchnode = None |
|
1163 | 1164 | branch = branch, branchnode == ctx.node() |
|
1164 | 1165 | |
|
1165 | 1166 | if usetuples: |
|
1166 | 1167 | data.append((node, vtx, edges, desc, user, age, branch, |
|
1167 | 1168 | [cgi.escape(encodestr(x)) for x in ctx.tags()], |
|
1168 | 1169 | [cgi.escape(encodestr(x)) |
|
1169 | 1170 | for x in ctx.bookmarks()])) |
|
1170 | 1171 | else: |
|
1171 | 1172 | edgedata = [{'col': edge[0], 'nextcol': edge[1], |
|
1172 | 1173 | 'color': (edge[2] - 1) % 6 + 1, |
|
1173 | 1174 | 'width': edge[3], 'bcolor': edge[4]} |
|
1174 | 1175 | for edge in edges] |
|
1175 | 1176 | |
|
1176 | 1177 | data.append( |
|
1177 | 1178 | {'node': node, |
|
1178 | 1179 | 'col': vtx[0], |
|
1179 | 1180 | 'color': (vtx[1] - 1) % 6 + 1, |
|
1180 | 1181 | 'edges': edgedata, |
|
1181 | 1182 | 'row': row, |
|
1182 | 1183 | 'nextrow': row + 1, |
|
1183 | 1184 | 'desc': desc, |
|
1184 | 1185 | 'user': user, |
|
1185 | 1186 | 'age': age, |
|
1186 | 1187 | 'bookmarks': webutil.nodebookmarksdict( |
|
1187 | 1188 | web.repo, ctx.node()), |
|
1188 | 1189 | 'branches': webutil.nodebranchdict(web.repo, ctx), |
|
1189 | 1190 | 'inbranch': webutil.nodeinbranch(web.repo, ctx), |
|
1190 | 1191 | 'tags': webutil.nodetagsdict(web.repo, ctx.node())}) |
|
1191 | 1192 | |
|
1192 | 1193 | row += 1 |
|
1193 | 1194 | |
|
1194 | 1195 | return data |
|
1195 | 1196 | |
|
1196 | 1197 | cols = getcolumns(tree) |
|
1197 | 1198 | rows = len(tree) |
|
1198 | 1199 | canvasheight = (rows + 1) * bg_height - 27 |
|
1199 | 1200 | |
|
1200 | 1201 | return tmpl('graph', rev=rev, symrev=symrev, revcount=revcount, |
|
1201 | 1202 | uprev=uprev, |
|
1202 | 1203 | lessvars=lessvars, morevars=morevars, downrev=downrev, |
|
1203 | 1204 | cols=cols, rows=rows, |
|
1204 | 1205 | canvaswidth=(cols + 1) * bg_height, |
|
1205 | 1206 | truecanvasheight=rows * bg_height, |
|
1206 | 1207 | canvasheight=canvasheight, bg_height=bg_height, |
|
1207 | 1208 | # {jsdata} will be passed to |json, so it must be in utf-8 |
|
1208 | 1209 | jsdata=lambda **x: graphdata(True, encoding.fromlocal), |
|
1209 | 1210 | nodes=lambda **x: graphdata(False, str), |
|
1210 | 1211 | node=ctx.hex(), changenav=changenav) |
|
1211 | 1212 | |
|
1212 | 1213 | def _getdoc(e): |
|
1213 | 1214 | doc = e[0].__doc__ |
|
1214 | 1215 | if doc: |
|
1215 | 1216 | doc = _(doc).partition('\n')[0] |
|
1216 | 1217 | else: |
|
1217 | 1218 | doc = _('(no help text available)') |
|
1218 | 1219 | return doc |
|
1219 | 1220 | |
|
1220 | 1221 | @webcommand('help') |
|
1221 | 1222 | def help(web, req, tmpl): |
|
1222 | 1223 | """ |
|
1223 | 1224 | /help[/{topic}] |
|
1224 | 1225 | --------------- |
|
1225 | 1226 | |
|
1226 | 1227 | Render help documentation. |
|
1227 | 1228 | |
|
1228 | 1229 | This web command is roughly equivalent to :hg:`help`. If a ``topic`` |
|
1229 | 1230 | is defined, that help topic will be rendered. If not, an index of |
|
1230 | 1231 | available help topics will be rendered. |
|
1231 | 1232 | |
|
1232 | 1233 | The ``help`` template will be rendered when requesting help for a topic. |
|
1233 | 1234 | ``helptopics`` will be rendered for the index of help topics. |
|
1234 | 1235 | """ |
|
1235 | 1236 | from .. import commands, help as helpmod # avoid cycle |
|
1236 | 1237 | |
|
1237 | 1238 | topicname = req.form.get('node', [None])[0] |
|
1238 | 1239 | if not topicname: |
|
1239 | 1240 | def topics(**map): |
|
1240 | 1241 | for entries, summary, _doc in helpmod.helptable: |
|
1241 | 1242 | yield {'topic': entries[0], 'summary': summary} |
|
1242 | 1243 | |
|
1243 | 1244 | early, other = [], [] |
|
1244 | 1245 | primary = lambda s: s.partition('|')[0] |
|
1245 | 1246 | for c, e in commands.table.iteritems(): |
|
1246 | 1247 | doc = _getdoc(e) |
|
1247 | 1248 | if 'DEPRECATED' in doc or c.startswith('debug'): |
|
1248 | 1249 | continue |
|
1249 | 1250 | cmd = primary(c) |
|
1250 | 1251 | if cmd.startswith('^'): |
|
1251 | 1252 | early.append((cmd[1:], doc)) |
|
1252 | 1253 | else: |
|
1253 | 1254 | other.append((cmd, doc)) |
|
1254 | 1255 | |
|
1255 | 1256 | early.sort() |
|
1256 | 1257 | other.sort() |
|
1257 | 1258 | |
|
1258 | 1259 | def earlycommands(**map): |
|
1259 | 1260 | for c, doc in early: |
|
1260 | 1261 | yield {'topic': c, 'summary': doc} |
|
1261 | 1262 | |
|
1262 | 1263 | def othercommands(**map): |
|
1263 | 1264 | for c, doc in other: |
|
1264 | 1265 | yield {'topic': c, 'summary': doc} |
|
1265 | 1266 | |
|
1266 | 1267 | return tmpl('helptopics', topics=topics, earlycommands=earlycommands, |
|
1267 | 1268 | othercommands=othercommands, title='Index') |
|
1268 | 1269 | |
|
1269 | 1270 | # Render an index of sub-topics. |
|
1270 | 1271 | if topicname in helpmod.subtopics: |
|
1271 | 1272 | topics = [] |
|
1272 | 1273 | for entries, summary, _doc in helpmod.subtopics[topicname]: |
|
1273 | 1274 | topics.append({ |
|
1274 | 1275 | 'topic': '%s.%s' % (topicname, entries[0]), |
|
1275 | 1276 | 'basename': entries[0], |
|
1276 | 1277 | 'summary': summary, |
|
1277 | 1278 | }) |
|
1278 | 1279 | |
|
1279 | 1280 | return tmpl('helptopics', topics=topics, title=topicname, |
|
1280 | 1281 | subindex=True) |
|
1281 | 1282 | |
|
1282 | 1283 | u = webutil.wsgiui() |
|
1283 | 1284 | u.verbose = True |
|
1284 | 1285 | |
|
1285 | 1286 | # Render a page from a sub-topic. |
|
1286 | 1287 | if '.' in topicname: |
|
1287 | 1288 | # TODO implement support for rendering sections, like |
|
1288 | 1289 | # `hg help` works. |
|
1289 | 1290 | topic, subtopic = topicname.split('.', 1) |
|
1290 | 1291 | if topic not in helpmod.subtopics: |
|
1291 | 1292 | raise ErrorResponse(HTTP_NOT_FOUND) |
|
1292 | 1293 | else: |
|
1293 | 1294 | topic = topicname |
|
1294 | 1295 | subtopic = None |
|
1295 | 1296 | |
|
1296 | 1297 | try: |
|
1297 | 1298 | doc = helpmod.help_(u, topic, subtopic=subtopic) |
|
1298 | 1299 | except error.UnknownCommand: |
|
1299 | 1300 | raise ErrorResponse(HTTP_NOT_FOUND) |
|
1300 | 1301 | return tmpl('help', topic=topicname, doc=doc) |
|
1301 | 1302 | |
|
1302 | 1303 | # tell hggettext to extract docstrings from these functions: |
|
1303 | 1304 | i18nfunctions = commands.values() |
@@ -1,224 +1,226 | |||
|
1 | 1 | mimetype = 'application/json' |
|
2 | 2 | filerevision = '\{ |
|
3 | 3 | "node": {node|json}, |
|
4 | 4 | "path": {file|json}, |
|
5 | 5 | "date": {date|json}, |
|
6 | 6 | "desc": {desc|utf8|json}, |
|
7 | 7 | "branch": {if(branch, branch%changesetbranch, "default"|json)}, |
|
8 | 8 | "bookmarks": [{join(bookmarks%changelistentryname, ", ")}], |
|
9 | 9 | "tags": [{join(tags%changelistentryname, ", ")}], |
|
10 | 10 | "user": {author|utf8|json}, |
|
11 | 11 | "parents": [{join(parent%changesetparent, ", ")}], |
|
12 | 12 | "phase": {phase|json}, |
|
13 | 13 | "lines": [{join(text%lineentry, ", ")}] |
|
14 | 14 | }' |
|
15 | 15 | lineentry = '\{ |
|
16 | 16 | "line": {line|json} |
|
17 | 17 | }' |
|
18 | 18 | search = '\{ |
|
19 | 19 | "node": {node|json}, |
|
20 | 20 | "query": {query|json}, |
|
21 | 21 | "entries": [{join(entries%searchentry, ", ")}] |
|
22 | 22 | }' |
|
23 | 23 | searchentry = '{changelistentry}' |
|
24 | 24 | # changelog and shortlog are the same web API but with different |
|
25 | 25 | # number of entries. |
|
26 | 26 | changelog = changelist.tmpl |
|
27 | 27 | shortlog = changelist.tmpl |
|
28 | 28 | changelistentry = '\{ |
|
29 | 29 | "node": {node|json}, |
|
30 | 30 | "date": {date|json}, |
|
31 | 31 | "desc": {desc|utf8|json}, |
|
32 | 32 | "branch": {if(branch, branch%changesetbranch, "default"|json)}, |
|
33 | 33 | "bookmarks": [{join(bookmarks%changelistentryname, ", ")}], |
|
34 | 34 | "tags": [{join(tags%changelistentryname, ", ")}], |
|
35 | 35 | "user": {author|utf8|json}, |
|
36 | 36 | "phase": {phase|json}, |
|
37 | 37 | "parents": [{if(allparents, join(allparents%changesetparent, ", "), |
|
38 | 38 | join(parent%changesetparent, ", "))}] |
|
39 | 39 | }' |
|
40 | 40 | changelistentryname = '{name|utf8|json}' |
|
41 | 41 | changeset = '\{ |
|
42 | 42 | "node": {node|json}, |
|
43 | 43 | "date": {date|json}, |
|
44 | 44 | "desc": {desc|utf8|json}, |
|
45 | 45 | "branch": {if(branch, branch%changesetbranch, "default"|json)}, |
|
46 | 46 | "bookmarks": [{join(changesetbookmark, ", ")}], |
|
47 | 47 | "tags": [{join(changesettag, ", ")}], |
|
48 | 48 | "user": {author|utf8|json}, |
|
49 | 49 | "parents": [{join(parent%changesetparent, ", ")}], |
|
50 | 50 | "phase": {phase|json} |
|
51 | 51 | }' |
|
52 | 52 | changesetbranch = '{name|utf8|json}' |
|
53 | 53 | changesetbookmark = '{bookmark|utf8|json}' |
|
54 | 54 | changesettag = '{tag|utf8|json}' |
|
55 | 55 | changesetparent = '{node|json}' |
|
56 | 56 | manifest = '\{ |
|
57 | 57 | "node": {node|json}, |
|
58 | 58 | "abspath": {path|json}, |
|
59 | 59 | "directories": [{join(dentries%direntry, ", ")}], |
|
60 | 60 | "files": [{join(fentries%fileentry, ", ")}], |
|
61 | 61 | "bookmarks": [{join(bookmarks%name, ", ")}], |
|
62 | 62 | "tags": [{join(tags%name, ", ")}] |
|
63 | 63 | }' |
|
64 | 64 | name = '{name|utf8|json}' |
|
65 | 65 | direntry = '\{ |
|
66 | 66 | "abspath": {path|json}, |
|
67 | 67 | "basename": {basename|json}, |
|
68 | 68 | "emptydirs": {emptydirs|json} |
|
69 | 69 | }' |
|
70 | 70 | fileentry = '\{ |
|
71 | 71 | "abspath": {file|json}, |
|
72 | 72 | "basename": {basename|json}, |
|
73 | 73 | "date": {date|json}, |
|
74 | 74 | "size": {size|json}, |
|
75 | 75 | "flags": {permissions|json} |
|
76 | 76 | }' |
|
77 | 77 | tags = '\{ |
|
78 | 78 | "node": {node|json}, |
|
79 | 79 | "tags": [{join(entriesnotip%tagentry, ", ")}] |
|
80 | 80 | }' |
|
81 | 81 | tagentry = '\{ |
|
82 | 82 | "tag": {tag|utf8|json}, |
|
83 | 83 | "node": {node|json}, |
|
84 | 84 | "date": {date|json} |
|
85 | 85 | }' |
|
86 | 86 | bookmarks = '\{ |
|
87 | 87 | "node": {node|json}, |
|
88 | 88 | "bookmarks": [{join(entries%bookmarkentry, ", ")}] |
|
89 | 89 | }' |
|
90 | 90 | bookmarkentry = '\{ |
|
91 | 91 | "bookmark": {bookmark|utf8|json}, |
|
92 | 92 | "node": {node|json}, |
|
93 | 93 | "date": {date|json} |
|
94 | 94 | }' |
|
95 | 95 | branches = '\{ |
|
96 | 96 | "branches": [{join(entries%branchentry, ", ")}] |
|
97 | 97 | }' |
|
98 | 98 | branchentry = '\{ |
|
99 | 99 | "branch": {branch|utf8|json}, |
|
100 | 100 | "node": {node|json}, |
|
101 | 101 | "date": {date|json}, |
|
102 | 102 | "status": {status|json} |
|
103 | 103 | }' |
|
104 | 104 | shortlogentry = '{changelistentry}' |
|
105 | 105 | summary = '\{ |
|
106 | 106 | "node": {node|json}, |
|
107 | 107 | "lastchange": {lastchange|json}, |
|
108 | 108 | "bookmarks": [{join(bookmarks%bookmarkentry, ", ")}], |
|
109 | 109 | "branches": [{join(branches%branchentry, ", ")}], |
|
110 | 110 | "shortlog": [{join(shortlog%shortlogentry, ", ")}], |
|
111 | 111 | "tags": [{join(tags%tagentry, ", ")}], |
|
112 | "archives": [{join(archives%archiveentry, ", ")}] | |
|
112 | "archives": [{join(archives%archiveentry, ", ")}], | |
|
113 | "labels": {labels|json} | |
|
113 | 114 | }' |
|
114 | 115 | archiveentry = '\{ |
|
115 | 116 | "node": {node|json}, |
|
116 | 117 | "extension": {extension|json}, |
|
117 | 118 | "type": {type|json}, |
|
118 | 119 | "url": {"{urlbase}{url}archive/{node}{extension}"|json} |
|
119 | 120 | }' |
|
120 | 121 | filediff = '\{ |
|
121 | 122 | "path": {file|json}, |
|
122 | 123 | "node": {node|json}, |
|
123 | 124 | "date": {date|json}, |
|
124 | 125 | "desc": {desc|utf8|json}, |
|
125 | 126 | "author": {author|utf8|json}, |
|
126 | 127 | "parents": [{join(parent%changesetparent, ", ")}], |
|
127 | 128 | "children": [{join(child%changesetparent, ", ")}], |
|
128 | 129 | "diff": [{join(diff%diffblock, ", ")}] |
|
129 | 130 | }' |
|
130 | 131 | diffblock = '\{ |
|
131 | 132 | "blockno": {blockno|json}, |
|
132 | 133 | "lines": [{join(lines, ", ")}] |
|
133 | 134 | }' |
|
134 | 135 | difflineplus = '\{ |
|
135 | 136 | "t": "+", |
|
136 | 137 | "n": {lineno|json}, |
|
137 | 138 | "l": {line|json} |
|
138 | 139 | }' |
|
139 | 140 | difflineminus = '\{ |
|
140 | 141 | "t": "-", |
|
141 | 142 | "n": {lineno|json}, |
|
142 | 143 | "l": {line|json} |
|
143 | 144 | }' |
|
144 | 145 | difflineat = '\{ |
|
145 | 146 | "t": "@", |
|
146 | 147 | "n": {lineno|json}, |
|
147 | 148 | "l": {line|json} |
|
148 | 149 | }' |
|
149 | 150 | diffline = '\{ |
|
150 | 151 | "t": "", |
|
151 | 152 | "n": {lineno|json}, |
|
152 | 153 | "l": {line|json} |
|
153 | 154 | }' |
|
154 | 155 | filecomparison = '\{ |
|
155 | 156 | "path": {file|json}, |
|
156 | 157 | "node": {node|json}, |
|
157 | 158 | "date": {date|json}, |
|
158 | 159 | "desc": {desc|utf8|json}, |
|
159 | 160 | "author": {author|utf8|json}, |
|
160 | 161 | "parents": [{join(parent%changesetparent, ", ")}], |
|
161 | 162 | "children": [{join(child%changesetparent, ", ")}], |
|
162 | 163 | "leftnode": {leftnode|json}, |
|
163 | 164 | "rightnode": {rightnode|json}, |
|
164 | 165 | "comparison": [{join(comparison, ", ")}] |
|
165 | 166 | }' |
|
166 | 167 | comparisonblock = '\{ |
|
167 | 168 | "lines": [{join(lines, ", ")}] |
|
168 | 169 | }' |
|
169 | 170 | comparisonline = '\{ |
|
170 | 171 | "t": {type|json}, |
|
171 | 172 | "ln": {leftlineno|json}, |
|
172 | 173 | "ll": {leftline|json}, |
|
173 | 174 | "rn": {rightlineno|json}, |
|
174 | 175 | "rl": {rightline|json} |
|
175 | 176 | }' |
|
176 | 177 | fileannotate = '\{ |
|
177 | 178 | "abspath": {file|json}, |
|
178 | 179 | "node": {node|json}, |
|
179 | 180 | "author": {author|utf8|json}, |
|
180 | 181 | "date": {date|json}, |
|
181 | 182 | "desc": {desc|utf8|json}, |
|
182 | 183 | "parents": [{join(parent%changesetparent, ", ")}], |
|
183 | 184 | "children": [{join(child%changesetparent, ", ")}], |
|
184 | 185 | "permissions": {permissions|json}, |
|
185 | 186 | "annotate": [{join(annotate%fileannotation, ", ")}] |
|
186 | 187 | }' |
|
187 | 188 | fileannotation = '\{ |
|
188 | 189 | "node": {node|json}, |
|
189 | 190 | "author": {author|utf8|json}, |
|
190 | 191 | "desc": {desc|utf8|json}, |
|
191 | 192 | "abspath": {file|json}, |
|
192 | 193 | "targetline": {targetline|json}, |
|
193 | 194 | "line": {line|json}, |
|
194 | 195 | "lineno": {lineno|json}, |
|
195 | 196 | "revdate": {revdate|json} |
|
196 | 197 | }' |
|
197 | 198 | filelog = '\{ |
|
198 | 199 | "entries": [{join(entries%changelistentry, ", ")}] |
|
199 | 200 | }' |
|
200 | 201 | graph = '"not yet implemented"' |
|
201 | 202 | helptopics = '\{ |
|
202 | 203 | "topics": [{join(topics%helptopicentry, ", ")}], |
|
203 | 204 | "earlycommands": [{join(earlycommands%helptopicentry, ", ")}], |
|
204 | 205 | "othercommands": [{join(othercommands%helptopicentry, ", ")}] |
|
205 | 206 | }' |
|
206 | 207 | helptopicentry = '\{ |
|
207 | 208 | "topic": {topic|utf8|json}, |
|
208 | 209 | "summary": {summary|utf8|json} |
|
209 | 210 | }' |
|
210 | 211 | help = '\{ |
|
211 | 212 | "topic": {topic|utf8|json}, |
|
212 | 213 | "rawdoc": {doc|utf8|json} |
|
213 | 214 | }' |
|
214 | 215 | filenodelink = '' |
|
215 | 216 | filenolink = '' |
|
216 | 217 | index = '\{ |
|
217 | 218 | "entries": [{join(entries%indexentry, ", ")}] |
|
218 | 219 | }' |
|
219 | 220 | indexentry = '\{ |
|
220 | 221 | "name": {name|utf8|json}, |
|
221 | 222 | "description": {description|utf8|json}, |
|
222 | 223 | "contact": {contact|utf8|json}, |
|
223 | "lastchange": {lastchange|json} | |
|
224 | "lastchange": {lastchange|json}, | |
|
225 | "labels": {labels|json} | |
|
224 | 226 | }' |
@@ -1,1641 +1,1642 | |||
|
1 | 1 | #require serve |
|
2 | 2 | |
|
3 | 3 | $ request() { |
|
4 | 4 | > get-with-headers.py --json localhost:$HGPORT "$1" |
|
5 | 5 | > } |
|
6 | 6 | |
|
7 | 7 | $ hg init test |
|
8 | 8 | $ cd test |
|
9 | 9 | $ mkdir da |
|
10 | 10 | $ echo foo > da/foo |
|
11 | 11 | $ echo foo > foo |
|
12 | 12 | $ hg -q ci -A -m initial |
|
13 | 13 | $ echo bar > foo |
|
14 | 14 | $ hg ci -m 'modify foo' |
|
15 | 15 | $ echo bar > da/foo |
|
16 | 16 | $ hg ci -m 'modify da/foo' |
|
17 | 17 | $ hg bookmark bookmark1 |
|
18 | 18 | $ hg up default |
|
19 | 19 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
20 | 20 | (leaving bookmark bookmark1) |
|
21 | 21 | $ hg mv foo foo-new |
|
22 | 22 | $ hg commit -m 'move foo' |
|
23 | 23 | $ hg tag -m 'create tag' tag1 |
|
24 | 24 | $ hg phase --public -r . |
|
25 | 25 | $ echo baz > da/foo |
|
26 | 26 | $ hg commit -m 'another commit to da/foo' |
|
27 | 27 | $ hg tag -m 'create tag2' tag2 |
|
28 | 28 | $ hg bookmark bookmark2 |
|
29 | 29 | $ hg -q up -r 0 |
|
30 | 30 | $ hg -q branch test-branch |
|
31 | 31 | $ echo branch > foo |
|
32 | 32 | $ hg commit -m 'create test branch' |
|
33 | 33 | $ echo branch_commit_2 > foo |
|
34 | 34 | $ hg commit -m 'another commit in test-branch' |
|
35 | 35 | $ hg -q up default |
|
36 | 36 | $ hg merge --tool :local test-branch |
|
37 | 37 | 0 files updated, 1 files merged, 0 files removed, 0 files unresolved |
|
38 | 38 | (branch merge, don't forget to commit) |
|
39 | 39 | $ hg commit -m 'merge test-branch into default' |
|
40 | 40 | |
|
41 | 41 | $ hg log -G |
|
42 | 42 | @ changeset: 9:cc725e08502a |
|
43 | 43 | |\ tag: tip |
|
44 | 44 | | | parent: 6:ceed296fe500 |
|
45 | 45 | | | parent: 8:ed66c30e87eb |
|
46 | 46 | | | user: test |
|
47 | 47 | | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
48 | 48 | | | summary: merge test-branch into default |
|
49 | 49 | | | |
|
50 | 50 | | o changeset: 8:ed66c30e87eb |
|
51 | 51 | | | branch: test-branch |
|
52 | 52 | | | user: test |
|
53 | 53 | | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
54 | 54 | | | summary: another commit in test-branch |
|
55 | 55 | | | |
|
56 | 56 | | o changeset: 7:6ab967a8ab34 |
|
57 | 57 | | | branch: test-branch |
|
58 | 58 | | | parent: 0:06e557f3edf6 |
|
59 | 59 | | | user: test |
|
60 | 60 | | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
61 | 61 | | | summary: create test branch |
|
62 | 62 | | | |
|
63 | 63 | o | changeset: 6:ceed296fe500 |
|
64 | 64 | | | bookmark: bookmark2 |
|
65 | 65 | | | user: test |
|
66 | 66 | | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
67 | 67 | | | summary: create tag2 |
|
68 | 68 | | | |
|
69 | 69 | o | changeset: 5:f2890a05fea4 |
|
70 | 70 | | | tag: tag2 |
|
71 | 71 | | | user: test |
|
72 | 72 | | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
73 | 73 | | | summary: another commit to da/foo |
|
74 | 74 | | | |
|
75 | 75 | o | changeset: 4:93a8ce14f891 |
|
76 | 76 | | | user: test |
|
77 | 77 | | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
78 | 78 | | | summary: create tag |
|
79 | 79 | | | |
|
80 | 80 | o | changeset: 3:78896eb0e102 |
|
81 | 81 | | | tag: tag1 |
|
82 | 82 | | | user: test |
|
83 | 83 | | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
84 | 84 | | | summary: move foo |
|
85 | 85 | | | |
|
86 | 86 | o | changeset: 2:8d7c456572ac |
|
87 | 87 | | | bookmark: bookmark1 |
|
88 | 88 | | | user: test |
|
89 | 89 | | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
90 | 90 | | | summary: modify da/foo |
|
91 | 91 | | | |
|
92 | 92 | o | changeset: 1:f8bbb9024b10 |
|
93 | 93 | |/ user: test |
|
94 | 94 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
95 | 95 | | summary: modify foo |
|
96 | 96 | | |
|
97 | 97 | o changeset: 0:06e557f3edf6 |
|
98 | 98 | user: test |
|
99 | 99 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
100 | 100 | summary: initial |
|
101 | 101 | |
|
102 | 102 | |
|
103 | 103 | $ echo '[web]' >> .hg/hgrc |
|
104 | 104 | $ echo 'allow_archive = bz2' >> .hg/hgrc |
|
105 | 105 | $ hg serve -p $HGPORT -d --pid-file=hg.pid -A access.log -E error.log |
|
106 | 106 | $ cat hg.pid >> $DAEMON_PIDS |
|
107 | 107 | |
|
108 | 108 | (Try to keep these in roughly the order they are defined in webcommands.py) |
|
109 | 109 | |
|
110 | 110 | (log is handled by filelog/ and changelog/ - ignore it) |
|
111 | 111 | |
|
112 | 112 | (rawfile/ doesn't use templating - nothing to test) |
|
113 | 113 | |
|
114 | 114 | file/{revision}/{path} shows file revision |
|
115 | 115 | |
|
116 | 116 | $ request json-file/78896eb0e102/foo-new |
|
117 | 117 | 200 Script output follows |
|
118 | 118 | |
|
119 | 119 | { |
|
120 | 120 | "bookmarks": [], |
|
121 | 121 | "branch": "default", |
|
122 | 122 | "date": [ |
|
123 | 123 | 0.0, |
|
124 | 124 | 0 |
|
125 | 125 | ], |
|
126 | 126 | "desc": "move foo", |
|
127 | 127 | "lines": [ |
|
128 | 128 | { |
|
129 | 129 | "line": "bar\n" |
|
130 | 130 | } |
|
131 | 131 | ], |
|
132 | 132 | "node": "78896eb0e102174ce9278438a95e12543e4367a7", |
|
133 | 133 | "parents": [ |
|
134 | 134 | "f8bbb9024b10f93cdbb8d940337398291d40dea8" |
|
135 | 135 | ], |
|
136 | 136 | "path": "foo-new", |
|
137 | 137 | "phase": "public", |
|
138 | 138 | "tags": [ |
|
139 | 139 | "tag1" |
|
140 | 140 | ], |
|
141 | 141 | "user": "test" |
|
142 | 142 | } |
|
143 | 143 | |
|
144 | 144 | file/{revision} shows root directory info |
|
145 | 145 | |
|
146 | 146 | $ request json-file/cc725e08502a |
|
147 | 147 | 200 Script output follows |
|
148 | 148 | |
|
149 | 149 | { |
|
150 | 150 | "abspath": "/", |
|
151 | 151 | "bookmarks": [], |
|
152 | 152 | "directories": [ |
|
153 | 153 | { |
|
154 | 154 | "abspath": "/da", |
|
155 | 155 | "basename": "da", |
|
156 | 156 | "emptydirs": "" |
|
157 | 157 | } |
|
158 | 158 | ], |
|
159 | 159 | "files": [ |
|
160 | 160 | { |
|
161 | 161 | "abspath": ".hgtags", |
|
162 | 162 | "basename": ".hgtags", |
|
163 | 163 | "date": [ |
|
164 | 164 | 0.0, |
|
165 | 165 | 0 |
|
166 | 166 | ], |
|
167 | 167 | "flags": "", |
|
168 | 168 | "size": 92 |
|
169 | 169 | }, |
|
170 | 170 | { |
|
171 | 171 | "abspath": "foo-new", |
|
172 | 172 | "basename": "foo-new", |
|
173 | 173 | "date": [ |
|
174 | 174 | 0.0, |
|
175 | 175 | 0 |
|
176 | 176 | ], |
|
177 | 177 | "flags": "", |
|
178 | 178 | "size": 4 |
|
179 | 179 | } |
|
180 | 180 | ], |
|
181 | 181 | "node": "cc725e08502a79dd1eda913760fbe06ed7a9abc7", |
|
182 | 182 | "tags": [ |
|
183 | 183 | "tip" |
|
184 | 184 | ] |
|
185 | 185 | } |
|
186 | 186 | |
|
187 | 187 | changelog/ shows information about several changesets |
|
188 | 188 | |
|
189 | 189 | $ request json-changelog |
|
190 | 190 | 200 Script output follows |
|
191 | 191 | |
|
192 | 192 | { |
|
193 | 193 | "changeset_count": 10, |
|
194 | 194 | "changesets": [ |
|
195 | 195 | { |
|
196 | 196 | "bookmarks": [], |
|
197 | 197 | "branch": "default", |
|
198 | 198 | "date": [ |
|
199 | 199 | 0.0, |
|
200 | 200 | 0 |
|
201 | 201 | ], |
|
202 | 202 | "desc": "merge test-branch into default", |
|
203 | 203 | "node": "cc725e08502a79dd1eda913760fbe06ed7a9abc7", |
|
204 | 204 | "parents": [ |
|
205 | 205 | "ceed296fe500c3fac9541e31dad860cb49c89e45", |
|
206 | 206 | "ed66c30e87eb65337c05a4229efaa5f1d5285a90" |
|
207 | 207 | ], |
|
208 | 208 | "phase": "draft", |
|
209 | 209 | "tags": [ |
|
210 | 210 | "tip" |
|
211 | 211 | ], |
|
212 | 212 | "user": "test" |
|
213 | 213 | }, |
|
214 | 214 | { |
|
215 | 215 | "bookmarks": [], |
|
216 | 216 | "branch": "test-branch", |
|
217 | 217 | "date": [ |
|
218 | 218 | 0.0, |
|
219 | 219 | 0 |
|
220 | 220 | ], |
|
221 | 221 | "desc": "another commit in test-branch", |
|
222 | 222 | "node": "ed66c30e87eb65337c05a4229efaa5f1d5285a90", |
|
223 | 223 | "parents": [ |
|
224 | 224 | "6ab967a8ab3489227a83f80e920faa039a71819f" |
|
225 | 225 | ], |
|
226 | 226 | "phase": "draft", |
|
227 | 227 | "tags": [], |
|
228 | 228 | "user": "test" |
|
229 | 229 | }, |
|
230 | 230 | { |
|
231 | 231 | "bookmarks": [], |
|
232 | 232 | "branch": "test-branch", |
|
233 | 233 | "date": [ |
|
234 | 234 | 0.0, |
|
235 | 235 | 0 |
|
236 | 236 | ], |
|
237 | 237 | "desc": "create test branch", |
|
238 | 238 | "node": "6ab967a8ab3489227a83f80e920faa039a71819f", |
|
239 | 239 | "parents": [ |
|
240 | 240 | "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e" |
|
241 | 241 | ], |
|
242 | 242 | "phase": "draft", |
|
243 | 243 | "tags": [], |
|
244 | 244 | "user": "test" |
|
245 | 245 | }, |
|
246 | 246 | { |
|
247 | 247 | "bookmarks": [ |
|
248 | 248 | "bookmark2" |
|
249 | 249 | ], |
|
250 | 250 | "branch": "default", |
|
251 | 251 | "date": [ |
|
252 | 252 | 0.0, |
|
253 | 253 | 0 |
|
254 | 254 | ], |
|
255 | 255 | "desc": "create tag2", |
|
256 | 256 | "node": "ceed296fe500c3fac9541e31dad860cb49c89e45", |
|
257 | 257 | "parents": [ |
|
258 | 258 | "f2890a05fea49bfaf9fb27ed5490894eba32da78" |
|
259 | 259 | ], |
|
260 | 260 | "phase": "draft", |
|
261 | 261 | "tags": [], |
|
262 | 262 | "user": "test" |
|
263 | 263 | }, |
|
264 | 264 | { |
|
265 | 265 | "bookmarks": [], |
|
266 | 266 | "branch": "default", |
|
267 | 267 | "date": [ |
|
268 | 268 | 0.0, |
|
269 | 269 | 0 |
|
270 | 270 | ], |
|
271 | 271 | "desc": "another commit to da/foo", |
|
272 | 272 | "node": "f2890a05fea49bfaf9fb27ed5490894eba32da78", |
|
273 | 273 | "parents": [ |
|
274 | 274 | "93a8ce14f89156426b7fa981af8042da53f03aa0" |
|
275 | 275 | ], |
|
276 | 276 | "phase": "draft", |
|
277 | 277 | "tags": [ |
|
278 | 278 | "tag2" |
|
279 | 279 | ], |
|
280 | 280 | "user": "test" |
|
281 | 281 | }, |
|
282 | 282 | { |
|
283 | 283 | "bookmarks": [], |
|
284 | 284 | "branch": "default", |
|
285 | 285 | "date": [ |
|
286 | 286 | 0.0, |
|
287 | 287 | 0 |
|
288 | 288 | ], |
|
289 | 289 | "desc": "create tag", |
|
290 | 290 | "node": "93a8ce14f89156426b7fa981af8042da53f03aa0", |
|
291 | 291 | "parents": [ |
|
292 | 292 | "78896eb0e102174ce9278438a95e12543e4367a7" |
|
293 | 293 | ], |
|
294 | 294 | "phase": "public", |
|
295 | 295 | "tags": [], |
|
296 | 296 | "user": "test" |
|
297 | 297 | }, |
|
298 | 298 | { |
|
299 | 299 | "bookmarks": [], |
|
300 | 300 | "branch": "default", |
|
301 | 301 | "date": [ |
|
302 | 302 | 0.0, |
|
303 | 303 | 0 |
|
304 | 304 | ], |
|
305 | 305 | "desc": "move foo", |
|
306 | 306 | "node": "78896eb0e102174ce9278438a95e12543e4367a7", |
|
307 | 307 | "parents": [ |
|
308 | 308 | "8d7c456572acf3557e8ed8a07286b10c408bcec5" |
|
309 | 309 | ], |
|
310 | 310 | "phase": "public", |
|
311 | 311 | "tags": [ |
|
312 | 312 | "tag1" |
|
313 | 313 | ], |
|
314 | 314 | "user": "test" |
|
315 | 315 | }, |
|
316 | 316 | { |
|
317 | 317 | "bookmarks": [ |
|
318 | 318 | "bookmark1" |
|
319 | 319 | ], |
|
320 | 320 | "branch": "default", |
|
321 | 321 | "date": [ |
|
322 | 322 | 0.0, |
|
323 | 323 | 0 |
|
324 | 324 | ], |
|
325 | 325 | "desc": "modify da/foo", |
|
326 | 326 | "node": "8d7c456572acf3557e8ed8a07286b10c408bcec5", |
|
327 | 327 | "parents": [ |
|
328 | 328 | "f8bbb9024b10f93cdbb8d940337398291d40dea8" |
|
329 | 329 | ], |
|
330 | 330 | "phase": "public", |
|
331 | 331 | "tags": [], |
|
332 | 332 | "user": "test" |
|
333 | 333 | }, |
|
334 | 334 | { |
|
335 | 335 | "bookmarks": [], |
|
336 | 336 | "branch": "default", |
|
337 | 337 | "date": [ |
|
338 | 338 | 0.0, |
|
339 | 339 | 0 |
|
340 | 340 | ], |
|
341 | 341 | "desc": "modify foo", |
|
342 | 342 | "node": "f8bbb9024b10f93cdbb8d940337398291d40dea8", |
|
343 | 343 | "parents": [ |
|
344 | 344 | "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e" |
|
345 | 345 | ], |
|
346 | 346 | "phase": "public", |
|
347 | 347 | "tags": [], |
|
348 | 348 | "user": "test" |
|
349 | 349 | }, |
|
350 | 350 | { |
|
351 | 351 | "bookmarks": [], |
|
352 | 352 | "branch": "default", |
|
353 | 353 | "date": [ |
|
354 | 354 | 0.0, |
|
355 | 355 | 0 |
|
356 | 356 | ], |
|
357 | 357 | "desc": "initial", |
|
358 | 358 | "node": "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e", |
|
359 | 359 | "parents": [], |
|
360 | 360 | "phase": "public", |
|
361 | 361 | "tags": [], |
|
362 | 362 | "user": "test" |
|
363 | 363 | } |
|
364 | 364 | ], |
|
365 | 365 | "node": "cc725e08502a79dd1eda913760fbe06ed7a9abc7" |
|
366 | 366 | } |
|
367 | 367 | |
|
368 | 368 | changelog/{revision} shows information starting at a specific changeset |
|
369 | 369 | |
|
370 | 370 | $ request json-changelog/f8bbb9024b10 |
|
371 | 371 | 200 Script output follows |
|
372 | 372 | |
|
373 | 373 | { |
|
374 | 374 | "changeset_count": 10, |
|
375 | 375 | "changesets": [ |
|
376 | 376 | { |
|
377 | 377 | "bookmarks": [], |
|
378 | 378 | "branch": "default", |
|
379 | 379 | "date": [ |
|
380 | 380 | 0.0, |
|
381 | 381 | 0 |
|
382 | 382 | ], |
|
383 | 383 | "desc": "modify foo", |
|
384 | 384 | "node": "f8bbb9024b10f93cdbb8d940337398291d40dea8", |
|
385 | 385 | "parents": [ |
|
386 | 386 | "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e" |
|
387 | 387 | ], |
|
388 | 388 | "phase": "public", |
|
389 | 389 | "tags": [], |
|
390 | 390 | "user": "test" |
|
391 | 391 | }, |
|
392 | 392 | { |
|
393 | 393 | "bookmarks": [], |
|
394 | 394 | "branch": "default", |
|
395 | 395 | "date": [ |
|
396 | 396 | 0.0, |
|
397 | 397 | 0 |
|
398 | 398 | ], |
|
399 | 399 | "desc": "initial", |
|
400 | 400 | "node": "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e", |
|
401 | 401 | "parents": [], |
|
402 | 402 | "phase": "public", |
|
403 | 403 | "tags": [], |
|
404 | 404 | "user": "test" |
|
405 | 405 | } |
|
406 | 406 | ], |
|
407 | 407 | "node": "f8bbb9024b10f93cdbb8d940337398291d40dea8" |
|
408 | 408 | } |
|
409 | 409 | |
|
410 | 410 | shortlog/ shows information about a set of changesets |
|
411 | 411 | |
|
412 | 412 | $ request json-shortlog |
|
413 | 413 | 200 Script output follows |
|
414 | 414 | |
|
415 | 415 | { |
|
416 | 416 | "changeset_count": 10, |
|
417 | 417 | "changesets": [ |
|
418 | 418 | { |
|
419 | 419 | "bookmarks": [], |
|
420 | 420 | "branch": "default", |
|
421 | 421 | "date": [ |
|
422 | 422 | 0.0, |
|
423 | 423 | 0 |
|
424 | 424 | ], |
|
425 | 425 | "desc": "merge test-branch into default", |
|
426 | 426 | "node": "cc725e08502a79dd1eda913760fbe06ed7a9abc7", |
|
427 | 427 | "parents": [ |
|
428 | 428 | "ceed296fe500c3fac9541e31dad860cb49c89e45", |
|
429 | 429 | "ed66c30e87eb65337c05a4229efaa5f1d5285a90" |
|
430 | 430 | ], |
|
431 | 431 | "phase": "draft", |
|
432 | 432 | "tags": [ |
|
433 | 433 | "tip" |
|
434 | 434 | ], |
|
435 | 435 | "user": "test" |
|
436 | 436 | }, |
|
437 | 437 | { |
|
438 | 438 | "bookmarks": [], |
|
439 | 439 | "branch": "test-branch", |
|
440 | 440 | "date": [ |
|
441 | 441 | 0.0, |
|
442 | 442 | 0 |
|
443 | 443 | ], |
|
444 | 444 | "desc": "another commit in test-branch", |
|
445 | 445 | "node": "ed66c30e87eb65337c05a4229efaa5f1d5285a90", |
|
446 | 446 | "parents": [ |
|
447 | 447 | "6ab967a8ab3489227a83f80e920faa039a71819f" |
|
448 | 448 | ], |
|
449 | 449 | "phase": "draft", |
|
450 | 450 | "tags": [], |
|
451 | 451 | "user": "test" |
|
452 | 452 | }, |
|
453 | 453 | { |
|
454 | 454 | "bookmarks": [], |
|
455 | 455 | "branch": "test-branch", |
|
456 | 456 | "date": [ |
|
457 | 457 | 0.0, |
|
458 | 458 | 0 |
|
459 | 459 | ], |
|
460 | 460 | "desc": "create test branch", |
|
461 | 461 | "node": "6ab967a8ab3489227a83f80e920faa039a71819f", |
|
462 | 462 | "parents": [ |
|
463 | 463 | "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e" |
|
464 | 464 | ], |
|
465 | 465 | "phase": "draft", |
|
466 | 466 | "tags": [], |
|
467 | 467 | "user": "test" |
|
468 | 468 | }, |
|
469 | 469 | { |
|
470 | 470 | "bookmarks": [ |
|
471 | 471 | "bookmark2" |
|
472 | 472 | ], |
|
473 | 473 | "branch": "default", |
|
474 | 474 | "date": [ |
|
475 | 475 | 0.0, |
|
476 | 476 | 0 |
|
477 | 477 | ], |
|
478 | 478 | "desc": "create tag2", |
|
479 | 479 | "node": "ceed296fe500c3fac9541e31dad860cb49c89e45", |
|
480 | 480 | "parents": [ |
|
481 | 481 | "f2890a05fea49bfaf9fb27ed5490894eba32da78" |
|
482 | 482 | ], |
|
483 | 483 | "phase": "draft", |
|
484 | 484 | "tags": [], |
|
485 | 485 | "user": "test" |
|
486 | 486 | }, |
|
487 | 487 | { |
|
488 | 488 | "bookmarks": [], |
|
489 | 489 | "branch": "default", |
|
490 | 490 | "date": [ |
|
491 | 491 | 0.0, |
|
492 | 492 | 0 |
|
493 | 493 | ], |
|
494 | 494 | "desc": "another commit to da/foo", |
|
495 | 495 | "node": "f2890a05fea49bfaf9fb27ed5490894eba32da78", |
|
496 | 496 | "parents": [ |
|
497 | 497 | "93a8ce14f89156426b7fa981af8042da53f03aa0" |
|
498 | 498 | ], |
|
499 | 499 | "phase": "draft", |
|
500 | 500 | "tags": [ |
|
501 | 501 | "tag2" |
|
502 | 502 | ], |
|
503 | 503 | "user": "test" |
|
504 | 504 | }, |
|
505 | 505 | { |
|
506 | 506 | "bookmarks": [], |
|
507 | 507 | "branch": "default", |
|
508 | 508 | "date": [ |
|
509 | 509 | 0.0, |
|
510 | 510 | 0 |
|
511 | 511 | ], |
|
512 | 512 | "desc": "create tag", |
|
513 | 513 | "node": "93a8ce14f89156426b7fa981af8042da53f03aa0", |
|
514 | 514 | "parents": [ |
|
515 | 515 | "78896eb0e102174ce9278438a95e12543e4367a7" |
|
516 | 516 | ], |
|
517 | 517 | "phase": "public", |
|
518 | 518 | "tags": [], |
|
519 | 519 | "user": "test" |
|
520 | 520 | }, |
|
521 | 521 | { |
|
522 | 522 | "bookmarks": [], |
|
523 | 523 | "branch": "default", |
|
524 | 524 | "date": [ |
|
525 | 525 | 0.0, |
|
526 | 526 | 0 |
|
527 | 527 | ], |
|
528 | 528 | "desc": "move foo", |
|
529 | 529 | "node": "78896eb0e102174ce9278438a95e12543e4367a7", |
|
530 | 530 | "parents": [ |
|
531 | 531 | "8d7c456572acf3557e8ed8a07286b10c408bcec5" |
|
532 | 532 | ], |
|
533 | 533 | "phase": "public", |
|
534 | 534 | "tags": [ |
|
535 | 535 | "tag1" |
|
536 | 536 | ], |
|
537 | 537 | "user": "test" |
|
538 | 538 | }, |
|
539 | 539 | { |
|
540 | 540 | "bookmarks": [ |
|
541 | 541 | "bookmark1" |
|
542 | 542 | ], |
|
543 | 543 | "branch": "default", |
|
544 | 544 | "date": [ |
|
545 | 545 | 0.0, |
|
546 | 546 | 0 |
|
547 | 547 | ], |
|
548 | 548 | "desc": "modify da/foo", |
|
549 | 549 | "node": "8d7c456572acf3557e8ed8a07286b10c408bcec5", |
|
550 | 550 | "parents": [ |
|
551 | 551 | "f8bbb9024b10f93cdbb8d940337398291d40dea8" |
|
552 | 552 | ], |
|
553 | 553 | "phase": "public", |
|
554 | 554 | "tags": [], |
|
555 | 555 | "user": "test" |
|
556 | 556 | }, |
|
557 | 557 | { |
|
558 | 558 | "bookmarks": [], |
|
559 | 559 | "branch": "default", |
|
560 | 560 | "date": [ |
|
561 | 561 | 0.0, |
|
562 | 562 | 0 |
|
563 | 563 | ], |
|
564 | 564 | "desc": "modify foo", |
|
565 | 565 | "node": "f8bbb9024b10f93cdbb8d940337398291d40dea8", |
|
566 | 566 | "parents": [ |
|
567 | 567 | "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e" |
|
568 | 568 | ], |
|
569 | 569 | "phase": "public", |
|
570 | 570 | "tags": [], |
|
571 | 571 | "user": "test" |
|
572 | 572 | }, |
|
573 | 573 | { |
|
574 | 574 | "bookmarks": [], |
|
575 | 575 | "branch": "default", |
|
576 | 576 | "date": [ |
|
577 | 577 | 0.0, |
|
578 | 578 | 0 |
|
579 | 579 | ], |
|
580 | 580 | "desc": "initial", |
|
581 | 581 | "node": "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e", |
|
582 | 582 | "parents": [], |
|
583 | 583 | "phase": "public", |
|
584 | 584 | "tags": [], |
|
585 | 585 | "user": "test" |
|
586 | 586 | } |
|
587 | 587 | ], |
|
588 | 588 | "node": "cc725e08502a79dd1eda913760fbe06ed7a9abc7" |
|
589 | 589 | } |
|
590 | 590 | |
|
591 | 591 | changeset/ renders the tip changeset |
|
592 | 592 | |
|
593 | 593 | $ request json-rev |
|
594 | 594 | 200 Script output follows |
|
595 | 595 | |
|
596 | 596 | { |
|
597 | 597 | "bookmarks": [], |
|
598 | 598 | "branch": "default", |
|
599 | 599 | "date": [ |
|
600 | 600 | 0.0, |
|
601 | 601 | 0 |
|
602 | 602 | ], |
|
603 | 603 | "desc": "merge test-branch into default", |
|
604 | 604 | "node": "cc725e08502a79dd1eda913760fbe06ed7a9abc7", |
|
605 | 605 | "parents": [ |
|
606 | 606 | "ceed296fe500c3fac9541e31dad860cb49c89e45", |
|
607 | 607 | "ed66c30e87eb65337c05a4229efaa5f1d5285a90" |
|
608 | 608 | ], |
|
609 | 609 | "phase": "draft", |
|
610 | 610 | "tags": [ |
|
611 | 611 | "tip" |
|
612 | 612 | ], |
|
613 | 613 | "user": "test" |
|
614 | 614 | } |
|
615 | 615 | |
|
616 | 616 | changeset/{revision} shows tags |
|
617 | 617 | |
|
618 | 618 | $ request json-rev/78896eb0e102 |
|
619 | 619 | 200 Script output follows |
|
620 | 620 | |
|
621 | 621 | { |
|
622 | 622 | "bookmarks": [], |
|
623 | 623 | "branch": "default", |
|
624 | 624 | "date": [ |
|
625 | 625 | 0.0, |
|
626 | 626 | 0 |
|
627 | 627 | ], |
|
628 | 628 | "desc": "move foo", |
|
629 | 629 | "node": "78896eb0e102174ce9278438a95e12543e4367a7", |
|
630 | 630 | "parents": [ |
|
631 | 631 | "8d7c456572acf3557e8ed8a07286b10c408bcec5" |
|
632 | 632 | ], |
|
633 | 633 | "phase": "public", |
|
634 | 634 | "tags": [ |
|
635 | 635 | "tag1" |
|
636 | 636 | ], |
|
637 | 637 | "user": "test" |
|
638 | 638 | } |
|
639 | 639 | |
|
640 | 640 | changeset/{revision} shows bookmarks |
|
641 | 641 | |
|
642 | 642 | $ request json-rev/8d7c456572ac |
|
643 | 643 | 200 Script output follows |
|
644 | 644 | |
|
645 | 645 | { |
|
646 | 646 | "bookmarks": [ |
|
647 | 647 | "bookmark1" |
|
648 | 648 | ], |
|
649 | 649 | "branch": "default", |
|
650 | 650 | "date": [ |
|
651 | 651 | 0.0, |
|
652 | 652 | 0 |
|
653 | 653 | ], |
|
654 | 654 | "desc": "modify da/foo", |
|
655 | 655 | "node": "8d7c456572acf3557e8ed8a07286b10c408bcec5", |
|
656 | 656 | "parents": [ |
|
657 | 657 | "f8bbb9024b10f93cdbb8d940337398291d40dea8" |
|
658 | 658 | ], |
|
659 | 659 | "phase": "public", |
|
660 | 660 | "tags": [], |
|
661 | 661 | "user": "test" |
|
662 | 662 | } |
|
663 | 663 | |
|
664 | 664 | changeset/{revision} shows branches |
|
665 | 665 | |
|
666 | 666 | $ request json-rev/6ab967a8ab34 |
|
667 | 667 | 200 Script output follows |
|
668 | 668 | |
|
669 | 669 | { |
|
670 | 670 | "bookmarks": [], |
|
671 | 671 | "branch": "test-branch", |
|
672 | 672 | "date": [ |
|
673 | 673 | 0.0, |
|
674 | 674 | 0 |
|
675 | 675 | ], |
|
676 | 676 | "desc": "create test branch", |
|
677 | 677 | "node": "6ab967a8ab3489227a83f80e920faa039a71819f", |
|
678 | 678 | "parents": [ |
|
679 | 679 | "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e" |
|
680 | 680 | ], |
|
681 | 681 | "phase": "draft", |
|
682 | 682 | "tags": [], |
|
683 | 683 | "user": "test" |
|
684 | 684 | } |
|
685 | 685 | |
|
686 | 686 | manifest/{revision}/{path} shows info about a directory at a revision |
|
687 | 687 | |
|
688 | 688 | $ request json-manifest/06e557f3edf6/ |
|
689 | 689 | 200 Script output follows |
|
690 | 690 | |
|
691 | 691 | { |
|
692 | 692 | "abspath": "/", |
|
693 | 693 | "bookmarks": [], |
|
694 | 694 | "directories": [ |
|
695 | 695 | { |
|
696 | 696 | "abspath": "/da", |
|
697 | 697 | "basename": "da", |
|
698 | 698 | "emptydirs": "" |
|
699 | 699 | } |
|
700 | 700 | ], |
|
701 | 701 | "files": [ |
|
702 | 702 | { |
|
703 | 703 | "abspath": "foo", |
|
704 | 704 | "basename": "foo", |
|
705 | 705 | "date": [ |
|
706 | 706 | 0.0, |
|
707 | 707 | 0 |
|
708 | 708 | ], |
|
709 | 709 | "flags": "", |
|
710 | 710 | "size": 4 |
|
711 | 711 | } |
|
712 | 712 | ], |
|
713 | 713 | "node": "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e", |
|
714 | 714 | "tags": [] |
|
715 | 715 | } |
|
716 | 716 | |
|
717 | 717 | tags/ shows tags info |
|
718 | 718 | |
|
719 | 719 | $ request json-tags |
|
720 | 720 | 200 Script output follows |
|
721 | 721 | |
|
722 | 722 | { |
|
723 | 723 | "node": "cc725e08502a79dd1eda913760fbe06ed7a9abc7", |
|
724 | 724 | "tags": [ |
|
725 | 725 | { |
|
726 | 726 | "date": [ |
|
727 | 727 | 0.0, |
|
728 | 728 | 0 |
|
729 | 729 | ], |
|
730 | 730 | "node": "f2890a05fea49bfaf9fb27ed5490894eba32da78", |
|
731 | 731 | "tag": "tag2" |
|
732 | 732 | }, |
|
733 | 733 | { |
|
734 | 734 | "date": [ |
|
735 | 735 | 0.0, |
|
736 | 736 | 0 |
|
737 | 737 | ], |
|
738 | 738 | "node": "78896eb0e102174ce9278438a95e12543e4367a7", |
|
739 | 739 | "tag": "tag1" |
|
740 | 740 | } |
|
741 | 741 | ] |
|
742 | 742 | } |
|
743 | 743 | |
|
744 | 744 | bookmarks/ shows bookmarks info |
|
745 | 745 | |
|
746 | 746 | $ request json-bookmarks |
|
747 | 747 | 200 Script output follows |
|
748 | 748 | |
|
749 | 749 | { |
|
750 | 750 | "bookmarks": [ |
|
751 | 751 | { |
|
752 | 752 | "bookmark": "bookmark2", |
|
753 | 753 | "date": [ |
|
754 | 754 | 0.0, |
|
755 | 755 | 0 |
|
756 | 756 | ], |
|
757 | 757 | "node": "ceed296fe500c3fac9541e31dad860cb49c89e45" |
|
758 | 758 | }, |
|
759 | 759 | { |
|
760 | 760 | "bookmark": "bookmark1", |
|
761 | 761 | "date": [ |
|
762 | 762 | 0.0, |
|
763 | 763 | 0 |
|
764 | 764 | ], |
|
765 | 765 | "node": "8d7c456572acf3557e8ed8a07286b10c408bcec5" |
|
766 | 766 | } |
|
767 | 767 | ], |
|
768 | 768 | "node": "cc725e08502a79dd1eda913760fbe06ed7a9abc7" |
|
769 | 769 | } |
|
770 | 770 | |
|
771 | 771 | branches/ shows branches info |
|
772 | 772 | |
|
773 | 773 | $ request json-branches |
|
774 | 774 | 200 Script output follows |
|
775 | 775 | |
|
776 | 776 | { |
|
777 | 777 | "branches": [ |
|
778 | 778 | { |
|
779 | 779 | "branch": "default", |
|
780 | 780 | "date": [ |
|
781 | 781 | 0.0, |
|
782 | 782 | 0 |
|
783 | 783 | ], |
|
784 | 784 | "node": "cc725e08502a79dd1eda913760fbe06ed7a9abc7", |
|
785 | 785 | "status": "open" |
|
786 | 786 | }, |
|
787 | 787 | { |
|
788 | 788 | "branch": "test-branch", |
|
789 | 789 | "date": [ |
|
790 | 790 | 0.0, |
|
791 | 791 | 0 |
|
792 | 792 | ], |
|
793 | 793 | "node": "ed66c30e87eb65337c05a4229efaa5f1d5285a90", |
|
794 | 794 | "status": "inactive" |
|
795 | 795 | } |
|
796 | 796 | ] |
|
797 | 797 | } |
|
798 | 798 | |
|
799 | 799 | summary/ shows a summary of repository state |
|
800 | 800 | |
|
801 | 801 | $ request json-summary |
|
802 | 802 | 200 Script output follows |
|
803 | 803 | |
|
804 | 804 | { |
|
805 | 805 | "archives": [ |
|
806 | 806 | { |
|
807 | 807 | "extension": ".tar.bz2", |
|
808 | 808 | "node": "tip", |
|
809 | 809 | "type": "bz2", |
|
810 | 810 | "url": "http://*:$HGPORT/archive/tip.tar.bz2" (glob) |
|
811 | 811 | } |
|
812 | 812 | ], |
|
813 | 813 | "bookmarks": [ |
|
814 | 814 | { |
|
815 | 815 | "bookmark": "bookmark2", |
|
816 | 816 | "date": [ |
|
817 | 817 | 0.0, |
|
818 | 818 | 0 |
|
819 | 819 | ], |
|
820 | 820 | "node": "ceed296fe500c3fac9541e31dad860cb49c89e45" |
|
821 | 821 | }, |
|
822 | 822 | { |
|
823 | 823 | "bookmark": "bookmark1", |
|
824 | 824 | "date": [ |
|
825 | 825 | 0.0, |
|
826 | 826 | 0 |
|
827 | 827 | ], |
|
828 | 828 | "node": "8d7c456572acf3557e8ed8a07286b10c408bcec5" |
|
829 | 829 | } |
|
830 | 830 | ], |
|
831 | 831 | "branches": [ |
|
832 | 832 | { |
|
833 | 833 | "branch": "default", |
|
834 | 834 | "date": [ |
|
835 | 835 | 0.0, |
|
836 | 836 | 0 |
|
837 | 837 | ], |
|
838 | 838 | "node": "cc725e08502a79dd1eda913760fbe06ed7a9abc7", |
|
839 | 839 | "status": "open" |
|
840 | 840 | }, |
|
841 | 841 | { |
|
842 | 842 | "branch": "test-branch", |
|
843 | 843 | "date": [ |
|
844 | 844 | 0.0, |
|
845 | 845 | 0 |
|
846 | 846 | ], |
|
847 | 847 | "node": "ed66c30e87eb65337c05a4229efaa5f1d5285a90", |
|
848 | 848 | "status": "inactive" |
|
849 | 849 | } |
|
850 | 850 | ], |
|
851 | "labels": [], | |
|
851 | 852 | "lastchange": [ |
|
852 | 853 | 0.0, |
|
853 | 854 | 0 |
|
854 | 855 | ], |
|
855 | 856 | "node": "cc725e08502a79dd1eda913760fbe06ed7a9abc7", |
|
856 | 857 | "shortlog": [ |
|
857 | 858 | { |
|
858 | 859 | "bookmarks": [], |
|
859 | 860 | "branch": "default", |
|
860 | 861 | "date": [ |
|
861 | 862 | 0.0, |
|
862 | 863 | 0 |
|
863 | 864 | ], |
|
864 | 865 | "desc": "merge test-branch into default", |
|
865 | 866 | "node": "cc725e08502a79dd1eda913760fbe06ed7a9abc7", |
|
866 | 867 | "parents": [ |
|
867 | 868 | "ceed296fe500c3fac9541e31dad860cb49c89e45", |
|
868 | 869 | "ed66c30e87eb65337c05a4229efaa5f1d5285a90" |
|
869 | 870 | ], |
|
870 | 871 | "phase": "draft", |
|
871 | 872 | "tags": [ |
|
872 | 873 | "tip" |
|
873 | 874 | ], |
|
874 | 875 | "user": "test" |
|
875 | 876 | }, |
|
876 | 877 | { |
|
877 | 878 | "bookmarks": [], |
|
878 | 879 | "branch": "test-branch", |
|
879 | 880 | "date": [ |
|
880 | 881 | 0.0, |
|
881 | 882 | 0 |
|
882 | 883 | ], |
|
883 | 884 | "desc": "another commit in test-branch", |
|
884 | 885 | "node": "ed66c30e87eb65337c05a4229efaa5f1d5285a90", |
|
885 | 886 | "parents": [ |
|
886 | 887 | "6ab967a8ab3489227a83f80e920faa039a71819f" |
|
887 | 888 | ], |
|
888 | 889 | "phase": "draft", |
|
889 | 890 | "tags": [], |
|
890 | 891 | "user": "test" |
|
891 | 892 | }, |
|
892 | 893 | { |
|
893 | 894 | "bookmarks": [], |
|
894 | 895 | "branch": "test-branch", |
|
895 | 896 | "date": [ |
|
896 | 897 | 0.0, |
|
897 | 898 | 0 |
|
898 | 899 | ], |
|
899 | 900 | "desc": "create test branch", |
|
900 | 901 | "node": "6ab967a8ab3489227a83f80e920faa039a71819f", |
|
901 | 902 | "parents": [ |
|
902 | 903 | "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e" |
|
903 | 904 | ], |
|
904 | 905 | "phase": "draft", |
|
905 | 906 | "tags": [], |
|
906 | 907 | "user": "test" |
|
907 | 908 | }, |
|
908 | 909 | { |
|
909 | 910 | "bookmarks": [ |
|
910 | 911 | "bookmark2" |
|
911 | 912 | ], |
|
912 | 913 | "branch": "default", |
|
913 | 914 | "date": [ |
|
914 | 915 | 0.0, |
|
915 | 916 | 0 |
|
916 | 917 | ], |
|
917 | 918 | "desc": "create tag2", |
|
918 | 919 | "node": "ceed296fe500c3fac9541e31dad860cb49c89e45", |
|
919 | 920 | "parents": [ |
|
920 | 921 | "f2890a05fea49bfaf9fb27ed5490894eba32da78" |
|
921 | 922 | ], |
|
922 | 923 | "phase": "draft", |
|
923 | 924 | "tags": [], |
|
924 | 925 | "user": "test" |
|
925 | 926 | }, |
|
926 | 927 | { |
|
927 | 928 | "bookmarks": [], |
|
928 | 929 | "branch": "default", |
|
929 | 930 | "date": [ |
|
930 | 931 | 0.0, |
|
931 | 932 | 0 |
|
932 | 933 | ], |
|
933 | 934 | "desc": "another commit to da/foo", |
|
934 | 935 | "node": "f2890a05fea49bfaf9fb27ed5490894eba32da78", |
|
935 | 936 | "parents": [ |
|
936 | 937 | "93a8ce14f89156426b7fa981af8042da53f03aa0" |
|
937 | 938 | ], |
|
938 | 939 | "phase": "draft", |
|
939 | 940 | "tags": [ |
|
940 | 941 | "tag2" |
|
941 | 942 | ], |
|
942 | 943 | "user": "test" |
|
943 | 944 | }, |
|
944 | 945 | { |
|
945 | 946 | "bookmarks": [], |
|
946 | 947 | "branch": "default", |
|
947 | 948 | "date": [ |
|
948 | 949 | 0.0, |
|
949 | 950 | 0 |
|
950 | 951 | ], |
|
951 | 952 | "desc": "create tag", |
|
952 | 953 | "node": "93a8ce14f89156426b7fa981af8042da53f03aa0", |
|
953 | 954 | "parents": [ |
|
954 | 955 | "78896eb0e102174ce9278438a95e12543e4367a7" |
|
955 | 956 | ], |
|
956 | 957 | "phase": "public", |
|
957 | 958 | "tags": [], |
|
958 | 959 | "user": "test" |
|
959 | 960 | }, |
|
960 | 961 | { |
|
961 | 962 | "bookmarks": [], |
|
962 | 963 | "branch": "default", |
|
963 | 964 | "date": [ |
|
964 | 965 | 0.0, |
|
965 | 966 | 0 |
|
966 | 967 | ], |
|
967 | 968 | "desc": "move foo", |
|
968 | 969 | "node": "78896eb0e102174ce9278438a95e12543e4367a7", |
|
969 | 970 | "parents": [ |
|
970 | 971 | "8d7c456572acf3557e8ed8a07286b10c408bcec5" |
|
971 | 972 | ], |
|
972 | 973 | "phase": "public", |
|
973 | 974 | "tags": [ |
|
974 | 975 | "tag1" |
|
975 | 976 | ], |
|
976 | 977 | "user": "test" |
|
977 | 978 | }, |
|
978 | 979 | { |
|
979 | 980 | "bookmarks": [ |
|
980 | 981 | "bookmark1" |
|
981 | 982 | ], |
|
982 | 983 | "branch": "default", |
|
983 | 984 | "date": [ |
|
984 | 985 | 0.0, |
|
985 | 986 | 0 |
|
986 | 987 | ], |
|
987 | 988 | "desc": "modify da/foo", |
|
988 | 989 | "node": "8d7c456572acf3557e8ed8a07286b10c408bcec5", |
|
989 | 990 | "parents": [ |
|
990 | 991 | "f8bbb9024b10f93cdbb8d940337398291d40dea8" |
|
991 | 992 | ], |
|
992 | 993 | "phase": "public", |
|
993 | 994 | "tags": [], |
|
994 | 995 | "user": "test" |
|
995 | 996 | }, |
|
996 | 997 | { |
|
997 | 998 | "bookmarks": [], |
|
998 | 999 | "branch": "default", |
|
999 | 1000 | "date": [ |
|
1000 | 1001 | 0.0, |
|
1001 | 1002 | 0 |
|
1002 | 1003 | ], |
|
1003 | 1004 | "desc": "modify foo", |
|
1004 | 1005 | "node": "f8bbb9024b10f93cdbb8d940337398291d40dea8", |
|
1005 | 1006 | "parents": [ |
|
1006 | 1007 | "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e" |
|
1007 | 1008 | ], |
|
1008 | 1009 | "phase": "public", |
|
1009 | 1010 | "tags": [], |
|
1010 | 1011 | "user": "test" |
|
1011 | 1012 | }, |
|
1012 | 1013 | { |
|
1013 | 1014 | "bookmarks": [], |
|
1014 | 1015 | "branch": "default", |
|
1015 | 1016 | "date": [ |
|
1016 | 1017 | 0.0, |
|
1017 | 1018 | 0 |
|
1018 | 1019 | ], |
|
1019 | 1020 | "desc": "initial", |
|
1020 | 1021 | "node": "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e", |
|
1021 | 1022 | "parents": [], |
|
1022 | 1023 | "phase": "public", |
|
1023 | 1024 | "tags": [], |
|
1024 | 1025 | "user": "test" |
|
1025 | 1026 | } |
|
1026 | 1027 | ], |
|
1027 | 1028 | "tags": [ |
|
1028 | 1029 | { |
|
1029 | 1030 | "date": [ |
|
1030 | 1031 | 0.0, |
|
1031 | 1032 | 0 |
|
1032 | 1033 | ], |
|
1033 | 1034 | "node": "f2890a05fea49bfaf9fb27ed5490894eba32da78", |
|
1034 | 1035 | "tag": "tag2" |
|
1035 | 1036 | }, |
|
1036 | 1037 | { |
|
1037 | 1038 | "date": [ |
|
1038 | 1039 | 0.0, |
|
1039 | 1040 | 0 |
|
1040 | 1041 | ], |
|
1041 | 1042 | "node": "78896eb0e102174ce9278438a95e12543e4367a7", |
|
1042 | 1043 | "tag": "tag1" |
|
1043 | 1044 | } |
|
1044 | 1045 | ] |
|
1045 | 1046 | } |
|
1046 | 1047 | |
|
1047 | 1048 | $ request json-changelog?rev=create |
|
1048 | 1049 | 200 Script output follows |
|
1049 | 1050 | |
|
1050 | 1051 | { |
|
1051 | 1052 | "entries": [ |
|
1052 | 1053 | { |
|
1053 | 1054 | "bookmarks": [], |
|
1054 | 1055 | "branch": "test-branch", |
|
1055 | 1056 | "date": [ |
|
1056 | 1057 | 0.0, |
|
1057 | 1058 | 0 |
|
1058 | 1059 | ], |
|
1059 | 1060 | "desc": "create test branch", |
|
1060 | 1061 | "node": "6ab967a8ab3489227a83f80e920faa039a71819f", |
|
1061 | 1062 | "parents": [ |
|
1062 | 1063 | "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e" |
|
1063 | 1064 | ], |
|
1064 | 1065 | "phase": "draft", |
|
1065 | 1066 | "tags": [], |
|
1066 | 1067 | "user": "test" |
|
1067 | 1068 | }, |
|
1068 | 1069 | { |
|
1069 | 1070 | "bookmarks": [ |
|
1070 | 1071 | "bookmark2" |
|
1071 | 1072 | ], |
|
1072 | 1073 | "branch": "default", |
|
1073 | 1074 | "date": [ |
|
1074 | 1075 | 0.0, |
|
1075 | 1076 | 0 |
|
1076 | 1077 | ], |
|
1077 | 1078 | "desc": "create tag2", |
|
1078 | 1079 | "node": "ceed296fe500c3fac9541e31dad860cb49c89e45", |
|
1079 | 1080 | "parents": [ |
|
1080 | 1081 | "f2890a05fea49bfaf9fb27ed5490894eba32da78" |
|
1081 | 1082 | ], |
|
1082 | 1083 | "phase": "draft", |
|
1083 | 1084 | "tags": [], |
|
1084 | 1085 | "user": "test" |
|
1085 | 1086 | }, |
|
1086 | 1087 | { |
|
1087 | 1088 | "bookmarks": [], |
|
1088 | 1089 | "branch": "default", |
|
1089 | 1090 | "date": [ |
|
1090 | 1091 | 0.0, |
|
1091 | 1092 | 0 |
|
1092 | 1093 | ], |
|
1093 | 1094 | "desc": "create tag", |
|
1094 | 1095 | "node": "93a8ce14f89156426b7fa981af8042da53f03aa0", |
|
1095 | 1096 | "parents": [ |
|
1096 | 1097 | "78896eb0e102174ce9278438a95e12543e4367a7" |
|
1097 | 1098 | ], |
|
1098 | 1099 | "phase": "public", |
|
1099 | 1100 | "tags": [], |
|
1100 | 1101 | "user": "test" |
|
1101 | 1102 | } |
|
1102 | 1103 | ], |
|
1103 | 1104 | "node": "cc725e08502a79dd1eda913760fbe06ed7a9abc7", |
|
1104 | 1105 | "query": "create" |
|
1105 | 1106 | } |
|
1106 | 1107 | |
|
1107 | 1108 | filediff/{revision}/{path} shows changes to a file in a revision |
|
1108 | 1109 | |
|
1109 | 1110 | $ request json-diff/f8bbb9024b10/foo |
|
1110 | 1111 | 200 Script output follows |
|
1111 | 1112 | |
|
1112 | 1113 | { |
|
1113 | 1114 | "author": "test", |
|
1114 | 1115 | "children": [], |
|
1115 | 1116 | "date": [ |
|
1116 | 1117 | 0.0, |
|
1117 | 1118 | 0 |
|
1118 | 1119 | ], |
|
1119 | 1120 | "desc": "modify foo", |
|
1120 | 1121 | "diff": [ |
|
1121 | 1122 | { |
|
1122 | 1123 | "blockno": 1, |
|
1123 | 1124 | "lines": [ |
|
1124 | 1125 | { |
|
1125 | 1126 | "l": "--- a/foo\tThu Jan 01 00:00:00 1970 +0000\n", |
|
1126 | 1127 | "n": 1, |
|
1127 | 1128 | "t": "-" |
|
1128 | 1129 | }, |
|
1129 | 1130 | { |
|
1130 | 1131 | "l": "+++ b/foo\tThu Jan 01 00:00:00 1970 +0000\n", |
|
1131 | 1132 | "n": 2, |
|
1132 | 1133 | "t": "+" |
|
1133 | 1134 | }, |
|
1134 | 1135 | { |
|
1135 | 1136 | "l": "@@ -1,1 +1,1 @@\n", |
|
1136 | 1137 | "n": 3, |
|
1137 | 1138 | "t": "@" |
|
1138 | 1139 | }, |
|
1139 | 1140 | { |
|
1140 | 1141 | "l": "-foo\n", |
|
1141 | 1142 | "n": 4, |
|
1142 | 1143 | "t": "-" |
|
1143 | 1144 | }, |
|
1144 | 1145 | { |
|
1145 | 1146 | "l": "+bar\n", |
|
1146 | 1147 | "n": 5, |
|
1147 | 1148 | "t": "+" |
|
1148 | 1149 | } |
|
1149 | 1150 | ] |
|
1150 | 1151 | } |
|
1151 | 1152 | ], |
|
1152 | 1153 | "node": "f8bbb9024b10f93cdbb8d940337398291d40dea8", |
|
1153 | 1154 | "parents": [ |
|
1154 | 1155 | "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e" |
|
1155 | 1156 | ], |
|
1156 | 1157 | "path": "foo" |
|
1157 | 1158 | } |
|
1158 | 1159 | |
|
1159 | 1160 | comparison/{revision}/{path} shows information about before and after for a file |
|
1160 | 1161 | |
|
1161 | 1162 | $ request json-comparison/f8bbb9024b10/foo |
|
1162 | 1163 | 200 Script output follows |
|
1163 | 1164 | |
|
1164 | 1165 | { |
|
1165 | 1166 | "author": "test", |
|
1166 | 1167 | "children": [], |
|
1167 | 1168 | "comparison": [ |
|
1168 | 1169 | { |
|
1169 | 1170 | "lines": [ |
|
1170 | 1171 | { |
|
1171 | 1172 | "ll": "foo", |
|
1172 | 1173 | "ln": 1, |
|
1173 | 1174 | "rl": "bar", |
|
1174 | 1175 | "rn": 1, |
|
1175 | 1176 | "t": "replace" |
|
1176 | 1177 | } |
|
1177 | 1178 | ] |
|
1178 | 1179 | } |
|
1179 | 1180 | ], |
|
1180 | 1181 | "date": [ |
|
1181 | 1182 | 0.0, |
|
1182 | 1183 | 0 |
|
1183 | 1184 | ], |
|
1184 | 1185 | "desc": "modify foo", |
|
1185 | 1186 | "leftnode": "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e", |
|
1186 | 1187 | "node": "f8bbb9024b10f93cdbb8d940337398291d40dea8", |
|
1187 | 1188 | "parents": [ |
|
1188 | 1189 | "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e" |
|
1189 | 1190 | ], |
|
1190 | 1191 | "path": "foo", |
|
1191 | 1192 | "rightnode": "f8bbb9024b10f93cdbb8d940337398291d40dea8" |
|
1192 | 1193 | } |
|
1193 | 1194 | |
|
1194 | 1195 | annotate/{revision}/{path} shows annotations for each line |
|
1195 | 1196 | |
|
1196 | 1197 | $ request json-annotate/f8bbb9024b10/foo |
|
1197 | 1198 | 200 Script output follows |
|
1198 | 1199 | |
|
1199 | 1200 | { |
|
1200 | 1201 | "abspath": "foo", |
|
1201 | 1202 | "annotate": [ |
|
1202 | 1203 | { |
|
1203 | 1204 | "abspath": "foo", |
|
1204 | 1205 | "author": "test", |
|
1205 | 1206 | "desc": "modify foo", |
|
1206 | 1207 | "line": "bar\n", |
|
1207 | 1208 | "lineno": 1, |
|
1208 | 1209 | "node": "f8bbb9024b10f93cdbb8d940337398291d40dea8", |
|
1209 | 1210 | "revdate": [ |
|
1210 | 1211 | 0.0, |
|
1211 | 1212 | 0 |
|
1212 | 1213 | ], |
|
1213 | 1214 | "targetline": 1 |
|
1214 | 1215 | } |
|
1215 | 1216 | ], |
|
1216 | 1217 | "author": "test", |
|
1217 | 1218 | "children": [], |
|
1218 | 1219 | "date": [ |
|
1219 | 1220 | 0.0, |
|
1220 | 1221 | 0 |
|
1221 | 1222 | ], |
|
1222 | 1223 | "desc": "modify foo", |
|
1223 | 1224 | "node": "f8bbb9024b10f93cdbb8d940337398291d40dea8", |
|
1224 | 1225 | "parents": [ |
|
1225 | 1226 | "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e" |
|
1226 | 1227 | ], |
|
1227 | 1228 | "permissions": "" |
|
1228 | 1229 | } |
|
1229 | 1230 | |
|
1230 | 1231 | filelog/{revision}/{path} shows history of a single file |
|
1231 | 1232 | |
|
1232 | 1233 | $ request json-filelog/f8bbb9024b10/foo |
|
1233 | 1234 | 200 Script output follows |
|
1234 | 1235 | |
|
1235 | 1236 | { |
|
1236 | 1237 | "entries": [ |
|
1237 | 1238 | { |
|
1238 | 1239 | "bookmarks": [], |
|
1239 | 1240 | "branch": "default", |
|
1240 | 1241 | "date": [ |
|
1241 | 1242 | 0.0, |
|
1242 | 1243 | 0 |
|
1243 | 1244 | ], |
|
1244 | 1245 | "desc": "modify foo", |
|
1245 | 1246 | "node": "f8bbb9024b10f93cdbb8d940337398291d40dea8", |
|
1246 | 1247 | "parents": [ |
|
1247 | 1248 | "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e" |
|
1248 | 1249 | ], |
|
1249 | 1250 | "phase": "public", |
|
1250 | 1251 | "tags": [], |
|
1251 | 1252 | "user": "test" |
|
1252 | 1253 | }, |
|
1253 | 1254 | { |
|
1254 | 1255 | "bookmarks": [], |
|
1255 | 1256 | "branch": "default", |
|
1256 | 1257 | "date": [ |
|
1257 | 1258 | 0.0, |
|
1258 | 1259 | 0 |
|
1259 | 1260 | ], |
|
1260 | 1261 | "desc": "initial", |
|
1261 | 1262 | "node": "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e", |
|
1262 | 1263 | "parents": [], |
|
1263 | 1264 | "phase": "public", |
|
1264 | 1265 | "tags": [], |
|
1265 | 1266 | "user": "test" |
|
1266 | 1267 | } |
|
1267 | 1268 | ] |
|
1268 | 1269 | } |
|
1269 | 1270 | |
|
1270 | 1271 | $ request json-filelog/cc725e08502a/da/foo |
|
1271 | 1272 | 200 Script output follows |
|
1272 | 1273 | |
|
1273 | 1274 | { |
|
1274 | 1275 | "entries": [ |
|
1275 | 1276 | { |
|
1276 | 1277 | "bookmarks": [], |
|
1277 | 1278 | "branch": "default", |
|
1278 | 1279 | "date": [ |
|
1279 | 1280 | 0.0, |
|
1280 | 1281 | 0 |
|
1281 | 1282 | ], |
|
1282 | 1283 | "desc": "another commit to da/foo", |
|
1283 | 1284 | "node": "f2890a05fea49bfaf9fb27ed5490894eba32da78", |
|
1284 | 1285 | "parents": [ |
|
1285 | 1286 | "8d7c456572acf3557e8ed8a07286b10c408bcec5" |
|
1286 | 1287 | ], |
|
1287 | 1288 | "phase": "draft", |
|
1288 | 1289 | "tags": [ |
|
1289 | 1290 | "tag2" |
|
1290 | 1291 | ], |
|
1291 | 1292 | "user": "test" |
|
1292 | 1293 | }, |
|
1293 | 1294 | { |
|
1294 | 1295 | "bookmarks": [ |
|
1295 | 1296 | "bookmark1" |
|
1296 | 1297 | ], |
|
1297 | 1298 | "branch": "default", |
|
1298 | 1299 | "date": [ |
|
1299 | 1300 | 0.0, |
|
1300 | 1301 | 0 |
|
1301 | 1302 | ], |
|
1302 | 1303 | "desc": "modify da/foo", |
|
1303 | 1304 | "node": "8d7c456572acf3557e8ed8a07286b10c408bcec5", |
|
1304 | 1305 | "parents": [ |
|
1305 | 1306 | "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e" |
|
1306 | 1307 | ], |
|
1307 | 1308 | "phase": "public", |
|
1308 | 1309 | "tags": [], |
|
1309 | 1310 | "user": "test" |
|
1310 | 1311 | }, |
|
1311 | 1312 | { |
|
1312 | 1313 | "bookmarks": [], |
|
1313 | 1314 | "branch": "default", |
|
1314 | 1315 | "date": [ |
|
1315 | 1316 | 0.0, |
|
1316 | 1317 | 0 |
|
1317 | 1318 | ], |
|
1318 | 1319 | "desc": "initial", |
|
1319 | 1320 | "node": "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e", |
|
1320 | 1321 | "parents": [], |
|
1321 | 1322 | "phase": "public", |
|
1322 | 1323 | "tags": [], |
|
1323 | 1324 | "user": "test" |
|
1324 | 1325 | } |
|
1325 | 1326 | ] |
|
1326 | 1327 | } |
|
1327 | 1328 | |
|
1328 | 1329 | (archive/ doesn't use templating, so ignore it) |
|
1329 | 1330 | |
|
1330 | 1331 | (static/ doesn't use templating, so ignore it) |
|
1331 | 1332 | |
|
1332 | 1333 | graph/ shows information that can be used to render a graph of the DAG |
|
1333 | 1334 | |
|
1334 | 1335 | $ request json-graph |
|
1335 | 1336 | 200 Script output follows |
|
1336 | 1337 | |
|
1337 | 1338 | "not yet implemented" |
|
1338 | 1339 | |
|
1339 | 1340 | help/ shows help topics |
|
1340 | 1341 | |
|
1341 | 1342 | $ request json-help |
|
1342 | 1343 | 200 Script output follows |
|
1343 | 1344 | |
|
1344 | 1345 | { |
|
1345 | 1346 | "earlycommands": [ |
|
1346 | 1347 | { |
|
1347 | 1348 | "summary": "add the specified files on the next commit", |
|
1348 | 1349 | "topic": "add" |
|
1349 | 1350 | }, |
|
1350 | 1351 | { |
|
1351 | 1352 | "summary": "show changeset information by line for each file", |
|
1352 | 1353 | "topic": "annotate" |
|
1353 | 1354 | }, |
|
1354 | 1355 | { |
|
1355 | 1356 | "summary": "make a copy of an existing repository", |
|
1356 | 1357 | "topic": "clone" |
|
1357 | 1358 | }, |
|
1358 | 1359 | { |
|
1359 | 1360 | "summary": "commit the specified files or all outstanding changes", |
|
1360 | 1361 | "topic": "commit" |
|
1361 | 1362 | }, |
|
1362 | 1363 | { |
|
1363 | 1364 | "summary": "diff repository (or selected files)", |
|
1364 | 1365 | "topic": "diff" |
|
1365 | 1366 | }, |
|
1366 | 1367 | { |
|
1367 | 1368 | "summary": "dump the header and diffs for one or more changesets", |
|
1368 | 1369 | "topic": "export" |
|
1369 | 1370 | }, |
|
1370 | 1371 | { |
|
1371 | 1372 | "summary": "forget the specified files on the next commit", |
|
1372 | 1373 | "topic": "forget" |
|
1373 | 1374 | }, |
|
1374 | 1375 | { |
|
1375 | 1376 | "summary": "create a new repository in the given directory", |
|
1376 | 1377 | "topic": "init" |
|
1377 | 1378 | }, |
|
1378 | 1379 | { |
|
1379 | 1380 | "summary": "show revision history of entire repository or files", |
|
1380 | 1381 | "topic": "log" |
|
1381 | 1382 | }, |
|
1382 | 1383 | { |
|
1383 | 1384 | "summary": "merge another revision into working directory", |
|
1384 | 1385 | "topic": "merge" |
|
1385 | 1386 | }, |
|
1386 | 1387 | { |
|
1387 | 1388 | "summary": "pull changes from the specified source", |
|
1388 | 1389 | "topic": "pull" |
|
1389 | 1390 | }, |
|
1390 | 1391 | { |
|
1391 | 1392 | "summary": "push changes to the specified destination", |
|
1392 | 1393 | "topic": "push" |
|
1393 | 1394 | }, |
|
1394 | 1395 | { |
|
1395 | 1396 | "summary": "remove the specified files on the next commit", |
|
1396 | 1397 | "topic": "remove" |
|
1397 | 1398 | }, |
|
1398 | 1399 | { |
|
1399 | 1400 | "summary": "start stand-alone webserver", |
|
1400 | 1401 | "topic": "serve" |
|
1401 | 1402 | }, |
|
1402 | 1403 | { |
|
1403 | 1404 | "summary": "show changed files in the working directory", |
|
1404 | 1405 | "topic": "status" |
|
1405 | 1406 | }, |
|
1406 | 1407 | { |
|
1407 | 1408 | "summary": "summarize working directory state", |
|
1408 | 1409 | "topic": "summary" |
|
1409 | 1410 | }, |
|
1410 | 1411 | { |
|
1411 | 1412 | "summary": "update working directory (or switch revisions)", |
|
1412 | 1413 | "topic": "update" |
|
1413 | 1414 | } |
|
1414 | 1415 | ], |
|
1415 | 1416 | "othercommands": [ |
|
1416 | 1417 | { |
|
1417 | 1418 | "summary": "add all new files, delete all missing files", |
|
1418 | 1419 | "topic": "addremove" |
|
1419 | 1420 | }, |
|
1420 | 1421 | { |
|
1421 | 1422 | "summary": "create an unversioned archive of a repository revision", |
|
1422 | 1423 | "topic": "archive" |
|
1423 | 1424 | }, |
|
1424 | 1425 | { |
|
1425 | 1426 | "summary": "reverse effect of earlier changeset", |
|
1426 | 1427 | "topic": "backout" |
|
1427 | 1428 | }, |
|
1428 | 1429 | { |
|
1429 | 1430 | "summary": "subdivision search of changesets", |
|
1430 | 1431 | "topic": "bisect" |
|
1431 | 1432 | }, |
|
1432 | 1433 | { |
|
1433 | 1434 | "summary": "create a new bookmark or list existing bookmarks", |
|
1434 | 1435 | "topic": "bookmarks" |
|
1435 | 1436 | }, |
|
1436 | 1437 | { |
|
1437 | 1438 | "summary": "set or show the current branch name", |
|
1438 | 1439 | "topic": "branch" |
|
1439 | 1440 | }, |
|
1440 | 1441 | { |
|
1441 | 1442 | "summary": "list repository named branches", |
|
1442 | 1443 | "topic": "branches" |
|
1443 | 1444 | }, |
|
1444 | 1445 | { |
|
1445 | 1446 | "summary": "create a changegroup file", |
|
1446 | 1447 | "topic": "bundle" |
|
1447 | 1448 | }, |
|
1448 | 1449 | { |
|
1449 | 1450 | "summary": "output the current or given revision of files", |
|
1450 | 1451 | "topic": "cat" |
|
1451 | 1452 | }, |
|
1452 | 1453 | { |
|
1453 | 1454 | "summary": "show combined config settings from all hgrc files", |
|
1454 | 1455 | "topic": "config" |
|
1455 | 1456 | }, |
|
1456 | 1457 | { |
|
1457 | 1458 | "summary": "mark files as copied for the next commit", |
|
1458 | 1459 | "topic": "copy" |
|
1459 | 1460 | }, |
|
1460 | 1461 | { |
|
1461 | 1462 | "summary": "list tracked files", |
|
1462 | 1463 | "topic": "files" |
|
1463 | 1464 | }, |
|
1464 | 1465 | { |
|
1465 | 1466 | "summary": "copy changes from other branches onto the current branch", |
|
1466 | 1467 | "topic": "graft" |
|
1467 | 1468 | }, |
|
1468 | 1469 | { |
|
1469 | 1470 | "summary": "search for a pattern in specified files and revisions", |
|
1470 | 1471 | "topic": "grep" |
|
1471 | 1472 | }, |
|
1472 | 1473 | { |
|
1473 | 1474 | "summary": "show branch heads", |
|
1474 | 1475 | "topic": "heads" |
|
1475 | 1476 | }, |
|
1476 | 1477 | { |
|
1477 | 1478 | "summary": "show help for a given topic or a help overview", |
|
1478 | 1479 | "topic": "help" |
|
1479 | 1480 | }, |
|
1480 | 1481 | { |
|
1481 | 1482 | "summary": "identify the working directory or specified revision", |
|
1482 | 1483 | "topic": "identify" |
|
1483 | 1484 | }, |
|
1484 | 1485 | { |
|
1485 | 1486 | "summary": "import an ordered set of patches", |
|
1486 | 1487 | "topic": "import" |
|
1487 | 1488 | }, |
|
1488 | 1489 | { |
|
1489 | 1490 | "summary": "show new changesets found in source", |
|
1490 | 1491 | "topic": "incoming" |
|
1491 | 1492 | }, |
|
1492 | 1493 | { |
|
1493 | 1494 | "summary": "output the current or given revision of the project manifest", |
|
1494 | 1495 | "topic": "manifest" |
|
1495 | 1496 | }, |
|
1496 | 1497 | { |
|
1497 | 1498 | "summary": "show changesets not found in the destination", |
|
1498 | 1499 | "topic": "outgoing" |
|
1499 | 1500 | }, |
|
1500 | 1501 | { |
|
1501 | 1502 | "summary": "show aliases for remote repositories", |
|
1502 | 1503 | "topic": "paths" |
|
1503 | 1504 | }, |
|
1504 | 1505 | { |
|
1505 | 1506 | "summary": "set or show the current phase name", |
|
1506 | 1507 | "topic": "phase" |
|
1507 | 1508 | }, |
|
1508 | 1509 | { |
|
1509 | 1510 | "summary": "roll back an interrupted transaction", |
|
1510 | 1511 | "topic": "recover" |
|
1511 | 1512 | }, |
|
1512 | 1513 | { |
|
1513 | 1514 | "summary": "rename files; equivalent of copy + remove", |
|
1514 | 1515 | "topic": "rename" |
|
1515 | 1516 | }, |
|
1516 | 1517 | { |
|
1517 | 1518 | "summary": "redo merges or set/view the merge status of files", |
|
1518 | 1519 | "topic": "resolve" |
|
1519 | 1520 | }, |
|
1520 | 1521 | { |
|
1521 | 1522 | "summary": "restore files to their checkout state", |
|
1522 | 1523 | "topic": "revert" |
|
1523 | 1524 | }, |
|
1524 | 1525 | { |
|
1525 | 1526 | "summary": "print the root (top) of the current working directory", |
|
1526 | 1527 | "topic": "root" |
|
1527 | 1528 | }, |
|
1528 | 1529 | { |
|
1529 | 1530 | "summary": "add one or more tags for the current or given revision", |
|
1530 | 1531 | "topic": "tag" |
|
1531 | 1532 | }, |
|
1532 | 1533 | { |
|
1533 | 1534 | "summary": "list repository tags", |
|
1534 | 1535 | "topic": "tags" |
|
1535 | 1536 | }, |
|
1536 | 1537 | { |
|
1537 | 1538 | "summary": "apply one or more changegroup files", |
|
1538 | 1539 | "topic": "unbundle" |
|
1539 | 1540 | }, |
|
1540 | 1541 | { |
|
1541 | 1542 | "summary": "verify the integrity of the repository", |
|
1542 | 1543 | "topic": "verify" |
|
1543 | 1544 | }, |
|
1544 | 1545 | { |
|
1545 | 1546 | "summary": "output version and copyright information", |
|
1546 | 1547 | "topic": "version" |
|
1547 | 1548 | } |
|
1548 | 1549 | ], |
|
1549 | 1550 | "topics": [ |
|
1550 | 1551 | { |
|
1551 | 1552 | "summary": "Configuration Files", |
|
1552 | 1553 | "topic": "config" |
|
1553 | 1554 | }, |
|
1554 | 1555 | { |
|
1555 | 1556 | "summary": "Date Formats", |
|
1556 | 1557 | "topic": "dates" |
|
1557 | 1558 | }, |
|
1558 | 1559 | { |
|
1559 | 1560 | "summary": "Diff Formats", |
|
1560 | 1561 | "topic": "diffs" |
|
1561 | 1562 | }, |
|
1562 | 1563 | { |
|
1563 | 1564 | "summary": "Environment Variables", |
|
1564 | 1565 | "topic": "environment" |
|
1565 | 1566 | }, |
|
1566 | 1567 | { |
|
1567 | 1568 | "summary": "Using Additional Features", |
|
1568 | 1569 | "topic": "extensions" |
|
1569 | 1570 | }, |
|
1570 | 1571 | { |
|
1571 | 1572 | "summary": "Specifying File Sets", |
|
1572 | 1573 | "topic": "filesets" |
|
1573 | 1574 | }, |
|
1574 | 1575 | { |
|
1575 | 1576 | "summary": "Glossary", |
|
1576 | 1577 | "topic": "glossary" |
|
1577 | 1578 | }, |
|
1578 | 1579 | { |
|
1579 | 1580 | "summary": "Syntax for Mercurial Ignore Files", |
|
1580 | 1581 | "topic": "hgignore" |
|
1581 | 1582 | }, |
|
1582 | 1583 | { |
|
1583 | 1584 | "summary": "Configuring hgweb", |
|
1584 | 1585 | "topic": "hgweb" |
|
1585 | 1586 | }, |
|
1586 | 1587 | { |
|
1587 | 1588 | "summary": "Technical implementation topics", |
|
1588 | 1589 | "topic": "internals" |
|
1589 | 1590 | }, |
|
1590 | 1591 | { |
|
1591 | 1592 | "summary": "Merge Tools", |
|
1592 | 1593 | "topic": "merge-tools" |
|
1593 | 1594 | }, |
|
1594 | 1595 | { |
|
1595 | 1596 | "summary": "Specifying Multiple Revisions", |
|
1596 | 1597 | "topic": "multirevs" |
|
1597 | 1598 | }, |
|
1598 | 1599 | { |
|
1599 | 1600 | "summary": "File Name Patterns", |
|
1600 | 1601 | "topic": "patterns" |
|
1601 | 1602 | }, |
|
1602 | 1603 | { |
|
1603 | 1604 | "summary": "Working with Phases", |
|
1604 | 1605 | "topic": "phases" |
|
1605 | 1606 | }, |
|
1606 | 1607 | { |
|
1607 | 1608 | "summary": "Specifying Single Revisions", |
|
1608 | 1609 | "topic": "revisions" |
|
1609 | 1610 | }, |
|
1610 | 1611 | { |
|
1611 | 1612 | "summary": "Specifying Revision Sets", |
|
1612 | 1613 | "topic": "revsets" |
|
1613 | 1614 | }, |
|
1614 | 1615 | { |
|
1615 | 1616 | "summary": "Using Mercurial from scripts and automation", |
|
1616 | 1617 | "topic": "scripting" |
|
1617 | 1618 | }, |
|
1618 | 1619 | { |
|
1619 | 1620 | "summary": "Subrepositories", |
|
1620 | 1621 | "topic": "subrepos" |
|
1621 | 1622 | }, |
|
1622 | 1623 | { |
|
1623 | 1624 | "summary": "Template Usage", |
|
1624 | 1625 | "topic": "templating" |
|
1625 | 1626 | }, |
|
1626 | 1627 | { |
|
1627 | 1628 | "summary": "URL Paths", |
|
1628 | 1629 | "topic": "urls" |
|
1629 | 1630 | } |
|
1630 | 1631 | ] |
|
1631 | 1632 | } |
|
1632 | 1633 | |
|
1633 | 1634 | help/{topic} shows an individual help topic |
|
1634 | 1635 | |
|
1635 | 1636 | $ request json-help/phases |
|
1636 | 1637 | 200 Script output follows |
|
1637 | 1638 | |
|
1638 | 1639 | { |
|
1639 | 1640 | "rawdoc": "Working with Phases\n*", (glob) |
|
1640 | 1641 | "topic": "phases" |
|
1641 | 1642 | } |
@@ -1,1404 +1,1619 | |||
|
1 | 1 | #require serve |
|
2 | 2 | |
|
3 | 3 | hide outer repo and work in dir without '.hg' |
|
4 | 4 | $ hg init |
|
5 | 5 | $ mkdir dir |
|
6 | 6 | $ cd dir |
|
7 | 7 | |
|
8 | 8 | Tests some basic hgwebdir functionality. Tests setting up paths and |
|
9 | 9 | collection, different forms of 404s and the subdirectory support. |
|
10 | 10 | |
|
11 | 11 | $ mkdir webdir |
|
12 | 12 | $ cd webdir |
|
13 | 13 | $ hg init a |
|
14 | 14 | $ echo a > a/a |
|
15 | 15 | $ hg --cwd a ci -Ama -d'1 0' |
|
16 | 16 | adding a |
|
17 | 17 | |
|
18 | 18 | create a mercurial queue repository |
|
19 | 19 | |
|
20 | 20 | $ hg --cwd a qinit --config extensions.hgext.mq= -c |
|
21 | 21 | $ hg init b |
|
22 | 22 | $ echo b > b/b |
|
23 | 23 | $ hg --cwd b ci -Amb -d'2 0' |
|
24 | 24 | adding b |
|
25 | 25 | |
|
26 | 26 | create a nested repository |
|
27 | 27 | |
|
28 | 28 | $ cd b |
|
29 | 29 | $ hg init d |
|
30 | 30 | $ echo d > d/d |
|
31 | 31 | $ hg --cwd d ci -Amd -d'3 0' |
|
32 | 32 | adding d |
|
33 | 33 | $ cd .. |
|
34 | 34 | $ hg init c |
|
35 | 35 | $ echo c > c/c |
|
36 | 36 | $ hg --cwd c ci -Amc -d'3 0' |
|
37 | 37 | adding c |
|
38 | 38 | |
|
39 | 39 | create a subdirectory containing repositories and subrepositories |
|
40 | 40 | |
|
41 | 41 | $ mkdir notrepo |
|
42 | 42 | $ cd notrepo |
|
43 | 43 | $ hg init e |
|
44 | 44 | $ echo e > e/e |
|
45 | 45 | $ hg --cwd e ci -Ame -d'4 0' |
|
46 | 46 | adding e |
|
47 | 47 | $ hg init e/e2 |
|
48 | 48 | $ echo e2 > e/e2/e2 |
|
49 | 49 | $ hg --cwd e/e2 ci -Ame2 -d '4 0' |
|
50 | 50 | adding e2 |
|
51 | 51 | $ hg init f |
|
52 | 52 | $ echo f > f/f |
|
53 | 53 | $ hg --cwd f ci -Amf -d'4 0' |
|
54 | 54 | adding f |
|
55 | 55 | $ hg init f/f2 |
|
56 | 56 | $ echo f2 > f/f2/f2 |
|
57 | 57 | $ hg --cwd f/f2 ci -Amf2 -d '4 0' |
|
58 | 58 | adding f2 |
|
59 | 59 | $ echo 'f2 = f2' > f/.hgsub |
|
60 | 60 | $ hg -R f ci -Am 'add subrepo' -d'4 0' |
|
61 | 61 | adding .hgsub |
|
62 | 62 | $ cat >> f/.hg/hgrc << EOF |
|
63 | 63 | > [web] |
|
64 | 64 | > name = fancy name for repo f |
|
65 | > labels = foo, bar | |
|
65 | 66 | > EOF |
|
66 | 67 | $ cd .. |
|
67 | 68 | |
|
68 | 69 | create repository without .hg/store |
|
69 | 70 | |
|
70 | 71 | $ hg init nostore |
|
71 | 72 | $ rm -R nostore/.hg/store |
|
72 | 73 | $ root=`pwd` |
|
73 | 74 | $ cd .. |
|
74 | 75 | |
|
75 | 76 | serve |
|
76 | 77 | $ cat > paths.conf <<EOF |
|
77 | 78 | > [paths] |
|
78 | 79 | > a=$root/a |
|
79 | 80 | > b=$root/b |
|
80 | 81 | > EOF |
|
81 | 82 | $ hg serve -p $HGPORT -d --pid-file=hg.pid --webdir-conf paths.conf \ |
|
82 | 83 | > -A access-paths.log -E error-paths-1.log |
|
83 | 84 | $ cat hg.pid >> $DAEMON_PIDS |
|
84 | 85 | |
|
85 | 86 | should give a 404 - file does not exist |
|
86 | 87 | |
|
87 | 88 | $ get-with-headers.py localhost:$HGPORT 'a/file/tip/bork?style=raw' |
|
88 | 89 | 404 Not Found |
|
89 | 90 | |
|
90 | 91 | |
|
91 | 92 | error: bork@8580ff50825a: not found in manifest |
|
92 | 93 | [1] |
|
93 | 94 | |
|
94 | 95 | should succeed |
|
95 | 96 | |
|
96 | 97 | $ get-with-headers.py localhost:$HGPORT '?style=raw' |
|
97 | 98 | 200 Script output follows |
|
98 | 99 | |
|
99 | 100 | |
|
100 | 101 | /a/ |
|
101 | 102 | /b/ |
|
102 | 103 | |
|
103 | 104 | $ get-with-headers.py localhost:$HGPORT '?style=json' |
|
104 | 105 | 200 Script output follows |
|
105 | 106 | |
|
106 | 107 | { |
|
107 | 108 | "entries": [{ |
|
108 | 109 | "name": "a", |
|
109 | 110 | "description": "unknown", |
|
110 | 111 | "contact": "Foo Bar \u003cfoo.bar@example.com\u003e", |
|
111 | "lastchange": [*, *] (glob) | |
|
112 | "lastchange": [*, *], (glob) | |
|
113 | "labels": [] | |
|
112 | 114 | }, { |
|
113 | 115 | "name": "b", |
|
114 | 116 | "description": "unknown", |
|
115 | 117 | "contact": "Foo Bar \u003cfoo.bar@example.com\u003e", |
|
116 | "lastchange": [*, *] (glob) | |
|
118 | "lastchange": [*, *], (glob) | |
|
119 | "labels": [] | |
|
117 | 120 | }] |
|
118 | 121 | } (no-eol) |
|
119 | 122 | |
|
120 | 123 | $ get-with-headers.py localhost:$HGPORT 'a/file/tip/a?style=raw' |
|
121 | 124 | 200 Script output follows |
|
122 | 125 | |
|
123 | 126 | a |
|
124 | 127 | $ get-with-headers.py localhost:$HGPORT 'b/file/tip/b?style=raw' |
|
125 | 128 | 200 Script output follows |
|
126 | 129 | |
|
127 | 130 | b |
|
128 | 131 | |
|
129 | 132 | should give a 404 - repo is not published |
|
130 | 133 | |
|
131 | 134 | $ get-with-headers.py localhost:$HGPORT 'c/file/tip/c?style=raw' |
|
132 | 135 | 404 Not Found |
|
133 | 136 | |
|
134 | 137 | |
|
135 | 138 | error: repository c/file/tip/c not found |
|
136 | 139 | [1] |
|
137 | 140 | |
|
138 | 141 | atom-log without basedir |
|
139 | 142 | |
|
140 | 143 | $ get-with-headers.py localhost:$HGPORT 'a/atom-log' | grep '<link' |
|
141 | 144 | <link rel="self" href="http://*:$HGPORT/a/atom-log"/> (glob) |
|
142 | 145 | <link rel="alternate" href="http://*:$HGPORT/a/"/> (glob) |
|
143 | 146 | <link href="http://*:$HGPORT/a/rev/8580ff50825a"/> (glob) |
|
144 | 147 | |
|
145 | 148 | rss-log without basedir |
|
146 | 149 | |
|
147 | 150 | $ get-with-headers.py localhost:$HGPORT 'a/rss-log' | grep '<guid' |
|
148 | 151 | <guid isPermaLink="true">http://*:$HGPORT/a/rev/8580ff50825a</guid> (glob) |
|
149 | 152 | $ cat > paths.conf <<EOF |
|
150 | 153 | > [paths] |
|
151 | 154 | > t/a/=$root/a |
|
152 | 155 | > b=$root/b |
|
153 | 156 | > coll=$root/* |
|
154 | 157 | > rcoll=$root/** |
|
155 | 158 | > star=* |
|
156 | 159 | > starstar=** |
|
157 | 160 | > astar=webdir/a/* |
|
158 | 161 | > EOF |
|
159 | 162 | $ hg serve -p $HGPORT1 -d --pid-file=hg.pid --webdir-conf paths.conf \ |
|
160 | 163 | > -A access-paths.log -E error-paths-2.log |
|
161 | 164 | $ cat hg.pid >> $DAEMON_PIDS |
|
162 | 165 | |
|
163 | 166 | should succeed, slashy names |
|
164 | 167 | |
|
165 | 168 | $ get-with-headers.py localhost:$HGPORT1 '?style=raw' |
|
166 | 169 | 200 Script output follows |
|
167 | 170 | |
|
168 | 171 | |
|
169 | 172 | /t/a/ |
|
170 | 173 | /b/ |
|
171 | 174 | /coll/a/ |
|
172 | 175 | /coll/a/.hg/patches/ |
|
173 | 176 | /coll/b/ |
|
174 | 177 | /coll/c/ |
|
175 | 178 | /coll/notrepo/e/ |
|
176 | 179 | /coll/notrepo/f/ |
|
177 | 180 | /rcoll/a/ |
|
178 | 181 | /rcoll/a/.hg/patches/ |
|
179 | 182 | /rcoll/b/ |
|
180 | 183 | /rcoll/b/d/ |
|
181 | 184 | /rcoll/c/ |
|
182 | 185 | /rcoll/notrepo/e/ |
|
183 | 186 | /rcoll/notrepo/e/e2/ |
|
184 | 187 | /rcoll/notrepo/f/ |
|
185 | 188 | /rcoll/notrepo/f/f2/ |
|
186 | 189 | /star/webdir/a/ |
|
187 | 190 | /star/webdir/a/.hg/patches/ |
|
188 | 191 | /star/webdir/b/ |
|
189 | 192 | /star/webdir/c/ |
|
190 | 193 | /star/webdir/notrepo/e/ |
|
191 | 194 | /star/webdir/notrepo/f/ |
|
192 | 195 | /starstar/webdir/a/ |
|
193 | 196 | /starstar/webdir/a/.hg/patches/ |
|
194 | 197 | /starstar/webdir/b/ |
|
195 | 198 | /starstar/webdir/b/d/ |
|
196 | 199 | /starstar/webdir/c/ |
|
197 | 200 | /starstar/webdir/notrepo/e/ |
|
198 | 201 | /starstar/webdir/notrepo/e/e2/ |
|
199 | 202 | /starstar/webdir/notrepo/f/ |
|
200 | 203 | /starstar/webdir/notrepo/f/f2/ |
|
201 | 204 | /astar/ |
|
202 | 205 | /astar/.hg/patches/ |
|
203 | 206 | |
|
207 | ||
|
208 | $ get-with-headers.py localhost:$HGPORT1 '?style=json' | |
|
209 | 200 Script output follows | |
|
210 | ||
|
211 | { | |
|
212 | "entries": [{ | |
|
213 | "name": "t/a", | |
|
214 | "description": "unknown", | |
|
215 | "contact": "Foo Bar \u003cfoo.bar@example.com\u003e", | |
|
216 | "lastchange": [*, *], (glob) | |
|
217 | "labels": [] | |
|
218 | }, { | |
|
219 | "name": "b", | |
|
220 | "description": "unknown", | |
|
221 | "contact": "Foo Bar \u003cfoo.bar@example.com\u003e", | |
|
222 | "lastchange": [*, *], (glob) | |
|
223 | "labels": [] | |
|
224 | }, { | |
|
225 | "name": "coll/a", | |
|
226 | "description": "unknown", | |
|
227 | "contact": "Foo Bar \u003cfoo.bar@example.com\u003e", | |
|
228 | "lastchange": [*, *], (glob) | |
|
229 | "labels": [] | |
|
230 | }, { | |
|
231 | "name": "coll/a/.hg/patches", | |
|
232 | "description": "unknown", | |
|
233 | "contact": "Foo Bar \u003cfoo.bar@example.com\u003e", | |
|
234 | "lastchange": [*, *], (glob) | |
|
235 | "labels": [] | |
|
236 | }, { | |
|
237 | "name": "coll/b", | |
|
238 | "description": "unknown", | |
|
239 | "contact": "Foo Bar \u003cfoo.bar@example.com\u003e", | |
|
240 | "lastchange": [*, *], (glob) | |
|
241 | "labels": [] | |
|
242 | }, { | |
|
243 | "name": "coll/c", | |
|
244 | "description": "unknown", | |
|
245 | "contact": "Foo Bar \u003cfoo.bar@example.com\u003e", | |
|
246 | "lastchange": [*, *], (glob) | |
|
247 | "labels": [] | |
|
248 | }, { | |
|
249 | "name": "coll/notrepo/e", | |
|
250 | "description": "unknown", | |
|
251 | "contact": "Foo Bar \u003cfoo.bar@example.com\u003e", | |
|
252 | "lastchange": [*, *], (glob) | |
|
253 | "labels": [] | |
|
254 | }, { | |
|
255 | "name": "fancy name for repo f", | |
|
256 | "description": "unknown", | |
|
257 | "contact": "Foo Bar \u003cfoo.bar@example.com\u003e", | |
|
258 | "lastchange": [*, *], (glob) | |
|
259 | "labels": ["foo", "bar"] | |
|
260 | }, { | |
|
261 | "name": "rcoll/a", | |
|
262 | "description": "unknown", | |
|
263 | "contact": "Foo Bar \u003cfoo.bar@example.com\u003e", | |
|
264 | "lastchange": [*, *], (glob) | |
|
265 | "labels": [] | |
|
266 | }, { | |
|
267 | "name": "rcoll/a/.hg/patches", | |
|
268 | "description": "unknown", | |
|
269 | "contact": "Foo Bar \u003cfoo.bar@example.com\u003e", | |
|
270 | "lastchange": [*, *], (glob) | |
|
271 | "labels": [] | |
|
272 | }, { | |
|
273 | "name": "rcoll/b", | |
|
274 | "description": "unknown", | |
|
275 | "contact": "Foo Bar \u003cfoo.bar@example.com\u003e", | |
|
276 | "lastchange": [*, *], (glob) | |
|
277 | "labels": [] | |
|
278 | }, { | |
|
279 | "name": "rcoll/b/d", | |
|
280 | "description": "unknown", | |
|
281 | "contact": "Foo Bar \u003cfoo.bar@example.com\u003e", | |
|
282 | "lastchange": [*, *], (glob) | |
|
283 | "labels": [] | |
|
284 | }, { | |
|
285 | "name": "rcoll/c", | |
|
286 | "description": "unknown", | |
|
287 | "contact": "Foo Bar \u003cfoo.bar@example.com\u003e", | |
|
288 | "lastchange": [*, *], (glob) | |
|
289 | "labels": [] | |
|
290 | }, { | |
|
291 | "name": "rcoll/notrepo/e", | |
|
292 | "description": "unknown", | |
|
293 | "contact": "Foo Bar \u003cfoo.bar@example.com\u003e", | |
|
294 | "lastchange": [*, *], (glob) | |
|
295 | "labels": [] | |
|
296 | }, { | |
|
297 | "name": "rcoll/notrepo/e/e2", | |
|
298 | "description": "unknown", | |
|
299 | "contact": "Foo Bar \u003cfoo.bar@example.com\u003e", | |
|
300 | "lastchange": [*, *], (glob) | |
|
301 | "labels": [] | |
|
302 | }, { | |
|
303 | "name": "fancy name for repo f", | |
|
304 | "description": "unknown", | |
|
305 | "contact": "Foo Bar \u003cfoo.bar@example.com\u003e", | |
|
306 | "lastchange": [*, *], (glob) | |
|
307 | "labels": ["foo", "bar"] | |
|
308 | }, { | |
|
309 | "name": "rcoll/notrepo/f/f2", | |
|
310 | "description": "unknown", | |
|
311 | "contact": "Foo Bar \u003cfoo.bar@example.com\u003e", | |
|
312 | "lastchange": [*, *], (glob) | |
|
313 | "labels": [] | |
|
314 | }, { | |
|
315 | "name": "star/webdir/a", | |
|
316 | "description": "unknown", | |
|
317 | "contact": "Foo Bar \u003cfoo.bar@example.com\u003e", | |
|
318 | "lastchange": [*, *], (glob) | |
|
319 | "labels": [] | |
|
320 | }, { | |
|
321 | "name": "star/webdir/a/.hg/patches", | |
|
322 | "description": "unknown", | |
|
323 | "contact": "Foo Bar \u003cfoo.bar@example.com\u003e", | |
|
324 | "lastchange": [*, *], (glob) | |
|
325 | "labels": [] | |
|
326 | }, { | |
|
327 | "name": "star/webdir/b", | |
|
328 | "description": "unknown", | |
|
329 | "contact": "Foo Bar \u003cfoo.bar@example.com\u003e", | |
|
330 | "lastchange": [*, *], (glob) | |
|
331 | "labels": [] | |
|
332 | }, { | |
|
333 | "name": "star/webdir/c", | |
|
334 | "description": "unknown", | |
|
335 | "contact": "Foo Bar \u003cfoo.bar@example.com\u003e", | |
|
336 | "lastchange": [*, *], (glob) | |
|
337 | "labels": [] | |
|
338 | }, { | |
|
339 | "name": "star/webdir/notrepo/e", | |
|
340 | "description": "unknown", | |
|
341 | "contact": "Foo Bar \u003cfoo.bar@example.com\u003e", | |
|
342 | "lastchange": [*, *], (glob) | |
|
343 | "labels": [] | |
|
344 | }, { | |
|
345 | "name": "fancy name for repo f", | |
|
346 | "description": "unknown", | |
|
347 | "contact": "Foo Bar \u003cfoo.bar@example.com\u003e", | |
|
348 | "lastchange": [*, *], (glob) | |
|
349 | "labels": ["foo", "bar"] | |
|
350 | }, { | |
|
351 | "name": "starstar/webdir/a", | |
|
352 | "description": "unknown", | |
|
353 | "contact": "Foo Bar \u003cfoo.bar@example.com\u003e", | |
|
354 | "lastchange": [*, *], (glob) | |
|
355 | "labels": [] | |
|
356 | }, { | |
|
357 | "name": "starstar/webdir/a/.hg/patches", | |
|
358 | "description": "unknown", | |
|
359 | "contact": "Foo Bar \u003cfoo.bar@example.com\u003e", | |
|
360 | "lastchange": [*, *], (glob) | |
|
361 | "labels": [] | |
|
362 | }, { | |
|
363 | "name": "starstar/webdir/b", | |
|
364 | "description": "unknown", | |
|
365 | "contact": "Foo Bar \u003cfoo.bar@example.com\u003e", | |
|
366 | "lastchange": [*, *], (glob) | |
|
367 | "labels": [] | |
|
368 | }, { | |
|
369 | "name": "starstar/webdir/b/d", | |
|
370 | "description": "unknown", | |
|
371 | "contact": "Foo Bar \u003cfoo.bar@example.com\u003e", | |
|
372 | "lastchange": [*, *], (glob) | |
|
373 | "labels": [] | |
|
374 | }, { | |
|
375 | "name": "starstar/webdir/c", | |
|
376 | "description": "unknown", | |
|
377 | "contact": "Foo Bar \u003cfoo.bar@example.com\u003e", | |
|
378 | "lastchange": [*, *], (glob) | |
|
379 | "labels": [] | |
|
380 | }, { | |
|
381 | "name": "starstar/webdir/notrepo/e", | |
|
382 | "description": "unknown", | |
|
383 | "contact": "Foo Bar \u003cfoo.bar@example.com\u003e", | |
|
384 | "lastchange": [*, *], (glob) | |
|
385 | "labels": [] | |
|
386 | }, { | |
|
387 | "name": "starstar/webdir/notrepo/e/e2", | |
|
388 | "description": "unknown", | |
|
389 | "contact": "Foo Bar \u003cfoo.bar@example.com\u003e", | |
|
390 | "lastchange": [*, *], (glob) | |
|
391 | "labels": [] | |
|
392 | }, { | |
|
393 | "name": "fancy name for repo f", | |
|
394 | "description": "unknown", | |
|
395 | "contact": "Foo Bar \u003cfoo.bar@example.com\u003e", | |
|
396 | "lastchange": [*, *], (glob) | |
|
397 | "labels": ["foo", "bar"] | |
|
398 | }, { | |
|
399 | "name": "starstar/webdir/notrepo/f/f2", | |
|
400 | "description": "unknown", | |
|
401 | "contact": "Foo Bar \u003cfoo.bar@example.com\u003e", | |
|
402 | "lastchange": [*, *], (glob) | |
|
403 | "labels": [] | |
|
404 | }, { | |
|
405 | "name": "astar", | |
|
406 | "description": "unknown", | |
|
407 | "contact": "Foo Bar \u003cfoo.bar@example.com\u003e", | |
|
408 | "lastchange": [*, *], (glob) | |
|
409 | "labels": [] | |
|
410 | }, { | |
|
411 | "name": "astar/.hg/patches", | |
|
412 | "description": "unknown", | |
|
413 | "contact": "Foo Bar \u003cfoo.bar@example.com\u003e", | |
|
414 | "lastchange": [*, *], (glob) | |
|
415 | "labels": [] | |
|
416 | }] | |
|
417 | } (no-eol) | |
|
418 | ||
|
204 | 419 | $ get-with-headers.py localhost:$HGPORT1 '?style=paper' |
|
205 | 420 | 200 Script output follows |
|
206 | 421 | |
|
207 | 422 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> |
|
208 | 423 | <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US"> |
|
209 | 424 | <head> |
|
210 | 425 | <link rel="icon" href="/static/hgicon.png" type="image/png" /> |
|
211 | 426 | <meta name="robots" content="index, nofollow" /> |
|
212 | 427 | <link rel="stylesheet" href="/static/style-paper.css" type="text/css" /> |
|
213 | 428 | <script type="text/javascript" src="/static/mercurial.js"></script> |
|
214 | 429 | |
|
215 | 430 | <title>Mercurial repositories index</title> |
|
216 | 431 | </head> |
|
217 | 432 | <body> |
|
218 | 433 | |
|
219 | 434 | <div class="container"> |
|
220 | 435 | <div class="menu"> |
|
221 | 436 | <a href="https://mercurial-scm.org/"> |
|
222 | 437 | <img src="/static/hglogo.png" width=75 height=90 border=0 alt="mercurial" /></a> |
|
223 | 438 | </div> |
|
224 | 439 | <div class="main"> |
|
225 | 440 | <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2> |
|
226 | 441 | |
|
227 | 442 | <table class="bigtable"> |
|
228 | 443 | <thead> |
|
229 | 444 | <tr> |
|
230 | 445 | <th><a href="?sort=name">Name</a></th> |
|
231 | 446 | <th><a href="?sort=description">Description</a></th> |
|
232 | 447 | <th><a href="?sort=contact">Contact</a></th> |
|
233 | 448 | <th><a href="?sort=lastchange">Last modified</a></th> |
|
234 | 449 | <th> </th> |
|
235 | 450 | <th> </th> |
|
236 | 451 | </tr> |
|
237 | 452 | </thead> |
|
238 | 453 | <tbody class="stripes2"> |
|
239 | 454 | |
|
240 | 455 | <tr> |
|
241 | 456 | <td><a href="/t/a/?style=paper">t/a</a></td> |
|
242 | 457 | <td>unknown</td> |
|
243 | 458 | <td>Foo Bar <foo.bar@example.com></td> |
|
244 | 459 | <td class="age">*</td> (glob) |
|
245 | 460 | <td class="indexlinks"></td> |
|
246 | 461 | <td> |
|
247 | 462 | <a href="/t/a/atom-log" title="subscribe to repository atom feed"> |
|
248 | 463 | <img class="atom-logo" src="/static/feed-icon-14x14.png" alt="subscribe to repository atom feed"> |
|
249 | 464 | </a> |
|
250 | 465 | </td> |
|
251 | 466 | </tr> |
|
252 | 467 | |
|
253 | 468 | <tr> |
|
254 | 469 | <td><a href="/b/?style=paper">b</a></td> |
|
255 | 470 | <td>unknown</td> |
|
256 | 471 | <td>Foo Bar <foo.bar@example.com></td> |
|
257 | 472 | <td class="age">*</td> (glob) |
|
258 | 473 | <td class="indexlinks"></td> |
|
259 | 474 | <td> |
|
260 | 475 | <a href="/b/atom-log" title="subscribe to repository atom feed"> |
|
261 | 476 | <img class="atom-logo" src="/static/feed-icon-14x14.png" alt="subscribe to repository atom feed"> |
|
262 | 477 | </a> |
|
263 | 478 | </td> |
|
264 | 479 | </tr> |
|
265 | 480 | |
|
266 | 481 | <tr> |
|
267 | 482 | <td><a href="/coll/a/?style=paper">coll/a</a></td> |
|
268 | 483 | <td>unknown</td> |
|
269 | 484 | <td>Foo Bar <foo.bar@example.com></td> |
|
270 | 485 | <td class="age">*</td> (glob) |
|
271 | 486 | <td class="indexlinks"></td> |
|
272 | 487 | <td> |
|
273 | 488 | <a href="/coll/a/atom-log" title="subscribe to repository atom feed"> |
|
274 | 489 | <img class="atom-logo" src="/static/feed-icon-14x14.png" alt="subscribe to repository atom feed"> |
|
275 | 490 | </a> |
|
276 | 491 | </td> |
|
277 | 492 | </tr> |
|
278 | 493 | |
|
279 | 494 | <tr> |
|
280 | 495 | <td><a href="/coll/a/.hg/patches/?style=paper">coll/a/.hg/patches</a></td> |
|
281 | 496 | <td>unknown</td> |
|
282 | 497 | <td>Foo Bar <foo.bar@example.com></td> |
|
283 | 498 | <td class="age">*</td> (glob) |
|
284 | 499 | <td class="indexlinks"></td> |
|
285 | 500 | <td> |
|
286 | 501 | <a href="/coll/a/.hg/patches/atom-log" title="subscribe to repository atom feed"> |
|
287 | 502 | <img class="atom-logo" src="/static/feed-icon-14x14.png" alt="subscribe to repository atom feed"> |
|
288 | 503 | </a> |
|
289 | 504 | </td> |
|
290 | 505 | </tr> |
|
291 | 506 | |
|
292 | 507 | <tr> |
|
293 | 508 | <td><a href="/coll/b/?style=paper">coll/b</a></td> |
|
294 | 509 | <td>unknown</td> |
|
295 | 510 | <td>Foo Bar <foo.bar@example.com></td> |
|
296 | 511 | <td class="age">*</td> (glob) |
|
297 | 512 | <td class="indexlinks"></td> |
|
298 | 513 | <td> |
|
299 | 514 | <a href="/coll/b/atom-log" title="subscribe to repository atom feed"> |
|
300 | 515 | <img class="atom-logo" src="/static/feed-icon-14x14.png" alt="subscribe to repository atom feed"> |
|
301 | 516 | </a> |
|
302 | 517 | </td> |
|
303 | 518 | </tr> |
|
304 | 519 | |
|
305 | 520 | <tr> |
|
306 | 521 | <td><a href="/coll/c/?style=paper">coll/c</a></td> |
|
307 | 522 | <td>unknown</td> |
|
308 | 523 | <td>Foo Bar <foo.bar@example.com></td> |
|
309 | 524 | <td class="age">*</td> (glob) |
|
310 | 525 | <td class="indexlinks"></td> |
|
311 | 526 | <td> |
|
312 | 527 | <a href="/coll/c/atom-log" title="subscribe to repository atom feed"> |
|
313 | 528 | <img class="atom-logo" src="/static/feed-icon-14x14.png" alt="subscribe to repository atom feed"> |
|
314 | 529 | </a> |
|
315 | 530 | </td> |
|
316 | 531 | </tr> |
|
317 | 532 | |
|
318 | 533 | <tr> |
|
319 | 534 | <td><a href="/coll/notrepo/e/?style=paper">coll/notrepo/e</a></td> |
|
320 | 535 | <td>unknown</td> |
|
321 | 536 | <td>Foo Bar <foo.bar@example.com></td> |
|
322 | 537 | <td class="age">*</td> (glob) |
|
323 | 538 | <td class="indexlinks"></td> |
|
324 | 539 | <td> |
|
325 | 540 | <a href="/coll/notrepo/e/atom-log" title="subscribe to repository atom feed"> |
|
326 | 541 | <img class="atom-logo" src="/static/feed-icon-14x14.png" alt="subscribe to repository atom feed"> |
|
327 | 542 | </a> |
|
328 | 543 | </td> |
|
329 | 544 | </tr> |
|
330 | 545 | |
|
331 | 546 | <tr> |
|
332 | 547 | <td><a href="/coll/notrepo/f/?style=paper">fancy name for repo f</a></td> |
|
333 | 548 | <td>unknown</td> |
|
334 | 549 | <td>Foo Bar <foo.bar@example.com></td> |
|
335 | 550 | <td class="age">*</td> (glob) |
|
336 | 551 | <td class="indexlinks"></td> |
|
337 | 552 | <td> |
|
338 | 553 | <a href="/coll/notrepo/f/atom-log" title="subscribe to repository atom feed"> |
|
339 | 554 | <img class="atom-logo" src="/static/feed-icon-14x14.png" alt="subscribe to repository atom feed"> |
|
340 | 555 | </a> |
|
341 | 556 | </td> |
|
342 | 557 | </tr> |
|
343 | 558 | |
|
344 | 559 | <tr> |
|
345 | 560 | <td><a href="/rcoll/a/?style=paper">rcoll/a</a></td> |
|
346 | 561 | <td>unknown</td> |
|
347 | 562 | <td>Foo Bar <foo.bar@example.com></td> |
|
348 | 563 | <td class="age">*</td> (glob) |
|
349 | 564 | <td class="indexlinks"></td> |
|
350 | 565 | <td> |
|
351 | 566 | <a href="/rcoll/a/atom-log" title="subscribe to repository atom feed"> |
|
352 | 567 | <img class="atom-logo" src="/static/feed-icon-14x14.png" alt="subscribe to repository atom feed"> |
|
353 | 568 | </a> |
|
354 | 569 | </td> |
|
355 | 570 | </tr> |
|
356 | 571 | |
|
357 | 572 | <tr> |
|
358 | 573 | <td><a href="/rcoll/a/.hg/patches/?style=paper">rcoll/a/.hg/patches</a></td> |
|
359 | 574 | <td>unknown</td> |
|
360 | 575 | <td>Foo Bar <foo.bar@example.com></td> |
|
361 | 576 | <td class="age">*</td> (glob) |
|
362 | 577 | <td class="indexlinks"></td> |
|
363 | 578 | <td> |
|
364 | 579 | <a href="/rcoll/a/.hg/patches/atom-log" title="subscribe to repository atom feed"> |
|
365 | 580 | <img class="atom-logo" src="/static/feed-icon-14x14.png" alt="subscribe to repository atom feed"> |
|
366 | 581 | </a> |
|
367 | 582 | </td> |
|
368 | 583 | </tr> |
|
369 | 584 | |
|
370 | 585 | <tr> |
|
371 | 586 | <td><a href="/rcoll/b/?style=paper">rcoll/b</a></td> |
|
372 | 587 | <td>unknown</td> |
|
373 | 588 | <td>Foo Bar <foo.bar@example.com></td> |
|
374 | 589 | <td class="age">*</td> (glob) |
|
375 | 590 | <td class="indexlinks"></td> |
|
376 | 591 | <td> |
|
377 | 592 | <a href="/rcoll/b/atom-log" title="subscribe to repository atom feed"> |
|
378 | 593 | <img class="atom-logo" src="/static/feed-icon-14x14.png" alt="subscribe to repository atom feed"> |
|
379 | 594 | </a> |
|
380 | 595 | </td> |
|
381 | 596 | </tr> |
|
382 | 597 | |
|
383 | 598 | <tr> |
|
384 | 599 | <td><a href="/rcoll/b/d/?style=paper">rcoll/b/d</a></td> |
|
385 | 600 | <td>unknown</td> |
|
386 | 601 | <td>Foo Bar <foo.bar@example.com></td> |
|
387 | 602 | <td class="age">*</td> (glob) |
|
388 | 603 | <td class="indexlinks"></td> |
|
389 | 604 | <td> |
|
390 | 605 | <a href="/rcoll/b/d/atom-log" title="subscribe to repository atom feed"> |
|
391 | 606 | <img class="atom-logo" src="/static/feed-icon-14x14.png" alt="subscribe to repository atom feed"> |
|
392 | 607 | </a> |
|
393 | 608 | </td> |
|
394 | 609 | </tr> |
|
395 | 610 | |
|
396 | 611 | <tr> |
|
397 | 612 | <td><a href="/rcoll/c/?style=paper">rcoll/c</a></td> |
|
398 | 613 | <td>unknown</td> |
|
399 | 614 | <td>Foo Bar <foo.bar@example.com></td> |
|
400 | 615 | <td class="age">*</td> (glob) |
|
401 | 616 | <td class="indexlinks"></td> |
|
402 | 617 | <td> |
|
403 | 618 | <a href="/rcoll/c/atom-log" title="subscribe to repository atom feed"> |
|
404 | 619 | <img class="atom-logo" src="/static/feed-icon-14x14.png" alt="subscribe to repository atom feed"> |
|
405 | 620 | </a> |
|
406 | 621 | </td> |
|
407 | 622 | </tr> |
|
408 | 623 | |
|
409 | 624 | <tr> |
|
410 | 625 | <td><a href="/rcoll/notrepo/e/?style=paper">rcoll/notrepo/e</a></td> |
|
411 | 626 | <td>unknown</td> |
|
412 | 627 | <td>Foo Bar <foo.bar@example.com></td> |
|
413 | 628 | <td class="age">*</td> (glob) |
|
414 | 629 | <td class="indexlinks"></td> |
|
415 | 630 | <td> |
|
416 | 631 | <a href="/rcoll/notrepo/e/atom-log" title="subscribe to repository atom feed"> |
|
417 | 632 | <img class="atom-logo" src="/static/feed-icon-14x14.png" alt="subscribe to repository atom feed"> |
|
418 | 633 | </a> |
|
419 | 634 | </td> |
|
420 | 635 | </tr> |
|
421 | 636 | |
|
422 | 637 | <tr> |
|
423 | 638 | <td><a href="/rcoll/notrepo/e/e2/?style=paper">rcoll/notrepo/e/e2</a></td> |
|
424 | 639 | <td>unknown</td> |
|
425 | 640 | <td>Foo Bar <foo.bar@example.com></td> |
|
426 | 641 | <td class="age">*</td> (glob) |
|
427 | 642 | <td class="indexlinks"></td> |
|
428 | 643 | <td> |
|
429 | 644 | <a href="/rcoll/notrepo/e/e2/atom-log" title="subscribe to repository atom feed"> |
|
430 | 645 | <img class="atom-logo" src="/static/feed-icon-14x14.png" alt="subscribe to repository atom feed"> |
|
431 | 646 | </a> |
|
432 | 647 | </td> |
|
433 | 648 | </tr> |
|
434 | 649 | |
|
435 | 650 | <tr> |
|
436 | 651 | <td><a href="/rcoll/notrepo/f/?style=paper">fancy name for repo f</a></td> |
|
437 | 652 | <td>unknown</td> |
|
438 | 653 | <td>Foo Bar <foo.bar@example.com></td> |
|
439 | 654 | <td class="age">*</td> (glob) |
|
440 | 655 | <td class="indexlinks"></td> |
|
441 | 656 | <td> |
|
442 | 657 | <a href="/rcoll/notrepo/f/atom-log" title="subscribe to repository atom feed"> |
|
443 | 658 | <img class="atom-logo" src="/static/feed-icon-14x14.png" alt="subscribe to repository atom feed"> |
|
444 | 659 | </a> |
|
445 | 660 | </td> |
|
446 | 661 | </tr> |
|
447 | 662 | |
|
448 | 663 | <tr> |
|
449 | 664 | <td><a href="/rcoll/notrepo/f/f2/?style=paper">rcoll/notrepo/f/f2</a></td> |
|
450 | 665 | <td>unknown</td> |
|
451 | 666 | <td>Foo Bar <foo.bar@example.com></td> |
|
452 | 667 | <td class="age">*</td> (glob) |
|
453 | 668 | <td class="indexlinks"></td> |
|
454 | 669 | <td> |
|
455 | 670 | <a href="/rcoll/notrepo/f/f2/atom-log" title="subscribe to repository atom feed"> |
|
456 | 671 | <img class="atom-logo" src="/static/feed-icon-14x14.png" alt="subscribe to repository atom feed"> |
|
457 | 672 | </a> |
|
458 | 673 | </td> |
|
459 | 674 | </tr> |
|
460 | 675 | |
|
461 | 676 | <tr> |
|
462 | 677 | <td><a href="/star/webdir/a/?style=paper">star/webdir/a</a></td> |
|
463 | 678 | <td>unknown</td> |
|
464 | 679 | <td>Foo Bar <foo.bar@example.com></td> |
|
465 | 680 | <td class="age">*</td> (glob) |
|
466 | 681 | <td class="indexlinks"></td> |
|
467 | 682 | <td> |
|
468 | 683 | <a href="/star/webdir/a/atom-log" title="subscribe to repository atom feed"> |
|
469 | 684 | <img class="atom-logo" src="/static/feed-icon-14x14.png" alt="subscribe to repository atom feed"> |
|
470 | 685 | </a> |
|
471 | 686 | </td> |
|
472 | 687 | </tr> |
|
473 | 688 | |
|
474 | 689 | <tr> |
|
475 | 690 | <td><a href="/star/webdir/a/.hg/patches/?style=paper">star/webdir/a/.hg/patches</a></td> |
|
476 | 691 | <td>unknown</td> |
|
477 | 692 | <td>Foo Bar <foo.bar@example.com></td> |
|
478 | 693 | <td class="age">*</td> (glob) |
|
479 | 694 | <td class="indexlinks"></td> |
|
480 | 695 | <td> |
|
481 | 696 | <a href="/star/webdir/a/.hg/patches/atom-log" title="subscribe to repository atom feed"> |
|
482 | 697 | <img class="atom-logo" src="/static/feed-icon-14x14.png" alt="subscribe to repository atom feed"> |
|
483 | 698 | </a> |
|
484 | 699 | </td> |
|
485 | 700 | </tr> |
|
486 | 701 | |
|
487 | 702 | <tr> |
|
488 | 703 | <td><a href="/star/webdir/b/?style=paper">star/webdir/b</a></td> |
|
489 | 704 | <td>unknown</td> |
|
490 | 705 | <td>Foo Bar <foo.bar@example.com></td> |
|
491 | 706 | <td class="age">*</td> (glob) |
|
492 | 707 | <td class="indexlinks"></td> |
|
493 | 708 | <td> |
|
494 | 709 | <a href="/star/webdir/b/atom-log" title="subscribe to repository atom feed"> |
|
495 | 710 | <img class="atom-logo" src="/static/feed-icon-14x14.png" alt="subscribe to repository atom feed"> |
|
496 | 711 | </a> |
|
497 | 712 | </td> |
|
498 | 713 | </tr> |
|
499 | 714 | |
|
500 | 715 | <tr> |
|
501 | 716 | <td><a href="/star/webdir/c/?style=paper">star/webdir/c</a></td> |
|
502 | 717 | <td>unknown</td> |
|
503 | 718 | <td>Foo Bar <foo.bar@example.com></td> |
|
504 | 719 | <td class="age">*</td> (glob) |
|
505 | 720 | <td class="indexlinks"></td> |
|
506 | 721 | <td> |
|
507 | 722 | <a href="/star/webdir/c/atom-log" title="subscribe to repository atom feed"> |
|
508 | 723 | <img class="atom-logo" src="/static/feed-icon-14x14.png" alt="subscribe to repository atom feed"> |
|
509 | 724 | </a> |
|
510 | 725 | </td> |
|
511 | 726 | </tr> |
|
512 | 727 | |
|
513 | 728 | <tr> |
|
514 | 729 | <td><a href="/star/webdir/notrepo/e/?style=paper">star/webdir/notrepo/e</a></td> |
|
515 | 730 | <td>unknown</td> |
|
516 | 731 | <td>Foo Bar <foo.bar@example.com></td> |
|
517 | 732 | <td class="age">*</td> (glob) |
|
518 | 733 | <td class="indexlinks"></td> |
|
519 | 734 | <td> |
|
520 | 735 | <a href="/star/webdir/notrepo/e/atom-log" title="subscribe to repository atom feed"> |
|
521 | 736 | <img class="atom-logo" src="/static/feed-icon-14x14.png" alt="subscribe to repository atom feed"> |
|
522 | 737 | </a> |
|
523 | 738 | </td> |
|
524 | 739 | </tr> |
|
525 | 740 | |
|
526 | 741 | <tr> |
|
527 | 742 | <td><a href="/star/webdir/notrepo/f/?style=paper">fancy name for repo f</a></td> |
|
528 | 743 | <td>unknown</td> |
|
529 | 744 | <td>Foo Bar <foo.bar@example.com></td> |
|
530 | 745 | <td class="age">*</td> (glob) |
|
531 | 746 | <td class="indexlinks"></td> |
|
532 | 747 | <td> |
|
533 | 748 | <a href="/star/webdir/notrepo/f/atom-log" title="subscribe to repository atom feed"> |
|
534 | 749 | <img class="atom-logo" src="/static/feed-icon-14x14.png" alt="subscribe to repository atom feed"> |
|
535 | 750 | </a> |
|
536 | 751 | </td> |
|
537 | 752 | </tr> |
|
538 | 753 | |
|
539 | 754 | <tr> |
|
540 | 755 | <td><a href="/starstar/webdir/a/?style=paper">starstar/webdir/a</a></td> |
|
541 | 756 | <td>unknown</td> |
|
542 | 757 | <td>Foo Bar <foo.bar@example.com></td> |
|
543 | 758 | <td class="age">*</td> (glob) |
|
544 | 759 | <td class="indexlinks"></td> |
|
545 | 760 | <td> |
|
546 | 761 | <a href="/starstar/webdir/a/atom-log" title="subscribe to repository atom feed"> |
|
547 | 762 | <img class="atom-logo" src="/static/feed-icon-14x14.png" alt="subscribe to repository atom feed"> |
|
548 | 763 | </a> |
|
549 | 764 | </td> |
|
550 | 765 | </tr> |
|
551 | 766 | |
|
552 | 767 | <tr> |
|
553 | 768 | <td><a href="/starstar/webdir/a/.hg/patches/?style=paper">starstar/webdir/a/.hg/patches</a></td> |
|
554 | 769 | <td>unknown</td> |
|
555 | 770 | <td>Foo Bar <foo.bar@example.com></td> |
|
556 | 771 | <td class="age">*</td> (glob) |
|
557 | 772 | <td class="indexlinks"></td> |
|
558 | 773 | <td> |
|
559 | 774 | <a href="/starstar/webdir/a/.hg/patches/atom-log" title="subscribe to repository atom feed"> |
|
560 | 775 | <img class="atom-logo" src="/static/feed-icon-14x14.png" alt="subscribe to repository atom feed"> |
|
561 | 776 | </a> |
|
562 | 777 | </td> |
|
563 | 778 | </tr> |
|
564 | 779 | |
|
565 | 780 | <tr> |
|
566 | 781 | <td><a href="/starstar/webdir/b/?style=paper">starstar/webdir/b</a></td> |
|
567 | 782 | <td>unknown</td> |
|
568 | 783 | <td>Foo Bar <foo.bar@example.com></td> |
|
569 | 784 | <td class="age">*</td> (glob) |
|
570 | 785 | <td class="indexlinks"></td> |
|
571 | 786 | <td> |
|
572 | 787 | <a href="/starstar/webdir/b/atom-log" title="subscribe to repository atom feed"> |
|
573 | 788 | <img class="atom-logo" src="/static/feed-icon-14x14.png" alt="subscribe to repository atom feed"> |
|
574 | 789 | </a> |
|
575 | 790 | </td> |
|
576 | 791 | </tr> |
|
577 | 792 | |
|
578 | 793 | <tr> |
|
579 | 794 | <td><a href="/starstar/webdir/b/d/?style=paper">starstar/webdir/b/d</a></td> |
|
580 | 795 | <td>unknown</td> |
|
581 | 796 | <td>Foo Bar <foo.bar@example.com></td> |
|
582 | 797 | <td class="age">*</td> (glob) |
|
583 | 798 | <td class="indexlinks"></td> |
|
584 | 799 | <td> |
|
585 | 800 | <a href="/starstar/webdir/b/d/atom-log" title="subscribe to repository atom feed"> |
|
586 | 801 | <img class="atom-logo" src="/static/feed-icon-14x14.png" alt="subscribe to repository atom feed"> |
|
587 | 802 | </a> |
|
588 | 803 | </td> |
|
589 | 804 | </tr> |
|
590 | 805 | |
|
591 | 806 | <tr> |
|
592 | 807 | <td><a href="/starstar/webdir/c/?style=paper">starstar/webdir/c</a></td> |
|
593 | 808 | <td>unknown</td> |
|
594 | 809 | <td>Foo Bar <foo.bar@example.com></td> |
|
595 | 810 | <td class="age">*</td> (glob) |
|
596 | 811 | <td class="indexlinks"></td> |
|
597 | 812 | <td> |
|
598 | 813 | <a href="/starstar/webdir/c/atom-log" title="subscribe to repository atom feed"> |
|
599 | 814 | <img class="atom-logo" src="/static/feed-icon-14x14.png" alt="subscribe to repository atom feed"> |
|
600 | 815 | </a> |
|
601 | 816 | </td> |
|
602 | 817 | </tr> |
|
603 | 818 | |
|
604 | 819 | <tr> |
|
605 | 820 | <td><a href="/starstar/webdir/notrepo/e/?style=paper">starstar/webdir/notrepo/e</a></td> |
|
606 | 821 | <td>unknown</td> |
|
607 | 822 | <td>Foo Bar <foo.bar@example.com></td> |
|
608 | 823 | <td class="age">*</td> (glob) |
|
609 | 824 | <td class="indexlinks"></td> |
|
610 | 825 | <td> |
|
611 | 826 | <a href="/starstar/webdir/notrepo/e/atom-log" title="subscribe to repository atom feed"> |
|
612 | 827 | <img class="atom-logo" src="/static/feed-icon-14x14.png" alt="subscribe to repository atom feed"> |
|
613 | 828 | </a> |
|
614 | 829 | </td> |
|
615 | 830 | </tr> |
|
616 | 831 | |
|
617 | 832 | <tr> |
|
618 | 833 | <td><a href="/starstar/webdir/notrepo/e/e2/?style=paper">starstar/webdir/notrepo/e/e2</a></td> |
|
619 | 834 | <td>unknown</td> |
|
620 | 835 | <td>Foo Bar <foo.bar@example.com></td> |
|
621 | 836 | <td class="age">*</td> (glob) |
|
622 | 837 | <td class="indexlinks"></td> |
|
623 | 838 | <td> |
|
624 | 839 | <a href="/starstar/webdir/notrepo/e/e2/atom-log" title="subscribe to repository atom feed"> |
|
625 | 840 | <img class="atom-logo" src="/static/feed-icon-14x14.png" alt="subscribe to repository atom feed"> |
|
626 | 841 | </a> |
|
627 | 842 | </td> |
|
628 | 843 | </tr> |
|
629 | 844 | |
|
630 | 845 | <tr> |
|
631 | 846 | <td><a href="/starstar/webdir/notrepo/f/?style=paper">fancy name for repo f</a></td> |
|
632 | 847 | <td>unknown</td> |
|
633 | 848 | <td>Foo Bar <foo.bar@example.com></td> |
|
634 | 849 | <td class="age">*</td> (glob) |
|
635 | 850 | <td class="indexlinks"></td> |
|
636 | 851 | <td> |
|
637 | 852 | <a href="/starstar/webdir/notrepo/f/atom-log" title="subscribe to repository atom feed"> |
|
638 | 853 | <img class="atom-logo" src="/static/feed-icon-14x14.png" alt="subscribe to repository atom feed"> |
|
639 | 854 | </a> |
|
640 | 855 | </td> |
|
641 | 856 | </tr> |
|
642 | 857 | |
|
643 | 858 | <tr> |
|
644 | 859 | <td><a href="/starstar/webdir/notrepo/f/f2/?style=paper">starstar/webdir/notrepo/f/f2</a></td> |
|
645 | 860 | <td>unknown</td> |
|
646 | 861 | <td>Foo Bar <foo.bar@example.com></td> |
|
647 | 862 | <td class="age">*</td> (glob) |
|
648 | 863 | <td class="indexlinks"></td> |
|
649 | 864 | <td> |
|
650 | 865 | <a href="/starstar/webdir/notrepo/f/f2/atom-log" title="subscribe to repository atom feed"> |
|
651 | 866 | <img class="atom-logo" src="/static/feed-icon-14x14.png" alt="subscribe to repository atom feed"> |
|
652 | 867 | </a> |
|
653 | 868 | </td> |
|
654 | 869 | </tr> |
|
655 | 870 | |
|
656 | 871 | <tr> |
|
657 | 872 | <td><a href="/astar/?style=paper">astar</a></td> |
|
658 | 873 | <td>unknown</td> |
|
659 | 874 | <td>Foo Bar <foo.bar@example.com></td> |
|
660 | 875 | <td class="age">*</td> (glob) |
|
661 | 876 | <td class="indexlinks"></td> |
|
662 | 877 | <td> |
|
663 | 878 | <a href="/astar/atom-log" title="subscribe to repository atom feed"> |
|
664 | 879 | <img class="atom-logo" src="/static/feed-icon-14x14.png" alt="subscribe to repository atom feed"> |
|
665 | 880 | </a> |
|
666 | 881 | </td> |
|
667 | 882 | </tr> |
|
668 | 883 | |
|
669 | 884 | <tr> |
|
670 | 885 | <td><a href="/astar/.hg/patches/?style=paper">astar/.hg/patches</a></td> |
|
671 | 886 | <td>unknown</td> |
|
672 | 887 | <td>Foo Bar <foo.bar@example.com></td> |
|
673 | 888 | <td class="age">*</td> (glob) |
|
674 | 889 | <td class="indexlinks"></td> |
|
675 | 890 | <td> |
|
676 | 891 | <a href="/astar/.hg/patches/atom-log" title="subscribe to repository atom feed"> |
|
677 | 892 | <img class="atom-logo" src="/static/feed-icon-14x14.png" alt="subscribe to repository atom feed"> |
|
678 | 893 | </a> |
|
679 | 894 | </td> |
|
680 | 895 | </tr> |
|
681 | 896 | |
|
682 | 897 | </tbody> |
|
683 | 898 | </table> |
|
684 | 899 | </div> |
|
685 | 900 | </div> |
|
686 | 901 | <script type="text/javascript">process_dates()</script> |
|
687 | 902 | |
|
688 | 903 | |
|
689 | 904 | </body> |
|
690 | 905 | </html> |
|
691 | 906 | |
|
692 | 907 | $ get-with-headers.py localhost:$HGPORT1 't?style=raw' |
|
693 | 908 | 200 Script output follows |
|
694 | 909 | |
|
695 | 910 | |
|
696 | 911 | /t/a/ |
|
697 | 912 | |
|
698 | 913 | $ get-with-headers.py localhost:$HGPORT1 't/?style=raw' |
|
699 | 914 | 200 Script output follows |
|
700 | 915 | |
|
701 | 916 | |
|
702 | 917 | /t/a/ |
|
703 | 918 | |
|
704 | 919 | $ get-with-headers.py localhost:$HGPORT1 't/?style=paper' |
|
705 | 920 | 200 Script output follows |
|
706 | 921 | |
|
707 | 922 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> |
|
708 | 923 | <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US"> |
|
709 | 924 | <head> |
|
710 | 925 | <link rel="icon" href="/static/hgicon.png" type="image/png" /> |
|
711 | 926 | <meta name="robots" content="index, nofollow" /> |
|
712 | 927 | <link rel="stylesheet" href="/static/style-paper.css" type="text/css" /> |
|
713 | 928 | <script type="text/javascript" src="/static/mercurial.js"></script> |
|
714 | 929 | |
|
715 | 930 | <title>Mercurial repositories index</title> |
|
716 | 931 | </head> |
|
717 | 932 | <body> |
|
718 | 933 | |
|
719 | 934 | <div class="container"> |
|
720 | 935 | <div class="menu"> |
|
721 | 936 | <a href="https://mercurial-scm.org/"> |
|
722 | 937 | <img src="/static/hglogo.png" width=75 height=90 border=0 alt="mercurial" /></a> |
|
723 | 938 | </div> |
|
724 | 939 | <div class="main"> |
|
725 | 940 | <h2 class="breadcrumb"><a href="/">Mercurial</a> > <a href="/t">t</a> </h2> |
|
726 | 941 | |
|
727 | 942 | <table class="bigtable"> |
|
728 | 943 | <thead> |
|
729 | 944 | <tr> |
|
730 | 945 | <th><a href="?sort=name">Name</a></th> |
|
731 | 946 | <th><a href="?sort=description">Description</a></th> |
|
732 | 947 | <th><a href="?sort=contact">Contact</a></th> |
|
733 | 948 | <th><a href="?sort=lastchange">Last modified</a></th> |
|
734 | 949 | <th> </th> |
|
735 | 950 | <th> </th> |
|
736 | 951 | </tr> |
|
737 | 952 | </thead> |
|
738 | 953 | <tbody class="stripes2"> |
|
739 | 954 | |
|
740 | 955 | <tr> |
|
741 | 956 | <td><a href="/t/a/?style=paper">a</a></td> |
|
742 | 957 | <td>unknown</td> |
|
743 | 958 | <td>Foo Bar <foo.bar@example.com></td> |
|
744 | 959 | <td class="age">*</td> (glob) |
|
745 | 960 | <td class="indexlinks"></td> |
|
746 | 961 | <td> |
|
747 | 962 | <a href="/t/a/atom-log" title="subscribe to repository atom feed"> |
|
748 | 963 | <img class="atom-logo" src="/static/feed-icon-14x14.png" alt="subscribe to repository atom feed"> |
|
749 | 964 | </a> |
|
750 | 965 | </td> |
|
751 | 966 | </tr> |
|
752 | 967 | |
|
753 | 968 | </tbody> |
|
754 | 969 | </table> |
|
755 | 970 | </div> |
|
756 | 971 | </div> |
|
757 | 972 | <script type="text/javascript">process_dates()</script> |
|
758 | 973 | |
|
759 | 974 | |
|
760 | 975 | </body> |
|
761 | 976 | </html> |
|
762 | 977 | |
|
763 | 978 | $ get-with-headers.py localhost:$HGPORT1 't/a?style=atom' |
|
764 | 979 | 200 Script output follows |
|
765 | 980 | |
|
766 | 981 | <?xml version="1.0" encoding="ascii"?> |
|
767 | 982 | <feed xmlns="http://www.w3.org/2005/Atom"> |
|
768 | 983 | <!-- Changelog --> |
|
769 | 984 | <id>http://*:$HGPORT1/t/a/</id> (glob) |
|
770 | 985 | <link rel="self" href="http://*:$HGPORT1/t/a/atom-log"/> (glob) |
|
771 | 986 | <link rel="alternate" href="http://*:$HGPORT1/t/a/"/> (glob) |
|
772 | 987 | <title>t/a Changelog</title> |
|
773 | 988 | <updated>1970-01-01T00:00:01+00:00</updated> |
|
774 | 989 | |
|
775 | 990 | <entry> |
|
776 | 991 | <title>[default] a</title> |
|
777 | 992 | <id>http://*:$HGPORT1/t/a/#changeset-8580ff50825a50c8f716709acdf8de0deddcd6ab</id> (glob) |
|
778 | 993 | <link href="http://*:$HGPORT1/t/a/rev/8580ff50825a"/> (glob) |
|
779 | 994 | <author> |
|
780 | 995 | <name>test</name> |
|
781 | 996 | <email>test</email> |
|
782 | 997 | </author> |
|
783 | 998 | <updated>1970-01-01T00:00:01+00:00</updated> |
|
784 | 999 | <published>1970-01-01T00:00:01+00:00</published> |
|
785 | 1000 | <content type="xhtml"> |
|
786 | 1001 | <table xmlns="http://www.w3.org/1999/xhtml"> |
|
787 | 1002 | <tr> |
|
788 | 1003 | <th style="text-align:left;">changeset</th> |
|
789 | 1004 | <td>8580ff50825a</td> |
|
790 | 1005 | </tr> |
|
791 | 1006 | <tr> |
|
792 | 1007 | <th style="text-align:left;">branch</th> |
|
793 | 1008 | <td>default</td> |
|
794 | 1009 | </tr> |
|
795 | 1010 | <tr> |
|
796 | 1011 | <th style="text-align:left;">bookmark</th> |
|
797 | 1012 | <td></td> |
|
798 | 1013 | </tr> |
|
799 | 1014 | <tr> |
|
800 | 1015 | <th style="text-align:left;">tag</th> |
|
801 | 1016 | <td>tip</td> |
|
802 | 1017 | </tr> |
|
803 | 1018 | <tr> |
|
804 | 1019 | <th style="text-align:left;">user</th> |
|
805 | 1020 | <td>test</td> |
|
806 | 1021 | </tr> |
|
807 | 1022 | <tr> |
|
808 | 1023 | <th style="text-align:left;vertical-align:top;">description</th> |
|
809 | 1024 | <td>a</td> |
|
810 | 1025 | </tr> |
|
811 | 1026 | <tr> |
|
812 | 1027 | <th style="text-align:left;vertical-align:top;">files</th> |
|
813 | 1028 | <td>a<br /></td> |
|
814 | 1029 | </tr> |
|
815 | 1030 | </table> |
|
816 | 1031 | </content> |
|
817 | 1032 | </entry> |
|
818 | 1033 | |
|
819 | 1034 | </feed> |
|
820 | 1035 | $ get-with-headers.py localhost:$HGPORT1 't/a/?style=atom' |
|
821 | 1036 | 200 Script output follows |
|
822 | 1037 | |
|
823 | 1038 | <?xml version="1.0" encoding="ascii"?> |
|
824 | 1039 | <feed xmlns="http://www.w3.org/2005/Atom"> |
|
825 | 1040 | <!-- Changelog --> |
|
826 | 1041 | <id>http://*:$HGPORT1/t/a/</id> (glob) |
|
827 | 1042 | <link rel="self" href="http://*:$HGPORT1/t/a/atom-log"/> (glob) |
|
828 | 1043 | <link rel="alternate" href="http://*:$HGPORT1/t/a/"/> (glob) |
|
829 | 1044 | <title>t/a Changelog</title> |
|
830 | 1045 | <updated>1970-01-01T00:00:01+00:00</updated> |
|
831 | 1046 | |
|
832 | 1047 | <entry> |
|
833 | 1048 | <title>[default] a</title> |
|
834 | 1049 | <id>http://*:$HGPORT1/t/a/#changeset-8580ff50825a50c8f716709acdf8de0deddcd6ab</id> (glob) |
|
835 | 1050 | <link href="http://*:$HGPORT1/t/a/rev/8580ff50825a"/> (glob) |
|
836 | 1051 | <author> |
|
837 | 1052 | <name>test</name> |
|
838 | 1053 | <email>test</email> |
|
839 | 1054 | </author> |
|
840 | 1055 | <updated>1970-01-01T00:00:01+00:00</updated> |
|
841 | 1056 | <published>1970-01-01T00:00:01+00:00</published> |
|
842 | 1057 | <content type="xhtml"> |
|
843 | 1058 | <table xmlns="http://www.w3.org/1999/xhtml"> |
|
844 | 1059 | <tr> |
|
845 | 1060 | <th style="text-align:left;">changeset</th> |
|
846 | 1061 | <td>8580ff50825a</td> |
|
847 | 1062 | </tr> |
|
848 | 1063 | <tr> |
|
849 | 1064 | <th style="text-align:left;">branch</th> |
|
850 | 1065 | <td>default</td> |
|
851 | 1066 | </tr> |
|
852 | 1067 | <tr> |
|
853 | 1068 | <th style="text-align:left;">bookmark</th> |
|
854 | 1069 | <td></td> |
|
855 | 1070 | </tr> |
|
856 | 1071 | <tr> |
|
857 | 1072 | <th style="text-align:left;">tag</th> |
|
858 | 1073 | <td>tip</td> |
|
859 | 1074 | </tr> |
|
860 | 1075 | <tr> |
|
861 | 1076 | <th style="text-align:left;">user</th> |
|
862 | 1077 | <td>test</td> |
|
863 | 1078 | </tr> |
|
864 | 1079 | <tr> |
|
865 | 1080 | <th style="text-align:left;vertical-align:top;">description</th> |
|
866 | 1081 | <td>a</td> |
|
867 | 1082 | </tr> |
|
868 | 1083 | <tr> |
|
869 | 1084 | <th style="text-align:left;vertical-align:top;">files</th> |
|
870 | 1085 | <td>a<br /></td> |
|
871 | 1086 | </tr> |
|
872 | 1087 | </table> |
|
873 | 1088 | </content> |
|
874 | 1089 | </entry> |
|
875 | 1090 | |
|
876 | 1091 | </feed> |
|
877 | 1092 | $ get-with-headers.py localhost:$HGPORT1 't/a/file/tip/a?style=raw' |
|
878 | 1093 | 200 Script output follows |
|
879 | 1094 | |
|
880 | 1095 | a |
|
881 | 1096 | |
|
882 | 1097 | Test [paths] '*' extension |
|
883 | 1098 | |
|
884 | 1099 | $ get-with-headers.py localhost:$HGPORT1 'coll/?style=raw' |
|
885 | 1100 | 200 Script output follows |
|
886 | 1101 | |
|
887 | 1102 | |
|
888 | 1103 | /coll/a/ |
|
889 | 1104 | /coll/a/.hg/patches/ |
|
890 | 1105 | /coll/b/ |
|
891 | 1106 | /coll/c/ |
|
892 | 1107 | /coll/notrepo/e/ |
|
893 | 1108 | /coll/notrepo/f/ |
|
894 | 1109 | |
|
895 | 1110 | $ get-with-headers.py localhost:$HGPORT1 'coll/a/file/tip/a?style=raw' |
|
896 | 1111 | 200 Script output follows |
|
897 | 1112 | |
|
898 | 1113 | a |
|
899 | 1114 | |
|
900 | 1115 | Test [paths] '**' extension |
|
901 | 1116 | |
|
902 | 1117 | $ get-with-headers.py localhost:$HGPORT1 'rcoll/?style=raw' |
|
903 | 1118 | 200 Script output follows |
|
904 | 1119 | |
|
905 | 1120 | |
|
906 | 1121 | /rcoll/a/ |
|
907 | 1122 | /rcoll/a/.hg/patches/ |
|
908 | 1123 | /rcoll/b/ |
|
909 | 1124 | /rcoll/b/d/ |
|
910 | 1125 | /rcoll/c/ |
|
911 | 1126 | /rcoll/notrepo/e/ |
|
912 | 1127 | /rcoll/notrepo/e/e2/ |
|
913 | 1128 | /rcoll/notrepo/f/ |
|
914 | 1129 | /rcoll/notrepo/f/f2/ |
|
915 | 1130 | |
|
916 | 1131 | $ get-with-headers.py localhost:$HGPORT1 'rcoll/b/d/file/tip/d?style=raw' |
|
917 | 1132 | 200 Script output follows |
|
918 | 1133 | |
|
919 | 1134 | d |
|
920 | 1135 | |
|
921 | 1136 | Test collapse = True |
|
922 | 1137 | |
|
923 | 1138 | $ killdaemons.py |
|
924 | 1139 | $ cat >> paths.conf <<EOF |
|
925 | 1140 | > [web] |
|
926 | 1141 | > collapse=true |
|
927 | 1142 | > descend = true |
|
928 | 1143 | > EOF |
|
929 | 1144 | $ hg serve -p $HGPORT1 -d --pid-file=hg.pid --webdir-conf paths.conf \ |
|
930 | 1145 | > -A access-paths.log -E error-paths-3.log |
|
931 | 1146 | $ cat hg.pid >> $DAEMON_PIDS |
|
932 | 1147 | $ get-with-headers.py localhost:$HGPORT1 'coll/?style=raw' |
|
933 | 1148 | 200 Script output follows |
|
934 | 1149 | |
|
935 | 1150 | |
|
936 | 1151 | /coll/a/ |
|
937 | 1152 | /coll/a/.hg/patches/ |
|
938 | 1153 | /coll/b/ |
|
939 | 1154 | /coll/c/ |
|
940 | 1155 | /coll/notrepo/ |
|
941 | 1156 | |
|
942 | 1157 | $ get-with-headers.py localhost:$HGPORT1 'coll/a/file/tip/a?style=raw' |
|
943 | 1158 | 200 Script output follows |
|
944 | 1159 | |
|
945 | 1160 | a |
|
946 | 1161 | $ get-with-headers.py localhost:$HGPORT1 'rcoll/?style=raw' |
|
947 | 1162 | 200 Script output follows |
|
948 | 1163 | |
|
949 | 1164 | |
|
950 | 1165 | /rcoll/a/ |
|
951 | 1166 | /rcoll/a/.hg/patches/ |
|
952 | 1167 | /rcoll/b/ |
|
953 | 1168 | /rcoll/b/d/ |
|
954 | 1169 | /rcoll/c/ |
|
955 | 1170 | /rcoll/notrepo/ |
|
956 | 1171 | |
|
957 | 1172 | $ get-with-headers.py localhost:$HGPORT1 'rcoll/b/d/file/tip/d?style=raw' |
|
958 | 1173 | 200 Script output follows |
|
959 | 1174 | |
|
960 | 1175 | d |
|
961 | 1176 | |
|
962 | 1177 | Test intermediate directories |
|
963 | 1178 | |
|
964 | 1179 | Hide the subrepo parent |
|
965 | 1180 | |
|
966 | 1181 | $ cp $root/notrepo/f/.hg/hgrc $root/notrepo/f/.hg/hgrc.bak |
|
967 | 1182 | $ cat >> $root/notrepo/f/.hg/hgrc << EOF |
|
968 | 1183 | > [web] |
|
969 | 1184 | > hidden = True |
|
970 | 1185 | > EOF |
|
971 | 1186 | |
|
972 | 1187 | $ get-with-headers.py localhost:$HGPORT1 'rcoll/notrepo/?style=raw' |
|
973 | 1188 | 200 Script output follows |
|
974 | 1189 | |
|
975 | 1190 | |
|
976 | 1191 | /rcoll/notrepo/e/ |
|
977 | 1192 | /rcoll/notrepo/e/e2/ |
|
978 | 1193 | |
|
979 | 1194 | |
|
980 | 1195 | Subrepo parent not hidden |
|
981 | 1196 | $ mv $root/notrepo/f/.hg/hgrc.bak $root/notrepo/f/.hg/hgrc |
|
982 | 1197 | |
|
983 | 1198 | $ get-with-headers.py localhost:$HGPORT1 'rcoll/notrepo/?style=raw' |
|
984 | 1199 | 200 Script output follows |
|
985 | 1200 | |
|
986 | 1201 | |
|
987 | 1202 | /rcoll/notrepo/e/ |
|
988 | 1203 | /rcoll/notrepo/e/e2/ |
|
989 | 1204 | /rcoll/notrepo/f/ |
|
990 | 1205 | /rcoll/notrepo/f/f2/ |
|
991 | 1206 | |
|
992 | 1207 | |
|
993 | 1208 | Test repositories inside intermediate directories |
|
994 | 1209 | |
|
995 | 1210 | $ get-with-headers.py localhost:$HGPORT1 'rcoll/notrepo/e/file/tip/e?style=raw' |
|
996 | 1211 | 200 Script output follows |
|
997 | 1212 | |
|
998 | 1213 | e |
|
999 | 1214 | |
|
1000 | 1215 | Test subrepositories inside intermediate directories |
|
1001 | 1216 | |
|
1002 | 1217 | $ get-with-headers.py localhost:$HGPORT1 'rcoll/notrepo/f/f2/file/tip/f2?style=raw' |
|
1003 | 1218 | 200 Script output follows |
|
1004 | 1219 | |
|
1005 | 1220 | f2 |
|
1006 | 1221 | |
|
1007 | 1222 | Test descend = False |
|
1008 | 1223 | |
|
1009 | 1224 | $ killdaemons.py |
|
1010 | 1225 | $ cat >> paths.conf <<EOF |
|
1011 | 1226 | > descend=false |
|
1012 | 1227 | > EOF |
|
1013 | 1228 | $ hg serve -p $HGPORT1 -d --pid-file=hg.pid --webdir-conf paths.conf \ |
|
1014 | 1229 | > -A access-paths.log -E error-paths-4.log |
|
1015 | 1230 | $ cat hg.pid >> $DAEMON_PIDS |
|
1016 | 1231 | $ get-with-headers.py localhost:$HGPORT1 'coll/?style=raw' |
|
1017 | 1232 | 200 Script output follows |
|
1018 | 1233 | |
|
1019 | 1234 | |
|
1020 | 1235 | /coll/a/ |
|
1021 | 1236 | /coll/b/ |
|
1022 | 1237 | /coll/c/ |
|
1023 | 1238 | |
|
1024 | 1239 | $ get-with-headers.py localhost:$HGPORT1 'coll/a/file/tip/a?style=raw' |
|
1025 | 1240 | 200 Script output follows |
|
1026 | 1241 | |
|
1027 | 1242 | a |
|
1028 | 1243 | $ get-with-headers.py localhost:$HGPORT1 'rcoll/?style=raw' |
|
1029 | 1244 | 200 Script output follows |
|
1030 | 1245 | |
|
1031 | 1246 | |
|
1032 | 1247 | /rcoll/a/ |
|
1033 | 1248 | /rcoll/b/ |
|
1034 | 1249 | /rcoll/c/ |
|
1035 | 1250 | |
|
1036 | 1251 | $ get-with-headers.py localhost:$HGPORT1 'rcoll/b/d/file/tip/d?style=raw' |
|
1037 | 1252 | 200 Script output follows |
|
1038 | 1253 | |
|
1039 | 1254 | d |
|
1040 | 1255 | |
|
1041 | 1256 | Test intermediate directories |
|
1042 | 1257 | |
|
1043 | 1258 | $ get-with-headers.py localhost:$HGPORT1 'rcoll/notrepo/?style=raw' |
|
1044 | 1259 | 200 Script output follows |
|
1045 | 1260 | |
|
1046 | 1261 | |
|
1047 | 1262 | /rcoll/notrepo/e/ |
|
1048 | 1263 | /rcoll/notrepo/f/ |
|
1049 | 1264 | |
|
1050 | 1265 | |
|
1051 | 1266 | Test repositories inside intermediate directories |
|
1052 | 1267 | |
|
1053 | 1268 | $ get-with-headers.py localhost:$HGPORT1 'rcoll/notrepo/e/file/tip/e?style=raw' |
|
1054 | 1269 | 200 Script output follows |
|
1055 | 1270 | |
|
1056 | 1271 | e |
|
1057 | 1272 | |
|
1058 | 1273 | Test subrepositories inside intermediate directories |
|
1059 | 1274 | |
|
1060 | 1275 | $ get-with-headers.py localhost:$HGPORT1 'rcoll/notrepo/f/f2/file/tip/f2?style=raw' |
|
1061 | 1276 | 200 Script output follows |
|
1062 | 1277 | |
|
1063 | 1278 | f2 |
|
1064 | 1279 | |
|
1065 | 1280 | Test [paths] '*' in a repo root |
|
1066 | 1281 | |
|
1067 | 1282 | $ hg id http://localhost:$HGPORT1/astar |
|
1068 | 1283 | 8580ff50825a |
|
1069 | 1284 | |
|
1070 | 1285 | $ killdaemons.py |
|
1071 | 1286 | $ cat > paths.conf <<EOF |
|
1072 | 1287 | > [paths] |
|
1073 | 1288 | > t/a = $root/a |
|
1074 | 1289 | > t/b = $root/b |
|
1075 | 1290 | > c = $root/c |
|
1076 | 1291 | > EOF |
|
1077 | 1292 | $ hg serve -p $HGPORT1 -d --pid-file=hg.pid --webdir-conf paths.conf \ |
|
1078 | 1293 | > -A access-paths.log -E error-paths-5.log |
|
1079 | 1294 | $ cat hg.pid >> $DAEMON_PIDS |
|
1080 | 1295 | $ get-with-headers.py localhost:$HGPORT1 '?style=raw' |
|
1081 | 1296 | 200 Script output follows |
|
1082 | 1297 | |
|
1083 | 1298 | |
|
1084 | 1299 | /t/a/ |
|
1085 | 1300 | /t/b/ |
|
1086 | 1301 | /c/ |
|
1087 | 1302 | |
|
1088 | 1303 | $ get-with-headers.py localhost:$HGPORT1 't/?style=raw' |
|
1089 | 1304 | 200 Script output follows |
|
1090 | 1305 | |
|
1091 | 1306 | |
|
1092 | 1307 | /t/a/ |
|
1093 | 1308 | /t/b/ |
|
1094 | 1309 | |
|
1095 | 1310 | |
|
1096 | 1311 | Test collapse = True |
|
1097 | 1312 | |
|
1098 | 1313 | $ killdaemons.py |
|
1099 | 1314 | $ cat >> paths.conf <<EOF |
|
1100 | 1315 | > [web] |
|
1101 | 1316 | > collapse=true |
|
1102 | 1317 | > EOF |
|
1103 | 1318 | $ hg serve -p $HGPORT1 -d --pid-file=hg.pid --webdir-conf paths.conf \ |
|
1104 | 1319 | > -A access-paths.log -E error-paths-6.log |
|
1105 | 1320 | $ cat hg.pid >> $DAEMON_PIDS |
|
1106 | 1321 | $ get-with-headers.py localhost:$HGPORT1 '?style=raw' |
|
1107 | 1322 | 200 Script output follows |
|
1108 | 1323 | |
|
1109 | 1324 | |
|
1110 | 1325 | /t/ |
|
1111 | 1326 | /c/ |
|
1112 | 1327 | |
|
1113 | 1328 | $ get-with-headers.py localhost:$HGPORT1 't/?style=raw' |
|
1114 | 1329 | 200 Script output follows |
|
1115 | 1330 | |
|
1116 | 1331 | |
|
1117 | 1332 | /t/a/ |
|
1118 | 1333 | /t/b/ |
|
1119 | 1334 | |
|
1120 | 1335 | |
|
1121 | 1336 | test descend = False |
|
1122 | 1337 | |
|
1123 | 1338 | $ killdaemons.py |
|
1124 | 1339 | $ cat >> paths.conf <<EOF |
|
1125 | 1340 | > descend=false |
|
1126 | 1341 | > EOF |
|
1127 | 1342 | $ hg serve -p $HGPORT1 -d --pid-file=hg.pid --webdir-conf paths.conf \ |
|
1128 | 1343 | > -A access-paths.log -E error-paths-7.log |
|
1129 | 1344 | $ cat hg.pid >> $DAEMON_PIDS |
|
1130 | 1345 | $ get-with-headers.py localhost:$HGPORT1 '?style=raw' |
|
1131 | 1346 | 200 Script output follows |
|
1132 | 1347 | |
|
1133 | 1348 | |
|
1134 | 1349 | /c/ |
|
1135 | 1350 | |
|
1136 | 1351 | $ get-with-headers.py localhost:$HGPORT1 't/?style=raw' |
|
1137 | 1352 | 200 Script output follows |
|
1138 | 1353 | |
|
1139 | 1354 | |
|
1140 | 1355 | /t/a/ |
|
1141 | 1356 | /t/b/ |
|
1142 | 1357 | |
|
1143 | 1358 | $ killdaemons.py |
|
1144 | 1359 | $ cat > paths.conf <<EOF |
|
1145 | 1360 | > [paths] |
|
1146 | 1361 | > nostore = $root/nostore |
|
1147 | 1362 | > inexistent = $root/inexistent |
|
1148 | 1363 | > EOF |
|
1149 | 1364 | $ hg serve -p $HGPORT1 -d --pid-file=hg.pid --webdir-conf paths.conf \ |
|
1150 | 1365 | > -A access-paths.log -E error-paths-8.log |
|
1151 | 1366 | $ cat hg.pid >> $DAEMON_PIDS |
|
1152 | 1367 | |
|
1153 | 1368 | test inexistent and inaccessible repo should be ignored silently |
|
1154 | 1369 | |
|
1155 | 1370 | $ get-with-headers.py localhost:$HGPORT1 '' |
|
1156 | 1371 | 200 Script output follows |
|
1157 | 1372 | |
|
1158 | 1373 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> |
|
1159 | 1374 | <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US"> |
|
1160 | 1375 | <head> |
|
1161 | 1376 | <link rel="icon" href="/static/hgicon.png" type="image/png" /> |
|
1162 | 1377 | <meta name="robots" content="index, nofollow" /> |
|
1163 | 1378 | <link rel="stylesheet" href="/static/style-paper.css" type="text/css" /> |
|
1164 | 1379 | <script type="text/javascript" src="/static/mercurial.js"></script> |
|
1165 | 1380 | |
|
1166 | 1381 | <title>Mercurial repositories index</title> |
|
1167 | 1382 | </head> |
|
1168 | 1383 | <body> |
|
1169 | 1384 | |
|
1170 | 1385 | <div class="container"> |
|
1171 | 1386 | <div class="menu"> |
|
1172 | 1387 | <a href="https://mercurial-scm.org/"> |
|
1173 | 1388 | <img src="/static/hglogo.png" width=75 height=90 border=0 alt="mercurial" /></a> |
|
1174 | 1389 | </div> |
|
1175 | 1390 | <div class="main"> |
|
1176 | 1391 | <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2> |
|
1177 | 1392 | |
|
1178 | 1393 | <table class="bigtable"> |
|
1179 | 1394 | <thead> |
|
1180 | 1395 | <tr> |
|
1181 | 1396 | <th><a href="?sort=name">Name</a></th> |
|
1182 | 1397 | <th><a href="?sort=description">Description</a></th> |
|
1183 | 1398 | <th><a href="?sort=contact">Contact</a></th> |
|
1184 | 1399 | <th><a href="?sort=lastchange">Last modified</a></th> |
|
1185 | 1400 | <th> </th> |
|
1186 | 1401 | <th> </th> |
|
1187 | 1402 | </tr> |
|
1188 | 1403 | </thead> |
|
1189 | 1404 | <tbody class="stripes2"> |
|
1190 | 1405 | |
|
1191 | 1406 | </tbody> |
|
1192 | 1407 | </table> |
|
1193 | 1408 | </div> |
|
1194 | 1409 | </div> |
|
1195 | 1410 | <script type="text/javascript">process_dates()</script> |
|
1196 | 1411 | |
|
1197 | 1412 | |
|
1198 | 1413 | </body> |
|
1199 | 1414 | </html> |
|
1200 | 1415 | |
|
1201 | 1416 | |
|
1202 | 1417 | test listening address/port specified by web-conf (issue4699): |
|
1203 | 1418 | |
|
1204 | 1419 | $ killdaemons.py |
|
1205 | 1420 | $ cat >> paths.conf <<EOF |
|
1206 | 1421 | > [web] |
|
1207 | 1422 | > address = localhost |
|
1208 | 1423 | > port = $HGPORT1 |
|
1209 | 1424 | > EOF |
|
1210 | 1425 | $ hg serve -d --pid-file=hg.pid --web-conf paths.conf \ |
|
1211 | 1426 | > -A access-paths.log -E error-paths-9.log |
|
1212 | 1427 | listening at http://*:$HGPORT1/ (bound to 127.0.0.1:$HGPORT1) (glob) |
|
1213 | 1428 | $ cat hg.pid >> $DAEMON_PIDS |
|
1214 | 1429 | $ get-with-headers.py localhost:$HGPORT1 '?style=raw' |
|
1215 | 1430 | 200 Script output follows |
|
1216 | 1431 | |
|
1217 | 1432 | |
|
1218 | 1433 | |
|
1219 | 1434 | test --port option overrides web.port: |
|
1220 | 1435 | |
|
1221 | 1436 | $ killdaemons.py |
|
1222 | 1437 | $ hg serve -p $HGPORT2 -d -v --pid-file=hg.pid --web-conf paths.conf \ |
|
1223 | 1438 | > -A access-paths.log -E error-paths-10.log |
|
1224 | 1439 | listening at http://*:$HGPORT2/ (bound to 127.0.0.1:$HGPORT2) (glob) |
|
1225 | 1440 | $ cat hg.pid >> $DAEMON_PIDS |
|
1226 | 1441 | $ get-with-headers.py localhost:$HGPORT2 '?style=raw' |
|
1227 | 1442 | 200 Script output follows |
|
1228 | 1443 | |
|
1229 | 1444 | |
|
1230 | 1445 | |
|
1231 | 1446 | |
|
1232 | 1447 | $ killdaemons.py |
|
1233 | 1448 | $ cat > collections.conf <<EOF |
|
1234 | 1449 | > [collections] |
|
1235 | 1450 | > $root=$root |
|
1236 | 1451 | > EOF |
|
1237 | 1452 | $ hg serve --config web.baseurl=http://hg.example.com:8080/ -p $HGPORT2 -d \ |
|
1238 | 1453 | > --pid-file=hg.pid --webdir-conf collections.conf \ |
|
1239 | 1454 | > -A access-collections.log -E error-collections.log |
|
1240 | 1455 | $ cat hg.pid >> $DAEMON_PIDS |
|
1241 | 1456 | |
|
1242 | 1457 | collections: should succeed |
|
1243 | 1458 | |
|
1244 | 1459 | $ get-with-headers.py localhost:$HGPORT2 '?style=raw' |
|
1245 | 1460 | 200 Script output follows |
|
1246 | 1461 | |
|
1247 | 1462 | |
|
1248 | 1463 | /a/ |
|
1249 | 1464 | /a/.hg/patches/ |
|
1250 | 1465 | /b/ |
|
1251 | 1466 | /c/ |
|
1252 | 1467 | /notrepo/e/ |
|
1253 | 1468 | /notrepo/f/ |
|
1254 | 1469 | |
|
1255 | 1470 | $ get-with-headers.py localhost:$HGPORT2 'a/file/tip/a?style=raw' |
|
1256 | 1471 | 200 Script output follows |
|
1257 | 1472 | |
|
1258 | 1473 | a |
|
1259 | 1474 | $ get-with-headers.py localhost:$HGPORT2 'b/file/tip/b?style=raw' |
|
1260 | 1475 | 200 Script output follows |
|
1261 | 1476 | |
|
1262 | 1477 | b |
|
1263 | 1478 | $ get-with-headers.py localhost:$HGPORT2 'c/file/tip/c?style=raw' |
|
1264 | 1479 | 200 Script output follows |
|
1265 | 1480 | |
|
1266 | 1481 | c |
|
1267 | 1482 | |
|
1268 | 1483 | atom-log with basedir / |
|
1269 | 1484 | |
|
1270 | 1485 | $ get-with-headers.py localhost:$HGPORT2 'a/atom-log' | grep '<link' |
|
1271 | 1486 | <link rel="self" href="http://hg.example.com:8080/a/atom-log"/> |
|
1272 | 1487 | <link rel="alternate" href="http://hg.example.com:8080/a/"/> |
|
1273 | 1488 | <link href="http://hg.example.com:8080/a/rev/8580ff50825a"/> |
|
1274 | 1489 | |
|
1275 | 1490 | rss-log with basedir / |
|
1276 | 1491 | |
|
1277 | 1492 | $ get-with-headers.py localhost:$HGPORT2 'a/rss-log' | grep '<guid' |
|
1278 | 1493 | <guid isPermaLink="true">http://hg.example.com:8080/a/rev/8580ff50825a</guid> |
|
1279 | 1494 | $ killdaemons.py |
|
1280 | 1495 | $ hg serve --config web.baseurl=http://hg.example.com:8080/foo/ -p $HGPORT2 -d \ |
|
1281 | 1496 | > --pid-file=hg.pid --webdir-conf collections.conf \ |
|
1282 | 1497 | > -A access-collections-2.log -E error-collections-2.log |
|
1283 | 1498 | $ cat hg.pid >> $DAEMON_PIDS |
|
1284 | 1499 | |
|
1285 | 1500 | atom-log with basedir /foo/ |
|
1286 | 1501 | |
|
1287 | 1502 | $ get-with-headers.py localhost:$HGPORT2 'a/atom-log' | grep '<link' |
|
1288 | 1503 | <link rel="self" href="http://hg.example.com:8080/foo/a/atom-log"/> |
|
1289 | 1504 | <link rel="alternate" href="http://hg.example.com:8080/foo/a/"/> |
|
1290 | 1505 | <link href="http://hg.example.com:8080/foo/a/rev/8580ff50825a"/> |
|
1291 | 1506 | |
|
1292 | 1507 | rss-log with basedir /foo/ |
|
1293 | 1508 | |
|
1294 | 1509 | $ get-with-headers.py localhost:$HGPORT2 'a/rss-log' | grep '<guid' |
|
1295 | 1510 | <guid isPermaLink="true">http://hg.example.com:8080/foo/a/rev/8580ff50825a</guid> |
|
1296 | 1511 | |
|
1297 | 1512 | Path refreshing works as expected |
|
1298 | 1513 | |
|
1299 | 1514 | $ killdaemons.py |
|
1300 | 1515 | $ mkdir $root/refreshtest |
|
1301 | 1516 | $ hg init $root/refreshtest/a |
|
1302 | 1517 | $ cat > paths.conf << EOF |
|
1303 | 1518 | > [paths] |
|
1304 | 1519 | > / = $root/refreshtest/* |
|
1305 | 1520 | > EOF |
|
1306 | 1521 | $ hg serve -p $HGPORT1 -d --pid-file hg.pid --webdir-conf paths.conf |
|
1307 | 1522 | $ cat hg.pid >> $DAEMON_PIDS |
|
1308 | 1523 | |
|
1309 | 1524 | $ get-with-headers.py localhost:$HGPORT1 '?style=raw' |
|
1310 | 1525 | 200 Script output follows |
|
1311 | 1526 | |
|
1312 | 1527 | |
|
1313 | 1528 | /a/ |
|
1314 | 1529 | |
|
1315 | 1530 | |
|
1316 | 1531 | By default refreshing occurs every 20s and a new repo won't be listed |
|
1317 | 1532 | immediately. |
|
1318 | 1533 | |
|
1319 | 1534 | $ hg init $root/refreshtest/b |
|
1320 | 1535 | $ get-with-headers.py localhost:$HGPORT1 '?style=raw' |
|
1321 | 1536 | 200 Script output follows |
|
1322 | 1537 | |
|
1323 | 1538 | |
|
1324 | 1539 | /a/ |
|
1325 | 1540 | |
|
1326 | 1541 | |
|
1327 | 1542 | Restart the server with no refresh interval. New repo should appear |
|
1328 | 1543 | immediately. |
|
1329 | 1544 | |
|
1330 | 1545 | $ killdaemons.py |
|
1331 | 1546 | $ cat > paths.conf << EOF |
|
1332 | 1547 | > [web] |
|
1333 | 1548 | > refreshinterval = -1 |
|
1334 | 1549 | > [paths] |
|
1335 | 1550 | > / = $root/refreshtest/* |
|
1336 | 1551 | > EOF |
|
1337 | 1552 | $ hg serve -p $HGPORT1 -d --pid-file hg.pid --webdir-conf paths.conf |
|
1338 | 1553 | $ cat hg.pid >> $DAEMON_PIDS |
|
1339 | 1554 | |
|
1340 | 1555 | $ get-with-headers.py localhost:$HGPORT1 '?style=raw' |
|
1341 | 1556 | 200 Script output follows |
|
1342 | 1557 | |
|
1343 | 1558 | |
|
1344 | 1559 | /a/ |
|
1345 | 1560 | /b/ |
|
1346 | 1561 | |
|
1347 | 1562 | |
|
1348 | 1563 | $ hg init $root/refreshtest/c |
|
1349 | 1564 | $ get-with-headers.py localhost:$HGPORT1 '?style=raw' |
|
1350 | 1565 | 200 Script output follows |
|
1351 | 1566 | |
|
1352 | 1567 | |
|
1353 | 1568 | /a/ |
|
1354 | 1569 | /b/ |
|
1355 | 1570 | /c/ |
|
1356 | 1571 | |
|
1357 | 1572 | |
|
1358 | 1573 | paths errors 1 |
|
1359 | 1574 | |
|
1360 | 1575 | $ cat error-paths-1.log |
|
1361 | 1576 | |
|
1362 | 1577 | paths errors 2 |
|
1363 | 1578 | |
|
1364 | 1579 | $ cat error-paths-2.log |
|
1365 | 1580 | |
|
1366 | 1581 | paths errors 3 |
|
1367 | 1582 | |
|
1368 | 1583 | $ cat error-paths-3.log |
|
1369 | 1584 | |
|
1370 | 1585 | paths errors 4 |
|
1371 | 1586 | |
|
1372 | 1587 | $ cat error-paths-4.log |
|
1373 | 1588 | |
|
1374 | 1589 | paths errors 5 |
|
1375 | 1590 | |
|
1376 | 1591 | $ cat error-paths-5.log |
|
1377 | 1592 | |
|
1378 | 1593 | paths errors 6 |
|
1379 | 1594 | |
|
1380 | 1595 | $ cat error-paths-6.log |
|
1381 | 1596 | |
|
1382 | 1597 | paths errors 7 |
|
1383 | 1598 | |
|
1384 | 1599 | $ cat error-paths-7.log |
|
1385 | 1600 | |
|
1386 | 1601 | paths errors 8 |
|
1387 | 1602 | |
|
1388 | 1603 | $ cat error-paths-8.log |
|
1389 | 1604 | |
|
1390 | 1605 | paths errors 9 |
|
1391 | 1606 | |
|
1392 | 1607 | $ cat error-paths-9.log |
|
1393 | 1608 | |
|
1394 | 1609 | paths errors 10 |
|
1395 | 1610 | |
|
1396 | 1611 | $ cat error-paths-10.log |
|
1397 | 1612 | |
|
1398 | 1613 | collections errors |
|
1399 | 1614 | |
|
1400 | 1615 | $ cat error-collections.log |
|
1401 | 1616 | |
|
1402 | 1617 | collections errors 2 |
|
1403 | 1618 | |
|
1404 | 1619 | $ cat error-collections-2.log |
General Comments 0
You need to be logged in to leave comments.
Login now