/
lib64
/
python3.9
/
site-packages
/
mercurial
/
__pycache__
/
Upload File
HOME
a �+�b\b � @ sl d dl mZ d dlZd dlZd dlZd dlZd dlZd dlZd dlZd dl Z zd dl Z e j W n ey| ddl mZ Y n0 ddlmZ ddlmZ ddlmZmZmZmZmZmZmZ ddlmZmZ G d d � d e�ZG dd� de�Z G d d� de�Z!ddd� iZ"dd� Z#G dd� de�Z$d"dd�Z%G dd� de�Z&dd� Z'dd� Z(G dd� de�Z)G d d!� d!e�Z*dS )#� )�absolute_importN� )� selectors2)�_)�getattr)�encoding�error�loggingutil�pycompat� repocache�util�vfs)�cborutil�procutilc @ s4 e Zd ZdZdd� Zedd� �Zdd� Zdd � Zd S )�channeledoutputz^ Write data to out in the following format: data length (unsigned int), data c C s || _ || _d S �N)�out�channel)�selfr r � r �=/usr/lib64/python3.9/site-packages/mercurial/commandserver.py�__init__3 s zchanneledoutput.__init__c C s d| j S �Ns <%c-channel>�r �r r r r �name7 s zchanneledoutput.namec C s6 |sd S | j �t�d| jt|��| � | j �� d S )N� >cI)r �write�struct�packr �len�flush)r �datar r r r ; s zchanneledoutput.writec C s |dv rt |��t| j|�S �N)�isatty�fileno�tell�seek)�AttributeErrorr r �r �attrr r r �__getattr__B s zchanneledoutput.__getattr__N) �__name__� __module__�__qualname__�__doc__r �propertyr r r+ r r r r r + s r c @ s, e Zd ZdZdZdd� Zdd� Zdd� Zd S ) �channeledmessagea Write encoded message and metadata to out in the following format: data length (unsigned int), encoded message and metadata, as a flat key-value dict. Each message should have 'type' attribute. Messages of unknown type should be ignored. Tc C s t ||�| _|| _|| _d S r )r �_coutr � _encodefn)r r r Z encodenameZencodefnr r r r V s zchanneledmessage.__init__c K s0 t �|�}|d ur||d<