##// END OF EJS Templates
show: fix formatting of multiple commands...
Gregory Szorc -
r31943:3e9f118c default
parent child Browse files
Show More
@@ -71,7 +71,6 b' def show(ui, repo, view=None, template=N'
71 ``-T/--template``.
71 ``-T/--template``.
72
72
73 List of available views:
73 List of available views:
74
75 """
74 """
76 if ui.plain() and not template:
75 if ui.plain() and not template:
77 hint = _('invoke with -T/--template to control output format')
76 hint = _('invoke with -T/--template to control output format')
@@ -134,7 +133,15 b' def showbookmarks(ui, repo, fm):'
134 # into core or when another extension wants to provide a view, we'll need
133 # into core or when another extension wants to provide a view, we'll need
135 # to do this more robustly.
134 # to do this more robustly.
136 # TODO make this more robust.
135 # TODO make this more robust.
137 longest = max(map(len, showview._table.keys()))
136 def _updatedocstring():
138 for key in sorted(showview._table.keys()):
137 longest = max(map(len, showview._table.keys()))
139 cmdtable['show'][0].__doc__ += pycompat.sysstr(' %s %s\n' % (
138 entries = []
140 key.ljust(longest), showview._table[key]._origdoc))
139 for key in sorted(showview._table.keys()):
140 entries.append(pycompat.sysstr(' %s %s' % (
141 key.ljust(longest), showview._table[key]._origdoc)))
142
143 cmdtable['show'][0].__doc__ = pycompat.sysstr('%s\n\n%s\n ') % (
144 cmdtable['show'][0].__doc__.rstrip(),
145 pycompat.sysstr('\n\n').join(entries))
146
147 _updatedocstring()
@@ -37,7 +37,7 b' No arguments shows available views'
37
37
38 List of available views:
38 List of available views:
39
39
40 bookmarks bookmarks and their associated changeset
40 bookmarks bookmarks and their associated changeset
41
41
42 (use 'hg help -e show' to show help for the show extension)
42 (use 'hg help -e show' to show help for the show extension)
43
43
General Comments 0
You need to be logged in to leave comments. Login now