[patch]help:sort help topics in alphabetical order to make it more readable (issue2751)

Matt Mackall mpm at selenic.com
Mon Apr 4 12:37:12 CDT 2011


On Mon, 2011-04-04 at 21:37 +0800, yun lee wrote:
> # HG changeset patch
> # User Yun Lee <yunlee.bj at gmail.com>
> # Date 1301923899 -28800
> # Node ID abedc2cc4c4cc421d1e26f9402a66cee0f3a517a
> # Parent  0995eee8ffe4a24478379fb16fd6c38812bc3dd5
> help:sort help topics in alphabetical order to make it more readable (issue2751)
> 
> diff -r 0995eee8ffe4 -r abedc2cc4c4c mercurial/help.py
> --- a/mercurial/help.py	Sat Apr 02 11:07:05 2011 +0200
> +++ b/mercurial/help.py	Mon Apr 04 21:31:39 2011 +0800
> @@ -89,23 +89,23 @@
>  helptable = [
>      (["config", "hgrc"], _("Configuration Files"), loaddoc('config')),
>      (["dates"], _("Date Formats"), loaddoc('dates')),
> -    (["patterns"], _("File Name Patterns"), loaddoc('patterns')),
> +    (['diffs'], _('Diff Formats'), loaddoc('diffs')),
>      (['environment', 'env'], _('Environment Variables'),
>       loaddoc('environment')),
> +    (["extensions"], _("Using additional features"), extshelp),
> +    (["glossary"], _("Glossary"), loaddoc('glossary')),
> +    (["hgweb"], _("Configuring hgweb"), loaddoc('hgweb')),
> +    (['merge-tools'], _('Merge Tools'), loaddoc('merge-tools')),
> +    (['mrevs', 'multirevs'], _('Specifying Multiple Revisions'),
> +     loaddoc('multirevs')),
> +    (["patterns"], _("File Name Patterns"), loaddoc('patterns')),
>      (['revs', 'revisions'], _('Specifying Single Revisions'),
>       loaddoc('revisions')),
> -    (['mrevs', 'multirevs'], _('Specifying Multiple Revisions'),
> -     loaddoc('multirevs')),
>      (['revset', 'revsets'], _("Specifying Revision Sets"), loaddoc('revsets')),
> -    (['diffs'], _('Diff Formats'), loaddoc('diffs')),
> -    (['merge-tools'], _('Merge Tools'), loaddoc('merge-tools')),
> +    (["subrepo", "subrepos"], _("Subrepositories"), loaddoc('subrepos')),
>      (['templating', 'templates'], _('Template Usage'),
>       loaddoc('templates')),
>      (['urls'], _('URL Paths'), loaddoc('urls')),
> -    (["extensions"], _("Using additional features"), extshelp),
> -    (["subrepo", "subrepos"], _("Subrepositories"), loaddoc('subrepos')),
> -    (["hgweb"], _("Configuring hgweb"), loaddoc('hgweb')),
> -    (["glossary"], _("Glossary"), loaddoc('glossary')),
>  ]

Is the goal to make this table more readable or to make the output of
'hg help' more readable? If the second case, then you should change the
loop to iterate over 'sorted(helptable)' instead.

-- 
Mathematics is the supreme nostalgia of our time.




More information about the Mercurial-devel mailing list