##// END OF EJS Templates
tests: fix test-help.t for '@' bookmark documentation...
Kevin Bullock -
r18475:075143f6 stable
parent child Browse files
Show More
@@ -1,877 +1,878 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 working directory with another revision
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 working directory with another revision
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 track a line of development with movable markers
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 copy mark files as copied for the next commit
66 66 diff diff repository (or selected files)
67 67 export dump the header and diffs for one or more changesets
68 68 forget forget the specified files on the next commit
69 69 graft copy changes from other branches onto the current branch
70 70 grep search for a pattern in specified files and revisions
71 71 heads show current repository heads or show branch heads
72 72 help show help for a given topic or a help overview
73 73 identify identify the working copy or specified revision
74 74 import import an ordered set of patches
75 75 incoming show new changesets found in source
76 76 init create a new repository in the given directory
77 77 locate locate files matching specific patterns
78 78 log show revision history of entire repository or files
79 79 manifest output the current or given revision of the project manifest
80 80 merge merge working directory with another revision
81 81 outgoing show changesets not found in the destination
82 82 parents show the parents of the working directory or revision
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 rollback roll back the last transaction (dangerous)
93 93 root print the root (top) of the current working directory
94 94 serve start stand-alone webserver
95 95 showconfig show combined config settings from all hgrc files
96 96 status show changed files in the working directory
97 97 summary summarize working directory state
98 98 tag add one or more tags for the current or given revision
99 99 tags list repository tags
100 100 tip show the tip revision
101 101 unbundle apply one or more changegroup files
102 102 update update working directory (or switch revisions)
103 103 verify verify the integrity of the repository
104 104 version output version and copyright information
105 105
106 106 additional help topics:
107 107
108 108 config Configuration Files
109 109 dates Date Formats
110 110 diffs Diff Formats
111 111 environment Environment Variables
112 112 extensions Using Additional Features
113 113 filesets Specifying File Sets
114 114 glossary Glossary
115 115 hgignore Syntax for Mercurial Ignore Files
116 116 hgweb Configuring hgweb
117 117 merge-tools Merge Tools
118 118 multirevs Specifying Multiple Revisions
119 119 patterns File Name Patterns
120 120 phases Working with Phases
121 121 revisions Specifying Single Revisions
122 122 revsets Specifying Revision Sets
123 123 subrepos Subrepositories
124 124 templating Template Usage
125 125 urls URL Paths
126 126
127 127 use "hg -v help" to show builtin aliases and global options
128 128
129 129 $ hg -q help
130 130 add add the specified files on the next commit
131 131 addremove add all new files, delete all missing files
132 132 annotate show changeset information by line for each file
133 133 archive create an unversioned archive of a repository revision
134 134 backout reverse effect of earlier changeset
135 135 bisect subdivision search of changesets
136 136 bookmarks track a line of development with movable markers
137 137 branch set or show the current branch name
138 138 branches list repository named branches
139 139 bundle create a changegroup file
140 140 cat output the current or given revision of files
141 141 clone make a copy of an existing repository
142 142 commit commit the specified files or all outstanding changes
143 143 copy mark files as copied for the next commit
144 144 diff diff repository (or selected files)
145 145 export dump the header and diffs for one or more changesets
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 current repository heads or show branch heads
150 150 help show help for a given topic or a help overview
151 151 identify identify the working copy 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 locate locate files matching specific patterns
156 156 log show revision history of entire repository or files
157 157 manifest output the current or given revision of the project manifest
158 158 merge merge working directory with another revision
159 159 outgoing show changesets not found in the destination
160 160 parents show the parents of the working directory or revision
161 161 paths show aliases for remote repositories
162 162 phase set or show the current phase name
163 163 pull pull changes from the specified source
164 164 push push changes to the specified destination
165 165 recover roll back an interrupted transaction
166 166 remove remove the specified files on the next commit
167 167 rename rename files; equivalent of copy + remove
168 168 resolve redo merges or set/view the merge status of files
169 169 revert restore files to their checkout state
170 170 rollback roll back the last transaction (dangerous)
171 171 root print the root (top) of the current working directory
172 172 serve start stand-alone webserver
173 173 showconfig show combined config settings from all hgrc files
174 174 status show changed files in the working directory
175 175 summary summarize working directory state
176 176 tag add one or more tags for the current or given revision
177 177 tags list repository tags
178 178 tip show the tip revision
179 179 unbundle apply one or more changegroup files
180 180 update update working directory (or switch revisions)
181 181 verify verify the integrity of the repository
182 182 version output version and copyright information
183 183
184 184 additional help topics:
185 185
186 186 config Configuration Files
187 187 dates Date Formats
188 188 diffs Diff Formats
189 189 environment Environment Variables
190 190 extensions Using Additional Features
191 191 filesets Specifying File Sets
192 192 glossary Glossary
193 193 hgignore Syntax for Mercurial Ignore Files
194 194 hgweb Configuring hgweb
195 195 merge-tools Merge Tools
196 196 multirevs Specifying Multiple Revisions
197 197 patterns File Name Patterns
198 198 phases Working with Phases
199 199 revisions Specifying Single Revisions
200 200 revsets Specifying Revision Sets
201 201 subrepos Subrepositories
202 202 templating Template Usage
203 203 urls URL Paths
204 204
205 205 Test short command list with verbose option
206 206
207 207 $ hg -v help shortlist
208 208 Mercurial Distributed SCM
209 209
210 210 basic commands:
211 211
212 212 add add the specified files on the next commit
213 213 annotate, blame
214 214 show changeset information by line for each file
215 215 clone make a copy of an existing repository
216 216 commit, ci commit the specified files or all outstanding changes
217 217 diff diff repository (or selected files)
218 218 export dump the header and diffs for one or more changesets
219 219 forget forget the specified files on the next commit
220 220 init create a new repository in the given directory
221 221 log, history show revision history of entire repository or files
222 222 merge merge working directory with another revision
223 223 pull pull changes from the specified source
224 224 push push changes to the specified destination
225 225 remove, rm remove the specified files on the next commit
226 226 serve start stand-alone webserver
227 227 status, st show changed files in the working directory
228 228 summary, sum summarize working directory state
229 229 update, up, checkout, co
230 230 update working directory (or switch revisions)
231 231
232 232 global options:
233 233
234 234 -R --repository REPO repository root directory or name of overlay bundle
235 235 file
236 236 --cwd DIR change working directory
237 237 -y --noninteractive do not prompt, automatically pick the first choice for
238 238 all prompts
239 239 -q --quiet suppress output
240 240 -v --verbose enable additional output
241 241 --config CONFIG [+] set/override config option (use 'section.name=value')
242 242 --debug enable debugging output
243 243 --debugger start debugger
244 244 --encoding ENCODE set the charset encoding (default: ascii)
245 245 --encodingmode MODE set the charset encoding mode (default: strict)
246 246 --traceback always print a traceback on exception
247 247 --time time how long the command takes
248 248 --profile print command execution profile
249 249 --version output version information and exit
250 250 -h --help display help and exit
251 251 --hidden consider hidden changesets
252 252
253 253 [+] marked option can be specified multiple times
254 254
255 255 use "hg help" for the full list of commands
256 256
257 257 $ hg add -h
258 258 hg add [OPTION]... [FILE]...
259 259
260 260 add the specified files on the next commit
261 261
262 262 Schedule files to be version controlled and added to the repository.
263 263
264 264 The files will be added to the repository at the next commit. To undo an
265 265 add before that, see "hg forget".
266 266
267 267 If no names are given, add all files to the repository.
268 268
269 269 Returns 0 if all files are successfully added.
270 270
271 271 options:
272 272
273 273 -I --include PATTERN [+] include names matching the given patterns
274 274 -X --exclude PATTERN [+] exclude names matching the given patterns
275 275 -S --subrepos recurse into subrepositories
276 276 -n --dry-run do not perform actions, just print output
277 277
278 278 [+] marked option can be specified multiple times
279 279
280 280 use "hg -v help add" to show more complete help and the global options
281 281
282 282 Verbose help for add
283 283
284 284 $ hg add -hv
285 285 hg add [OPTION]... [FILE]...
286 286
287 287 add the specified files on the next commit
288 288
289 289 Schedule files to be version controlled and added to the repository.
290 290
291 291 The files will be added to the repository at the next commit. To undo an
292 292 add before that, see "hg forget".
293 293
294 294 If no names are given, add all files to the repository.
295 295
296 296 An example showing how new (unknown) files are added automatically by "hg
297 297 add":
298 298
299 299 $ ls
300 300 foo.c
301 301 $ hg status
302 302 ? foo.c
303 303 $ hg add
304 304 adding foo.c
305 305 $ hg status
306 306 A foo.c
307 307
308 308 Returns 0 if all files are successfully added.
309 309
310 310 options:
311 311
312 312 -I --include PATTERN [+] include names matching the given patterns
313 313 -X --exclude PATTERN [+] exclude names matching the given patterns
314 314 -S --subrepos recurse into subrepositories
315 315 -n --dry-run do not perform actions, just print output
316 316
317 317 [+] marked option can be specified multiple times
318 318
319 319 global options:
320 320
321 321 -R --repository REPO repository root directory or name of overlay bundle
322 322 file
323 323 --cwd DIR change working directory
324 324 -y --noninteractive do not prompt, automatically pick the first choice for
325 325 all prompts
326 326 -q --quiet suppress output
327 327 -v --verbose enable additional output
328 328 --config CONFIG [+] set/override config option (use 'section.name=value')
329 329 --debug enable debugging output
330 330 --debugger start debugger
331 331 --encoding ENCODE set the charset encoding (default: ascii)
332 332 --encodingmode MODE set the charset encoding mode (default: strict)
333 333 --traceback always print a traceback on exception
334 334 --time time how long the command takes
335 335 --profile print command execution profile
336 336 --version output version information and exit
337 337 -h --help display help and exit
338 338 --hidden consider hidden changesets
339 339
340 340 [+] marked option can be specified multiple times
341 341
342 342 Test help option with version option
343 343
344 344 $ hg add -h --version
345 345 Mercurial Distributed SCM (version *) (glob)
346 346 (see http://mercurial.selenic.com for more information)
347 347
348 348 Copyright (C) 2005-2012 Matt Mackall and others
349 349 This is free software; see the source for copying conditions. There is NO
350 350 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
351 351
352 352 $ hg add --skjdfks
353 353 hg add: option --skjdfks not recognized
354 354 hg add [OPTION]... [FILE]...
355 355
356 356 add the specified files on the next commit
357 357
358 358 options:
359 359
360 360 -I --include PATTERN [+] include names matching the given patterns
361 361 -X --exclude PATTERN [+] exclude names matching the given patterns
362 362 -S --subrepos recurse into subrepositories
363 363 -n --dry-run do not perform actions, just print output
364 364
365 365 [+] marked option can be specified multiple times
366 366
367 367 use "hg help add" to show the full help text
368 368 [255]
369 369
370 370 Test ambiguous command help
371 371
372 372 $ hg help ad
373 373 list of commands:
374 374
375 375 add add the specified files on the next commit
376 376 addremove add all new files, delete all missing files
377 377
378 378 use "hg -v help ad" to show builtin aliases and global options
379 379
380 380 Test command without options
381 381
382 382 $ hg help verify
383 383 hg verify
384 384
385 385 verify the integrity of the repository
386 386
387 387 Verify the integrity of the current repository.
388 388
389 389 This will perform an extensive check of the repository's integrity,
390 390 validating the hashes and checksums of each entry in the changelog,
391 391 manifest, and tracked files, as well as the integrity of their crosslinks
392 392 and indices.
393 393
394 394 Please see http://mercurial.selenic.com/wiki/RepositoryCorruption for more
395 395 information about recovery from corruption of the repository.
396 396
397 397 Returns 0 on success, 1 if errors are encountered.
398 398
399 399 use "hg -v help verify" to show the global options
400 400
401 401 $ hg help diff
402 402 hg diff [OPTION]... ([-c REV] | [-r REV1 [-r REV2]]) [FILE]...
403 403
404 404 diff repository (or selected files)
405 405
406 406 Show differences between revisions for the specified files.
407 407
408 408 Differences between files are shown using the unified diff format.
409 409
410 410 Note:
411 411 diff may generate unexpected results for merges, as it will default to
412 412 comparing against the working directory's first parent changeset if no
413 413 revisions are specified.
414 414
415 415 When two revision arguments are given, then changes are shown between
416 416 those revisions. If only one revision is specified then that revision is
417 417 compared to the working directory, and, when no revisions are specified,
418 418 the working directory files are compared to its parent.
419 419
420 420 Alternatively you can specify -c/--change with a revision to see the
421 421 changes in that changeset relative to its first parent.
422 422
423 423 Without the -a/--text option, diff will avoid generating diffs of files it
424 424 detects as binary. With -a, diff will generate a diff anyway, probably
425 425 with undesirable results.
426 426
427 427 Use the -g/--git option to generate diffs in the git extended diff format.
428 428 For more information, read "hg help diffs".
429 429
430 430 Returns 0 on success.
431 431
432 432 options:
433 433
434 434 -r --rev REV [+] revision
435 435 -c --change REV change made by revision
436 436 -a --text treat all files as text
437 437 -g --git use git extended diff format
438 438 --nodates omit dates from diff headers
439 439 -p --show-function show which function each change is in
440 440 --reverse produce a diff that undoes the changes
441 441 -w --ignore-all-space ignore white space when comparing lines
442 442 -b --ignore-space-change ignore changes in the amount of white space
443 443 -B --ignore-blank-lines ignore changes whose lines are all blank
444 444 -U --unified NUM number of lines of context to show
445 445 --stat output diffstat-style summary of changes
446 446 -I --include PATTERN [+] include names matching the given patterns
447 447 -X --exclude PATTERN [+] exclude names matching the given patterns
448 448 -S --subrepos recurse into subrepositories
449 449
450 450 [+] marked option can be specified multiple times
451 451
452 452 use "hg -v help diff" to show more complete help and the global options
453 453
454 454 $ hg help status
455 455 hg status [OPTION]... [FILE]...
456 456
457 457 aliases: st
458 458
459 459 show changed files in the working directory
460 460
461 461 Show status of files in the repository. If names are given, only files
462 462 that match are shown. Files that are clean or ignored or the source of a
463 463 copy/move operation, are not listed unless -c/--clean, -i/--ignored,
464 464 -C/--copies or -A/--all are given. Unless options described with "show
465 465 only ..." are given, the options -mardu are used.
466 466
467 467 Option -q/--quiet hides untracked (unknown and ignored) files unless
468 468 explicitly requested with -u/--unknown or -i/--ignored.
469 469
470 470 Note:
471 471 status may appear to disagree with diff if permissions have changed or
472 472 a merge has occurred. The standard diff format does not report
473 473 permission changes and diff only reports changes relative to one merge
474 474 parent.
475 475
476 476 If one revision is given, it is used as the base revision. If two
477 477 revisions are given, the differences between them are shown. The --change
478 478 option can also be used as a shortcut to list the changed files of a
479 479 revision from its first parent.
480 480
481 481 The codes used to show the status of files are:
482 482
483 483 M = modified
484 484 A = added
485 485 R = removed
486 486 C = clean
487 487 ! = missing (deleted by non-hg command, but still tracked)
488 488 ? = not tracked
489 489 I = ignored
490 490 = origin of the previous file listed as A (added)
491 491
492 492 Returns 0 on success.
493 493
494 494 options:
495 495
496 496 -A --all show status of all files
497 497 -m --modified show only modified files
498 498 -a --added show only added files
499 499 -r --removed show only removed files
500 500 -d --deleted show only deleted (but tracked) files
501 501 -c --clean show only files without changes
502 502 -u --unknown show only unknown (not tracked) files
503 503 -i --ignored show only ignored files
504 504 -n --no-status hide status prefix
505 505 -C --copies show source of copied files
506 506 -0 --print0 end filenames with NUL, for use with xargs
507 507 --rev REV [+] show difference from revision
508 508 --change REV list the changed files of a revision
509 509 -I --include PATTERN [+] include names matching the given patterns
510 510 -X --exclude PATTERN [+] exclude names matching the given patterns
511 511 -S --subrepos recurse into subrepositories
512 512
513 513 [+] marked option can be specified multiple times
514 514
515 515 use "hg -v help status" to show more complete help and the global options
516 516
517 517 $ hg -q help status
518 518 hg status [OPTION]... [FILE]...
519 519
520 520 show changed files in the working directory
521 521
522 522 $ hg help foo
523 523 hg: unknown command 'foo'
524 524 Mercurial Distributed SCM
525 525
526 526 basic commands:
527 527
528 528 add add the specified files on the next commit
529 529 annotate show changeset information by line for each file
530 530 clone make a copy of an existing repository
531 531 commit commit the specified files or all outstanding changes
532 532 diff diff repository (or selected files)
533 533 export dump the header and diffs for one or more changesets
534 534 forget forget the specified files on the next commit
535 535 init create a new repository in the given directory
536 536 log show revision history of entire repository or files
537 537 merge merge working directory with another revision
538 538 pull pull changes from the specified source
539 539 push push changes to the specified destination
540 540 remove remove the specified files on the next commit
541 541 serve start stand-alone webserver
542 542 status show changed files in the working directory
543 543 summary summarize working directory state
544 544 update update working directory (or switch revisions)
545 545
546 546 use "hg help" for the full list of commands or "hg -v" for details
547 547 [255]
548 548
549 549 $ hg skjdfks
550 550 hg: unknown command 'skjdfks'
551 551 Mercurial Distributed SCM
552 552
553 553 basic commands:
554 554
555 555 add add the specified files on the next commit
556 556 annotate show changeset information by line for each file
557 557 clone make a copy of an existing repository
558 558 commit commit the specified files or all outstanding changes
559 559 diff diff repository (or selected files)
560 560 export dump the header and diffs for one or more changesets
561 561 forget forget the specified files on the next commit
562 562 init create a new repository in the given directory
563 563 log show revision history of entire repository or files
564 564 merge merge working directory with another revision
565 565 pull pull changes from the specified source
566 566 push push changes to the specified destination
567 567 remove remove the specified files on the next commit
568 568 serve start stand-alone webserver
569 569 status show changed files in the working directory
570 570 summary summarize working directory state
571 571 update update working directory (or switch revisions)
572 572
573 573 use "hg help" for the full list of commands or "hg -v" for details
574 574 [255]
575 575
576 576 $ cat > helpext.py <<EOF
577 577 > import os
578 578 > from mercurial import commands
579 579 >
580 580 > def nohelp(ui, *args, **kwargs):
581 581 > pass
582 582 >
583 583 > cmdtable = {
584 584 > "nohelp": (nohelp, [], "hg nohelp"),
585 585 > }
586 586 >
587 587 > commands.norepo += ' nohelp'
588 588 > EOF
589 589 $ echo '[extensions]' >> $HGRCPATH
590 590 $ echo "helpext = `pwd`/helpext.py" >> $HGRCPATH
591 591
592 592 Test command with no help text
593 593
594 594 $ hg help nohelp
595 595 hg nohelp
596 596
597 597 (no help text available)
598 598
599 599 use "hg -v help nohelp" to show the global options
600 600
601 601 $ hg help -k nohelp
602 602 Commands:
603 603
604 604 nohelp hg nohelp
605 605
606 606 Extension Commands:
607 607
608 608 nohelp (no help text available)
609 609
610 610 Test that default list of commands omits extension commands
611 611
612 612 $ hg help
613 613 Mercurial Distributed SCM
614 614
615 615 list of commands:
616 616
617 617 add add the specified files on the next commit
618 618 addremove add all new files, delete all missing files
619 619 annotate show changeset information by line for each file
620 620 archive create an unversioned archive of a repository revision
621 621 backout reverse effect of earlier changeset
622 622 bisect subdivision search of changesets
623 623 bookmarks track a line of development with movable markers
624 624 branch set or show the current branch name
625 625 branches list repository named branches
626 626 bundle create a changegroup file
627 627 cat output the current or given revision of files
628 628 clone make a copy of an existing repository
629 629 commit commit the specified files or all outstanding changes
630 630 copy mark files as copied for the next commit
631 631 diff diff repository (or selected files)
632 632 export dump the header and diffs for one or more changesets
633 633 forget forget the specified files on the next commit
634 634 graft copy changes from other branches onto the current branch
635 635 grep search for a pattern in specified files and revisions
636 636 heads show current repository heads or show branch heads
637 637 help show help for a given topic or a help overview
638 638 identify identify the working copy or specified revision
639 639 import import an ordered set of patches
640 640 incoming show new changesets found in source
641 641 init create a new repository in the given directory
642 642 locate locate files matching specific patterns
643 643 log show revision history of entire repository or files
644 644 manifest output the current or given revision of the project manifest
645 645 merge merge working directory with another revision
646 646 outgoing show changesets not found in the destination
647 647 parents show the parents of the working directory or revision
648 648 paths show aliases for remote repositories
649 649 phase set or show the current phase name
650 650 pull pull changes from the specified source
651 651 push push changes to the specified destination
652 652 recover roll back an interrupted transaction
653 653 remove remove the specified files on the next commit
654 654 rename rename files; equivalent of copy + remove
655 655 resolve redo merges or set/view the merge status of files
656 656 revert restore files to their checkout state
657 657 rollback roll back the last transaction (dangerous)
658 658 root print the root (top) of the current working directory
659 659 serve start stand-alone webserver
660 660 showconfig show combined config settings from all hgrc files
661 661 status show changed files in the working directory
662 662 summary summarize working directory state
663 663 tag add one or more tags for the current or given revision
664 664 tags list repository tags
665 665 tip show the tip revision
666 666 unbundle apply one or more changegroup files
667 667 update update working directory (or switch revisions)
668 668 verify verify the integrity of the repository
669 669 version output version and copyright information
670 670
671 671 enabled extensions:
672 672
673 673 helpext (no help text available)
674 674
675 675 additional help topics:
676 676
677 677 config Configuration Files
678 678 dates Date Formats
679 679 diffs Diff Formats
680 680 environment Environment Variables
681 681 extensions Using Additional Features
682 682 filesets Specifying File Sets
683 683 glossary Glossary
684 684 hgignore Syntax for Mercurial Ignore Files
685 685 hgweb Configuring hgweb
686 686 merge-tools Merge Tools
687 687 multirevs Specifying Multiple Revisions
688 688 patterns File Name Patterns
689 689 phases Working with Phases
690 690 revisions Specifying Single Revisions
691 691 revsets Specifying Revision Sets
692 692 subrepos Subrepositories
693 693 templating Template Usage
694 694 urls URL Paths
695 695
696 696 use "hg -v help" to show builtin aliases and global options
697 697
698 698
699 699
700 700 Test list of commands with command with no help text
701 701
702 702 $ hg help helpext
703 703 helpext extension - no help text available
704 704
705 705 list of commands:
706 706
707 707 nohelp (no help text available)
708 708
709 709 use "hg -v help helpext" to show builtin aliases and global options
710 710
711 711 Test a help topic
712 712
713 713 $ hg help revs
714 714 Specifying Single Revisions
715 715
716 716 Mercurial supports several ways to specify individual revisions.
717 717
718 718 A plain integer is treated as a revision number. Negative integers are
719 719 treated as sequential offsets from the tip, with -1 denoting the tip, -2
720 720 denoting the revision prior to the tip, and so forth.
721 721
722 722 A 40-digit hexadecimal string is treated as a unique revision identifier.
723 723
724 724 A hexadecimal string less than 40 characters long is treated as a unique
725 725 revision identifier and is referred to as a short-form identifier. A
726 726 short-form identifier is only valid if it is the prefix of exactly one
727 727 full-length identifier.
728 728
729 729 Any other string is treated as a bookmark, tag, or branch name. A bookmark
730 730 is a movable pointer to a revision. A tag is a permanent name associated
731 731 with a revision. A branch name denotes the tipmost revision of that
732 732 branch. Bookmark, tag, and branch names must not contain the ":"
733 733 character.
734 734
735 735 The reserved name "tip" always identifies the most recent revision.
736 736
737 737 The reserved name "null" indicates the null revision. This is the revision
738 738 of an empty repository, and the parent of revision 0.
739 739
740 740 The reserved name "." indicates the working directory parent. If no
741 741 working directory is checked out, it is equivalent to null. If an
742 742 uncommitted merge is in progress, "." is the revision of the first parent.
743 743
744 744 Test templating help
745 745
746 746 $ hg help templating | egrep '(desc|diffstat|firstline|nonempty) '
747 747 desc String. The text of the changeset description.
748 748 diffstat String. Statistics of changes with the following format:
749 749 firstline Any text. Returns the first line of text.
750 750 nonempty Any text. Returns '(none)' if the string is empty.
751 751
752 752 Test help hooks
753 753
754 754 $ cat > helphook1.py <<EOF
755 755 > from mercurial import help
756 756 >
757 757 > def rewrite(topic, doc):
758 758 > return doc + '\nhelphook1\n'
759 759 >
760 760 > def extsetup(ui):
761 761 > help.addtopichook('revsets', rewrite)
762 762 > EOF
763 763 $ cat > helphook2.py <<EOF
764 764 > from mercurial import help
765 765 >
766 766 > def rewrite(topic, doc):
767 767 > return doc + '\nhelphook2\n'
768 768 >
769 769 > def extsetup(ui):
770 770 > help.addtopichook('revsets', rewrite)
771 771 > EOF
772 772 $ echo '[extensions]' >> $HGRCPATH
773 773 $ echo "helphook1 = `pwd`/helphook1.py" >> $HGRCPATH
774 774 $ echo "helphook2 = `pwd`/helphook2.py" >> $HGRCPATH
775 775 $ hg help revsets | grep helphook
776 776 helphook1
777 777 helphook2
778 778
779 779 Test keyword search help
780 780
781 781 $ hg help -k clone
782 782 Topics:
783 783
784 784 config Configuration Files
785 785 extensions Using Additional Features
786 786 glossary Glossary
787 787 phases Working with Phases
788 788 subrepos Subrepositories
789 789 urls URL Paths
790 790
791 791 Commands:
792 792
793 bookmarks track a line of development with movable markers
793 794 clone make a copy of an existing repository
794 795 paths show aliases for remote repositories
795 796 update update working directory (or switch revisions)
796 797
797 798 Extensions:
798 799
799 800 relink recreates hardlinks between repository clones
800 801
801 802 Extension Commands:
802 803
803 804 qclone clone main and patch repository at same time
804 805
805 806 Test omit indicating for help
806 807
807 808 $ cat > addverboseitems.py <<EOF
808 809 > '''extension to test omit indicating.
809 810 >
810 811 > This paragraph is never omitted (for extension)
811 812 >
812 813 > .. container:: verbose
813 814 >
814 815 > This paragraph is omitted,
815 816 > if :hg:\`help\` is invoked witout \`\`-v\`\` (for extension)
816 817 >
817 818 > This paragraph is never omitted, too (for extension)
818 819 > '''
819 820 >
820 821 > from mercurial import help, commands
821 822 > testtopic = """This paragraph is never omitted (for topic).
822 823 >
823 824 > .. container:: verbose
824 825 >
825 826 > This paragraph is omitted,
826 827 > if :hg:\`help\` is invoked witout \`\`-v\`\` (for topic)
827 828 >
828 829 > This paragraph is never omitted, too (for topic)
829 830 > """
830 831 > def extsetup(ui):
831 832 > help.helptable.append((["topic-containing-verbose"],
832 833 > "This is the topic to test omit indicating.",
833 834 > lambda : testtopic))
834 835 > EOF
835 836 $ echo '[extensions]' >> $HGRCPATH
836 837 $ echo "addverboseitems = `pwd`/addverboseitems.py" >> $HGRCPATH
837 838 $ hg help addverboseitems
838 839 addverboseitems extension - extension to test omit indicating.
839 840
840 841 This paragraph is never omitted (for extension)
841 842
842 843 This paragraph is never omitted, too (for extension)
843 844
844 845 use "hg help -v addverboseitems" to show more complete help
845 846
846 847 no commands defined
847 848 $ hg help -v addverboseitems
848 849 addverboseitems extension - extension to test omit indicating.
849 850
850 851 This paragraph is never omitted (for extension)
851 852
852 853 This paragraph is omitted, if "hg help" is invoked witout "-v" (for extension)
853 854
854 855 This paragraph is never omitted, too (for extension)
855 856
856 857 no commands defined
857 858 $ hg help topic-containing-verbose
858 859 This is the topic to test omit indicating.
859 860
860 861 This paragraph is never omitted (for topic).
861 862
862 863 This paragraph is never omitted, too (for topic)
863 864
864 865 use "hg help -v topic-containing-verbose" to show more complete help
865 866 $ hg help -v topic-containing-verbose
866 867 This is the topic to test omit indicating.
867 868
868 869 This paragraph is never omitted (for topic).
869 870
870 871 This paragraph is omitted, if "hg help" is invoked witout "-v" (for topic)
871 872
872 873 This paragraph is never omitted, too (for topic)
873 874
874 875 Test usage of section marks in help documents
875 876
876 877 $ cd "$TESTDIR"/../doc
877 878 $ python check-seclevel.py
General Comments 0
You need to be logged in to leave comments. Login now