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