# HG changeset patch # User Benoit Boissinot # Date 1286821589 18000 # Node ID d734b3470138bef370c1cb5e6e558d35bdaa241d # Parent ca6e2adc3e4deb28830f17fcf43e89cab02aa944# Parent 7aef77e74cf3faf19ce92bacf0631be7f595ad79 merge with mpm diff -r ca6e2adc3e4d -r d734b3470138 mercurial/commands.py --- a/mercurial/commands.py Mon Oct 11 12:47:11 2010 -0500 +++ b/mercurial/commands.py Mon Oct 11 13:26:29 2010 -0500 @@ -1949,7 +1949,7 @@ commands = cmds[f].replace("|",", ") ui.write(" %s:\n %s\n"%(commands, h[f])) else: - ui.write('%s\n' % (util.wrap(h[f], + ui.write('%s\n' % (util.wrap(h[f], textwidth, initindent=' %-*s ' % (m, f), hangindent=' ' * (m + 4)))) @@ -2106,7 +2106,7 @@ if desc: initindent = ' %s%s ' % (opt, ' ' * (hanging - width)) hangindent = ' ' * (hanging + 3) - ui.write('%s\n' % (util.wrap(desc, + ui.write('%s\n' % (util.wrap(desc, textwidth, initindent=initindent, hangindent=hangindent))) else: diff -r ca6e2adc3e4d -r d734b3470138 mercurial/util.py --- a/mercurial/util.py Mon Oct 11 12:47:11 2010 -0500 +++ b/mercurial/util.py Mon Oct 11 13:26:29 2010 -0500 @@ -1313,9 +1313,7 @@ #### naming convention of above implementation follows 'textwrap' module -def wrap(line, width=None, initindent='', hangindent=''): - if width is None: - width = termwidth() - 2 +def wrap(line, width, initindent='', hangindent=''): maxindent = max(len(hangindent), len(initindent)) if width <= maxindent: # adjust for weird terminal size