
    	^c                     4    d dl mZ d dlmZ dZd Zd Zd ZdS )   )_)errors   \ No newline at end of file
c                    	 |t          |          z
  }|t          |          z
  }t          ||          }|dk    rd	S t          |          D ]}	|                                 }
|
s!t	          j        t          d                    |
t          k    rt          |||           W|
dk    s|
dk    rd|
z   }
|	                    |
           |

                    d          r|	                    |
dd	                    |

                    d
          r|	                    |
           |	                    |
dd	                    |	                    |
           \)a  Read 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.)
    T    s   incomplete hunk   
   
       +r   N   -)lenmaxrangereadliner   
ParseErrorr   MISSING_NEWLINE_MARKER
fixnewlineappend
startswith)fphunklenalenbabtodoatodobnumiss              6/usr/lib/python3/dist-packages/mercurial/diffhelper.pyaddlinesr!      sQ   s1vvs1vv%!88Es 	 	AA >&q);'<'<===***4A&&&EzzQ'\\ 1HKKNNN||D!! 122d## 1221    c                     | d         }|                     d          r|dd         }n
|dd         }|                    d          r|dd         |d<   |                    d          r||d<   || d<   dS )zEFix up the last lines of a and b when the patch has no newline at EOFr   N)r	   r
   r   )r	   r   )endswithr   )r   r   r   lhlines        r    r   r   4   s    RAzz' #2##2#%% abb	"%% "DHHHr"   c                     t          |           }t          |          }|||z
  k    s|dk     rdS t          |          D ]"}| |         dd         |||z            k    r dS #dS )zCompare 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.
    r   Fr   NT)r   r   )r   r   bstartalenblenr   s         r    testhunkr-   D   s{     q66Dq66DdVmvzzu4[[  Q48qV}$$55 %4r"   N)i18nr    r   r   r!   r   r-    r"   r    <module>r1      sw               ;   D       r"   