Your IP : 3.140.185.250
3
�Pf�$ � @ s� d dl mZ d dlZd dlZd dlZd dlmZ d dlm Z d dl
mZmZ d dl
mZ d dlmZmZ ejd�Zejd �Zejd
�Zejd�Zejd�Zejd
�Zeje�ZG dd� de�Zdd� Zeje� dS )� )�absolute_importN)�parse)�Link)�rmtree�display_path)�
indent_log)�vcs�VersionControlz
url="([^"]+)"zcommitted-rev="(\d+)"z URL: (.+)zRevision: (.+)z\s*revision="(\d+)"z<url>(.*)</url>c s� e Zd ZdZdZdZd"Zdd � Zd
d� Zdd
� Z dd� Z
dd� Zdd� Zdd� Z
� fdd�Zdd� Zdd� Zdd� Zdd� Zed d!� �Z� ZS )#�
Subversion�svnz.svn�checkout�svn+ssh�svn+http� svn+https�svn+svnc C s� | j d|gdddid�}tj|�}|sFtjdt|�� tjd|� dS |jd �j� }t j|�}|s�tjd
t|�� tjd|� |dfS ||jd �fS )z/Returns (url, revision), where both are strings�infoFZLANG�C)�show_stdoutZ
extra_environz'Cannot determine URL of svn checkout %sz!Output that cannot be parsed:
%sN� z,Cannot determine revision of svn checkout %s)NN)
�run_command�_svn_url_re�search�logger�warningr �debug�group�strip�_svn_revision_re)�self�location�output�match�url� r# � /usr/lib/python3.6/subversion.py�get_info s(
zSubversion.get_infoc C st | j � \}}t||�}| j|�}tjd||� t� �6 tjj|�rJt |� | j
dg| ||g dd� W dQ R X dS )z@Export the svn repository at the url to the destination locationz!Exporting svn repository %s to %s�exportF)r N)�get_url_rev�get_rev_options�remove_auth_from_urlr r r �os�path�existsr r )r r r"