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/__pycache__/ |
Upload File : |
o �]LbE � @ s< d dl mZ d dlZd dlZd dlZddlmZ ddlmZm Z ddl mZmZm Z mZmZmZ ddlmZ e�d�Ze�d �ZejZejZejZejZejZejZG d d� de�Ze� Zd)d d�Zdd� Zdd� Z dd� Z!d*dd�Z"d+dd�Z#efdd�Z$efdd�Z%dd� Z&dd � Z'd!d"� Z(d#d$� Z)d%d&� Z*d'd(� Z+dS ),� )�absolute_importN� )�_)�getattr�setattr)� diffhelper�encoding�error�policy�pycompat�util)�dateutil�bdiff�mpatchc @ s� e Zd ZdZdZi dd�dd�dd�dd�d d�d d�dd�dd �dd�dd�dd�dd�dd�dd�dd�dd�Zdd� Zdd� ZdS )�diffoptsa context is the number of context lines text treats all files as text showfunc enables diff -p output git enables the git extended patch format nodates removes dates from diff headers nobinary ignores binary files noprefix disables the 'a/' and 'b/' prefixes (ignored in plain mode) ignorews ignores all whitespace changes in the diff ignorewsamount ignores changes in the amount of whitespace ignoreblanklines ignores changes whose lines are all blank upgrade generates git diffs to avoid data loss Ts context� s textFs showfuncs gits nodatess nobinarys noprefixs indexr s ignorewss ignorewsamounts ignorewseols ignoreblankliness upgrades showsimilaritys worddiffs xdiffc K s~ t �|�}| j�� D ]}|�|�}|d u r| j| }t| ||� q z t| j�| _W d S ty> t � td�t �| j� ��w )Ns3 diff context lines count must be an integer, not %r) r �byteskwargs�defaults�keys�getr �int�context� ValueErrorr � InputErrorr �bytestr)�self�opts�k�v� r �1/usr/lib/python3/dist-packages/mercurial/mdiff.py�__init__L s ���zdiffopts.__init__c s6 � fdd�� j D �}t�|�}|�|� tdi |��S )Nc s i | ]}|t � |��qS r )r )�.0r �r r r � <dictcomp>] � z!diffopts.copy.<locals>.<dictcomp>r )r r � strkwargs�updater )r �kwargsr r r# r �copy\ s z diffopts.copyN)�__name__� __module__�__qualname__�__doc__�_HAS_DYNAMIC_ATTRIBUTESr r! r) r r r r r ) sL �������� � ��� ����r Tc C s\ | j r t�|d�}n | jrt�|d�}|r"| jr"t�dd|��d�}| jr,t�dd|�}|S )Nr r s +� s [ \t\r\f]+\ns \n) �ignorewsr �fixws�ignorewsamount�ignoreblanklines�re�sub�strip�ignorewseol)r �text�blankr r r �wscleanf s r: c # s� � � fdd�|D �}� fdd�|D �}dt |�}}dt |�}}||k s)||k r�||d} } }| |ksE|| dksE| |ksE|| dkrxd}| |k r_|| dkr_| d7 } | |k r_|| dksQ| |k rw|| dkrw| d7 } | |k rw|| dksin(| |k r�|| dkr�|| dkr�| d7 } | d7 } | |k r�|| dkr�|| dks�| | | | || || g|fV | }| }||k s)||k s)d S d S )Nc � g | ]}t � |�rd pd�qS �r r �r: �r"