관리-도구
편집 파일: mercurial.cpython-310.pyc
o ƚReQ � @ s� d dl Z d dlZd dlZd dlmZmZ d dlmZmZ d dl m Z mZ d dlm Z d dlmZ d dlmZmZmZmZ e�e�ZG dd � d e�Ze�e� dS ) � N)�List�Optional)� BadCommand�InstallationError)� HiddenText�display_path)�make_command)�path_to_url)� RevOptions�VersionControl�(find_path_to_project_root_from_repo_root�vcsc s e Zd ZdZdZdZdZedede e fdd��Z d ed ededdfd d�Z d ed ededdfdd�Zd ed ededdfdd�Zededefdd��Zededefdd��Zededefdd��Zed edee defdd��Zededee fdd��Zededee f� fdd ��Z� ZS )!� Mercurial�hgz.hg�clone)zhg+filezhg+httpzhg+httpszhg+sshzhg+static-http�rev�returnc C s | gS )N� )r r r ��/builddir/build/BUILDROOT/alt-python310-pip-21.3.1-3.el8.x86_64/opt/alt/python310/lib/python3.10/site-packages/pip/_internal/vcs/mercurial.py�get_base_rev_args s zMercurial.get_base_rev_args�dest�url�rev_optionsNc C sP |� � }t�d||t|�� | �tddd||�� | jtdd|�� �|d� d S )NzCloning hg %s%s to %sr z --noupdate�-q�update��cwd)� to_display�logger�infor �run_commandr �to_args)�selfr r r �rev_displayr r r � fetch_new$ s � �zMercurial.fetch_newc C s� t j�|| jd�}t�� }z)|�|� |�dd|j� t |d�� }|� |� W d � n1 s0w Y W n ttjfyS } zt �d||� W Y d }~d S d }~ww tdd|�� �}| j||d� d S ) N�hgrc�paths�default�wz/Could not switch Mercurial repository to %s: %sr r r )�os�path�join�dirname�configparser�RawConfigParser�read�set�secret�open�write�OSError�NoSectionErrorr �warningr r! r ) r"