OwlCyberSecurity - MANAGER
Edit File: versioncontrol.cpython-312.pyc
� ���g�W � �� � 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) ejT e+� Z,eee- ee- f Z.d e-de/fd�Z0 d!d e-de-de-dee- de-f d�Z1de-de-dee- fd�Z2 G d� de3� Z4 G d� de3� Z5 ed�� G d� d� � Z6 G d� d� Z7 e7� Z8 G d� d � Z9y)"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 � � t j j | � j }|sy|g d�t j z v S )z3 Return true if the name looks like a URL. F)�http�https�file�ftp)�urllib�parse�urlsplit�schemer �all_schemes)r r* s �O/opt/hc_python/lib/python3.12/site-packages/pip/_internal/vcs/versioncontrol.py�is_urlr- 2 s9 � � �\�\� "� "�4� (� /� /�F����5����G�G�G� �repo_url�rev�project_name�subdirc �R � |j dd� }| � d|� d|� �}|r|d|� �z }|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/ r0 r1 r2 �egg_project_name�reqs r, �make_vcs_requirement_urlr: <