\x89\x50\x4E\x47\x0D\x0A\x1A\x0A PNG  \x89\x50\x4E\x47\x0D\x0A\x1A\x0A  13\c@@sddlmZddlZddlZddlZddlZddlZddlZddlZddl m Z ddl m Z ddl mZmZmZmZmZmZmZejZdZdZd Zid gd 6d d gd6ddgd6dgd6ZdZdZddZdZde fdYZ!de fdYZ"de fdYZ#ie#d6e!d 6dd6d d6d!d"6e"d6Z$e%dd#de'd$Z(dS(%i(tabsolute_importNi(t_(tnullrev(terrort formattertmatchtpycompattscmutiltutiltvfsiicC@s@|rtj|}n}t|ts6tdntjj|}|j}x>t j |gD]*}|j |rg|t | }PqgqgWtjjtj |}tj|}|j ds|d7}n|jdr|d}n|jds$tjj|s$d|kr<tjtdn|S(sWchoose prefix to use for names in archive. make sure prefix is safe for consumers.s dest must be string if no prefixt/s./is../s/../s*archive prefix contains illegal components(Rtnormpatht isinstancetbytest ValueErrortostpathtbasenametlowertextstgettendswithtlent localpathtpconvertt startswithtisabsRtAbortR(tdesttkindtprefixRtsfxtlpfx((s8/usr/lib64/python2.7/site-packages/mercurial/archival.pyt tidyprefix&s&   -s.tarttars.tbz2s.tar.bz2ttbz2s.tgzs.tar.gzttgzs.ziptzipc@sAx:tjD],\}}tfd|Dr |Sq WdS(Nc3@s|]}j|VqdS(N(R(t.0text(R(s8/usr/lib64/python2.7/site-packages/mercurial/archival.pys Js(Rt iteritemstanytNone(RRt extensions((Rs8/usr/lib64/python2.7/site-packages/mercurial/archival.pyt guesskindHscC@sx|D] }||SW|tS(N(R(trepotrev((s8/usr/lib64/python2.7/site-packages/mercurial/archival.pyt_rootctxNs  sy repo: {root} node: {ifcontains(rev, revset("wdir()"), "{p1node}{dirty}", "{node}")} branch: {branch|utf8} {ifeq(latesttagdistance, 0, join(latesttag % "tag: {tag}", "\n"), separate("\n", join(latesttag % "latesttag: {tag}", "\n"), "latesttagdistance: {latesttagdistance}", "changessincelatesttag: {changessincelatesttag}"))} cC@s|j}i|jjddtd6}tj}tj|j|d|}|j|jd||j dt |j |j d krd}|jdtrd }n|j d |n|j|jS( s!build content of .hg_archival.txtt experimentaltarchivemetatemplatettemplatetarchivetctxtrootttmissingt+tdirtyN(R-tuitconfigt_defaultmetatemplateRtstringioRt startitemtcontexttdataR/thexR.R*R9tTruetendtgetvalue(R4R-toptstouttfmR9((s8/usr/lib64/python2.7/site-packages/mercurial/archival.pyt buildmetadatabs       ttaritcB@sEeZdZdejfdYZddZdZdZRS(sawrite archive to tar file or stream. can write uncompressed, or compress with gzip or bzip2.tGzipFileWithTimecB@seZdZdZRS(cO@sed}d|kr$|jd}n|dkrBtj|_n ||_tjj|||dS(Nt timestamp(R*tpopttimeRKtgziptGzipFilet__init__(tselftargstkwRK((s8/usr/lib64/python2.7/site-packages/mercurial/archival.pyRPs   cC@s|jjd|jjd|j}|rK|jdrK|d }nd}|rctj}n|jjtj|tj|jt |j |jjd|jjd|r|jj|dndS( Nsss.gziisss( tfileobjtwritetnameRRNtFNAMERtbytechrtwrite32utintRK(RQtfnametflags((s8/usr/lib64/python2.7/site-packages/mercurial/archival.pyt_write_gzip_headers   (t__name__t __module__RPR](((s8/usr/lib64/python2.7/site-packages/mercurial/archival.pyRJs R6c@sm_d_ddfd}t|trT|dd|_n|dd|_dS(NR6c@sdkr|dd!}|s5t||d}nj|tj|dtj|d}|_tjj |tj||Stj|tj||SdS(NtgziitbRK( topenRJRtsysstrtzlibtZ_BEST_COMPRESSIONRTttarfiletTarFilettaropen(tmodeRVRTt gzfileobj(RtmtimeRQ(s8/usr/lib64/python2.7/site-packages/mercurial/archival.pyRhs     sw:RVsw|RT(RkR*RTR R tz(RQRRkRRh((RRkRQs8/usr/lib64/python2.7/site-packages/mercurial/archival.pyRPs   cC@stj|}tj|}|j|_t||_|rxtj|_d|_ tj||_ d}d|_n||_ t |}|j j||dS(Nii(RtfsdecodeRftTarInfoRkRtsizetSYMTYPEttypeRitlinknameR*R=Rltaddfile(RQRVRitislinkR@ti((s8/usr/lib64/python2.7/site-packages/mercurial/archival.pyRss      cC@s*|jj|jr&|jjndS(N(RltcloseRT(RQ((s8/usr/lib64/python2.7/site-packages/mercurial/archival.pytdones  ( R^R_t__doc__RNRORJRPRsRw(((s8/usr/lib64/python2.7/site-packages/mercurial/archival.pyRI{s   tzipitcB@s,eZdZedZdZdZRS(s]write archive to zip file or stream. can write uncompressed, or compressed with deflate.cC@st|tr!tj|}ntj|d|r<tjpBtj|_d}||krf|}n||_ t j |d |_ dS(Ntwii( R R RRmtzipfiletZipFilet ZIP_DEFLATEDt ZIP_STOREDRlRkRMtgmtimet date_time(RQRRktcompresstepoch((s8/usr/lib64/python2.7/site-packages/mercurial/archival.pyRPs    c C@stjtj||j}|jj|_d|_t }|rQd}t }n||Bd>|_ |j t jddddt|j7_ |jj||dS( NiiisscC@st||dS(NR`(RI(RVRk((s8/usr/lib64/python2.7/site-packages/mercurial/archival.pyRscC@st||tS(N(RyR(RVRk((s8/usr/lib64/python2.7/site-packages/mercurial/archival.pyRstuzipR6c @s|dkr-r?tjtdq?nt||fd} |tkrtjtd|n|t|||pjdjjddrd} | s|| r| | d tfd qn|r6gj j D]} || r| ^q} nj j } t | } | r5| j t jjgt j| t jjtd d tdd | }|jdx_| D]W} j| }| | d|krdpd d|k| j|jd| qW|jn|rxWtjD]C}j|}tj||}| |j|7} qKWn| dkrtjtdnj| S(s create archive of repo as it was at node. dest can be name of directory, name of archive file, or file object to write archive to. kind is type of archive to create. decode tells whether to put files through decode filters from hgrc. matchfn is function to filter names of files to write to archive. prefix is name of path to put before every archive member. mtime is the modified time, in seconds, or None to use the changeset time. subrepos tells whether to include subrepos. Rs*cannot give prefix when archiving to filesc@sB|}r$j||}nj||||dS(N(t wwritedataRs(RVRiRttgetdataR@(tarchivertdecodeRR-(s8/usr/lib64/python2.7/site-packages/mercurial/archival.pyRU0s sunknown archive type '%s'iR:t archivemetas.hg_archival.txtic@s tS(N(RH((R4(s8/usr/lib64/python2.7/site-packages/mercurial/archival.pyR?st archivingtunitttotaltxitltitems"no files match the archive pattern(RRRR!t archiverstdateR:t configboolRtmanifesttkeysRtsortRt prefetchfilesR.t matchfilestprogresstupdateR\R@t incrementtcompletetsortedtsubstatet workingsubtmatchmodt subdirmatcherR3Rw(R-RtnodeRRtmatchfnRRktsubreposRURVRRRRtfftsubpathtsubtsubmatch((RR4RRR-s8/usr/lib64/python2.7/site-packages/mercurial/archival.pyR3sL   #"4  $   2 #  ()t __future__RRNRRRfRMR{Rdti18nRRRR6RRRRRRRR RR=RRR!RR,R/R<RHtobjectRIRyRRRBR*RR3(((s8/usr/lib64/python2.7/site-packages/mercurial/archival.pytsF       4          N,