comparison mercurial/commands.py @ 7598:26adfaccdf73

lowercase help output Changes docstrings to begin with a lowercase word. Only docstrings used in help output is changed. Scripts are not expected to grep the output of 'hg help' so this change should pose no problem with regard to the compatibility rules.
author Martin Geisler <mg@daimi.au.dk>
date Sat, 03 Jan 2009 17:15:15 +0100
parents 0be97ee2309d
children 4dd7b28003d2
comparison
equal deleted inserted replaced
7597:81f68565281c 7598:26adfaccdf73
1331 ui.write(_("\naliases: %s\n") % ', '.join(aliases[1:])) 1331 ui.write(_("\naliases: %s\n") % ', '.join(aliases[1:]))
1332 1332
1333 # description 1333 # description
1334 doc = gettext(i[0].__doc__) 1334 doc = gettext(i[0].__doc__)
1335 if not doc: 1335 if not doc:
1336 doc = _("(No help text available)") 1336 doc = _("(no help text available)")
1337 if ui.quiet: 1337 if ui.quiet:
1338 doc = doc.splitlines(0)[0] 1338 doc = doc.splitlines(0)[0]
1339 ui.write("\n%s\n" % doc.rstrip()) 1339 ui.write("\n%s\n" % doc.rstrip())
1340 1340
1341 if not ui.quiet: 1341 if not ui.quiet:
1360 f = f.lstrip("^") 1360 f = f.lstrip("^")
1361 if not ui.debugflag and f.startswith("debug"): 1361 if not ui.debugflag and f.startswith("debug"):
1362 continue 1362 continue
1363 doc = gettext(e[0].__doc__) 1363 doc = gettext(e[0].__doc__)
1364 if not doc: 1364 if not doc:
1365 doc = _("(No help text available)") 1365 doc = _("(no help text available)")
1366 h[f] = doc.splitlines(0)[0].rstrip() 1366 h[f] = doc.splitlines(0)[0].rstrip()
1367 cmds[f] = c.lstrip("^") 1367 cmds[f] = c.lstrip("^")
1368 1368
1369 if not h: 1369 if not h:
1370 ui.status(_('no commands defined\n')) 1370 ui.status(_('no commands defined\n'))
1403 else: 1403 else:
1404 raise cmdutil.UnknownCommand(name) 1404 raise cmdutil.UnknownCommand(name)
1405 1405
1406 # description 1406 # description
1407 if not doc: 1407 if not doc:
1408 doc = _("(No help text available)") 1408 doc = _("(no help text available)")
1409 if callable(doc): 1409 if callable(doc):
1410 doc = doc() 1410 doc = doc()
1411 1411
1412 ui.write("%s\n" % header) 1412 ui.write("%s\n" % header)
1413 ui.write("%s\n" % doc.rstrip()) 1413 ui.write("%s\n" % doc.rstrip())
1416 try: 1416 try:
1417 mod = extensions.find(name) 1417 mod = extensions.find(name)
1418 except KeyError: 1418 except KeyError:
1419 raise cmdutil.UnknownCommand(name) 1419 raise cmdutil.UnknownCommand(name)
1420 1420
1421 doc = gettext(mod.__doc__) or _('No help text available') 1421 doc = gettext(mod.__doc__) or _('no help text available')
1422 doc = doc.splitlines(0) 1422 doc = doc.splitlines(0)
1423 ui.write(_('%s extension - %s\n') % (name.split('.')[-1], doc[0])) 1423 ui.write(_('%s extension - %s\n') % (name.split('.')[-1], doc[0]))
1424 for d in doc[1:]: 1424 for d in doc[1:]:
1425 ui.write(d, '\n') 1425 ui.write(d, '\n')
1426 1426
3075 (bisect, 3075 (bisect,
3076 [('r', 'reset', False, _('reset bisect state')), 3076 [('r', 'reset', False, _('reset bisect state')),
3077 ('g', 'good', False, _('mark changeset good')), 3077 ('g', 'good', False, _('mark changeset good')),
3078 ('b', 'bad', False, _('mark changeset bad')), 3078 ('b', 'bad', False, _('mark changeset bad')),
3079 ('s', 'skip', False, _('skip testing changeset')), 3079 ('s', 'skip', False, _('skip testing changeset')),
3080 ('c', 'command', '', _('Use command to check changeset state')), 3080 ('c', 'command', '', _('use command to check changeset state')),
3081 ('U', 'noupdate', False, _('do not update to target'))], 3081 ('U', 'noupdate', False, _('do not update to target'))],
3082 _("[-gbsr] [-c CMD] [REV]")), 3082 _("[-gbsr] [-c CMD] [REV]")),
3083 "branch": 3083 "branch":
3084 (branch, 3084 (branch,
3085 [('f', 'force', None, 3085 [('f', 'force', None,