changeset 13888:9e5407a67dea

help: sort help topics to make the output more readable (issue2751)
author Yun Lee <yunlee.bj@gmail.com>
date Tue, 05 Apr 2011 12:40:47 +0800
parents 06803dc5fc19
children 9a96efc4af8a
files mercurial/help.py tests/test-globalopts.t tests/test-help.t
diffstat 3 files changed, 46 insertions(+), 42 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/help.py	Tue Apr 05 11:09:08 2011 +0200
+++ b/mercurial/help.py	Tue Apr 05 12:40:47 2011 +0800
@@ -86,7 +86,7 @@
 
     return loader
 
-helptable = [
+helptable = sorted([
     (["config", "hgrc"], _("Configuration Files"), loaddoc('config')),
     (["dates"], _("Date Formats"), loaddoc('dates')),
     (["patterns"], _("File Name Patterns"), loaddoc('patterns')),
@@ -106,7 +106,7 @@
     (["subrepo", "subrepos"], _("Subrepositories"), loaddoc('subrepos')),
     (["hgweb"], _("Configuring hgweb"), loaddoc('hgweb')),
     (["glossary"], _("Glossary"), loaddoc('glossary')),
-]
+])
 
 # Map topics to lists of callable taking the current topic help and
 # returning the updated version
--- a/tests/test-globalopts.t	Tue Apr 05 11:09:08 2011 +0200
+++ b/tests/test-globalopts.t	Tue Apr 05 12:40:47 2011 +0800
@@ -335,22 +335,24 @@
   
    config       Configuration Files
    dates        Date Formats
-   patterns     File Name Patterns
+   diffs        Diff Formats
    environment  Environment Variables
-   revisions    Specifying Single Revisions
+   extensions   Using additional features
+   glossary     Glossary
+   hgweb        Configuring hgweb
+   merge-tools  Merge Tools
    multirevs    Specifying Multiple Revisions
+   patterns     File Name Patterns
+   revisions    Specifying Single Revisions
    revsets      Specifying Revision Sets
-   diffs        Diff Formats
-   merge-tools  Merge Tools
+   subrepos     Subrepositories
    templating   Template Usage
    urls         URL Paths
-   extensions   Using additional features
-   subrepos     Subrepositories
-   hgweb        Configuring hgweb
-   glossary     Glossary
   
   use "hg -v help" to show builtin aliases and global options
 
+
+
   $ hg --help
   Mercurial Distributed SCM
   
@@ -412,19 +414,19 @@
   
    config       Configuration Files
    dates        Date Formats
-   patterns     File Name Patterns
+   diffs        Diff Formats
    environment  Environment Variables
-   revisions    Specifying Single Revisions
+   extensions   Using additional features
+   glossary     Glossary
+   hgweb        Configuring hgweb
+   merge-tools  Merge Tools
    multirevs    Specifying Multiple Revisions
+   patterns     File Name Patterns
+   revisions    Specifying Single Revisions
    revsets      Specifying Revision Sets
-   diffs        Diff Formats
-   merge-tools  Merge Tools
+   subrepos     Subrepositories
    templating   Template Usage
    urls         URL Paths
-   extensions   Using additional features
-   subrepos     Subrepositories
-   hgweb        Configuring hgweb
-   glossary     Glossary
   
   use "hg -v help" to show builtin aliases and global options
 
--- a/tests/test-help.t	Tue Apr 05 11:09:08 2011 +0200
+++ b/tests/test-help.t	Tue Apr 05 12:40:47 2011 +0800
@@ -105,19 +105,19 @@
   
    config       Configuration Files
    dates        Date Formats
-   patterns     File Name Patterns
+   diffs        Diff Formats
    environment  Environment Variables
-   revisions    Specifying Single Revisions
+   extensions   Using additional features
+   glossary     Glossary
+   hgweb        Configuring hgweb
+   merge-tools  Merge Tools
    multirevs    Specifying Multiple Revisions
+   patterns     File Name Patterns
+   revisions    Specifying Single Revisions
    revsets      Specifying Revision Sets
-   diffs        Diff Formats
-   merge-tools  Merge Tools
+   subrepos     Subrepositories
    templating   Template Usage
    urls         URL Paths
-   extensions   Using additional features
-   subrepos     Subrepositories
-   hgweb        Configuring hgweb
-   glossary     Glossary
   
   use "hg -v help" to show builtin aliases and global options
 
@@ -178,19 +178,19 @@
   
    config       Configuration Files
    dates        Date Formats
-   patterns     File Name Patterns
+   diffs        Diff Formats
    environment  Environment Variables
-   revisions    Specifying Single Revisions
+   extensions   Using additional features
+   glossary     Glossary
+   hgweb        Configuring hgweb
+   merge-tools  Merge Tools
    multirevs    Specifying Multiple Revisions
+   patterns     File Name Patterns
+   revisions    Specifying Single Revisions
    revsets      Specifying Revision Sets
-   diffs        Diff Formats
-   merge-tools  Merge Tools
+   subrepos     Subrepositories
    templating   Template Usage
    urls         URL Paths
-   extensions   Using additional features
-   subrepos     Subrepositories
-   hgweb        Configuring hgweb
-   glossary     Glossary
 
 Test short command list with verbose option
 
@@ -705,22 +705,24 @@
   
    config       Configuration Files
    dates        Date Formats
-   patterns     File Name Patterns
+   diffs        Diff Formats
    environment  Environment Variables
-   revisions    Specifying Single Revisions
+   extensions   Using additional features
+   glossary     Glossary
+   hgweb        Configuring hgweb
+   merge-tools  Merge Tools
    multirevs    Specifying Multiple Revisions
+   patterns     File Name Patterns
+   revisions    Specifying Single Revisions
    revsets      Specifying Revision Sets
-   diffs        Diff Formats
-   merge-tools  Merge Tools
+   subrepos     Subrepositories
    templating   Template Usage
    urls         URL Paths
-   extensions   Using additional features
-   subrepos     Subrepositories
-   hgweb        Configuring hgweb
-   glossary     Glossary
   
   use "hg -v help" to show builtin aliases and global options
 
+
+
 Test list of commands with command with no help text
 
   $ hg help helpext