File: //kunden/lib/python3/dist-packages/breezy/__pycache__/help.cpython-39.pyc
a
�*�^U � @ s� d dl mZ ddlmZmZmZmZmZm Z m
Z
G dd� dej�Zddd�Z
dd d
�Zdd� Zej�d
edej� ej�dedej� G dd� de�ZdS )� )�absolute_import� )�commands�errors�help_topics�osutils�plugin�ui� utextwrapc @ s e Zd ZdZdd� ZdS )�NoHelpTopicz`No help could be found for '%(topic)s'. Please use 'brz help topics' to obtain a list of topics.c C s
|| _ d S �N)�topic)�selfr
� r �-/usr/lib/python3/dist-packages/breezy/help.py�__init__* s zNoHelpTopic.__init__N)�__name__�
__module__�__qualname__Z_fmtr r r r r r % s r Nc C s� |du rt j�� }t� }t�| �}z\|�| �}g }|dd� D ] \}}|�d|j|� � f � q>|d d }|�
|�|�� W n ty� |du r�� Y n0 |dur�|�
d| d�
|�f � dS )z0Write the help for the specific topic to outfileNr z%s%sr z#'brz %s' is an alias for 'brz %s'.
� )r �
ui_factory�make_output_stream�HelpIndices�
_mod_commandsZ get_alias�search�append�prefixZget_help_topic�writeZ
get_help_textr �join) r
�outfile�indices�aliasZtopicsZshadowed_terms�indexZ topic_obj�sourcer r r �help. s(
�
�r$ c C s$ | du rt j�� } | �td�� dS )zList all commandsNr )r r r r �_help_commands_to_text)r r r r �
help_commandsG s
r&