##// END OF EJS Templates
test-help: don't use progress extension for the test of argument parsing...
Yuya Nishihara -
r27115:cb74f206 default
parent child Browse files
Show More
@@ -1,2386 +1,2386
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 changegroup 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 for a pattern in specified files and revisions
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 changegroup 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 config Configuration Files
106 106 dates Date Formats
107 107 diffs Diff Formats
108 108 environment Environment Variables
109 109 extensions Using Additional Features
110 110 filesets Specifying File Sets
111 111 glossary Glossary
112 112 hgignore Syntax for Mercurial Ignore Files
113 113 hgweb Configuring hgweb
114 114 merge-tools Merge Tools
115 115 multirevs Specifying Multiple Revisions
116 116 patterns File Name Patterns
117 117 phases Working with Phases
118 118 revisions Specifying Single Revisions
119 119 revsets Specifying Revision Sets
120 120 scripting Using Mercurial from scripts and automation
121 121 subrepos Subrepositories
122 122 templating Template Usage
123 123 urls URL Paths
124 124
125 125 (use "hg help -v" to show built-in aliases and global options)
126 126
127 127 $ hg -q help
128 128 add add the specified files on the next commit
129 129 addremove add all new files, delete all missing files
130 130 annotate show changeset information by line for each file
131 131 archive create an unversioned archive of a repository revision
132 132 backout reverse effect of earlier changeset
133 133 bisect subdivision search of changesets
134 134 bookmarks create a new bookmark or list existing bookmarks
135 135 branch set or show the current branch name
136 136 branches list repository named branches
137 137 bundle create a changegroup file
138 138 cat output the current or given revision of files
139 139 clone make a copy of an existing repository
140 140 commit commit the specified files or all outstanding changes
141 141 config show combined config settings from all hgrc files
142 142 copy mark files as copied for the next commit
143 143 diff diff repository (or selected files)
144 144 export dump the header and diffs for one or more changesets
145 145 files list tracked files
146 146 forget forget the specified files on the next commit
147 147 graft copy changes from other branches onto the current branch
148 148 grep search for a pattern in specified files and revisions
149 149 heads show branch heads
150 150 help show help for a given topic or a help overview
151 151 identify identify the working directory or specified revision
152 152 import import an ordered set of patches
153 153 incoming show new changesets found in source
154 154 init create a new repository in the given directory
155 155 log show revision history of entire repository or files
156 156 manifest output the current or given revision of the project manifest
157 157 merge merge another revision into working directory
158 158 outgoing show changesets not found in the destination
159 159 paths show aliases for remote repositories
160 160 phase set or show the current phase name
161 161 pull pull changes from the specified source
162 162 push push changes to the specified destination
163 163 recover roll back an interrupted transaction
164 164 remove remove the specified files on the next commit
165 165 rename rename files; equivalent of copy + remove
166 166 resolve redo merges or set/view the merge status of files
167 167 revert restore files to their checkout state
168 168 root print the root (top) of the current working directory
169 169 serve start stand-alone webserver
170 170 status show changed files in the working directory
171 171 summary summarize working directory state
172 172 tag add one or more tags for the current or given revision
173 173 tags list repository tags
174 174 unbundle apply one or more changegroup files
175 175 update update working directory (or switch revisions)
176 176 verify verify the integrity of the repository
177 177 version output version and copyright information
178 178
179 179 additional help topics:
180 180
181 181 config Configuration Files
182 182 dates Date Formats
183 183 diffs Diff Formats
184 184 environment Environment Variables
185 185 extensions Using Additional Features
186 186 filesets Specifying File Sets
187 187 glossary Glossary
188 188 hgignore Syntax for Mercurial Ignore Files
189 189 hgweb Configuring hgweb
190 190 merge-tools Merge Tools
191 191 multirevs Specifying Multiple Revisions
192 192 patterns File Name Patterns
193 193 phases Working with Phases
194 194 revisions Specifying Single Revisions
195 195 revsets Specifying Revision Sets
196 196 scripting Using Mercurial from scripts and automation
197 197 subrepos Subrepositories
198 198 templating Template Usage
199 199 urls URL Paths
200 200
201 201 Test extension help:
202 202 $ hg help extensions --config extensions.rebase= --config extensions.children=
203 203 Using Additional Features
204 204 """""""""""""""""""""""""
205 205
206 206 Mercurial has the ability to add new features through the use of
207 207 extensions. Extensions may add new commands, add options to existing
208 208 commands, change the default behavior of commands, or implement hooks.
209 209
210 210 To enable the "foo" extension, either shipped with Mercurial or in the
211 211 Python search path, create an entry for it in your configuration file,
212 212 like this:
213 213
214 214 [extensions]
215 215 foo =
216 216
217 217 You may also specify the full path to an extension:
218 218
219 219 [extensions]
220 220 myfeature = ~/.hgext/myfeature.py
221 221
222 222 See "hg help config" for more information on configuration files.
223 223
224 224 Extensions are not loaded by default for a variety of reasons: they can
225 225 increase startup overhead; they may be meant for advanced usage only; they
226 226 may provide potentially dangerous abilities (such as letting you destroy
227 227 or modify history); they might not be ready for prime time; or they may
228 228 alter some usual behaviors of stock Mercurial. It is thus up to the user
229 229 to activate extensions as needed.
230 230
231 231 To explicitly disable an extension enabled in a configuration file of
232 232 broader scope, prepend its path with !:
233 233
234 234 [extensions]
235 235 # disabling extension bar residing in /path/to/extension/bar.py
236 236 bar = !/path/to/extension/bar.py
237 237 # ditto, but no path was supplied for extension baz
238 238 baz = !
239 239
240 240 enabled extensions:
241 241
242 242 children command to display child changesets (DEPRECATED)
243 243 rebase command to move sets of revisions to a different ancestor
244 244
245 245 disabled extensions:
246 246
247 247 acl hooks for controlling repository access
248 248 blackbox log repository events to a blackbox for debugging
249 249 bugzilla hooks for integrating with the Bugzilla bug tracker
250 250 censor erase file content at a given revision
251 251 churn command to display statistics about repository history
252 252 clonebundles advertise pre-generated bundles to seed clones
253 253 (experimental)
254 254 color colorize output from some commands
255 255 convert import revisions from foreign VCS repositories into
256 256 Mercurial
257 257 eol automatically manage newlines in repository files
258 258 extdiff command to allow external programs to compare revisions
259 259 factotum http authentication with factotum
260 260 gpg commands to sign and verify changesets
261 261 hgcia hooks for integrating with the CIA.vc notification service
262 262 hgk browse the repository in a graphical way
263 263 highlight syntax highlighting for hgweb (requires Pygments)
264 264 histedit interactive history editing
265 265 keyword expand keywords in tracked files
266 266 largefiles track large binary files
267 267 mq manage a stack of patches
268 268 notify hooks for sending email push notifications
269 269 pager browse command output with an external pager
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 record commands to interactively select changes for
274 274 commit/qrefresh
275 275 relink recreates hardlinks between repository clones
276 276 schemes extend schemes with shortcuts to repository swarms
277 277 share share a common history between several working directories
278 278 shelve save and restore changes to the working directory
279 279 strip strip changesets and their descendants from history
280 280 transplant command to transplant changesets from another branch
281 281 win32mbcs allow the use of MBCS paths with problematic encodings
282 282 zeroconf discover and advertise repositories on the local network
283 283
284 284 Verify that extension keywords appear in help templates
285 285
286 286 $ hg help --config extensions.transplant= templating|grep transplant > /dev/null
287 287
288 288 Test short command list with verbose option
289 289
290 290 $ hg -v help shortlist
291 291 Mercurial Distributed SCM
292 292
293 293 basic commands:
294 294
295 295 add add the specified files on the next commit
296 296 annotate, blame
297 297 show changeset information by line for each file
298 298 clone make a copy of an existing repository
299 299 commit, ci commit the specified files or all outstanding changes
300 300 diff diff repository (or selected files)
301 301 export dump the header and diffs for one or more changesets
302 302 forget forget the specified files on the next commit
303 303 init create a new repository in the given directory
304 304 log, history show revision history of entire repository or files
305 305 merge merge another revision into working directory
306 306 pull pull changes from the specified source
307 307 push push changes to the specified destination
308 308 remove, rm remove the specified files on the next commit
309 309 serve start stand-alone webserver
310 310 status, st show changed files in the working directory
311 311 summary, sum summarize working directory state
312 312 update, up, checkout, co
313 313 update working directory (or switch revisions)
314 314
315 315 global options ([+] can be repeated):
316 316
317 317 -R --repository REPO repository root directory or name of overlay bundle
318 318 file
319 319 --cwd DIR change working directory
320 320 -y --noninteractive do not prompt, automatically pick the first choice for
321 321 all prompts
322 322 -q --quiet suppress output
323 323 -v --verbose enable additional output
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
336 336 (use "hg help" for the full list of commands)
337 337
338 338 $ hg add -h
339 339 hg add [OPTION]... [FILE]...
340 340
341 341 add the specified files on the next commit
342 342
343 343 Schedule files to be version controlled and added to the repository.
344 344
345 345 The files will be added to the repository at the next commit. To undo an
346 346 add before that, see "hg forget".
347 347
348 348 If no names are given, add all files to the repository.
349 349
350 350 Returns 0 if all files are successfully added.
351 351
352 352 options ([+] can be repeated):
353 353
354 354 -I --include PATTERN [+] include names matching the given patterns
355 355 -X --exclude PATTERN [+] exclude names matching the given patterns
356 356 -S --subrepos recurse into subrepositories
357 357 -n --dry-run do not perform actions, just print output
358 358
359 359 (some details hidden, use --verbose to show complete help)
360 360
361 361 Verbose help for add
362 362
363 363 $ hg add -hv
364 364 hg add [OPTION]... [FILE]...
365 365
366 366 add the specified files on the next commit
367 367
368 368 Schedule files to be version controlled and added to the repository.
369 369
370 370 The files will be added to the repository at the next commit. To undo an
371 371 add before that, see "hg forget".
372 372
373 373 If no names are given, add all files to the repository.
374 374
375 375 An example showing how new (unknown) files are added automatically by "hg
376 376 add":
377 377
378 378 $ ls
379 379 foo.c
380 380 $ hg status
381 381 ? foo.c
382 382 $ hg add
383 383 adding foo.c
384 384 $ hg status
385 385 A foo.c
386 386
387 387 Returns 0 if all files are successfully added.
388 388
389 389 options ([+] can be repeated):
390 390
391 391 -I --include PATTERN [+] include names matching the given patterns
392 392 -X --exclude PATTERN [+] exclude names matching the given patterns
393 393 -S --subrepos recurse into subrepositories
394 394 -n --dry-run do not perform actions, just print output
395 395
396 396 global options ([+] can be repeated):
397 397
398 398 -R --repository REPO repository root directory or name of overlay bundle
399 399 file
400 400 --cwd DIR change working directory
401 401 -y --noninteractive do not prompt, automatically pick the first choice for
402 402 all prompts
403 403 -q --quiet suppress output
404 404 -v --verbose enable additional output
405 405 --config CONFIG [+] set/override config option (use 'section.name=value')
406 406 --debug enable debugging output
407 407 --debugger start debugger
408 408 --encoding ENCODE set the charset encoding (default: ascii)
409 409 --encodingmode MODE set the charset encoding mode (default: strict)
410 410 --traceback always print a traceback on exception
411 411 --time time how long the command takes
412 412 --profile print command execution profile
413 413 --version output version information and exit
414 414 -h --help display help and exit
415 415 --hidden consider hidden changesets
416 416
417 417 Test help option with version option
418 418
419 419 $ hg add -h --version
420 420 Mercurial Distributed SCM (version *) (glob)
421 421 (see https://mercurial-scm.org for more information)
422 422
423 423 Copyright (C) 2005-2015 Matt Mackall and others
424 424 This is free software; see the source for copying conditions. There is NO
425 425 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
426 426
427 427 $ hg add --skjdfks
428 428 hg add: option --skjdfks not recognized
429 429 hg add [OPTION]... [FILE]...
430 430
431 431 add the specified files on the next commit
432 432
433 433 options ([+] can be repeated):
434 434
435 435 -I --include PATTERN [+] include names matching the given patterns
436 436 -X --exclude PATTERN [+] exclude names matching the given patterns
437 437 -S --subrepos recurse into subrepositories
438 438 -n --dry-run do not perform actions, just print output
439 439
440 440 (use "hg add -h" to show more help)
441 441 [255]
442 442
443 443 Test ambiguous command help
444 444
445 445 $ hg help ad
446 446 list of commands:
447 447
448 448 add add the specified files on the next commit
449 449 addremove add all new files, delete all missing files
450 450
451 451 (use "hg help -v ad" to show built-in aliases and global options)
452 452
453 453 Test command without options
454 454
455 455 $ hg help verify
456 456 hg verify
457 457
458 458 verify the integrity of the repository
459 459
460 460 Verify the integrity of the current repository.
461 461
462 462 This will perform an extensive check of the repository's integrity,
463 463 validating the hashes and checksums of each entry in the changelog,
464 464 manifest, and tracked files, as well as the integrity of their crosslinks
465 465 and indices.
466 466
467 467 Please see https://mercurial-scm.org/wiki/RepositoryCorruption for more
468 468 information about recovery from corruption of the repository.
469 469
470 470 Returns 0 on success, 1 if errors are encountered.
471 471
472 472 (some details hidden, use --verbose to show complete help)
473 473
474 474 $ hg help diff
475 475 hg diff [OPTION]... ([-c REV] | [-r REV1 [-r REV2]]) [FILE]...
476 476
477 477 diff repository (or selected files)
478 478
479 479 Show differences between revisions for the specified files.
480 480
481 481 Differences between files are shown using the unified diff format.
482 482
483 483 Note:
484 484 diff may generate unexpected results for merges, as it will default to
485 485 comparing against the working directory's first parent changeset if no
486 486 revisions are specified.
487 487
488 488 When two revision arguments are given, then changes are shown between
489 489 those revisions. If only one revision is specified then that revision is
490 490 compared to the working directory, and, when no revisions are specified,
491 491 the working directory files are compared to its parent.
492 492
493 493 Alternatively you can specify -c/--change with a revision to see the
494 494 changes in that changeset relative to its first parent.
495 495
496 496 Without the -a/--text option, diff will avoid generating diffs of files it
497 497 detects as binary. With -a, diff will generate a diff anyway, probably
498 498 with undesirable results.
499 499
500 500 Use the -g/--git option to generate diffs in the git extended diff format.
501 501 For more information, read "hg help diffs".
502 502
503 503 Returns 0 on success.
504 504
505 505 options ([+] can be repeated):
506 506
507 507 -r --rev REV [+] revision
508 508 -c --change REV change made by revision
509 509 -a --text treat all files as text
510 510 -g --git use git extended diff format
511 511 --nodates omit dates from diff headers
512 512 --noprefix omit a/ and b/ prefixes from filenames
513 513 -p --show-function show which function each change is in
514 514 --reverse produce a diff that undoes the changes
515 515 -w --ignore-all-space ignore white space when comparing lines
516 516 -b --ignore-space-change ignore changes in the amount of white space
517 517 -B --ignore-blank-lines ignore changes whose lines are all blank
518 518 -U --unified NUM number of lines of context to show
519 519 --stat output diffstat-style summary of changes
520 520 --root DIR produce diffs relative to subdirectory
521 521 -I --include PATTERN [+] include names matching the given patterns
522 522 -X --exclude PATTERN [+] exclude names matching the given patterns
523 523 -S --subrepos recurse into subrepositories
524 524
525 525 (some details hidden, use --verbose to show complete help)
526 526
527 527 $ hg help status
528 528 hg status [OPTION]... [FILE]...
529 529
530 530 aliases: st
531 531
532 532 show changed files in the working directory
533 533
534 534 Show status of files in the repository. If names are given, only files
535 535 that match are shown. Files that are clean or ignored or the source of a
536 536 copy/move operation, are not listed unless -c/--clean, -i/--ignored,
537 537 -C/--copies or -A/--all are given. Unless options described with "show
538 538 only ..." are given, the options -mardu are used.
539 539
540 540 Option -q/--quiet hides untracked (unknown and ignored) files unless
541 541 explicitly requested with -u/--unknown or -i/--ignored.
542 542
543 543 Note:
544 544 status may appear to disagree with diff if permissions have changed or
545 545 a merge has occurred. The standard diff format does not report
546 546 permission changes and diff only reports changes relative to one merge
547 547 parent.
548 548
549 549 If one revision is given, it is used as the base revision. If two
550 550 revisions are given, the differences between them are shown. The --change
551 551 option can also be used as a shortcut to list the changed files of a
552 552 revision from its first parent.
553 553
554 554 The codes used to show the status of files are:
555 555
556 556 M = modified
557 557 A = added
558 558 R = removed
559 559 C = clean
560 560 ! = missing (deleted by non-hg command, but still tracked)
561 561 ? = not tracked
562 562 I = ignored
563 563 = origin of the previous file (with --copies)
564 564
565 565 Returns 0 on success.
566 566
567 567 options ([+] can be repeated):
568 568
569 569 -A --all show status of all files
570 570 -m --modified show only modified files
571 571 -a --added show only added files
572 572 -r --removed show only removed files
573 573 -d --deleted show only deleted (but tracked) files
574 574 -c --clean show only files without changes
575 575 -u --unknown show only unknown (not tracked) files
576 576 -i --ignored show only ignored files
577 577 -n --no-status hide status prefix
578 578 -C --copies show source of copied files
579 579 -0 --print0 end filenames with NUL, for use with xargs
580 580 --rev REV [+] show difference from revision
581 581 --change REV list the changed files of a revision
582 582 -I --include PATTERN [+] include names matching the given patterns
583 583 -X --exclude PATTERN [+] exclude names matching the given patterns
584 584 -S --subrepos recurse into subrepositories
585 585
586 586 (some details hidden, use --verbose to show complete help)
587 587
588 588 $ hg -q help status
589 589 hg status [OPTION]... [FILE]...
590 590
591 591 show changed files in the working directory
592 592
593 593 $ hg help foo
594 594 abort: no such help topic: foo
595 595 (try "hg help --keyword foo")
596 596 [255]
597 597
598 598 $ hg skjdfks
599 599 hg: unknown command 'skjdfks'
600 600 Mercurial Distributed SCM
601 601
602 602 basic commands:
603 603
604 604 add add the specified files on the next commit
605 605 annotate show changeset information by line for each file
606 606 clone make a copy of an existing repository
607 607 commit commit the specified files or all outstanding changes
608 608 diff diff repository (or selected files)
609 609 export dump the header and diffs for one or more changesets
610 610 forget forget the specified files on the next commit
611 611 init create a new repository in the given directory
612 612 log show revision history of entire repository or files
613 613 merge merge another revision into working directory
614 614 pull pull changes from the specified source
615 615 push push changes to the specified destination
616 616 remove remove the specified files on the next commit
617 617 serve start stand-alone webserver
618 618 status show changed files in the working directory
619 619 summary summarize working directory state
620 620 update update working directory (or switch revisions)
621 621
622 622 (use "hg help" for the full list of commands or "hg -v" for details)
623 623 [255]
624 624
625 625
626 626 Make sure that we don't run afoul of the help system thinking that
627 627 this is a section and erroring out weirdly.
628 628
629 629 $ hg .log
630 630 hg: unknown command '.log'
631 631 (did you mean one of log?)
632 632 [255]
633 633
634 634 $ hg log.
635 635 hg: unknown command 'log.'
636 636 (did you mean one of log?)
637 637 [255]
638 638 $ hg pu.lh
639 639 hg: unknown command 'pu.lh'
640 640 (did you mean one of pull, push?)
641 641 [255]
642 642
643 643 $ cat > helpext.py <<EOF
644 644 > import os
645 645 > from mercurial import cmdutil, commands
646 646 >
647 647 > cmdtable = {}
648 648 > command = cmdutil.command(cmdtable)
649 649 >
650 650 > @command('nohelp',
651 651 > [('', 'longdesc', 3, 'x'*90),
652 652 > ('n', '', None, 'normal desc'),
653 653 > ('', 'newline', '', 'line1\nline2')],
654 654 > 'hg nohelp',
655 655 > norepo=True)
656 656 > @command('debugoptDEP', [('', 'dopt', None, 'option is (DEPRECATED)')])
657 657 > @command('debugoptEXP', [('', 'eopt', None, 'option is (EXPERIMENTAL)')])
658 658 > def nohelp(ui, *args, **kwargs):
659 659 > pass
660 660 >
661 661 > EOF
662 662 $ echo '[extensions]' >> $HGRCPATH
663 663 $ echo "helpext = `pwd`/helpext.py" >> $HGRCPATH
664 664
665 665 Test command with no help text
666 666
667 667 $ hg help nohelp
668 668 hg nohelp
669 669
670 670 (no help text available)
671 671
672 672 options:
673 673
674 674 --longdesc VALUE xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
675 675 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx (default: 3)
676 676 -n -- normal desc
677 677 --newline VALUE line1 line2
678 678
679 679 (some details hidden, use --verbose to show complete help)
680 680
681 681 $ hg help -k nohelp
682 682 Commands:
683 683
684 684 nohelp hg nohelp
685 685
686 686 Extension Commands:
687 687
688 688 nohelp (no help text available)
689 689
690 690 Test that default list of commands omits extension commands
691 691
692 692 $ hg help
693 693 Mercurial Distributed SCM
694 694
695 695 list of commands:
696 696
697 697 add add the specified files on the next commit
698 698 addremove add all new files, delete all missing files
699 699 annotate show changeset information by line for each file
700 700 archive create an unversioned archive of a repository revision
701 701 backout reverse effect of earlier changeset
702 702 bisect subdivision search of changesets
703 703 bookmarks create a new bookmark or list existing bookmarks
704 704 branch set or show the current branch name
705 705 branches list repository named branches
706 706 bundle create a changegroup file
707 707 cat output the current or given revision of files
708 708 clone make a copy of an existing repository
709 709 commit commit the specified files or all outstanding changes
710 710 config show combined config settings from all hgrc files
711 711 copy mark files as copied for the next commit
712 712 diff diff repository (or selected files)
713 713 export dump the header and diffs for one or more changesets
714 714 files list tracked files
715 715 forget forget the specified files on the next commit
716 716 graft copy changes from other branches onto the current branch
717 717 grep search for a pattern in specified files and revisions
718 718 heads show branch heads
719 719 help show help for a given topic or a help overview
720 720 identify identify the working directory or specified revision
721 721 import import an ordered set of patches
722 722 incoming show new changesets found in source
723 723 init create a new repository in the given directory
724 724 log show revision history of entire repository or files
725 725 manifest output the current or given revision of the project manifest
726 726 merge merge another revision into working directory
727 727 outgoing show changesets not found in the destination
728 728 paths show aliases for remote repositories
729 729 phase set or show the current phase name
730 730 pull pull changes from the specified source
731 731 push push changes to the specified destination
732 732 recover roll back an interrupted transaction
733 733 remove remove the specified files on the next commit
734 734 rename rename files; equivalent of copy + remove
735 735 resolve redo merges or set/view the merge status of files
736 736 revert restore files to their checkout state
737 737 root print the root (top) of the current working directory
738 738 serve start stand-alone webserver
739 739 status show changed files in the working directory
740 740 summary summarize working directory state
741 741 tag add one or more tags for the current or given revision
742 742 tags list repository tags
743 743 unbundle apply one or more changegroup files
744 744 update update working directory (or switch revisions)
745 745 verify verify the integrity of the repository
746 746 version output version and copyright information
747 747
748 748 enabled extensions:
749 749
750 750 helpext (no help text available)
751 751
752 752 additional help topics:
753 753
754 754 config Configuration Files
755 755 dates Date Formats
756 756 diffs Diff Formats
757 757 environment Environment Variables
758 758 extensions Using Additional Features
759 759 filesets Specifying File Sets
760 760 glossary Glossary
761 761 hgignore Syntax for Mercurial Ignore Files
762 762 hgweb Configuring hgweb
763 763 merge-tools Merge Tools
764 764 multirevs Specifying Multiple Revisions
765 765 patterns File Name Patterns
766 766 phases Working with Phases
767 767 revisions Specifying Single Revisions
768 768 revsets Specifying Revision Sets
769 769 scripting Using Mercurial from scripts and automation
770 770 subrepos Subrepositories
771 771 templating Template Usage
772 772 urls URL Paths
773 773
774 774 (use "hg help -v" to show built-in aliases and global options)
775 775
776 776
777 777 Test list of internal help commands
778 778
779 779 $ hg help debug
780 780 debug commands (internal and unsupported):
781 781
782 782 debugancestor
783 783 find the ancestor revision of two revisions in a given index
784 784 debugapplystreamclonebundle
785 785 apply a stream clone bundle file
786 786 debugbuilddag
787 787 builds a repo with a given DAG from scratch in the current
788 788 empty repo
789 789 debugbundle lists the contents of a bundle
790 790 debugcheckstate
791 791 validate the correctness of the current dirstate
792 792 debugcommands
793 793 list all available commands and options
794 794 debugcomplete
795 795 returns the completion list associated with the given command
796 796 debugcreatestreamclonebundle
797 797 create a stream clone bundle file
798 798 debugdag format the changelog or an index DAG as a concise textual
799 799 description
800 800 debugdata dump the contents of a data file revision
801 801 debugdate parse and display a date
802 802 debugdirstate
803 803 show the contents of the current dirstate
804 804 debugdiscovery
805 805 runs the changeset discovery protocol in isolation
806 806 debugextensions
807 807 show information about active extensions
808 808 debugfileset parse and apply a fileset specification
809 809 debugfsinfo show information detected about current filesystem
810 810 debuggetbundle
811 811 retrieves a bundle from a repo
812 812 debugignore display the combined ignore pattern
813 813 debugindex dump the contents of an index file
814 814 debugindexdot
815 815 dump an index DAG as a graphviz dot file
816 816 debuginstall test Mercurial installation
817 817 debugknown test whether node ids are known to a repo
818 818 debuglocks show or modify state of locks
819 819 debugmergestate
820 820 print merge state
821 821 debugnamecomplete
822 822 complete "names" - tags, open branch names, bookmark names
823 823 debugobsolete
824 824 create arbitrary obsolete marker
825 825 debugoptDEP (no help text available)
826 826 debugoptEXP (no help text available)
827 827 debugpathcomplete
828 828 complete part or all of a tracked path
829 829 debugpushkey access the pushkey key/value protocol
830 830 debugpvec (no help text available)
831 831 debugrebuilddirstate
832 832 rebuild the dirstate as it would look like for the given
833 833 revision
834 834 debugrebuildfncache
835 835 rebuild the fncache file
836 836 debugrename dump rename information
837 837 debugrevlog show data and statistics about a revlog
838 838 debugrevspec parse and apply a revision specification
839 839 debugsetparents
840 840 manually set the parents of the current working directory
841 841 debugsub (no help text available)
842 842 debugsuccessorssets
843 843 show set of successors for revision
844 844 debugwalk show how files match on given patterns
845 845 debugwireargs
846 846 (no help text available)
847 847
848 848 (use "hg help -v debug" to show built-in aliases and global options)
849 849
850 850
851 851 Test list of commands with command with no help text
852 852
853 853 $ hg help helpext
854 854 helpext extension - no help text available
855 855
856 856 list of commands:
857 857
858 858 nohelp (no help text available)
859 859
860 860 (use "hg help -v helpext" to show built-in aliases and global options)
861 861
862 862
863 863 test deprecated and experimental options are hidden in command help
864 864 $ hg help debugoptDEP
865 865 hg debugoptDEP
866 866
867 867 (no help text available)
868 868
869 869 options:
870 870
871 871 (some details hidden, use --verbose to show complete help)
872 872
873 873 $ hg help debugoptEXP
874 874 hg debugoptEXP
875 875
876 876 (no help text available)
877 877
878 878 options:
879 879
880 880 (some details hidden, use --verbose to show complete help)
881 881
882 882 test deprecated and experimental options is shown with -v
883 883 $ hg help -v debugoptDEP | grep dopt
884 884 --dopt option is (DEPRECATED)
885 885 $ hg help -v debugoptEXP | grep eopt
886 886 --eopt option is (EXPERIMENTAL)
887 887
888 888 #if gettext
889 889 test deprecated option is hidden with translation with untranslated description
890 890 (use many globy for not failing on changed transaction)
891 891 $ LANGUAGE=sv hg help debugoptDEP
892 892 hg debugoptDEP
893 893
894 894 (*) (glob)
895 895
896 896 options:
897 897
898 898 (some details hidden, use --verbose to show complete help)
899 899 #endif
900 900
901 901 Test commands that collide with topics (issue4240)
902 902
903 903 $ hg config -hq
904 904 hg config [-u] [NAME]...
905 905
906 906 show combined config settings from all hgrc files
907 907 $ hg showconfig -hq
908 908 hg config [-u] [NAME]...
909 909
910 910 show combined config settings from all hgrc files
911 911
912 912 Test a help topic
913 913
914 914 $ hg help revs
915 915 Specifying Single Revisions
916 916 """""""""""""""""""""""""""
917 917
918 918 Mercurial supports several ways to specify individual revisions.
919 919
920 920 A plain integer is treated as a revision number. Negative integers are
921 921 treated as sequential offsets from the tip, with -1 denoting the tip, -2
922 922 denoting the revision prior to the tip, and so forth.
923 923
924 924 A 40-digit hexadecimal string is treated as a unique revision identifier.
925 925
926 926 A hexadecimal string less than 40 characters long is treated as a unique
927 927 revision identifier and is referred to as a short-form identifier. A
928 928 short-form identifier is only valid if it is the prefix of exactly one
929 929 full-length identifier.
930 930
931 931 Any other string is treated as a bookmark, tag, or branch name. A bookmark
932 932 is a movable pointer to a revision. A tag is a permanent name associated
933 933 with a revision. A branch name denotes the tipmost open branch head of
934 934 that branch - or if they are all closed, the tipmost closed head of the
935 935 branch. Bookmark, tag, and branch names must not contain the ":"
936 936 character.
937 937
938 938 The reserved name "tip" always identifies the most recent revision.
939 939
940 940 The reserved name "null" indicates the null revision. This is the revision
941 941 of an empty repository, and the parent of revision 0.
942 942
943 943 The reserved name "." indicates the working directory parent. If no
944 944 working directory is checked out, it is equivalent to null. If an
945 945 uncommitted merge is in progress, "." is the revision of the first parent.
946 946
947 947 Test repeated config section name
948 948
949 949 $ hg help config.host
950 950 "http_proxy.host"
951 951 Host name and (optional) port of the proxy server, for example
952 952 "myproxy:8000".
953 953
954 954 "smtp.host"
955 955 Host name of mail server, e.g. "mail.example.com".
956 956
957 957 Unrelated trailing paragraphs shouldn't be included
958 958
959 959 $ hg help config.extramsg | grep '^$'
960 960
961 961
962 962 Test capitalized section name
963 963
964 964 $ hg help scripting.HGPLAIN > /dev/null
965 965
966 966 Help subsection:
967 967
968 968 $ hg help config.charsets |grep "Email example:" > /dev/null
969 969 [1]
970 970
971 971 Show nested definitions
972 972 ("profiling.type"[break]"ls"[break]"stat"[break])
973 973
974 974 $ hg help config.type | egrep '^$'|wc -l
975 975 \s*3 (re)
976 976
977 977 Last item in help config.*:
978 978
979 979 $ hg help config.`hg help config|grep '^ "'| \
980 980 > tail -1|sed 's![ "]*!!g'`| \
981 981 > grep "hg help -c config" > /dev/null
982 982 [1]
983 983
984 984 note to use help -c for general hg help config:
985 985
986 986 $ hg help config |grep "hg help -c config" > /dev/null
987 987
988 988 Test templating help
989 989
990 990 $ hg help templating | egrep '(desc|diffstat|firstline|nonempty) '
991 991 desc String. The text of the changeset description.
992 992 diffstat String. Statistics of changes with the following format:
993 993 firstline Any text. Returns the first line of text.
994 994 nonempty Any text. Returns '(none)' if the string is empty.
995 995
996 996 Test deprecated items
997 997
998 998 $ hg help -v templating | grep currentbookmark
999 999 currentbookmark
1000 1000 $ hg help templating | (grep currentbookmark || true)
1001 1001
1002 1002 Test help hooks
1003 1003
1004 1004 $ cat > helphook1.py <<EOF
1005 1005 > from mercurial import help
1006 1006 >
1007 1007 > def rewrite(ui, topic, doc):
1008 1008 > return doc + '\nhelphook1\n'
1009 1009 >
1010 1010 > def extsetup(ui):
1011 1011 > help.addtopichook('revsets', rewrite)
1012 1012 > EOF
1013 1013 $ cat > helphook2.py <<EOF
1014 1014 > from mercurial import help
1015 1015 >
1016 1016 > def rewrite(ui, topic, doc):
1017 1017 > return doc + '\nhelphook2\n'
1018 1018 >
1019 1019 > def extsetup(ui):
1020 1020 > help.addtopichook('revsets', rewrite)
1021 1021 > EOF
1022 1022 $ echo '[extensions]' >> $HGRCPATH
1023 1023 $ echo "helphook1 = `pwd`/helphook1.py" >> $HGRCPATH
1024 1024 $ echo "helphook2 = `pwd`/helphook2.py" >> $HGRCPATH
1025 1025 $ hg help revsets | grep helphook
1026 1026 helphook1
1027 1027 helphook2
1028 1028
1029 1029 Test -e / -c / -k combinations
1030 1030
1031 $ hg help -c progress
1032 abort: no such help topic: progress
1033 (try "hg help --keyword progress")
1031 $ hg help -c schemes
1032 abort: no such help topic: schemes
1033 (try "hg help --keyword schemes")
1034 1034 [255]
1035 $ hg help -e progress |head -1
1036 progress extension - show progress bars for some actions (DEPRECATED)
1035 $ hg help -e schemes |head -1
1036 schemes extension - extend schemes with shortcuts to repository swarms
1037 1037 $ hg help -c -k dates |egrep '^(Topics|Extensions|Commands):'
1038 1038 Commands:
1039 1039 $ hg help -e -k a |egrep '^(Topics|Extensions|Commands):'
1040 1040 Extensions:
1041 1041 $ hg help -e -c -k date |egrep '^(Topics|Extensions|Commands):'
1042 1042 Extensions:
1043 1043 Commands:
1044 1044 $ hg help -c commit > /dev/null
1045 1045 $ hg help -e -c commit > /dev/null
1046 1046 $ hg help -e commit > /dev/null
1047 1047 abort: no such help topic: commit
1048 1048 (try "hg help --keyword commit")
1049 1049 [255]
1050 1050
1051 1051 Test keyword search help
1052 1052
1053 1053 $ cat > prefixedname.py <<EOF
1054 1054 > '''matched against word "clone"
1055 1055 > '''
1056 1056 > EOF
1057 1057 $ echo '[extensions]' >> $HGRCPATH
1058 1058 $ echo "dot.dot.prefixedname = `pwd`/prefixedname.py" >> $HGRCPATH
1059 1059 $ hg help -k clone
1060 1060 Topics:
1061 1061
1062 1062 config Configuration Files
1063 1063 extensions Using Additional Features
1064 1064 glossary Glossary
1065 1065 phases Working with Phases
1066 1066 subrepos Subrepositories
1067 1067 urls URL Paths
1068 1068
1069 1069 Commands:
1070 1070
1071 1071 bookmarks create a new bookmark or list existing bookmarks
1072 1072 clone make a copy of an existing repository
1073 1073 debugapplystreamclonebundle apply a stream clone bundle file
1074 1074 debugcreatestreamclonebundle create a stream clone bundle file
1075 1075 paths show aliases for remote repositories
1076 1076 update update working directory (or switch revisions)
1077 1077
1078 1078 Extensions:
1079 1079
1080 1080 clonebundles advertise pre-generated bundles to seed clones (experimental)
1081 1081 prefixedname matched against word "clone"
1082 1082 relink recreates hardlinks between repository clones
1083 1083
1084 1084 Extension Commands:
1085 1085
1086 1086 qclone clone main and patch repository at same time
1087 1087
1088 1088 Test unfound topic
1089 1089
1090 1090 $ hg help nonexistingtopicthatwillneverexisteverever
1091 1091 abort: no such help topic: nonexistingtopicthatwillneverexisteverever
1092 1092 (try "hg help --keyword nonexistingtopicthatwillneverexisteverever")
1093 1093 [255]
1094 1094
1095 1095 Test unfound keyword
1096 1096
1097 1097 $ hg help --keyword nonexistingwordthatwillneverexisteverever
1098 1098 abort: no matches
1099 1099 (try "hg help" for a list of topics)
1100 1100 [255]
1101 1101
1102 1102 Test omit indicating for help
1103 1103
1104 1104 $ cat > addverboseitems.py <<EOF
1105 1105 > '''extension to test omit indicating.
1106 1106 >
1107 1107 > This paragraph is never omitted (for extension)
1108 1108 >
1109 1109 > .. container:: verbose
1110 1110 >
1111 1111 > This paragraph is omitted,
1112 1112 > if :hg:\`help\` is invoked without \`\`-v\`\` (for extension)
1113 1113 >
1114 1114 > This paragraph is never omitted, too (for extension)
1115 1115 > '''
1116 1116 >
1117 1117 > from mercurial import help, commands
1118 1118 > testtopic = """This paragraph is never omitted (for topic).
1119 1119 >
1120 1120 > .. container:: verbose
1121 1121 >
1122 1122 > This paragraph is omitted,
1123 1123 > if :hg:\`help\` is invoked without \`\`-v\`\` (for topic)
1124 1124 >
1125 1125 > This paragraph is never omitted, too (for topic)
1126 1126 > """
1127 1127 > def extsetup(ui):
1128 1128 > help.helptable.append((["topic-containing-verbose"],
1129 1129 > "This is the topic to test omit indicating.",
1130 1130 > lambda ui: testtopic))
1131 1131 > EOF
1132 1132 $ echo '[extensions]' >> $HGRCPATH
1133 1133 $ echo "addverboseitems = `pwd`/addverboseitems.py" >> $HGRCPATH
1134 1134 $ hg help addverboseitems
1135 1135 addverboseitems extension - extension to test omit indicating.
1136 1136
1137 1137 This paragraph is never omitted (for extension)
1138 1138
1139 1139 This paragraph is never omitted, too (for extension)
1140 1140
1141 1141 (some details hidden, use --verbose to show complete help)
1142 1142
1143 1143 no commands defined
1144 1144 $ hg help -v addverboseitems
1145 1145 addverboseitems extension - extension to test omit indicating.
1146 1146
1147 1147 This paragraph is never omitted (for extension)
1148 1148
1149 1149 This paragraph is omitted, if "hg help" is invoked without "-v" (for
1150 1150 extension)
1151 1151
1152 1152 This paragraph is never omitted, too (for extension)
1153 1153
1154 1154 no commands defined
1155 1155 $ hg help topic-containing-verbose
1156 1156 This is the topic to test omit indicating.
1157 1157 """"""""""""""""""""""""""""""""""""""""""
1158 1158
1159 1159 This paragraph is never omitted (for topic).
1160 1160
1161 1161 This paragraph is never omitted, too (for topic)
1162 1162
1163 1163 (some details hidden, use --verbose to show complete help)
1164 1164 $ hg help -v topic-containing-verbose
1165 1165 This is the topic to test omit indicating.
1166 1166 """"""""""""""""""""""""""""""""""""""""""
1167 1167
1168 1168 This paragraph is never omitted (for topic).
1169 1169
1170 1170 This paragraph is omitted, if "hg help" is invoked without "-v" (for
1171 1171 topic)
1172 1172
1173 1173 This paragraph is never omitted, too (for topic)
1174 1174
1175 1175 Test section lookup
1176 1176
1177 1177 $ hg help revset.merge
1178 1178 "merge()"
1179 1179 Changeset is a merge changeset.
1180 1180
1181 1181 $ hg help glossary.dag
1182 1182 DAG
1183 1183 The repository of changesets of a distributed version control system
1184 1184 (DVCS) can be described as a directed acyclic graph (DAG), consisting
1185 1185 of nodes and edges, where nodes correspond to changesets and edges
1186 1186 imply a parent -> child relation. This graph can be visualized by
1187 1187 graphical tools such as "hg log --graph". In Mercurial, the DAG is
1188 1188 limited by the requirement for children to have at most two parents.
1189 1189
1190 1190
1191 1191 $ hg help hgrc.paths
1192 1192 "paths"
1193 1193 -------
1194 1194
1195 1195 Assigns symbolic names to repositories. The left side is the symbolic
1196 1196 name, and the right gives the directory or URL that is the location of the
1197 1197 repository. Default paths can be declared by setting the following
1198 1198 entries.
1199 1199
1200 1200 "default"
1201 1201 Directory or URL to use when pulling if no source is specified.
1202 1202 (default: repository from which the current repository was cloned)
1203 1203
1204 1204 "default-push"
1205 1205 Optional. Directory or URL to use when pushing if no destination is
1206 1206 specified.
1207 1207
1208 1208 Custom paths can be defined by assigning the path to a name that later can
1209 1209 be used from the command line. Example:
1210 1210
1211 1211 [paths]
1212 1212 my_path = http://example.com/path
1213 1213
1214 1214 To push to the path defined in "my_path" run the command:
1215 1215
1216 1216 hg push my_path
1217 1217
1218 1218 $ hg help glossary.mcguffin
1219 1219 abort: help section not found
1220 1220 [255]
1221 1221
1222 1222 $ hg help glossary.mc.guffin
1223 1223 abort: help section not found
1224 1224 [255]
1225 1225
1226 1226 $ hg help template.files
1227 1227 files List of strings. All files modified, added, or removed by
1228 1228 this changeset.
1229 1229
1230 1230 Test dynamic list of merge tools only shows up once
1231 1231 $ hg help merge-tools
1232 1232 Merge Tools
1233 1233 """""""""""
1234 1234
1235 1235 To merge files Mercurial uses merge tools.
1236 1236
1237 1237 A merge tool combines two different versions of a file into a merged file.
1238 1238 Merge tools are given the two files and the greatest common ancestor of
1239 1239 the two file versions, so they can determine the changes made on both
1240 1240 branches.
1241 1241
1242 1242 Merge tools are used both for "hg resolve", "hg merge", "hg update", "hg
1243 1243 backout" and in several extensions.
1244 1244
1245 1245 Usually, the merge tool tries to automatically reconcile the files by
1246 1246 combining all non-overlapping changes that occurred separately in the two
1247 1247 different evolutions of the same initial base file. Furthermore, some
1248 1248 interactive merge programs make it easier to manually resolve conflicting
1249 1249 merges, either in a graphical way, or by inserting some conflict markers.
1250 1250 Mercurial does not include any interactive merge programs but relies on
1251 1251 external tools for that.
1252 1252
1253 1253 Available merge tools
1254 1254 =====================
1255 1255
1256 1256 External merge tools and their properties are configured in the merge-
1257 1257 tools configuration section - see hgrc(5) - but they can often just be
1258 1258 named by their executable.
1259 1259
1260 1260 A merge tool is generally usable if its executable can be found on the
1261 1261 system and if it can handle the merge. The executable is found if it is an
1262 1262 absolute or relative executable path or the name of an application in the
1263 1263 executable search path. The tool is assumed to be able to handle the merge
1264 1264 if it can handle symlinks if the file is a symlink, if it can handle
1265 1265 binary files if the file is binary, and if a GUI is available if the tool
1266 1266 requires a GUI.
1267 1267
1268 1268 There are some internal merge tools which can be used. The internal merge
1269 1269 tools are:
1270 1270
1271 1271 ":dump"
1272 1272 Creates three versions of the files to merge, containing the contents of
1273 1273 local, other and base. These files can then be used to perform a merge
1274 1274 manually. If the file to be merged is named "a.txt", these files will
1275 1275 accordingly be named "a.txt.local", "a.txt.other" and "a.txt.base" and
1276 1276 they will be placed in the same directory as "a.txt".
1277 1277
1278 1278 ":fail"
1279 1279 Rather than attempting to merge files that were modified on both
1280 1280 branches, it marks them as unresolved. The resolve command must be used
1281 1281 to resolve these conflicts.
1282 1282
1283 1283 ":local"
1284 1284 Uses the local version of files as the merged version.
1285 1285
1286 1286 ":merge"
1287 1287 Uses the internal non-interactive simple merge algorithm for merging
1288 1288 files. It will fail if there are any conflicts and leave markers in the
1289 1289 partially merged file. Markers will have two sections, one for each side
1290 1290 of merge.
1291 1291
1292 1292 ":merge-local"
1293 1293 Like :merge, but resolve all conflicts non-interactively in favor of the
1294 1294 local changes.
1295 1295
1296 1296 ":merge-other"
1297 1297 Like :merge, but resolve all conflicts non-interactively in favor of the
1298 1298 other changes.
1299 1299
1300 1300 ":merge3"
1301 1301 Uses the internal non-interactive simple merge algorithm for merging
1302 1302 files. It will fail if there are any conflicts and leave markers in the
1303 1303 partially merged file. Marker will have three sections, one from each
1304 1304 side of the merge and one for the base content.
1305 1305
1306 1306 ":other"
1307 1307 Uses the other version of files as the merged version.
1308 1308
1309 1309 ":prompt"
1310 1310 Asks the user which of the local or the other version to keep as the
1311 1311 merged version.
1312 1312
1313 1313 ":tagmerge"
1314 1314 Uses the internal tag merge algorithm (experimental).
1315 1315
1316 1316 ":union"
1317 1317 Uses the internal non-interactive simple merge algorithm for merging
1318 1318 files. It will use both left and right sides for conflict regions. No
1319 1319 markers are inserted.
1320 1320
1321 1321 Internal tools are always available and do not require a GUI but will by
1322 1322 default not handle symlinks or binary files.
1323 1323
1324 1324 Choosing a merge tool
1325 1325 =====================
1326 1326
1327 1327 Mercurial uses these rules when deciding which merge tool to use:
1328 1328
1329 1329 1. If a tool has been specified with the --tool option to merge or
1330 1330 resolve, it is used. If it is the name of a tool in the merge-tools
1331 1331 configuration, its configuration is used. Otherwise the specified tool
1332 1332 must be executable by the shell.
1333 1333 2. If the "HGMERGE" environment variable is present, its value is used and
1334 1334 must be executable by the shell.
1335 1335 3. If the filename of the file to be merged matches any of the patterns in
1336 1336 the merge-patterns configuration section, the first usable merge tool
1337 1337 corresponding to a matching pattern is used. Here, binary capabilities
1338 1338 of the merge tool are not considered.
1339 1339 4. If ui.merge is set it will be considered next. If the value is not the
1340 1340 name of a configured tool, the specified value is used and must be
1341 1341 executable by the shell. Otherwise the named tool is used if it is
1342 1342 usable.
1343 1343 5. If any usable merge tools are present in the merge-tools configuration
1344 1344 section, the one with the highest priority is used.
1345 1345 6. If a program named "hgmerge" can be found on the system, it is used -
1346 1346 but it will by default not be used for symlinks and binary files.
1347 1347 7. If the file to be merged is not binary and is not a symlink, then
1348 1348 internal ":merge" is used.
1349 1349 8. The merge of the file fails and must be resolved before commit.
1350 1350
1351 1351 Note:
1352 1352 After selecting a merge program, Mercurial will by default attempt to
1353 1353 merge the files using a simple merge algorithm first. Only if it
1354 1354 doesn't succeed because of conflicting changes Mercurial will actually
1355 1355 execute the merge program. Whether to use the simple merge algorithm
1356 1356 first can be controlled by the premerge setting of the merge tool.
1357 1357 Premerge is enabled by default unless the file is binary or a symlink.
1358 1358
1359 1359 See the merge-tools and ui sections of hgrc(5) for details on the
1360 1360 configuration of merge tools.
1361 1361
1362 1362 Test usage of section marks in help documents
1363 1363
1364 1364 $ cd "$TESTDIR"/../doc
1365 1365 $ python check-seclevel.py
1366 1366 $ cd $TESTTMP
1367 1367
1368 1368 #if serve
1369 1369
1370 1370 Test the help pages in hgweb.
1371 1371
1372 1372 Dish up an empty repo; serve it cold.
1373 1373
1374 1374 $ hg init "$TESTTMP/test"
1375 1375 $ hg serve -R "$TESTTMP/test" -n test -p $HGPORT -d --pid-file=hg.pid
1376 1376 $ cat hg.pid >> $DAEMON_PIDS
1377 1377
1378 1378 $ get-with-headers.py 127.0.0.1:$HGPORT "help"
1379 1379 200 Script output follows
1380 1380
1381 1381 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
1382 1382 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
1383 1383 <head>
1384 1384 <link rel="icon" href="/static/hgicon.png" type="image/png" />
1385 1385 <meta name="robots" content="index, nofollow" />
1386 1386 <link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
1387 1387 <script type="text/javascript" src="/static/mercurial.js"></script>
1388 1388
1389 1389 <title>Help: Index</title>
1390 1390 </head>
1391 1391 <body>
1392 1392
1393 1393 <div class="container">
1394 1394 <div class="menu">
1395 1395 <div class="logo">
1396 1396 <a href="https://mercurial-scm.org/">
1397 1397 <img src="/static/hglogo.png" alt="mercurial" /></a>
1398 1398 </div>
1399 1399 <ul>
1400 1400 <li><a href="/shortlog">log</a></li>
1401 1401 <li><a href="/graph">graph</a></li>
1402 1402 <li><a href="/tags">tags</a></li>
1403 1403 <li><a href="/bookmarks">bookmarks</a></li>
1404 1404 <li><a href="/branches">branches</a></li>
1405 1405 </ul>
1406 1406 <ul>
1407 1407 <li class="active">help</li>
1408 1408 </ul>
1409 1409 </div>
1410 1410
1411 1411 <div class="main">
1412 1412 <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2>
1413 1413 <form class="search" action="/log">
1414 1414
1415 1415 <p><input name="rev" id="search1" type="text" size="30" /></p>
1416 1416 <div id="hint">Find changesets by keywords (author, files, the commit message), revision
1417 1417 number or hash, or <a href="/help/revsets">revset expression</a>.</div>
1418 1418 </form>
1419 1419 <table class="bigtable">
1420 1420 <tr><td colspan="2"><h2><a name="main" href="#topics">Topics</a></h2></td></tr>
1421 1421
1422 1422 <tr><td>
1423 1423 <a href="/help/config">
1424 1424 config
1425 1425 </a>
1426 1426 </td><td>
1427 1427 Configuration Files
1428 1428 </td></tr>
1429 1429 <tr><td>
1430 1430 <a href="/help/dates">
1431 1431 dates
1432 1432 </a>
1433 1433 </td><td>
1434 1434 Date Formats
1435 1435 </td></tr>
1436 1436 <tr><td>
1437 1437 <a href="/help/diffs">
1438 1438 diffs
1439 1439 </a>
1440 1440 </td><td>
1441 1441 Diff Formats
1442 1442 </td></tr>
1443 1443 <tr><td>
1444 1444 <a href="/help/environment">
1445 1445 environment
1446 1446 </a>
1447 1447 </td><td>
1448 1448 Environment Variables
1449 1449 </td></tr>
1450 1450 <tr><td>
1451 1451 <a href="/help/extensions">
1452 1452 extensions
1453 1453 </a>
1454 1454 </td><td>
1455 1455 Using Additional Features
1456 1456 </td></tr>
1457 1457 <tr><td>
1458 1458 <a href="/help/filesets">
1459 1459 filesets
1460 1460 </a>
1461 1461 </td><td>
1462 1462 Specifying File Sets
1463 1463 </td></tr>
1464 1464 <tr><td>
1465 1465 <a href="/help/glossary">
1466 1466 glossary
1467 1467 </a>
1468 1468 </td><td>
1469 1469 Glossary
1470 1470 </td></tr>
1471 1471 <tr><td>
1472 1472 <a href="/help/hgignore">
1473 1473 hgignore
1474 1474 </a>
1475 1475 </td><td>
1476 1476 Syntax for Mercurial Ignore Files
1477 1477 </td></tr>
1478 1478 <tr><td>
1479 1479 <a href="/help/hgweb">
1480 1480 hgweb
1481 1481 </a>
1482 1482 </td><td>
1483 1483 Configuring hgweb
1484 1484 </td></tr>
1485 1485 <tr><td>
1486 1486 <a href="/help/merge-tools">
1487 1487 merge-tools
1488 1488 </a>
1489 1489 </td><td>
1490 1490 Merge Tools
1491 1491 </td></tr>
1492 1492 <tr><td>
1493 1493 <a href="/help/multirevs">
1494 1494 multirevs
1495 1495 </a>
1496 1496 </td><td>
1497 1497 Specifying Multiple Revisions
1498 1498 </td></tr>
1499 1499 <tr><td>
1500 1500 <a href="/help/patterns">
1501 1501 patterns
1502 1502 </a>
1503 1503 </td><td>
1504 1504 File Name Patterns
1505 1505 </td></tr>
1506 1506 <tr><td>
1507 1507 <a href="/help/phases">
1508 1508 phases
1509 1509 </a>
1510 1510 </td><td>
1511 1511 Working with Phases
1512 1512 </td></tr>
1513 1513 <tr><td>
1514 1514 <a href="/help/revisions">
1515 1515 revisions
1516 1516 </a>
1517 1517 </td><td>
1518 1518 Specifying Single Revisions
1519 1519 </td></tr>
1520 1520 <tr><td>
1521 1521 <a href="/help/revsets">
1522 1522 revsets
1523 1523 </a>
1524 1524 </td><td>
1525 1525 Specifying Revision Sets
1526 1526 </td></tr>
1527 1527 <tr><td>
1528 1528 <a href="/help/scripting">
1529 1529 scripting
1530 1530 </a>
1531 1531 </td><td>
1532 1532 Using Mercurial from scripts and automation
1533 1533 </td></tr>
1534 1534 <tr><td>
1535 1535 <a href="/help/subrepos">
1536 1536 subrepos
1537 1537 </a>
1538 1538 </td><td>
1539 1539 Subrepositories
1540 1540 </td></tr>
1541 1541 <tr><td>
1542 1542 <a href="/help/templating">
1543 1543 templating
1544 1544 </a>
1545 1545 </td><td>
1546 1546 Template Usage
1547 1547 </td></tr>
1548 1548 <tr><td>
1549 1549 <a href="/help/urls">
1550 1550 urls
1551 1551 </a>
1552 1552 </td><td>
1553 1553 URL Paths
1554 1554 </td></tr>
1555 1555 <tr><td>
1556 1556 <a href="/help/topic-containing-verbose">
1557 1557 topic-containing-verbose
1558 1558 </a>
1559 1559 </td><td>
1560 1560 This is the topic to test omit indicating.
1561 1561 </td></tr>
1562 1562
1563 1563 <tr><td colspan="2"><h2><a name="main" href="#main">Main Commands</a></h2></td></tr>
1564 1564
1565 1565 <tr><td>
1566 1566 <a href="/help/add">
1567 1567 add
1568 1568 </a>
1569 1569 </td><td>
1570 1570 add the specified files on the next commit
1571 1571 </td></tr>
1572 1572 <tr><td>
1573 1573 <a href="/help/annotate">
1574 1574 annotate
1575 1575 </a>
1576 1576 </td><td>
1577 1577 show changeset information by line for each file
1578 1578 </td></tr>
1579 1579 <tr><td>
1580 1580 <a href="/help/clone">
1581 1581 clone
1582 1582 </a>
1583 1583 </td><td>
1584 1584 make a copy of an existing repository
1585 1585 </td></tr>
1586 1586 <tr><td>
1587 1587 <a href="/help/commit">
1588 1588 commit
1589 1589 </a>
1590 1590 </td><td>
1591 1591 commit the specified files or all outstanding changes
1592 1592 </td></tr>
1593 1593 <tr><td>
1594 1594 <a href="/help/diff">
1595 1595 diff
1596 1596 </a>
1597 1597 </td><td>
1598 1598 diff repository (or selected files)
1599 1599 </td></tr>
1600 1600 <tr><td>
1601 1601 <a href="/help/export">
1602 1602 export
1603 1603 </a>
1604 1604 </td><td>
1605 1605 dump the header and diffs for one or more changesets
1606 1606 </td></tr>
1607 1607 <tr><td>
1608 1608 <a href="/help/forget">
1609 1609 forget
1610 1610 </a>
1611 1611 </td><td>
1612 1612 forget the specified files on the next commit
1613 1613 </td></tr>
1614 1614 <tr><td>
1615 1615 <a href="/help/init">
1616 1616 init
1617 1617 </a>
1618 1618 </td><td>
1619 1619 create a new repository in the given directory
1620 1620 </td></tr>
1621 1621 <tr><td>
1622 1622 <a href="/help/log">
1623 1623 log
1624 1624 </a>
1625 1625 </td><td>
1626 1626 show revision history of entire repository or files
1627 1627 </td></tr>
1628 1628 <tr><td>
1629 1629 <a href="/help/merge">
1630 1630 merge
1631 1631 </a>
1632 1632 </td><td>
1633 1633 merge another revision into working directory
1634 1634 </td></tr>
1635 1635 <tr><td>
1636 1636 <a href="/help/pull">
1637 1637 pull
1638 1638 </a>
1639 1639 </td><td>
1640 1640 pull changes from the specified source
1641 1641 </td></tr>
1642 1642 <tr><td>
1643 1643 <a href="/help/push">
1644 1644 push
1645 1645 </a>
1646 1646 </td><td>
1647 1647 push changes to the specified destination
1648 1648 </td></tr>
1649 1649 <tr><td>
1650 1650 <a href="/help/remove">
1651 1651 remove
1652 1652 </a>
1653 1653 </td><td>
1654 1654 remove the specified files on the next commit
1655 1655 </td></tr>
1656 1656 <tr><td>
1657 1657 <a href="/help/serve">
1658 1658 serve
1659 1659 </a>
1660 1660 </td><td>
1661 1661 start stand-alone webserver
1662 1662 </td></tr>
1663 1663 <tr><td>
1664 1664 <a href="/help/status">
1665 1665 status
1666 1666 </a>
1667 1667 </td><td>
1668 1668 show changed files in the working directory
1669 1669 </td></tr>
1670 1670 <tr><td>
1671 1671 <a href="/help/summary">
1672 1672 summary
1673 1673 </a>
1674 1674 </td><td>
1675 1675 summarize working directory state
1676 1676 </td></tr>
1677 1677 <tr><td>
1678 1678 <a href="/help/update">
1679 1679 update
1680 1680 </a>
1681 1681 </td><td>
1682 1682 update working directory (or switch revisions)
1683 1683 </td></tr>
1684 1684
1685 1685 <tr><td colspan="2"><h2><a name="other" href="#other">Other Commands</a></h2></td></tr>
1686 1686
1687 1687 <tr><td>
1688 1688 <a href="/help/addremove">
1689 1689 addremove
1690 1690 </a>
1691 1691 </td><td>
1692 1692 add all new files, delete all missing files
1693 1693 </td></tr>
1694 1694 <tr><td>
1695 1695 <a href="/help/archive">
1696 1696 archive
1697 1697 </a>
1698 1698 </td><td>
1699 1699 create an unversioned archive of a repository revision
1700 1700 </td></tr>
1701 1701 <tr><td>
1702 1702 <a href="/help/backout">
1703 1703 backout
1704 1704 </a>
1705 1705 </td><td>
1706 1706 reverse effect of earlier changeset
1707 1707 </td></tr>
1708 1708 <tr><td>
1709 1709 <a href="/help/bisect">
1710 1710 bisect
1711 1711 </a>
1712 1712 </td><td>
1713 1713 subdivision search of changesets
1714 1714 </td></tr>
1715 1715 <tr><td>
1716 1716 <a href="/help/bookmarks">
1717 1717 bookmarks
1718 1718 </a>
1719 1719 </td><td>
1720 1720 create a new bookmark or list existing bookmarks
1721 1721 </td></tr>
1722 1722 <tr><td>
1723 1723 <a href="/help/branch">
1724 1724 branch
1725 1725 </a>
1726 1726 </td><td>
1727 1727 set or show the current branch name
1728 1728 </td></tr>
1729 1729 <tr><td>
1730 1730 <a href="/help/branches">
1731 1731 branches
1732 1732 </a>
1733 1733 </td><td>
1734 1734 list repository named branches
1735 1735 </td></tr>
1736 1736 <tr><td>
1737 1737 <a href="/help/bundle">
1738 1738 bundle
1739 1739 </a>
1740 1740 </td><td>
1741 1741 create a changegroup file
1742 1742 </td></tr>
1743 1743 <tr><td>
1744 1744 <a href="/help/cat">
1745 1745 cat
1746 1746 </a>
1747 1747 </td><td>
1748 1748 output the current or given revision of files
1749 1749 </td></tr>
1750 1750 <tr><td>
1751 1751 <a href="/help/config">
1752 1752 config
1753 1753 </a>
1754 1754 </td><td>
1755 1755 show combined config settings from all hgrc files
1756 1756 </td></tr>
1757 1757 <tr><td>
1758 1758 <a href="/help/copy">
1759 1759 copy
1760 1760 </a>
1761 1761 </td><td>
1762 1762 mark files as copied for the next commit
1763 1763 </td></tr>
1764 1764 <tr><td>
1765 1765 <a href="/help/files">
1766 1766 files
1767 1767 </a>
1768 1768 </td><td>
1769 1769 list tracked files
1770 1770 </td></tr>
1771 1771 <tr><td>
1772 1772 <a href="/help/graft">
1773 1773 graft
1774 1774 </a>
1775 1775 </td><td>
1776 1776 copy changes from other branches onto the current branch
1777 1777 </td></tr>
1778 1778 <tr><td>
1779 1779 <a href="/help/grep">
1780 1780 grep
1781 1781 </a>
1782 1782 </td><td>
1783 1783 search for a pattern in specified files and revisions
1784 1784 </td></tr>
1785 1785 <tr><td>
1786 1786 <a href="/help/heads">
1787 1787 heads
1788 1788 </a>
1789 1789 </td><td>
1790 1790 show branch heads
1791 1791 </td></tr>
1792 1792 <tr><td>
1793 1793 <a href="/help/help">
1794 1794 help
1795 1795 </a>
1796 1796 </td><td>
1797 1797 show help for a given topic or a help overview
1798 1798 </td></tr>
1799 1799 <tr><td>
1800 1800 <a href="/help/identify">
1801 1801 identify
1802 1802 </a>
1803 1803 </td><td>
1804 1804 identify the working directory or specified revision
1805 1805 </td></tr>
1806 1806 <tr><td>
1807 1807 <a href="/help/import">
1808 1808 import
1809 1809 </a>
1810 1810 </td><td>
1811 1811 import an ordered set of patches
1812 1812 </td></tr>
1813 1813 <tr><td>
1814 1814 <a href="/help/incoming">
1815 1815 incoming
1816 1816 </a>
1817 1817 </td><td>
1818 1818 show new changesets found in source
1819 1819 </td></tr>
1820 1820 <tr><td>
1821 1821 <a href="/help/manifest">
1822 1822 manifest
1823 1823 </a>
1824 1824 </td><td>
1825 1825 output the current or given revision of the project manifest
1826 1826 </td></tr>
1827 1827 <tr><td>
1828 1828 <a href="/help/nohelp">
1829 1829 nohelp
1830 1830 </a>
1831 1831 </td><td>
1832 1832 (no help text available)
1833 1833 </td></tr>
1834 1834 <tr><td>
1835 1835 <a href="/help/outgoing">
1836 1836 outgoing
1837 1837 </a>
1838 1838 </td><td>
1839 1839 show changesets not found in the destination
1840 1840 </td></tr>
1841 1841 <tr><td>
1842 1842 <a href="/help/paths">
1843 1843 paths
1844 1844 </a>
1845 1845 </td><td>
1846 1846 show aliases for remote repositories
1847 1847 </td></tr>
1848 1848 <tr><td>
1849 1849 <a href="/help/phase">
1850 1850 phase
1851 1851 </a>
1852 1852 </td><td>
1853 1853 set or show the current phase name
1854 1854 </td></tr>
1855 1855 <tr><td>
1856 1856 <a href="/help/recover">
1857 1857 recover
1858 1858 </a>
1859 1859 </td><td>
1860 1860 roll back an interrupted transaction
1861 1861 </td></tr>
1862 1862 <tr><td>
1863 1863 <a href="/help/rename">
1864 1864 rename
1865 1865 </a>
1866 1866 </td><td>
1867 1867 rename files; equivalent of copy + remove
1868 1868 </td></tr>
1869 1869 <tr><td>
1870 1870 <a href="/help/resolve">
1871 1871 resolve
1872 1872 </a>
1873 1873 </td><td>
1874 1874 redo merges or set/view the merge status of files
1875 1875 </td></tr>
1876 1876 <tr><td>
1877 1877 <a href="/help/revert">
1878 1878 revert
1879 1879 </a>
1880 1880 </td><td>
1881 1881 restore files to their checkout state
1882 1882 </td></tr>
1883 1883 <tr><td>
1884 1884 <a href="/help/root">
1885 1885 root
1886 1886 </a>
1887 1887 </td><td>
1888 1888 print the root (top) of the current working directory
1889 1889 </td></tr>
1890 1890 <tr><td>
1891 1891 <a href="/help/tag">
1892 1892 tag
1893 1893 </a>
1894 1894 </td><td>
1895 1895 add one or more tags for the current or given revision
1896 1896 </td></tr>
1897 1897 <tr><td>
1898 1898 <a href="/help/tags">
1899 1899 tags
1900 1900 </a>
1901 1901 </td><td>
1902 1902 list repository tags
1903 1903 </td></tr>
1904 1904 <tr><td>
1905 1905 <a href="/help/unbundle">
1906 1906 unbundle
1907 1907 </a>
1908 1908 </td><td>
1909 1909 apply one or more changegroup files
1910 1910 </td></tr>
1911 1911 <tr><td>
1912 1912 <a href="/help/verify">
1913 1913 verify
1914 1914 </a>
1915 1915 </td><td>
1916 1916 verify the integrity of the repository
1917 1917 </td></tr>
1918 1918 <tr><td>
1919 1919 <a href="/help/version">
1920 1920 version
1921 1921 </a>
1922 1922 </td><td>
1923 1923 output version and copyright information
1924 1924 </td></tr>
1925 1925 </table>
1926 1926 </div>
1927 1927 </div>
1928 1928
1929 1929 <script type="text/javascript">process_dates()</script>
1930 1930
1931 1931
1932 1932 </body>
1933 1933 </html>
1934 1934
1935 1935
1936 1936 $ get-with-headers.py 127.0.0.1:$HGPORT "help/add"
1937 1937 200 Script output follows
1938 1938
1939 1939 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
1940 1940 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
1941 1941 <head>
1942 1942 <link rel="icon" href="/static/hgicon.png" type="image/png" />
1943 1943 <meta name="robots" content="index, nofollow" />
1944 1944 <link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
1945 1945 <script type="text/javascript" src="/static/mercurial.js"></script>
1946 1946
1947 1947 <title>Help: add</title>
1948 1948 </head>
1949 1949 <body>
1950 1950
1951 1951 <div class="container">
1952 1952 <div class="menu">
1953 1953 <div class="logo">
1954 1954 <a href="https://mercurial-scm.org/">
1955 1955 <img src="/static/hglogo.png" alt="mercurial" /></a>
1956 1956 </div>
1957 1957 <ul>
1958 1958 <li><a href="/shortlog">log</a></li>
1959 1959 <li><a href="/graph">graph</a></li>
1960 1960 <li><a href="/tags">tags</a></li>
1961 1961 <li><a href="/bookmarks">bookmarks</a></li>
1962 1962 <li><a href="/branches">branches</a></li>
1963 1963 </ul>
1964 1964 <ul>
1965 1965 <li class="active"><a href="/help">help</a></li>
1966 1966 </ul>
1967 1967 </div>
1968 1968
1969 1969 <div class="main">
1970 1970 <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2>
1971 1971 <h3>Help: add</h3>
1972 1972
1973 1973 <form class="search" action="/log">
1974 1974
1975 1975 <p><input name="rev" id="search1" type="text" size="30" /></p>
1976 1976 <div id="hint">Find changesets by keywords (author, files, the commit message), revision
1977 1977 number or hash, or <a href="/help/revsets">revset expression</a>.</div>
1978 1978 </form>
1979 1979 <div id="doc">
1980 1980 <p>
1981 1981 hg add [OPTION]... [FILE]...
1982 1982 </p>
1983 1983 <p>
1984 1984 add the specified files on the next commit
1985 1985 </p>
1986 1986 <p>
1987 1987 Schedule files to be version controlled and added to the
1988 1988 repository.
1989 1989 </p>
1990 1990 <p>
1991 1991 The files will be added to the repository at the next commit. To
1992 1992 undo an add before that, see &quot;hg forget&quot;.
1993 1993 </p>
1994 1994 <p>
1995 1995 If no names are given, add all files to the repository.
1996 1996 </p>
1997 1997 <p>
1998 1998 An example showing how new (unknown) files are added
1999 1999 automatically by &quot;hg add&quot;:
2000 2000 </p>
2001 2001 <pre>
2002 2002 \$ ls (re)
2003 2003 foo.c
2004 2004 \$ hg status (re)
2005 2005 ? foo.c
2006 2006 \$ hg add (re)
2007 2007 adding foo.c
2008 2008 \$ hg status (re)
2009 2009 A foo.c
2010 2010 </pre>
2011 2011 <p>
2012 2012 Returns 0 if all files are successfully added.
2013 2013 </p>
2014 2014 <p>
2015 2015 options ([+] can be repeated):
2016 2016 </p>
2017 2017 <table>
2018 2018 <tr><td>-I</td>
2019 2019 <td>--include PATTERN [+]</td>
2020 2020 <td>include names matching the given patterns</td></tr>
2021 2021 <tr><td>-X</td>
2022 2022 <td>--exclude PATTERN [+]</td>
2023 2023 <td>exclude names matching the given patterns</td></tr>
2024 2024 <tr><td>-S</td>
2025 2025 <td>--subrepos</td>
2026 2026 <td>recurse into subrepositories</td></tr>
2027 2027 <tr><td>-n</td>
2028 2028 <td>--dry-run</td>
2029 2029 <td>do not perform actions, just print output</td></tr>
2030 2030 </table>
2031 2031 <p>
2032 2032 global options ([+] can be repeated):
2033 2033 </p>
2034 2034 <table>
2035 2035 <tr><td>-R</td>
2036 2036 <td>--repository REPO</td>
2037 2037 <td>repository root directory or name of overlay bundle file</td></tr>
2038 2038 <tr><td></td>
2039 2039 <td>--cwd DIR</td>
2040 2040 <td>change working directory</td></tr>
2041 2041 <tr><td>-y</td>
2042 2042 <td>--noninteractive</td>
2043 2043 <td>do not prompt, automatically pick the first choice for all prompts</td></tr>
2044 2044 <tr><td>-q</td>
2045 2045 <td>--quiet</td>
2046 2046 <td>suppress output</td></tr>
2047 2047 <tr><td>-v</td>
2048 2048 <td>--verbose</td>
2049 2049 <td>enable additional output</td></tr>
2050 2050 <tr><td></td>
2051 2051 <td>--config CONFIG [+]</td>
2052 2052 <td>set/override config option (use 'section.name=value')</td></tr>
2053 2053 <tr><td></td>
2054 2054 <td>--debug</td>
2055 2055 <td>enable debugging output</td></tr>
2056 2056 <tr><td></td>
2057 2057 <td>--debugger</td>
2058 2058 <td>start debugger</td></tr>
2059 2059 <tr><td></td>
2060 2060 <td>--encoding ENCODE</td>
2061 2061 <td>set the charset encoding (default: ascii)</td></tr>
2062 2062 <tr><td></td>
2063 2063 <td>--encodingmode MODE</td>
2064 2064 <td>set the charset encoding mode (default: strict)</td></tr>
2065 2065 <tr><td></td>
2066 2066 <td>--traceback</td>
2067 2067 <td>always print a traceback on exception</td></tr>
2068 2068 <tr><td></td>
2069 2069 <td>--time</td>
2070 2070 <td>time how long the command takes</td></tr>
2071 2071 <tr><td></td>
2072 2072 <td>--profile</td>
2073 2073 <td>print command execution profile</td></tr>
2074 2074 <tr><td></td>
2075 2075 <td>--version</td>
2076 2076 <td>output version information and exit</td></tr>
2077 2077 <tr><td>-h</td>
2078 2078 <td>--help</td>
2079 2079 <td>display help and exit</td></tr>
2080 2080 <tr><td></td>
2081 2081 <td>--hidden</td>
2082 2082 <td>consider hidden changesets</td></tr>
2083 2083 </table>
2084 2084
2085 2085 </div>
2086 2086 </div>
2087 2087 </div>
2088 2088
2089 2089 <script type="text/javascript">process_dates()</script>
2090 2090
2091 2091
2092 2092 </body>
2093 2093 </html>
2094 2094
2095 2095
2096 2096 $ get-with-headers.py 127.0.0.1:$HGPORT "help/remove"
2097 2097 200 Script output follows
2098 2098
2099 2099 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
2100 2100 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
2101 2101 <head>
2102 2102 <link rel="icon" href="/static/hgicon.png" type="image/png" />
2103 2103 <meta name="robots" content="index, nofollow" />
2104 2104 <link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
2105 2105 <script type="text/javascript" src="/static/mercurial.js"></script>
2106 2106
2107 2107 <title>Help: remove</title>
2108 2108 </head>
2109 2109 <body>
2110 2110
2111 2111 <div class="container">
2112 2112 <div class="menu">
2113 2113 <div class="logo">
2114 2114 <a href="https://mercurial-scm.org/">
2115 2115 <img src="/static/hglogo.png" alt="mercurial" /></a>
2116 2116 </div>
2117 2117 <ul>
2118 2118 <li><a href="/shortlog">log</a></li>
2119 2119 <li><a href="/graph">graph</a></li>
2120 2120 <li><a href="/tags">tags</a></li>
2121 2121 <li><a href="/bookmarks">bookmarks</a></li>
2122 2122 <li><a href="/branches">branches</a></li>
2123 2123 </ul>
2124 2124 <ul>
2125 2125 <li class="active"><a href="/help">help</a></li>
2126 2126 </ul>
2127 2127 </div>
2128 2128
2129 2129 <div class="main">
2130 2130 <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2>
2131 2131 <h3>Help: remove</h3>
2132 2132
2133 2133 <form class="search" action="/log">
2134 2134
2135 2135 <p><input name="rev" id="search1" type="text" size="30" /></p>
2136 2136 <div id="hint">Find changesets by keywords (author, files, the commit message), revision
2137 2137 number or hash, or <a href="/help/revsets">revset expression</a>.</div>
2138 2138 </form>
2139 2139 <div id="doc">
2140 2140 <p>
2141 2141 hg remove [OPTION]... FILE...
2142 2142 </p>
2143 2143 <p>
2144 2144 aliases: rm
2145 2145 </p>
2146 2146 <p>
2147 2147 remove the specified files on the next commit
2148 2148 </p>
2149 2149 <p>
2150 2150 Schedule the indicated files for removal from the current branch.
2151 2151 </p>
2152 2152 <p>
2153 2153 This command schedules the files to be removed at the next commit.
2154 2154 To undo a remove before that, see &quot;hg revert&quot;. To undo added
2155 2155 files, see &quot;hg forget&quot;.
2156 2156 </p>
2157 2157 <p>
2158 2158 -A/--after can be used to remove only files that have already
2159 2159 been deleted, -f/--force can be used to force deletion, and -Af
2160 2160 can be used to remove files from the next revision without
2161 2161 deleting them from the working directory.
2162 2162 </p>
2163 2163 <p>
2164 2164 The following table details the behavior of remove for different
2165 2165 file states (columns) and option combinations (rows). The file
2166 2166 states are Added [A], Clean [C], Modified [M] and Missing [!]
2167 2167 (as reported by &quot;hg status&quot;). The actions are Warn, Remove
2168 2168 (from branch) and Delete (from disk):
2169 2169 </p>
2170 2170 <table>
2171 2171 <tr><td>opt/state</td>
2172 2172 <td>A</td>
2173 2173 <td>C</td>
2174 2174 <td>M</td>
2175 2175 <td>!</td></tr>
2176 2176 <tr><td>none</td>
2177 2177 <td>W</td>
2178 2178 <td>RD</td>
2179 2179 <td>W</td>
2180 2180 <td>R</td></tr>
2181 2181 <tr><td>-f</td>
2182 2182 <td>R</td>
2183 2183 <td>RD</td>
2184 2184 <td>RD</td>
2185 2185 <td>R</td></tr>
2186 2186 <tr><td>-A</td>
2187 2187 <td>W</td>
2188 2188 <td>W</td>
2189 2189 <td>W</td>
2190 2190 <td>R</td></tr>
2191 2191 <tr><td>-Af</td>
2192 2192 <td>R</td>
2193 2193 <td>R</td>
2194 2194 <td>R</td>
2195 2195 <td>R</td></tr>
2196 2196 </table>
2197 2197 <p>
2198 2198 Note that remove never deletes files in Added [A] state from the
2199 2199 working directory, not even if option --force is specified.
2200 2200 </p>
2201 2201 <p>
2202 2202 Returns 0 on success, 1 if any warnings encountered.
2203 2203 </p>
2204 2204 <p>
2205 2205 options ([+] can be repeated):
2206 2206 </p>
2207 2207 <table>
2208 2208 <tr><td>-A</td>
2209 2209 <td>--after</td>
2210 2210 <td>record delete for missing files</td></tr>
2211 2211 <tr><td>-f</td>
2212 2212 <td>--force</td>
2213 2213 <td>remove (and delete) file even if added or modified</td></tr>
2214 2214 <tr><td>-S</td>
2215 2215 <td>--subrepos</td>
2216 2216 <td>recurse into subrepositories</td></tr>
2217 2217 <tr><td>-I</td>
2218 2218 <td>--include PATTERN [+]</td>
2219 2219 <td>include names matching the given patterns</td></tr>
2220 2220 <tr><td>-X</td>
2221 2221 <td>--exclude PATTERN [+]</td>
2222 2222 <td>exclude names matching the given patterns</td></tr>
2223 2223 </table>
2224 2224 <p>
2225 2225 global options ([+] can be repeated):
2226 2226 </p>
2227 2227 <table>
2228 2228 <tr><td>-R</td>
2229 2229 <td>--repository REPO</td>
2230 2230 <td>repository root directory or name of overlay bundle file</td></tr>
2231 2231 <tr><td></td>
2232 2232 <td>--cwd DIR</td>
2233 2233 <td>change working directory</td></tr>
2234 2234 <tr><td>-y</td>
2235 2235 <td>--noninteractive</td>
2236 2236 <td>do not prompt, automatically pick the first choice for all prompts</td></tr>
2237 2237 <tr><td>-q</td>
2238 2238 <td>--quiet</td>
2239 2239 <td>suppress output</td></tr>
2240 2240 <tr><td>-v</td>
2241 2241 <td>--verbose</td>
2242 2242 <td>enable additional output</td></tr>
2243 2243 <tr><td></td>
2244 2244 <td>--config CONFIG [+]</td>
2245 2245 <td>set/override config option (use 'section.name=value')</td></tr>
2246 2246 <tr><td></td>
2247 2247 <td>--debug</td>
2248 2248 <td>enable debugging output</td></tr>
2249 2249 <tr><td></td>
2250 2250 <td>--debugger</td>
2251 2251 <td>start debugger</td></tr>
2252 2252 <tr><td></td>
2253 2253 <td>--encoding ENCODE</td>
2254 2254 <td>set the charset encoding (default: ascii)</td></tr>
2255 2255 <tr><td></td>
2256 2256 <td>--encodingmode MODE</td>
2257 2257 <td>set the charset encoding mode (default: strict)</td></tr>
2258 2258 <tr><td></td>
2259 2259 <td>--traceback</td>
2260 2260 <td>always print a traceback on exception</td></tr>
2261 2261 <tr><td></td>
2262 2262 <td>--time</td>
2263 2263 <td>time how long the command takes</td></tr>
2264 2264 <tr><td></td>
2265 2265 <td>--profile</td>
2266 2266 <td>print command execution profile</td></tr>
2267 2267 <tr><td></td>
2268 2268 <td>--version</td>
2269 2269 <td>output version information and exit</td></tr>
2270 2270 <tr><td>-h</td>
2271 2271 <td>--help</td>
2272 2272 <td>display help and exit</td></tr>
2273 2273 <tr><td></td>
2274 2274 <td>--hidden</td>
2275 2275 <td>consider hidden changesets</td></tr>
2276 2276 </table>
2277 2277
2278 2278 </div>
2279 2279 </div>
2280 2280 </div>
2281 2281
2282 2282 <script type="text/javascript">process_dates()</script>
2283 2283
2284 2284
2285 2285 </body>
2286 2286 </html>
2287 2287
2288 2288
2289 2289 $ get-with-headers.py 127.0.0.1:$HGPORT "help/revisions"
2290 2290 200 Script output follows
2291 2291
2292 2292 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
2293 2293 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
2294 2294 <head>
2295 2295 <link rel="icon" href="/static/hgicon.png" type="image/png" />
2296 2296 <meta name="robots" content="index, nofollow" />
2297 2297 <link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
2298 2298 <script type="text/javascript" src="/static/mercurial.js"></script>
2299 2299
2300 2300 <title>Help: revisions</title>
2301 2301 </head>
2302 2302 <body>
2303 2303
2304 2304 <div class="container">
2305 2305 <div class="menu">
2306 2306 <div class="logo">
2307 2307 <a href="https://mercurial-scm.org/">
2308 2308 <img src="/static/hglogo.png" alt="mercurial" /></a>
2309 2309 </div>
2310 2310 <ul>
2311 2311 <li><a href="/shortlog">log</a></li>
2312 2312 <li><a href="/graph">graph</a></li>
2313 2313 <li><a href="/tags">tags</a></li>
2314 2314 <li><a href="/bookmarks">bookmarks</a></li>
2315 2315 <li><a href="/branches">branches</a></li>
2316 2316 </ul>
2317 2317 <ul>
2318 2318 <li class="active"><a href="/help">help</a></li>
2319 2319 </ul>
2320 2320 </div>
2321 2321
2322 2322 <div class="main">
2323 2323 <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2>
2324 2324 <h3>Help: revisions</h3>
2325 2325
2326 2326 <form class="search" action="/log">
2327 2327
2328 2328 <p><input name="rev" id="search1" type="text" size="30" /></p>
2329 2329 <div id="hint">Find changesets by keywords (author, files, the commit message), revision
2330 2330 number or hash, or <a href="/help/revsets">revset expression</a>.</div>
2331 2331 </form>
2332 2332 <div id="doc">
2333 2333 <h1>Specifying Single Revisions</h1>
2334 2334 <p>
2335 2335 Mercurial supports several ways to specify individual revisions.
2336 2336 </p>
2337 2337 <p>
2338 2338 A plain integer is treated as a revision number. Negative integers are
2339 2339 treated as sequential offsets from the tip, with -1 denoting the tip,
2340 2340 -2 denoting the revision prior to the tip, and so forth.
2341 2341 </p>
2342 2342 <p>
2343 2343 A 40-digit hexadecimal string is treated as a unique revision
2344 2344 identifier.
2345 2345 </p>
2346 2346 <p>
2347 2347 A hexadecimal string less than 40 characters long is treated as a
2348 2348 unique revision identifier and is referred to as a short-form
2349 2349 identifier. A short-form identifier is only valid if it is the prefix
2350 2350 of exactly one full-length identifier.
2351 2351 </p>
2352 2352 <p>
2353 2353 Any other string is treated as a bookmark, tag, or branch name. A
2354 2354 bookmark is a movable pointer to a revision. A tag is a permanent name
2355 2355 associated with a revision. A branch name denotes the tipmost open branch head
2356 2356 of that branch - or if they are all closed, the tipmost closed head of the
2357 2357 branch. Bookmark, tag, and branch names must not contain the &quot;:&quot; character.
2358 2358 </p>
2359 2359 <p>
2360 2360 The reserved name &quot;tip&quot; always identifies the most recent revision.
2361 2361 </p>
2362 2362 <p>
2363 2363 The reserved name &quot;null&quot; indicates the null revision. This is the
2364 2364 revision of an empty repository, and the parent of revision 0.
2365 2365 </p>
2366 2366 <p>
2367 2367 The reserved name &quot;.&quot; indicates the working directory parent. If no
2368 2368 working directory is checked out, it is equivalent to null. If an
2369 2369 uncommitted merge is in progress, &quot;.&quot; is the revision of the first
2370 2370 parent.
2371 2371 </p>
2372 2372
2373 2373 </div>
2374 2374 </div>
2375 2375 </div>
2376 2376
2377 2377 <script type="text/javascript">process_dates()</script>
2378 2378
2379 2379
2380 2380 </body>
2381 2381 </html>
2382 2382
2383 2383
2384 2384 $ killdaemons.py
2385 2385
2386 2386 #endif
General Comments 0
You need to be logged in to leave comments. Login now