^c <ddlmZddlmZmZmZmZdZdZdZ dS))_)errorfileset filesetlangpycompatcntj|td}tj|S)Nssize requires an expression)r getstringrr sizematcher)xexprs 7/usr/lib/python3/dist-packages/mercurial/minifileset.py_sizeprs.  A&D$E$E F FD  t $ $$c s!tjtdd}|dkrtdS|dvrt jdhtd}|drN|d dtjD]*}|d vr$tjtd |z+fd S|d r!|dd t  fd}|Stjtd|ztd|dvrdddD fdS|dkr0tdtd fdS|dkrfdS|dkrXddfdd}t j d}||vr||Stj || |dkr0tdtd fd S|d!kr0tjtd"td#tj d$fz)%Nsmissing arguments withstatusr>stringsymbolkindpatspathsinvalid file patterns**s*{}[]?/\sreserved character: %sc.|SN)endswith)nsexts r z_compile..'s 3rspath:cv|o#t|kp|dzdkS)Nr/) startswithlen)rrppls r rz_compile..+s<Q\\!__A" 6"rAv+$ 6rsunsupported file pattern: %ss#paths must be prefixed with "path:")hint>orpatternsc,g|]}t|S_compile).0r s r z_compile..4s///!///rc@tfdDS)Nc30K|]}|VdSrr()r+frrs r z-_compile....5s-77A!Q777777r)any)rrfuncss``r rz_compile..5s)C7777777777rsandc4||o ||Srr(rrfunc1func2s r rz_compile..9s EE!QKK7EE!QKKrsnotcDtd|| S)Nrr)rrtrees r rz_compile..;s# 1a 1 1!Q 7 77rsfunccdS)NTr(rrs r rz_compile..>srcdS)NFr(r;s r rz_compile..?s%rc@td|S)Nr)rr8s r rz_compile..@s/&a//!"4"4r)sallsnonessizesminusc6||o || Srr(r4s r rz_compile..Ks"EE!QKK;a Orslists can't use a list in this contextssee 'hg help "filesets.x or y"'sillegal tree: %r)r ParseErrorrr*r getpatternr rbytestrr! getsymbolUnknownIdentifierkeysProgrammingError) r9opnamecr/symbolsrr5r6r2r"r#s ` @@@@@@r r*r*s 7q!455666 aB ]Q   1 1 1% 7)Q677   ??5 ! ! qrr(C%c** M M $$*1-F+G+G!+KLLL%//// / __X & & QRRAQBAH - . . 59::     # # #//d122h///77777 va!!a!!777777 v77777 w%%''4444   $T!W-- 7??4= %dGLLNN;;; xa!!a!!;;;;;; w 1 2 2788      !4w!> ? ??rctj|}tj|}tj|}t |S)agenerate a function (path, size) -> bool from filter specification. "text" could contain the operators defined by the fileset language for common logic operations, and parenthesis for grouping. The supported path tests are '**.extname' for file extension test, and '"path:dir/subdir"' for prefix test. The ``size()`` predicate is borrowed from filesets to test file size. The predicates ``all()`` and ``none()`` are also supported. '(**.php & size(">10MB")) | **.zip | (path:bin & !path:bin/README)' for example, will catch all php files whose size is greater than 10 MB, all files whose name ends with ".zip", and all files under "bin" in the repo root except for "bin/README". )rparseanalyzeoptimizer*)textr9s r compilerOTs@  T " "D  t $ $D   % %D D>>rN) i18nrrrrrrr*rOr(rr rRs%%% 9@9@9@xr