\x89\x50\x4E\x47\x0D\x0A\x1A\x0A PNG  \x89\x50\x4E\x47\x0D\x0A\x1A\x0A  13\c@@szddlmZddlZddlmZddlmZmZddlm Z m Z m Z m Z m Z mZmZmZmZmZmZmZmZddlmZmZejZejZejZejZejZejZej Z ej!Z!iZ"ej#e"Z#e#dd Z$e#d d d d Z%e#dddhdZ&e#dd ddddhdZ'e#dddhdZ(e#ddZ)e#ddZ*e#dddhdZ+e#ddd dhd!Z,e#d"d d#d$Z-e#d%d&Z.e#d'd(Z/e#d)d*Z0e#d+d,Z1e#d-d.Z2e#d/d0Z3e#d1ddhd2Z4e#d3d4Z5e#d5d6Z6e#d7d8Z7e#d9d:Z8e#d;d<Z9e#d=d>Z:e#d?d@Z;e#dAdBZ<e#dCdDZ=e#dEdd hdFZ>e#dGdd dhdHZe#dIdJZ?e#dKd dLdMZ@e#dNdd dhdOZAe#dPdQZBe#dRdSZCe#dTdUZDe#dVdWZEdXZFe"jGZHdS(Yi(tabsolute_importNi(t_(tbintwdirid( tcolortencodingterrortminirsttobsutilt registrartrevsett revsetlangtscmutilttemplatefilterst templatekwt templateutiltutil(tdateutilt stringutilsdate(date[, fmt])cC@sdt|kodkns:tjtdnt|||dtd}d}t|dkrt|||d}n|dkrtj|Stj||SdS(sFormat a date. See :hg:`help dates` for formatting strings. The default is a Unix date format, including the timezone: "Mon Sep 04 15:13:13 2006 0700".iis!date expects one or two argumentsisdate expects a date informationN( tlenRt ParseErrorRtevaldatetNonet evalstringRtdatestr(tcontexttmappingtargstdatetfmt((s=/usr/lib64/python2.7/site-packages/mercurial/templatefuncs.pyR2s"  sdict([[key=]value...])targspecs*args **kwargsc@stj}x|dD]}tj|}|sJtjtdn||ksf||dkrtjtd|nt|||Ts( RtsortdictRtfindsymbolicnameRRRR tupdatet iteritemst hybriddict(RRRtdataR#R"((RRs=/usr/lib64/python2.7/site-packages/mercurial/templatefuncs.pytdict_Fs s)diff([includepattern [, excludepattern]])trequirestctxc@stdkr*tjtdnfd}jd}|jd|jg|d|d}dj|S( sCShow a diff, optionally specifying files to include or exclude.is(diff expects zero, one, or two argumentsc@sB|tkr>t|j}|r>|gSngS(N(RRtstrip(tits(RRR(s=/usr/lib64/python2.7/site-packages/mercurial/templatefuncs.pyt getpatterns`s  R,tmatchiit(RRRRtresourcetdiffR1tjoin(RRRR0R,tchunks((RRRs=/usr/lib64/python2.7/site-packages/mercurial/templatefuncs.pyR4Xs -sextdata(source)tsourcetcachecC@sd|kr$tjtdnt|||d}|stj|d}|rtjtddtd|qtjtdn|j|djdi}|j|d}||kr||}n tj |j |}||<|j |j d S( sBShow a text read from the specified extdata source. (EXPERIMENTAL)R7sextdata expects one argumentsempty data source specifiedthintsdid you mean extdata('%s')?R8textdataR,R2( RRRRRR%R3t setdefaultR t extdatasourcetrepotgettrev(RRRR7tsymR8R,R)((s=/usr/lib64/python2.7/site-packages/mercurial/templatefuncs.pyR:ls    sfiles(pattern)cC@st|dks*tjtdnt|||d}|j|d}|j|g}t|j|}t j ||d|S(sUAll files of the current changeset matching the pattern. See :hg:`help patterns`.isfiles expects one argumentiR,tfile( RRRRRR3R1tlisttmatchesRtcompatfileslist(RRRtrawR,tmtfiles((s=/usr/lib64/python2.7/site-packages/mercurial/templatefuncs.pyRGss1fill(text[, width[, initialident[, hangindent]]])cC@sdt|kodkns:tjtdnt|||d}d}d}d}dt|kodknrt|||dtd}y0t|||d}t|||d }Wqtk rqXntj||||S( sJFill many paragraphs with optional indentation. See the "fill" filter.iis"fill expects one to four argumentsiiLR2isfill expects an integer widthi( RRRRRt evalintegert IndexErrorR tfill(RRRttexttwidtht initindentt hangindent((s=/usr/lib64/python2.7/site-packages/mercurial/templatefuncs.pyRJs"" sfilter(iterable[, expr])c@sdtkodkns:tjtdntd}tdkrwfd}nfd}|j|S(ssRemove empty elements from a list or a dict. If expr specified, it's applied to each element to test emptiness.iis#filter expects one or two argumentsic@s|jS(N(ttobool(tw(RR(s=/usr/lib64/python2.7/site-packages/mercurial/templatefuncs.pytselectsc@sYt|tjs*tjtdnj|j}t|dS(Nsnot filterable by expressioni( t isinstanceRtmappableRRRt overlaymapttomapt evalboolean(RPtlm(RRR(s=/usr/lib64/python2.7/site-packages/mercurial/templatefuncs.pyRQs(RRRRt evalwrappedtfilter(RRRtiterableRQ((RRRs=/usr/lib64/python2.7/site-packages/mercurial/templatefuncs.pytfilter_s"sformatnode(node)tuicC@slt|dkr*tjtdn|j|d}t|||d}|jr_|Stj|S(s;Obtain the preferred form of a changeset hash. (DEPRECATED)isformatnode expects one argumentR\i( RRRRR3Rt debugflagR tshort(RRRR\tnode((s=/usr/lib64/python2.7/site-packages/mercurial/templatefuncs.pyt formatnodes smailmap(author)R=cC@st|dkr*tjtdnt|||d}|j|d}|j|d}d|kr|jjd}tj ||ds sif(expr, then[, else])cC@sdt|kodkns:tjtdnt|||d}|rjt|||dSt|dkrt|||dSdS(s?Conditionally execute based on the result of an expression.iis!if expects two or three argumentsiiN(RRRRRVRt(RRRttest((s=/usr/lib64/python2.7/site-packages/mercurial/templatefuncs.pytif_)s"s*ifcontains(needle, haystack, then[, else])cC@sdt|kodkns:tjtdnt|||d}y/t|||d}|j|||}Wntjk rt}nX|rt|||dSt|dkrt|||dSdS(sNConditionally execute based on whether the item "needle" is in "haystack".iis*ifcontains expects three or four argumentsiiiN(RRRRRXRttcontainsRl(RRRthaystacktneedletfound((s=/usr/lib64/python2.7/site-packages/mercurial/templatefuncs.pyt ifcontains7s" s ifeq(expr1, expr2, then[, else])cC@sdt|kodkns:tjtdnt|||d}t|||d}||krt|||dSt|dkrt|||dSdS(sBConditionally execute based on whether 2 items are equivalent.iis$ifeq expects three or four argumentsiiiN(RRRRRRt(RRRRzR1((s=/usr/lib64/python2.7/site-packages/mercurial/templatefuncs.pytifeqKs" sjoin(list, sep)cC@sdt|kodkns:tjtdnt|||d}d}t|dkrt|||d}n|j|||S(s&Join items in a list with a delimiter.iis!join expects one or two argumentsiRg(RRRRRXRR5(RRRtjoinsettjoiner((s=/usr/lib64/python2.7/site-packages/mercurial/templatefuncs.pyR5Zs"slabel(label, expr)cC@sxt|dkr*tjtdn|j|d}t|||d}t|||d}|j||S(sApply a label to generated content. Content with a label applied can result in additional post-processing, such as automatic colorization.islabel expects two argumentsR\ii(RRRRR3Rtevalstringliteraltlabel(RRRR\tthingR((s=/usr/lib64/python2.7/site-packages/mercurial/templatefuncs.pyRgs slatesttag([pattern])cC@snt|dkr*tjtdnd}t|dkr[t|||d}ntj|||S(sThe global tags matching the given pattern on the most recent globally tagged ancestor of this changeset. If no such tags exist, the "{tag}" template resolves to the string "null". See :hg:`help revisions.patterns` for the pattern syntax. is&latesttag expects at most one argumentiN(RRRRRRRtshowlatesttags(RRRtpattern((s=/usr/lib64/python2.7/site-packages/mercurial/templatefuncs.pyt latesttagxs slocaldate(date[, tz])cC@s5dt|kodkns:tjtdnt|||dtd}t|dkrd}t|||d}t|trt j |\}}|rd}qn|dkryt |}Wq t t fk rtjtdq Xqnt jd}tj|d|fS(sIConverts a date to the specified timezone. The default is local date.iis&localdate expects one or two argumentsis$localdate expects a date informationslocaldate expects a timezoneN(RRRRRRR RRRvRt parsetimezonetintt TypeErrort ValueErrortmakedateRR(RRRRttzoffsetttzt remainder((s=/usr/lib64/python2.7/site-packages/mercurial/templatefuncs.pyt localdates$"  s max(iterable)cK@st|dkr*tjtdnt|||d}y|j||SWn=tjk r}td}tjt|d|nXdS(sReturn the max of an iterableismax expects one argumentis(max first argument should be an iterableR9N(RRRRRXtgetmaxRv(RRRRRZRyR9((s=/usr/lib64/python2.7/site-packages/mercurial/templatefuncs.pytmax_s s min(iterable)cK@st|dkr*tjtdnt|||d}y|j||SWn=tjk r}td}tjt|d|nXdS(sReturn the min of an iterableismin expects one argumentis(min first argument should be an iterableR9N(RRRRRXtgetminRv(RRRRRZRyR9((s=/usr/lib64/python2.7/site-packages/mercurial/templatefuncs.pytmin_s s mod(a, b)cC@sWt|dks*tjtdnd}tj||||d|dfS(s0Calculate a mod b such that a / b + a mod b == aismod expects two argumentscS@s||S(N((tatb((s=/usr/lib64/python2.7/site-packages/mercurial/templatefuncs.pytsii(RRRRRt runarithmetic(RRRtfunc((s=/usr/lib64/python2.7/site-packages/mercurial/templatefuncs.pytmods   sobsfateoperations(markers)cC@st|dkr*tjtdnt|||d}y&tj|}tj|ddSWn2t t fk rtd}tj|nXdS(sCCompute obsfate related information based on markers (EXPERIMENTAL)is&obsfateoperations expects one argumentitnamet operations6obsfateoperations first argument should be an iterableN( RRRRR RtmarkersoperationsRt hybridlistRtKeyError(RRRtmarkersR)terrmsg((s=/usr/lib64/python2.7/site-packages/mercurial/templatefuncs.pytobsfateoperationss sobsfatedate(markers)cC@st|dkr*tjtdnt|||d}y,tj|}tj|ddddSWn2t t fk rtd}tj|nXd S( sCCompute obsfate related information based on markers (EXPERIMENTAL)is obsfatedate expects one argumentiRRRs%d %ds0obsfatedate first argument should be an iterableN( RRRRR Rt markersdatesRRRR(RRRRR)R((s=/usr/lib64/python2.7/site-packages/mercurial/templatefuncs.pyt obsfatedates sobsfateusers(markers)cC@st|dkr*tjtdnt|||d}y&tj|}tj|ddSWn5t t t fk rtd}tj|nXdS(sCCompute obsfate related information based on markers (EXPERIMENTAL)is!obsfateusers expects one argumentiRtusers>obsfateusers first argument should be an iterable of obsmakersN( RRRRR Rt markersusersRRRRR(RRRRR)tmsg((s=/usr/lib64/python2.7/site-packages/mercurial/templatefuncs.pyt obsfateuserss s obsfateverb(successors, markers)cC@st|dkr*tjtdnt|||d}t|||d}ytj||SWn,tk rtd}tj|nXdS(sFCompute obsfate related information based on successors (EXPERIMENTAL)is!obsfateverb expects two argumentsiis.obsfateverb first argument should be countableN(RRRRR Rt obsfateverbR(RRRt successorsRR((s=/usr/lib64/python2.7/site-packages/mercurial/templatefuncs.pyRs  s relpath(path)cC@s_t|dkr*tjtdn|j|d}t|||d}|j|S(shConvert a repository-absolute path into a filesystem path relative to the current working directory.isrelpath expects one argumentR=i(RRRRR3Rtpathto(RRRR=tpath((s=/usr/lib64/python2.7/site-packages/mercurial/templatefuncs.pytrelpaths srevset(query[, formatargs...])c @s8t|dks*tjtdnt|||d}|j|dfd}t|dkrg|dD]}t|||^q~}|tj||}t |}n_|j|d}|j di} || kr| |}n"||}t |}|| |s sseparate(sep, args...)s sep *argscc@sd|kr$tjtdnt|||d}t}xI|dD]=}t|||}|soqKn|r~t}n|V|VqKWdS(s,Add a separator between non-empty arguments.tseps&separate expects at least one argumentRN(RRRRtTrueRl(RRRRtfirsttargtargstr((s=/usr/lib64/python2.7/site-packages/mercurial/templatefuncs.pytseparateJs  sshortest(node, minlength=4)cC@sdt|kodkns:tjtdnt|||d}d}t|dkrt|||dtd}n|j|d}t|dkr|St|dkryt|}Wq=tk r|SXnQyt j ||}Wn.tj k rt }ntj k r2|SX|s=|S|j|d }yt j||||SWntjk r|SXd S( s1Obtain the shortest representation of a node.iis'shortest() expects one or two argumentsiis'shortest() expects an integer minlengthR=i(R8N(RRRRRRHR3RRR tresolvehexnodeidprefixtWdirUnsupportedRt LookupErrortshortesthexnodeidprefixtRepoLookupError(RRRthexnodet minlengthR=R_R8((s=/usr/lib64/python2.7/site-packages/mercurial/templatefuncs.pytshortest]s8"  sstrip(text[, chars])cC@sdt|kodkns:tjtdnt|||d}t|dkrt|||d}|j|S|jS(s[Strip characters from a string. By default, strips all leading and trailing whitespace.iis"strip expects one or two argumentsi(RRRRRR-(RRRRKtchars((s=/usr/lib64/python2.7/site-packages/mercurial/templatefuncs.pyR-s" s%sub(pattern, replacement, expression)cc@st|dkr*tjtdnt|||d}t|||d}t|||d}ytj|}Wn-tjk rtjtd|nXy|j||VWn-tjk rtjtd|nXdS( s8Perform text substitution using regular expressions.issub expects three argumentsiiissub got an invalid pattern: %ss"sub got an invalid replacement: %sN(RRRRRtretcompiletsub(RRRtpattrpltsrctpatre((s=/usr/lib64/python2.7/site-packages/mercurial/templatefuncs.pyRssstartswith(pattern, text)cC@smt|dkr*tjtdnt|||d}t|||d}|j|ri|SdS(siReturns the value from the "text" argument if it begins with the content from the "pattern" argument.is startswith expects two argumentsiiR2(RRRRRt startswith(RRRtpatnRK((s=/usr/lib64/python2.7/site-packages/mercurial/templatefuncs.pyRssword(number, text[, separator])cC@sdt|kodknsDtjtdt|nt|||dtd}t|||d}t|dkrt|||d}nd}|j|}|t|ks|t| krdS||SdS( s"Return the nth word from a string.iis+word expects two or three arguments, got %disword expects an integer indexiR2N(RRRRRHRRtsplit(RRRtnumRKtsplitterttokens((s=/usr/lib64/python2.7/site-packages/mercurial/templatefuncs.pytwords"%cC@s.x'|jjD]\}}|t|R{RRR5RRRRRRRRRRRRRRR-RRRRtvaluest i18nfunctions(((s=/usr/lib64/python2.7/site-packages/mercurial/templatefuncs.pytsl X        ' !%   ! !'