HEX
Server: Apache
System: Linux infong-uk86 4.4.400-icpu-106 #2 SMP Mon Sep 15 08:23:40 UTC 2025 x86_64
User: u44115835 (4976590)
PHP: 8.4.17
Disabled: NONE
Upload Files
File: //kunden/lib/python3/dist-packages/breezy/__pycache__/cmd_version_info.cpython-39.pyc
a

�*�^�@sxdZddlmZddlmZee�d�ddlmZddlmZddl	m
Z
mZdd	lm
Z
d
d�ZGdd
�d
e�ZdS)z>Commands for generating snapshot information about a brz tree.�)�absolute_import�)�lazy_importzs
from breezy import (
    branch,
    version_info_formats,
    workingtree,
    )
from breezy.i18n import gettext
)�errors)�Command)�Option�RegistryOption)�	text_typec	CsBzt�|�WSty<t��}t�td��||���Yn0dS)z�Convert a string passed by the user into a VersionInfoFormat.

    This looks in the version info format registry, and if the format
    cannot be found, generates a useful error exception.
    z:No known version info format {0}. Supported types are: {1}N)�version_info_formatsZget_builder�KeyErrorZget_builder_formatsr�BzrCommandError�gettext�format)rZformats�r�9/usr/lib/python3/dist-packages/breezy/cmd_version_info.py�_parse_version_info_format(s��rc
@sleZdZdZeddddd�eddd	�ed
dd	�edd
d	�eddd	�ededd�dgZdgZdZ	ddd�Z
dS)�cmd_version_infoa&Show version information about this tree.

    You can use this command to add information about version into
    source code of an application. The output can be in one of the
    supported formats or in a custom format based on a template.

    For example::

      brz version-info --custom \
        --template="#define VERSION_INFO \"Project 1.2.3 (r{revno})\"\n"

    will produce a C header file with formatted string containing the
    current revision number. Other supported variables in templates are:

      * {date} - date of the last revision
      * {build_date} - current date
      * {revno} - revision number
      * {revision_id} - revision id
      * {branch_nick} - branch nickname
      * {clean} - 0 if the source tree contains uncommitted changes,
                  otherwise 1
    rzSelect the output format.T)zbreezy.version_info_formats�format_registry)Zvalue_switchesZ
lazy_registry�allz!Include all possible information.)�helpzcheck-cleanzCheck if tree is clean.zinclude-historyzInclude the revision-history.zinclude-file-revisionsz(Include the last revision for each file.�templatezTemplate for the output.)�typer�revisionz	location?�replaceNFc	
	Cs�|rt|�dkrt�td���|dur*d}|dur<tj��}ztj�	|�d}	Wn$tj
yttj�
|�}
d}	Yn0|	j}
|r�d}d}d}|r�d}d}d|vr�d}|dur�|d�|
�}nd}||
|	|||||d�}|�|j�dS)Nrz@brz version-info --revision takes exactly one revision specifier�.rTz{clean})Zworking_treeZcheck_for_cleanZinclude_revision_history�include_file_revisionsr�revision_id)�lenrrr
r
r�getZworkingtreeZWorkingTreeZopen_containingZ
NoWorkingTree�branchZBranch�openZas_revision_idZgenerateZoutf)
�self�locationrrZcheck_cleanZinclude_historyrrrZwt�brZbuilderrrr�runbsB�

�zcmd_version_info.run)NNFFFFNN)�__name__�
__module__�__qualname__�__doc__rrr	Z
takes_optionsZ
takes_argsZ
encoding_typer$rrrrr7s4�

�����rN)r(Z
__future__rr�globals�rZcommandsrZoptionrrZsixishr	rrrrrr�<module>s