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 : /usr/lib64/python3.9/site-packages/mercurial/__pycache__/ |
Upload File : |
a �+�b�R � @ s( d dl mZ d dlZd dlZd dlZd dlZd dlZddlmZ ddl m Z ddlmZm Z mZm Z mZmZmZmZ ddlmZ ejZejZejZdd � ZG d d� de�Zdd � Zdd� Zdd� ZG dd� de j�Z dd� Z!G dd� dej"�Z#G dd� de j$j%�Z&dd� Z'dej(fdd�Z)d dd�Z*dS )!� )�absolute_importN� )�_)�getattr)�bundle2�error�httpconnection�pycompat�statichttprepo�url�util�wireprotov1peer)�urlutilc C sz t �|�d }|t|d � td� }g }d}t �dt| �|�D ]4}|d7 }|�|t|� t �| ||| � �f� q@|S )ac Encode a string value into multiple HTTP headers. ``value`` will be encoded into 1 or more HTTP headers with the names ``header-<N>`` where ``<N>`` is an integer starting at 1. Each header name + value will be at most ``limit`` bytes long. Returns an iterable of 2-tuples consisting of header names and values as native strings. z-%sZ000s : r r )r �strurl�lenZxrange�append�str)�value�header�limitZfmtZvaluelen�result�n�i� r �8/usr/lib64/python3.9/site-packages/mercurial/httppeer.py�encodevalueinheaders$ s *r c @ s8 e Zd Zdd� Zedd� �Zd dd�Zejfdd �Z dS )� _multifilec G s6 |D ] }t �|d�stdt|�|��q|| _d| _d S )N� lengthsO _multifile only supports file objects that have a length but this one does not:r )r �safehasattr� ValueError�type� _fileobjs�_index)�selfZfileobjs�fr r r �__init__B s �z_multifile.__init__c C s t dd� | jD ��S )Nc s s | ]}|j V qd S �N)�length��.0r$ r r r � <genexpr>P � z$_multifile.length.<locals>.<genexpr>)�sumr! �r# r r r r'