Server : Apache System : Linux iad1-shared-b8-43 6.6.49-grsec-jammy+ #10 SMP Thu Sep 12 23:23:08 UTC 2024 x86_64 User : dh_edsupp ( 6597262) PHP Version : 8.2.26 Disable Function : NONE Directory : /lib/python3/dist-packages/mercurial/pure/__pycache__/ |
Upload File : |
o �]LbE � @ sb d dl mZ d dlZddlmZ ejZG dd� de�Zdd� Z d d � Z dd� Zd d� Zdd� Z dS )� )�absolute_importN� )�pycompatc @ s e Zd ZdZdS )�mpatchErrorz+error raised when a delta cannot be decodedN)�__name__� __module__�__qualname__�__doc__� r r �7/usr/lib/python3/dist-packages/mercurial/pure/mpatch.pyr s r c C sn |r5|� � }|d |kr&|�|d | |d | f� | �||d f� d S | �|� ||d 8 }|sd S d S )Nr � )�pop�append)�dst�src�l�fr r r �_pull s �r c C s, | � |� | �|�}| � |� | �|� dS )zXmove count bytes from src to dest The file pointer is left at the end of dest. N)�seek�read�write)�m�destr �count�bufr r r �_move+ s r c C s8 |}t |�D ]\}}t| |||� ||7 }q|| |fS )N)�reversedr )r r �list�startr �pr r r �_collect6 s r c C s� |s| S dd� |D �}t |�}t| �| }|| | }d|}}|s$| S t� }|�| � t| �|fg} || } |�| � |D ]}|�|� q>|D ]l}t| �dkr\||}}t||| �g} g } | | }d}| |k r�|�| � zt�d|�d��\}}}W n tj y� t d��w t| | || � tg | || � | �|| d f� | |d 7 } |}| |k sh| � t| �� qHt||| �}|�|d � |�|d �S ) Nc S s g | ]}t |��qS r )�len)�.0�xr r r � <listcomp>B s zpatches.<locals>.<listcomp>r � � >lll� � patch cannot be decodedr )�sumr! �stringior r r �struct�unpackr �errorr r r �extendr )�a�bins�plens�pl�bl�tl�b1�b2r �frags�posr �plen�new�end�last�p1�p2r �tr r r �patches>