Your IP : 216.73.216.213
B
���]�: � @ s� d Z ddlZddlZddlZddlZddlZddlmZmZ ddlm Z ddlm
Z ddlm
Z
mZ dZG dd � d ej�ZG d
d� d�Zdd
� ZG dd� d�ZdS )z�
module defining a subversion path object based on the external
command 'svn'. This modules aims to work with svn 1.3 and higher
but might also interact well with earlier versions.
� N)�path�process)�common)�svnwc)�BuildcostAccessCache�
AgingCacheFc @ s� e Zd ZdZedd�Zeddd�Zd>dd �Zd
d� Z dd
� Z
dd� Zdd� Zdd� Z
dd� Zdd� Zdd� Zdd� Zd?dd�Zdd � Zd!d"� Zd@d$d%�ZdAd'd(�ZdBd+d,�Zd-d.� Zd/d0� Zd1d2� Zd3d4� Zd5d6� Zd7d8� ZdCd9d:�ZdDd<d=�ZdS )E�SvnCommandPathzZ path implementation that offers access to (possibly remote) subversion
repositories. � )�
maxentriesi� g N@)r
Z
maxsecondsNc C sP t �| �}t|| �r&|j}|j}|j}t�|� |�d�}||_||_||_|S )N�/) �object�__new__�
isinstance�rev�auth�strpath� svncommonZ
checkbadchars�rstrip)�clsr r r �self� r �@/opt/alt/python37/lib/python3.7/site-packages/py/_path/svnurl.pyr
s
zSvnCommandPath.__new__c C s( | j dkrd| j S d| j| j f S d S )N���z
svnurl(%r)zsvnurl(%r, %r))r r )r r r r �__repr__$ s
zSvnCommandPath.__repr__c G s@ | j dkr| j|f|�� S d| j gt|� }| j|f|�� S dS )z9 execute an svn command, append our own url and revision Nz-r)r � _svnwrite�list)r �cmd�argsr r r �_svnwithrev* s
zSvnCommandPath._svnwithrevc s` d| g}� fdd�|D �}|� |� |�d� �� � d�|�}trRtd| � � �|�}|S )z, execute an svn command, append our own url zsvn %sc s g | ]}d � � |� �qS )z"%s")�_escape)�.0�item)r r r �
<listcomp>5 s z,SvnCommandPath._svnwrite.<locals>.<listcomp>z"%s"� z
execing %s)�extend�append�_encodedurl�join�DEBUG�print�_svncmdexecauth)r r r �l�string�outr )r r r 2 s
zSvnCommandPath._svnwritec C s2 t �� | }| jdk r(|d| j�� 7 }| �|�S )z execute an svn command 'as is' Nr# )r � fixlocaler �makecmdoptions�_cmdexec)r r r r r r* ? s
zSvnCommandPath._svncmdexecauthc C sh yt �|�}W nT tj jjk
rb t�� d }|j�d�dksP|j�d�dkr\tj� | ��� Y nX |S )N� zFile Existsr zFile already exists)
r �cmdexec�py�Error�sys�exc_info�err�find�error�EEXIST)r r r- �er r r r0 F s zSvnCommandPath._cmdexecc C s2 t �� | }| jdk r(|d| j�� 7 }| �|�S )z9 execute an svn command, return a pipe for reading stdin Nr# )r r. r r/ �_popen)r r r r r �
_svnpopenauthQ s
zSvnCommandPath._svnpopenauthc C s
t �|�S )N)�os�popen)r r r r r r<