o ö]LbE ã@sHddlmZddlmZddlmZmZdZdd„Zdd „Z d d „Z d S) é)Úabsolute_importé)Ú_)ÚerrorÚpycompats\ No newline at end of file c Csä |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!Ús  "