comparison tests/test-help.t @ 40414:444861dc1e55

help: displaying documented aliases by default This makes aliases be displayed in "hg help" when they have a :doc config entry, and also allows them to be assigned to a category with :category. Differential Revision: https://phab.mercurial-scm.org/D5087
author rdamazio@google.com
date Thu, 18 Oct 2018 19:57:05 -0700
parents fabbf9310025
children dce0e0f78f0f
comparison
equal deleted inserted replaced
40413:1ddd202c47d9 40414:444861dc1e55
821 > pass 821 > pass
822 > 822 >
823 > def uisetup(ui): 823 > def uisetup(ui):
824 > ui.setconfig(b'alias', b'shellalias', b'!echo hi', b'helpext') 824 > ui.setconfig(b'alias', b'shellalias', b'!echo hi', b'helpext')
825 > ui.setconfig(b'alias', b'hgalias', b'summary', b'helpext') 825 > ui.setconfig(b'alias', b'hgalias', b'summary', b'helpext')
826 > ui.setconfig(b'alias', b'hgalias:doc', b'My doc', b'helpext')
827 > ui.setconfig(b'alias', b'hgalias:category', b'navigation', b'helpext')
828 > ui.setconfig(b'alias', b'hgaliasnodoc', b'summary', b'helpext')
826 > 829 >
827 > EOF 830 > EOF
828 $ echo '[extensions]' >> $HGRCPATH 831 $ echo '[extensions]' >> $HGRCPATH
829 $ echo "helpext = `pwd`/helpext.py" >> $HGRCPATH 832 $ echo "helpext = `pwd`/helpext.py" >> $HGRCPATH
830 833
831 Test for aliases 834 Test for aliases
832 835
836 $ hg help | grep hgalias
837 hgalias My doc
838
833 $ hg help hgalias 839 $ hg help hgalias
834 hg hgalias [--remote] 840 hg hgalias [--remote]
841
842 alias for: hg summary
843
844 My doc
845
846 defined by: helpext
847
848 options:
849
850 --remote check for push and pull
851
852 (some details hidden, use --verbose to show complete help)
853 $ hg help hgaliasnodoc
854 hg hgaliasnodoc [--remote]
835 855
836 alias for: hg summary 856 alias for: hg summary
837 857
838 summarize working directory state 858 summarize working directory state
839 859
945 965
946 Change navigation: 966 Change navigation:
947 967
948 bisect subdivision search of changesets 968 bisect subdivision search of changesets
949 heads show branch heads 969 heads show branch heads
970 hgalias My doc
950 identify identify the working directory or specified revision 971 identify identify the working directory or specified revision
951 log show revision history of entire repository or files 972 log show revision history of entire repository or files
952 973
953 Working directory management: 974 Working directory management:
954 975
2660 <tr><td> 2681 <tr><td>
2661 <a href="/help/hgalias"> 2682 <a href="/help/hgalias">
2662 hgalias 2683 hgalias
2663 </a> 2684 </a>
2664 </td><td> 2685 </td><td>
2686 My doc
2687 </td></tr>
2688 <tr><td>
2689 <a href="/help/hgaliasnodoc">
2690 hgaliasnodoc
2691 </a>
2692 </td><td>
2665 summarize working directory state 2693 summarize working directory state
2666 </td></tr> 2694 </td></tr>
2667 <tr><td> 2695 <tr><td>
2668 <a href="/help/identify"> 2696 <a href="/help/identify">
2669 identify 2697 identify