Qc@sddlmZddlZddlZddlZddlZdefdYZdddZ ddZ dZ dZ dd Z d Zd Zd Zd ZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZ dZ!dZ"dZ#d Z$d!Z%d"Z&d#Z'd$Z(d%Z)ied&6ed'6ed(6ed)6ed*6ed+6ed,6ed-6ed.6ed/6ed06ed16ed26ed36ed46ed56ed66ed76e d86e!d96e"d:6e$d;6e#d<6e%d=6e&d>6e'd?6e(d@6e)dA6Z*dBZ+ie+dC6Z,e,j-e*e,j.Z/dS(Di(thexNt_hybridcBs&eZddZdZdZRS(cCs4||_||_|r$||_n d|_dS(NcSs|jdS(Ni(tvalues(tx((s8/sys/lib/python2.7/site-packages/mercurial/templatekw.pyts(tgenRtjoinfmt(tselfRRR((s8/sys/lib/python2.7/site-packages/mercurial/templatekw.pyt__init__s    cCs|jS(N(R(R((s8/sys/lib/python2.7/site-packages/mercurial/templatekw.pyt__iter__sccsx|jD] }|Vq WdS(N(R(RR((s8/sys/lib/python2.7/site-packages/mercurial/templatekw.pyt__call__sN(t__name__t __module__tNoneRR R (((s8/sys/lib/python2.7/site-packages/mercurial/templatekw.pyRs  cKsK|s|}nt||||}t|g|D]}i||6^q1S(N(t _showlistR(tnameRtpluraltelementtargstfR((s8/sys/lib/python2.7/site-packages/mercurial/templatekw.pytshowlists c +s|d|r|}n d}|sTd|}|krP||VndSkrt|dtrdj|Vnx|D]}t||VqWdSd|}|kr||Vn|jfd}d } | kr|j} nd} x|D]}||Vq$W| dk rY|| d | Vnd |} | kr| |VndS( sexpand set of values. name is name of key in template map. values is list of strings or dicts. plural is plural of name, if not simply name + 's'. expansion works like this, given name 'foo'. if values is empty, expand 'no_foos'. if 'foo' not in template map, return values as a string, joined by space. expand 'start_foos'. for each value, expand 'foo'. if 'last_foo' in template map, expand it instead of 'foo' for last key. expand 'end_foos'. ttempltstno_Nit tstart_cs{yj|WnZttfk rmy%x|D]\}}||                cCsCd|kr;|j|jj|jd |dt k rK|j ||j d|jDqBnX||d | f|scss|]}|jVqdS(N(R=(R>R?((s8/sys/lib/python2.7/site-packages/mercurial/templatekw.pys si(iiR:( R=R*ttagsttagtypetdateR'tsortedtmaxtparentstKeyErrortappendtextend( R5R6tcacheR=ttodottR@tpdatetpdisttptag((R9s8/sys/lib/python2.7/site-packages/mercurial/templatekw.pyt getlatesttagshs.        4,,  cs:idkr!tnfd}|S(Ncs|kr~i|<j|}xV|D]K}|j|}|j|j|}|||<|kr,Pq,q,Wn||kr||Sy||jSWntjk rdSXdS(slooks up all renames for a file (up to endrev) the first time the file is given. It indexes on the changerev and only parses the manifest if linkrev != changerev. Returns rename info for fn at changerev rev.N(tfiletlinkrevtrenamedR4terrort LookupErrorR (tfnR=tfltitlrRR(tendrevtrcacheR5(s8/sys/lib/python2.7/site-packages/mercurial/templatekw.pyt getrenameds      (R tlen(R5RYR[((RYRZR5s8/sys/lib/python2.7/site-packages/mercurial/templatekw.pyt getrenamedfns  cKs |jS(s8:author: String. The unmodified author of the changeset.(tuser(R5R6RR((s8/sys/lib/python2.7/site-packages/mercurial/templatekw.pyt showauthorscKstj||jS(s0:bisect: String. The changeset bisection status.(thbisecttlabelR4(R5R6RR((s8/sys/lib/python2.7/site-packages/mercurial/templatekw.pyt showbisectscKs|djS(sV:branch: String. The name of the branch on which the changeset was committed. R6(tbranch(R((s8/sys/lib/python2.7/site-packages/mercurial/templatekw.pyt showbranchscKs9|dj}|dkr5td|gdd|SdS(s:branches: List of strings. The name of the branch on which the changeset was committed. Will be empty if the branch name was default. R6tdefaultRcRtbranchesN(RcR(RRc((s8/sys/lib/python2.7/site-packages/mercurial/templatekw.pyt showbranchess cKs |dj}td||S(sR:bookmarks: List of strings. Any bookmarks associated with the changeset. R6tbookmark(t bookmarksR(RRi((s8/sys/lib/python2.7/site-packages/mercurial/templatekw.pyt showbookmarksscKsI|d}g|jD]}d||f^q}td|dd|S(s::children: List of strings. The children of the changeset.R6s%d:%stchildrenRtchild(RkR(RR6tcctxt childrevs((s8/sys/lib/python2.7/site-packages/mercurial/templatekw.pyt showchildrens )cKs |jS(sC:date: Date information. The date when the changeset was committed.(RB(R5R6RR((s8/sys/lib/python2.7/site-packages/mercurial/templatekw.pytshowdatescKs|jjS(s5:desc: String. The text of the changeset description.(t descriptiontstrip(R5R6RR((s8/sys/lib/python2.7/site-packages/mercurial/templatekw.pytshowdescriptionsc KsStjtj|j}tj|\}}}}} dt|||fS(st:diffstat: String. Statistics of changes with the following format: "modified files: +added/-removed lines" s %s: +%s/-%s(tpatcht diffstatdatatutilt iterlinestdifft diffstatsumR\( R5R6RRtstatstmaxnametmaxtotaltaddstremovestbinary((s8/sys/lib/python2.7/site-packages/mercurial/templatekw.pyt showdiffstatscksq|d}x`t|djjD]B\}}|j}|jtd|d||d|Vq'WdS(NRR6tkeytvaluetextra(RCRtitemsR)RR((RRRR((s8/sys/lib/python2.7/site-packages/mercurial/templatekw.pyt showextrass  ) cKsF|d|d|d}}}tdt|||ddd|S(s;:file_adds: List of strings. Files added by this changeset.R5R6R7tfile_addiRRP(RR8(RR5R6R7((s8/sys/lib/python2.7/site-packages/mercurial/templatekw.pyt showfileaddss c Ks|d|d}}|djd}|dkrd|krWt|d|d:file_mods: List of strings. Files modified by this changeset.R5R6R7tfile_modiRRP(RR8(RR5R6R7((s8/sys/lib/python2.7/site-packages/mercurial/templatekw.pyt showfilemodss cKstd|dj|S(sZ:files: List of strings. All files modified, added, or removed by this changeset. RPR6(RR1(R((s8/sys/lib/python2.7/site-packages/mercurial/templatekw.pyt showfilesscKst|||dS(sW:latesttag: String. Most recent global tag in the ancestors of this changeset. i(RO(R5R6RRIR((s8/sys/lib/python2.7/site-packages/mercurial/templatekw.pyt showlatesttagscKst|||dS(s<:latesttagdistance: Integer. Longest path to the latest tag.i(RO(R5R6RRIR((s8/sys/lib/python2.7/site-packages/mercurial/templatekw.pytshowlatesttagdistance"scKs{|d|d|d}}}|j}|jtd|jj|jddt|jd|d|S(NR5R6RR=iR4tmanifest(R)RR(RR=t changesetR(RR5R6R((s8/sys/lib/python2.7/site-packages/mercurial/templatekw.pyt showmanifest&s   (cKs |jS(s\:node: String. The changeset identification hash, as a 40 hexadecimal digit string. (R(R5R6RR((s8/sys/lib/python2.7/site-packages/mercurial/templatekw.pytshownode-scKs|jjS(s:p1rev: Integer. The repository-local revision number of the changeset's first parent, or -1 if the changeset has no parents.(R3R=(R5R6RR((s8/sys/lib/python2.7/site-packages/mercurial/templatekw.pyt showp1rev3scKs|jjS(s:p2rev: Integer. The repository-local revision number of the changeset's second parent, or -1 if the changeset has no second parent.(tp2R=(R5R6RR((s8/sys/lib/python2.7/site-packages/mercurial/templatekw.pyt showp2rev8scKs|jjS(s:p1node: String. The identification hash of the changeset's first parent, as a 40 digit hexadecimal string. If the changeset has no parents, all digits are 0.(R3R(R5R6RR((s8/sys/lib/python2.7/site-packages/mercurial/templatekw.pyt showp1node=scKs|jjS(s:p2node: String. The identification hash of the changeset's second parent, as a 40 digit hexadecimal string. If the changeset has no second parent, all digits are 0.(RR(R5R6RR((s8/sys/lib/python2.7/site-packages/mercurial/templatekw.pyt showp2nodeCscKs |jS(s):phase: String. The changeset phase name.(tphasestr(R5R6RR((s8/sys/lib/python2.7/site-packages/mercurial/templatekw.pyt showphaseIscKs |jS(s.:phaseidx: Integer. The changeset phase index.(tphase(R5R6RR((s8/sys/lib/python2.7/site-packages/mercurial/templatekw.pyt showphaseidxMscKs |jS(s>:rev: Integer. The repository-local changeset revision number.(R=(R5R6RR((s8/sys/lib/python2.7/site-packages/mercurial/templatekw.pytshowrevQscKstd|dj|S(s?:tags: List of strings. Any tags associated with the changeset.RR6(RR@(R((s8/sys/lib/python2.7/site-packages/mercurial/templatekw.pytshowtagsUstauthortbisectRcRfRiRkRBtdesctdiffstattextrast file_addsRtfile_copies_switcht file_delst file_modsR1t latesttagtlatesttagdistanceRR4tp1revtp1nodetp2revtp2nodeRtphaseidxR=R@cKsdS(s:parents: List of strings. The parents of the changeset in "rev:node" format. If the changeset has only one "natural" parent (the predecessor revision) nothing is shown.N((R((s8/sys/lib/python2.7/site-packages/mercurial/templatekw.pyt _showparentssRE(0R4RRtRvRSR`tobjectRR RRR8ROR]R_RbRdRgRjRoRpRsRRRRRRRRRRRRRRRRRRRRtkeywordsRt dockeywordsRRt i18nfunctions(((s8/sys/lib/python2.7/site-packages/mercurial/templatekw.pyts$  ?  !