\x89\x50\x4E\x47\x0D\x0A\x1A\x0A PNG  \x89\x50\x4E\x47\x0D\x0A\x1A\x0A ó 1è3\c@@sddlmZddlZddlZeZgZejddkrÿddlZddlZddl Z ddl Z ddl Z dej j fd„ƒYZd„ZdZdejjfd „ƒYZed „ejDƒƒsÿejjdeƒƒqÿndS( i(tabsolute_importNithgpathentryfindercB@seZdZdd„ZRS(s8A sys.meta_path finder that uses a custom module loader.cC@sú|jd ƒsdS|jdƒr&dS|jdƒr9dS|jdƒrLdS|jdƒr_dSd}xEtjD]:}||kr‡qon|j||d|ƒ}|roPqoqoW|s·dSt|j|jƒ}t|j d ƒrí||j _ n ||_ |S( Ns mercurial.shgext.s hgext3rd.smercurial.cext.smercurial.thirdpartysmercurial.zstdshgext.fsmonitor.pywatchmanttargettloader(s mercurial.shgext.s hgext3rd.( t startswithtNonetsyst meta_patht find_specthgloadertnametoriginthasattrR(tselftfullnametpathRtspectfinderR((s8/usr/lib64/python2.7/site-packages/mercurial/__init__.pyRs0  N(t__name__t __module__t__doc__RR(((s8/usr/lib64/python2.7/site-packages/mercurial/__init__.pyRsc #@st}‡fd†‰‡‡‡fd†}‡fd†}xÝtˆƒD]Ï\‰}|jtjkrÄ|j}|dd!d"kr‹|VqFn|dd#kr¦|VqFn|jd d |jƒVqFn|jtjkrB|jd krBtd „ˆˆdˆ!DƒƒrBgˆˆdˆ!D]}|j^qddgkrBt }n|jtj kr|rt}|dkrw|VqFn|j \}} d} x}t j t j| ƒjƒD]`}|jt jtjfkrÏq¨n|jd|| |j dfd|| |jdfƒVq¨WqFn|jtjkrˆˆddƒr|j} | d$krˆˆˆddƒ rˆ|dƒ} | d!k r || ƒq q| d%kr戈ddƒræxctdƒD]+} || ƒ}|d!k r´||ƒq´q´Wq| d&kr|jd | d ƒVqFqn|VqFWd!S('sTransform a stream of tokens from raw to Python 3. It is called by the custom module loading machinery to rewrite source/tokens between source decoding and compilation. Returns a generator of possibly rewritten tokens. The input token list may be mutated as part of processing. However, its changes do not necessarily match the output token stream. REMEMBER TO CHANGE ``BYTECODEHEADER`` WHEN CHANGING THIS FUNCTION OR CACHED FILES WON'T GET INVALIDATED PROPERLY. c@sDy+ˆ|jtjko)ˆ|j|kSWntk r?tSXdS(s;Assert that tokens[j] is an OP with one of the given valuesN(ttypettokentOPtstringt IndexErrortFalse(tjto(ttokens(s8/usr/lib64/python2.7/site-packages/mercurial/__init__.pyt_isop]s+ c@sºd}x­tˆdtˆƒƒD]’}ˆ|dddƒrX|d8}|dkr²d Sq |dkrh|Sˆ|ddd ƒrŠ|d7}q ˆ|d ƒr |dkr |d8}q q Wd S( sâFind arg n of a call expression (start at 0) Returns index of the first token of that argument, or None if there is not that many arguments. Assumes that token[i + 1] is '('. iit)t]t}it(t[t{t,N(trangetlenR(tntnestedR(RtiR(s8/usr/lib64/python2.7/site-packages/mercurial/__init__.pyt_findargnofcallds      c@sRˆ|}|jtjkrN|jjdƒrN|jdd|jƒˆ|¯sitfromt __future__smercurial.pycompatsS; from mercurial.pycompat import delattr, getattr, hasattr, setattr, open, unicode tstartitendR"tgetattrtsetattrR t safehasattrt.tencodetdecodet iteritemst itervaluesiN(s'''s"""(R,R-(R:R;R R<(R>R?(R@RA(Rt enumerateRRR.RR/R3talltTruetNEWLINER8ttokenizetiotBytesIOtreadlinetENCODINGt ENDMARKERR9RR&(RRt futureimplineR+R1tttsR5trtctltfntarg1idxtargntargidx((RR*Rs8/usr/lib64/python2.7/site-packages/mercurial/__init__.pyt replacetokensKs` !!3  " 4%        sHG R cB@s)eZdZd„Zd„Zd„ZRS(sCustom module loader that transforms source code. When the source code is converted to a code object, we transform certain patterns to be Python 3 compatible. This allows us to write code that is natively Python 2 and compatible with Python 3 without making the code excessively ugly. We do this by transforming the token stream between parse and compile. Implementing transformations invalidates caching assumptions made by the built-in importer. The built-in importer stores a header on saved bytecode files indicating the Python/bytecode version. If the version changes, the cached bytecode is ignored. The Mercurial transformations could change at any time. This means we need to check that cached bytecode was generated with the current transformation code or there could be a mismatch between cached bytecode and what would be generated from this class. We supplement the bytecode caching layer by wrapping ``get_data`` and ``set_data``. These functions are called when the ``SourceFileLoader`` retrieves and saves bytecode cache files, respectively. We simply add an additional header on the file. As long as the version in this file is changed when semantics change, cached bytecode should be invalidated when transformations change. The added header has the form ``HG``. That is a literal ``HG`` with 2 binary bytes indicating the transformation version. cC@sƒtt|ƒj|ƒ}|jttjjƒƒs7|S|dd!dkrYtdƒ‚n|dd!t kr{tdƒ‚n|dS(NiitHGs no hg headerishg header version mismatch( tsuperR tget_datatendswithttuplet importlibt machinerytBYTECODE_SUFFIXEStOSErrortBYTECODEHEADER(R Rtdata((s8/usr/lib64/python2.7/site-packages/mercurial/__init__.pyRYscO@sG|jttjjƒƒr(t|}ntt|ƒj||||ŽS(N( RZR[R\R]R^R`RXR tset_data(R RRatargstkwargs((s8/usr/lib64/python2.7/site-packages/mercurial/__init__.pyRbs cC@s[tj|ƒ}tj|jƒ}tjtt|ƒ|jƒƒ}tt |ƒj ||ƒS(s0Perform token transformation before compilation.( RGRHRFRIt untokenizeRVtlistR RXR tsource_to_code(R RaRtbufR((s8/usr/lib64/python2.7/site-packages/mercurial/__init__.pyRgs!(RRRRYRbRg(((s8/usr/lib64/python2.7/site-packages/mercurial/__init__.pyR äs  cc@s|]}t|tƒVqdS(N(t isinstanceR(R4tx((s8/usr/lib64/python2.7/site-packages/mercurial/__init__.pys )s(R7RRthgdemandimportt demandimportt__all__t version_infoR\t importlib.abcRGRRFtabctMetaPathFinderRRVR`R]tSourceFileLoaderR tanyRtinsert(((s8/usr/lib64/python2.7/site-packages/mercurial/__init__.pyts        / —E