Mercurial > hg
comparison tests/test-extension.t @ 14286:005a540e9aee
help: add -c/--command flag to only show command help (issue2799)
author | Martin Geisler <mg@aragost.com> |
---|---|
date | Tue, 10 May 2011 14:42:53 +0200 |
parents | aa64a87b493d |
children | d943412e2fba |
comparison
equal
deleted
inserted
replaced
14285:aa64a87b493d | 14286:005a540e9aee |
---|---|
327 | 327 |
328 use "hg -v help extdiff" to show builtin aliases and global options | 328 use "hg -v help extdiff" to show builtin aliases and global options |
329 | 329 |
330 $ echo 'extdiff = !' >> $HGRCPATH | 330 $ echo 'extdiff = !' >> $HGRCPATH |
331 | 331 |
332 Test help topic with same name as extension | |
333 | |
334 $ cat > multirevs.py <<EOF | |
335 > from mercurial import commands | |
336 > """multirevs extension | |
337 > Big multi-line module docstring.""" | |
338 > def multirevs(ui, repo, arg, *args, **opts): | |
339 > """multirevs command""" | |
340 > pass | |
341 > cmdtable = { | |
342 > "multirevs": (multirevs, [], 'ARG') | |
343 > } | |
344 > commands.norepo += ' multirevs' | |
345 > EOF | |
346 $ echo "multirevs = multirevs.py" >> $HGRCPATH | |
347 | |
348 $ hg help multirevs | |
349 Specifying Multiple Revisions | |
350 | |
351 When Mercurial accepts more than one revision, they may be specified | |
352 individually, or provided as a topologically continuous range, separated | |
353 by the ":" character. | |
354 | |
355 The syntax of range notation is [BEGIN]:[END], where BEGIN and END are | |
356 revision identifiers. Both BEGIN and END are optional. If BEGIN is not | |
357 specified, it defaults to revision number 0. If END is not specified, it | |
358 defaults to the tip. The range ":" thus means "all revisions". | |
359 | |
360 If BEGIN is greater than END, revisions are treated in reverse order. | |
361 | |
362 A range acts as a closed interval. This means that a range of 3:5 gives 3, | |
363 4 and 5. Similarly, a range of 9:6 gives 9, 8, 7, and 6. | |
364 | |
365 use "hg help -c multirevs" to see help for the multirevs command | |
366 | |
367 $ hg help -c multirevs | |
368 hg multirevs ARG | |
369 | |
370 multirevs command | |
371 | |
372 use "hg -v help multirevs" to show global options | |
373 | |
374 $ hg multirevs | |
375 hg multirevs: invalid arguments | |
376 hg multirevs ARG | |
377 | |
378 multirevs command | |
379 | |
380 use "hg help multirevs" to show the full help text | |
381 [255] | |
382 | |
383 $ echo "multirevs = !" >> $HGRCPATH | |
384 | |
332 Issue811: Problem loading extensions twice (by site and by user) | 385 Issue811: Problem loading extensions twice (by site and by user) |
333 | 386 |
334 $ debugpath=`pwd`/debugissue811.py | 387 $ debugpath=`pwd`/debugissue811.py |
335 $ cat > debugissue811.py <<EOF | 388 $ cat > debugissue811.py <<EOF |
336 > '''show all loaded extensions | 389 > '''show all loaded extensions |