HEX

Warning: set_time_limit() [function.set-time-limit]: Cannot set time limit - prohibited by configuration in /home/u547966/brikov.ru/www/wp-content/plugins/admin-menu-editor/menu-editor.php on line 745
Server: Apache
System: Linux 4.19.0-0.bpo.9-amd64 x86_64 at red40
User: u547966 (5490)
PHP: 5.3.29-mh2
Disabled: syslog, dl, popen, proc_open, proc_nice, proc_get_status, proc_close, proc_terminate, posix_mkfifo, chown, chgrp, accelerator_reset, opcache_reset, accelerator_get_status, opcache_get_status, pcntl_alarm, pcntl_fork, pcntl_waitpid, pcntl_wait, pcntl_wifexited, pcntl_wifstopped, pcntl_wifsignaled, pcntl_wifcontinued, pcntl_wexitstatus, pcntl_wtermsig, pcntl_wstopsig, pcntl_signal, pcntl_signal_dispatch, pcntl_get_last_error, pcntl_strerror, pcntl_sigprocmask, pcntl_sigwaitinfo, pcntl_sigtimedwait, pcntl_exec, pcntl_getpriority, pcntl_setpriority
Upload Files
File: //usr/lib/python2.7/dist-packages/mercurial/minirst.pyc

Xc@@shdZddlmZddlZddlZddlmZddlmZm	Z	dZ
dZd	Zd
Z
dZejdZd
ZdZejdZejdZejdZejdZejdZdZdZdZdZdZejdZdZdZdZ dZ!dZ"dZ#ejd d!ej$Z%d"Z&i	ed#d$6ed%d&6ed'd(6ed)d*6ed+d,6ed-d.6ed/d06ed1d26ed3d46Z'd5Z(d6Z)d7Z*ddd8Z,d9Z-d:ddd;dd<Z.d=Z/d>Z0de1d?Z2dS(@ssimplified reStructuredText parser.

This parser knows just enough about reStructuredText to parse the
Mercurial docstrings.

It cheats in a major way: nested blocks are not really nested. They
are just indented blocks that look like they are nested. This relies
on the user to keep the right indentation for the blocks.

Remember to update https://mercurial-scm.org/wiki/HelpStyleGuide
when adding support for new constructs.
i(tabsolute_importNi(t_(tencodingtutilcC@sd|dtj|fS(Ns%s
%s

s"(Rtcolwidth(ts((s5/usr/lib/python2.7/dist-packages/mercurial/minirst.pytsection scC@sd|dtj|fS(Ns%s
%s

t=(RR(R((s5/usr/lib/python2.7/dist-packages/mercurial/minirst.pyt
subsection#scC@sd|dtj|fS(Ns%s
%s

t-(RR(R((s5/usr/lib/python2.7/dist-packages/mercurial/minirst.pyt
subsubsection&scC@sd|dtj|fS(Ns%s
%s

t.(RR(R((s5/usr/lib/python2.7/dist-packages/mercurial/minirst.pytsubsubsubsection)scC@s]|jtj}x8|D]0\}}|j|jd|jd}qW|jtjS(s5
    Apply a list of (find, replace) pairs to a text.

    >>> replace("foo bar", [('f', 'F'), ('b', 'B')])
    'Foo Bar'
    >>> encoding.encoding = 'latin1'
    >>> replace('\x81\\', [('\\', '/')])
    '\x81/'
    >>> encoding.encoding = 'shiftjis'
    >>> replace('\x81\\', [('\\', '/')])
    '\x81\\'
    tascii(tdecodeRtreplacetencode(ttexttsubststutexttftt((s5/usr/lib/python2.7/dist-packages/mercurial/minirst.pyR,s(s\n(?:\s*\n)+cC@sg}xtj|jdjD]i}|j}|r%td|D}g|D]}||^qZ}|ji|d6|d6q%q%W|S(sFind continuous blocks of lines in text.

    Returns a list of dictionaries representing the blocks. Each block
    has an 'indent' field and a 'lines' field.
    s
cs@s+|]!}t|t|jVqdS(N(tlentlstrip(t.0tl((s5/usr/lib/python2.7/dist-packages/mercurial/minirst.pys	<genexpr>Ostindenttlines(t_blockretsplitRtrstript
splitlinestmintappend(RtblockstbRRR((s5/usr/lib/python2.7/dist-packages/mercurial/minirst.pyt
findblocksEs%"cC@s?d}x2|t|kr:d||d<||ddjdr-|dt|kr-||d}||dd|}||ddgkr||=|d8}n||ddjd	r||ddd
 ||dd<nt||ddkr[||ddjdjdr[||ddjdd
dkr[|d7}q	n"||ddd ||dd<tj||dd}|r||j7}||j8}nxi|dt|kr)||dd|kr)d||dd<||ddc|8<|d7}qWn|d7}q	W|S(sFinds literal blocks and adds a 'type' field to the blocks.

    Literal blocks are given the type 'literal', all other blocks are
    given type the 'paragraph'.
    it	paragraphttypeRis::iRs ::it s.. itliteral(RtendswithRt
startswithtfindt	_bulletretmatchtend(R"tiRt
adjustmenttm((s5/usr/lib/python2.7/dist-packages/mercurial/minirst.pytfindliteralblocksTs6
1
%$$
"1s((-|[0-9A-Za-z]+\.|\(?[0-9A-Za-z]+\)|\|) s0^(-([a-zA-Z0-9]), )?(--[a-z0-9-]+)((.*)  +)(.*)$s:(?![: ])([^:]*)(?<! ):[ ]+(.*)s[^ ]s
(=+\s+)*=+cC@sOdttfdttfdttfdttfg}d}d}x|t|krJ||ddkr=||d	}x|D]\}}}||d||rg}xqt|D]c\}	}
|||	||r|ji|d6gd	6||d
d
6n|dd	j|
qW||||d+PqqWn|d7}qHW|S(
sSplit paragraphs into lists.tbullettoptiontfieldt
definitioncS@s||}|dt|kr.||dp1d}|j|sGtS|rv|dkpu|ddkpu|j|S|jdSdS(sDoes itemre match an item at line i?

        A list item can be followed by an indented line or another list
        item (but only if singleline is True).
        itiR'N(RR-tFalseR*(RR/titemret
singlelinetline1tline2((s5/usr/lib/python2.7/dist-packages/mercurial/minirst.pyR-s
*)iR&R%RRii(	R,tTruet	_optionret_fieldret
_definitionreR8Rt	enumerateR!(R"t	listtypesR-R/RR&R9R:titemstjtline((s5/usr/lib/python2.7/dist-packages/mercurial/minirst.pytsplitparagraphss*	icC@sd}x|t|kr||ddkr?|d7}q	n|}x|t|kr||ddkrtj||dd}|j\}}|||dd<|||d<|d7}qHW|d}q	W|S(sFind key for field lists.iR&R5iRtkey(RR?R-tgroups(R"R/RDR1RGtrest((s5/usr/lib/python2.7/dist-packages/mercurial/minirst.pytupdatefieldlistss
)c
C@sd}x|t|kr||ddkr?|d7}q	nd}|}x-|t|krz||ddkrztj||dd}|jd}|jd}|dj}|jdj}|jd	j}	|||dd<d
}
|sd}
nd|r!d
|p$d
d|
||	ff}|j}|||d<t|tj|}|d7}qNWx|||!D]}||d<qW|d}q	W|S(NiR&R4iRiiiiR7s   s%s%ss-%s s	%s--%s %stoptstrtoptstrwidth(	RR>R-tgrouptstripRtmaxRR(
R"R/RLRDR1tshortoptiontgroup3t
longoptiontdesct
longoptionargt	noshortoptopttblock((s5/usr/lib/python2.7/dist-packages/mercurial/minirst.pytupdateoptionlistss:
)		c
C@sfg}d}xM|dt|kr[||ddkrN||ddjdrN||d}||dd|}||ddd}t}x,|D]$}||jd	krt}qqW|r|j|n||=|}	|d8}x[|	t|krJ||	d|krJ|r)||	=q||	dc|8<|	d7}	qWn|d7}qW||fS(
sPrune unwanted containers.

    The blocks must have a 'type' field, i.e., they should have been
    run through findliteralblocks first.
    iiR&R%Rs.. container::RiR(RR*R=RR8R!(
R"tkeeptprunedR/RR0t
containertypetprunetcRD((s5/usr/lib/python2.7/dist-packages/mercurial/minirst.pytprunecontainerss0


)
s^([-=`:.'"~^_*+#])\1+$c
C@sx|D]}|ddkrt|ddkrtj|ddr|dd|ddkrd|d<t|d<|dd}gtt|D]<}||d	kr|dks||d
dkr|^q}g}x|dd
d!D]}||krt|d<qng}|d}xt|D]\}	}
|	d
t|kr||	d
|
}tj|||}|t|7}|j	|j
q4|j	||j
q4W|j	|qW||d<qqW|S(sQFind simple tables

       Only simple one-line table elements are supported
    R&R%RiiittabletheaderRiR'(Rt_tablereR-R8txrangeR=RARtgetcolsR!RN(
R"RWtdivtxtcolumnstrowsRtrowtpostntstarttwidthtv((s5/usr/lib/python2.7/dist-packages/mercurial/minirst.pyt
findtables#s6
	

<

cC@sx|D]}|ddkrt|ddkrtj|ddt|ddkrtj|ddr|ddd|d<d|d<|dd=qqW|S(	sFinds sections.

    The blocks must have a 'type' field, i.e., they should have been
    run through findliteralblocks first.
    R&R%Riiit	underlineR(RRRt
_sectionreR-(R"RW((s5/usr/lib/python2.7/dist-packages/mercurial/minirst.pytfindsectionsUs
+
cC@s[dg}xK|D]C}|ddkrg|dD]}t||^q1|d<qqW|S(	Ns``t"R&R%RR(s``Rr(R%R(R(R"RR#R((s5/usr/lib/python2.7/dist-packages/mercurial/minirst.pytinlineliteralsks
	
1cC@s^d	d
g}xK|D]C}|ddkrg|dD]}t||^q4|d<qqW|S(Ns:hg:`s'hg t`t'R&R%RR(s:hg:`s'hg (RtRu(R%R(R(R"RR#R((s5/usr/lib/python2.7/dist-packages/mercurial/minirst.pythgrolers

1cC@sd}x|t|kr||d||ddkr\||ddkr\|d7}q	||dds{|d7}q	|j|idgd6dd	6d
d6|d7}q	W|S(
sAdds empty blocks for vertical spacing.

    This groups bullets, options, and definitions together with no vertical
    space between them, and adds an empty block between all other blocks.
    iR&R3R4R5RR7iRtmargini(R3R4R5(Rtinsert(R"R/((s5/usr/lib/python2.7/dist-packages/mercurial/minirst.pyt
addmargins}s 

(cC@sd}x|t|kr||}|ddkr|ddjds_|ddgkr||=|t|kr||ddkr||=qq	|d7}q	W|S(	sRemove comments.iR&R%Rs.. s..Rwi(RR*(R"R/R#((s5/usr/lib/python2.7/dist-packages/mercurial/minirst.pyt
prunecommentss
'&
sR\.\. (admonition|attention|caution|danger|error|hint|important|note|tip|warning)::tflagscC@sd}x|t|krtj||dd}|rd||d<||ddd|jd!j}||dd|jd}|r||djdd|n|||d	<||dd=n|d}q	W|S(
sj
    Makes the type of the block an admonition block if
    the first line is an admonition directive
    iRt
admonitionR&iiis   tadmonitiontitle(Rt
_admonitionreR-R.tlowerRx(R"R/R1R}t	firstline((s5/usr/lib/python2.7/dist-packages/mercurial/minirst.pytfindadmonitionss) s
Attention:t	attentionsCaution:tcautions!Danger!tdangersError:terrorsHint:thints
Important:t	importantsNote:tnotesTip:ttipsWarning!twarningcC@sdjttj|d}tj|d}|d}|d}d|dd||f}dtj|d}dtj||d|d	|S(
NR'RRKiRLs%s%s  s %s
t
initindentt
hangindent(tjointmaptstrRNRRRtwrap(RWRlRSRtusablewidththangingRR((s5/usr/lib/python2.7/dist-packages/mercurial/minirst.pytformatoptions

c
C@s|dkrd}nd|d}|ddkrt|d}|dsW||d	St|dd
t|dd
j}||d}djttj|d}d||tj|d|d
|d|fS|ddkrd	S|ddkr(|d7}|d	|j|dd	S|ddkrst	j
|dd|d}d||dd||fS|ddkr|d}gt|D].}	tg|	D]}
t	j
|
^q^q}d}t
|t|d}d|d}dt|||d
}x|D]}
g}xEt||
D]4\}}d|t	j
|}|j||q;Wdj|}tj|d|d
|d|}|r|dr|d	|dt||d	}q||d	7}qW|S|ddkr||dd}t|dd
t|dd
j}||d}djttj|dd}d|tj|d|d
|d|fS|}|ddkr|ddjdr|ddd|dd<qtj|dd}||jd}n|ddkr|d}|td}t|dtkr`|j|}n|jt}||dd|dd<n|dd krt||Sdjttj|d}tj|d|d
|d|d	S(!s"Format a block according to width.iiNR'RR&R|R}Rs
is%s
%s
RlRRRwR(s  RRos
%s%s
%s%s
R_R7iR`R	R6R3s| iR5RGR4(t_admonitiontitlesRRRRRRNRRRRtzipROtsumR!R R*R,R-R.t_fieldwidthtljustR(RWRlRR|thangt	defindentRRoR_R]tetwidthstspanRhRtwRmtpadttermt	subindentR1RG((s5/usr/lib/python2.7/dist-packages/mercurial/minirst.pytformatblocks	
,


A
!&,#

c@sgd}gd}fd}g|D]}|ddkr4|^q4}xvt|D]h\}}|d}|d}|d}|dkr|t|d	}	|d
jttj|}
jd|	|
fn8|dkrjd
|dj|n	|dkr&n|dkrUjd|dj|n|dkr|d}||kr||7}n|j|d}jd|||d|fnb|dkrq|d}jdx}|D]u}
jdxH|
D]@}jdj||jdjdqWjjdqWjdn|dkr|d|||d}|d
jttj|d}
jd||
fnG|d krX|dj	d
d\}}|d!kr|d"|n
|d#|jd$|d
j|g|dn|d%kr|d|||d&}|d
jttj|}
jd||
fnd|d'kr |d|||d(}|d
jttj|}jd||fnrcd)\}}|t
|dkrjjd*|jq||d}|d}||ks||kr|dd+krjd*|jqqcqcWdjS(,sFormat RST blocks as HTMLR7cS@stj|tS(N(tcgitescapeR=(R((s5/usr/lib/python2.7/dist-packages/mercurial/minirst.pyR$sc@sFsdd|krBj||fjd|ndS(Niis<%s>
(R!(Rktlevel(tlistnesttout(s5/usr/lib/python2.7/dist-packages/mercurial/minirst.pytopenlist'sR&RwRRR|R}R's<p>
<b>%s</b> %s
</p>
R%s<p>
%s
</p>
s
R(s<pre>
%s
</pre>
RRois<h%d>%s</h%d>
iR_s<table>
s<tr>s<td>s</td>s</tr>
s	</table>
R6tdls <dt>%s
 <dd>%s
R3R	tultols	 <li> %s
R5RGR4RKis</%s>
sdefinition bullet field option(RARRRRRNR!tindextpopRR(R"t
headernestRRR#RitbtypeRRR|RR/R_RhRmRR3theadRGRVRSRktnbtni((RRs5/usr/lib/python2.7/dist-packages/mercurial/minirst.pyt
formathtmls	)


!##

'








%
.
!
!

cC@sg}t|}x|D]}|dc|7<qWt|}t|}t||pZg\}}t|}t|}t|}t|}t|}t	|}t
|}t|}t|}||fS(s Parse text into a list of blocksR(
R$R2RnR^RqRsRvRFRJRXRRyRz(RRRYRZR"R#((s5/usr/lib/python2.7/dist-packages/mercurial/minirst.pytparsexs"
c@s#djfd|D}|S(NR7c3@s|]}t|VqdS(N(R(RR#(Rl(s5/usr/lib/python2.7/dist-packages/mercurial/minirst.pys	<genexpr>s(R(R"RlR((Rls5/usr/lib/python2.7/dist-packages/mercurial/minirst.pytformatblockssiPtplainc@st|||pg\}}g}|rt|}	g}d}
g}g}t}
x|
t|	kr|	|
\}}}||3|j|
||kr||krt|}t|}|r||krt}
ng}xtd|dD]r}||}||ks!|||kr|jt||	|d}|j|d|j|dqqW|r|j|qn|}|j|xT|
dt|	kr|	|
dd|kr|
d7}
|j|	|
dqWn|
d7}
qWW|
r|jx|D]}g|D]}
||
dd^q!}|dd}||d}ddj	||dgj
d	d
|d<||d|5qWqn|dkrt|}nd
j	fd|D}|d
kr|S||fSd
S(s-Parse and format the text according to width.iiiiiRs"%s"RRrR7thtmlc3@s|]}t|VqdS(N(R(RR#(Rl(s5/usr/lib/python2.7/dist-packages/mercurial/minirst.pys	<genexpr>sN(
RtgetsectionsR=RR!R8RbtextendtreverseRRRtNone(RRlRRYtstyleRR"RZtparentstsectionsR/tlastparentst	synthetictcollapsetnametnestR#tllentplenRRDtparenttsectpathtrealtrealline((Rls5/usr/lib/python2.7/dist-packages/mercurial/minirst.pytformatsf
	

1


%+cC@s,d}d}g}d}x
|D]}|ddkr|d}||kr[||7}n|j|d}|| }|j||||gfq"|ddkrd
}||kr||7}n|j|d}|| }xtdt|dD]}||}|d|kr%Png|dD]}|ddkr0|^q0}	|	r|	dd
}
|d
}|
|kr|d7}Pq|
|kr|d}PqqqW|j||||gfq"|sddgfg}n|ddkrd}|d
}
x|t|kr||dd}|ddkr|d
}t|ddkr|t|ddt|ddjd
7}n|
|krPqn|d7}qW|dkr||d}|d|dkr|d7}n|jd|gfqn|ddj|q"W|S(s=return a list of (section name, nesting level, blocks) tuplesR7icS@si|ddkr|d}n|dd}tj|jd}d|kre|jdd}n|S(NR&R5RGRiRrt((RRRNR(R#Re((s5/usr/lib/python2.7/dist-packages/mercurial/minirst.pytgetnames
R&RRoiR6R5R'iiRRwR(R6R5(RR!trangeRR(R"RRtsecsRR#R/Rtatsiblingst
siblingindentRtpointertbindentRtsindenttblevel((s5/usr/lib/python2.7/dist-packages/mercurial/minirst.pyRsn	




"

 -


"

"
cC@smg}x`t|D]R}|d}t|d|}|jg|jtD]}||f^qLqW|S(s=generate a list of (section name, line text) pairs for searchii(RRR!RR=(R"RlRRRRR((s5/usr/lib/python2.7/dist-packages/mercurial/minirst.pytdecorateblockss
3cC@sMgt|D]}td|D^q
}d|}|djd|Dd}|g}x|D]}g}xvt||D]e\}	}
d|
krdjd|
jdD}
nd|	tj|
}|j|
|qW|j|dj|dqjW|r<t|dkr<|jd|n|j||S(sAGenerate an RST table for the given table data as a list of linescs@s|]}tj|VqdS(N(RR(RR((s5/usr/lib/python2.7/dist-packages/mercurial/minirst.pys	<genexpr>sR'cs@s|]}d|VqdS(RN((RR((s5/usr/lib/python2.7/dist-packages/mercurial/minirst.pys	<genexpr> ss
cs@s|]}|jVqdS(N(R(RR((s5/usr/lib/python2.7/dist-packages/mercurial/minirst.pys	<genexpr>)sii(	RRORRRRR!RRx(tdataRR`R]RRdRRhRRRmR((s5/usr/lib/python2.7/dist-packages/mercurial/minirst.pyt	maketables /
!	
%"
(3t__doc__t
__future__RRtreti18nRR7RRRRR
RRtcompileRR$R2R,R>R?R@RaRFRRJRXR^RpRnRqRsRvRyRzt
IGNORECASER~RRRRRRRRRRRR8R(((s5/usr/lib/python2.7/dist-packages/mercurial/minirst.pyt<module>sf							9	*		$	)	2						






		Q	[	<	F