Show More
@@ -333,6 +333,7 b' def help_(ui, cmd=None):' | |||||
333 | ui.write('basic hg commands (use "hg help -v" for more):\n\n') |
|
333 | ui.write('basic hg commands (use "hg help -v" for more):\n\n') | |
334 |
|
334 | |||
335 | h = {} |
|
335 | h = {} | |
|
336 | cmds = {} | |||
336 | for c, e in table.items(): |
|
337 | for c, e in table.items(): | |
337 | f = c.split("|")[0] |
|
338 | f = c.split("|")[0] | |
338 | if not ui.verbose and not f.startswith("^"): |
|
339 | if not ui.verbose and not f.startswith("^"): | |
@@ -344,12 +345,17 b' def help_(ui, cmd=None):' | |||||
344 | if e[0].__doc__: |
|
345 | if e[0].__doc__: | |
345 | d = e[0].__doc__.splitlines(0)[0].rstrip() |
|
346 | d = e[0].__doc__.splitlines(0)[0].rstrip() | |
346 | h[f] = d |
|
347 | h[f] = d | |
|
348 | cmds[f]=c.lstrip("^") | |||
347 |
|
349 | |||
348 | fns = h.keys() |
|
350 | fns = h.keys() | |
349 | fns.sort() |
|
351 | fns.sort() | |
350 | m = max(map(len, fns)) |
|
352 | m = max(map(len, fns)) | |
351 | for f in fns: |
|
353 | for f in fns: | |
352 | ui.write(' %-*s %s\n' % (m, f, h[f])) |
|
354 | if ui.verbose: | |
|
355 | commands = cmds[f].replace("|",", ") | |||
|
356 | ui.write(" %s:\n %s\n"%(commands,h[f])) | |||
|
357 | else: | |||
|
358 | ui.write(' %-*s %s\n' % (m, f, h[f])) | |||
353 |
|
359 | |||
354 | # Commands start here, listed alphabetically |
|
360 | # Commands start here, listed alphabetically | |
355 |
|
361 |
General Comments 0
You need to be logged in to leave comments.
Login now