mercurial/commands.py
changeset 11297 d320e70442a5
parent 11276 f28b58e35768
child 11301 3d0591a66118
equal deleted inserted replaced
11296:0054a328b98f 11297:d320e70442a5
  1695         for f in fns:
  1695         for f in fns:
  1696             if ui.verbose:
  1696             if ui.verbose:
  1697                 commands = cmds[f].replace("|",", ")
  1697                 commands = cmds[f].replace("|",", ")
  1698                 ui.write(" %s:\n      %s\n"%(commands, h[f]))
  1698                 ui.write(" %s:\n      %s\n"%(commands, h[f]))
  1699             else:
  1699             else:
  1700                 ui.write(' %-*s   %s\n' % (m, f, util.wrap(h[f], m + 4)))
  1700                 ui.write('%s\n' % (util.wrap(h[f],
       
  1701                                              initindent=' %-*s   ' % (m, f),
       
  1702                                              hangindent=' ' * (m + 4))))
  1701 
  1703 
  1702         if not ui.quiet:
  1704         if not ui.quiet:
  1703             addglobalopts(True)
  1705             addglobalopts(True)
  1704 
  1706 
  1705     def helptopic(name):
  1707     def helptopic(name):
  1822 
  1824 
  1823     if opt_output:
  1825     if opt_output:
  1824         opts_len = max([len(line[0]) for line in opt_output if line[1]] or [0])
  1826         opts_len = max([len(line[0]) for line in opt_output if line[1]] or [0])
  1825         for first, second in opt_output:
  1827         for first, second in opt_output:
  1826             if second:
  1828             if second:
  1827                 second = util.wrap(second, opts_len + 3)
  1829                 initindent = ' %-*s  ' % (opts_len, first)
  1828                 ui.write(" %-*s  %s\n" % (opts_len, first, second))
  1830                 hangindent = ' ' * (opts_len + 3)
       
  1831                 ui.write('%s\n' % (util.wrap(second,
       
  1832                                              initindent=initindent,
       
  1833                                              hangindent=hangindent)))
  1829             else:
  1834             else:
  1830                 ui.write("%s\n" % first)
  1835                 ui.write("%s\n" % first)
  1831 
  1836 
  1832 def identify(ui, repo, source=None,
  1837 def identify(ui, repo, source=None,
  1833              rev=None, num=None, id=None, branch=None, tags=None):
  1838              rev=None, num=None, id=None, branch=None, tags=None):