-=[ Mr. Bumblebee ]=-
_Indonesia_

Path : /usr/lib/python2.7/dist-packages/bzrlib/
File Upload :
Current File : //usr/lib/python2.7/dist-packages/bzrlib/rules.pyc

๓
๎:๏Nc@@sหdZddlmZddlmZmZmZmZmZddl	m
Z
dZdZe
eƒZdadefd„ƒYZd	efd
„ƒYZdefd„ƒYZd
„Zd„ZeƒdS(ssRule-based definition of preferences for selected files in selected branches.

See ``bzr help rules`` for details.
i(tabsolute_import(tconfigtcmdlineterrorstglobbingtosutils(t	configobjs	.bzrrulessname t_RulesSearchercB@s)eZdZd„Zd„Zd„ZRS(s/An object that provides rule-based preferences.cC@st|jƒ‚dS(sฦReturn the preferences for a path as name,value tuples.

        :param path: tree relative path
        :return: () if no rule matched, otherwise a sequence of name,value
          tuples.
        N(tNotImplementedErrort	get_items(tselftpath((s0/usr/lib/python2.7/dist-packages/bzrlib/rules.pyR	0scC@st|jƒ‚dS(sReturn selected preferences for a path as name,value tuples.

        :param path: tree relative path
        :param names: the list of preferences to lookup
        :return: () if no rule matched, otherwise a sequence of name,value
          tuples. The sequence is the same length as names,
          tuple order matches the order in names, and
          undefined preferences are given the value None.
        N(Rtget_selected_items(R
Rtnames((s0/usr/lib/python2.7/dist-packages/bzrlib/rules.pyR9s
cC@s+x$|j||gƒD]
\}}|SWdS(stGet a single preference for a single file.
        
        :returns: The string preference value, or None.
        N(RtNone(R
Rtpreference_nametkeytvalue((s0/usr/lib/python2.7/dist-packages/bzrlib/rules.pytget_single_valueEs"(t__name__t
__module__t__doc__R	RR(((s0/usr/lib/python2.7/dist-packages/bzrlib/rules.pyR-s			t_IniBasedRulesSearchercB@s#eZd„Zd„Zd„ZRS(cC@stj|ddƒ|_|jjƒ}g}i|_x^|D]V}|jtƒr=tj|t	ƒ}|j
|ƒx|D]}||j|<qyWq=q=Wt|ƒt|ƒkr้g|D]}|jtƒsถ|^qถ}tj
|ƒ‚n$|rtj|ƒ|_n	d|_dS(sฎConstruct a _RulesSearcher based on an ini file.

        The content will be decoded as utf-8.

        :param inifile: the name of the file or a sequence of lines.
        tencodingsutf-8N(Rt	ConfigObjt_cfgtkeystpattern_to_sectiont
startswithtFILE_PREFS_PREFIXRtsplittFILE_PREFS_PREFIX_LENtextendtlenRtUnknownRulesRt_OrderedGlobstert	_globsterR(R
tinifiletsectionstpatternstst
file_patternstfptunknowns((s0/usr/lib/python2.7/dist-packages/bzrlib/rules.pyt__init__Qs"	



cC@s]|jdkrdS|jj|ƒ}|dkr5dS|j|j|}t|jƒƒSdS(sSee _RulesSearcher.get_items.N(((R$RtmatchRRttupletitems(R
Rtpattall((s0/usr/lib/python2.7/dist-packages/bzrlib/rules.pyR	ksc@sg|jdkrdS|jj|ƒ}|dkr5dS|j|j|‰t‡fd†|DƒƒSdS(s&See _RulesSearcher.get_selected_items.c3@s$|]}|ˆj|ƒfVqdS(N(tget(t.0tk(R1(s0/usr/lib/python2.7/dist-packages/bzrlib/rules.pys	<genexpr>sN(((R$RR-RRR.(R
RR
R0((R1s0/usr/lib/python2.7/dist-packages/bzrlib/rules.pyRvs(RRR,R	R(((s0/usr/lib/python2.7/dist-packages/bzrlib/rules.pyROs		t_StackedRulesSearchercB@s#eZd„Zd„Zd„ZRS(cC@s
||_dS(swConstruct a _RulesSearcher based on a stack of other ones.

        :param searchers: a sequence of searchers.
        N(t	searchers(R
R6((s0/usr/lib/python2.7/dist-packages/bzrlib/rules.pyR,„scC@s1x*|jD]}|j|ƒ}|r
|Sq
WdS(sSee _RulesSearcher.get_items.((R6R	(R
Rtsearchertresult((s0/usr/lib/python2.7/dist-packages/bzrlib/rules.pyR	‹s
cC@s4x-|jD]"}|j||ƒ}|r
|Sq
WdS(s&See _RulesSearcher.get_selected_items.((R6R(R
RR
R7R8((s0/usr/lib/python2.7/dist-packages/bzrlib/rules.pyR“s
(RRR,R	R(((s0/usr/lib/python2.7/dist-packages/bzrlib/rules.pyR5‚s		cC@stjtjƒdƒS(s"Return the default rules filename.trules(RtpathjoinRt
config_dir(((s0/usr/lib/python2.7/dist-packages/bzrlib/rules.pytrules_filenameœscC@sttƒƒadS(N(RR<t_per_user_searcher(((s0/usr/lib/python2.7/dist-packages/bzrlib/rules.pytreset_rulesกsN(Rt
__future__RtbzrlibRRRRRtbzrlib.util.configobjRtRULES_TREE_FILENAMERR!RRR=tobjectRRR5R<R>(((s0/usr/lib/python2.7/dist-packages/bzrlib/rules.pyt<module>s("3		

Copyright © 2017 || Recoded By Mr.Bumblebee