Hacked By AnonymousFox

Current Path : /opt/cloudlinux/venv/lib/python3.11/site-packages/git/__pycache__/
Upload File :
Current File : //opt/cloudlinux/venv/lib/python3.11/site-packages/git/__pycache__/config.cpython-311.pyc

�

�܋f���<�UdZddlZddlZddlmZddlZddlmZmZddl	Z	ddl
Z
ddlZddlZddl
mZmZmZddlmZddlmZddlZddlmZmZmZmZmZmZmZm Z m!Z!m"Z"m#Z#m$Z$ddl%m&Z&m'Z'm(Z(m)Z)m*Z*e rdd	l+m,Z,dd
lm-Z-e"dd�
��Z.e"de/e0e1e2e3��Z4ej5dd�dkr	ddl6m7Z7e7Z8nddlm7Z7e7e/ee4fZ8dZ9e	j:d��Z;e;�<e	j=����dZ>e'e?d<ej@d��ZAGd�dejB��ZCdede*fdede*ffd�ZDdede*fdede*ffd�ZEGd�d ee.��ZFGd!�d"e8��ZGd#e&de/fd$�ZHGd%�dejIeC�&��ZJdS)'zbModule containing module parser implementation able to properly read and write
configuration files�N)�wraps)�BufferedReader�IOBase)�defenc�
force_text�is_win)�LockFile)�Any�Callable�Generic�IO�List�Dict�Sequence�
TYPE_CHECKING�Tuple�TypeVar�Union�cast)�Lit_config_levels�ConfigLevels_Tup�PathLike�assert_never�_T)�Repo)�BytesIO�T_ConfigParser�GitConfigParser)�bound�T_OMD_value�)r!��)�OrderedDict)r�SectionConstraintz
git.config)�system�user�global�
repository�
CONFIG_LEVELSz2(?<=includeIf )\"(gitdir|gitdir/i|onbranch):(.+)\"c�D��eZdZdZdededeeefddf�fd�Z�xZ	S)�MetaParserBuilderzZUtility class wrapping base-class methods into decorators that assure read-only properties�name�bases�clsdict�returnc�>��d}||vrj||}|D]_}d�tj|tj��D��}|D]1\}}||vr�
t|��}	||vrt	|	��}	|	||<�2�`tt|���||||��}
|
S)z�
        Equip all base-class methods with a needs_values decorator, and all non-const methods
        with a set_dirty_and_flush_changes decorator in addition to that.�_mutating_methods_c3�PK�|]!}|d�d���|V��"dS)r�_N��
startswith)�.0�ts  �[/builddir/build/BUILD/cloudlinux-venv-1.0.6/venv/lib/python3.11/site-packages/git/config.py�	<genexpr>z,MetaParserBuilder.__new__.<locals>.<genexpr>bs=����n�n��YZ�[\�Y]�Yh�Yh�il�Ym�Ym�n�1�n�n�n�n�n�n�)�inspect�
getmembers�	isroutine�needs_values�set_dirty_and_flush_changes�superr,�__new__)�clsr-r.r/�kmm�mutating_methods�base�methods�method�method_with_values�new_type�	__class__s           �r9rBzMetaParserBuilder.__new__Zs����#���'�>�>�&�s�|���

7�

7��n�n�g�&8��w�?P�&Q�&Q�n�n�n��$+�7�7�L�D�&��w��� �)5�f�)=�)=�&��/�/�/�-H�I[�-\�-\�*�%7�G�D�M�M�7��*�C�0�0�8�8��d�E�7�S�S���r;)
�__name__�
__module__�__qualname__�__doc__�strrrr
rB�
__classcell__�rKs@r9r,r,Wsh�������d�d��3��u��t�C��H�~��J]����������r;r,�func.r0c	�l��t���dddtdtdtf�fd���}|S)zOReturns method assuring we read values (on demand) before we try to access them�selfr�args�kwargsr0c�D��|����|g|�Ri|��S�N)�read)rUrVrWrSs   �r9�assure_data_presentz)needs_values.<locals>.assure_data_presentws0����	�	�����t�D�*�4�*�*�*�6�*�*�*r;)rr
r)rSr[s` r9r?r?tsY����4�[�[�+�"3�+�C�+�3�+�SU�+�+�+�+�+��[�+�
�r;�non_const_funcc�Z��dddtdtdtf�fd�}�j|_|S)z�Return method that checks whether given non constant function may be called.
    If so, the instance will be set dirty.
    Additionally, we flush the changes right to diskrUrrVrWr0c�V���|g|�Ri|��}d|_|���|S)NT)�_dirty�write)rUrVrW�rvalr\s    �r9�
flush_changesz2set_dirty_and_flush_changes.<locals>.flush_changes�s;����~�d�4�T�4�4�4�V�4�4������
�
�����r;)r
rrL)r\rbs` r9r@r@�sQ���
�-��c��S��R�������,�4�M���r;c���eZdZdZdZdZdededdfd�Zdd	�Z	d
ede
f�fd�Zded
e
de
de
fd�Ze
defd���Zdd�Zdd�Zdedededdfd�Z�xZS)r%a"Constrains a ConfigParser to only option commands which are constrained to
    always use the section we have been initialized with.

    It supports all ConfigParser methods that operate on an option.

    :note:
        If used as a context manager, will release the wrapped ConfigParser.��_config�
_section_name)�	get_value�	set_value�get�set�getint�getfloat�
getboolean�
has_option�remove_section�
remove_option�options�config�sectionr0Nc�"�||_||_dSrYrd)rUrrrss   r9�__init__zSectionConstraint.__init__�s�����$����r;c�8�|j���dSrY�re�release�rUs r9�__del__zSectionConstraint.__del__�s��	
��������r;�attrc�v������jvr��fd�Stt�������S)Nc�&���j�g|�Ri|��SrY)�_call_config)rVrWr{rUs  ��r9�<lambda>z/SectionConstraint.__getattr__.<locals>.<lambda>�s%���+<�4�+<�T�+S�D�+S�+S�+S�F�+S�+S�r;)�
_valid_attrs_rAr%�__getattribute__)rUr{rKs``�r9�__getattr__zSectionConstraint.__getattr__�sD������4�%�%�%�S�S�S�S�S�S��&��-�-�>�>�t�D�D�Dr;rHrVrWc�J�t|j|��|jg|�Ri|��S)zcCall the configuration at the given method which must take a section name
        as first argument)�getattrrerf)rUrHrVrWs    r9r~zSectionConstraint._call_config�s3��-�w�t�|�V�,�,�T�-?�Q�$�Q�Q�Q�&�Q�Q�Qr;c��|jS)z*return: Configparser instance we constrain)rerys r9rrzSectionConstraint.config�s���|�r;c�4�|j���S)zZEquivalent to GitConfigParser.release(), which is called on our underlying parser instancerwrys r9rxzSectionConstraint.release�s���|�#�#�%�%�%r;�!SectionConstraint[T_ConfigParser]c�8�|j���|SrY)re�	__enter__rys r9r�zSectionConstraint.__enter__�s������ � � ��r;�exception_type�exception_value�	tracebackc�>�|j�|||��dSrY)re�__exit__)rUr�r�r�s    r9r�zSectionConstraint.__exit__�s"������n�o�y�I�I�I�I�Ir;�r0N)r0r�)rLrMrNrO�	__slots__r�rrPrurzr
r�r~�propertyrrrxr�r�rQrRs@r9r%r%�sn�������P�P�-�I��M�%�~�%��%��%�%�%�%�����E��E��E�E�E�E�E�E�
R�3�R�s�R�c�R�c�R�R�R�R�
�������X��&�&�&�&�����J�s�J�S�J�S�J�UY�J�J�J�J�J�J�J�Jr;r%c	�b��eZdZdZdededdf�fd�Zdededdf�fd�Zdede	eddf�fd	�Z
dedef�fd
�Zdedef�fd�Zdededdf�fd�Z
dded
eedfdeedff�fd�
Zdede	ef�fd�Zde	eeeffd�Zde	eee	effd�Z�xZS)�_OMDzOrdered multi-dict.�key�valuer0Nc�\��tt|���||g��dSrY�rAr��__setitem__�rUr�r�rKs   �r9r�z_OMD.__setitem__�s+���
�d�D���%�%�c�E�7�3�3�3�3�3r;c����||vr,tt|���||g��dStt|���|���|��dSrY)rAr�r��__getitem__�appendr�s   �r9�addz_OMD.add�se����d�?�?��$����)�)�#��w�7�7�7��4�
�d�D���%�%�c�*�*�1�1�%�8�8�8�8�8r;�valuesc�Z��tt|���||��dSrYr�)rUr�r�rKs   �r9�setallz_OMD.setall�s)���
�d�D���%�%�c�6�2�2�2�2�2r;c�`��tt|���|��dS�N����rAr�r��rUr�rKs  �r9r�z_OMD.__getitem__��&����T�4� � �,�,�S�1�1�"�5�5r;c�`��tt|���|��dSr�r�r�s  �r9�getlastz_OMD.getlast�r�r;c����||vr,tt|���||g��dStt|���|��}||d<dSr�)rAr�r�r�)rUr�r��priorrKs    �r9�setlastz_OMD.setlast�s]����d�?�?��$����)�)�#��w�7�7�7��F��d�D�!�!�-�-�c�2�2����b�	�	�	r;�defaultc�d��tt|���||g��dSr�)rAr�ri)rUr�r�rKs   �r9riz_OMD.get�s*����T�4� � �$�$�S�7�)�4�4�R�8�8r;c�T��tt|���|��SrYr�r�s  �r9�getallz_OMD.getall�s!����T�4� � �,�,�S�1�1�1r;c� ���fd��D��S)z"List of (key, last value for key).c�$��g|]}|�|f��
S�r��r7�krUs  �r9�
<listcomp>z_OMD.items.<locals>.<listcomp>�s!���+�+�+���D��G��+�+�+r;r�rys`r9�itemsz
_OMD.items�s���+�+�+�+�d�+�+�+�+r;c� ���fd��D��S)z&List of (key, list of values for key).c�>��g|]}|��|��f��Sr�)r�r�s  �r9r�z"_OMD.items_all.<locals>.<listcomp>�s(���2�2�2���D�K�K��N�N�#�2�2�2r;r�rys`r9�	items_allz_OMD.items_all�s���2�2�2�2�T�2�2�2�2r;rY)rLrMrNrOrPrr�r
r�rr�r�r�r�rrir�rr�r�rQrRs@r9r�r��s���������4�s�4�2�4�$�4�4�4�4�4�4�9�s�9�3�9�4�9�9�9�9�9�9�3�#�3�t�B�x�3�D�3�3�3�3�3�3�6�s�6�s�6�6�6�6�6�6�6�3�6�3�6�6�6�6�6�6��3��s��t�������9�9�s�9�U�2�t�8�_�9��b�$�h��9�9�9�9�9�9�2�#�2�$�r�(�2�2�2�2�2�2�,�t�E�#�r�'�N�+�,�,�,�,�3�4��c�4��8�m� 4�5�3�3�3�3�3�3�3�3r;r��config_levelc	��tr|dkrd}|dkrdS|dkr�tj�d��p2t	jtj�dd��d��}t	jt	jt	j|d	d
������S|dkr&t	jt	jd����S|dkrtd
���t|td|������dS)Nr&r(z/etc/gitconfigr'�XDG_CONFIG_HOME�HOME�~z.config�gitrrz~/.gitconfigr)zGNo repo to get repository configuration from. Use Repo._get_config_pathzInvalid configuration level: )
r�os�environri�osp�join�normpath�
expanduser�
ValueErrorr)r��config_homes  r9�get_config_pathr��s��� �,�(�*�*����x�����	��	�	��j�n�n�%6�7�7�k�3�8�B�J�N�N�SY�[^�D_�D_�aj�;k�;k���|�C�N�3�8�K���+Q�+Q�R�R�S�S�S�	��	!�	!��|�C�N�>�:�:�;�;�;�	��	%�	%��b�c�c�c�	���G�|�G�G�H�H�	
�	
�	
�	
�	
r;c�,��eZdZdZeZejd��ZdZ	eje	��Z
eje	dzdz��Z[	dZ					d6d	e
ded
ee
ed
ffdeded
e
edfde
dddfd�Zd7d�Zd7d�Zd8d�Zdeddfd�Zd7d�Zdedefd�Zde
eeefdeddfd�Zde
eeffd�Z de!e"eeffd�Z#d7d�Z$deddfd �Z%d!ede!e"eeff�fd"�Z&d!ede!e"ee!effd#�Z'e(d7d$���Z)d%eddfd&�Z*d'eddf�fd(�Z+e,defd)���Z-	d9d'ed*ed+e
ee.eedfde
ee.eeffd,�Z/	d9d'ed*ed+e
ee.eedfde!e
ee.eeffd-�Z0d.ede
ee.eeffd/�Z1d0e
eeee.efdefd1�Z2e(e3d'ed*ed0e
eeee.efddfd2�����Z4e(e3d'ed*ed0e
eeee.efddfd3�����Z5d'ed4eddf�fd5�Z6�xZ7S):ra�Implements specifics required to read git style configuration files.

    This variation behaves much like the git.config command such that the configuration
    will be read on demand based on the filepath given during initialization.

    The changes will automatically be written once the instance goes out of scope, but
    can be triggered manually as well.

    The configuration file will be locked if you intend to change values preventing other
    instances to write concurrently.

    :note:
        The config is case-sensitive even when queried, hence section and option names
        must match perfectly.
        If used as a context manager, will release the locked file.z^\s*[#;]z\s*(?P<option>[^:=\s][^:=]*)z\s*(?P<vi>[:=])\s*z(?P<value>.*)$)�add_sectionrorprjNT�
file_or_filesr�	read_only�merge_includesr��repo)rNr0c��tj�|t���|||t	|d��s|���|_|�||_n?|�(|rd�tD��|_n$td���t|��g|_||_d|_d|_
||_||_d|_|���dS)a;Initialize a configuration reader to read the given file_or_files and to
        possibly allow changes to it by setting read_only False

        :param file_or_files:
            A single file path or file objects or multiple of these

        :param read_only:
            If True, the ConfigParser may only read the data , but not change it.
            If False, only a single file path or file object may be given. We will write back the changes
            when they happen, or when the ConfigParser is released. This will not happen if other
            configuration files have been included
        :param merge_includes: if True, we will read files mentioned in [include] sections and merge their
            contents into ours. This makes it impossible to write back an individual configuration file.
            Thus, if you want to modify a single configuration file, turn this off to leave the original
            dataset unaltered when reading it.
        :param repo: Reference to repository to use if [includeIf] sections are found in configuration files.

        )�	dict_type�_proxiesNc�^�g|]*}|dk�ttt|������+S)r))r�rr)r7�fs  r9r�z,GitConfigParser.__init__.<locals>.<listcomp>`s>��+�+�+�HI�^_�co�^o�^o���->��(B�(B�C�C�^o�^o�^or;z7No configuration level or configuration files specifiedF)�cp�RawConfigParserrur��hasattr�_dictr��_file_or_filesr*r�r��
_read_onlyr_�_is_initialized�_merge_includes�_repo�_lock�
_acquire_lock)rUr�r�r�r�r�s      r9ruzGitConfigParser.__init__8s��4	��#�#�D�D�#�9�9�9��'������t�Z�(�(�	)� �J�J�L�L�D�M��$�dq�D����#��`�+�+�MZ�+�+�+�D�'�'�%�%^�_�_�_�'6�|�'D�'D�&E��#�#������$���-�����
�.2��
��������r;c�l�|js�|js�t|jtt
jf��r|j}nBt|jtttf��rtd���|jj}|�|��|_|j�
��dSdS)NzVWrite-ConfigParsers can operate on a single file only, multiple files have been passed)r�r��
isinstancer�rPr�r�tuple�listrr�r-�t_lock�_obtain_lock)rUr�s  r9r�zGitConfigParser._acquire_lockps�����	&��:�
8��d�1�C���3E�F�F�=�$(�$7�M�M��� 3�e�T�8�5L�M�M�=�$�p����%)�$7�$<�M�"�[�[��7�7��
�
�J�#�#�%�%�%�%�%�!	&�	&r;c�.�|���dS)z3Write pending changes if required and release locksN�rxrys r9rzzGitConfigParser.__del__�s��	
�������r;c�.�|���|SrY)r�rys r9r�zGitConfigParser.__enter__�s���������r;rVc�.�|���dSrYr�)rUrVs  r9r�zGitConfigParser.__exit__�s���������r;c��|js |jr|j���sdS		|���n7#t$rt
�dd���Ynt$rYnwxYw|j�|j���dSdS#|j�|j���wwxYw)z�Flush changes and release the configuration write lock. This instance must not be used anymore afterwards.
        In Python 3, it's required to explicitly release locks and flush changes, as __del__ is not called
        deterministically anymore.Nz/Exception during destruction of GitConfigParserT)�exc_info)	r�r��	_has_lockr`�IOError�log�error�ReferenceError�
_release_lockrys r9rxzGitConfigParser.release�s����>�	�d�j�	���1E�1E�1G�1G�	��F�	+�
��
�
�������
\�
\�
\��	�	�K�VZ�	�[�[�[�[�[�!�
�
�
���	
�����z�%��
�(�(�*�*�*�*�*�&�%��t�z�%��
�(�(�*�*�*�*�&���s5�A�B�&A5�'B�)	A5�2B�4A5�5B�#B?�	optionstrc��|S)z0Do not transform options in any way when writingr�)rUr�s  r9�optionxformzGitConfigParser.optionxform�s���r;�fp�fpnamec�@�d}d}d}d}d}dtdtfd�}	|����t��}	|	s�nL|dz}|	���d	ks|j�|	��r�i|	�dd��d���d
kr|	ddvr��|j	�|	�����}
|s�|
r�|
�
d�����}||jvr|j|}nD|tj
kr|j}n,|�d
|ff��}||j|<d|j|<d}�n|�tj|||	���|�s�|j�|	��}
|
�r&|
�
ddd��\}}}
|dvrmd|
vri|
����d��sB|
�d��}|dkr'|
|dz
���r
|
d|�}
|
���}
|
dkrd	}
|�|�����}t1|
��dkr-|
ddkr!|
ddkrd}||
dd���}
|�||
��n�|j�|	��s9|stj|��}|�|t;|	������|	���}	|	�d��rd}|	dd�}	|�|��}
|� ||
||	��z����||r|�dS)a�A direct copy of the py2.4 version of the super class's _read method
        to assure it uses ordered dicts. Had to change one line to make it work.

        Future versions have this fixed, but in fact its quite embarrassing for the
        guys not to have done it right in the first place !

        Removed big comments to make it more compact.

        Made sure it ignores initial whitespace as git uses tabsNrF�vr0c��|ddkr
|dd�}|�t���d��S)Nr��\�unicode_escape)�encoder�decode)r�s r9�
string_decodez,GitConfigParser._read.<locals>.string_decode�s?����u��}�}��c�r�c�F���8�8�F�#�#�*�*�+;�<�<�<r;T���rem�rR�headerrL�option�vir�)�=�:�;�"r�z"")!rP�readliner�r�strip�
re_comment�match�split�lower�SECTCRE�group�	_sectionsr��DEFAULTSECT�	_defaultsr�r��MissingSectionHeaderError�OPTCREr6�find�isspacer��rstrip�lenr��OPTVALUEONLY�ParsingErrorr��repr�endswithr�r�)rUr�r��cursect�optname�lineno�
is_multi_line�er��line�mo�sectnamer�optval�poss               r9�_readzGitConfigParser._read�s����������
���	=�S�	=�S�	=�	=�	=�	=�A	G��;�;�=�=�'�'��/�/�D��
���a�Z�F��z�z�|�|�r�!�!�T�_�%:�%:�4�%@�%@�!���z�z�$��"�"�1�%�+�+�-�-��6�6�4��7�d�?�?����#�#�D�J�J�L�L�1�1�B� �2
G�R�2
G� "���� 2� 2� 8� 8� :� :���t�~�-�-�"�n�X�6�G�G����/�/�"�n�G�G�"�j�j�:�x�*@�)B�C�C�G�/6�D�N�8�,�.2�D�M�(�+�������2�6�6�4�H�H�H�"�"
G��[�&�&�t�,�,����*,�(�(�8�T�7�*K�*K�'�G�R���Z�'�'�C�6�M�M�&�,�,�.�.�B[�B[�\_�B`�B`�M�$�k�k�#�.�.���"�9�9���a���)@�)@�)B�)B�9�%+�D�S�D�\�F�#�\�\�^�^�F���~�~�!#��"�.�.�w�~�~�/?�/?�@�@�G��6�{�{�Q���6�!�9��+;�+;��r�
�c�@Q�@Q�(,�
�!.��v�a�b�b�z�!:�!:���K�K���0�0�0�0� �,�2�2�4�8�8�5� �8� "��� 7� 7�A������d���4�4�4���{�{�}�}���=�=��%�%�%�$)�M�����9�D� ����1�1�������-�-��2E�2E�)E�F�F�F�CA	G�L
�	��G�	�	r;c�R�|jo t|�����SrY)r�r�_included_pathsrys r9�
_has_includeszGitConfigParser._has_includess$���#�C��D�,@�,@�,B�,B�(C�(C�Cr;c���g}|���D�]�}|dkr||�|��z
}t�|��}|�|j��E|�d��}|�d������|dvr�tj����t�fd�dD����sd�z���
d	��r�d
z
�|�
d��rtjdd
�����|jj
rDtjt!|jj
�����r||�|��z
}��Q|dkrQ	|jjj}n#t&$rY��wwxYwtj|���r||�|��z
}���|S)zkReturn List all paths that must be included to configuration
        as Tuples of (option, value).
        �includeNr�r#)�gitdirzgitdir/ic3�B�K�|]}��|��V��dSrYr5)r7�sr�s  �r9r:z2GitConfigParser._included_paths.<locals>.<genexpr>%s1�����D�D�1�5�+�+�A�.�.�D�D�D�D�D�Dr;)z./�/z**/r1z**z/iz[a-zA-Z]c��d�|������|��������S)Nz[{}{}])�formatrr�upper)�ms r9rz1GitConfigParser._included_paths.<locals>.<lambda>.s8��(�/�/�!�'�'�)�)�/�/�2C�2C�Q�W�W�Y�Y�_�_�EV�EV�"W�"W�r;�onbranch)�sectionsr��CONDITIONAL_INCLUDE_REGEXP�searchr�rr
r�r��anyr�re�sub�git_dir�fnmatch�fnmatchcaserP�
active_branchr-�	TypeError)rU�pathsrsr�keyword�branch_namer�s      @r9r*zGitConfigParser._included_pathss�������}�}���&	1�&	1�G��)�#�#�����G�,�,�,��.�5�5�g�>�>�E��}��
� 2���k�k�!�n�n�G��K�K��N�N�(�(�*�*�E��0�0�0���u�-�-���D�D�D�D��D�D�D�D�D�*�!�E�M�E��>�>�#�&�&�"��T�M�E��#�#�D�)�)���F�#�W�W����E�
�:�%�5��*�3�t�z�/A�+B�+B�E�J�J�5�����G�!4�!4�4����J�&�&��"&�*�":�"?�K�K�� �����H������&�{�E�:�:�1��T�Z�Z��0�0�0�E���s�0F�
F�Fc�b�|jrdSd|_dg}t|jttjf��r	|jg}nDt|jtttf��s	|jg}nt|j��}t|��}d}|�r|�
d��}d}t|d��r<ttt|��}|�||j��nltt
|��}	t#|d��5}d}|�||j��ddd��n#1swxYwYn#t$$rY��wxYw|����r|���D�]\}}|�d��rt-j|��}t-j|��s]|s�Ftt
|��}t-j|��s
Jd	���t-jt-j|��|��}t-j|��}||vst	j|tj��s��|�|��|�d|��|d
z
}��
|��|dkr	d|_ dSdS)z�Reads the data stored in the files we have been initialized with. It will
        ignore files that cannot be read, possibly leaving an empty configuration

        :return: Nothing
        :raise IOError: if a file cannot be handledNTr�rF�seek�rbr�z9Need absolute paths to be sure our cycle checks will workr�)!r�r�r�rPr�rr�r�rrj�popr�rr
�bytesr(r-�openr�r+r*r6r�r��isabsr��dirnamer��access�R_OKr��insertr�)	rU�
files_to_read�seen�num_read_include_files�	file_path�file_okr�r4�include_paths	         r9rZzGitConfigParser.readAs����	��4�#���46�4�
��d�)�C���+=�>�>�	6�!�0�1�M�M��D�/�%��x�1H�I�I�	6�!�0�1�M�M� ��!4�5�5�M��=�!�!��!"���&	0�%�)�)�!�,�,�I��G��y�&�)�)�
� ��E��I�6�6�	��
�
�9�i�n�5�5�5�5�!��9�5�5�	���i��.�.�0�"�"&���
�
�2�r�w�/�/�/�0�0�0�0�0�0�0�0�0�0�0����0�0�0�0��������H�����
�!�!�#�#�
0�'+�';�';�'=�'=�0�0�O�A�|�#�.�.�s�3�3�D�'*�~�l�'C�'C���9�\�2�2�V�&�%�$�$(��9�$=�$=�	�"�y��3�3�p�p�5p�p�p�3�'*�x���I�0F�0F��'U�'U��#&�<��#=�#=�L�#�t�+�+�2�9�\�2�7�3S�3S�+� ��H�H�\�*�*�*�!�(�(��L�9�9�9�*�a�/�*�*�M�&	0�Z"�Q�&�&�#(�D� � � �'�&s6�E�$E�E�E�E�E�E�
E'�&E'c�����dtdtddf��fd�}�jr|tj�j���j���D]\}}|||���dS)z_Write an .ini-format representation of the configuration state in
        git compatible formatr-�section_dictr0Nc�j����d|z�t����|���D]l\}}|dkr�|D]]}��d|�d��|���dd���d��t�����^�mdS)Nz[%s]
rL�	z = �
z
	)r`r�rr��_value_to_string�replace)r-rWr�r�r�r�rUs     ��r9�
write_sectionz-GitConfigParser._write.<locals>.write_section�s�����H�H�h��o�-�-�f�5�5�6�6�6�".�!7�!7�!9�!9�
u�
u�
��f��*�$�$���u�u�A��H�H�H�s�s�s�D�4I�4I�!�4L�4L�4T�4T�UY�[a�4b�4b�4b�4b�c�k�k�lr�s�s�t�t�t�t�u�	
u�
ur;)rPr�rr�rrr�)rUr�r]r-r�s``   r9�_writezGitConfigParser._write�s�����
	u��
	u�4�
	u�D�
	u�
	u�
	u�
	u�
	u�
	u�
	u��>�	:��M�"�.�$�.�9�9�9� �>�/�/�1�1�	'�	'�K�D�%��M�$��&�&�&�&�	'�	'r;�section_namec�h��d�tt|���|��D��S)zK:return: list((option, value), ...) pairs of all items in the given sectionc�(�g|]\}}|dk�||f��S)rLr�)r7r�r�s   r9r�z)GitConfigParser.items.<locals>.<listcomp>�s,��g�g�g�4�1�a�WX�\f�Wf�Wf��A��Wf�Wf�Wfr;)rArr�)rUr_rKs  �r9r�zGitConfigParser.items�s/���g�g�5��$�#?�#?�#E�#E�l�#S�#S�g�g�g�gr;c��t|j��}|j|���D]E\}}|dkr�||vr|�|��|kr�*|D]}|�||����F|���S)zQ:return: list((option, [values...]), ...) pairs of all items in the given sectionrL)r�rrr�r�r�)rUr_�rvr��vsr�s      r9r�zGitConfigParser.items_all�s���
�$�.�
!�
!���^�L�1�;�;�=�=�	�	�E�A�r��J�����B�w�w�2�9�9�Q�<�<�2�-�-���
�
�����q�!�����
��|�|�~�~�r;c�R�|�d��|jsdSt|jtt
f��r$t
dt|j��z���|���rt�
d��dS|j}t|ttj
tf��}|r |j�|j���t#|d��sUt%t|��}t'|d��5}|�|��ddd��dS#1swxYwYdSt%d|��}|�d��t#|d	��r|���|�|��dS)
z�Write changes to our file, if there are changes at all

        :raise IOError: if this is a read-only writer instance or if we could not obtain
            a file lockr`NzRCannot write back if there is not exactly a single file to write to, have %i fileszsSkipping write-back of configuration file as include files were merged in.Set merge_includes=False to prevent this.rF�wbrr�truncate)�_assure_writabler_r�r�r�r��AssertionErrorrr+r��debugrPr�rrr�r�r�rrJr^rFrg)rUr��is_file_lock�fp_opens    r9r`zGitConfigParser.write�s���	
���g�&�&�&��{�	��4��d�)�D�%�=�9�9�	� �d��d�)�*�*�+���
������	��I�I�>�
�
�
��4��
 ��"�"�s�B�K��&@�A�A���	&�D�J�2��J�#�#�%�%�%��r�6�"�"�
	��h��#�#�B��b�$���
%�7����G�$�$�$�
%�
%�
%�
%�
%�
%�
%�
%�
%�
%�
%�
%����
%�
%�
%�
%�
%�
%��i��$�$�B��G�G�A�J�J�J��r�:�&�&�
����
�
�
��K�K��O�O�O�O�Os�D<�<E�E�method_namec�>�|jrtd|�d|�����dS)Nz#Cannot execute non-constant method �.)r�r�)rUrms  r9rhz GitConfigParser._assure_writable�s4���>�	\��'����k�k�Z�[�[�[�	\�	\r;rsc�T��tt|���|��S)z(Assures added options will stay in order)rArr�)rUrsrKs  �r9r�zGitConfigParser.add_section�s!����_�d�+�+�7�7��@�@�@r;c��|jS)z@:return: True if this instance may change the configuration file)r�rys r9r�zGitConfigParser.read_only�s����r;rr�c��	|�||��}n#t$r|�|cYS�wxYw|�|��S)a�Get an option's value.

        If multiple values are specified for this option in the section, the
        last one specified is returned.

        :param default:
            If not None, the given default value will be returned in case
            the option did not exist
        :return: a properly typed value, either int, float or string

        :raise TypeError: in case the value could not be understood
            Otherwise the exceptions known to the ConfigParser will be raised.)ri�	Exception�_string_to_value)rUrsrr��valuestrs     r9rgzGitConfigParser.get_value�s_��&	��x�x���0�0�H�H���	�	�	��"������	����
�$�$�X�.�.�.s��+�+c���	�����j|�|��}n#t$r	|�|gcYS�wxYw�fd�|D��S)a�Get an option's values.

        If multiple values are specified for this option in the section, all are
        returned.

        :param default:
            If not None, a list containing the given default value will be
            returned in case the option did not exist
        :return: a list of properly typed values, either int, float or string

        :raise TypeError: in case the value could not be understood
            Otherwise the exceptions known to the ConfigParser will be raised.Nc�:��g|]}��|����Sr�)rt)r7rurUs  �r9r�z.GitConfigParser.get_values.<locals>.<listcomp>&s'���D�D�D�H��%�%�h�/�/�D�D�Dr;)r7rr�rs)rUrsrr��lsts`    r9�
get_valueszGitConfigParser.get_valuess����$	��M�M�O�O�O��.��)�0�0��8�8�C�C���	�	�	��"��y� � � ��	����
E�D�D�D��D�D�D�Ds�48�A�	Aruc�2�ttf}|D]<}	||��}|t|��kr�"|cS#ttf$rY�9wxYw|���}|dkrdS|dkrdSt|t��std|���|S)N�falseF�trueTz=Invalid value type: only int, long, float and str are allowed)�int�floatr�rArr�rP)rUru�types�numtype�val�vls      r9rtz GitConfigParser._string_to_value(s����e����	�	�G�
��g�h�'�'���%��/�/�)�)���
�
�
���	�*�
�
�
���
����
�^�^�
�
��
��=�=��5�
��<�<��4��(�C�(�(�	��O����
�
�s�7�7�A�
Ar�c��t|tttf��rt	|��St|��SrY)r�r}r~�boolrPr)rUr�s  r9r[z GitConfigParser._value_to_stringDs5���e�c�5�$�/�0�0�	��u�:�:���%� � � r;c��|�|��s|�|��|�|||�|����|S)a�Sets the given option in section to the given value.
        It will create the section if required, and will not throw as opposed to the default
        ConfigParser 'set' method.

        :param section: Name of the section in which the option resides or should reside
        :param option: Name of the options whose value to set

        :param value: Value to set the option to. It must be a string or convertible
            to a string
        :return: this instance)�has_sectionr�rjr[�rUrsrr�s    r9rhzGitConfigParser.set_valueIsW������(�(�	&����W�%�%�%�����&�$�"7�"7��">�">�?�?�?��r;c���|�|��s|�|��|j|�||�|����|S)aIAdds a value for the given option in section.
        It will create the section if required, and will not throw as opposed to the default
        ConfigParser 'set' method. The value becomes the new value of the option as returned
        by 'get_value', and appends to the list of values returned by 'get_values`'.

        :param section: Name of the section in which the option resides or should reside
        :param option: Name of the option

        :param value: Value to add to option. It must be a string or convertible
            to a string
        :return: this instance)r�r�rr�r[r�s    r9�	add_valuezGitConfigParser.add_value[s^������(�(�	&����W�%�%�%���w��#�#�F�D�,A�,A�%�,H�,H�I�I�I��r;�new_namec���|�|��std|z���|�|��rtd|z���tt|���|��|j|}|�|��D]\}}|�||���|�|��|S)z�rename the given section to new_name
        :raise ValueError: if section doesn't exit
        :raise ValueError: if a section with new_name does already exist
        :return: this instance
        z!Source section '%s' doesn't existz'Destination section '%s' already exists)	r�r�rArr�rr�r�ro)rUrsr��new_sectionr�rdrKs      �r9�rename_sectionzGitConfigParser.rename_sectionns��������(�(�	L��@�7�J�K�K�K����H�%�%�	S��F��Q�R�R�R�
�o�t�$�$�0�0��:�:�:��n�X�.���^�^�G�,�,�	&�	&�E�A�r����q�"�%�%�%�%�	
���G�$�$�$��r;)NTTNNr�)r0rrY)8rLrMrNrOr	r�r;�compiler�optvalueonly_sourcerrr2rrrr�rrur�rzr�r
r�rxrPr�rr
rIr(r}r+rrr*rZr^r�r�r?r`rhr�r�r�r~rgryrtr[r@rhr�r�rQrRs@r9rrs��������G�G�(�F����K�(�(�J�:���2�:�1�2�2�L�
�R�Z�+�.C�C�FW�W�
X�
X�F��S��ae��#�7;�$(�
6�6��T�8�Y���x�QZ�GZ�A[�8\�\�]�6��6��	6�
�-�t�3�4�6��L�!�
6�
�6�6�6�6�p&�&�&�&�(����
�����c��d�����+�+�+�+�.�S��S�����a��n�b��i�7�8�a�#�a�$�a�a�a�a�FD�u�T�3�Y�/�D�D�D�D�.��e�C��H�o�!6�.�.�.�.�`E)�E)�E)�E)�P'��'��'�'�'�'�4h�#�h�$�u�S�#�X��*?�h�h�h�h�h�h��c��d�5��d�3�i��3H�.I����� �)�)�)��\�)�V\�C�\�D�\�\�\�\�A�3�A�4�A�A�A�A�A�A���4�����X��7;�	/�/��/��/��s�E�3��d�2�3�	/�

�s�E�3��$�	%�/�/�/�/�@7;�	E�E��E��E��s�E�3��d�2�3�	E�

�e�C���T�)�*�	+�E�E�E�E�8����s�E�3��7L�1M�����8!�e�C���U�D�,H�&I�!�c�!�!�!�!�
� ����c��%��U�C�QV�X\�@\�:]��bs����!� ��\�� � ����c��%��U�C�QV�X\�@\�:]��bs����!� ��\��"�c��S��=N����������r;)�	metaclass)KrO�sys�abc�	functoolsrr<�iorr�loggingr�r;r>�
git.compatrrr�git.utilr	�os.path�pathr��configparserr��typingr
rrr
rrrrrrrr�	git.typesrrrrr�
git.repo.baserrrrPrIr}r~r�r �version_info�collectionsr$�OrderedDict_OMD�__all__�	getLoggerr��
addHandler�NullHandlerr*�__annotations__r�r8�ABCMetar,r?r@r%r�r�r�rr�r;r9�<module>r�s������
�
�
�
�
�
�
�����������%�%�%�%�%�%�%�%�����	�	�	�	�	�	�	�	�������������������������������
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�V�U�U�U�U�U�U�U�U�U�U�U�U�U���"�"�"�"�"�"���������)�1B�C�C�C���g�m�S�%��e�T�B�B����B�Q�B��)�#�#�'�'�'�'�'�'�!�O�O�"�"�"�"�"�"�!�#�t�K�'8�"8�9�O�3���g���%�%�����"�w�"�$�$�%�%�%�#M�
��L�L�L�
(�R�Z�(]�^�^������������:	�x��R��(�	�X�c�2�g�->�	�	�	�	�
���b��0A�
�h�s�TV�w�FW�
�
�
�
� ;J�;J�;J�;J�;J���/�;J�;J�;J�|)3�)3�)3�)3�)3�?�)3�)3�)3�X
�"3�
��
�
�
�
�0o	�o	�o	�o	�o	�b�(�4E�o	�o	�o	�o	�o	�o	r;

Hacked By AnonymousFox1.0, Coded By AnonymousFox