mercurial/commands.py
changeset 22587 c3c3dd31fe1c
parent 22585 15282c6612fb
child 22591 9fe33afc00b4
equal deleted inserted replaced
22586:6e5657ce9e8c 22587:c3c3dd31fe1c
  3832         keep.append('plan9')
  3832         keep.append('plan9')
  3833     else:
  3833     else:
  3834         keep.append('unix')
  3834         keep.append('unix')
  3835         keep.append(sys.platform.lower())
  3835         keep.append(sys.platform.lower())
  3836 
  3836 
       
  3837     section = None
       
  3838     if name and '.' in name:
       
  3839         name, section = name.split('.')
       
  3840 
  3837     text = help.help_(ui, name, **opts)
  3841     text = help.help_(ui, name, **opts)
  3838 
  3842 
  3839     formatted, pruned = minirst.format(text, textwidth, keep=keep)
  3843     formatted, pruned = minirst.format(text, textwidth, keep=keep,
       
  3844                                        section=section)
       
  3845     if section and not formatted:
       
  3846         raise util.Abort(_("help section not found"))
       
  3847 
  3840     if 'verbose' in pruned:
  3848     if 'verbose' in pruned:
  3841         keep.append('omitted')
  3849         keep.append('omitted')
  3842     else:
  3850     else:
  3843         keep.append('notomitted')
  3851         keep.append('notomitted')
  3844     formatted, pruned = minirst.format(text, textwidth, keep=keep)
  3852     formatted, pruned = minirst.format(text, textwidth, keep=keep,
       
  3853                                        section=section)
  3845     ui.write(formatted)
  3854     ui.write(formatted)
  3846 
  3855 
  3847 
  3856 
  3848 @command('identify|id',
  3857 @command('identify|id',
  3849     [('r', 'rev', '',
  3858     [('r', 'rev', '',