403Webshell
Server IP : 192.158.238.246  /  Your IP : 3.142.201.222
Web Server : LiteSpeed
System : Linux uniform.iwebfusion.net 4.18.0-553.27.1.lve.1.el8.x86_64 #1 SMP Wed Nov 20 15:58:00 UTC 2024 x86_64
User : jenniferflocom ( 1321)
PHP Version : 8.1.32
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /opt/alt/python38/lib/python3.8/site-packages/pbr/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /opt/alt/python38/lib/python3.8/site-packages/pbr/__pycache__/git.cpython-38.pyc
U

�V�&�@sddlmZddlZddlmZddlZddlZddlZddlZddl	Z	ddl
Z
ddlZddlm
Z
d'dd�Zd	d
�Zdd�Zd
d�Zdd�Zd(dd�Zdd�Zdd�Zdd�Zd)dd�Zdd�Zd*dd�Zd d!�Zdejjddfd"d#�Zdd$e�fd%d&�ZdS)+�)�unicode_literalsN)�log)�optionsFTc	Cs�|rtj}tj}nd}d}tj��}|r2|�|�tj||||d�}|��}|jrl|rlt	j
�d||jf��t|�dks�|dr�|d�
�s�dS|d�
��dd�S)N)�stdout�stderr�envz%s returned %dr��utf-8�replace)�
subprocess�PIPE�os�environ�copy�update�Popen�communicate�
returncode�	distutils�errors�DistutilsError�len�strip�decode)	�cmd�throw_on_error�bufferr�out_location�err_location�newenv�output�out�r"�8/opt/alt/python38/lib/python3.8/site-packages/pbr/git.py�_run_shell_command!s*

�
� r$cKs,t|ttf�s|g}tdd|g|f|�S)N�gitz--git-dir=%s)�
isinstance�list�tupler$)r�git_dir�kwargsr"r"r#�_run_git_command<s��r+c
CsPztdddg�WStk
rJ}z|jtjkr8WY�
dS�W5d}~XYnXdS)Nr%z	rev-parsez	--git-dirr)r$�OSError�errno�ENOENT)�er"r"r#�_get_git_directoryCs
r0cCs,ztddg�Wntk
r&YdSXdS)Nr%z	--versionFT)r$r,r"r"r"r#�_git_is_installedMs
r1cCst|tjd�S)z�Find the highest tag from a list.

    Pass in a list of tag strings and this will return the highest
    (latest) as sorted by the pkg_resources version parser.
    )�key)�max�
pkg_resources�
parse_version)�tagsr"r"r#�_get_highest_tagXsr7rcCsLg}|dkrt�}|r>t�d�tddg|�}|�d�d��}dd�|D�S)	z�Behave like a file finder entrypoint plugin.

    We don't actually use the entrypoints system for this because it runs
    at absurd times. We only want to do this when we are building an sdist.
    Nz2[pbr] In git context, generating filelist from gitzls-filesz-z�r	cSsg|]}|r|�qSr"r")�.0�fr"r"r#�
<listcomp>psz#_find_git_files.<locals>.<listcomp>)�_run_git_functionsr�infor+�splitr)�dirnamer)�	file_listr"r"r#�_find_git_filesas
rAcCs6tddg|�}d|kr&|�dd�dSd|kr2dSdS)N�describez--always�-�����.r)r+�rsplit)r)rBr"r"r#�_get_raw_tag_infossrHcCst|�dkS)Nr)rH�r)r"r"r#�get_is_release|srJcCsd}t�rt�}|pdS)N)r1r0rIr"r"r#r<�sr<cCs"|s
t�}|rtdddg|�SdS)z1Return the short sha for this repo, if it exists.rz-n1z--pretty=format:%hN)r<r+rIr"r"r#�get_git_short_sha�s�rKccs�d}d}|dfV|D]~\}}}|r\t|�}t|�d}|sF|dfV|dt||d�fV|�d�s�|�d	�r||dd
�}|dt|d�fVd
}qdS)z�Convert a oneline log iterator to formatted strings.

    :param changelog: An iterator of one line log entries like
        that given by _iter_log_oneline.
    :return: An iterator over (release, formatted changelog) tuples.
    TNzCHANGES
=======

rC�
z%(tag)s
%(underline)s

)�tag�	underlinezMerge rF���z
* %(msg)s
)�msgF)r7r�dict�
startswith�endswith)�	changelog�
first_line�current_release�hashr6rPrNr"r"r#�_iter_changelog�s&


��

rXcCs|dkrt�}|sgSt|�S)aQIterate over --oneline log entries if possible.

    This parses the output into a structured form but does not apply
    presentation logic to the output - making it suitable for different
    uses.

    :return: An iterator of (hash, tags_set, 1st_line) tuples, or None if
        changelog generation is disabled / not available.
    N)r0�_iter_log_innerrIr"r"r#�_iter_log_oneline�s

rZccs�t�d�dddg}t||�}|�d�D]�}|��}t|�dkrBq(|d�d�rld	|krl|�d	�d��}nd
�|dd��}d|kr�td
d�|�d	�d�d�dd�D��}nt�}|d||fVq(dS)aIterate over --oneline log entries.

    This parses the output intro a structured form but does not apply
    presentation logic to the output - making it suitable for different
    uses.

    :return: An iterator of (hash, tags_set, 1st_line) tuples.
    z[pbr] Generating ChangeLogrz	--onelinez
--decoraterLrD��(�)� Nztag:cSsg|]}|�d�d�qS)�,r)r>)r9rMr"r"r#r;�s�z#_iter_log_inner.<locals>.<listcomp>rztag: )	rr=r+r>rrRr�join�set)r)�log_cmdrT�line�
line_partsrPr6r"r"r#rY�s 	


�
rYc	Cs�t��}|si}t�|dd�}|r&dS|s@t|d�}|r@t|�}|sHdSt�d�tj�	|d�}tj�
|�r~t�|tj�s~dSt
j|ddd	��}|D]\}}	|�|	�q�W5QRXt��}
t�d
|
|�dS)z-Write a changelog based on the git changelog.�skip_changelog�SKIP_WRITE_GIT_CHANGELOGNrIz[pbr] Writing ChangeLog�	ChangeLog�wr	)�encodingz![pbr] ChangeLog complete (%0.1fs))�timer�get_boolean_optionrZrXrr=r
�pathr`�exists�access�W_OK�io�open�write)r)�dest_dir�option_dictrT�start�should_skip�
new_changelog�changelog_file�release�content�stopr"r"r#�write_git_changelog�s2�

�r|rFc
sht�|dd�}|rdSt��}tj�|d�}tj�|d�}tj�|�rXt�|tj�sXdSt	�
d�d�|dkrtt�}|�rJg}dd	g}|t||��
d
�7}�fdd�|D�}td|�}	t�d
|	tj�}
dd�|
D�}
||
7}tt|��}t|d��R}tj�|��r&t|d��}|�|���W5QRX|�d
�|�d
�d��W5QRXt��}
t	�
d|
|�dS)z&Create AUTHORS file using git commits.�skip_authors�SKIP_GENERATE_AUTHORSNz
AUTHORS.in�AUTHORSz[pbr] Generating AUTHORSz.(jenkins@review|infra@lists|jenkins@openstack)rz--format=%aN <%aE>rLcsg|]}t��|�s|�qSr")�re�search)r9�a��
ignore_emailsr"r#r;sz$generate_authors.<locals>.<listcomp>zCo-authored-by:.+cSs$g|]}|r|�dd�d���qS)�:r[)r>r)r9�signedr"r"r#r;s��wb�rbr	z[pbr] AUTHORS complete (%0.1fs))rrkrjr
rlr`rmrnrorr=r0r+r>r��findall�	MULTILINE�sortedrarqrr�read�encode)r)rsrtrvru�old_authors�new_authors�authors�git_log_cmd�co_authors_out�
co_authors�new_authors_fh�old_authors_fhr{r"r�r#�generate_authors�sN��

���r�)FTN)rN)N)N) �
__future__r�distutils.errorsrrr-rpr
r�rrjr4�pbrrr$r+r0r1r7rArHrJr<rKrXrZrYrl�curdirr|rQr�r"r"r"r#�<module>s8

	
	


"�


Youez - 2016 - github.com/yon3zu
LinuXploit