³ò ø$•Jc@sÏddkZddkZddkZddkZddkZddkZddklZlZl Z l Z ddk l Z l Z ddklZddklZlZlZlZddklZlZlZddklZdd d d d d ddddddddddddgZd„Zd„Zd„Zd„Zd„Zed„Z d „Z!d!„Z"e"Z#d"„Z$d#„Z%d$„Z&d%„Z'd&„Z(e(Z)d'„Z*d(„Z+d)„Z,d*„Z-d+„Z.dS(,iÿÿÿÿN(terrortarchivalt templaterttemplatefilters(tshortthex(tbinary(t paritygent staticfilet get_contactt ErrorResponse(tHTTP_OKtHTTP_FORBIDDENtHTTP_NOT_FOUND(tgraphmodtlogtrawfiletfilet changelogtshortlogt changesettrevtmanifestttagstbranchestsummarytfiledifftdifftannotatetfilelogtarchivetstatictgraphcCsJd|ijo&|iddot|||ƒSnt|||ƒSdS(NRi(tformRR(twebtreqttmpl((s./sys/lib/python/mercurial/hgweb/webcommands.pyRs"c CsUti|i|iiddgƒdƒ}|p-t|||ƒ}|it|iƒ|Snyti |i|ƒ}Wnat i j oR}y-t|||ƒ}|it|iƒ|SWqÜt j o |‚qÜXnX|i ƒ}|iƒ}ti|ƒd}|djot|ƒodpd}n|it||t|ƒƒ|gS(NRtisapplication/octet-streams text/plain(twebutilt cleanpathtrepoR!tgetRtrespondR tctypetfilectxRt LookupErrorR tpathtdatat mimetypest guess_typetNoneRtlen( R"R#R$R.tcontenttfctxtinstttexttmt((s./sys/lib/python/mercurial/hgweb/webcommands.pyR s*+   cs)|iƒ}|iƒ‰t|iƒ‰tˆƒo(ti|ƒdpd}d|‰n‡‡fd†}|dd|dti|ƒd|ƒd |i ƒd t |i ƒƒd |i ƒd |i ƒd |iƒdti|ƒdti|ƒdti|ƒdti|ƒd|iƒi|ƒƒ S(Nisapplication/octet-streams (binary:%s)c3sixbtˆitƒƒD]K\}}h|d<d|dd<d|dd<ˆiƒdÚst latestentrycsˆdd|S(Rƒi((R‰(R{(s./sys/lib/python/mercurial/hgweb/webcommands.pyRŠÛsR~R(R!R&t changectxR(R3Rt RepoErrorRtmaxshortchangesRrRRRZtminRRNt revnavgenRRER€( R"R#R$RR`thiRrRbRttposR‡((R<R{R"R„R…R$s./sys/lib/python/mercurial/hgweb/webcommands.pyR¡s4     cCst|||dtƒS(NR(RR?(R"R#R$((s./sys/lib/python/mercurial/hgweb/webcommands.pyRÞsc &CsÎti|i|ƒ}ti|i|d|iƒƒ}ti|ƒ}g}t|iƒ}x_|iƒD]Q}||jodpd} |i || d|i ƒd|d|i ƒƒƒqgWt|iƒ}ti |i||d|ƒ} |dd| d |iƒd|i ƒd ti|ƒd ti|ƒd|d |d |iƒd|iƒd|iƒd|d|i|i ƒƒdti|i|iƒƒdti|ƒdti|i|ƒdti|i|ƒƒS(Nt changesettagt filenodelinkt filenolinkRERR<RRRRJRKtchangesetbranchRFRHRGRgR~RRIRhR(R&RŒR(RlRERRRRNRgR[RR@tdiffsR2RRSRTRPRQRGR€RoRpRq( R"R#R$R`Ryt showbranchRgR<RWttemplateR—((s./sys/lib/python/mercurial/hgweb/webcommands.pyRás<!       csti|i|ƒ‰ti|i|iiddgƒdƒ}ˆiƒ‰ˆiƒ}h‰h‰t|i ƒ‰|o|ddjo|d7}nt |ƒ}d|‰xшi ƒD]Ã\}}|| |joq¼n||}|i dƒ} t | ƒdjo|ˆ|kscSsd|iƒj|iƒfS(tclose(textraR(R`((s./sys/lib/python/mercurial/hgweb/webcommands.pyRŠnsc;séd}xÜtˆdˆdtƒD]Â}|djo||jodSn|d7}|iƒˆjo d}n*ˆii|iƒƒp d}nd}hˆiƒd<|iƒd <|d <|iƒd <|iƒd s<< ""    < =  ! M   E " . > !