Edit File: bazaar.cpython-36.pyc
3 )�]b�������������������@���s����d�dl�mZ�d�dlZd�dlZd�dlZyd�dlmZ�W�n�ek rP���d�dl ZY�nX�d�dl mZmZ�d�dl mZmZ�d�dlmZ�eje�ZG�dd��de�Zeje��dS�) �����)�absolute_importN)�parse)�rmtree�display_path)�vcs�VersionControl)�path_to_urlc�������������������sz���e�Zd�ZdZdZdZdZd ��fdd� Zd d��Zdd��Z dd��Z dd��Z��fdd�Zdd��Z dd��Zdd��Zdd��Z���ZS�)!�Bazaar�bzrz.bzr�branch�bzr+http� bzr+https�bzr+ssh�bzr+sftp�bzr+ftp�bzr+lpNc����������������sD���t�t|��j|f|�|��ttdd��r@tjjdg��tjjdg��d�S�)N� uses_fragmentZlp)�superr ����__init__�getattr�urllib_parser����extendZnon_hierarchical)�self�url�args�kwargs)� __class__���/usr/lib/python3.6/bazaar.pyr������s����zBazaar.__init__c�������������C���sR���t�jdd�}|�j|��tjj|�r*t|��z|�jd|g|dd��W�dt|��X�dS�)zU Export the Bazaar repository at the url to the destination location z-exportzpip-�exportF)�cwd�show_stdoutN)�tempfileZmkdtemp�unpack�os�path�existsr����run_command)r����locationZtemp_dirr���r���r���r���&���s���� z Bazaar.exportc�������������C���s���|�j�d|g|d��d�S�)N�switch)r ���)r'���)r����destr����rev_optionsr���r���r���r)���5���s����z Bazaar.switchc�������������C���s���|�j�ddg|�|d��d�S�)NZpullz-q)r ���)r'���)r���r*���r+���r���r���r����update8���s����z Bazaar.updatec�������������C���sl���|�j���\}}|r"d|g}d|�}ng�}d}|�j||||�rhtjd||t|���|�jddg|�||g���d�S�)Nz-rz (to revision %s)��zChecking out %s%s to %sr���z-q)�get_url_revZcheck_destination�logger�infor���r'���)r���r*���r����revr+���Zrev_displayr���r���r����obtain;���s���� z Bazaar.obtainc����������������s,���t�t|��j��\}}|jd�r$d|�}||fS�)Nzssh://zbzr+)r���r ���r.���� startswith)r���r���r1���)r���r���r���r.���L���s���� zBazaar.get_url_revc�������������C���sl���|�j�dgd|d�}xT|j��D�]H}|j��}x:dD�]2}|j|�r.|j|�d�}|�j|�r\t|�S�|S�q.W�qW�d�S�)Nr0���F)r!���r ����checkout of branch: �parent branch: ����)r4���r5���)r'���� splitlines�stripr3����splitZ_is_local_repositoryr���)r���r(���Zurls�line�x�repor���r���r����get_urlS���s���� zBazaar.get_urlc�������������C���s���|�j�dgd|d�}|j��d�S�)NZrevnoF)r!���r ���r6������)r'���r7���)r���r(���Zrevisionr���r���r����get_revision`���s����zBazaar.get_revisionc�������������C���sT���|�j�|�}|sd�S�|j��jd�s(d|�}|j��jdd�d�}|�j|�}d|||f�S�)Nzbzr:zbzr+�-r6���r���z%s@%s#egg=%s)r=����lowerr3���Zegg_namer9���r?���)r���Zdistr(���r<���Zegg_project_nameZcurrent_revr���r���r����get_src_requiremente���s���� zBazaar.get_src_requirementc�������������C���s���dS�)z&Always assume the versions don't matchFr���)r���r*���r+���r���r���r���� check_versiono���s����zBazaar.check_version)r ���r���r ���r���r���r���r���)N)�__name__� __module__�__qualname__�name�dirnameZ repo_nameZschemesr���r���r)���r,���r2���r.���r=���r?���rB���rC���� __classcell__r���r���)r���r���r ������s���� r ���)Z __future__r���Zloggingr$���r"���Zurllibr���r����ImportErrorZurlparseZ pip.utilsr���r���Zpip.vcsr���r���Zpip.downloadr���Z getLoggerrD���r/���r ����registerr���r���r���r����<module>���s��� _