comparison tests/test-help.t @ 28828:3640c1702c43

help: report source of aliases
author timeless <timeless@mozdev.org>
date Fri, 08 Apr 2016 18:35:49 +0000
parents d001d6d27570
children eb017d52899d
comparison
equal deleted inserted replaced
28827:1e184241de51 28828:3640c1702c43
671 > @command('debugoptDEP', [('', 'dopt', None, 'option is (DEPRECATED)')]) 671 > @command('debugoptDEP', [('', 'dopt', None, 'option is (DEPRECATED)')])
672 > @command('debugoptEXP', [('', 'eopt', None, 'option is (EXPERIMENTAL)')]) 672 > @command('debugoptEXP', [('', 'eopt', None, 'option is (EXPERIMENTAL)')])
673 > def nohelp(ui, *args, **kwargs): 673 > def nohelp(ui, *args, **kwargs):
674 > pass 674 > pass
675 > 675 >
676 > def uisetup(ui):
677 > ui.setconfig('alias', 'shellalias', '!echo hi', 'helpext')
678 > ui.setconfig('alias', 'hgalias', 'summary', 'helpext')
679 >
676 > EOF 680 > EOF
677 $ echo '[extensions]' >> $HGRCPATH 681 $ echo '[extensions]' >> $HGRCPATH
678 $ echo "helpext = `pwd`/helpext.py" >> $HGRCPATH 682 $ echo "helpext = `pwd`/helpext.py" >> $HGRCPATH
683
684 Test for aliases
685
686 $ hg help hgalias
687 hg hgalias [--remote]
688
689 alias for: hg summary
690
691 summarize working directory state
692
693 This generates a brief summary of the working directory state, including
694 parents, branch, commit status, phase and available updates.
695
696 With the --remote option, this will check the default paths for incoming
697 and outgoing changes. This can be time-consuming.
698
699 Returns 0 on success.
700
701 defined by: helpext
702
703 options:
704
705 --remote check for push and pull
706
707 (some details hidden, use --verbose to show complete help)
708
709 $ hg help shellalias
710 hg shellalias
711
712 shell alias for:
713
714 echo hi
715
716 defined by: helpext
717
718 (some details hidden, use --verbose to show complete help)
679 719
680 Test command with no help text 720 Test command with no help text
681 721
682 $ hg help nohelp 722 $ hg help nohelp
683 hg nohelp 723 hg nohelp
2062 </a> 2102 </a>
2063 </td><td> 2103 </td><td>
2064 show help for a given topic or a help overview 2104 show help for a given topic or a help overview
2065 </td></tr> 2105 </td></tr>
2066 <tr><td> 2106 <tr><td>
2107 <a href="/help/hgalias">
2108 hgalias
2109 </a>
2110 </td><td>
2111 summarize working directory state
2112 </td></tr>
2113 <tr><td>
2067 <a href="/help/identify"> 2114 <a href="/help/identify">
2068 identify 2115 identify
2069 </a> 2116 </a>
2070 </td><td> 2117 </td><td>
2071 identify the working directory or specified revision 2118 identify the working directory or specified revision
2151 <a href="/help/root"> 2198 <a href="/help/root">
2152 root 2199 root
2153 </a> 2200 </a>
2154 </td><td> 2201 </td><td>
2155 print the root (top) of the current working directory 2202 print the root (top) of the current working directory
2203 </td></tr>
2204 <tr><td>
2205 <a href="/help/shellalias">
2206 shellalias
2207 </a>
2208 </td><td>
2209 (no help text available)
2156 </td></tr> 2210 </td></tr>
2157 <tr><td> 2211 <tr><td>
2158 <a href="/help/tag"> 2212 <a href="/help/tag">
2159 tag 2213 tag
2160 </a> 2214 </a>