AlkantarClanX12
Current Path : /usr/lib/python3.6/site-packages/pip/vcs/__pycache__/ |
Current File : //usr/lib/python3.6/site-packages/pip/vcs/__pycache__/subversion.cpython-36.pyc |
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�j| j� s td| ��| jd|gdddid�}tj|�}|sftjdt |�� tj d |� d S |jd�j� }t j|�}|s�tjdt |�� tj d |� |d fS ||jd�fS )z/Returns (url, revision), where both are strings�/zBad directory: %s�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)�rstrip�endswith�dirname�AssertionError�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'