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

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


�
�c@sdddklZddkZddkZddkZdefd��YZdefd��YZdS(i�(t_NtsortdictcBsPeZdZdd�Zd�Zd�Zd�Zd�Zd�Z	d�Z
RS(	sa simple sorted dictionarycCs%g|_|o|i|�ndS(N(t_listtupdate(tselftdata((s./mercurial/config.pyt__init__s	cCs
t|�S(N(R(R((s./mercurial/config.pytcopyscCsH||jo|ii|�n|ii|�ti|||�dS(N(Rtremovetappendtdictt__setitem__(Rtkeytval((s./mercurial/config.pyRs
cCs
|ii�S(N(Rt__iter__(R((s./mercurial/config.pyRscCs#x|D]}||||<qWdS(N((Rtsrctk((s./mercurial/config.pyRscCs,g}|iD]}||||fq~S(N(R(Rt_[1]R((s./mercurial/config.pytitemsscCs$ti||�|ii|�dS(N(R
t__delitem__RR(RR((s./mercurial/config.pyR sN(t__name__t
__module__t__doc__tNoneRRRRRRR(((s./mercurial/config.pyRs					tconfigcBs�eZdd�Zd�Zd�Zd�Zd�Zd�Zdd�Z	d�Z
d�Zd	�Zd
d�Z
dddd�Zdddd
�ZRS(cCs^h|_h|_|oAx(|iD]}||i�|i|<q#W|ii�|_ndS(N(t_datat_sourceR(RRR((s./mercurial/config.pyR%s		
cCs
t|�S(N(R(R((s./mercurial/config.pyR,scCs
||ijS(N(R(Rtsection((s./mercurial/config.pyt__contains__.scCs|ii|h�S(N(Rtget(RR((s./mercurial/config.pyt__getitem__0sccs x|i�D]}|Vq
WdS(N(tsections(Rtd((s./mercurial/config.pyR2s
cCsdxJ|D]B}||jot�|i|<n|i|i|i|�qW|ii|i�dS(N(RRRR(RRts((s./mercurial/config.pyR5s
cCs|ii|h�i||�S(N(RR(RRtitemtdefault((s./mercurial/config.pyR;scCs|ii||fd�S(Nt(RR(RRR"((s./mercurial/config.pytsource=scCst|ii��S(N(tsortedRtkeys(R((s./mercurial/config.pyR?scCs|ii|h�i�S(N(RRR(RR((s./mercurial/config.pyRAsR$cCsI||jot�|i|<n||i||<||i||f<dS(N(RRR(RRR"tvalueR%((s./mercurial/config.pytsetCs
cCs7tid�}tid�}tid�}tid�}	tid�}
tid�}d}d}
d}t}x�|it�D]�}|d	7}|o�|i|�}|oe|o||joq�n|i||
�d
|id	�}|i	||
|d||f�q�nd}
n|i|�}|oj|id	�}t
ii|�}t
ii
t
ii||��}|o||d|d
|�q�q�n|	i|�oq�n|i|�}|oT|id	�}|o|i||�}n||jot�|i|<q�q�n|i|�}|o`|id	�}
t}|o||joq�n|i	||
|id�d||f�q�n|
i|�}|o\|id	�}|o||joq�n|i||�djo|i||=q�q�ntitd�|||i�f��q�WdS(Ns\[([^\[]+)\]s([^=\s][^=]*?)\s*=\s*(.*\S|)s\s+(\S.*\S)s
(;|#|\s*$)s%unset\s+(\S+)s%include\s+(\S.*\S)R$iis
s%s:%dtremapRisconfig error at %s:%d: '%s'(tretcompileRtFalset
splitlinestTruetmatchRtgroupR)tostpathtdirnametnormpathtjoinRRterrortConfigErrorRtrstrip(RRRRR*tincludet	sectionretitemretcontretemptyretunsetret	includereRR"tlinetconttltmtvtinctbasetname((s./mercurial/config.pytparseIst
# 
!
)cCs=|pt|�}n|i||i�|||i�dS(N(topenRItread(RR3tfpRR*((s./mercurial/config.pyRK�sN(RRRRRRRRRRR%RRR)RIRK(((s./mercurial/config.pyR$s								=(	ti18nRR7R+R2R
RtobjectR(((s./mercurial/config.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.