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