\x89\x50\x4E\x47\x0D\x0A\x1A\x0A PNG  \x89\x50\x4E\x47\x0D\x0A\x1A\x0A  13\c@@sddlmZddlZddlZddlmZddlmZmZm Z m Z m Z m Z mZmZddlmZejZejZejZejZejZejZejZejZejZdZ dZ!d Z"d Z#d Z$d Z%d Z&dZ'dZ(dZ)dZ*ej+Z+e j,e+Z-e-dde.dedZ/e-dde.dedZ0e-dde.dedZ1e-dde.dedZ2e-dde.dedZ3e-dde.dedZ4e-d de.ded!Z5e-d"de.ded#Z6e-d$d%Z7e-d&ded'Z8e-d(d)Z9e-d*d+Z:e-d,ded-Z;e-d.ded/Z<e-d0ded1Z=e-d2ded3Z>e-d4ded5Z?d6Z@d7ZAe-d8ded9ZBe-d:ded;ZCe-d<ded=ZDe-d>d?ZEe-d@dedAZFe-dBdedCZGe-dDdEZHi e!dF6e"dG6e"dH6e#dI6e$dJ6e%dK6e&dL6e(dM6e)dN6e'dO6e*dP6ZIdQeJfdRYZKddSZ dTZMe+jNZOdS(Ui(tabsolute_importNi(t_(terrort filesetlangtmatchtmergetpycompatt registrartscmutiltutil(t stringutilcC@s7|stjtdnt|d||dS(Nsmissing argumentii(Rt ParseErrorRtmethods(tmctxtx((s7/usr/lib64/python2.7/site-packages/mercurial/fileset.pytgetmatch)scC@s1tt|dj}t|j||S(Nsstatus hint must be a string(tsett getstringtsplitRt withstatus(R Rthinttkeys((s7/usr/lib64/python2.7/site-packages/mercurial/fileset.pytgetmatchwithstatus.scC@s|j|gS(N(tmatcher(R R((s7/usr/lib64/python2.7/site-packages/mercurial/fileset.pyt stringmatch2scC@s%t|t||tjtdS(Nspattern must be a string(Rt _getkindpattmatchmodtallpatternkindsR(R Rty((s7/usr/lib64/python2.7/site-packages/mercurial/fileset.pyt kindpatmatch5scG@sAtj}g|D]}t||td^q}|j|S(Nspattern must be a string(RRt getpatternRR(R txstallkindsRtpatterns((s7/usr/lib64/python2.7/site-packages/mercurial/fileset.pyt patternsmatch9s (cC@s7t||}t|j||}tj||S(N(RtnarrowedRtintersectmatchers(R RRtxmtym((s7/usr/lib64/python2.7/site-packages/mercurial/fileset.pytandmatch?scG@s/g|D]}t||^q}tj|S(N(RRt unionmatcher(R RRtms((s7/usr/lib64/python2.7/site-packages/mercurial/fileset.pytormatchDs"c@s1t|||jfdddfS(Nc@s | S(N((tf(tm(s7/usr/lib64/python2.7/site-packages/mercurial/fileset.pytJstpredreprs(Rt predicate(R R((R,s7/usr/lib64/python2.7/site-packages/mercurial/fileset.pytnotmatchHscC@s7t||}t|j||}tj||S(N(RR#Rtdifferencematcher(R RRR%R&((s7/usr/lib64/python2.7/site-packages/mercurial/fileset.pyt minusmatchLscG@s%tjtddtddS(Ns can't use a list in this contextRssee 'hg help "filesets.x or y"'(RR R(R R((s7/usr/lib64/python2.7/site-packages/mercurial/fileset.pyt listmatchQscC@syt|}|tkr)t|||Sd}gtjD]\}}||r?|^q?}tj||dS(NcS@st|dddk S(Nt__doc__(tgetattrtNone(tfn((s7/usr/lib64/python2.7/site-packages/mercurial/fileset.pyR-Zs(t getsymboltsymbolstitemsRtUnknownIdentifier(R tatbtfuncnametkeeptsR7tsyms((s7/usr/lib64/python2.7/site-packages/mercurial/fileset.pytfuncUs    1s modified()t callstatustweightcC@sDt|ddtdt|jj}|j|jddS(s5File that is modified according to :hg:`status`. ismodified takes no argumentsR.tmodified(tgetargsRRtstatusRER/t __contains__(R RR@((s7/usr/lib64/python2.7/site-packages/mercurial/fileset.pyREhssadded()cC@sDt|ddtdt|jj}|j|jddS(s2File that is added according to :hg:`status`. isadded takes no argumentsR.tadded(RFRRRGRIR/RH(R RR@((s7/usr/lib64/python2.7/site-packages/mercurial/fileset.pyRIqss removed()cC@sDt|ddtdt|jj}|j|jddS(s4File that is removed according to :hg:`status`. isremoved takes no argumentsR.tremoved(RFRRRGRJR/RH(R RR@((s7/usr/lib64/python2.7/site-packages/mercurial/fileset.pyRJzss deleted()cC@sDt|ddtdt|jj}|j|jddS(sAlias for ``missing()``. isdeleted takes no argumentsR.tdeleted(RFRRRGRKR/RH(R RR@((s7/usr/lib64/python2.7/site-packages/mercurial/fileset.pyRKss missing()cC@sDt|ddtdt|jj}|j|jddS(s4File that is missing according to :hg:`status`. ismissing takes no argumentsR.RK(RFRRRGRKR/RH(R RR@((s7/usr/lib64/python2.7/site-packages/mercurial/fileset.pytmissingss unknown()cC@sDt|ddtdt|jj}|j|jddS(s/File that is unknown according to :hg:`status`.isunknown takes no argumentsR.tunknown(RFRRRGRMR/RH(R RR@((s7/usr/lib64/python2.7/site-packages/mercurial/fileset.pyRMss ignored()cC@sDt|ddtdt|jj}|j|jddS(s/File that is ignored according to :hg:`status`.isignored takes no argumentsR.tignored(RFRRRGRNR/RH(R RR@((s7/usr/lib64/python2.7/site-packages/mercurial/fileset.pyRNssclean()cC@sDt|ddtdt|jj}|j|jddS(s2File that is clean according to :hg:`status`. isclean takes no argumentsR.tclean(RFRRRGROR/RH(R RR@((s7/usr/lib64/python2.7/site-packages/mercurial/fileset.pyROss tracked()cC@s2t|ddtd|j|jjddS(s%File that is under Mercurial control.istracked takes no argumentsR.ttracked(RFRR/tctxRH(R R((s7/usr/lib64/python2.7/site-packages/mercurial/fileset.pyRPssbinary()cC@s5t|ddtd|jddddtS(s9File that appears to be binary (contains NUL bytes). isbinary takes no argumentscS@s |jS(N(tisbinary(tfctx((s7/usr/lib64/python2.7/site-packages/mercurial/fileset.pyR-sR.tbinarytcache(RFRt fpredicatetTrue(R R((s7/usr/lib64/python2.7/site-packages/mercurial/fileset.pyRTssexec()c@s>t|ddtd|j|jfdddS(s'File that is marked as executable. isexec takes no argumentsc@sj|dkS(NR(tflags(R+(RQ(s7/usr/lib64/python2.7/site-packages/mercurial/fileset.pyR-sR.texec(RFRRQR/(R R((RQs7/usr/lib64/python2.7/site-packages/mercurial/fileset.pytexec_s s symlink()c@s>t|ddtd|j|jfdddS(s&File that is marked as a symlink. issymlink takes no argumentsc@sj|dkS(Ntl(RX(R+(RQ(s7/usr/lib64/python2.7/site-packages/mercurial/fileset.pyR-sR.tsymlink(RFRRQR/(R R((RQs7/usr/lib64/python2.7/site-packages/mercurial/fileset.pyR\s s resolved()c@sot|ddtd|jjdk r8|jStjj|jj |j fdddS(s@File that is marked resolved according to :hg:`resolve -l`. isresolved takes no argumentsc@s|ko|dkS(Ntr((R+(R)(s7/usr/lib64/python2.7/site-packages/mercurial/fileset.pyR-sR.tresolvedN( RFRRQtrevR6tneverRt mergestatetreadtrepoR/(R R((R)s7/usr/lib64/python2.7/site-packages/mercurial/fileset.pyR^s  s unresolved()c@sot|ddtd|jjdk r8|jStjj|jj |j fdddS(sBFile that is marked unresolved according to :hg:`resolve -l`. isunresolved takes no argumentsc@s|ko|dkS(Ntu((R+(R)(s7/usr/lib64/python2.7/site-packages/mercurial/fileset.pyR-sR.t unresolvedN( RFRRQR_R6R`RRaRbRcR/(R R((R)s7/usr/lib64/python2.7/site-packages/mercurial/fileset.pyRes  s hgignore()cC@s,t|ddtd|jjjjS(s4File that matches the active .hgignore pattern. ishgignore takes no arguments(RFRRQRctdirstatet_ignore(R R((s7/usr/lib64/python2.7/site-packages/mercurial/fileset.pythgignoress portable()cC@s/t|ddtd|jdddS(s^File that has a portable name. (This doesn't include filenames with case collisions.) isportable takes no argumentscS@stj|dkS(N(R tcheckwinfilenameR6(R+((s7/usr/lib64/python2.7/site-packages/mercurial/fileset.pyR-sR.tportable(RFRR/(R R((s7/usr/lib64/python2.7/site-packages/mercurial/fileset.pyRjss grep(regex)c@sy"tjt|tdWn8tjk r\}tjtdtj|nX|jfdddj fdt S(s0File contains the given regular expression. sgrep requires a patternsinvalid match pattern: %sc@sj|jS(N(tsearchtdata(RS(R](s7/usr/lib64/python2.7/site-packages/mercurial/fileset.pyR-sR.sgrep(%r)RU( tretcompileRRRR R t forcebytestrRVtpatternRW(R Rte((R]s7/usr/lib64/python2.7/site-packages/mercurial/fileset.pytgreps"cC@sy|jj}xtjD]~\}}|j|r|t| }d}d|kr|dt|jdd:}ntt|||dSqWt|SWn*t k rt j t d|nXdS(Ng?t.i iscouldn't parse size: %s( tstriptlowerR t _sizeunitstendswithtlenRtinttfloatt ValueErrorRR R(R@tktvtntinc((s7/usr/lib64/python2.7/site-packages/mercurial/fileset.pyt _sizetomaxs $  c@sI|j}d|kr^|jdd\tjtjfdS|jdrtj|dfdS|jdrtj|dfdS|jd rtj|dfd S|jd rtj|dfd Stj|t|fd SdS(s>Return a function(size) -> bool from the ``size()`` expressiont-ic@s|ko|kS(N((R(R<R=(s7/usr/lib64/python2.7/site-packages/mercurial/fileset.pyR-ss<=ic@s |kS(N((R(R<(s7/usr/lib64/python2.7/site-packages/mercurial/fileset.pyR-!st=c@s |kS(N((R(R<(s7/usr/lib64/python2.7/site-packages/mercurial/fileset.pyR-'st>c@s |kS(N((R(R<(s7/usr/lib64/python2.7/site-packages/mercurial/fileset.pyR-*sc@s|ko|kS(N((R(R<R=(s7/usr/lib64/python2.7/site-packages/mercurial/fileset.pyR-.sN(RtRR t sizetointt startswithR(texpr((R<R=s7/usr/lib64/python2.7/site-packages/mercurial/fileset.pyt sizematchers*       ssize(expression)c@sIt|td}t||jfddd|fdtS(sFile size matches the given expression. Examples: - size('1k') - files from 1024 to 2047 bytes - size('< 20k') - files less than 20480 bytes - size('>= .5MB') - files at least 524288 bytes - size('4k - 1MB') - files from 4096 bytes to 1048576 bytes ssize requires an expressionc@s|jS(N(tsize(RS(R,(s7/usr/lib64/python2.7/site-packages/mercurial/fileset.pyR-<sR.ssize(%r)RU(RRRRVRW(R RR((R,s7/usr/lib64/python2.7/site-packages/mercurial/fileset.pyR0s  sencoding(name)c@sCt|tdfd}|j|ddfdtS(sFile can be successfully decoded with the given character encoding. May not be useful for encodings other than ASCII and UTF-8. s"encoding requires an encoding namec@sl|j}y|jtjtSWn;tk rVtjtdnt k rgt SXdS(Nsunknown encoding '%s'( RltdecodeRtsysstrRWt LookupErrorRtAbortRtUnicodeDecodeErrortFalse(RStd(tenc(s7/usr/lib64/python2.7/site-packages/mercurial/fileset.pytencpIs   R.s encoding(%r)RU(RRRVRW(R RR((Rs7/usr/lib64/python2.7/site-packages/mercurial/fileset.pytencoding?s s eol(style)c@sCt|tdfd}|j|ddfdtS(sFile contains newlines of the given style (dos, unix, mac). Binary files are excluded, files with mixed line endings match multiple styles. seol requires a style namec@s|jrtS|j}dks4dkrDd|krDtSdkrftjd|rftSdkrtjd|rtStS(Ntdostwins tunixs(?}||}|j|j|}|j t ||qgW|s|j St |dkr|dSt j|S(sEvaluate set in the specified revisions. If the revset match multiple revs, this will return file matching pattern in any of the revision. isrevs takes two argumentss)first argument to revs must be a revisionii(RFRRRQRcRtrevrangetswitchtp1tappendRR`RxRR(( R RR]trevspecRctrevstmatchersRQtmc((s7/usr/lib64/python2.7/site-packages/mercurial/fileset.pyRws!   sstatus(base, rev, pattern)c C@s|jj}t|ddtd\}}}td}t||}|sftj|ntd}t||}|stj|ntj|||g\} } |j | | } t | |S(sEvaluate predicate using status change between ``base`` and ``rev``. Examples: - ``status(3, 7, added())`` - matches files added from "3" to "7" isstatus takes three argumentss+first argument to status must be a revisions,second argument to status must be a revision( RQRcRFRRRR RtrevpairRR( R RRcR=R]tbaseerrt baserevspectreverrRtbasectxRQR((s7/usr/lib64/python2.7/site-packages/mercurial/fileset.pyRGs$  ssubrepo([pattern])c@st|ddtd|j}|j|rt|tjtdtj }|rtfdn'tj|j j dgd||j fdd d fS|j j d d Sd S( s9Subrepositories whose paths match the given pattern. iis"subrepo takes at most one arguments*subrepo requires a pattern or no argumentsc@s |kS(N((R@(tpat(s7/usr/lib64/python2.7/site-packages/mercurial/fileset.pyR,stRQc@s|ko|S(N((R+(R,tsstate(s7/usr/lib64/python2.7/site-packages/mercurial/fileset.pyR-sR.s subrepo(%r)tsubrepoN( RFRRQtsubstateRRRtpatkindRRctrootR/RH(R RRQtfast((R,RRs7/usr/lib64/python2.7/site-packages/mercurial/fileset.pyRs   ' RtstringtsymboltkindpatR!tandtortminustlisttnotRBtmatchctxcB@sqeZd dZdZdZdZdZdZdZ d e dZ d e dZ d Z RS( cC@s1||_||_||_d|_d|_dS(N(t_basectxRQt_badfnR6t_matcht_status(tselfRRQtbadfn((s7/usr/lib64/python2.7/site-packages/mercurial/fileset.pyt__init__s     cC@s4t|j|j|j}||_|j|_|S(s<Create matchctx for a sub-tree narrowed by the given matcher(RRRQRRR(RRR ((s7/usr/lib64/python2.7/site-packages/mercurial/fileset.pyR#s  cC@s%t|||j}|j|_|S(N(RRR(RRRQR ((s7/usr/lib64/python2.7/site-packages/mercurial/fileset.pyRs cC@s8t|j|j|j}|j|_|j||S(sBCreate matchctx which has precomputed status specified by the keys(RRRQRRt _buildstatus(RRR ((s7/usr/lib64/python2.7/site-packages/mercurial/fileset.pyRs  c C@sF|jj|j|jdd|kdd|kdd|k|_dS(Nt listignoredRNt listcleanROt listunknownRM(RRGRQRR(RR((s7/usr/lib64/python2.7/site-packages/mercurial/fileset.pyRs  cC@s|jS(N(R(R((s7/usr/lib64/python2.7/site-packages/mercurial/fileset.pyRGscC@s|jj|d|jS(NR(RQRR(RR!((s7/usr/lib64/python2.7/site-packages/mercurial/fileset.pyRscC@sR|rtj|}n|jj}tj|j|j|d|d|jS(s4Create a matcher to select files by predfn(filename)R.R( R t cachefuncRQRcRtpredicatematcherRtgetcwdR(RtpredfnR.RURc((s7/usr/lib64/python2.7/site-packages/mercurial/fileset.pyR/s c@s[|jjdkr0fd}nfd}|j|d|d|S(s}Create a matcher to select files by predfn(fctx) at the current revision Missing files are ignored. c@sy|}Wntjk r%tSXy|jWntjk rKtSXy|SWnGttfk r}|jtjtj tj tj fkrtSnXdS(N( RRRtauditRtIOErrortOSErrorterrnotENOENTtEACCEStENOTDIRtEISDIR(R+RSRq(RQR(s7/usr/lib64/python2.7/site-packages/mercurial/fileset.pyt fctxpredfnsc@s0y|}Wntjk r%tSX|S(N(RRR(R+RS(RQR(s7/usr/lib64/python2.7/site-packages/mercurial/fileset.pyRs R.RUN(RQR_R6R/(RRR.RUR((RQRs7/usr/lib64/python2.7/site-packages/mercurial/fileset.pyRVs  cC@s1|jj}tj|j|jd|jS(s"Create a matcher to select nothingR(RQRcRt nevermatcherRRR(RRc((s7/usr/lib64/python2.7/site-packages/mercurial/fileset.pyR`sN(t__name__t __module__R6RR#RRRRGRRR/RVR`(((s7/usr/lib64/python2.7/site-packages/mercurial/fileset.pyRs       "cC@sUtj|}tj|}tj|}t|j|d|}t||S(s0Create a matcher for a single fileset expressionR(RtparsetanalyzetoptimizeRRR(RQRRttreeR ((s7/usr/lib64/python2.7/site-packages/mercurial/fileset.pyR"s cC@s.x'|jjD]\}}|t|s  :                      ! ! ! ! ! !!!           X