\x89\x50\x4E\x47\x0D\x0A\x1A\x0A PNG  \x89\x50\x4E\x47\x0D\x0A\x1A\x0A  13\c@@sddlmZddlZddlZddlZddlZddlmZddlm Z m Z m Z m Z m Z mZe jdZdZeedeZd Zd Zd Ze\ZZd Zd ZdZeeddpeZd,Zd-Z dZ!dZ"dZ#de#ddZ$dZ%dZ&dZ'eede'Z'dZ(dZ)d Z*d!Z+d"e,fd#YZ-d$e-fd%YZ.d&e,fd'YZ/d(ej0ej1fd)YZ2d*e-fd+YZ3dS(.i(tabsolute_importNi(t_(terrortnodetpolicytpycompattutiltvfstparserscC@s(|jddjddjddS(sM >>> _encodedir(b'data/foo.i') 'data/foo.i' >>> _encodedir(b'data/foo.i/bla.i') 'data/foo.i.hg/bla.i' >>> _encodedir(b'data/foo.i.hg/bla.i') 'data/foo.i.hg.hg/bla.i' >>> _encodedir(b'data/foo.i\ndata/foo.i/bla.i\ndata/foo.i.hg/bla.i\n') 'data/foo.i\ndata/foo.i.hg/bla.i\ndata/foo.i.hg.hg/bla.i\n' s.hg/s.hg.hg/s.i/s.i.hg/s.d/s.d.hg/(treplace(tpath((s5/usr/lib64/python2.7/site-packages/mercurial/store.pyt _encodedirs   t encodedircC@s8d|kr|S|jddjddjddS(s >>> decodedir(b'data/foo.i') 'data/foo.i' >>> decodedir(b'data/foo.i.hg/bla.i') 'data/foo.i/bla.i' >>> decodedir(b'data/foo.i.hg.hg/bla.i') 'data/foo.i.hg/bla.i' s.hg/s.d.hg/s.d/s.i.hg/s.i/s.hg.hg/(R (R ((s5/usr/lib64/python2.7/site-packages/mercurial/store.pyt decodedir/s   cc@stgdD]}t|^q}xtdD] }|Vq,WxtddD] }|VqKWx|D] }|VqaWdS(s characters that are problematic for filesystems * ascii escapes (0..31) * ascii hi (126..255) * windows specials these characters will be escaped by encodefunctions u\:*?"<>|i i~iN(tordtrange(txt winreserved((s5/usr/lib64/python2.7/site-packages/mercurial/store.pyt _reserved?s    c@s#d}tj}tt|td}tttdtdd}td|Dx%tD]}d|||>> enc, dec = _buildencodefun() >>> enc(b'nothing/special.txt') 'nothing/special.txt' >>> dec(b'nothing/special.txt') 'nothing/special.txt' >>> enc(b'HELLO') '_h_e_l_l_o' >>> dec(b'_h_e_l_l_o') 'HELLO' >>> enc(b'hello:world?') 'hello~3aworld~3f' >>> dec(b'hello~3aworld~3f') 'hello:world?' >>> enc(b'the\x07quick\xADshot') 'the~07quick~adshot' >>> dec(b'the~07quick~adshot') 'the\x07quick\xadshot' RitAtZics@s|]}||fVqdS(N((t.0R((s5/usr/lib64/python2.7/site-packages/mercurial/store.pys mss~%02xc3@s}d}xp|t|krxxWtjddD]=}y#||||!V||7}PWq.tk rjq.Xq.Wtq WdS(Niii(tlenRtxrangetKeyError(tstitl(tdmap(s5/usr/lib64/python2.7/site-packages/mercurial/store.pytdecodevs  c@s>djgtjt|D]}|||d!^qS(Nti(tjoinRRR(Rtc(tcmap(s5/usr/lib64/python2.7/site-packages/mercurial/store.pyts c@sdjt|S(NR(Rtlist(R(R(s5/usr/lib64/python2.7/site-packages/mercurial/store.pyR"s( RtbytechrR#tmapRRtdictRtlowert iteritems(tetxchrtasciistrtcapitalsRtktv((R!RRs5/usr/lib64/python2.7/site-packages/mercurial/store.pyt_buildencodefunPs %$ cC@stt|S(s~ >>> encodefilename(b'foo.i/bar.d/bla.hg/hi:world?/HELLO') 'foo.i.hg/bar.d.hg/bla.hg.hg/hi~3aworld~3f/_h_e_l_l_o' (t _encodefnameR (R((s5/usr/lib64/python2.7/site-packages/mercurial/store.pytencodefilenamescC@stt|S(s~ >>> decodefilename(b'foo.i.hg/bar.d.hg/bla.hg.hg/hi~3aworld~3f/_h_e_l_l_o') 'foo.i/bar.d/bla.hg/hi:world?/HELLO' (R t _decodefname(R((s5/usr/lib64/python2.7/site-packages/mercurial/store.pytdecodefilenamesc@stj}tgtjdD]}||||f^qx%tD]}d|||>> f = _buildlowerencodefun() >>> f(b'nothing/special.txt') 'nothing/special.txt' >>> f(b'HELLO') 'hello' >>> f(b'hello:world?') 'hello~3aworld~3f' >>> f(b'the\x07quick\xADshot') 'the~07quick~adshot' is~%02xRRic@s-djgtj|D]}|^qS(NR(RRt iterbytestr(RR (R!(s5/usr/lib64/python2.7/site-packages/mercurial/store.pyt lowerencodes(RR$R&RRRRR'(R*RR5((R!s5/usr/lib64/python2.7/site-packages/mercurial/store.pyt_buildlowerencodefuns :& R5tauxtcontprntnultcomtlptcC@sgx`t|D]R\}}|s%q n|rg|ddkrgdt|dd!|d}||||' or ord(c) <= 31 are *not* encoded here. Additionally encodes space or period at the beginning, if dotencode is True. Parameter path is assumed to be all lowercase. A segment only needs encoding if a reserved name appears as a basename (e.g. "aux", "aux.foo"). A directory or file named "foo.aux" doesn't need encoding. >>> s = b'.foo/aux.txt/txt.aux/con/prn/nul/foo.' >>> _auxencode(s.split(b'/'), True) ['~2efoo', 'au~78.txt', 'txt.aux', 'co~6e', 'pr~6e', 'nu~6c', 'foo~2e'] >>> s = b'.com1com2/lpt9.lpt4.lpt1/conprn/com0/lpt0/foo.' >>> _auxencode(s.split(b'/'), False) ['.com1com2', 'lp~749.lpt4.lpt1', 'conprn', 'com0', 'lpt0', 'foo~2e'] >>> _auxencode([b'foo. '], True) ['foo.~20'] >>> _auxencode([b' .foo'], True) ['~20.foo'] is. s~%02xit.iiit9t1i(t enumerateRtfindRt_winres3t_winres4(R t dotencodeRtnRtec((s5/usr/lib64/python2.7/site-packages/mercurial/store.pyt _auxencodes$  2 'ixiicC@stjtj|j}t|djd}t||}|d}tj j |\}}g}d} x|d D]} | t } | ddkr| d d} n| dkrt | } n$| dt | } | t krPn|j| | } qWdj|} t | dkr4| d7} nd| ||}tt |}|dkr|| }d| |||}n|S( Nit/iis. Risdh/(Rthexthashlibtsha1tdigestR5tsplitRGtosR tsplitextt _dirprefixlenRt_maxshortdirslentappendRt_maxstorepathlen(R RDRLtletpartstbasenamet_roottexttsdirstsdirslentptdtttdirstrest spacelefttfiller((s5/usr/lib64/python2.7/site-packages/mercurial/store.pyt _hashencodes6         cC@sat|}t|jd}djt||}t|tkr]t||}n|S(seencodes path with a length limit Encodes all paths that begin with 'data/', according to the following. Default encoding (reversible): Encodes all uppercase letters 'X' as '_x'. All reserved or illegal characters are encoded as '~xx', where xx is the two digit hex code of the character (see encodefilename). Relevant path components consisting of Windows reserved filenames are masked by encoding the third character ('aux' -> 'au~78', see _auxencode). Hashed encoding (not reversible): If the default-encoded path is longer than _maxstorepathlen, a non-reversible hybrid hashing of the path is done instead. This encoding uses up to _dirprefixlen characters of all directory levels of the lowerencoded path, but not more levels than can fit into _maxshortdirslen. Then follows the filler followed by the sha digest of the full path. The filler is the beginning of the basename of the lowerencoded path (the basename is everything after the last path separator). The filler is as long as possible, filling in characters from the basename until the encoded path has _maxstorepathlen characters (or all chars of the basename have been taken). The extension (e.g. '.i' or '.d') is preserved. The string 'data/' at the beginning is replaced with 'dh/', if the hashed encoding was used. RH(R R0RMRRGRRSRb(R RDtefR_((s5/usr/lib64/python2.7/site-packages/mercurial/store.pyt _hybridencodes  cC@s{t|}t|tkr+t|tSt|jd}djt|t}t|tkrwt|tS|S(NRH( R RRSRbtTrueR0RMRRG(R tdeRcR_((s5/usr/lib64/python2.7/site-packages/mercurial/store.pyt _pathencode&s   t pathencodecC@s t|tS(N(RdtFalse(tf((s5/usr/lib64/python2.7/site-packages/mercurial/store.pyt_plainhybridencode2scC@sRy4|jj}dtj@d|@kr3d}nWntk rMd}nX|S(Ni(tstattst_modeRtumasktNonetOSError(Rtmode((s5/usr/lib64/python2.7/site-packages/mercurial/store.pyt _calcmode5s   s^narrowspec data meta 00manifest.d 00manifest.i 00changelog.d 00changelog.i phaseroots obsstorecC@s|tjko|ddkS(Nis.is.d(s.is.d(RltS_IFREG(Rjtkindtst((s5/usr/lib64/python2.7/site-packages/mercurial/store.pytisrevlogCst basicstorecB@szeZdZdZdZedZd dZdZ d dZ dZ dZ d Z d Zd ZRS( s&base class for local repository storescC@sa||}|j|_t||_|j|_||_tj|t|_|j|_ dS(N( tbaseR Rrt createmodetrawvfstvfsmodt filtervfsR Rtopener(tselfR tvfstypeR((s5/usr/lib64/python2.7/site-packages/mercurial/store.pyt__init__Hs    cC@s|jdt|S(NRH(R R (R~Rj((s5/usr/lib64/python2.7/site-packages/mercurial/store.pyRQscC@s*|j}|r |d|7}nt|jd}g}|jj|r|g}|jj}x|r|j} x|| dtD]\} } } | d| } || | | rtj| |}|j t ||| j fq| t j kr|r|j | qqWqcWn|j|S(s!yields (unencoded, encoded, size)RHiRl(R RRztisdirtreaddirtpopReRtpconvertRRR tst_sizeRltS_IFDIRtsort(R~trelpathtrecurset filefilterR tstriplenRtvisitRR[RjRtRutfpRE((s5/usr/lib64/python2.7/site-packages/mercurial/store.pyt_walkTs&     "" cC@s |jdt|jdtS(Ntdatatmeta(RRe(R~tmatcher((s5/usr/lib64/python2.7/site-packages/mercurial/store.pyt datafilesjscC@st|jdtS(NR(treversedRRi(R~((s5/usr/lib64/python2.7/site-packages/mercurial/store.pyttopfilesmscc@s?x|j|D] }|VqWx|jD] }|Vq,WdS(syields (unencoded, encoded, size) if a matcher is passed, storage files of only those tracked paths are passed with matches the matcher N(RR(R~RR((s5/usr/lib64/python2.7/site-packages/mercurial/store.pytwalkqs cC@sdgtjS(Ntrequires(t_dataRM(R~((s5/usr/lib64/python2.7/site-packages/mercurial/store.pytcopylist}scC@sdS(N((R~ttr((s5/usr/lib64/python2.7/site-packages/mercurial/store.pytwritescC@sdS(N((R~((s5/usr/lib64/python2.7/site-packages/mercurial/store.pytinvalidatecachesscC@sdS(N((R~tfn((s5/usr/lib64/python2.7/site-packages/mercurial/store.pyt markremovedscC@s[djd|f}|jj|dr/tS|jdsK|d}n|jj|S(s!Checks if the store contains pathRHRs.i(RRtexistsRetendswith(R~R ((s5/usr/lib64/python2.7/site-packages/mercurial/store.pyt __contains__s  N(t__name__t __module__t__doc__RRRvRRoRRRRRRRR(((s5/usr/lib64/python2.7/site-packages/mercurial/store.pyRwFs        t encodedstorecB@s/eZdZddZdZdZRS(cC@se||d}|j|_t||_|j|_||_tj|t|_|j|_ dS(Ns/store( RxR RrRyRzR{R|R1RR}(R~R RR((s5/usr/lib64/python2.7/site-packages/mercurial/store.pyRs   cc@sex^tt|jD]G\}}}yt|}Wntk rNd}nX|||fVqWdS(N(tsuperRRR3RRo(R~Rtatbtsize((s5/usr/lib64/python2.7/site-packages/mercurial/store.pyRs %  cC@s|jdt|S(NRH(R R1(R~Rj((s5/usr/lib64/python2.7/site-packages/mercurial/store.pyRscC@s+ddggtjD]}d|^qS(NRs 00changelog.isstore/(RRM(R~Rj((s5/usr/lib64/python2.7/site-packages/mercurial/store.pyRs N(RRRRoRRR(((s5/usr/lib64/python2.7/site-packages/mercurial/store.pyRs  tfncachecB@sGeZdZdZdZdZdZdZdZRS(cC@s||_d|_t|_dS(N(RRotentriesRit_dirty(R~R((s5/usr/lib64/python2.7/site-packages/mercurial/store.pyRs  cC@st|_y|jddd}Wntk rBt|_dSXtt|jj|_d|jkr|j dx[t t j |D]A\}}|j dstd|d }tj|qqWn|jdS( s&fill the entries from the fncache fileRRqtrbNRis s!invalid entry in fncache, line %di(RiRRtIOErrortsetRR treadt splitlinestseekR@RtiterfiletrstripRRtAborttclose(R~RREtlineR]((s5/usr/lib64/python2.7/site-packages/mercurial/store.pyt_loads   ! "cC@sz|jrv|jd|jddddt}|jr`|jtdj|jdn|jt |_ndS(NRRqtwbt atomictemps ( Rt addbackupRReRRR RRRi(R~RR((s5/usr/lib64/python2.7/site-packages/mercurial/store.pyRs   & cC@sK|jdkr|jn||jkrGt|_|jj|ndS(N(RRoRReRtadd(R~R((s5/usr/lib64/python2.7/site-packages/mercurial/store.pyRs   cC@sQ|jdkr|jny|jj|t|_Wntk rLnXdS(N(RRoRtremoveReRR(R~R((s5/usr/lib64/python2.7/site-packages/mercurial/store.pyRs   cC@s)|jdkr|jn||jkS(N(RRoR(R~R((s5/usr/lib64/python2.7/site-packages/mercurial/store.pyRs cC@s)|jdkr|jnt|jS(N(RRoRtiter(R~((s5/usr/lib64/python2.7/site-packages/mercurial/store.pyt__iter__s ( RRRRRRRRR(((s5/usr/lib64/python2.7/site-packages/mercurial/store.pyRs    t _fncachevfscB@s&eZdZddZdZRS(cC@s)tjj||||_||_dS(N(R{tproxyvfsRRtencode(R~RtfncR((s5/usr/lib64/python2.7/site-packages/mercurial/store.pyRs trcO@s|j|}|dkr|jds9|jdr|jjdkoZ|jj|}|rd|kr|jj|j rt }n|s|jj |qn|j||||S(NRRsdata/smeta/R(RR( Rt startswithRRRoRRRlRRiR(R~R Rqtargstkwtencodedtnotload((s5/usr/lib64/python2.7/site-packages/mercurial/store.pyt__call__s$( cC@s3|r|jj|j|S|jj|SdS(N(RRR(R~R ((s5/usr/lib64/python2.7/site-packages/mercurial/store.pyRs(RRRRR(((s5/usr/lib64/python2.7/site-packages/mercurial/store.pyRs  t fncachestorecB@seeZdZdZdZd dZdZdZdZ dZ dZ d Z RS( cC@s|rt}nt}||_||d}|j|_|jd|_t||_|j|_||_t |}||_ t ||||_ |j |_ dS(Ns/storeRH( RgRkRRxR tpathsepRrRyRzRRRR}(R~R RRDRRR((s5/usr/lib64/python2.7/site-packages/mercurial/store.pyRs       cC@s|j|j|S(N(RR(R~Rj((s5/usr/lib64/python2.7/site-packages/mercurial/store.pyRscC@s|jj|jS(N(RzRlR(R~R ((s5/usr/lib64/python2.7/site-packages/mercurial/store.pytgetsizescc@svxot|jD]^}|j|}y|||j|fVWqtk rm}|jtjkrnqnqXqWdS(N(tsortedRRRRpterrnotENOENT(R~RRjRcterr((s5/usr/lib64/python2.7/site-packages/mercurial/store.pyRscC@s1d}ddgg|jD]}d|^qS(Nsinarrowspec data meta dh fncache phaseroots obsstore 00manifest.d 00manifest.i 00changelog.d 00changelog.iRs 00changelog.isstore/(RM(R~R\Rj((s5/usr/lib64/python2.7/site-packages/mercurial/store.pyR(s cC@s|jj|dS(N(RR(R~R((s5/usr/lib64/python2.7/site-packages/mercurial/store.pyR.scC@sd|j_dS(N(RoRR(R~((s5/usr/lib64/python2.7/site-packages/mercurial/store.pyR1scC@s|jj|dS(N(RR(R~R((s5/usr/lib64/python2.7/site-packages/mercurial/store.pyR4scC@sW|j|}y|j|tSWn,tk rR}|jtjkrNntSXdS(N(RRReRpRRRi(R~RjRcR((s5/usr/lib64/python2.7/site-packages/mercurial/store.pyt_exists7s cC@sdjd|f}|d}||jkrA|j|rAtS|jds]|d7}nx3|jD](}|j|rg|j|rgtSqgWtS(s!Checks if the store contains pathRHRs.i(RRRReRRRi(R~R R)((s5/usr/lib64/python2.7/site-packages/mercurial/store.pyRBs  N( RRRRRRoRRRRRRR(((s5/usr/lib64/python2.7/site-packages/mercurial/store.pyRs        (R7R8R9R:(R;R<(4t __future__RRRJRNRlti18nRRRRRRRRR{t importmodRR tgetattrR R RR/R0R2R1R3R6RoR5RBRCRGRSRPRQRbRdRgRkRrRRvtobjectRwRRt abstractvfsRRR(((s5/usr/lib64/python2.7/site-packages/mercurial/store.pytsH    .     6    ,  &    N>