관리-도구
편집 파일: versioncontrol.cpython-38.pyc
U &?�f�W � @ s� d Z ddlZddlZddlZddlZddlZddlmZm Z ddl mZmZm Z mZmZmZmZmZmZmZmZ ddlmZ ddlmZmZ ddlmZmZmZmZm Z m!Z!m"Z"m#Z# ddl$m%Z%m&Z&m'Z'm(Z( d gZ)e�*e+�Z,eee- ee- f Z.e-e/d �dd�Z0de-e-e-ee- e-d �dd�Z1e-e-ee- d�dd�Z2G dd� de3�Z4G dd� de3�Z5edd�G dd� d��Z6G dd� d�Z7e7� Z8G dd� d�Z9dS ) z)Handles all VCS (version control) support� N)� dataclass�field)�Any�Dict�Iterable�Iterator�List�Literal�Mapping�Optional�Tuple�Type�Union)�SpinnerInterface)� BadCommand�InstallationError)� HiddenText�ask_path_exists� backup_dir�display_path�hide_url� hide_value�is_installable_dir�rmtree)�CommandArgs�call_subprocess�format_command_args�make_command�vcs��name�returnc C s, t j�| �j}|sdS |ddddgtj kS )z3 Return true if the name looks like a URL. F�http�https�file�ftp)�urllib�parse�urlsplit�schemer �all_schemes)r r) � r+ �N/opt/hc_python/lib/python3.8/site-packages/pip/_internal/vcs/versioncontrol.py�is_url2 s r- )�repo_url�rev�project_name�subdirr! c C s6 |� dd�}| � d|� d|� �}|r2|d|� �7 }|S )z� Return the URL for a VCS requirement. Args: repo_url: the remote VCS url, with any needed VCS prefix (e.g. "git+"). project_name: the (unescaped) project name. �-�_�@z#egg=z&subdirectory=)�replace)r. r/ r0 r1 �egg_project_name�reqr+ r+ r, �make_vcs_requirement_url<