HEX
Server: Apache
System: Linux pdx1-shared-a1-38 6.6.104-grsec-jammy+ #3 SMP Tue Sep 16 00:28:11 UTC 2025 x86_64
User: mmickelson (3396398)
PHP: 8.1.31
Disabled: NONE
Upload Files
File: //usr/lib/python3/dist-packages/mercurial/__pycache__/diffhelper.cpython-310.pyc
o

�]LbE	�@sHddlmZddlmZddlmZmZdZdd�Zdd	�Z	d
d�Z
dS)
�)�absolute_import�)�_)�error�pycompats\ No newline at end of file
cCs�	|t|�}|t|�}t||�}|dkrd	St�|�D]S}	|��}
|
s,t�td���|
tkr7t	|||�q|
dks?|
dkrCd|
}
|�
|
�|
�d�rW|�
|
dd	��q|
�d
�rb|�
|
�q|�
|
dd	��|�
|
�qq)aRead lines from fp into the hunk

    The hunk is parsed into two arrays, a and b. a gets the old state of
    the text, b gets the new state. The control char from the hunk is saved
    when inserting into a, but not b (for performance while deleting files.)
    Trsincomplete hunk�
�
� �+rN�-)�len�maxr�xrange�readliner�
ParseErrorr�MISSING_NEWLINE_MARKER�
fixnewline�append�
startswith)�fp�hunk�lena�lenb�a�b�todoa�todob�num�i�s�r �6/usr/lib/python3/dist-packages/mercurial/diffhelper.py�addliness.



�r"cCsd|d}|�d�r|dd�}n|dd�}|�d�r#|dd�|d<|�d�r,||d<||d<dS)zEFix up the last lines of a and b when the patch has no newline at EOF���rN���)r	r
r)r	r)�endswithr)rrr�l�hliner r r!r6s


rcCs^t|�}t|�}|||ks|dkrdSt�|�D]}||dd�|||kr,dSqdS)z�Compare the lines in a with the lines in b

    a is assumed to have a control char at the start of each line, this char
    is ignored in the compare.
    rFrNT)rrr)rr�bstart�alen�blenrr r r!�testhunkFs�r+N)�
__future__r�i18nr�rrrr"rr+r r r r!�<module>s"