Plan 9 from Bell Labs’s /usr/web/sources/contrib/bichued/root/sys/src/cmd/hg/mercurial/extensions.pyc

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


�
�c@s�ddkZddkZddkZddkZddkZddklZlZhZgZ	d�Z
d�Zd�Zd�Z
d�Zd�Zd	�Zd
�Zd�ZdS(i�N(t_tgettextccs5x.tD]&}t|}|o||fVqqWdS(N(t_ordert_extensions(tnametmodule((s./mercurial/extensions.pyt
extensionss

cCsyt|SWnltj
o`xJti�D]<\}}|id|�p|id|�o|Sq*q*Wt|��nXdS(s'return module with given extension namet.t/N(RtKeyErrort	iteritemstendswith(Rtktv((s./mercurial/extensions.pytfinds
(cCs�|idd�}tii|�}tii|�oYtii|id��\}}ti||g�\}}}ti	||||�Snti
||�SdS(NRRR(treplacetostpatht
expandusertisdirtsplittrstriptimptfind_moduletload_moduletload_source(Rtmodule_nametdtftfdtfpathtdesc((s./mercurial/extensions.pytloadpaths!cCs�|id�p|id�o|d}n|}|tjodSndt|<|ot|d|�}n@d�}y|d|�}Wntj
o||�}nX|t|<ti|�t|dd�}|o||�ndS(Nshgext.shgext/ishgext.%scSsCt|�}|id�}x!|dD]}t||�}q&W|S(NRi(t
__import__Rtgetattr(Rtmodt
componentstcomp((s./mercurial/extensions.pytimporth8stuisetup(t
startswithRtNoneR tImportErrorRtappendR"(tuiRRt	shortnameR#R&R'((s./mercurial/extensions.pytload*s$ 

	

cCs�|id�}x�|D]�\}}|o|ddjoqqEnyt|||�Wqtj
o
�qtj
of}|o$|itd�|||f�n|itd�||f�|i�odSq�qXqWdS(NRit!s.*** failed to import extension %s from %s: %s
s&*** failed to import extension %s: %s
i(tconfigitemsR.tKeyboardInterruptt	ExceptiontwarnRt	traceback(R,tresultRRtinst((s./mercurial/extensions.pytloadallIs$
c
s�ti||�\}}x2|i�D]$\}}||jo|}Pq%q%W|d���fd�}t�d�|_t�d�|_t|�}	||	d<t|	�||<|S(Nics"ti��ti��||�S(N(tutiltchecksignature(targstkwargs(torigfntwrapper(s./mercurial/extensions.pytwrapest__doc__t
__module__(tcmdutiltfindcmdR
R"R?R@tlistttuple(
ttabletcommandR=taliasestentrytaliastetkeyR>tnewentry((R<R=s./mercurial/extensions.pytwrapcommand]s

	

cs5��fd�}t||��t|||��S(Ncs��||�S(N((R:R;(R<R=(s./mercurial/extensions.pyR>rs(R"tsetattr(t	containertfuncnameR=R>((R<R=s./mercurial/extensions.pytwrapfunctionqsc
Cs�ddk}tiitii|i��}yti|�}Wntj
od
SnXh}d}xM|D]E}|i	d�o/|i
dd�d}tii||�}n9|}tii||d�}tii|�pqmn||jp|t
jp
|djoqmnyt|�}Wntj
o
qmnXti|�}	|i�|	ot|	�i�d||<ntd	�||<t|�|jot|�}qmqmW||fS(s_find disabled extensions from hgext
    returns a dict of {name: desc}, and the max name lengthi�Nis.pyRis__init__.pyt__init__s(no help text available)(Ni(thgextRRtdirnametabspatht__file__tlistdirtOSErrorR)RtrsplittjointexistsRtopentIOErrorthelpt	moduledoctcloseRt
splitlinesRtlen(
RStextpathtfilestextst	maxlengthRJRRtfiletdoc((s./mercurial/extensions.pytdisabledys>!	'
cCs�h}d}g}xut�D]j\}}t|i�p
td�}|id�d}tt|�|�}|i�di�||<qW||fS(sDreturn a dict of {name: desc} of extensions, and the max name lengthis(no help text available)Ri�(	RRR?RRtmaxRbRatstrip(ReRftexthelpstenametextRh((s./mercurial/extensions.pytenabled�s
(RRR8RAR^ti18nRRRRRRR R.R7RMRQRiRo(((s./mercurial/extensions.pys<module>s$		
						.

Bell Labs OSI certified Powered by Plan 9

(Return to Plan 9 Home Page)

Copyright © 2021 Plan 9 Foundation. All Rights Reserved.
Comments to webmaster@9p.io.