Mercurial > public > mercurial-scm > hg
comparison mercurial/help.py @ 22117:c1d93edcf004
help: fold repeatable option message into option table header
This will hopefully conserve some limited user attention.
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Tue, 12 Aug 2014 04:00:42 -0500 |
parents | 161085f87b95 |
children | 9a299c39de01 |
comparison
equal
deleted
inserted
replaced
22116:161085f87b95 | 22117:c1d93edcf004 |
---|---|
57 elif (default is not None) and not isinstance(default, bool): | 57 elif (default is not None) and not isinstance(default, bool): |
58 lo += " %s" % optlabel | 58 lo += " %s" % optlabel |
59 | 59 |
60 data.append((so, lo, desc)) | 60 data.append((so, lo, desc)) |
61 | 61 |
62 if multioccur: | |
63 header += (_(" ([+] can be repeated)")) | |
64 | |
62 rst = ['\n%s:\n\n' % header] | 65 rst = ['\n%s:\n\n' % header] |
63 rst.extend(minirst.maketable(data, 1)) | 66 rst.extend(minirst.maketable(data, 1)) |
64 | |
65 if multioccur: | |
66 rst.append(_("\n[+] marked option can be specified multiple times\n")) | |
67 | 67 |
68 return ''.join(rst) | 68 return ''.join(rst) |
69 | 69 |
70 def indicateomitted(rst, omitted, notomitted=None): | 70 def indicateomitted(rst, omitted, notomitted=None): |
71 rst.append('\n\n.. container:: omitted\n\n %s\n\n' % omitted) | 71 rst.append('\n\n.. container:: omitted\n\n %s\n\n' % omitted) |