mercurial/commands.py
changeset 4009 86098ec4b77a
parent 3915 3c82ab166eea
child 4010 e282448d68f1
equal deleted inserted replaced
4008:6e0cb0790e23 4009:86098ec4b77a
  1343         ui.write(_('%s extension - %s\n') % (name.split('.')[-1], doc[0]))
  1343         ui.write(_('%s extension - %s\n') % (name.split('.')[-1], doc[0]))
  1344         for d in doc[1:]:
  1344         for d in doc[1:]:
  1345             ui.write(d, '\n')
  1345             ui.write(d, '\n')
  1346 
  1346 
  1347         ui.status('\n')
  1347         ui.status('\n')
       
  1348 
       
  1349         try:
       
  1350             ct = mod.cmdtable
       
  1351         except AttributeError:
       
  1352             ui.status(_('no commands defined\n'))
       
  1353             return
       
  1354 
  1348         if ui.verbose:
  1355         if ui.verbose:
  1349             ui.status(_('list of commands:\n\n'))
  1356             ui.status(_('list of commands:\n\n'))
  1350         else:
  1357         else:
  1351             ui.status(_('list of commands (use "hg help -v %s" '
  1358             ui.status(_('list of commands (use "hg help -v %s" '
  1352                         'to show aliases and global options):\n\n') % name)
  1359                         'to show aliases and global options):\n\n') % name)
  1353 
  1360 
  1354         modcmds = dict.fromkeys([c.split('|', 1)[0] for c in mod.cmdtable])
  1361         modcmds = dict.fromkeys([c.split('|', 1)[0] for c in ct])
  1355         helplist(modcmds.has_key)
  1362         helplist(modcmds.has_key)
  1356 
  1363 
  1357     if name and name != 'shortlist':
  1364     if name and name != 'shortlist':
  1358         i = None
  1365         i = None
  1359         for f in (helpcmd, helptopic, helpext):
  1366         for f in (helpcmd, helptopic, helpext):