AlkantarClanX12
Current Path : /opt/cloudlinux/venv/lib/python3.11/site-packages/git/__pycache__/ |
Current File : //opt/cloudlinux/venv/lib/python3.11/site-packages/git/__pycache__/cmd.cpython-311.pyc |
� �܋f�� � �2 � d dl mZ d dlZd dlmZ d dlZd dlZd dlZd dlZd dl m Z mZmZm Z d dl Z d dlZd dlmZ d dlmZmZmZmZmZ d dlmZ d dlmZmZmZmZ d d lmZm Z m!Z!m"Z" d dl#m$Z$m%Z% d dl&m'Z'm(Z(m)Z)m*Z*m+Z+m,Z,m-Z-m.Z.m/Z/m0Z0m1Z1m2Z2m3Z3m4Z4m5Z5m6Z6 d d l7m8Z8m9Z9m:Z: e1rd dl;m<Z< d dl=m>Z> h d�Z? ej@ eA� � ZBeB�C ejD � � � � dZE d3d4d!�ZFd5d$�ZGd6d7d+�ZHd6d8d/�ZId0ZJer eJe jK z nd ZL G d1� d2e$� � ZMdS )9� )�annotationsN)�contextmanager)�call�Popen�PIPE�DEVNULL)�dedent)�defenc�force_bytes�safe_decode�is_posix�is_win)�CommandError)� is_cygwin_git�cygpath�expand_path�remove_password_if_present� )�GitCommandError�GitCommandNotFound�UnsafeOptionError�UnsafeProtocolError)� LazyMixin�stream_copy)�Any�AnyStr�BinaryIO�Callable�Dict�IO�Iterator�List�Mapping�Sequence� TYPE_CHECKING�TextIO�Tuple�Union�cast�overload)�PathLike�Literal�TBD)�Repo)� DiffIndex> �env�shell�istream� as_process�with_stdout� output_stream�max_chunk_size�with_exceptions�stdout_as_string�kill_after_timeout�universal_newlines�with_extended_output�strip_newline_in_stdout)�GitT�process�'Git.AutoInterrupt' | Popen�stdout_handler�sUnion[None, Callable[[AnyStr], None], Callable[[List[AnyStr]], None], Callable[[bytes, 'Repo', 'DiffIndex'], None]]�stderr_handler�EUnion[None, Callable[[AnyStr], None], Callable[[List[AnyStr]], None]]� finalizer�KUnion[None, Callable[[Union[subprocess.Popen, 'Git.AutoInterrupt']], None]]�decode_streams�boolr9 �Union[None, float]�return�Nonec �R � dd �}t | d� � rQt d| � � } t | j dd� � }| j r| j j nd}| j r| j j nd} n4t t | � � } t | dd� � }| j }| j } t |t t f� � s|� � � }g } |r| � d||f� � | r| � d| |f� � g }| D ]Q\ }} }t j |||| ||f�� � }d|_ |� � � |� |� � �R|D ]�}|� |�� � |� � � r�t | t$ j � � r| � � � nt+ d|� d�� � �|rQd|� d�}|s>t | t, � � r)t t. |� � }|� � � } ||� � ��|r || � � S dS )a� Registers for notifications to learn that process output is ready to read, and dispatches lines to the respective line handlers. This function returns once the finalizer returns :return: result of finalizer :param process: subprocess.Popen instance :param stdout_handler: f(stdout_line_string), or None :param stderr_handler: f(stderr_line_string), or None :param finalizer: f(proc) - wait for proc to finish :param decode_streams: Assume stdout/stderr streams are binary and decode them before pushing their contents to handlers. Set it to False if `universal_newline == True` (then streams are in text-mode) or if decoding must happen later (i.e. for Diffs). :param kill_after_timeout: float or None, Default = None To specify a timeout in seconds for the git command, after which the process should be killed. �cmdline� List[str]�name�str�stream�Union[BinaryIO, TextIO]� is_decoderG �handler�0Union[None, Callable[[Union[bytes, str]], None]]rI rJ c � � |D ]N}|rJ|r=t |t � � sJ �|� t � � } ||� � �C ||� � �On~# t $ rq}t � d|�dt | � � � d|��� � dt |� � vr&t d|� d�gt | � � z |� � |�Y d }~nd }~ww xY w|� � � d S # |� � � w xY w)NzPumping z of cmd(z) failed due to: zI/O operation on closed file�<z-pump>)� isinstance�bytes�decoder � Exception�log�errorr rO r �close)rL rN rP rR rS �line�line_str�exs �X/builddir/build/BUILD/cloudlinux-venv-1.0.6/venv/lib/python3.11/site-packages/git/cmd.py�pump_streamz*handle_process_output.<locals>.pump_stream~ sF � � �� &� &��� &� � &�)�$��6�6�6�6�6�#'�;�;�v�#6�#6�����)�)�)�)���� � � �� &�� � i� i� i��I�I�m��m�m�1K�G�1T�1T�m�m�gi�m�m�n�n�n�-�S��W�W�<�<�"�$4��$4�$4�$4�#5�8R�SZ�8[�8[�#[�]_�`�`�fh�h� =�<�<�<�<����� i���� �L�L�N�N�N�N�N��F�L�L�N�N�N�N���s1 �AA �C( � C�A'C �C( � C�C( �(C>�proc�Git.AutoInterrupt�args� N�stdout�stderr)�targetre T)�timeoutzKThread join() timed out in cmd.handle_process_output(). kill_after_timeout=z secondsz?error: process killed because it timed out. kill_after_timeout=)rL rM rN rO rP rQ rR rG rS rT rI rJ )�hasattrr) �getattrrc rg rh r rW �tuple�list�split�append� threading�Thread�daemon�start�join�is_aliver= � AutoInterrupt� _terminate�RuntimeErrorr rO �encode)r>