mercurial/commands.py
changeset 29747 aba2bb2a6d0f
parent 29725 cbeb2cb578b1
child 29755 b37f65b047c7
equal deleted inserted replaced
29746:3dbc95f3eb31 29747:aba2bb2a6d0f
  4591         keep.append('verbose')
  4591         keep.append('verbose')
  4592 
  4592 
  4593     section = None
  4593     section = None
  4594     subtopic = None
  4594     subtopic = None
  4595     if name and '.' in name:
  4595     if name and '.' in name:
  4596         name, section = name.split('.', 1)
  4596         name, remaining = name.split('.', 1)
  4597         section = encoding.lower(section)
  4597         remaining = encoding.lower(remaining)
  4598         if '.' in section:
  4598         if '.' in remaining:
  4599             subtopic, section = section.split('.', 1)
  4599             subtopic, section = remaining.split('.', 1)
  4600         else:
  4600         else:
  4601             subtopic = section
  4601             if name in help.subtopics:
       
  4602                 subtopic = remaining
       
  4603             else:
       
  4604                 section = remaining
  4602 
  4605 
  4603     text = help.help_(ui, name, subtopic=subtopic, **opts)
  4606     text = help.help_(ui, name, subtopic=subtopic, **opts)
  4604 
  4607 
  4605     formatted, pruned = minirst.format(text, textwidth, keep=keep,
  4608     formatted, pruned = minirst.format(text, textwidth, keep=keep,
  4606                                        section=section)
  4609                                        section=section)