^c4ddlmZddlmZdZdZdZdZdS))_)errors\ No newline at end of file c |t|z }|t|z }t||}|dkrd St|D] } |} | s!t jt d| tkrt|||W| dks| dkrd| z} | | | dr| | dd | d r| | | | dd | | \) 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.) Tsincomplete hunk   +rN-) lenmaxrangereadliner ParseErrorrMISSING_NEWLINE_MARKER fixnewlineappend startswith) fphunklenalenbabtodoatodobnumiss 6/usr/lib/python3/dist-packages/mercurial/diffhelper.pyaddlinesr!sQs1vv s1vv % !88 Es  A A >&q);'<'<===***4A&&&EzzQ'\\1H KKNNN||D!! 122d##  122 1c|d}|dr |dd}n |dd}|dr |dd|d<|dr||d<||d<dS)zEFix up the last lines of a and b when the patch has no newline at EOFrN)r r r)r r )endswithr)rrrlhlines r rr4s RAzz'#2##2#  %%abb "  %%"DHHHr"ct|}t|}|||z ks|dkrdSt|D]"}||dd|||zkrdS#dS)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. rFrNT)r r)rrbstartalenblenrs r testhunkr-Ds{ q66D q66D dVmvzzu 4[[ Q48qV} $ $55 % 4r"N)i18nrrrr!rr-r"r r1sw;D        r"