3
Pf$ @ s d dl mZ d dlZd dlZd dlZd dlmZ d dlm Z d dl
mZmZ d dl
mZ d dlmZmZ ejdZejd Zejd
ZejdZejdZejd
ZejeZG dd deZdd Zeje dS ) )absolute_importN)parse)Link)rmtreedisplay_path)
indent_log)vcsVersionControlz
url="([^"]+)"zcommitted-rev="(\d+)"z URL: (.+)zRevision: (.+)z\s*revision="(\d+)"z(.*)c s e Zd ZdZdZdZd"Zdd Zd
d Zdd
Z dd Z
dd Zdd Zdd Z
fddZdd Zdd Zdd Zdd Zed d! Z ZS )#
Subversionsvnz.svncheckoutsvn+sshsvn+http svn+httpssvn+svnc C s | j d|gdddid}tj|}|sFtjdt| tjd| dS |jd j }t j|}|stjd
t| tjd| |dfS ||jd fS )z/Returns (url, revision), where both are stringsinfoFZLANGC)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_researchloggerwarningr debuggroupstrip_svn_revision_re)selflocationoutputmatchurl r# /usr/lib/python3.6/subversion.pyget_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 %sexportF)r N)get_url_revget_rev_optionsremove_auth_from_urlr r r ospathexistsr r )r r r" revrev_optionsr# r# r$ r&