mercurial/commands.py
changeset 27377 d1c998d7b103
parent 27352 9fd8f1552369
child 27385 20e7de6205e7
equal deleted inserted replaced
27376:fc810d950278 27377:d1c998d7b103
  4365     else:
  4365     else:
  4366         keep.append('unix')
  4366         keep.append('unix')
  4367         keep.append(sys.platform.lower())
  4367         keep.append(sys.platform.lower())
  4368 
  4368 
  4369     section = None
  4369     section = None
       
  4370     subtopic = None
  4370     if name and '.' in name:
  4371     if name and '.' in name:
  4371         name, section = name.split('.', 1)
  4372         name, section = name.split('.', 1)
  4372         section = section.lower()
  4373         section = section.lower()
  4373 
  4374         if '.' in section:
  4374     text = help.help_(ui, name, **opts)
  4375             subtopic, section = section.split('.', 1)
       
  4376         else:
       
  4377             subtopic = section
       
  4378 
       
  4379     text = help.help_(ui, name, subtopic=subtopic, **opts)
  4375 
  4380 
  4376     formatted, pruned = minirst.format(text, textwidth, keep=keep,
  4381     formatted, pruned = minirst.format(text, textwidth, keep=keep,
  4377                                        section=section)
  4382                                        section=section)
  4378 
  4383 
  4379     # We could have been given a weird ".foo" section without a name
  4384     # We could have been given a weird ".foo" section without a name