a —+«bE ã@sHddlmZddlmZddlmZmZdZdd„Zdd „Z d d „Z d S) é)Úabsolute_importé)Ú_)ÚerrorÚpycompats\ No newline at end of file c Csä|t|ƒ}|t|ƒ}t||ƒ}|dkr,qàt |¡D]¦} | ¡} | sTt tdƒ¡‚| tkrjt |||ƒq6| dksz| dkr‚d| } |  | ¡|   d¡rª|  | dd…¡q6|   d ¡rÀ|  | ¡q6|  | dd…¡|  | ¡q6qdS) 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.) rsincomplete hunkó ó ó ó+rNó-) ÚlenÚmaxrÚxrangeÚreadlinerZ ParseErrorrÚMISSING_NEWLINE_MARKERÚ fixnewlineÚappendÚ startswith) ÚfpÚhunkZlenaZlenbÚaÚbZtodoaZtodobZnumÚiÚs©rú:/usr/lib64/python3.9/site-packages/mercurial/diffhelper.pyÚaddliness*        rcCsd|d}| d¡r |dd…}n |dd…}| d¡rF|dd…|d<| d¡rX||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ÚlZhlinerrrr6s    rcCs^t|ƒ}t|ƒ}|||ks$|dkr(dSt |¡D]&}||dd…|||kr2dSq2dS)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)rrZbstartÚalenZblenrrrrÚtesthunkFsr"N) Z __future__rZi18nrÚrrrrrr"rrrrÚs  "