# HG changeset patch # User Martin Geisler # Date 1249250510 -7200 # Node ID b0f447a259ab3af2053e6a4b047c4867c69d3d44 # Parent 5f4862a00697e84d05780fda1444531262893d9c help: use field lists for lists of extensions diff -r 5f4862a00697 -r b0f447a259ab mercurial/help.py --- a/mercurial/help.py Sun Aug 02 23:38:08 2009 +0200 +++ b/mercurial/help.py Mon Aug 03 00:01:50 2009 +0200 @@ -43,11 +43,9 @@ '''return a text listing of the given extensions''' if not exts: return '' - # TODO: literal block is wrong, should be a field list or a simple table. - result = '\n%s\n\n ::\n\n' % header + result = '\n%s\n\n' % header for name, desc in sorted(exts.iteritems()): - desc = util.wrap(desc, maxlength + 5) - result += ' %s %s\n' % (name.ljust(maxlength), desc) + result += ' %-*s %s\n' % (maxlength + 2, ':%s:' % name, desc) return result def extshelp(): diff -r 5f4862a00697 -r b0f447a259ab tests/test-extension.out --- a/tests/test-extension.out Sun Aug 02 23:38:08 2009 +0200 +++ b/tests/test-extension.out Mon Aug 03 00:01:50 2009 +0200 @@ -33,7 +33,7 @@ enabled extensions: - debugextension only debugcommands + debugextension only debugcommands global options: -R --repository repository root directory or symbolic path name @@ -63,7 +63,7 @@ enabled extensions: - debugextension only debugcommands + debugextension only debugcommands global options: -R --repository repository root directory or symbolic path name diff -r 5f4862a00697 -r b0f447a259ab tests/test-keyword.out --- a/tests/test-keyword.out Sun Aug 02 23:38:08 2009 +0200 +++ b/tests/test-keyword.out Mon Aug 03 00:01:50 2009 +0200 @@ -54,9 +54,9 @@ enabled extensions: - keyword expand keywords in tracked files - mq manage a stack of patches - notify hooks for sending email notifications at commit/push time + keyword expand keywords in tracked files + mq manage a stack of patches + notify hooks for sending email notifications at commit/push time use "hg -v help keyword" to show aliases and global options % hg kwdemo diff -r 5f4862a00697 -r b0f447a259ab tests/test-mq.out --- a/tests/test-mq.out Sun Aug 02 23:38:08 2009 +0200 +++ b/tests/test-mq.out Mon Aug 03 00:01:50 2009 +0200 @@ -53,7 +53,7 @@ enabled extensions: - mq manage a stack of patches + mq manage a stack of patches use "hg -v help mq" to show aliases and global options adding a