mercurial/help.py
changeset 51858 607e94e01851
parent 51840 76387080f238
child 51859 f4733654f144
equal deleted inserted replaced
51857:f81e0ce5103a 51858:607e94e01851
   803     name: bytes,
   803     name: bytes,
   804     unknowncmd: bool = False,
   804     unknowncmd: bool = False,
   805     full: bool = True,
   805     full: bool = True,
   806     subtopic: Optional[bytes] = None,
   806     subtopic: Optional[bytes] = None,
   807     fullname: Optional[bytes] = None,
   807     fullname: Optional[bytes] = None,
   808     **opts
   808     **opts,
   809 ) -> bytes:
   809 ) -> bytes:
   810     """
   810     """
   811     Generate the help for 'name' as unformatted restructured text. If
   811     Generate the help for 'name' as unformatted restructured text. If
   812     'name' is None, describe the commands available.
   812     'name' is None, describe the commands available.
   813     """
   813     """
  1226     commands,
  1226     commands,
  1227     fullname: Optional[bytes],
  1227     fullname: Optional[bytes],
  1228     keep: Optional[Iterable[bytes]] = None,
  1228     keep: Optional[Iterable[bytes]] = None,
  1229     unknowncmd: bool = False,
  1229     unknowncmd: bool = False,
  1230     full: bool = True,
  1230     full: bool = True,
  1231     **opts
  1231     **opts,
  1232 ) -> bytes:
  1232 ) -> bytes:
  1233     """get help for a given topic (as a dotted name) as rendered rst
  1233     """get help for a given topic (as a dotted name) as rendered rst
  1234 
  1234 
  1235     Either returns the rendered help text or raises an exception.
  1235     Either returns the rendered help text or raises an exception.
  1236     """
  1236     """
  1259         name,
  1259         name,
  1260         fullname=fullname,
  1260         fullname=fullname,
  1261         subtopic=subtopic,
  1261         subtopic=subtopic,
  1262         unknowncmd=unknowncmd,
  1262         unknowncmd=unknowncmd,
  1263         full=full,
  1263         full=full,
  1264         **opts
  1264         **opts,
  1265     )
  1265     )
  1266 
  1266 
  1267     blocks, pruned = minirst.parse(text, keep=keep)
  1267     blocks, pruned = minirst.parse(text, keep=keep)
  1268     if b'verbose' in pruned:
  1268     if b'verbose' in pruned:
  1269         keep.append(b'omitted')
  1269         keep.append(b'omitted')