##// END OF EJS Templates
extensions: new closehead module for closing arbitrary heads...
Joerg Sonnenberger -
r40029:cd5f2e61 default
parent child Browse files
Show More
@@ -0,0 +1,82 b''
1 # closehead.py - Close arbitrary heads without checking them out first
2 #
3 # This software may be used and distributed according to the terms of the
4 # GNU General Public License version 2 or any later version.
5
6 '''close arbitrary heads without checking them out first'''
7
8 from __future__ import absolute_import
9
10 from mercurial.i18n import _
11 from mercurial import (
12 bookmarks,
13 cmdutil,
14 context,
15 error,
16 pycompat,
17 registrar,
18 scmutil,
19 )
20
21 cmdtable = {}
22 command = registrar.command(cmdtable)
23 # Note for extension authors: ONLY specify testedwith = 'ships-with-hg-core' for
24 # extensions which SHIP WITH MERCURIAL. Non-mainline extensions should
25 # be specifying the version(s) of Mercurial they are tested with, or
26 # leave the attribute unspecified.
27 testedwith = 'ships-with-hg-core'
28
29 commitopts = cmdutil.commitopts
30 commitopts2 = cmdutil.commitopts2
31 commitopts3 = [('r', 'rev', '',
32 _('revision to check'), _('REV'))]
33
34 @command('close-head|close-heads', commitopts + commitopts2 + commitopts3,
35 _('[OPTION]... [REV]...'), inferrepo=True)
36 def close_branch(ui, repo, *revs, **opts):
37 """close the given head revisions
38
39 This is equivalent to checking out each revision in a clean tree and running
40 ``hg commit --close-branch``, except that it doesn't change the working
41 directory.
42
43 The commit message must be specified with -l or -m.
44 """
45 def docommit(rev):
46 cctx = context.memctx(repo, parents=[rev, None], text=message,
47 files=[], filectxfn=None, user=opts.get('user'),
48 date=opts.get('date'), extra=extra)
49 tr = repo.transaction('commit')
50 ret = repo.commitctx(cctx, True)
51 bookmarks.update(repo, [rev, None], ret)
52 cctx.markcommitted(ret)
53 tr.close()
54
55 opts = pycompat.byteskwargs(opts)
56
57 revs += tuple(opts.get('rev', []))
58 revs = scmutil.revrange(repo, revs)
59
60 if not revs:
61 raise error.Abort(_('no revisions specified'))
62
63 heads = []
64 for branch in repo.branchmap():
65 heads.extend(repo.branchheads(branch))
66 heads = set(repo[h].rev() for h in heads)
67 for rev in revs:
68 if rev not in heads:
69 raise error.Abort(_('revision is not an open head: %s') % rev)
70
71 message = cmdutil.logmessage(ui, opts)
72 if not message:
73 raise error.Abort(_("no commit message specified with -l or -m"))
74 extra = { 'close': '1' }
75
76 with repo.wlock(), repo.lock():
77 for rev in revs:
78 r = repo[rev]
79 branch = r.branch()
80 extra['branch'] = branch
81 docommit(r)
82 return 0
@@ -0,0 +1,61 b''
1 $ hg init test-content
2 $ cd test-content
3 $ hg debugbuilddag '+2*2*3*4'
4 $ hg bookmark -r 1 @
5 $ hg log -G --template '{rev}:{node|short}'
6 o 4:e7bd5218ca15
7 |
8 | o 3:6100d3090acf
9 |/
10 | o 2:fa942426a6fd
11 |/
12 | o 1:66f7d451a68b
13 |/
14 o 0:1ea73414a91b
15
16 $ hg --config extensions.closehead= close-head -m 'Not a head' 0 1
17 abort: revision is not an open head: 0
18 [255]
19 $ hg --config extensions.closehead= close-head -m 'Not a head' -r 0 1
20 abort: revision is not an open head: 0
21 [255]
22 $ hg --config extensions.closehead= close-head -m 'Close old heads' -r 1 2
23 $ hg bookmark
24 @ 1:66f7d451a68b
25 $ hg heads
26 changeset: 4:e7bd5218ca15
27 parent: 0:1ea73414a91b
28 user: debugbuilddag
29 date: Thu Jan 01 00:00:04 1970 +0000
30 summary: r4
31
32 changeset: 3:6100d3090acf
33 parent: 0:1ea73414a91b
34 user: debugbuilddag
35 date: Thu Jan 01 00:00:03 1970 +0000
36 summary: r3
37
38 $ hg --config extensions.closehead= close-head -m 'Close more old heads' 4
39 $ hg heads
40 changeset: 3:6100d3090acf
41 parent: 0:1ea73414a91b
42 user: debugbuilddag
43 date: Thu Jan 01 00:00:03 1970 +0000
44 summary: r3
45
46 $ hg --config extensions.closehead= close-head -m 'Not a head' 0
47 abort: revision is not an open head: 0
48 [255]
49 $ hg --config extensions.closehead= close-head -m 'Already closed head' 1
50 abort: revision is not an open head: 1
51 [255]
52
53 $ hg init ../test-empty
54 $ cd ../test-empty
55 $ hg debugbuilddag '+1'
56 $ hg log -G --template '{rev}:{node|short}'
57 o 0:1ea73414a91b
58
59 $ hg --config extensions.closehead= close-head -m 'Close initial revision' 0
60 $ hg heads
61 [1]
@@ -1,3722 +1,3723 b''
1 1 Short help:
2 2
3 3 $ hg
4 4 Mercurial Distributed SCM
5 5
6 6 basic commands:
7 7
8 8 add add the specified files on the next commit
9 9 annotate show changeset information by line for each file
10 10 clone make a copy of an existing repository
11 11 commit commit the specified files or all outstanding changes
12 12 diff diff repository (or selected files)
13 13 export dump the header and diffs for one or more changesets
14 14 forget forget the specified files on the next commit
15 15 init create a new repository in the given directory
16 16 log show revision history of entire repository or files
17 17 merge merge another revision into working directory
18 18 pull pull changes from the specified source
19 19 push push changes to the specified destination
20 20 remove remove the specified files on the next commit
21 21 serve start stand-alone webserver
22 22 status show changed files in the working directory
23 23 summary summarize working directory state
24 24 update update working directory (or switch revisions)
25 25
26 26 (use 'hg help' for the full list of commands or 'hg -v' for details)
27 27
28 28 $ hg -q
29 29 add add the specified files on the next commit
30 30 annotate show changeset information by line for each file
31 31 clone make a copy of an existing repository
32 32 commit commit the specified files or all outstanding changes
33 33 diff diff repository (or selected files)
34 34 export dump the header and diffs for one or more changesets
35 35 forget forget the specified files on the next commit
36 36 init create a new repository in the given directory
37 37 log show revision history of entire repository or files
38 38 merge merge another revision into working directory
39 39 pull pull changes from the specified source
40 40 push push changes to the specified destination
41 41 remove remove the specified files on the next commit
42 42 serve start stand-alone webserver
43 43 status show changed files in the working directory
44 44 summary summarize working directory state
45 45 update update working directory (or switch revisions)
46 46
47 47 Extra extensions will be printed in help output in a non-reliable order since
48 48 the extension is unknown.
49 49 #if no-extraextensions
50 50
51 51 $ hg help
52 52 Mercurial Distributed SCM
53 53
54 54 list of commands:
55 55
56 56 add add the specified files on the next commit
57 57 addremove add all new files, delete all missing files
58 58 annotate show changeset information by line for each file
59 59 archive create an unversioned archive of a repository revision
60 60 backout reverse effect of earlier changeset
61 61 bisect subdivision search of changesets
62 62 bookmarks create a new bookmark or list existing bookmarks
63 63 branch set or show the current branch name
64 64 branches list repository named branches
65 65 bundle create a bundle file
66 66 cat output the current or given revision of files
67 67 clone make a copy of an existing repository
68 68 commit commit the specified files or all outstanding changes
69 69 config show combined config settings from all hgrc files
70 70 copy mark files as copied for the next commit
71 71 diff diff repository (or selected files)
72 72 export dump the header and diffs for one or more changesets
73 73 files list tracked files
74 74 forget forget the specified files on the next commit
75 75 graft copy changes from other branches onto the current branch
76 76 grep search revision history for a pattern in specified files
77 77 heads show branch heads
78 78 help show help for a given topic or a help overview
79 79 identify identify the working directory or specified revision
80 80 import import an ordered set of patches
81 81 incoming show new changesets found in source
82 82 init create a new repository in the given directory
83 83 log show revision history of entire repository or files
84 84 manifest output the current or given revision of the project manifest
85 85 merge merge another revision into working directory
86 86 outgoing show changesets not found in the destination
87 87 paths show aliases for remote repositories
88 88 phase set or show the current phase name
89 89 pull pull changes from the specified source
90 90 push push changes to the specified destination
91 91 recover roll back an interrupted transaction
92 92 remove remove the specified files on the next commit
93 93 rename rename files; equivalent of copy + remove
94 94 resolve redo merges or set/view the merge status of files
95 95 revert restore files to their checkout state
96 96 root print the root (top) of the current working directory
97 97 serve start stand-alone webserver
98 98 status show changed files in the working directory
99 99 summary summarize working directory state
100 100 tag add one or more tags for the current or given revision
101 101 tags list repository tags
102 102 unbundle apply one or more bundle files
103 103 update update working directory (or switch revisions)
104 104 verify verify the integrity of the repository
105 105 version output version and copyright information
106 106
107 107 additional help topics:
108 108
109 109 bundlespec Bundle File Formats
110 110 color Colorizing Outputs
111 111 config Configuration Files
112 112 dates Date Formats
113 113 deprecated Deprecated Features
114 114 diffs Diff Formats
115 115 environment Environment Variables
116 116 extensions Using Additional Features
117 117 filesets Specifying File Sets
118 118 flags Command-line flags
119 119 glossary Glossary
120 120 hgignore Syntax for Mercurial Ignore Files
121 121 hgweb Configuring hgweb
122 122 internals Technical implementation topics
123 123 merge-tools Merge Tools
124 124 pager Pager Support
125 125 patterns File Name Patterns
126 126 phases Working with Phases
127 127 revisions Specifying Revisions
128 128 scripting Using Mercurial from scripts and automation
129 129 subrepos Subrepositories
130 130 templating Template Usage
131 131 urls URL Paths
132 132
133 133 (use 'hg help -v' to show built-in aliases and global options)
134 134
135 135 $ hg -q help
136 136 add add the specified files on the next commit
137 137 addremove add all new files, delete all missing files
138 138 annotate show changeset information by line for each file
139 139 archive create an unversioned archive of a repository revision
140 140 backout reverse effect of earlier changeset
141 141 bisect subdivision search of changesets
142 142 bookmarks create a new bookmark or list existing bookmarks
143 143 branch set or show the current branch name
144 144 branches list repository named branches
145 145 bundle create a bundle file
146 146 cat output the current or given revision of files
147 147 clone make a copy of an existing repository
148 148 commit commit the specified files or all outstanding changes
149 149 config show combined config settings from all hgrc files
150 150 copy mark files as copied for the next commit
151 151 diff diff repository (or selected files)
152 152 export dump the header and diffs for one or more changesets
153 153 files list tracked files
154 154 forget forget the specified files on the next commit
155 155 graft copy changes from other branches onto the current branch
156 156 grep search revision history for a pattern in specified files
157 157 heads show branch heads
158 158 help show help for a given topic or a help overview
159 159 identify identify the working directory or specified revision
160 160 import import an ordered set of patches
161 161 incoming show new changesets found in source
162 162 init create a new repository in the given directory
163 163 log show revision history of entire repository or files
164 164 manifest output the current or given revision of the project manifest
165 165 merge merge another revision into working directory
166 166 outgoing show changesets not found in the destination
167 167 paths show aliases for remote repositories
168 168 phase set or show the current phase name
169 169 pull pull changes from the specified source
170 170 push push changes to the specified destination
171 171 recover roll back an interrupted transaction
172 172 remove remove the specified files on the next commit
173 173 rename rename files; equivalent of copy + remove
174 174 resolve redo merges or set/view the merge status of files
175 175 revert restore files to their checkout state
176 176 root print the root (top) of the current working directory
177 177 serve start stand-alone webserver
178 178 status show changed files in the working directory
179 179 summary summarize working directory state
180 180 tag add one or more tags for the current or given revision
181 181 tags list repository tags
182 182 unbundle apply one or more bundle files
183 183 update update working directory (or switch revisions)
184 184 verify verify the integrity of the repository
185 185 version output version and copyright information
186 186
187 187 additional help topics:
188 188
189 189 bundlespec Bundle File Formats
190 190 color Colorizing Outputs
191 191 config Configuration Files
192 192 dates Date Formats
193 193 deprecated Deprecated Features
194 194 diffs Diff Formats
195 195 environment Environment Variables
196 196 extensions Using Additional Features
197 197 filesets Specifying File Sets
198 198 flags Command-line flags
199 199 glossary Glossary
200 200 hgignore Syntax for Mercurial Ignore Files
201 201 hgweb Configuring hgweb
202 202 internals Technical implementation topics
203 203 merge-tools Merge Tools
204 204 pager Pager Support
205 205 patterns File Name Patterns
206 206 phases Working with Phases
207 207 revisions Specifying Revisions
208 208 scripting Using Mercurial from scripts and automation
209 209 subrepos Subrepositories
210 210 templating Template Usage
211 211 urls URL Paths
212 212
213 213 Test extension help:
214 214 $ hg help extensions --config extensions.rebase= --config extensions.children=
215 215 Using Additional Features
216 216 """""""""""""""""""""""""
217 217
218 218 Mercurial has the ability to add new features through the use of
219 219 extensions. Extensions may add new commands, add options to existing
220 220 commands, change the default behavior of commands, or implement hooks.
221 221
222 222 To enable the "foo" extension, either shipped with Mercurial or in the
223 223 Python search path, create an entry for it in your configuration file,
224 224 like this:
225 225
226 226 [extensions]
227 227 foo =
228 228
229 229 You may also specify the full path to an extension:
230 230
231 231 [extensions]
232 232 myfeature = ~/.hgext/myfeature.py
233 233
234 234 See 'hg help config' for more information on configuration files.
235 235
236 236 Extensions are not loaded by default for a variety of reasons: they can
237 237 increase startup overhead; they may be meant for advanced usage only; they
238 238 may provide potentially dangerous abilities (such as letting you destroy
239 239 or modify history); they might not be ready for prime time; or they may
240 240 alter some usual behaviors of stock Mercurial. It is thus up to the user
241 241 to activate extensions as needed.
242 242
243 243 To explicitly disable an extension enabled in a configuration file of
244 244 broader scope, prepend its path with !:
245 245
246 246 [extensions]
247 247 # disabling extension bar residing in /path/to/extension/bar.py
248 248 bar = !/path/to/extension/bar.py
249 249 # ditto, but no path was supplied for extension baz
250 250 baz = !
251 251
252 252 enabled extensions:
253 253
254 254 children command to display child changesets (DEPRECATED)
255 255 rebase command to move sets of revisions to a different ancestor
256 256
257 257 disabled extensions:
258 258
259 259 acl hooks for controlling repository access
260 260 blackbox log repository events to a blackbox for debugging
261 261 bugzilla hooks for integrating with the Bugzilla bug tracker
262 262 censor erase file content at a given revision
263 263 churn command to display statistics about repository history
264 264 clonebundles advertise pre-generated bundles to seed clones
265 closehead close arbitrary heads without checking them out first
265 266 convert import revisions from foreign VCS repositories into
266 267 Mercurial
267 268 eol automatically manage newlines in repository files
268 269 extdiff command to allow external programs to compare revisions
269 270 factotum http authentication with factotum
270 271 githelp try mapping git commands to Mercurial commands
271 272 gpg commands to sign and verify changesets
272 273 hgk browse the repository in a graphical way
273 274 highlight syntax highlighting for hgweb (requires Pygments)
274 275 histedit interactive history editing
275 276 keyword expand keywords in tracked files
276 277 largefiles track large binary files
277 278 mq manage a stack of patches
278 279 notify hooks for sending email push notifications
279 280 patchbomb command to send changesets as (a series of) patch emails
280 281 purge command to delete untracked files from the working
281 282 directory
282 283 relink recreates hardlinks between repository clones
283 284 schemes extend schemes with shortcuts to repository swarms
284 285 share share a common history between several working directories
285 286 shelve save and restore changes to the working directory
286 287 strip strip changesets and their descendants from history
287 288 transplant command to transplant changesets from another branch
288 289 win32mbcs allow the use of MBCS paths with problematic encodings
289 290 zeroconf discover and advertise repositories on the local network
290 291
291 292 #endif
292 293
293 294 Verify that deprecated extensions are included if --verbose:
294 295
295 296 $ hg -v help extensions | grep children
296 297 children command to display child changesets (DEPRECATED)
297 298
298 299 Verify that extension keywords appear in help templates
299 300
300 301 $ hg help --config extensions.transplant= templating|grep transplant > /dev/null
301 302
302 303 Test short command list with verbose option
303 304
304 305 $ hg -v help shortlist
305 306 Mercurial Distributed SCM
306 307
307 308 basic commands:
308 309
309 310 add add the specified files on the next commit
310 311 annotate, blame
311 312 show changeset information by line for each file
312 313 clone make a copy of an existing repository
313 314 commit, ci commit the specified files or all outstanding changes
314 315 diff diff repository (or selected files)
315 316 export dump the header and diffs for one or more changesets
316 317 forget forget the specified files on the next commit
317 318 init create a new repository in the given directory
318 319 log, history show revision history of entire repository or files
319 320 merge merge another revision into working directory
320 321 pull pull changes from the specified source
321 322 push push changes to the specified destination
322 323 remove, rm remove the specified files on the next commit
323 324 serve start stand-alone webserver
324 325 status, st show changed files in the working directory
325 326 summary, sum summarize working directory state
326 327 update, up, checkout, co
327 328 update working directory (or switch revisions)
328 329
329 330 global options ([+] can be repeated):
330 331
331 332 -R --repository REPO repository root directory or name of overlay bundle
332 333 file
333 334 --cwd DIR change working directory
334 335 -y --noninteractive do not prompt, automatically pick the first choice for
335 336 all prompts
336 337 -q --quiet suppress output
337 338 -v --verbose enable additional output
338 339 --color TYPE when to colorize (boolean, always, auto, never, or
339 340 debug)
340 341 --config CONFIG [+] set/override config option (use 'section.name=value')
341 342 --debug enable debugging output
342 343 --debugger start debugger
343 344 --encoding ENCODE set the charset encoding (default: ascii)
344 345 --encodingmode MODE set the charset encoding mode (default: strict)
345 346 --traceback always print a traceback on exception
346 347 --time time how long the command takes
347 348 --profile print command execution profile
348 349 --version output version information and exit
349 350 -h --help display help and exit
350 351 --hidden consider hidden changesets
351 352 --pager TYPE when to paginate (boolean, always, auto, or never)
352 353 (default: auto)
353 354
354 355 (use 'hg help' for the full list of commands)
355 356
356 357 $ hg add -h
357 358 hg add [OPTION]... [FILE]...
358 359
359 360 add the specified files on the next commit
360 361
361 362 Schedule files to be version controlled and added to the repository.
362 363
363 364 The files will be added to the repository at the next commit. To undo an
364 365 add before that, see 'hg forget'.
365 366
366 367 If no names are given, add all files to the repository (except files
367 368 matching ".hgignore").
368 369
369 370 Returns 0 if all files are successfully added.
370 371
371 372 options ([+] can be repeated):
372 373
373 374 -I --include PATTERN [+] include names matching the given patterns
374 375 -X --exclude PATTERN [+] exclude names matching the given patterns
375 376 -S --subrepos recurse into subrepositories
376 377 -n --dry-run do not perform actions, just print output
377 378
378 379 (some details hidden, use --verbose to show complete help)
379 380
380 381 Verbose help for add
381 382
382 383 $ hg add -hv
383 384 hg add [OPTION]... [FILE]...
384 385
385 386 add the specified files on the next commit
386 387
387 388 Schedule files to be version controlled and added to the repository.
388 389
389 390 The files will be added to the repository at the next commit. To undo an
390 391 add before that, see 'hg forget'.
391 392
392 393 If no names are given, add all files to the repository (except files
393 394 matching ".hgignore").
394 395
395 396 Examples:
396 397
397 398 - New (unknown) files are added automatically by 'hg add':
398 399
399 400 $ ls
400 401 foo.c
401 402 $ hg status
402 403 ? foo.c
403 404 $ hg add
404 405 adding foo.c
405 406 $ hg status
406 407 A foo.c
407 408
408 409 - Specific files to be added can be specified:
409 410
410 411 $ ls
411 412 bar.c foo.c
412 413 $ hg status
413 414 ? bar.c
414 415 ? foo.c
415 416 $ hg add bar.c
416 417 $ hg status
417 418 A bar.c
418 419 ? foo.c
419 420
420 421 Returns 0 if all files are successfully added.
421 422
422 423 options ([+] can be repeated):
423 424
424 425 -I --include PATTERN [+] include names matching the given patterns
425 426 -X --exclude PATTERN [+] exclude names matching the given patterns
426 427 -S --subrepos recurse into subrepositories
427 428 -n --dry-run do not perform actions, just print output
428 429
429 430 global options ([+] can be repeated):
430 431
431 432 -R --repository REPO repository root directory or name of overlay bundle
432 433 file
433 434 --cwd DIR change working directory
434 435 -y --noninteractive do not prompt, automatically pick the first choice for
435 436 all prompts
436 437 -q --quiet suppress output
437 438 -v --verbose enable additional output
438 439 --color TYPE when to colorize (boolean, always, auto, never, or
439 440 debug)
440 441 --config CONFIG [+] set/override config option (use 'section.name=value')
441 442 --debug enable debugging output
442 443 --debugger start debugger
443 444 --encoding ENCODE set the charset encoding (default: ascii)
444 445 --encodingmode MODE set the charset encoding mode (default: strict)
445 446 --traceback always print a traceback on exception
446 447 --time time how long the command takes
447 448 --profile print command execution profile
448 449 --version output version information and exit
449 450 -h --help display help and exit
450 451 --hidden consider hidden changesets
451 452 --pager TYPE when to paginate (boolean, always, auto, or never)
452 453 (default: auto)
453 454
454 455 Test the textwidth config option
455 456
456 457 $ hg root -h --config ui.textwidth=50
457 458 hg root
458 459
459 460 print the root (top) of the current working
460 461 directory
461 462
462 463 Print the root directory of the current
463 464 repository.
464 465
465 466 Returns 0 on success.
466 467
467 468 (some details hidden, use --verbose to show
468 469 complete help)
469 470
470 471 Test help option with version option
471 472
472 473 $ hg add -h --version
473 474 Mercurial Distributed SCM (version *) (glob)
474 475 (see https://mercurial-scm.org for more information)
475 476
476 477 Copyright (C) 2005-* Matt Mackall and others (glob)
477 478 This is free software; see the source for copying conditions. There is NO
478 479 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
479 480
480 481 $ hg add --skjdfks
481 482 hg add: option --skjdfks not recognized
482 483 hg add [OPTION]... [FILE]...
483 484
484 485 add the specified files on the next commit
485 486
486 487 options ([+] can be repeated):
487 488
488 489 -I --include PATTERN [+] include names matching the given patterns
489 490 -X --exclude PATTERN [+] exclude names matching the given patterns
490 491 -S --subrepos recurse into subrepositories
491 492 -n --dry-run do not perform actions, just print output
492 493
493 494 (use 'hg add -h' to show more help)
494 495 [255]
495 496
496 497 Test ambiguous command help
497 498
498 499 $ hg help ad
499 500 list of commands:
500 501
501 502 add add the specified files on the next commit
502 503 addremove add all new files, delete all missing files
503 504
504 505 (use 'hg help -v ad' to show built-in aliases and global options)
505 506
506 507 Test command without options
507 508
508 509 $ hg help verify
509 510 hg verify
510 511
511 512 verify the integrity of the repository
512 513
513 514 Verify the integrity of the current repository.
514 515
515 516 This will perform an extensive check of the repository's integrity,
516 517 validating the hashes and checksums of each entry in the changelog,
517 518 manifest, and tracked files, as well as the integrity of their crosslinks
518 519 and indices.
519 520
520 521 Please see https://mercurial-scm.org/wiki/RepositoryCorruption for more
521 522 information about recovery from corruption of the repository.
522 523
523 524 Returns 0 on success, 1 if errors are encountered.
524 525
525 526 (some details hidden, use --verbose to show complete help)
526 527
527 528 $ hg help diff
528 529 hg diff [OPTION]... ([-c REV] | [-r REV1 [-r REV2]]) [FILE]...
529 530
530 531 diff repository (or selected files)
531 532
532 533 Show differences between revisions for the specified files.
533 534
534 535 Differences between files are shown using the unified diff format.
535 536
536 537 Note:
537 538 'hg diff' may generate unexpected results for merges, as it will
538 539 default to comparing against the working directory's first parent
539 540 changeset if no revisions are specified.
540 541
541 542 When two revision arguments are given, then changes are shown between
542 543 those revisions. If only one revision is specified then that revision is
543 544 compared to the working directory, and, when no revisions are specified,
544 545 the working directory files are compared to its first parent.
545 546
546 547 Alternatively you can specify -c/--change with a revision to see the
547 548 changes in that changeset relative to its first parent.
548 549
549 550 Without the -a/--text option, diff will avoid generating diffs of files it
550 551 detects as binary. With -a, diff will generate a diff anyway, probably
551 552 with undesirable results.
552 553
553 554 Use the -g/--git option to generate diffs in the git extended diff format.
554 555 For more information, read 'hg help diffs'.
555 556
556 557 Returns 0 on success.
557 558
558 559 options ([+] can be repeated):
559 560
560 561 -r --rev REV [+] revision
561 562 -c --change REV change made by revision
562 563 -a --text treat all files as text
563 564 -g --git use git extended diff format
564 565 --binary generate binary diffs in git mode (default)
565 566 --nodates omit dates from diff headers
566 567 --noprefix omit a/ and b/ prefixes from filenames
567 568 -p --show-function show which function each change is in
568 569 --reverse produce a diff that undoes the changes
569 570 -w --ignore-all-space ignore white space when comparing lines
570 571 -b --ignore-space-change ignore changes in the amount of white space
571 572 -B --ignore-blank-lines ignore changes whose lines are all blank
572 573 -Z --ignore-space-at-eol ignore changes in whitespace at EOL
573 574 -U --unified NUM number of lines of context to show
574 575 --stat output diffstat-style summary of changes
575 576 --root DIR produce diffs relative to subdirectory
576 577 -I --include PATTERN [+] include names matching the given patterns
577 578 -X --exclude PATTERN [+] exclude names matching the given patterns
578 579 -S --subrepos recurse into subrepositories
579 580
580 581 (some details hidden, use --verbose to show complete help)
581 582
582 583 $ hg help status
583 584 hg status [OPTION]... [FILE]...
584 585
585 586 aliases: st
586 587
587 588 show changed files in the working directory
588 589
589 590 Show status of files in the repository. If names are given, only files
590 591 that match are shown. Files that are clean or ignored or the source of a
591 592 copy/move operation, are not listed unless -c/--clean, -i/--ignored,
592 593 -C/--copies or -A/--all are given. Unless options described with "show
593 594 only ..." are given, the options -mardu are used.
594 595
595 596 Option -q/--quiet hides untracked (unknown and ignored) files unless
596 597 explicitly requested with -u/--unknown or -i/--ignored.
597 598
598 599 Note:
599 600 'hg status' may appear to disagree with diff if permissions have
600 601 changed or a merge has occurred. The standard diff format does not
601 602 report permission changes and diff only reports changes relative to one
602 603 merge parent.
603 604
604 605 If one revision is given, it is used as the base revision. If two
605 606 revisions are given, the differences between them are shown. The --change
606 607 option can also be used as a shortcut to list the changed files of a
607 608 revision from its first parent.
608 609
609 610 The codes used to show the status of files are:
610 611
611 612 M = modified
612 613 A = added
613 614 R = removed
614 615 C = clean
615 616 ! = missing (deleted by non-hg command, but still tracked)
616 617 ? = not tracked
617 618 I = ignored
618 619 = origin of the previous file (with --copies)
619 620
620 621 Returns 0 on success.
621 622
622 623 options ([+] can be repeated):
623 624
624 625 -A --all show status of all files
625 626 -m --modified show only modified files
626 627 -a --added show only added files
627 628 -r --removed show only removed files
628 629 -d --deleted show only deleted (but tracked) files
629 630 -c --clean show only files without changes
630 631 -u --unknown show only unknown (not tracked) files
631 632 -i --ignored show only ignored files
632 633 -n --no-status hide status prefix
633 634 -C --copies show source of copied files
634 635 -0 --print0 end filenames with NUL, for use with xargs
635 636 --rev REV [+] show difference from revision
636 637 --change REV list the changed files of a revision
637 638 -I --include PATTERN [+] include names matching the given patterns
638 639 -X --exclude PATTERN [+] exclude names matching the given patterns
639 640 -S --subrepos recurse into subrepositories
640 641 -T --template TEMPLATE display with template
641 642
642 643 (some details hidden, use --verbose to show complete help)
643 644
644 645 $ hg -q help status
645 646 hg status [OPTION]... [FILE]...
646 647
647 648 show changed files in the working directory
648 649
649 650 $ hg help foo
650 651 abort: no such help topic: foo
651 652 (try 'hg help --keyword foo')
652 653 [255]
653 654
654 655 $ hg skjdfks
655 656 hg: unknown command 'skjdfks'
656 657 (use 'hg help' for a list of commands)
657 658 [255]
658 659
659 660 Typoed command gives suggestion
660 661 $ hg puls
661 662 hg: unknown command 'puls'
662 663 (did you mean one of pull, push?)
663 664 [255]
664 665
665 666 Not enabled extension gets suggested
666 667
667 668 $ hg rebase
668 669 hg: unknown command 'rebase'
669 670 'rebase' is provided by the following extension:
670 671
671 672 rebase command to move sets of revisions to a different ancestor
672 673
673 674 (use 'hg help extensions' for information on enabling extensions)
674 675 [255]
675 676
676 677 Disabled extension gets suggested
677 678 $ hg --config extensions.rebase=! rebase
678 679 hg: unknown command 'rebase'
679 680 'rebase' is provided by the following extension:
680 681
681 682 rebase command to move sets of revisions to a different ancestor
682 683
683 684 (use 'hg help extensions' for information on enabling extensions)
684 685 [255]
685 686
686 687 Make sure that we don't run afoul of the help system thinking that
687 688 this is a section and erroring out weirdly.
688 689
689 690 $ hg .log
690 691 hg: unknown command '.log'
691 692 (did you mean log?)
692 693 [255]
693 694
694 695 $ hg log.
695 696 hg: unknown command 'log.'
696 697 (did you mean log?)
697 698 [255]
698 699 $ hg pu.lh
699 700 hg: unknown command 'pu.lh'
700 701 (did you mean one of pull, push?)
701 702 [255]
702 703
703 704 $ cat > helpext.py <<EOF
704 705 > import os
705 706 > from mercurial import commands, fancyopts, registrar
706 707 >
707 708 > def func(arg):
708 709 > return '%sfoo' % arg
709 710 > class customopt(fancyopts.customopt):
710 711 > def newstate(self, oldstate, newparam, abort):
711 712 > return '%sbar' % oldstate
712 713 > cmdtable = {}
713 714 > command = registrar.command(cmdtable)
714 715 >
715 716 > @command(b'nohelp',
716 717 > [(b'', b'longdesc', 3, b'x'*67),
717 718 > (b'n', b'', None, b'normal desc'),
718 719 > (b'', b'newline', b'', b'line1\nline2'),
719 720 > (b'', b'callableopt', func, b'adds foo'),
720 721 > (b'', b'customopt', customopt(''), b'adds bar'),
721 722 > (b'', b'customopt-withdefault', customopt('foo'), b'adds bar')],
722 723 > b'hg nohelp',
723 724 > norepo=True)
724 725 > @command(b'debugoptADV', [(b'', b'aopt', None, b'option is (ADVANCED)')])
725 726 > @command(b'debugoptDEP', [(b'', b'dopt', None, b'option is (DEPRECATED)')])
726 727 > @command(b'debugoptEXP', [(b'', b'eopt', None, b'option is (EXPERIMENTAL)')])
727 728 > def nohelp(ui, *args, **kwargs):
728 729 > pass
729 730 >
730 731 > def uisetup(ui):
731 732 > ui.setconfig(b'alias', b'shellalias', b'!echo hi', b'helpext')
732 733 > ui.setconfig(b'alias', b'hgalias', b'summary', b'helpext')
733 734 >
734 735 > EOF
735 736 $ echo '[extensions]' >> $HGRCPATH
736 737 $ echo "helpext = `pwd`/helpext.py" >> $HGRCPATH
737 738
738 739 Test for aliases
739 740
740 741 $ hg help hgalias
741 742 hg hgalias [--remote]
742 743
743 744 alias for: hg summary
744 745
745 746 summarize working directory state
746 747
747 748 This generates a brief summary of the working directory state, including
748 749 parents, branch, commit status, phase and available updates.
749 750
750 751 With the --remote option, this will check the default paths for incoming
751 752 and outgoing changes. This can be time-consuming.
752 753
753 754 Returns 0 on success.
754 755
755 756 defined by: helpext
756 757
757 758 options:
758 759
759 760 --remote check for push and pull
760 761
761 762 (some details hidden, use --verbose to show complete help)
762 763
763 764 $ hg help shellalias
764 765 hg shellalias
765 766
766 767 shell alias for: echo hi
767 768
768 769 (no help text available)
769 770
770 771 defined by: helpext
771 772
772 773 (some details hidden, use --verbose to show complete help)
773 774
774 775 Test command with no help text
775 776
776 777 $ hg help nohelp
777 778 hg nohelp
778 779
779 780 (no help text available)
780 781
781 782 options:
782 783
783 784 --longdesc VALUE
784 785 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
785 786 xxxxxxxxxxxxxxxxxxxxxxx (default: 3)
786 787 -n -- normal desc
787 788 --newline VALUE line1 line2
788 789 --callableopt VALUE adds foo
789 790 --customopt VALUE adds bar
790 791 --customopt-withdefault VALUE adds bar (default: foo)
791 792
792 793 (some details hidden, use --verbose to show complete help)
793 794
794 795 $ hg help -k nohelp
795 796 Commands:
796 797
797 798 nohelp hg nohelp
798 799
799 800 Extension Commands:
800 801
801 802 nohelp (no help text available)
802 803
803 804 Test that default list of commands omits extension commands
804 805
805 806 #if no-extraextensions
806 807
807 808 $ hg help
808 809 Mercurial Distributed SCM
809 810
810 811 list of commands:
811 812
812 813 add add the specified files on the next commit
813 814 addremove add all new files, delete all missing files
814 815 annotate show changeset information by line for each file
815 816 archive create an unversioned archive of a repository revision
816 817 backout reverse effect of earlier changeset
817 818 bisect subdivision search of changesets
818 819 bookmarks create a new bookmark or list existing bookmarks
819 820 branch set or show the current branch name
820 821 branches list repository named branches
821 822 bundle create a bundle file
822 823 cat output the current or given revision of files
823 824 clone make a copy of an existing repository
824 825 commit commit the specified files or all outstanding changes
825 826 config show combined config settings from all hgrc files
826 827 copy mark files as copied for the next commit
827 828 diff diff repository (or selected files)
828 829 export dump the header and diffs for one or more changesets
829 830 files list tracked files
830 831 forget forget the specified files on the next commit
831 832 graft copy changes from other branches onto the current branch
832 833 grep search revision history for a pattern in specified files
833 834 heads show branch heads
834 835 help show help for a given topic or a help overview
835 836 identify identify the working directory or specified revision
836 837 import import an ordered set of patches
837 838 incoming show new changesets found in source
838 839 init create a new repository in the given directory
839 840 log show revision history of entire repository or files
840 841 manifest output the current or given revision of the project manifest
841 842 merge merge another revision into working directory
842 843 outgoing show changesets not found in the destination
843 844 paths show aliases for remote repositories
844 845 phase set or show the current phase name
845 846 pull pull changes from the specified source
846 847 push push changes to the specified destination
847 848 recover roll back an interrupted transaction
848 849 remove remove the specified files on the next commit
849 850 rename rename files; equivalent of copy + remove
850 851 resolve redo merges or set/view the merge status of files
851 852 revert restore files to their checkout state
852 853 root print the root (top) of the current working directory
853 854 serve start stand-alone webserver
854 855 status show changed files in the working directory
855 856 summary summarize working directory state
856 857 tag add one or more tags for the current or given revision
857 858 tags list repository tags
858 859 unbundle apply one or more bundle files
859 860 update update working directory (or switch revisions)
860 861 verify verify the integrity of the repository
861 862 version output version and copyright information
862 863
863 864 enabled extensions:
864 865
865 866 helpext (no help text available)
866 867
867 868 additional help topics:
868 869
869 870 bundlespec Bundle File Formats
870 871 color Colorizing Outputs
871 872 config Configuration Files
872 873 dates Date Formats
873 874 deprecated Deprecated Features
874 875 diffs Diff Formats
875 876 environment Environment Variables
876 877 extensions Using Additional Features
877 878 filesets Specifying File Sets
878 879 flags Command-line flags
879 880 glossary Glossary
880 881 hgignore Syntax for Mercurial Ignore Files
881 882 hgweb Configuring hgweb
882 883 internals Technical implementation topics
883 884 merge-tools Merge Tools
884 885 pager Pager Support
885 886 patterns File Name Patterns
886 887 phases Working with Phases
887 888 revisions Specifying Revisions
888 889 scripting Using Mercurial from scripts and automation
889 890 subrepos Subrepositories
890 891 templating Template Usage
891 892 urls URL Paths
892 893
893 894 (use 'hg help -v' to show built-in aliases and global options)
894 895
895 896 #endif
896 897
897 898 Test list of internal help commands
898 899
899 900 $ hg help debug
900 901 debug commands (internal and unsupported):
901 902
902 903 debugancestor
903 904 find the ancestor revision of two revisions in a given index
904 905 debugapplystreamclonebundle
905 906 apply a stream clone bundle file
906 907 debugbuilddag
907 908 builds a repo with a given DAG from scratch in the current
908 909 empty repo
909 910 debugbundle lists the contents of a bundle
910 911 debugcapabilities
911 912 lists the capabilities of a remote peer
912 913 debugcheckstate
913 914 validate the correctness of the current dirstate
914 915 debugcolor show available color, effects or style
915 916 debugcommands
916 917 list all available commands and options
917 918 debugcomplete
918 919 returns the completion list associated with the given command
919 920 debugcreatestreamclonebundle
920 921 create a stream clone bundle file
921 922 debugdag format the changelog or an index DAG as a concise textual
922 923 description
923 924 debugdata dump the contents of a data file revision
924 925 debugdate parse and display a date
925 926 debugdeltachain
926 927 dump information about delta chains in a revlog
927 928 debugdirstate
928 929 show the contents of the current dirstate
929 930 debugdiscovery
930 931 runs the changeset discovery protocol in isolation
931 932 debugdownload
932 933 download a resource using Mercurial logic and config
933 934 debugextensions
934 935 show information about active extensions
935 936 debugfileset parse and apply a fileset specification
936 937 debugformat display format information about the current repository
937 938 debugfsinfo show information detected about current filesystem
938 939 debuggetbundle
939 940 retrieves a bundle from a repo
940 941 debugignore display the combined ignore pattern and information about
941 942 ignored files
942 943 debugindex dump index data for a storage primitive
943 944 debugindexdot
944 945 dump an index DAG as a graphviz dot file
945 946 debugindexstats
946 947 show stats related to the changelog index
947 948 debuginstall test Mercurial installation
948 949 debugknown test whether node ids are known to a repo
949 950 debuglocks show or modify state of locks
950 951 debugmanifestfulltextcache
951 952 show, clear or amend the contents of the manifest fulltext
952 953 cache
953 954 debugmergestate
954 955 print merge state
955 956 debugnamecomplete
956 957 complete "names" - tags, open branch names, bookmark names
957 958 debugobsolete
958 959 create arbitrary obsolete marker
959 960 debugoptADV (no help text available)
960 961 debugoptDEP (no help text available)
961 962 debugoptEXP (no help text available)
962 963 debugpathcomplete
963 964 complete part or all of a tracked path
964 965 debugpeer establish a connection to a peer repository
965 966 debugpickmergetool
966 967 examine which merge tool is chosen for specified file
967 968 debugpushkey access the pushkey key/value protocol
968 969 debugpvec (no help text available)
969 970 debugrebuilddirstate
970 971 rebuild the dirstate as it would look like for the given
971 972 revision
972 973 debugrebuildfncache
973 974 rebuild the fncache file
974 975 debugrename dump rename information
975 976 debugrevlog show data and statistics about a revlog
976 977 debugrevlogindex
977 978 dump the contents of a revlog index
978 979 debugrevspec parse and apply a revision specification
979 980 debugserve run a server with advanced settings
980 981 debugsetparents
981 982 manually set the parents of the current working directory
982 983 debugssl test a secure connection to a server
983 984 debugsub (no help text available)
984 985 debugsuccessorssets
985 986 show set of successors for revision
986 987 debugtemplate
987 988 parse and apply a template
988 989 debuguigetpass
989 990 show prompt to type password
990 991 debuguiprompt
991 992 show plain prompt
992 993 debugupdatecaches
993 994 warm all known caches in the repository
994 995 debugupgraderepo
995 996 upgrade a repository to use different features
996 997 debugwalk show how files match on given patterns
997 998 debugwhyunstable
998 999 explain instabilities of a changeset
999 1000 debugwireargs
1000 1001 (no help text available)
1001 1002 debugwireproto
1002 1003 send wire protocol commands to a server
1003 1004
1004 1005 (use 'hg help -v debug' to show built-in aliases and global options)
1005 1006
1006 1007 internals topic renders index of available sub-topics
1007 1008
1008 1009 $ hg help internals
1009 1010 Technical implementation topics
1010 1011 """""""""""""""""""""""""""""""
1011 1012
1012 1013 To access a subtopic, use "hg help internals.{subtopic-name}"
1013 1014
1014 1015 bundle2 Bundle2
1015 1016 bundles Bundles
1016 1017 cbor CBOR
1017 1018 censor Censor
1018 1019 changegroups Changegroups
1019 1020 config Config Registrar
1020 1021 requirements Repository Requirements
1021 1022 revlogs Revision Logs
1022 1023 wireprotocol Wire Protocol
1023 1024 wireprotocolrpc
1024 1025 Wire Protocol RPC
1025 1026 wireprotocolv2
1026 1027 Wire Protocol Version 2
1027 1028
1028 1029 sub-topics can be accessed
1029 1030
1030 1031 $ hg help internals.changegroups
1031 1032 Changegroups
1032 1033 """"""""""""
1033 1034
1034 1035 Changegroups are representations of repository revlog data, specifically
1035 1036 the changelog data, root/flat manifest data, treemanifest data, and
1036 1037 filelogs.
1037 1038
1038 1039 There are 3 versions of changegroups: "1", "2", and "3". From a high-
1039 1040 level, versions "1" and "2" are almost exactly the same, with the only
1040 1041 difference being an additional item in the *delta header*. Version "3"
1041 1042 adds support for revlog flags in the *delta header* and optionally
1042 1043 exchanging treemanifests (enabled by setting an option on the
1043 1044 "changegroup" part in the bundle2).
1044 1045
1045 1046 Changegroups when not exchanging treemanifests consist of 3 logical
1046 1047 segments:
1047 1048
1048 1049 +---------------------------------+
1049 1050 | | | |
1050 1051 | changeset | manifest | filelogs |
1051 1052 | | | |
1052 1053 | | | |
1053 1054 +---------------------------------+
1054 1055
1055 1056 When exchanging treemanifests, there are 4 logical segments:
1056 1057
1057 1058 +-------------------------------------------------+
1058 1059 | | | | |
1059 1060 | changeset | root | treemanifests | filelogs |
1060 1061 | | manifest | | |
1061 1062 | | | | |
1062 1063 +-------------------------------------------------+
1063 1064
1064 1065 The principle building block of each segment is a *chunk*. A *chunk* is a
1065 1066 framed piece of data:
1066 1067
1067 1068 +---------------------------------------+
1068 1069 | | |
1069 1070 | length | data |
1070 1071 | (4 bytes) | (<length - 4> bytes) |
1071 1072 | | |
1072 1073 +---------------------------------------+
1073 1074
1074 1075 All integers are big-endian signed integers. Each chunk starts with a
1075 1076 32-bit integer indicating the length of the entire chunk (including the
1076 1077 length field itself).
1077 1078
1078 1079 There is a special case chunk that has a value of 0 for the length
1079 1080 ("0x00000000"). We call this an *empty chunk*.
1080 1081
1081 1082 Delta Groups
1082 1083 ============
1083 1084
1084 1085 A *delta group* expresses the content of a revlog as a series of deltas,
1085 1086 or patches against previous revisions.
1086 1087
1087 1088 Delta groups consist of 0 or more *chunks* followed by the *empty chunk*
1088 1089 to signal the end of the delta group:
1089 1090
1090 1091 +------------------------------------------------------------------------+
1091 1092 | | | | | |
1092 1093 | chunk0 length | chunk0 data | chunk1 length | chunk1 data | 0x0 |
1093 1094 | (4 bytes) | (various) | (4 bytes) | (various) | (4 bytes) |
1094 1095 | | | | | |
1095 1096 +------------------------------------------------------------------------+
1096 1097
1097 1098 Each *chunk*'s data consists of the following:
1098 1099
1099 1100 +---------------------------------------+
1100 1101 | | |
1101 1102 | delta header | delta data |
1102 1103 | (various by version) | (various) |
1103 1104 | | |
1104 1105 +---------------------------------------+
1105 1106
1106 1107 The *delta data* is a series of *delta*s that describe a diff from an
1107 1108 existing entry (either that the recipient already has, or previously
1108 1109 specified in the bundle/changegroup).
1109 1110
1110 1111 The *delta header* is different between versions "1", "2", and "3" of the
1111 1112 changegroup format.
1112 1113
1113 1114 Version 1 (headerlen=80):
1114 1115
1115 1116 +------------------------------------------------------+
1116 1117 | | | | |
1117 1118 | node | p1 node | p2 node | link node |
1118 1119 | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) |
1119 1120 | | | | |
1120 1121 +------------------------------------------------------+
1121 1122
1122 1123 Version 2 (headerlen=100):
1123 1124
1124 1125 +------------------------------------------------------------------+
1125 1126 | | | | | |
1126 1127 | node | p1 node | p2 node | base node | link node |
1127 1128 | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) |
1128 1129 | | | | | |
1129 1130 +------------------------------------------------------------------+
1130 1131
1131 1132 Version 3 (headerlen=102):
1132 1133
1133 1134 +------------------------------------------------------------------------------+
1134 1135 | | | | | | |
1135 1136 | node | p1 node | p2 node | base node | link node | flags |
1136 1137 | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) | (2 bytes) |
1137 1138 | | | | | | |
1138 1139 +------------------------------------------------------------------------------+
1139 1140
1140 1141 The *delta data* consists of "chunklen - 4 - headerlen" bytes, which
1141 1142 contain a series of *delta*s, densely packed (no separators). These deltas
1142 1143 describe a diff from an existing entry (either that the recipient already
1143 1144 has, or previously specified in the bundle/changegroup). The format is
1144 1145 described more fully in "hg help internals.bdiff", but briefly:
1145 1146
1146 1147 +---------------------------------------------------------------+
1147 1148 | | | | |
1148 1149 | start offset | end offset | new length | content |
1149 1150 | (4 bytes) | (4 bytes) | (4 bytes) | (<new length> bytes) |
1150 1151 | | | | |
1151 1152 +---------------------------------------------------------------+
1152 1153
1153 1154 Please note that the length field in the delta data does *not* include
1154 1155 itself.
1155 1156
1156 1157 In version 1, the delta is always applied against the previous node from
1157 1158 the changegroup or the first parent if this is the first entry in the
1158 1159 changegroup.
1159 1160
1160 1161 In version 2 and up, the delta base node is encoded in the entry in the
1161 1162 changegroup. This allows the delta to be expressed against any parent,
1162 1163 which can result in smaller deltas and more efficient encoding of data.
1163 1164
1164 1165 Changeset Segment
1165 1166 =================
1166 1167
1167 1168 The *changeset segment* consists of a single *delta group* holding
1168 1169 changelog data. The *empty chunk* at the end of the *delta group* denotes
1169 1170 the boundary to the *manifest segment*.
1170 1171
1171 1172 Manifest Segment
1172 1173 ================
1173 1174
1174 1175 The *manifest segment* consists of a single *delta group* holding manifest
1175 1176 data. If treemanifests are in use, it contains only the manifest for the
1176 1177 root directory of the repository. Otherwise, it contains the entire
1177 1178 manifest data. The *empty chunk* at the end of the *delta group* denotes
1178 1179 the boundary to the next segment (either the *treemanifests segment* or
1179 1180 the *filelogs segment*, depending on version and the request options).
1180 1181
1181 1182 Treemanifests Segment
1182 1183 ---------------------
1183 1184
1184 1185 The *treemanifests segment* only exists in changegroup version "3", and
1185 1186 only if the 'treemanifest' param is part of the bundle2 changegroup part
1186 1187 (it is not possible to use changegroup version 3 outside of bundle2).
1187 1188 Aside from the filenames in the *treemanifests segment* containing a
1188 1189 trailing "/" character, it behaves identically to the *filelogs segment*
1189 1190 (see below). The final sub-segment is followed by an *empty chunk*
1190 1191 (logically, a sub-segment with filename size 0). This denotes the boundary
1191 1192 to the *filelogs segment*.
1192 1193
1193 1194 Filelogs Segment
1194 1195 ================
1195 1196
1196 1197 The *filelogs segment* consists of multiple sub-segments, each
1197 1198 corresponding to an individual file whose data is being described:
1198 1199
1199 1200 +--------------------------------------------------+
1200 1201 | | | | | |
1201 1202 | filelog0 | filelog1 | filelog2 | ... | 0x0 |
1202 1203 | | | | | (4 bytes) |
1203 1204 | | | | | |
1204 1205 +--------------------------------------------------+
1205 1206
1206 1207 The final filelog sub-segment is followed by an *empty chunk* (logically,
1207 1208 a sub-segment with filename size 0). This denotes the end of the segment
1208 1209 and of the overall changegroup.
1209 1210
1210 1211 Each filelog sub-segment consists of the following:
1211 1212
1212 1213 +------------------------------------------------------+
1213 1214 | | | |
1214 1215 | filename length | filename | delta group |
1215 1216 | (4 bytes) | (<length - 4> bytes) | (various) |
1216 1217 | | | |
1217 1218 +------------------------------------------------------+
1218 1219
1219 1220 That is, a *chunk* consisting of the filename (not terminated or padded)
1220 1221 followed by N chunks constituting the *delta group* for this file. The
1221 1222 *empty chunk* at the end of each *delta group* denotes the boundary to the
1222 1223 next filelog sub-segment.
1223 1224
1224 1225 Test list of commands with command with no help text
1225 1226
1226 1227 $ hg help helpext
1227 1228 helpext extension - no help text available
1228 1229
1229 1230 list of commands:
1230 1231
1231 1232 nohelp (no help text available)
1232 1233
1233 1234 (use 'hg help -v helpext' to show built-in aliases and global options)
1234 1235
1235 1236
1236 1237 test advanced, deprecated and experimental options are hidden in command help
1237 1238 $ hg help debugoptADV
1238 1239 hg debugoptADV
1239 1240
1240 1241 (no help text available)
1241 1242
1242 1243 options:
1243 1244
1244 1245 (some details hidden, use --verbose to show complete help)
1245 1246 $ hg help debugoptDEP
1246 1247 hg debugoptDEP
1247 1248
1248 1249 (no help text available)
1249 1250
1250 1251 options:
1251 1252
1252 1253 (some details hidden, use --verbose to show complete help)
1253 1254
1254 1255 $ hg help debugoptEXP
1255 1256 hg debugoptEXP
1256 1257
1257 1258 (no help text available)
1258 1259
1259 1260 options:
1260 1261
1261 1262 (some details hidden, use --verbose to show complete help)
1262 1263
1263 1264 test advanced, deprecated and experimental options are shown with -v
1264 1265 $ hg help -v debugoptADV | grep aopt
1265 1266 --aopt option is (ADVANCED)
1266 1267 $ hg help -v debugoptDEP | grep dopt
1267 1268 --dopt option is (DEPRECATED)
1268 1269 $ hg help -v debugoptEXP | grep eopt
1269 1270 --eopt option is (EXPERIMENTAL)
1270 1271
1271 1272 #if gettext
1272 1273 test deprecated option is hidden with translation with untranslated description
1273 1274 (use many globy for not failing on changed transaction)
1274 1275 $ LANGUAGE=sv hg help debugoptDEP
1275 1276 hg debugoptDEP
1276 1277
1277 1278 (*) (glob)
1278 1279
1279 1280 options:
1280 1281
1281 1282 (some details hidden, use --verbose to show complete help)
1282 1283 #endif
1283 1284
1284 1285 Test commands that collide with topics (issue4240)
1285 1286
1286 1287 $ hg config -hq
1287 1288 hg config [-u] [NAME]...
1288 1289
1289 1290 show combined config settings from all hgrc files
1290 1291 $ hg showconfig -hq
1291 1292 hg config [-u] [NAME]...
1292 1293
1293 1294 show combined config settings from all hgrc files
1294 1295
1295 1296 Test a help topic
1296 1297
1297 1298 $ hg help dates
1298 1299 Date Formats
1299 1300 """"""""""""
1300 1301
1301 1302 Some commands allow the user to specify a date, e.g.:
1302 1303
1303 1304 - backout, commit, import, tag: Specify the commit date.
1304 1305 - log, revert, update: Select revision(s) by date.
1305 1306
1306 1307 Many date formats are valid. Here are some examples:
1307 1308
1308 1309 - "Wed Dec 6 13:18:29 2006" (local timezone assumed)
1309 1310 - "Dec 6 13:18 -0600" (year assumed, time offset provided)
1310 1311 - "Dec 6 13:18 UTC" (UTC and GMT are aliases for +0000)
1311 1312 - "Dec 6" (midnight)
1312 1313 - "13:18" (today assumed)
1313 1314 - "3:39" (3:39AM assumed)
1314 1315 - "3:39pm" (15:39)
1315 1316 - "2006-12-06 13:18:29" (ISO 8601 format)
1316 1317 - "2006-12-6 13:18"
1317 1318 - "2006-12-6"
1318 1319 - "12-6"
1319 1320 - "12/6"
1320 1321 - "12/6/6" (Dec 6 2006)
1321 1322 - "today" (midnight)
1322 1323 - "yesterday" (midnight)
1323 1324 - "now" - right now
1324 1325
1325 1326 Lastly, there is Mercurial's internal format:
1326 1327
1327 1328 - "1165411109 0" (Wed Dec 6 13:18:29 2006 UTC)
1328 1329
1329 1330 This is the internal representation format for dates. The first number is
1330 1331 the number of seconds since the epoch (1970-01-01 00:00 UTC). The second
1331 1332 is the offset of the local timezone, in seconds west of UTC (negative if
1332 1333 the timezone is east of UTC).
1333 1334
1334 1335 The log command also accepts date ranges:
1335 1336
1336 1337 - "<DATE" - at or before a given date/time
1337 1338 - ">DATE" - on or after a given date/time
1338 1339 - "DATE to DATE" - a date range, inclusive
1339 1340 - "-DAYS" - within a given number of days of today
1340 1341
1341 1342 Test repeated config section name
1342 1343
1343 1344 $ hg help config.host
1344 1345 "http_proxy.host"
1345 1346 Host name and (optional) port of the proxy server, for example
1346 1347 "myproxy:8000".
1347 1348
1348 1349 "smtp.host"
1349 1350 Host name of mail server, e.g. "mail.example.com".
1350 1351
1351 1352
1352 1353 Test section name with dot
1353 1354
1354 1355 $ hg help config.ui.username
1355 1356 "ui.username"
1356 1357 The committer of a changeset created when running "commit". Typically
1357 1358 a person's name and email address, e.g. "Fred Widget
1358 1359 <fred@example.com>". Environment variables in the username are
1359 1360 expanded.
1360 1361
1361 1362 (default: "$EMAIL" or "username@hostname". If the username in hgrc is
1362 1363 empty, e.g. if the system admin set "username =" in the system hgrc,
1363 1364 it has to be specified manually or in a different hgrc file)
1364 1365
1365 1366
1366 1367 $ hg help config.annotate.git
1367 1368 abort: help section not found: config.annotate.git
1368 1369 [255]
1369 1370
1370 1371 $ hg help config.update.check
1371 1372 "commands.update.check"
1372 1373 Determines what level of checking 'hg update' will perform before
1373 1374 moving to a destination revision. Valid values are "abort", "none",
1374 1375 "linear", and "noconflict". "abort" always fails if the working
1375 1376 directory has uncommitted changes. "none" performs no checking, and
1376 1377 may result in a merge with uncommitted changes. "linear" allows any
1377 1378 update as long as it follows a straight line in the revision history,
1378 1379 and may trigger a merge with uncommitted changes. "noconflict" will
1379 1380 allow any update which would not trigger a merge with uncommitted
1380 1381 changes, if any are present. (default: "linear")
1381 1382
1382 1383
1383 1384 $ hg help config.commands.update.check
1384 1385 "commands.update.check"
1385 1386 Determines what level of checking 'hg update' will perform before
1386 1387 moving to a destination revision. Valid values are "abort", "none",
1387 1388 "linear", and "noconflict". "abort" always fails if the working
1388 1389 directory has uncommitted changes. "none" performs no checking, and
1389 1390 may result in a merge with uncommitted changes. "linear" allows any
1390 1391 update as long as it follows a straight line in the revision history,
1391 1392 and may trigger a merge with uncommitted changes. "noconflict" will
1392 1393 allow any update which would not trigger a merge with uncommitted
1393 1394 changes, if any are present. (default: "linear")
1394 1395
1395 1396
1396 1397 $ hg help config.ommands.update.check
1397 1398 abort: help section not found: config.ommands.update.check
1398 1399 [255]
1399 1400
1400 1401 Unrelated trailing paragraphs shouldn't be included
1401 1402
1402 1403 $ hg help config.extramsg | grep '^$'
1403 1404
1404 1405
1405 1406 Test capitalized section name
1406 1407
1407 1408 $ hg help scripting.HGPLAIN > /dev/null
1408 1409
1409 1410 Help subsection:
1410 1411
1411 1412 $ hg help config.charsets |grep "Email example:" > /dev/null
1412 1413 [1]
1413 1414
1414 1415 Show nested definitions
1415 1416 ("profiling.type"[break]"ls"[break]"stat"[break])
1416 1417
1417 1418 $ hg help config.type | egrep '^$'|wc -l
1418 1419 \s*3 (re)
1419 1420
1420 1421 $ hg help config.profiling.type.ls
1421 1422 "profiling.type.ls"
1422 1423 Use Python's built-in instrumenting profiler. This profiler works on
1423 1424 all platforms, but each line number it reports is the first line of
1424 1425 a function. This restriction makes it difficult to identify the
1425 1426 expensive parts of a non-trivial function.
1426 1427
1427 1428
1428 1429 Separate sections from subsections
1429 1430
1430 1431 $ hg help config.format | egrep '^ ("|-)|^\s*$' | uniq
1431 1432 "format"
1432 1433 --------
1433 1434
1434 1435 "usegeneraldelta"
1435 1436
1436 1437 "dotencode"
1437 1438
1438 1439 "usefncache"
1439 1440
1440 1441 "usestore"
1441 1442
1442 1443 "profiling"
1443 1444 -----------
1444 1445
1445 1446 "format"
1446 1447
1447 1448 "progress"
1448 1449 ----------
1449 1450
1450 1451 "format"
1451 1452
1452 1453
1453 1454 Last item in help config.*:
1454 1455
1455 1456 $ hg help config.`hg help config|grep '^ "'| \
1456 1457 > tail -1|sed 's![ "]*!!g'`| \
1457 1458 > grep 'hg help -c config' > /dev/null
1458 1459 [1]
1459 1460
1460 1461 note to use help -c for general hg help config:
1461 1462
1462 1463 $ hg help config |grep 'hg help -c config' > /dev/null
1463 1464
1464 1465 Test templating help
1465 1466
1466 1467 $ hg help templating | egrep '(desc|diffstat|firstline|nonempty) '
1467 1468 desc String. The text of the changeset description.
1468 1469 diffstat String. Statistics of changes with the following format:
1469 1470 firstline Any text. Returns the first line of text.
1470 1471 nonempty Any text. Returns '(none)' if the string is empty.
1471 1472
1472 1473 Test deprecated items
1473 1474
1474 1475 $ hg help -v templating | grep currentbookmark
1475 1476 currentbookmark
1476 1477 $ hg help templating | (grep currentbookmark || true)
1477 1478
1478 1479 Test help hooks
1479 1480
1480 1481 $ cat > helphook1.py <<EOF
1481 1482 > from mercurial import help
1482 1483 >
1483 1484 > def rewrite(ui, topic, doc):
1484 1485 > return doc + '\nhelphook1\n'
1485 1486 >
1486 1487 > def extsetup(ui):
1487 1488 > help.addtopichook('revisions', rewrite)
1488 1489 > EOF
1489 1490 $ cat > helphook2.py <<EOF
1490 1491 > from mercurial import help
1491 1492 >
1492 1493 > def rewrite(ui, topic, doc):
1493 1494 > return doc + '\nhelphook2\n'
1494 1495 >
1495 1496 > def extsetup(ui):
1496 1497 > help.addtopichook('revisions', rewrite)
1497 1498 > EOF
1498 1499 $ echo '[extensions]' >> $HGRCPATH
1499 1500 $ echo "helphook1 = `pwd`/helphook1.py" >> $HGRCPATH
1500 1501 $ echo "helphook2 = `pwd`/helphook2.py" >> $HGRCPATH
1501 1502 $ hg help revsets | grep helphook
1502 1503 helphook1
1503 1504 helphook2
1504 1505
1505 1506 help -c should only show debug --debug
1506 1507
1507 1508 $ hg help -c --debug|egrep debug|wc -l|egrep '^\s*0\s*$'
1508 1509 [1]
1509 1510
1510 1511 help -c should only show deprecated for -v
1511 1512
1512 1513 $ hg help -c -v|egrep DEPRECATED|wc -l|egrep '^\s*0\s*$'
1513 1514 [1]
1514 1515
1515 1516 Test -s / --system
1516 1517
1517 1518 $ hg help config.files -s windows |grep 'etc/mercurial' | \
1518 1519 > wc -l | sed -e 's/ //g'
1519 1520 0
1520 1521 $ hg help config.files --system unix | grep 'USER' | \
1521 1522 > wc -l | sed -e 's/ //g'
1522 1523 0
1523 1524
1524 1525 Test -e / -c / -k combinations
1525 1526
1526 1527 $ hg help -c|egrep '^[A-Z].*:|^ debug'
1527 1528 Commands:
1528 1529 $ hg help -e|egrep '^[A-Z].*:|^ debug'
1529 1530 Extensions:
1530 1531 $ hg help -k|egrep '^[A-Z].*:|^ debug'
1531 1532 Topics:
1532 1533 Commands:
1533 1534 Extensions:
1534 1535 Extension Commands:
1535 1536 $ hg help -c schemes
1536 1537 abort: no such help topic: schemes
1537 1538 (try 'hg help --keyword schemes')
1538 1539 [255]
1539 1540 $ hg help -e schemes |head -1
1540 1541 schemes extension - extend schemes with shortcuts to repository swarms
1541 1542 $ hg help -c -k dates |egrep '^(Topics|Extensions|Commands):'
1542 1543 Commands:
1543 1544 $ hg help -e -k a |egrep '^(Topics|Extensions|Commands):'
1544 1545 Extensions:
1545 1546 $ hg help -e -c -k date |egrep '^(Topics|Extensions|Commands):'
1546 1547 Extensions:
1547 1548 Commands:
1548 1549 $ hg help -c commit > /dev/null
1549 1550 $ hg help -e -c commit > /dev/null
1550 1551 $ hg help -e commit
1551 1552 abort: no such help topic: commit
1552 1553 (try 'hg help --keyword commit')
1553 1554 [255]
1554 1555
1555 1556 Test keyword search help
1556 1557
1557 1558 $ cat > prefixedname.py <<EOF
1558 1559 > '''matched against word "clone"
1559 1560 > '''
1560 1561 > EOF
1561 1562 $ echo '[extensions]' >> $HGRCPATH
1562 1563 $ echo "dot.dot.prefixedname = `pwd`/prefixedname.py" >> $HGRCPATH
1563 1564 $ hg help -k clone
1564 1565 Topics:
1565 1566
1566 1567 config Configuration Files
1567 1568 extensions Using Additional Features
1568 1569 glossary Glossary
1569 1570 phases Working with Phases
1570 1571 subrepos Subrepositories
1571 1572 urls URL Paths
1572 1573
1573 1574 Commands:
1574 1575
1575 1576 bookmarks create a new bookmark or list existing bookmarks
1576 1577 clone make a copy of an existing repository
1577 1578 paths show aliases for remote repositories
1578 1579 pull pull changes from the specified source
1579 1580 update update working directory (or switch revisions)
1580 1581
1581 1582 Extensions:
1582 1583
1583 1584 clonebundles advertise pre-generated bundles to seed clones
1584 1585 narrow create clones which fetch history data for subset of files
1585 1586 (EXPERIMENTAL)
1586 1587 prefixedname matched against word "clone"
1587 1588 relink recreates hardlinks between repository clones
1588 1589
1589 1590 Extension Commands:
1590 1591
1591 1592 qclone clone main and patch repository at same time
1592 1593
1593 1594 Test unfound topic
1594 1595
1595 1596 $ hg help nonexistingtopicthatwillneverexisteverever
1596 1597 abort: no such help topic: nonexistingtopicthatwillneverexisteverever
1597 1598 (try 'hg help --keyword nonexistingtopicthatwillneverexisteverever')
1598 1599 [255]
1599 1600
1600 1601 Test unfound keyword
1601 1602
1602 1603 $ hg help --keyword nonexistingwordthatwillneverexisteverever
1603 1604 abort: no matches
1604 1605 (try 'hg help' for a list of topics)
1605 1606 [255]
1606 1607
1607 1608 Test omit indicating for help
1608 1609
1609 1610 $ cat > addverboseitems.py <<EOF
1610 1611 > '''extension to test omit indicating.
1611 1612 >
1612 1613 > This paragraph is never omitted (for extension)
1613 1614 >
1614 1615 > .. container:: verbose
1615 1616 >
1616 1617 > This paragraph is omitted,
1617 1618 > if :hg:\`help\` is invoked without \`\`-v\`\` (for extension)
1618 1619 >
1619 1620 > This paragraph is never omitted, too (for extension)
1620 1621 > '''
1621 1622 > from __future__ import absolute_import
1622 1623 > from mercurial import commands, help
1623 1624 > testtopic = """This paragraph is never omitted (for topic).
1624 1625 >
1625 1626 > .. container:: verbose
1626 1627 >
1627 1628 > This paragraph is omitted,
1628 1629 > if :hg:\`help\` is invoked without \`\`-v\`\` (for topic)
1629 1630 >
1630 1631 > This paragraph is never omitted, too (for topic)
1631 1632 > """
1632 1633 > def extsetup(ui):
1633 1634 > help.helptable.append((["topic-containing-verbose"],
1634 1635 > "This is the topic to test omit indicating.",
1635 1636 > lambda ui: testtopic))
1636 1637 > EOF
1637 1638 $ echo '[extensions]' >> $HGRCPATH
1638 1639 $ echo "addverboseitems = `pwd`/addverboseitems.py" >> $HGRCPATH
1639 1640 $ hg help addverboseitems
1640 1641 addverboseitems extension - extension to test omit indicating.
1641 1642
1642 1643 This paragraph is never omitted (for extension)
1643 1644
1644 1645 This paragraph is never omitted, too (for extension)
1645 1646
1646 1647 (some details hidden, use --verbose to show complete help)
1647 1648
1648 1649 no commands defined
1649 1650 $ hg help -v addverboseitems
1650 1651 addverboseitems extension - extension to test omit indicating.
1651 1652
1652 1653 This paragraph is never omitted (for extension)
1653 1654
1654 1655 This paragraph is omitted, if 'hg help' is invoked without "-v" (for
1655 1656 extension)
1656 1657
1657 1658 This paragraph is never omitted, too (for extension)
1658 1659
1659 1660 no commands defined
1660 1661 $ hg help topic-containing-verbose
1661 1662 This is the topic to test omit indicating.
1662 1663 """"""""""""""""""""""""""""""""""""""""""
1663 1664
1664 1665 This paragraph is never omitted (for topic).
1665 1666
1666 1667 This paragraph is never omitted, too (for topic)
1667 1668
1668 1669 (some details hidden, use --verbose to show complete help)
1669 1670 $ hg help -v topic-containing-verbose
1670 1671 This is the topic to test omit indicating.
1671 1672 """"""""""""""""""""""""""""""""""""""""""
1672 1673
1673 1674 This paragraph is never omitted (for topic).
1674 1675
1675 1676 This paragraph is omitted, if 'hg help' is invoked without "-v" (for
1676 1677 topic)
1677 1678
1678 1679 This paragraph is never omitted, too (for topic)
1679 1680
1680 1681 Test section lookup
1681 1682
1682 1683 $ hg help revset.merge
1683 1684 "merge()"
1684 1685 Changeset is a merge changeset.
1685 1686
1686 1687 $ hg help glossary.dag
1687 1688 DAG
1688 1689 The repository of changesets of a distributed version control system
1689 1690 (DVCS) can be described as a directed acyclic graph (DAG), consisting
1690 1691 of nodes and edges, where nodes correspond to changesets and edges
1691 1692 imply a parent -> child relation. This graph can be visualized by
1692 1693 graphical tools such as 'hg log --graph'. In Mercurial, the DAG is
1693 1694 limited by the requirement for children to have at most two parents.
1694 1695
1695 1696
1696 1697 $ hg help hgrc.paths
1697 1698 "paths"
1698 1699 -------
1699 1700
1700 1701 Assigns symbolic names and behavior to repositories.
1701 1702
1702 1703 Options are symbolic names defining the URL or directory that is the
1703 1704 location of the repository. Example:
1704 1705
1705 1706 [paths]
1706 1707 my_server = https://example.com/my_repo
1707 1708 local_path = /home/me/repo
1708 1709
1709 1710 These symbolic names can be used from the command line. To pull from
1710 1711 "my_server": 'hg pull my_server'. To push to "local_path": 'hg push
1711 1712 local_path'.
1712 1713
1713 1714 Options containing colons (":") denote sub-options that can influence
1714 1715 behavior for that specific path. Example:
1715 1716
1716 1717 [paths]
1717 1718 my_server = https://example.com/my_path
1718 1719 my_server:pushurl = ssh://example.com/my_path
1719 1720
1720 1721 The following sub-options can be defined:
1721 1722
1722 1723 "pushurl"
1723 1724 The URL to use for push operations. If not defined, the location
1724 1725 defined by the path's main entry is used.
1725 1726
1726 1727 "pushrev"
1727 1728 A revset defining which revisions to push by default.
1728 1729
1729 1730 When 'hg push' is executed without a "-r" argument, the revset defined
1730 1731 by this sub-option is evaluated to determine what to push.
1731 1732
1732 1733 For example, a value of "." will push the working directory's revision
1733 1734 by default.
1734 1735
1735 1736 Revsets specifying bookmarks will not result in the bookmark being
1736 1737 pushed.
1737 1738
1738 1739 The following special named paths exist:
1739 1740
1740 1741 "default"
1741 1742 The URL or directory to use when no source or remote is specified.
1742 1743
1743 1744 'hg clone' will automatically define this path to the location the
1744 1745 repository was cloned from.
1745 1746
1746 1747 "default-push"
1747 1748 (deprecated) The URL or directory for the default 'hg push' location.
1748 1749 "default:pushurl" should be used instead.
1749 1750
1750 1751 $ hg help glossary.mcguffin
1751 1752 abort: help section not found: glossary.mcguffin
1752 1753 [255]
1753 1754
1754 1755 $ hg help glossary.mc.guffin
1755 1756 abort: help section not found: glossary.mc.guffin
1756 1757 [255]
1757 1758
1758 1759 $ hg help template.files
1759 1760 files List of strings. All files modified, added, or removed by
1760 1761 this changeset.
1761 1762 files(pattern)
1762 1763 All files of the current changeset matching the pattern. See
1763 1764 'hg help patterns'.
1764 1765
1765 1766 Test section lookup by translated message
1766 1767
1767 1768 str.lower() instead of encoding.lower(str) on translated message might
1768 1769 make message meaningless, because some encoding uses 0x41(A) - 0x5a(Z)
1769 1770 as the second or later byte of multi-byte character.
1770 1771
1771 1772 For example, "\x8bL\x98^" (translation of "record" in ja_JP.cp932)
1772 1773 contains 0x4c (L). str.lower() replaces 0x4c(L) by 0x6c(l) and this
1773 1774 replacement makes message meaningless.
1774 1775
1775 1776 This tests that section lookup by translated string isn't broken by
1776 1777 such str.lower().
1777 1778
1778 1779 $ "$PYTHON" <<EOF
1779 1780 > def escape(s):
1780 1781 > return ''.join('\u%x' % ord(uc) for uc in s.decode('cp932'))
1781 1782 > # translation of "record" in ja_JP.cp932
1782 1783 > upper = "\x8bL\x98^"
1783 1784 > # str.lower()-ed section name should be treated as different one
1784 1785 > lower = "\x8bl\x98^"
1785 1786 > with open('ambiguous.py', 'w') as fp:
1786 1787 > fp.write("""# ambiguous section names in ja_JP.cp932
1787 1788 > u'''summary of extension
1788 1789 >
1789 1790 > %s
1790 1791 > ----
1791 1792 >
1792 1793 > Upper name should show only this message
1793 1794 >
1794 1795 > %s
1795 1796 > ----
1796 1797 >
1797 1798 > Lower name should show only this message
1798 1799 >
1799 1800 > subsequent section
1800 1801 > ------------------
1801 1802 >
1802 1803 > This should be hidden at 'hg help ambiguous' with section name.
1803 1804 > '''
1804 1805 > """ % (escape(upper), escape(lower)))
1805 1806 > EOF
1806 1807
1807 1808 $ cat >> $HGRCPATH <<EOF
1808 1809 > [extensions]
1809 1810 > ambiguous = ./ambiguous.py
1810 1811 > EOF
1811 1812
1812 1813 $ "$PYTHON" <<EOF | sh
1813 1814 > upper = "\x8bL\x98^"
1814 1815 > print("hg --encoding cp932 help -e ambiguous.%s" % upper)
1815 1816 > EOF
1816 1817 \x8bL\x98^ (esc)
1817 1818 ----
1818 1819
1819 1820 Upper name should show only this message
1820 1821
1821 1822
1822 1823 $ "$PYTHON" <<EOF | sh
1823 1824 > lower = "\x8bl\x98^"
1824 1825 > print("hg --encoding cp932 help -e ambiguous.%s" % lower)
1825 1826 > EOF
1826 1827 \x8bl\x98^ (esc)
1827 1828 ----
1828 1829
1829 1830 Lower name should show only this message
1830 1831
1831 1832
1832 1833 $ cat >> $HGRCPATH <<EOF
1833 1834 > [extensions]
1834 1835 > ambiguous = !
1835 1836 > EOF
1836 1837
1837 1838 Show help content of disabled extensions
1838 1839
1839 1840 $ cat >> $HGRCPATH <<EOF
1840 1841 > [extensions]
1841 1842 > ambiguous = !./ambiguous.py
1842 1843 > EOF
1843 1844 $ hg help -e ambiguous
1844 1845 ambiguous extension - (no help text available)
1845 1846
1846 1847 (use 'hg help extensions' for information on enabling extensions)
1847 1848
1848 1849 Test dynamic list of merge tools only shows up once
1849 1850 $ hg help merge-tools
1850 1851 Merge Tools
1851 1852 """""""""""
1852 1853
1853 1854 To merge files Mercurial uses merge tools.
1854 1855
1855 1856 A merge tool combines two different versions of a file into a merged file.
1856 1857 Merge tools are given the two files and the greatest common ancestor of
1857 1858 the two file versions, so they can determine the changes made on both
1858 1859 branches.
1859 1860
1860 1861 Merge tools are used both for 'hg resolve', 'hg merge', 'hg update', 'hg
1861 1862 backout' and in several extensions.
1862 1863
1863 1864 Usually, the merge tool tries to automatically reconcile the files by
1864 1865 combining all non-overlapping changes that occurred separately in the two
1865 1866 different evolutions of the same initial base file. Furthermore, some
1866 1867 interactive merge programs make it easier to manually resolve conflicting
1867 1868 merges, either in a graphical way, or by inserting some conflict markers.
1868 1869 Mercurial does not include any interactive merge programs but relies on
1869 1870 external tools for that.
1870 1871
1871 1872 Available merge tools
1872 1873 =====================
1873 1874
1874 1875 External merge tools and their properties are configured in the merge-
1875 1876 tools configuration section - see hgrc(5) - but they can often just be
1876 1877 named by their executable.
1877 1878
1878 1879 A merge tool is generally usable if its executable can be found on the
1879 1880 system and if it can handle the merge. The executable is found if it is an
1880 1881 absolute or relative executable path or the name of an application in the
1881 1882 executable search path. The tool is assumed to be able to handle the merge
1882 1883 if it can handle symlinks if the file is a symlink, if it can handle
1883 1884 binary files if the file is binary, and if a GUI is available if the tool
1884 1885 requires a GUI.
1885 1886
1886 1887 There are some internal merge tools which can be used. The internal merge
1887 1888 tools are:
1888 1889
1889 1890 ":dump"
1890 1891 Creates three versions of the files to merge, containing the contents of
1891 1892 local, other and base. These files can then be used to perform a merge
1892 1893 manually. If the file to be merged is named "a.txt", these files will
1893 1894 accordingly be named "a.txt.local", "a.txt.other" and "a.txt.base" and
1894 1895 they will be placed in the same directory as "a.txt".
1895 1896
1896 1897 This implies premerge. Therefore, files aren't dumped, if premerge runs
1897 1898 successfully. Use :forcedump to forcibly write files out.
1898 1899
1899 1900 (actual capabilities: binary, symlink)
1900 1901
1901 1902 ":fail"
1902 1903 Rather than attempting to merge files that were modified on both
1903 1904 branches, it marks them as unresolved. The resolve command must be used
1904 1905 to resolve these conflicts.
1905 1906
1906 1907 (actual capabilities: binary, symlink)
1907 1908
1908 1909 ":forcedump"
1909 1910 Creates three versions of the files as same as :dump, but omits
1910 1911 premerge.
1911 1912
1912 1913 (actual capabilities: binary, symlink)
1913 1914
1914 1915 ":local"
1915 1916 Uses the local 'p1()' version of files as the merged version.
1916 1917
1917 1918 (actual capabilities: binary, symlink)
1918 1919
1919 1920 ":merge"
1920 1921 Uses the internal non-interactive simple merge algorithm for merging
1921 1922 files. It will fail if there are any conflicts and leave markers in the
1922 1923 partially merged file. Markers will have two sections, one for each side
1923 1924 of merge.
1924 1925
1925 1926 ":merge-local"
1926 1927 Like :merge, but resolve all conflicts non-interactively in favor of the
1927 1928 local 'p1()' changes.
1928 1929
1929 1930 ":merge-other"
1930 1931 Like :merge, but resolve all conflicts non-interactively in favor of the
1931 1932 other 'p2()' changes.
1932 1933
1933 1934 ":merge3"
1934 1935 Uses the internal non-interactive simple merge algorithm for merging
1935 1936 files. It will fail if there are any conflicts and leave markers in the
1936 1937 partially merged file. Marker will have three sections, one from each
1937 1938 side of the merge and one for the base content.
1938 1939
1939 1940 ":other"
1940 1941 Uses the other 'p2()' version of files as the merged version.
1941 1942
1942 1943 (actual capabilities: binary, symlink)
1943 1944
1944 1945 ":prompt"
1945 1946 Asks the user which of the local 'p1()' or the other 'p2()' version to
1946 1947 keep as the merged version.
1947 1948
1948 1949 (actual capabilities: binary, symlink)
1949 1950
1950 1951 ":tagmerge"
1951 1952 Uses the internal tag merge algorithm (experimental).
1952 1953
1953 1954 ":union"
1954 1955 Uses the internal non-interactive simple merge algorithm for merging
1955 1956 files. It will use both left and right sides for conflict regions. No
1956 1957 markers are inserted.
1957 1958
1958 1959 Internal tools are always available and do not require a GUI but will by
1959 1960 default not handle symlinks or binary files. See next section for detail
1960 1961 about "actual capabilities" described above.
1961 1962
1962 1963 Choosing a merge tool
1963 1964 =====================
1964 1965
1965 1966 Mercurial uses these rules when deciding which merge tool to use:
1966 1967
1967 1968 1. If a tool has been specified with the --tool option to merge or
1968 1969 resolve, it is used. If it is the name of a tool in the merge-tools
1969 1970 configuration, its configuration is used. Otherwise the specified tool
1970 1971 must be executable by the shell.
1971 1972 2. If the "HGMERGE" environment variable is present, its value is used and
1972 1973 must be executable by the shell.
1973 1974 3. If the filename of the file to be merged matches any of the patterns in
1974 1975 the merge-patterns configuration section, the first usable merge tool
1975 1976 corresponding to a matching pattern is used.
1976 1977 4. If ui.merge is set it will be considered next. If the value is not the
1977 1978 name of a configured tool, the specified value is used and must be
1978 1979 executable by the shell. Otherwise the named tool is used if it is
1979 1980 usable.
1980 1981 5. If any usable merge tools are present in the merge-tools configuration
1981 1982 section, the one with the highest priority is used.
1982 1983 6. If a program named "hgmerge" can be found on the system, it is used -
1983 1984 but it will by default not be used for symlinks and binary files.
1984 1985 7. If the file to be merged is not binary and is not a symlink, then
1985 1986 internal ":merge" is used.
1986 1987 8. Otherwise, ":prompt" is used.
1987 1988
1988 1989 For historical reason, Mercurial treats merge tools as below while
1989 1990 examining rules above.
1990 1991
1991 1992 step specified via binary symlink
1992 1993 ----------------------------------
1993 1994 1. --tool o/o o/o
1994 1995 2. HGMERGE o/o o/o
1995 1996 3. merge-patterns o/o(*) x/?(*)
1996 1997 4. ui.merge x/?(*) x/?(*)
1997 1998
1998 1999 Each capability column indicates Mercurial behavior for internal/external
1999 2000 merge tools at examining each rule.
2000 2001
2001 2002 - "o": "assume that a tool has capability"
2002 2003 - "x": "assume that a tool does not have capability"
2003 2004 - "?": "check actual capability of a tool"
2004 2005
2005 2006 If "merge.strict-capability-check" configuration is true, Mercurial checks
2006 2007 capabilities of merge tools strictly in (*) cases above (= each capability
2007 2008 column becomes "?/?"). It is false by default for backward compatibility.
2008 2009
2009 2010 Note:
2010 2011 After selecting a merge program, Mercurial will by default attempt to
2011 2012 merge the files using a simple merge algorithm first. Only if it
2012 2013 doesn't succeed because of conflicting changes will Mercurial actually
2013 2014 execute the merge program. Whether to use the simple merge algorithm
2014 2015 first can be controlled by the premerge setting of the merge tool.
2015 2016 Premerge is enabled by default unless the file is binary or a symlink.
2016 2017
2017 2018 See the merge-tools and ui sections of hgrc(5) for details on the
2018 2019 configuration of merge tools.
2019 2020
2020 2021 Compression engines listed in `hg help bundlespec`
2021 2022
2022 2023 $ hg help bundlespec | grep gzip
2023 2024 "v1" bundles can only use the "gzip", "bzip2", and "none" compression
2024 2025 An algorithm that produces smaller bundles than "gzip".
2025 2026 This engine will likely produce smaller bundles than "gzip" but will be
2026 2027 "gzip"
2027 2028 better compression than "gzip". It also frequently yields better (?)
2028 2029
2029 2030 Test usage of section marks in help documents
2030 2031
2031 2032 $ cd "$TESTDIR"/../doc
2032 2033 $ "$PYTHON" check-seclevel.py
2033 2034 $ cd $TESTTMP
2034 2035
2035 2036 #if serve
2036 2037
2037 2038 Test the help pages in hgweb.
2038 2039
2039 2040 Dish up an empty repo; serve it cold.
2040 2041
2041 2042 $ hg init "$TESTTMP/test"
2042 2043 $ hg serve -R "$TESTTMP/test" -n test -p $HGPORT -d --pid-file=hg.pid
2043 2044 $ cat hg.pid >> $DAEMON_PIDS
2044 2045
2045 2046 $ get-with-headers.py $LOCALIP:$HGPORT "help"
2046 2047 200 Script output follows
2047 2048
2048 2049 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
2049 2050 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
2050 2051 <head>
2051 2052 <link rel="icon" href="/static/hgicon.png" type="image/png" />
2052 2053 <meta name="robots" content="index, nofollow" />
2053 2054 <link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
2054 2055 <script type="text/javascript" src="/static/mercurial.js"></script>
2055 2056
2056 2057 <title>Help: Index</title>
2057 2058 </head>
2058 2059 <body>
2059 2060
2060 2061 <div class="container">
2061 2062 <div class="menu">
2062 2063 <div class="logo">
2063 2064 <a href="https://mercurial-scm.org/">
2064 2065 <img src="/static/hglogo.png" alt="mercurial" /></a>
2065 2066 </div>
2066 2067 <ul>
2067 2068 <li><a href="/shortlog">log</a></li>
2068 2069 <li><a href="/graph">graph</a></li>
2069 2070 <li><a href="/tags">tags</a></li>
2070 2071 <li><a href="/bookmarks">bookmarks</a></li>
2071 2072 <li><a href="/branches">branches</a></li>
2072 2073 </ul>
2073 2074 <ul>
2074 2075 <li class="active">help</li>
2075 2076 </ul>
2076 2077 </div>
2077 2078
2078 2079 <div class="main">
2079 2080 <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2>
2080 2081
2081 2082 <form class="search" action="/log">
2082 2083
2083 2084 <p><input name="rev" id="search1" type="text" size="30" value="" /></p>
2084 2085 <div id="hint">Find changesets by keywords (author, files, the commit message), revision
2085 2086 number or hash, or <a href="/help/revsets">revset expression</a>.</div>
2086 2087 </form>
2087 2088 <table class="bigtable">
2088 2089 <tr><td colspan="2"><h2><a name="topics" href="#topics">Topics</a></h2></td></tr>
2089 2090
2090 2091 <tr><td>
2091 2092 <a href="/help/bundlespec">
2092 2093 bundlespec
2093 2094 </a>
2094 2095 </td><td>
2095 2096 Bundle File Formats
2096 2097 </td></tr>
2097 2098 <tr><td>
2098 2099 <a href="/help/color">
2099 2100 color
2100 2101 </a>
2101 2102 </td><td>
2102 2103 Colorizing Outputs
2103 2104 </td></tr>
2104 2105 <tr><td>
2105 2106 <a href="/help/config">
2106 2107 config
2107 2108 </a>
2108 2109 </td><td>
2109 2110 Configuration Files
2110 2111 </td></tr>
2111 2112 <tr><td>
2112 2113 <a href="/help/dates">
2113 2114 dates
2114 2115 </a>
2115 2116 </td><td>
2116 2117 Date Formats
2117 2118 </td></tr>
2118 2119 <tr><td>
2119 2120 <a href="/help/deprecated">
2120 2121 deprecated
2121 2122 </a>
2122 2123 </td><td>
2123 2124 Deprecated Features
2124 2125 </td></tr>
2125 2126 <tr><td>
2126 2127 <a href="/help/diffs">
2127 2128 diffs
2128 2129 </a>
2129 2130 </td><td>
2130 2131 Diff Formats
2131 2132 </td></tr>
2132 2133 <tr><td>
2133 2134 <a href="/help/environment">
2134 2135 environment
2135 2136 </a>
2136 2137 </td><td>
2137 2138 Environment Variables
2138 2139 </td></tr>
2139 2140 <tr><td>
2140 2141 <a href="/help/extensions">
2141 2142 extensions
2142 2143 </a>
2143 2144 </td><td>
2144 2145 Using Additional Features
2145 2146 </td></tr>
2146 2147 <tr><td>
2147 2148 <a href="/help/filesets">
2148 2149 filesets
2149 2150 </a>
2150 2151 </td><td>
2151 2152 Specifying File Sets
2152 2153 </td></tr>
2153 2154 <tr><td>
2154 2155 <a href="/help/flags">
2155 2156 flags
2156 2157 </a>
2157 2158 </td><td>
2158 2159 Command-line flags
2159 2160 </td></tr>
2160 2161 <tr><td>
2161 2162 <a href="/help/glossary">
2162 2163 glossary
2163 2164 </a>
2164 2165 </td><td>
2165 2166 Glossary
2166 2167 </td></tr>
2167 2168 <tr><td>
2168 2169 <a href="/help/hgignore">
2169 2170 hgignore
2170 2171 </a>
2171 2172 </td><td>
2172 2173 Syntax for Mercurial Ignore Files
2173 2174 </td></tr>
2174 2175 <tr><td>
2175 2176 <a href="/help/hgweb">
2176 2177 hgweb
2177 2178 </a>
2178 2179 </td><td>
2179 2180 Configuring hgweb
2180 2181 </td></tr>
2181 2182 <tr><td>
2182 2183 <a href="/help/internals">
2183 2184 internals
2184 2185 </a>
2185 2186 </td><td>
2186 2187 Technical implementation topics
2187 2188 </td></tr>
2188 2189 <tr><td>
2189 2190 <a href="/help/merge-tools">
2190 2191 merge-tools
2191 2192 </a>
2192 2193 </td><td>
2193 2194 Merge Tools
2194 2195 </td></tr>
2195 2196 <tr><td>
2196 2197 <a href="/help/pager">
2197 2198 pager
2198 2199 </a>
2199 2200 </td><td>
2200 2201 Pager Support
2201 2202 </td></tr>
2202 2203 <tr><td>
2203 2204 <a href="/help/patterns">
2204 2205 patterns
2205 2206 </a>
2206 2207 </td><td>
2207 2208 File Name Patterns
2208 2209 </td></tr>
2209 2210 <tr><td>
2210 2211 <a href="/help/phases">
2211 2212 phases
2212 2213 </a>
2213 2214 </td><td>
2214 2215 Working with Phases
2215 2216 </td></tr>
2216 2217 <tr><td>
2217 2218 <a href="/help/revisions">
2218 2219 revisions
2219 2220 </a>
2220 2221 </td><td>
2221 2222 Specifying Revisions
2222 2223 </td></tr>
2223 2224 <tr><td>
2224 2225 <a href="/help/scripting">
2225 2226 scripting
2226 2227 </a>
2227 2228 </td><td>
2228 2229 Using Mercurial from scripts and automation
2229 2230 </td></tr>
2230 2231 <tr><td>
2231 2232 <a href="/help/subrepos">
2232 2233 subrepos
2233 2234 </a>
2234 2235 </td><td>
2235 2236 Subrepositories
2236 2237 </td></tr>
2237 2238 <tr><td>
2238 2239 <a href="/help/templating">
2239 2240 templating
2240 2241 </a>
2241 2242 </td><td>
2242 2243 Template Usage
2243 2244 </td></tr>
2244 2245 <tr><td>
2245 2246 <a href="/help/urls">
2246 2247 urls
2247 2248 </a>
2248 2249 </td><td>
2249 2250 URL Paths
2250 2251 </td></tr>
2251 2252 <tr><td>
2252 2253 <a href="/help/topic-containing-verbose">
2253 2254 topic-containing-verbose
2254 2255 </a>
2255 2256 </td><td>
2256 2257 This is the topic to test omit indicating.
2257 2258 </td></tr>
2258 2259
2259 2260
2260 2261 <tr><td colspan="2"><h2><a name="main" href="#main">Main Commands</a></h2></td></tr>
2261 2262
2262 2263 <tr><td>
2263 2264 <a href="/help/add">
2264 2265 add
2265 2266 </a>
2266 2267 </td><td>
2267 2268 add the specified files on the next commit
2268 2269 </td></tr>
2269 2270 <tr><td>
2270 2271 <a href="/help/annotate">
2271 2272 annotate
2272 2273 </a>
2273 2274 </td><td>
2274 2275 show changeset information by line for each file
2275 2276 </td></tr>
2276 2277 <tr><td>
2277 2278 <a href="/help/clone">
2278 2279 clone
2279 2280 </a>
2280 2281 </td><td>
2281 2282 make a copy of an existing repository
2282 2283 </td></tr>
2283 2284 <tr><td>
2284 2285 <a href="/help/commit">
2285 2286 commit
2286 2287 </a>
2287 2288 </td><td>
2288 2289 commit the specified files or all outstanding changes
2289 2290 </td></tr>
2290 2291 <tr><td>
2291 2292 <a href="/help/diff">
2292 2293 diff
2293 2294 </a>
2294 2295 </td><td>
2295 2296 diff repository (or selected files)
2296 2297 </td></tr>
2297 2298 <tr><td>
2298 2299 <a href="/help/export">
2299 2300 export
2300 2301 </a>
2301 2302 </td><td>
2302 2303 dump the header and diffs for one or more changesets
2303 2304 </td></tr>
2304 2305 <tr><td>
2305 2306 <a href="/help/forget">
2306 2307 forget
2307 2308 </a>
2308 2309 </td><td>
2309 2310 forget the specified files on the next commit
2310 2311 </td></tr>
2311 2312 <tr><td>
2312 2313 <a href="/help/init">
2313 2314 init
2314 2315 </a>
2315 2316 </td><td>
2316 2317 create a new repository in the given directory
2317 2318 </td></tr>
2318 2319 <tr><td>
2319 2320 <a href="/help/log">
2320 2321 log
2321 2322 </a>
2322 2323 </td><td>
2323 2324 show revision history of entire repository or files
2324 2325 </td></tr>
2325 2326 <tr><td>
2326 2327 <a href="/help/merge">
2327 2328 merge
2328 2329 </a>
2329 2330 </td><td>
2330 2331 merge another revision into working directory
2331 2332 </td></tr>
2332 2333 <tr><td>
2333 2334 <a href="/help/pull">
2334 2335 pull
2335 2336 </a>
2336 2337 </td><td>
2337 2338 pull changes from the specified source
2338 2339 </td></tr>
2339 2340 <tr><td>
2340 2341 <a href="/help/push">
2341 2342 push
2342 2343 </a>
2343 2344 </td><td>
2344 2345 push changes to the specified destination
2345 2346 </td></tr>
2346 2347 <tr><td>
2347 2348 <a href="/help/remove">
2348 2349 remove
2349 2350 </a>
2350 2351 </td><td>
2351 2352 remove the specified files on the next commit
2352 2353 </td></tr>
2353 2354 <tr><td>
2354 2355 <a href="/help/serve">
2355 2356 serve
2356 2357 </a>
2357 2358 </td><td>
2358 2359 start stand-alone webserver
2359 2360 </td></tr>
2360 2361 <tr><td>
2361 2362 <a href="/help/status">
2362 2363 status
2363 2364 </a>
2364 2365 </td><td>
2365 2366 show changed files in the working directory
2366 2367 </td></tr>
2367 2368 <tr><td>
2368 2369 <a href="/help/summary">
2369 2370 summary
2370 2371 </a>
2371 2372 </td><td>
2372 2373 summarize working directory state
2373 2374 </td></tr>
2374 2375 <tr><td>
2375 2376 <a href="/help/update">
2376 2377 update
2377 2378 </a>
2378 2379 </td><td>
2379 2380 update working directory (or switch revisions)
2380 2381 </td></tr>
2381 2382
2382 2383
2383 2384
2384 2385 <tr><td colspan="2"><h2><a name="other" href="#other">Other Commands</a></h2></td></tr>
2385 2386
2386 2387 <tr><td>
2387 2388 <a href="/help/addremove">
2388 2389 addremove
2389 2390 </a>
2390 2391 </td><td>
2391 2392 add all new files, delete all missing files
2392 2393 </td></tr>
2393 2394 <tr><td>
2394 2395 <a href="/help/archive">
2395 2396 archive
2396 2397 </a>
2397 2398 </td><td>
2398 2399 create an unversioned archive of a repository revision
2399 2400 </td></tr>
2400 2401 <tr><td>
2401 2402 <a href="/help/backout">
2402 2403 backout
2403 2404 </a>
2404 2405 </td><td>
2405 2406 reverse effect of earlier changeset
2406 2407 </td></tr>
2407 2408 <tr><td>
2408 2409 <a href="/help/bisect">
2409 2410 bisect
2410 2411 </a>
2411 2412 </td><td>
2412 2413 subdivision search of changesets
2413 2414 </td></tr>
2414 2415 <tr><td>
2415 2416 <a href="/help/bookmarks">
2416 2417 bookmarks
2417 2418 </a>
2418 2419 </td><td>
2419 2420 create a new bookmark or list existing bookmarks
2420 2421 </td></tr>
2421 2422 <tr><td>
2422 2423 <a href="/help/branch">
2423 2424 branch
2424 2425 </a>
2425 2426 </td><td>
2426 2427 set or show the current branch name
2427 2428 </td></tr>
2428 2429 <tr><td>
2429 2430 <a href="/help/branches">
2430 2431 branches
2431 2432 </a>
2432 2433 </td><td>
2433 2434 list repository named branches
2434 2435 </td></tr>
2435 2436 <tr><td>
2436 2437 <a href="/help/bundle">
2437 2438 bundle
2438 2439 </a>
2439 2440 </td><td>
2440 2441 create a bundle file
2441 2442 </td></tr>
2442 2443 <tr><td>
2443 2444 <a href="/help/cat">
2444 2445 cat
2445 2446 </a>
2446 2447 </td><td>
2447 2448 output the current or given revision of files
2448 2449 </td></tr>
2449 2450 <tr><td>
2450 2451 <a href="/help/config">
2451 2452 config
2452 2453 </a>
2453 2454 </td><td>
2454 2455 show combined config settings from all hgrc files
2455 2456 </td></tr>
2456 2457 <tr><td>
2457 2458 <a href="/help/copy">
2458 2459 copy
2459 2460 </a>
2460 2461 </td><td>
2461 2462 mark files as copied for the next commit
2462 2463 </td></tr>
2463 2464 <tr><td>
2464 2465 <a href="/help/files">
2465 2466 files
2466 2467 </a>
2467 2468 </td><td>
2468 2469 list tracked files
2469 2470 </td></tr>
2470 2471 <tr><td>
2471 2472 <a href="/help/graft">
2472 2473 graft
2473 2474 </a>
2474 2475 </td><td>
2475 2476 copy changes from other branches onto the current branch
2476 2477 </td></tr>
2477 2478 <tr><td>
2478 2479 <a href="/help/grep">
2479 2480 grep
2480 2481 </a>
2481 2482 </td><td>
2482 2483 search revision history for a pattern in specified files
2483 2484 </td></tr>
2484 2485 <tr><td>
2485 2486 <a href="/help/heads">
2486 2487 heads
2487 2488 </a>
2488 2489 </td><td>
2489 2490 show branch heads
2490 2491 </td></tr>
2491 2492 <tr><td>
2492 2493 <a href="/help/help">
2493 2494 help
2494 2495 </a>
2495 2496 </td><td>
2496 2497 show help for a given topic or a help overview
2497 2498 </td></tr>
2498 2499 <tr><td>
2499 2500 <a href="/help/hgalias">
2500 2501 hgalias
2501 2502 </a>
2502 2503 </td><td>
2503 2504 summarize working directory state
2504 2505 </td></tr>
2505 2506 <tr><td>
2506 2507 <a href="/help/identify">
2507 2508 identify
2508 2509 </a>
2509 2510 </td><td>
2510 2511 identify the working directory or specified revision
2511 2512 </td></tr>
2512 2513 <tr><td>
2513 2514 <a href="/help/import">
2514 2515 import
2515 2516 </a>
2516 2517 </td><td>
2517 2518 import an ordered set of patches
2518 2519 </td></tr>
2519 2520 <tr><td>
2520 2521 <a href="/help/incoming">
2521 2522 incoming
2522 2523 </a>
2523 2524 </td><td>
2524 2525 show new changesets found in source
2525 2526 </td></tr>
2526 2527 <tr><td>
2527 2528 <a href="/help/manifest">
2528 2529 manifest
2529 2530 </a>
2530 2531 </td><td>
2531 2532 output the current or given revision of the project manifest
2532 2533 </td></tr>
2533 2534 <tr><td>
2534 2535 <a href="/help/nohelp">
2535 2536 nohelp
2536 2537 </a>
2537 2538 </td><td>
2538 2539 (no help text available)
2539 2540 </td></tr>
2540 2541 <tr><td>
2541 2542 <a href="/help/outgoing">
2542 2543 outgoing
2543 2544 </a>
2544 2545 </td><td>
2545 2546 show changesets not found in the destination
2546 2547 </td></tr>
2547 2548 <tr><td>
2548 2549 <a href="/help/paths">
2549 2550 paths
2550 2551 </a>
2551 2552 </td><td>
2552 2553 show aliases for remote repositories
2553 2554 </td></tr>
2554 2555 <tr><td>
2555 2556 <a href="/help/phase">
2556 2557 phase
2557 2558 </a>
2558 2559 </td><td>
2559 2560 set or show the current phase name
2560 2561 </td></tr>
2561 2562 <tr><td>
2562 2563 <a href="/help/recover">
2563 2564 recover
2564 2565 </a>
2565 2566 </td><td>
2566 2567 roll back an interrupted transaction
2567 2568 </td></tr>
2568 2569 <tr><td>
2569 2570 <a href="/help/rename">
2570 2571 rename
2571 2572 </a>
2572 2573 </td><td>
2573 2574 rename files; equivalent of copy + remove
2574 2575 </td></tr>
2575 2576 <tr><td>
2576 2577 <a href="/help/resolve">
2577 2578 resolve
2578 2579 </a>
2579 2580 </td><td>
2580 2581 redo merges or set/view the merge status of files
2581 2582 </td></tr>
2582 2583 <tr><td>
2583 2584 <a href="/help/revert">
2584 2585 revert
2585 2586 </a>
2586 2587 </td><td>
2587 2588 restore files to their checkout state
2588 2589 </td></tr>
2589 2590 <tr><td>
2590 2591 <a href="/help/root">
2591 2592 root
2592 2593 </a>
2593 2594 </td><td>
2594 2595 print the root (top) of the current working directory
2595 2596 </td></tr>
2596 2597 <tr><td>
2597 2598 <a href="/help/shellalias">
2598 2599 shellalias
2599 2600 </a>
2600 2601 </td><td>
2601 2602 (no help text available)
2602 2603 </td></tr>
2603 2604 <tr><td>
2604 2605 <a href="/help/tag">
2605 2606 tag
2606 2607 </a>
2607 2608 </td><td>
2608 2609 add one or more tags for the current or given revision
2609 2610 </td></tr>
2610 2611 <tr><td>
2611 2612 <a href="/help/tags">
2612 2613 tags
2613 2614 </a>
2614 2615 </td><td>
2615 2616 list repository tags
2616 2617 </td></tr>
2617 2618 <tr><td>
2618 2619 <a href="/help/unbundle">
2619 2620 unbundle
2620 2621 </a>
2621 2622 </td><td>
2622 2623 apply one or more bundle files
2623 2624 </td></tr>
2624 2625 <tr><td>
2625 2626 <a href="/help/verify">
2626 2627 verify
2627 2628 </a>
2628 2629 </td><td>
2629 2630 verify the integrity of the repository
2630 2631 </td></tr>
2631 2632 <tr><td>
2632 2633 <a href="/help/version">
2633 2634 version
2634 2635 </a>
2635 2636 </td><td>
2636 2637 output version and copyright information
2637 2638 </td></tr>
2638 2639
2639 2640
2640 2641 </table>
2641 2642 </div>
2642 2643 </div>
2643 2644
2644 2645
2645 2646
2646 2647 </body>
2647 2648 </html>
2648 2649
2649 2650
2650 2651 $ get-with-headers.py $LOCALIP:$HGPORT "help/add"
2651 2652 200 Script output follows
2652 2653
2653 2654 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
2654 2655 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
2655 2656 <head>
2656 2657 <link rel="icon" href="/static/hgicon.png" type="image/png" />
2657 2658 <meta name="robots" content="index, nofollow" />
2658 2659 <link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
2659 2660 <script type="text/javascript" src="/static/mercurial.js"></script>
2660 2661
2661 2662 <title>Help: add</title>
2662 2663 </head>
2663 2664 <body>
2664 2665
2665 2666 <div class="container">
2666 2667 <div class="menu">
2667 2668 <div class="logo">
2668 2669 <a href="https://mercurial-scm.org/">
2669 2670 <img src="/static/hglogo.png" alt="mercurial" /></a>
2670 2671 </div>
2671 2672 <ul>
2672 2673 <li><a href="/shortlog">log</a></li>
2673 2674 <li><a href="/graph">graph</a></li>
2674 2675 <li><a href="/tags">tags</a></li>
2675 2676 <li><a href="/bookmarks">bookmarks</a></li>
2676 2677 <li><a href="/branches">branches</a></li>
2677 2678 </ul>
2678 2679 <ul>
2679 2680 <li class="active"><a href="/help">help</a></li>
2680 2681 </ul>
2681 2682 </div>
2682 2683
2683 2684 <div class="main">
2684 2685 <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2>
2685 2686 <h3>Help: add</h3>
2686 2687
2687 2688 <form class="search" action="/log">
2688 2689
2689 2690 <p><input name="rev" id="search1" type="text" size="30" value="" /></p>
2690 2691 <div id="hint">Find changesets by keywords (author, files, the commit message), revision
2691 2692 number or hash, or <a href="/help/revsets">revset expression</a>.</div>
2692 2693 </form>
2693 2694 <div id="doc">
2694 2695 <p>
2695 2696 hg add [OPTION]... [FILE]...
2696 2697 </p>
2697 2698 <p>
2698 2699 add the specified files on the next commit
2699 2700 </p>
2700 2701 <p>
2701 2702 Schedule files to be version controlled and added to the
2702 2703 repository.
2703 2704 </p>
2704 2705 <p>
2705 2706 The files will be added to the repository at the next commit. To
2706 2707 undo an add before that, see 'hg forget'.
2707 2708 </p>
2708 2709 <p>
2709 2710 If no names are given, add all files to the repository (except
2710 2711 files matching &quot;.hgignore&quot;).
2711 2712 </p>
2712 2713 <p>
2713 2714 Examples:
2714 2715 </p>
2715 2716 <ul>
2716 2717 <li> New (unknown) files are added automatically by 'hg add':
2717 2718 <pre>
2718 2719 \$ ls (re)
2719 2720 foo.c
2720 2721 \$ hg status (re)
2721 2722 ? foo.c
2722 2723 \$ hg add (re)
2723 2724 adding foo.c
2724 2725 \$ hg status (re)
2725 2726 A foo.c
2726 2727 </pre>
2727 2728 <li> Specific files to be added can be specified:
2728 2729 <pre>
2729 2730 \$ ls (re)
2730 2731 bar.c foo.c
2731 2732 \$ hg status (re)
2732 2733 ? bar.c
2733 2734 ? foo.c
2734 2735 \$ hg add bar.c (re)
2735 2736 \$ hg status (re)
2736 2737 A bar.c
2737 2738 ? foo.c
2738 2739 </pre>
2739 2740 </ul>
2740 2741 <p>
2741 2742 Returns 0 if all files are successfully added.
2742 2743 </p>
2743 2744 <p>
2744 2745 options ([+] can be repeated):
2745 2746 </p>
2746 2747 <table>
2747 2748 <tr><td>-I</td>
2748 2749 <td>--include PATTERN [+]</td>
2749 2750 <td>include names matching the given patterns</td></tr>
2750 2751 <tr><td>-X</td>
2751 2752 <td>--exclude PATTERN [+]</td>
2752 2753 <td>exclude names matching the given patterns</td></tr>
2753 2754 <tr><td>-S</td>
2754 2755 <td>--subrepos</td>
2755 2756 <td>recurse into subrepositories</td></tr>
2756 2757 <tr><td>-n</td>
2757 2758 <td>--dry-run</td>
2758 2759 <td>do not perform actions, just print output</td></tr>
2759 2760 </table>
2760 2761 <p>
2761 2762 global options ([+] can be repeated):
2762 2763 </p>
2763 2764 <table>
2764 2765 <tr><td>-R</td>
2765 2766 <td>--repository REPO</td>
2766 2767 <td>repository root directory or name of overlay bundle file</td></tr>
2767 2768 <tr><td></td>
2768 2769 <td>--cwd DIR</td>
2769 2770 <td>change working directory</td></tr>
2770 2771 <tr><td>-y</td>
2771 2772 <td>--noninteractive</td>
2772 2773 <td>do not prompt, automatically pick the first choice for all prompts</td></tr>
2773 2774 <tr><td>-q</td>
2774 2775 <td>--quiet</td>
2775 2776 <td>suppress output</td></tr>
2776 2777 <tr><td>-v</td>
2777 2778 <td>--verbose</td>
2778 2779 <td>enable additional output</td></tr>
2779 2780 <tr><td></td>
2780 2781 <td>--color TYPE</td>
2781 2782 <td>when to colorize (boolean, always, auto, never, or debug)</td></tr>
2782 2783 <tr><td></td>
2783 2784 <td>--config CONFIG [+]</td>
2784 2785 <td>set/override config option (use 'section.name=value')</td></tr>
2785 2786 <tr><td></td>
2786 2787 <td>--debug</td>
2787 2788 <td>enable debugging output</td></tr>
2788 2789 <tr><td></td>
2789 2790 <td>--debugger</td>
2790 2791 <td>start debugger</td></tr>
2791 2792 <tr><td></td>
2792 2793 <td>--encoding ENCODE</td>
2793 2794 <td>set the charset encoding (default: ascii)</td></tr>
2794 2795 <tr><td></td>
2795 2796 <td>--encodingmode MODE</td>
2796 2797 <td>set the charset encoding mode (default: strict)</td></tr>
2797 2798 <tr><td></td>
2798 2799 <td>--traceback</td>
2799 2800 <td>always print a traceback on exception</td></tr>
2800 2801 <tr><td></td>
2801 2802 <td>--time</td>
2802 2803 <td>time how long the command takes</td></tr>
2803 2804 <tr><td></td>
2804 2805 <td>--profile</td>
2805 2806 <td>print command execution profile</td></tr>
2806 2807 <tr><td></td>
2807 2808 <td>--version</td>
2808 2809 <td>output version information and exit</td></tr>
2809 2810 <tr><td>-h</td>
2810 2811 <td>--help</td>
2811 2812 <td>display help and exit</td></tr>
2812 2813 <tr><td></td>
2813 2814 <td>--hidden</td>
2814 2815 <td>consider hidden changesets</td></tr>
2815 2816 <tr><td></td>
2816 2817 <td>--pager TYPE</td>
2817 2818 <td>when to paginate (boolean, always, auto, or never) (default: auto)</td></tr>
2818 2819 </table>
2819 2820
2820 2821 </div>
2821 2822 </div>
2822 2823 </div>
2823 2824
2824 2825
2825 2826
2826 2827 </body>
2827 2828 </html>
2828 2829
2829 2830
2830 2831 $ get-with-headers.py $LOCALIP:$HGPORT "help/remove"
2831 2832 200 Script output follows
2832 2833
2833 2834 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
2834 2835 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
2835 2836 <head>
2836 2837 <link rel="icon" href="/static/hgicon.png" type="image/png" />
2837 2838 <meta name="robots" content="index, nofollow" />
2838 2839 <link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
2839 2840 <script type="text/javascript" src="/static/mercurial.js"></script>
2840 2841
2841 2842 <title>Help: remove</title>
2842 2843 </head>
2843 2844 <body>
2844 2845
2845 2846 <div class="container">
2846 2847 <div class="menu">
2847 2848 <div class="logo">
2848 2849 <a href="https://mercurial-scm.org/">
2849 2850 <img src="/static/hglogo.png" alt="mercurial" /></a>
2850 2851 </div>
2851 2852 <ul>
2852 2853 <li><a href="/shortlog">log</a></li>
2853 2854 <li><a href="/graph">graph</a></li>
2854 2855 <li><a href="/tags">tags</a></li>
2855 2856 <li><a href="/bookmarks">bookmarks</a></li>
2856 2857 <li><a href="/branches">branches</a></li>
2857 2858 </ul>
2858 2859 <ul>
2859 2860 <li class="active"><a href="/help">help</a></li>
2860 2861 </ul>
2861 2862 </div>
2862 2863
2863 2864 <div class="main">
2864 2865 <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2>
2865 2866 <h3>Help: remove</h3>
2866 2867
2867 2868 <form class="search" action="/log">
2868 2869
2869 2870 <p><input name="rev" id="search1" type="text" size="30" value="" /></p>
2870 2871 <div id="hint">Find changesets by keywords (author, files, the commit message), revision
2871 2872 number or hash, or <a href="/help/revsets">revset expression</a>.</div>
2872 2873 </form>
2873 2874 <div id="doc">
2874 2875 <p>
2875 2876 hg remove [OPTION]... FILE...
2876 2877 </p>
2877 2878 <p>
2878 2879 aliases: rm
2879 2880 </p>
2880 2881 <p>
2881 2882 remove the specified files on the next commit
2882 2883 </p>
2883 2884 <p>
2884 2885 Schedule the indicated files for removal from the current branch.
2885 2886 </p>
2886 2887 <p>
2887 2888 This command schedules the files to be removed at the next commit.
2888 2889 To undo a remove before that, see 'hg revert'. To undo added
2889 2890 files, see 'hg forget'.
2890 2891 </p>
2891 2892 <p>
2892 2893 -A/--after can be used to remove only files that have already
2893 2894 been deleted, -f/--force can be used to force deletion, and -Af
2894 2895 can be used to remove files from the next revision without
2895 2896 deleting them from the working directory.
2896 2897 </p>
2897 2898 <p>
2898 2899 The following table details the behavior of remove for different
2899 2900 file states (columns) and option combinations (rows). The file
2900 2901 states are Added [A], Clean [C], Modified [M] and Missing [!]
2901 2902 (as reported by 'hg status'). The actions are Warn, Remove
2902 2903 (from branch) and Delete (from disk):
2903 2904 </p>
2904 2905 <table>
2905 2906 <tr><td>opt/state</td>
2906 2907 <td>A</td>
2907 2908 <td>C</td>
2908 2909 <td>M</td>
2909 2910 <td>!</td></tr>
2910 2911 <tr><td>none</td>
2911 2912 <td>W</td>
2912 2913 <td>RD</td>
2913 2914 <td>W</td>
2914 2915 <td>R</td></tr>
2915 2916 <tr><td>-f</td>
2916 2917 <td>R</td>
2917 2918 <td>RD</td>
2918 2919 <td>RD</td>
2919 2920 <td>R</td></tr>
2920 2921 <tr><td>-A</td>
2921 2922 <td>W</td>
2922 2923 <td>W</td>
2923 2924 <td>W</td>
2924 2925 <td>R</td></tr>
2925 2926 <tr><td>-Af</td>
2926 2927 <td>R</td>
2927 2928 <td>R</td>
2928 2929 <td>R</td>
2929 2930 <td>R</td></tr>
2930 2931 </table>
2931 2932 <p>
2932 2933 <b>Note:</b>
2933 2934 </p>
2934 2935 <p>
2935 2936 'hg remove' never deletes files in Added [A] state from the
2936 2937 working directory, not even if &quot;--force&quot; is specified.
2937 2938 </p>
2938 2939 <p>
2939 2940 Returns 0 on success, 1 if any warnings encountered.
2940 2941 </p>
2941 2942 <p>
2942 2943 options ([+] can be repeated):
2943 2944 </p>
2944 2945 <table>
2945 2946 <tr><td>-A</td>
2946 2947 <td>--after</td>
2947 2948 <td>record delete for missing files</td></tr>
2948 2949 <tr><td>-f</td>
2949 2950 <td>--force</td>
2950 2951 <td>forget added files, delete modified files</td></tr>
2951 2952 <tr><td>-S</td>
2952 2953 <td>--subrepos</td>
2953 2954 <td>recurse into subrepositories</td></tr>
2954 2955 <tr><td>-I</td>
2955 2956 <td>--include PATTERN [+]</td>
2956 2957 <td>include names matching the given patterns</td></tr>
2957 2958 <tr><td>-X</td>
2958 2959 <td>--exclude PATTERN [+]</td>
2959 2960 <td>exclude names matching the given patterns</td></tr>
2960 2961 <tr><td>-n</td>
2961 2962 <td>--dry-run</td>
2962 2963 <td>do not perform actions, just print output</td></tr>
2963 2964 </table>
2964 2965 <p>
2965 2966 global options ([+] can be repeated):
2966 2967 </p>
2967 2968 <table>
2968 2969 <tr><td>-R</td>
2969 2970 <td>--repository REPO</td>
2970 2971 <td>repository root directory or name of overlay bundle file</td></tr>
2971 2972 <tr><td></td>
2972 2973 <td>--cwd DIR</td>
2973 2974 <td>change working directory</td></tr>
2974 2975 <tr><td>-y</td>
2975 2976 <td>--noninteractive</td>
2976 2977 <td>do not prompt, automatically pick the first choice for all prompts</td></tr>
2977 2978 <tr><td>-q</td>
2978 2979 <td>--quiet</td>
2979 2980 <td>suppress output</td></tr>
2980 2981 <tr><td>-v</td>
2981 2982 <td>--verbose</td>
2982 2983 <td>enable additional output</td></tr>
2983 2984 <tr><td></td>
2984 2985 <td>--color TYPE</td>
2985 2986 <td>when to colorize (boolean, always, auto, never, or debug)</td></tr>
2986 2987 <tr><td></td>
2987 2988 <td>--config CONFIG [+]</td>
2988 2989 <td>set/override config option (use 'section.name=value')</td></tr>
2989 2990 <tr><td></td>
2990 2991 <td>--debug</td>
2991 2992 <td>enable debugging output</td></tr>
2992 2993 <tr><td></td>
2993 2994 <td>--debugger</td>
2994 2995 <td>start debugger</td></tr>
2995 2996 <tr><td></td>
2996 2997 <td>--encoding ENCODE</td>
2997 2998 <td>set the charset encoding (default: ascii)</td></tr>
2998 2999 <tr><td></td>
2999 3000 <td>--encodingmode MODE</td>
3000 3001 <td>set the charset encoding mode (default: strict)</td></tr>
3001 3002 <tr><td></td>
3002 3003 <td>--traceback</td>
3003 3004 <td>always print a traceback on exception</td></tr>
3004 3005 <tr><td></td>
3005 3006 <td>--time</td>
3006 3007 <td>time how long the command takes</td></tr>
3007 3008 <tr><td></td>
3008 3009 <td>--profile</td>
3009 3010 <td>print command execution profile</td></tr>
3010 3011 <tr><td></td>
3011 3012 <td>--version</td>
3012 3013 <td>output version information and exit</td></tr>
3013 3014 <tr><td>-h</td>
3014 3015 <td>--help</td>
3015 3016 <td>display help and exit</td></tr>
3016 3017 <tr><td></td>
3017 3018 <td>--hidden</td>
3018 3019 <td>consider hidden changesets</td></tr>
3019 3020 <tr><td></td>
3020 3021 <td>--pager TYPE</td>
3021 3022 <td>when to paginate (boolean, always, auto, or never) (default: auto)</td></tr>
3022 3023 </table>
3023 3024
3024 3025 </div>
3025 3026 </div>
3026 3027 </div>
3027 3028
3028 3029
3029 3030
3030 3031 </body>
3031 3032 </html>
3032 3033
3033 3034
3034 3035 $ get-with-headers.py $LOCALIP:$HGPORT "help/dates"
3035 3036 200 Script output follows
3036 3037
3037 3038 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
3038 3039 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
3039 3040 <head>
3040 3041 <link rel="icon" href="/static/hgicon.png" type="image/png" />
3041 3042 <meta name="robots" content="index, nofollow" />
3042 3043 <link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
3043 3044 <script type="text/javascript" src="/static/mercurial.js"></script>
3044 3045
3045 3046 <title>Help: dates</title>
3046 3047 </head>
3047 3048 <body>
3048 3049
3049 3050 <div class="container">
3050 3051 <div class="menu">
3051 3052 <div class="logo">
3052 3053 <a href="https://mercurial-scm.org/">
3053 3054 <img src="/static/hglogo.png" alt="mercurial" /></a>
3054 3055 </div>
3055 3056 <ul>
3056 3057 <li><a href="/shortlog">log</a></li>
3057 3058 <li><a href="/graph">graph</a></li>
3058 3059 <li><a href="/tags">tags</a></li>
3059 3060 <li><a href="/bookmarks">bookmarks</a></li>
3060 3061 <li><a href="/branches">branches</a></li>
3061 3062 </ul>
3062 3063 <ul>
3063 3064 <li class="active"><a href="/help">help</a></li>
3064 3065 </ul>
3065 3066 </div>
3066 3067
3067 3068 <div class="main">
3068 3069 <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2>
3069 3070 <h3>Help: dates</h3>
3070 3071
3071 3072 <form class="search" action="/log">
3072 3073
3073 3074 <p><input name="rev" id="search1" type="text" size="30" value="" /></p>
3074 3075 <div id="hint">Find changesets by keywords (author, files, the commit message), revision
3075 3076 number or hash, or <a href="/help/revsets">revset expression</a>.</div>
3076 3077 </form>
3077 3078 <div id="doc">
3078 3079 <h1>Date Formats</h1>
3079 3080 <p>
3080 3081 Some commands allow the user to specify a date, e.g.:
3081 3082 </p>
3082 3083 <ul>
3083 3084 <li> backout, commit, import, tag: Specify the commit date.
3084 3085 <li> log, revert, update: Select revision(s) by date.
3085 3086 </ul>
3086 3087 <p>
3087 3088 Many date formats are valid. Here are some examples:
3088 3089 </p>
3089 3090 <ul>
3090 3091 <li> &quot;Wed Dec 6 13:18:29 2006&quot; (local timezone assumed)
3091 3092 <li> &quot;Dec 6 13:18 -0600&quot; (year assumed, time offset provided)
3092 3093 <li> &quot;Dec 6 13:18 UTC&quot; (UTC and GMT are aliases for +0000)
3093 3094 <li> &quot;Dec 6&quot; (midnight)
3094 3095 <li> &quot;13:18&quot; (today assumed)
3095 3096 <li> &quot;3:39&quot; (3:39AM assumed)
3096 3097 <li> &quot;3:39pm&quot; (15:39)
3097 3098 <li> &quot;2006-12-06 13:18:29&quot; (ISO 8601 format)
3098 3099 <li> &quot;2006-12-6 13:18&quot;
3099 3100 <li> &quot;2006-12-6&quot;
3100 3101 <li> &quot;12-6&quot;
3101 3102 <li> &quot;12/6&quot;
3102 3103 <li> &quot;12/6/6&quot; (Dec 6 2006)
3103 3104 <li> &quot;today&quot; (midnight)
3104 3105 <li> &quot;yesterday&quot; (midnight)
3105 3106 <li> &quot;now&quot; - right now
3106 3107 </ul>
3107 3108 <p>
3108 3109 Lastly, there is Mercurial's internal format:
3109 3110 </p>
3110 3111 <ul>
3111 3112 <li> &quot;1165411109 0&quot; (Wed Dec 6 13:18:29 2006 UTC)
3112 3113 </ul>
3113 3114 <p>
3114 3115 This is the internal representation format for dates. The first number
3115 3116 is the number of seconds since the epoch (1970-01-01 00:00 UTC). The
3116 3117 second is the offset of the local timezone, in seconds west of UTC
3117 3118 (negative if the timezone is east of UTC).
3118 3119 </p>
3119 3120 <p>
3120 3121 The log command also accepts date ranges:
3121 3122 </p>
3122 3123 <ul>
3123 3124 <li> &quot;&lt;DATE&quot; - at or before a given date/time
3124 3125 <li> &quot;&gt;DATE&quot; - on or after a given date/time
3125 3126 <li> &quot;DATE to DATE&quot; - a date range, inclusive
3126 3127 <li> &quot;-DAYS&quot; - within a given number of days of today
3127 3128 </ul>
3128 3129
3129 3130 </div>
3130 3131 </div>
3131 3132 </div>
3132 3133
3133 3134
3134 3135
3135 3136 </body>
3136 3137 </html>
3137 3138
3138 3139
3139 3140 $ get-with-headers.py $LOCALIP:$HGPORT "help/pager"
3140 3141 200 Script output follows
3141 3142
3142 3143 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
3143 3144 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
3144 3145 <head>
3145 3146 <link rel="icon" href="/static/hgicon.png" type="image/png" />
3146 3147 <meta name="robots" content="index, nofollow" />
3147 3148 <link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
3148 3149 <script type="text/javascript" src="/static/mercurial.js"></script>
3149 3150
3150 3151 <title>Help: pager</title>
3151 3152 </head>
3152 3153 <body>
3153 3154
3154 3155 <div class="container">
3155 3156 <div class="menu">
3156 3157 <div class="logo">
3157 3158 <a href="https://mercurial-scm.org/">
3158 3159 <img src="/static/hglogo.png" alt="mercurial" /></a>
3159 3160 </div>
3160 3161 <ul>
3161 3162 <li><a href="/shortlog">log</a></li>
3162 3163 <li><a href="/graph">graph</a></li>
3163 3164 <li><a href="/tags">tags</a></li>
3164 3165 <li><a href="/bookmarks">bookmarks</a></li>
3165 3166 <li><a href="/branches">branches</a></li>
3166 3167 </ul>
3167 3168 <ul>
3168 3169 <li class="active"><a href="/help">help</a></li>
3169 3170 </ul>
3170 3171 </div>
3171 3172
3172 3173 <div class="main">
3173 3174 <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2>
3174 3175 <h3>Help: pager</h3>
3175 3176
3176 3177 <form class="search" action="/log">
3177 3178
3178 3179 <p><input name="rev" id="search1" type="text" size="30" value="" /></p>
3179 3180 <div id="hint">Find changesets by keywords (author, files, the commit message), revision
3180 3181 number or hash, or <a href="/help/revsets">revset expression</a>.</div>
3181 3182 </form>
3182 3183 <div id="doc">
3183 3184 <h1>Pager Support</h1>
3184 3185 <p>
3185 3186 Some Mercurial commands can produce a lot of output, and Mercurial will
3186 3187 attempt to use a pager to make those commands more pleasant.
3187 3188 </p>
3188 3189 <p>
3189 3190 To set the pager that should be used, set the application variable:
3190 3191 </p>
3191 3192 <pre>
3192 3193 [pager]
3193 3194 pager = less -FRX
3194 3195 </pre>
3195 3196 <p>
3196 3197 If no pager is set in the user or repository configuration, Mercurial uses the
3197 3198 environment variable $PAGER. If $PAGER is not set, pager.pager from the default
3198 3199 or system configuration is used. If none of these are set, a default pager will
3199 3200 be used, typically 'less' on Unix and 'more' on Windows.
3200 3201 </p>
3201 3202 <p>
3202 3203 You can disable the pager for certain commands by adding them to the
3203 3204 pager.ignore list:
3204 3205 </p>
3205 3206 <pre>
3206 3207 [pager]
3207 3208 ignore = version, help, update
3208 3209 </pre>
3209 3210 <p>
3210 3211 To ignore global commands like 'hg version' or 'hg help', you have
3211 3212 to specify them in your user configuration file.
3212 3213 </p>
3213 3214 <p>
3214 3215 To control whether the pager is used at all for an individual command,
3215 3216 you can use --pager=&lt;value&gt;:
3216 3217 </p>
3217 3218 <ul>
3218 3219 <li> use as needed: 'auto'.
3219 3220 <li> require the pager: 'yes' or 'on'.
3220 3221 <li> suppress the pager: 'no' or 'off' (any unrecognized value will also work).
3221 3222 </ul>
3222 3223 <p>
3223 3224 To globally turn off all attempts to use a pager, set:
3224 3225 </p>
3225 3226 <pre>
3226 3227 [ui]
3227 3228 paginate = never
3228 3229 </pre>
3229 3230 <p>
3230 3231 which will prevent the pager from running.
3231 3232 </p>
3232 3233
3233 3234 </div>
3234 3235 </div>
3235 3236 </div>
3236 3237
3237 3238
3238 3239
3239 3240 </body>
3240 3241 </html>
3241 3242
3242 3243
3243 3244 Sub-topic indexes rendered properly
3244 3245
3245 3246 $ get-with-headers.py $LOCALIP:$HGPORT "help/internals"
3246 3247 200 Script output follows
3247 3248
3248 3249 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
3249 3250 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
3250 3251 <head>
3251 3252 <link rel="icon" href="/static/hgicon.png" type="image/png" />
3252 3253 <meta name="robots" content="index, nofollow" />
3253 3254 <link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
3254 3255 <script type="text/javascript" src="/static/mercurial.js"></script>
3255 3256
3256 3257 <title>Help: internals</title>
3257 3258 </head>
3258 3259 <body>
3259 3260
3260 3261 <div class="container">
3261 3262 <div class="menu">
3262 3263 <div class="logo">
3263 3264 <a href="https://mercurial-scm.org/">
3264 3265 <img src="/static/hglogo.png" alt="mercurial" /></a>
3265 3266 </div>
3266 3267 <ul>
3267 3268 <li><a href="/shortlog">log</a></li>
3268 3269 <li><a href="/graph">graph</a></li>
3269 3270 <li><a href="/tags">tags</a></li>
3270 3271 <li><a href="/bookmarks">bookmarks</a></li>
3271 3272 <li><a href="/branches">branches</a></li>
3272 3273 </ul>
3273 3274 <ul>
3274 3275 <li><a href="/help">help</a></li>
3275 3276 </ul>
3276 3277 </div>
3277 3278
3278 3279 <div class="main">
3279 3280 <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2>
3280 3281
3281 3282 <form class="search" action="/log">
3282 3283
3283 3284 <p><input name="rev" id="search1" type="text" size="30" value="" /></p>
3284 3285 <div id="hint">Find changesets by keywords (author, files, the commit message), revision
3285 3286 number or hash, or <a href="/help/revsets">revset expression</a>.</div>
3286 3287 </form>
3287 3288 <table class="bigtable">
3288 3289 <tr><td colspan="2"><h2><a name="topics" href="#topics">Topics</a></h2></td></tr>
3289 3290
3290 3291 <tr><td>
3291 3292 <a href="/help/internals.bundle2">
3292 3293 bundle2
3293 3294 </a>
3294 3295 </td><td>
3295 3296 Bundle2
3296 3297 </td></tr>
3297 3298 <tr><td>
3298 3299 <a href="/help/internals.bundles">
3299 3300 bundles
3300 3301 </a>
3301 3302 </td><td>
3302 3303 Bundles
3303 3304 </td></tr>
3304 3305 <tr><td>
3305 3306 <a href="/help/internals.cbor">
3306 3307 cbor
3307 3308 </a>
3308 3309 </td><td>
3309 3310 CBOR
3310 3311 </td></tr>
3311 3312 <tr><td>
3312 3313 <a href="/help/internals.censor">
3313 3314 censor
3314 3315 </a>
3315 3316 </td><td>
3316 3317 Censor
3317 3318 </td></tr>
3318 3319 <tr><td>
3319 3320 <a href="/help/internals.changegroups">
3320 3321 changegroups
3321 3322 </a>
3322 3323 </td><td>
3323 3324 Changegroups
3324 3325 </td></tr>
3325 3326 <tr><td>
3326 3327 <a href="/help/internals.config">
3327 3328 config
3328 3329 </a>
3329 3330 </td><td>
3330 3331 Config Registrar
3331 3332 </td></tr>
3332 3333 <tr><td>
3333 3334 <a href="/help/internals.requirements">
3334 3335 requirements
3335 3336 </a>
3336 3337 </td><td>
3337 3338 Repository Requirements
3338 3339 </td></tr>
3339 3340 <tr><td>
3340 3341 <a href="/help/internals.revlogs">
3341 3342 revlogs
3342 3343 </a>
3343 3344 </td><td>
3344 3345 Revision Logs
3345 3346 </td></tr>
3346 3347 <tr><td>
3347 3348 <a href="/help/internals.wireprotocol">
3348 3349 wireprotocol
3349 3350 </a>
3350 3351 </td><td>
3351 3352 Wire Protocol
3352 3353 </td></tr>
3353 3354 <tr><td>
3354 3355 <a href="/help/internals.wireprotocolrpc">
3355 3356 wireprotocolrpc
3356 3357 </a>
3357 3358 </td><td>
3358 3359 Wire Protocol RPC
3359 3360 </td></tr>
3360 3361 <tr><td>
3361 3362 <a href="/help/internals.wireprotocolv2">
3362 3363 wireprotocolv2
3363 3364 </a>
3364 3365 </td><td>
3365 3366 Wire Protocol Version 2
3366 3367 </td></tr>
3367 3368
3368 3369
3369 3370
3370 3371
3371 3372
3372 3373 </table>
3373 3374 </div>
3374 3375 </div>
3375 3376
3376 3377
3377 3378
3378 3379 </body>
3379 3380 </html>
3380 3381
3381 3382
3382 3383 Sub-topic topics rendered properly
3383 3384
3384 3385 $ get-with-headers.py $LOCALIP:$HGPORT "help/internals.changegroups"
3385 3386 200 Script output follows
3386 3387
3387 3388 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
3388 3389 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
3389 3390 <head>
3390 3391 <link rel="icon" href="/static/hgicon.png" type="image/png" />
3391 3392 <meta name="robots" content="index, nofollow" />
3392 3393 <link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
3393 3394 <script type="text/javascript" src="/static/mercurial.js"></script>
3394 3395
3395 3396 <title>Help: internals.changegroups</title>
3396 3397 </head>
3397 3398 <body>
3398 3399
3399 3400 <div class="container">
3400 3401 <div class="menu">
3401 3402 <div class="logo">
3402 3403 <a href="https://mercurial-scm.org/">
3403 3404 <img src="/static/hglogo.png" alt="mercurial" /></a>
3404 3405 </div>
3405 3406 <ul>
3406 3407 <li><a href="/shortlog">log</a></li>
3407 3408 <li><a href="/graph">graph</a></li>
3408 3409 <li><a href="/tags">tags</a></li>
3409 3410 <li><a href="/bookmarks">bookmarks</a></li>
3410 3411 <li><a href="/branches">branches</a></li>
3411 3412 </ul>
3412 3413 <ul>
3413 3414 <li class="active"><a href="/help">help</a></li>
3414 3415 </ul>
3415 3416 </div>
3416 3417
3417 3418 <div class="main">
3418 3419 <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2>
3419 3420 <h3>Help: internals.changegroups</h3>
3420 3421
3421 3422 <form class="search" action="/log">
3422 3423
3423 3424 <p><input name="rev" id="search1" type="text" size="30" value="" /></p>
3424 3425 <div id="hint">Find changesets by keywords (author, files, the commit message), revision
3425 3426 number or hash, or <a href="/help/revsets">revset expression</a>.</div>
3426 3427 </form>
3427 3428 <div id="doc">
3428 3429 <h1>Changegroups</h1>
3429 3430 <p>
3430 3431 Changegroups are representations of repository revlog data, specifically
3431 3432 the changelog data, root/flat manifest data, treemanifest data, and
3432 3433 filelogs.
3433 3434 </p>
3434 3435 <p>
3435 3436 There are 3 versions of changegroups: &quot;1&quot;, &quot;2&quot;, and &quot;3&quot;. From a
3436 3437 high-level, versions &quot;1&quot; and &quot;2&quot; are almost exactly the same, with the
3437 3438 only difference being an additional item in the *delta header*. Version
3438 3439 &quot;3&quot; adds support for revlog flags in the *delta header* and optionally
3439 3440 exchanging treemanifests (enabled by setting an option on the
3440 3441 &quot;changegroup&quot; part in the bundle2).
3441 3442 </p>
3442 3443 <p>
3443 3444 Changegroups when not exchanging treemanifests consist of 3 logical
3444 3445 segments:
3445 3446 </p>
3446 3447 <pre>
3447 3448 +---------------------------------+
3448 3449 | | | |
3449 3450 | changeset | manifest | filelogs |
3450 3451 | | | |
3451 3452 | | | |
3452 3453 +---------------------------------+
3453 3454 </pre>
3454 3455 <p>
3455 3456 When exchanging treemanifests, there are 4 logical segments:
3456 3457 </p>
3457 3458 <pre>
3458 3459 +-------------------------------------------------+
3459 3460 | | | | |
3460 3461 | changeset | root | treemanifests | filelogs |
3461 3462 | | manifest | | |
3462 3463 | | | | |
3463 3464 +-------------------------------------------------+
3464 3465 </pre>
3465 3466 <p>
3466 3467 The principle building block of each segment is a *chunk*. A *chunk*
3467 3468 is a framed piece of data:
3468 3469 </p>
3469 3470 <pre>
3470 3471 +---------------------------------------+
3471 3472 | | |
3472 3473 | length | data |
3473 3474 | (4 bytes) | (&lt;length - 4&gt; bytes) |
3474 3475 | | |
3475 3476 +---------------------------------------+
3476 3477 </pre>
3477 3478 <p>
3478 3479 All integers are big-endian signed integers. Each chunk starts with a 32-bit
3479 3480 integer indicating the length of the entire chunk (including the length field
3480 3481 itself).
3481 3482 </p>
3482 3483 <p>
3483 3484 There is a special case chunk that has a value of 0 for the length
3484 3485 (&quot;0x00000000&quot;). We call this an *empty chunk*.
3485 3486 </p>
3486 3487 <h2>Delta Groups</h2>
3487 3488 <p>
3488 3489 A *delta group* expresses the content of a revlog as a series of deltas,
3489 3490 or patches against previous revisions.
3490 3491 </p>
3491 3492 <p>
3492 3493 Delta groups consist of 0 or more *chunks* followed by the *empty chunk*
3493 3494 to signal the end of the delta group:
3494 3495 </p>
3495 3496 <pre>
3496 3497 +------------------------------------------------------------------------+
3497 3498 | | | | | |
3498 3499 | chunk0 length | chunk0 data | chunk1 length | chunk1 data | 0x0 |
3499 3500 | (4 bytes) | (various) | (4 bytes) | (various) | (4 bytes) |
3500 3501 | | | | | |
3501 3502 +------------------------------------------------------------------------+
3502 3503 </pre>
3503 3504 <p>
3504 3505 Each *chunk*'s data consists of the following:
3505 3506 </p>
3506 3507 <pre>
3507 3508 +---------------------------------------+
3508 3509 | | |
3509 3510 | delta header | delta data |
3510 3511 | (various by version) | (various) |
3511 3512 | | |
3512 3513 +---------------------------------------+
3513 3514 </pre>
3514 3515 <p>
3515 3516 The *delta data* is a series of *delta*s that describe a diff from an existing
3516 3517 entry (either that the recipient already has, or previously specified in the
3517 3518 bundle/changegroup).
3518 3519 </p>
3519 3520 <p>
3520 3521 The *delta header* is different between versions &quot;1&quot;, &quot;2&quot;, and
3521 3522 &quot;3&quot; of the changegroup format.
3522 3523 </p>
3523 3524 <p>
3524 3525 Version 1 (headerlen=80):
3525 3526 </p>
3526 3527 <pre>
3527 3528 +------------------------------------------------------+
3528 3529 | | | | |
3529 3530 | node | p1 node | p2 node | link node |
3530 3531 | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) |
3531 3532 | | | | |
3532 3533 +------------------------------------------------------+
3533 3534 </pre>
3534 3535 <p>
3535 3536 Version 2 (headerlen=100):
3536 3537 </p>
3537 3538 <pre>
3538 3539 +------------------------------------------------------------------+
3539 3540 | | | | | |
3540 3541 | node | p1 node | p2 node | base node | link node |
3541 3542 | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) |
3542 3543 | | | | | |
3543 3544 +------------------------------------------------------------------+
3544 3545 </pre>
3545 3546 <p>
3546 3547 Version 3 (headerlen=102):
3547 3548 </p>
3548 3549 <pre>
3549 3550 +------------------------------------------------------------------------------+
3550 3551 | | | | | | |
3551 3552 | node | p1 node | p2 node | base node | link node | flags |
3552 3553 | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) | (2 bytes) |
3553 3554 | | | | | | |
3554 3555 +------------------------------------------------------------------------------+
3555 3556 </pre>
3556 3557 <p>
3557 3558 The *delta data* consists of &quot;chunklen - 4 - headerlen&quot; bytes, which contain a
3558 3559 series of *delta*s, densely packed (no separators). These deltas describe a diff
3559 3560 from an existing entry (either that the recipient already has, or previously
3560 3561 specified in the bundle/changegroup). The format is described more fully in
3561 3562 &quot;hg help internals.bdiff&quot;, but briefly:
3562 3563 </p>
3563 3564 <pre>
3564 3565 +---------------------------------------------------------------+
3565 3566 | | | | |
3566 3567 | start offset | end offset | new length | content |
3567 3568 | (4 bytes) | (4 bytes) | (4 bytes) | (&lt;new length&gt; bytes) |
3568 3569 | | | | |
3569 3570 +---------------------------------------------------------------+
3570 3571 </pre>
3571 3572 <p>
3572 3573 Please note that the length field in the delta data does *not* include itself.
3573 3574 </p>
3574 3575 <p>
3575 3576 In version 1, the delta is always applied against the previous node from
3576 3577 the changegroup or the first parent if this is the first entry in the
3577 3578 changegroup.
3578 3579 </p>
3579 3580 <p>
3580 3581 In version 2 and up, the delta base node is encoded in the entry in the
3581 3582 changegroup. This allows the delta to be expressed against any parent,
3582 3583 which can result in smaller deltas and more efficient encoding of data.
3583 3584 </p>
3584 3585 <h2>Changeset Segment</h2>
3585 3586 <p>
3586 3587 The *changeset segment* consists of a single *delta group* holding
3587 3588 changelog data. The *empty chunk* at the end of the *delta group* denotes
3588 3589 the boundary to the *manifest segment*.
3589 3590 </p>
3590 3591 <h2>Manifest Segment</h2>
3591 3592 <p>
3592 3593 The *manifest segment* consists of a single *delta group* holding manifest
3593 3594 data. If treemanifests are in use, it contains only the manifest for the
3594 3595 root directory of the repository. Otherwise, it contains the entire
3595 3596 manifest data. The *empty chunk* at the end of the *delta group* denotes
3596 3597 the boundary to the next segment (either the *treemanifests segment* or the
3597 3598 *filelogs segment*, depending on version and the request options).
3598 3599 </p>
3599 3600 <h3>Treemanifests Segment</h3>
3600 3601 <p>
3601 3602 The *treemanifests segment* only exists in changegroup version &quot;3&quot;, and
3602 3603 only if the 'treemanifest' param is part of the bundle2 changegroup part
3603 3604 (it is not possible to use changegroup version 3 outside of bundle2).
3604 3605 Aside from the filenames in the *treemanifests segment* containing a
3605 3606 trailing &quot;/&quot; character, it behaves identically to the *filelogs segment*
3606 3607 (see below). The final sub-segment is followed by an *empty chunk* (logically,
3607 3608 a sub-segment with filename size 0). This denotes the boundary to the
3608 3609 *filelogs segment*.
3609 3610 </p>
3610 3611 <h2>Filelogs Segment</h2>
3611 3612 <p>
3612 3613 The *filelogs segment* consists of multiple sub-segments, each
3613 3614 corresponding to an individual file whose data is being described:
3614 3615 </p>
3615 3616 <pre>
3616 3617 +--------------------------------------------------+
3617 3618 | | | | | |
3618 3619 | filelog0 | filelog1 | filelog2 | ... | 0x0 |
3619 3620 | | | | | (4 bytes) |
3620 3621 | | | | | |
3621 3622 +--------------------------------------------------+
3622 3623 </pre>
3623 3624 <p>
3624 3625 The final filelog sub-segment is followed by an *empty chunk* (logically,
3625 3626 a sub-segment with filename size 0). This denotes the end of the segment
3626 3627 and of the overall changegroup.
3627 3628 </p>
3628 3629 <p>
3629 3630 Each filelog sub-segment consists of the following:
3630 3631 </p>
3631 3632 <pre>
3632 3633 +------------------------------------------------------+
3633 3634 | | | |
3634 3635 | filename length | filename | delta group |
3635 3636 | (4 bytes) | (&lt;length - 4&gt; bytes) | (various) |
3636 3637 | | | |
3637 3638 +------------------------------------------------------+
3638 3639 </pre>
3639 3640 <p>
3640 3641 That is, a *chunk* consisting of the filename (not terminated or padded)
3641 3642 followed by N chunks constituting the *delta group* for this file. The
3642 3643 *empty chunk* at the end of each *delta group* denotes the boundary to the
3643 3644 next filelog sub-segment.
3644 3645 </p>
3645 3646
3646 3647 </div>
3647 3648 </div>
3648 3649 </div>
3649 3650
3650 3651
3651 3652
3652 3653 </body>
3653 3654 </html>
3654 3655
3655 3656
3656 3657 $ get-with-headers.py 127.0.0.1:$HGPORT "help/unknowntopic"
3657 3658 404 Not Found
3658 3659
3659 3660 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
3660 3661 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
3661 3662 <head>
3662 3663 <link rel="icon" href="/static/hgicon.png" type="image/png" />
3663 3664 <meta name="robots" content="index, nofollow" />
3664 3665 <link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
3665 3666 <script type="text/javascript" src="/static/mercurial.js"></script>
3666 3667
3667 3668 <title>test: error</title>
3668 3669 </head>
3669 3670 <body>
3670 3671
3671 3672 <div class="container">
3672 3673 <div class="menu">
3673 3674 <div class="logo">
3674 3675 <a href="https://mercurial-scm.org/">
3675 3676 <img src="/static/hglogo.png" width=75 height=90 border=0 alt="mercurial" /></a>
3676 3677 </div>
3677 3678 <ul>
3678 3679 <li><a href="/shortlog">log</a></li>
3679 3680 <li><a href="/graph">graph</a></li>
3680 3681 <li><a href="/tags">tags</a></li>
3681 3682 <li><a href="/bookmarks">bookmarks</a></li>
3682 3683 <li><a href="/branches">branches</a></li>
3683 3684 </ul>
3684 3685 <ul>
3685 3686 <li><a href="/help">help</a></li>
3686 3687 </ul>
3687 3688 </div>
3688 3689
3689 3690 <div class="main">
3690 3691
3691 3692 <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2>
3692 3693 <h3>error</h3>
3693 3694
3694 3695
3695 3696 <form class="search" action="/log">
3696 3697
3697 3698 <p><input name="rev" id="search1" type="text" size="30" value="" /></p>
3698 3699 <div id="hint">Find changesets by keywords (author, files, the commit message), revision
3699 3700 number or hash, or <a href="/help/revsets">revset expression</a>.</div>
3700 3701 </form>
3701 3702
3702 3703 <div class="description">
3703 3704 <p>
3704 3705 An error occurred while processing your request:
3705 3706 </p>
3706 3707 <p>
3707 3708 Not Found
3708 3709 </p>
3709 3710 </div>
3710 3711 </div>
3711 3712 </div>
3712 3713
3713 3714
3714 3715
3715 3716 </body>
3716 3717 </html>
3717 3718
3718 3719 [1]
3719 3720
3720 3721 $ killdaemons.py
3721 3722
3722 3723 #endif
General Comments 0
You need to be logged in to leave comments. Login now