[ Avaa Bypassed ]




Upload:

Command:

hmhc3928@3.138.109.239: ~ $
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�PopenZcommunicate�
returncode�	distutils�errorsZDistutilsError�len�strip�decode)	�cmdZthrow_on_error�bufferrZout_locationZerr_locationZnewenv�output�out�r�/git.py�_run_shell_command!s*

�
� rcKs,t|ttf�s|g}tdd|g|f|�S)N�gitz--git-dir=%s)�
isinstance�list�tupler)r�git_dir�kwargsrrr�_run_git_command<s��r%c
CsPztdddg�WStk
rJ}z|jtjkr8WY�
dS�W5d}~XYnXdS)Nrz	rev-parsez	--git-dirr)r�OSError�errnoZENOENT)�errr�_get_git_directoryCs
r)cCs,ztddg�Wntk
r&YdSXdS)Nrz	--versionFT)rr&rrrr�_git_is_installedMs
r*cCst|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_resourcesZ
parse_version)�tagsrrr�_get_highest_tagXsr/rcCsLg}|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|�qSrr)�.0�frrr�
<listcomp>psz#_find_git_files.<locals>.<listcomp>)�_run_git_functionsr�infor%�splitr)�dirnamer#Z	file_listrrr�_find_git_filesas
r8cCs6tddg|�}d|kr&|�dd�dSd|kr2dSdS)N�describez--always�-�����.r)r%�rsplit)r#r9rrr�_get_raw_tag_infossr?cCst|�dkS)Nr)r?�r#rrr�get_is_release|srAcCsd}t�rt�}|pdS)N)r*r)r@rrrr4�sr4cCs"|s
t�}|rtdddg|�SdS)z1Return the short sha for this repo, if it exists.rz-n1z--pretty=format:%hN)r4r%r@rrr�get_git_short_sha�s�rBccs�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
=======

r:�
z%(tag)s
%(underline)s

)�tag�	underlinezMerge r=���z
* %(msg)s
)�msgF)r/r�dict�
startswith�endswith)�	changelogZ
first_lineZcurrent_release�hashr.rGrErrr�_iter_changelog�s&


��

rMcCs|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)r)�_iter_log_innerr@rrr�_iter_log_oneline�s

rOccs�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
--decoraterCr;��(�)� Nztag:cSsg|]}|�d�d�qS)�,r)r6)r1rDrrrr3�s�z#_iter_log_inner.<locals>.<listcomp>rztag: )	rr5r%r6rrIr�join�set)r#Zlog_cmdrK�lineZ
line_partsrGr.rrrrN�s 	


�
rNc	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.Zskip_changelogZSKIP_WRITE_GIT_CHANGELOGNr@z[pbr] Writing ChangeLogZ	ChangeLog�wr	)�encodingz![pbr] ChangeLog complete (%0.1fs))�timer�get_boolean_optionrOrMrr5r
�pathrU�exists�access�W_OK�io�open�write)r#�dest_dir�option_dictrK�start�should_skipZ
new_changelogZchangelog_file�releaseZcontent�stoprrr�write_git_changelog�s2�

�rir=c
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.Zskip_authorsZSKIP_GENERATE_AUTHORSNz
AUTHORS.inZAUTHORSz[pbr] Generating AUTHORSz.(jenkins@review|infra@lists|jenkins@openstack)rz--format=%aN <%aE>rCcsg|]}t��|�s|�qSr)�re�search)r1�a�Z
ignore_emailsrrr3sz$generate_authors.<locals>.<listcomp>zCo-authored-by:.+cSs$g|]}|r|�dd�d���qS)�:rP)r6r)r1Zsignedrrrr3s��wb�rbr	z[pbr] AUTHORS complete (%0.1fs))rr[rZr
r\rUr]r^r_rr5r)r%r6rj�findall�	MULTILINE�sortedrVrarb�read�encode)r#rcrdrfreZold_authorsZnew_authorsZauthorsZgit_log_cmdZco_authors_outZ
co_authorsZnew_authors_fhZold_authors_fhrhrrmr�generate_authors�sN��

���rv)FTN)rN)N)N) Z
__future__rZdistutils.errorsrrr'r`r
rjrrZr-Zpbrrrr%r)r*r/r8r?rAr4rBrMrOrNr\�curdirrirHrvrrrr�<module>s8

	
	


"�


Filemanager

Name Type Size Permission Actions
__init__.cpython-38.opt-1.pyc File 103 B 0644
__init__.cpython-38.pyc File 103 B 0644
builddoc.cpython-38.opt-1.pyc File 6.05 KB 0644
builddoc.cpython-38.pyc File 6.05 KB 0644
core.cpython-38.opt-1.pyc File 2.78 KB 0644
core.cpython-38.pyc File 2.78 KB 0644
extra_files.cpython-38.opt-1.pyc File 598 B 0644
extra_files.cpython-38.pyc File 598 B 0644
find_package.cpython-38.opt-1.pyc File 678 B 0644
find_package.cpython-38.pyc File 678 B 0644
git.cpython-38.opt-1.pyc File 7.57 KB 0644
git.cpython-38.pyc File 7.57 KB 0644
options.cpython-38.opt-1.pyc File 383 B 0644
options.cpython-38.pyc File 383 B 0644
packaging.cpython-38.opt-1.pyc File 18.85 KB 0644
packaging.cpython-38.pyc File 18.85 KB 0644
pbr_json.cpython-38.opt-1.pyc File 585 B 0644
pbr_json.cpython-38.pyc File 585 B 0644
testr_command.cpython-38.opt-1.pyc File 4.31 KB 0644
testr_command.cpython-38.pyc File 4.31 KB 0644
util.cpython-38.opt-1.pyc File 13.79 KB 0644
util.cpython-38.pyc File 13.79 KB 0644
version.cpython-38.opt-1.pyc File 14.35 KB 0644
version.cpython-38.pyc File 14.35 KB 0644