--- a/mercurial/help.py Wed Jun 24 18:40:13 2009 +0200
+++ b/mercurial/help.py Wed Jun 24 19:15:58 2009 +0200
@@ -5,9 +5,8 @@
# This software may be used and distributed according to the terms of the
# GNU General Public License version 2, incorporated herein by reference.
-import textwrap
from i18n import _
-import extensions
+import extensions, util
def moduledoc(file):
@@ -46,11 +45,8 @@
return ''
result = '\n%s\n\n' % header
for name, desc in sorted(exts.iteritems()):
- # wrap desc at 70 characters, just like the main help texts
- desc = textwrap.wrap(desc, width=78 - maxlength - 4)
- pad = '\n' + ' ' * (maxlength + 4)
- result += ' %s %s\n' % (name.ljust(maxlength),
- pad.join(desc))
+ desc = util.wrap(desc, maxlength + 4)
+ result += ' %s %s\n' % (name.ljust(maxlength), desc)
return result
def extshelp():