Server IP : 80.87.202.40 / Your IP : 216.73.216.169 Web Server : Apache System : Linux rospirotorg.ru 5.14.0-539.el9.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Dec 5 22:26:13 UTC 2024 x86_64 User : bitrix ( 600) PHP Version : 8.2.27 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /lib64/python3.9/site-packages/mercurial/__pycache__/ |
Upload File : |
a �+�b�Z � @ s d Z ddlmZmZ ddlZddlZddlZddlZddlZddl Z ddl Z ddlmZ ddl mZmZ ddlmZmZmZmZmZmZmZmZmZmZmZmZmZmZ ddlm Z m!Z! dd l"m#Z# ej$Z$ej%Z%e j&Z'e j(Z)d Z*d Z+dZ,dZ-d Z.d Z/dZ0e�1d�Z2dd� Z3dd� Z4dd� Z5dd� Z6i Z7d�dd�Z8G dd� de9�Z:G dd� de9�Z;G dd � d e<�Z=d!d"� Z>d�d#d$�Z?G d%d&� d&e9�Z@d�d(d)�ZAd*d+� ZBd,d-� ZCd.d/� ZDd0d1� ZEd2d3� ZFd4d5� ZGd6dd7d8d9d:�ZHg d;�ZIG d<d=� d=e9�ZJG d>d?� d?e9�ZKd�d@dA�ZLG dBdC� dCeK�ZMdDeMiZNi ZOdEdF� ZPePdG�dHdI� �ZQG dJdK� dKe9�ZRdLZSG dMdN� dNeK�ZTG dOdP� dPe9�ZUdQdR� ZVG dSdT� dTeK�ZWG dUdV� dVeW�ZXdddWddeYeZej[�\� ��dXddYdZd[� Z]d�d]d^�Z^d_d`� Z_dadb� Z`d�dcdd�Zadedf� Zbdgdh� Zcdidj� Zddkdl� Zedmdn� Zfdodp� Zgdqdr� Zhdsdt� Zidudv� Zjd�dxdy�Zkd�dzd{�Zld|d}� Zme8d~d�d�d�� �ZneYg d��d�d�� ej[�\� D � �Zoe8d�eo�d�d�� �Zpe8d�d��d�d�� �Zqe8d��d�d�� �Zre8d��d�d�� �Zse8d��d�d�� �Zte8d��d�d�� �Zue8d��d�d�� �Zve8d��d�d�� �ZwG d�d�� d�ejx�Zye8d�d��d�d�� �Zze8d�d��d�d�� �Z{e8d�d��d�d�� �Z|e8d�d��d�d�� �Z}e8d�d��d�d�� �Z~e8d�d��d�d�� �Ze8d��d�d�� �Z�e8d��d�d�� �Z�e8d�d��d�d�� �Z�e8d��d�dÄ �Z�e8d�dŃd�dDŽ �Z�e8dȃd�dʄ �Z�e ��dˡZ�e8d̃d�d΄ �Z�e8dσd�dф �Z�e8d�dӃd�dՄ �Z�d�dׄ Z�dS )�a� Handling of the new bundle2 format The goal of bundle2 is to act as an atomically packet to transmit a set of payloads in an application agnostic way. It consist in a sequence of "parts" that will be handed to and processed by the application layer. General format architecture =========================== The format is architectured as follow - magic string - stream level parameters - payload parts (any number) - end of stream marker. the Binary format ============================ All numbers are unsigned and big-endian. stream level parameters ------------------------ Binary format is as follow :params size: int32 The total number of Bytes used by the parameters :params value: arbitrary number of Bytes A blob of `params size` containing the serialized version of all stream level parameters. The blob contains a space separated list of parameters. Parameters with value are stored in the form `<name>=<value>`. Both name and value are urlquoted. Empty name are obviously forbidden. Name MUST start with a letter. If this first letter is lower case, the parameter is advisory and can be safely ignored. However when the first letter is capital, the parameter is mandatory and the bundling process MUST stop if he is not able to proceed it. Stream parameters use a simple textual format for two main reasons: - Stream level parameters should remain simple and we want to discourage any crazy usage. - Textual data allow easy human inspection of a bundle2 header in case of troubles. Any Applicative level options MUST go into a bundle2 part instead. Payload part ------------------------ Binary format is as follow :header size: int32 The total number of Bytes used by the part header. When the header is empty (size = 0) this is interpreted as the end of stream marker. :header: The header defines how to interpret the part. It contains two piece of data: the part type, and the part parameters. The part type is used to route an application level handler, that can interpret payload. Part parameters are passed to the application level handler. They are meant to convey information that will help the application level object to interpret the part payload. The binary format of the header is has follow :typesize: (one byte) :parttype: alphanumerical part name (restricted to [a-zA-Z0-9_:-]*) :partid: A 32bits integer (unique in the bundle) that can be used to refer to this part. :parameters: Part's parameter may have arbitrary content, the binary structure is:: <mandatory-count><advisory-count><param-sizes><param-data> :mandatory-count: 1 byte, number of mandatory parameters :advisory-count: 1 byte, number of advisory parameters :param-sizes: N couple of bytes, where N is the total number of parameters. Each couple contains (<size-of-key>, <size-of-value) for one parameter. :param-data: A blob of bytes from which each parameter key and value can be retrieved using the list of size couples stored in the previous field. Mandatory parameters comes first, then the advisory ones. Each parameter's key MUST be unique within the part. :payload: payload is a series of `<chunksize><chunkdata>`. `chunksize` is an int32, `chunkdata` are plain bytes (as much as `chunksize` says)` The payload part is concluded by a zero size chunk. The current implementation always produces either zero or one chunk. This is an implementation limitation that will ultimately be lifted. `chunksize` can be negative to trigger special case processing. No such processing is in place yet. Bundle processing ============================ Each part is processed in order using a "part handler". Handler are registered for a certain part type. The matching of a part to its handler is case insensitive. The case of the part type is used to know if a part is mandatory or advisory. If the Part type contains any uppercase char it is considered mandatory. When no handler is known for a Mandatory part, the process is aborted and an exception is raised. If the part is advisory and no handler is known, the part is ignored. When the process is aborted, the full bundle is still read from the stream to keep the channel usable. But none of the part read from an abort are processed. In the future, dropping the stream may become an option for channel we do not care to preserve. � )�absolute_import�divisionN� )�_)�hex�short)� bookmarks�changegroup�encoding�error�obsolete�phases�pushkey�pycompat�requirements�scmutil�streamclone�tags�url�util)� stringutil�urlutil)� repositorys >is >Bs >Is >BB� � s [^a-zA-Z0-9_:-]c C s | � dd�r| �d| � dS )z(debug regarding output stream (bundling)� devel� bundle2.debugs bundle2-output: %s N�� configbool�debug��ui�message� r"