Plan 9 from Bell Labs’s /usr/web/sources/contrib/jas/root/sys/lib/python2.7/site-packages/mercurial/help.pyc

Copyright © 2021 Plan 9 Foundation.
Distributed under the MIT License.
Download the Plan 9 distribution.


��c@s�ddlmZmZddlZddlZddlZddlZddlZddlZddl	Z	ddl
Z
ddlZddlZddl
Z
ddlZddlZddlZdd�Zd�Zd�Zdd�Zd�Zd	�Zed
dged�ed
�fd
ged�ed
�fdged�ed�fddged�ed�fddged�ed�fddged�ed�fddged�ed�fddged�ed�fd ged!�ed �fd"d#ged$�ed"�fd%d&d'd(ged)�ed&�fd*ged+�ed*�fd,ged-�efd.d/ged0�ed.�fd1ged2�ed1�fd3ged4�ed3�fd5d6ged7�ed5�fd8ged9�ed8�fg�ZiZd:�Zd;�Zd<�Zedd=e	j�ed"d>ej�edd=ej�ed&d?e
j �ed&d@ej!�e"e#dA�Z$dS(Bi�(tgettextt_NicCseg}|ra|jd|�xAt|j��D]*\}}|jdd|||f�q0Wn|S(s-return a text listing of the given extensionss
%s

s
%s:%s: %s
t (tappendtsortedt	iteritems(theadertextstindenttrsttnametdesc((s2/sys/lib/python2.7/site-packages/mercurial/help.pytlistextss%cCsotd��jt�}|jttd�tj���|jttd�tj���dj	|�}|S(Nt
extensionssenabled extensions:sdisabled extensions:t(
tloaddoct
splitlinestTruetextendRRR
tenabledtdisabledtjoin(R	tdoc((s2/sys/lib/python2.7/site-packages/mercurial/help.pytextshelps
""c
Cshg}t}x|D]}t|�dkrC|\}}}}}	n|\}}}}td�}	td�|kr�|r�qnd}
|r�d|}
nd|}|r�|td�|7}nt|t�r�d|	7}t}n-|dk	rt|t�r|d	|	7}n|j|
||f�qWt	j
|d
�}|r[|jtd��ndj|�S(NitVALUEt
DEPRECATEDRt-s--s (default: %s)s %s [+]s %sis3
[+] marked option can be specified multiple times
(tFalsetlenRt
isinstancetlistRtNonetboolRtminirstt	maketableR(
toptionstverbosetdatat
multioccurtoptiontshortopttlongopttdefaultRtoptlabeltsotloR	((s2/sys/lib/python2.7/site-packages/mercurial/help.pytoptrsts2


	cCs/|jd|�|r+|jd|�ndS(Ns"

.. container:: omitted

    %s

s%

.. container:: notomitted

    %s

(R(R	tomittedt
notomitted((s2/sys/lib/python2.7/site-packages/mercurial/help.pytindicateomittedAscs�tj����fd�}igd6gd6gd6gd6}xetD]]\}}}tt||��s�||�s�||��rG|dj|d|f�qGqGWddl}x�jj�D]�}}|j	d	�r��nt
|�d
kr|d}	nd}	tt|dd
d��p)d}
�|ksP||	�sP||
�r�|
j�}|ro|d}	n|jd�djd�}|dj||	f�q�q�WxOtjtj�j�tj�j��D]#\}
}
tjd|
d�}||
�s
||
�r1|dj|
|
j�df�nx�t|di�j�D]�\}}�|ks�t
|�dkrJ||d�rJ|jd�djd�}|djr�t|dj�j�d}ntd�}|dj||f�qJqJWq�W|S(s�Return help topics matching kw.

    Returns {'section': [(name, summary), ...], ...} where section is
    one of topics, commands, extensions, or extensioncommands.
    cs�tj|�kS(N(tencodingtlower(t	container(tkw(s2/sys/lib/python2.7/site-packages/mercurial/help.pyt
lowercontainsMsttopicstcommandsR
textensioncommandsii�NtdebugiiRt__doc__t|t^tcmdtables(no help text available)(R2R3t	helptabletsumtmapRR8ttableRt
startswithRRtgetattrRRtsplittlstript	itertoolstchainR
RRtloadR;R(R5R6tresultstnamesRRR8tcmdtentrytsummarytdocstdoclinestcmdnameR
tmodtcmddoc((R5s2/sys/lib/python2.7/site-packages/mercurial/help.pyt
topicmatchFsN

"
"$
	$%.
 "cs�fd�}|S(s+Return a delayed loader for help/topic.txt.cs�tj�rtj}nt}tjj|�}x<dD]4}tjj||d�}tjj	|�r7Pq7q7Wtjj|�d�}t
tj|��}x)tj
�g�D]}|�|�}q�W|S(Nt.s..thelps.txt(RUs..(tutilt
mainfrozentsyst
executablet__file__tostpathtdirnameRtisdirRtreadfilet	helphookstget(tmoduletbasetdirtdocdirR]Rtrewriter(ttopic(s2/sys/lib/python2.7/site-packages/mercurial/help.pytloader~s
((RhRi((Rhs2/sys/lib/python2.7/site-packages/mercurial/help.pyR{stconfigthgrcsConfiguration FilestdatessDate FormatstpatternssFile Name PatternstenvironmenttenvsEnvironment Variablest	revisionstrevssSpecifying Single Revisionst	multirevstmrevssSpecifying Multiple RevisionstrevsetstrevsetsSpecifying Revision SetstfilesetstfilesetsSpecifying File SetstdiffssDiff Formatssmerge-toolst
mergetoolssMerge Toolst
templatingt	templatesttemplatetstylesTemplate Usageturlss	URL PathsR
sUsing Additional FeaturestsubrepostsubrepotSubrepositoriesthgwebsConfiguring hgwebtglossarytGlossarythgignoretignores!Syntax for Mercurial Ignore FilestphasessWorking with PhasescCstj|g�j|�dS(N(Rat
setdefaultR(RhRg((s2/sys/lib/python2.7/site-packages/mercurial/help.pytaddtopichook�sc
Cs�g}x�t|�D]�}||jp)dj�}|s>qnt|�}|j�}|dg}xB|dD]6}	|	j�jd�r�Pn|jd|	j��qnW|jdj|��qWdj|�}|j	||�S(s�Extract docstring from the items key to function mapping, build a
    .single documentation block and use it to overwrite the marker in doc
    Riis>>>s  s
s

(
RR;trstripRRtstripRCRRtreplace(
RhRtmarkertitemstentriesR
ttexttlinesRPtl((s2/sys/lib/python2.7/site-packages/mercurial/help.pytmakeitemsdoc�s
cs#��fd�}t||�dS(Ncst||���S(N(R�(RhR(R�tsymbols(s2/sys/lib/python2.7/site-packages/mercurial/help.pytadd�s(R�(RhR�R�R�((R�R�s2/sys/lib/python2.7/site-packages/mercurial/help.pytaddtopicsymbols�ss.. predicatesmarkers.. internaltoolsmarkers.. keywordsmarkers.. filtersmarkercsFddl������fd�}d����fd����fd�}��fd�}�fd�}g}	|jd�}
|
r@t|
�}x�d	td
�fdtd�fd
td�fdtd�ffD]Z\}}
||r�|	jd|
�|	jtjt	||�d��|	jd�q�q�Wn�r�dkrd}�rj|f}nH|jd�r�|f}n-|jd�r�|f}n||||f}xD|D]<}y|��}	d}PWq�t
jk
r�|}q�Xq�W|r9|�q9n.�js)td�dg}	n|	j���dj
|	�S(s�
    Generate the help for 'name' as unformatted restructured text. If
    'name' is None, describe the commands available.
    i�Nc	s�y%tj|�jd��\}}Wn?tjk
rf}|jd��fd�}�|�}|SXg}t|ddt�r��s��j�|d��|j	�j
��n|St|�dkr|djd�r�j	d|d�q/|j	d|d|df�n|j	d	|d��rx�j
rxt|�d
krx|j	td�dj|d
��n|j	d
�t|dj�}|s�td�}ntj|dd�r|djjd�r�d�|djd
}qtd�|dj|f}n|jt�}�j
s6�rJ|j	|d�n
|j|�|j	d
�ydtj|�}t|j�p�d}d
|j�kr�td�||f}|j	d|�nWntk
r�nX�j
r'|d
r'|j	dtd��|j	t|d
�j��n�jrf|j	dtd��|j	t�j�j��n�js��s�|j	td�|�q��j
s�td�|}	td�|}
t||	|
�q�n|S(Ntstrictics|jd�j��S(NR=(RFRC(tc(tprefix(s2/sys/lib/python2.7/site-packages/mercurial/help.pyt<lambda>�stbadaliasithgs%s
s	hg %s %s
shg %s
is
aliases: %s
s, s
s(no help text available)t
definitiont!sshell alias for::

    %ssalias for: hg %s

%sRs5use "hg help -e %s" to show help for the %s extensions
%s
s
%s

soptions:sglobal options:s-
use "hg help %s" to show the full help text
sEuse "hg -v help %s" to show more complete help and the global optionss.use "hg -v help %s" to show the global options( tcmdutiltfindcmdRBterrortAmbiguousCommandtargsRDRt
pushbufferRt	popbufferRRCtquietRRRR;RWtsafehasattrR�RRRR
tfindR�tKeyErrorR.R$t
globaloptsR1(R
taliasesRMtinsttselectR	RRRtmsgR/R0(R8tfullthelplisttuit
unknowncmd(R�s2/sys/lib/python2.7/site-packages/mercurial/help.pythelpcmd�sz

""'
 

	

 					cs%�dkrtd�}ntd�}i}i}xH�jj�D]7\}}|jdd�d}|r~||�r~qCn|r��dkr�|dj�jkr�qCn�dkr�|jd�r�qCn|jd�}�jr�jd�r�n|dj	}|r,d	|kr,�j
r,qCnt|�}|sMtd
�}n|j�dj
�||<|jd�||<qCWg}|s��js�|jtd��n|S�js�|j|�nt|�}	xf|	D]^}�j
r||jdd�}
|jd
|
||f�q�|jd
|||f�q�W�s�td�tj��}|r|jd�|j|�n|jtd��g}x.tD]&\}
}}|j|
d|f�q�Wx.|D]#\}}|jd
||f�q�Wng}�js��j
rY|jtd��jf��dkr�|jtd�df�q�q��dkrttd�}n@�r��r�td��}n td��r�d�p�d}|j|df�n|r!xN|D]C\}}|jd|�|r�|jdt|�j
��q�q�Wn|S(Nt	shortlistsbasic commands:

slist of commands:

R<iiR=R:Rs(no help text available)sno commands defined
s, s	 :%s: %s
senabled extensions:s
s
additional help topics:

sglobal options:s+use "hg help" for the full list of commandssBuse "hg help" for the full list of commands or "hg -v" for detailss+use "hg help %s" to show the full help texts=use "hg -v help%s" to show builtin aliases and global optionsRRs
%s
(((RRBRREt
__module__t__name__RCRFt	debugflagR;R$RRR�R�RRR�RR
RRR?R�R.(R�RthtcmdsR�tetfRR	tfnst	commacmdsRR7RKttRtoptlistR�ttitleR#(R8R�R
R�(s2/sys/lib/python2.7/site-packages/mercurial/help.pyR�1s�
		
	
		
	
	'cs"x6tD]\}}}||krPqqWtj|��tj|�g}|sk|jdtd��ntj|d�r�|g|�j	�D]}d|^q�7}n�j
s�td�|}t||�ny4tj
|�j�|jtd�||f�Wntjk
rnX|S(Ns    %s
s(no help text available)t__call__s.use "hg help -v %s" to show more complete helps4
use "hg help -c %s" to see help for the %s command
(R?R�tUnknownCommandR!tsectionRRRWR�RR$R1R�R�RB(R
RKRRR	R�R/(R8R�(s2/sys/lib/python2.7/site-packages/mercurial/help.pyt	helptopic�s(-		c
s�y.tj|�}t|j�p*td�}Wn>tk
rnd}tj|�}|sotj	|��qonXd|kr�|d}}n|j
dd�\}}td�|j
d�d|fg}|r�j|jt
��|jd�n�jstd�|}t||�n|r�y
|j}Wntk
rJi}nXtg|D]}|j
d	d�d
^qU�}	|j�|	j��n|jtd��|S(Nsno help text availables
Ris%s extension - %s

RUi�s.use "hg help -v %s" to show more complete helpR<is@use "hg help extensions" for information on enabling extensions
(R
R�RR;RR�RtdisabledextR�R�RERRRRR$R1R>tAttributeErrortsett__contains__(
R
RRRtheadttailR	R/tctR�tmodcmds(R�R�(s2/sys/lib/python2.7/site-packages/mercurial/help.pythelpext�s8
&		


/cs�tj�|�jdd��\}}}t|j�j�d}ttd�|i||6dd�}|jd�|jtd��|S(	NR�R�is,'%s' is provided by the following extension:Ris
s@use "hg help extensions" for information on enabling extensions
(	R
tdisabledcmdt
configboolRR;RRRR(R
RLtextRRRR	(R�(s2/sys/lib/python2.7/site-packages/mercurial/help.pyt
helpextcmd�s
tkeywordR7tTopicsR8tCommandsR
t
ExtensionsR9sExtension Commandss%s:

is
R�t	extensiontcommandsMercurial Distributed SCM
R(R8RRbRTRRRR!R"RR�R�R�R(R�R
R�R�toptsR�R�R�R�R	R5tmatchesR�R�titqueriesR�R�((R8R�R�R
R�R�s2/sys/lib/python2.7/site-packages/mercurial/help.pythelp_�sPVU$

#
	(%ti18nRRRGRYR\R�R
RuRwt
templatekwttemplatefilterst	filemergeR2RWR!R�RRR.RR1RTRRR?RaR�R�R�R�t	internalstdockeywordstfiltersRRR�(((s2/sys/lib/python2.7/site-packages/mercurial/help.pyt<module>sX0H$			#	5	$			

Bell Labs OSI certified Powered by Plan 9

(Return to Plan 9 Home Page)

Copyright © 2021 Plan 9 Foundation. All Rights Reserved.
Comments to [email protected].