-=[ Mr. Bumblebee ]=-
_Indonesia_

Path : /usr/lib/python2.7/dist-packages/mercurial/
File Upload :
Current File : //usr/lib/python2.7/dist-packages/mercurial/branchmap.pyc

ó
Ì\,Tc@sddlmZmZmZmZddlZddlZddlZd„Zd„Z	idd6dd6dd6dd6Zd	„Zd
e
fd„ƒYZdS(iÿÿÿÿ(tbinthextnullidtnullrevNcCs)d}|jr%d||jf}n|S(s7name of a branchcache file for a given repo or repoviews
cache/branch2s%s-%s(t
filtername(trepotfilename((s7/usr/lib/python2.7/dist-packages/mercurial/branchmap.pyt	_filename
s	cCsSy8|jt|ƒƒ}|jƒjdƒ}|jƒWnttfk
rRdSXyw|jdƒjddƒ}|d \}}t	|ƒt
|ƒ}}d}t|ƒdkrÅt	|dƒ}ntd|d|d|ƒ}|j
|ƒsþtdƒ‚nxÈ|D]À}|sqn|jddƒ\}	}
}|
d	krMtd
ƒ‚ntj|jƒƒ}|	|krtd|	ƒ‚nt	|	ƒ}	|j|gƒj|	ƒ|
dkr|jj|	ƒqqWWn‚tk
rà‚notk
rN}|jjrEd
}
|jdk	r$|
d|j7}
n|
d7}
|jj|
|ƒnd}nX|S(Ns
it ittipnodettiprevtfilteredhashstip differstocsinvalid branch statesnode %s does not existtcsinvalid branchheads caches (%s)s: %s
(topenerRtreadtsplittclosetIOErrortOSErrortNonetpopRtinttlentbranchcachetvalidfort
ValueErrortencodingttolocaltstript
setdefaulttappendt_closednodestaddtKeyboardInterruptt	Exceptiontuit	debugflagRtdebug(RtftlinestcachekeytlasttlrevRtpartialtltnodetstatetlabeltinsttmsg((s7/usr/lib/python2.7/dist-packages/mercurial/branchmap.pyRsR	



tvisibletservedt	immutabletbasecsQ|j}|j}|jj|ƒ‰g}ˆdksFˆj|ƒrÜt|ƒ‰ˆdkrÜtj|ƒ}|dkr…tƒ‰qÙ|j	|ƒ}|j
ƒjƒ‰|jj|j}|j
‡fd†|DƒƒqÜn|j
|jdˆjdƒƒ|r"ˆj||ƒˆj|ƒnˆj|ƒs=t|ƒ‚ˆ|j|j<dS(Nc3s$|]}|ˆjkr|VqdS(N(R
(t.0tr(R,(s7/usr/lib/python2.7/dist-packages/mercurial/branchmap.pys	<genexpr>^ststarti(t	changelogRt
_branchcachestgetRRRtsubsettableRtfilteredt	branchmaptcopytfilteredrevstextendtrevsR
tupdatetwritetAssertionError(RtclRRCt
subsetnametsubsett	extrarevs((R,s7/usr/lib/python2.7/dist-packages/mercurial/branchmap.pytupdatecacheNs(		# RcBszeZdZdeeddd„Zd„Zd„Zd„Z	d„Z
ed„Zd„Z
d„Zd	„Zd
„ZRS(
s/A dict like object that hold branches heads cache.

    This cache is used to avoid costly computations to determine all the
    branch heads of a repo.

    The cache is serialized on disk in the following format:

    <tip hex node> <tip rev number> [optional filtered repo hex hash]
    <branch head hex node> <open/closed state> <branch name>
    <branch head hex node> <open/closed state> <branch name>
    ...

    The first line is used to check if the cache is still valid. If the
    branch cache is for a filtered repo view, an optional third hash is
    included that hashes the hashes of all filtered revisions.

    The open/closed state is represented by a single letter 'o' or 'c'.
    This field can be used to avoid changelog reads when determining if a
    branch head closes a branch or not.
    cCsYtt|ƒj|ƒ||_||_||_|dkrLtƒ|_n	||_dS(N(	tsuperRt__init__R	R
RRtsetR (tselftentriesR	R
Rtclosednodes((s7/usr/lib/python2.7/dist-packages/mercurial/branchmap.pyRM|s			cs‚|j}|jsdSd}t‡fd†|jDƒƒ}|r~tjƒ}x|D]}|jd|ƒqTW|jƒ}n|S(sBbuild hash of revision filtered in the current cache

        Tracking tipnode and tiprev is not enough to ensure validity of the
        cache as they do not help to distinct cache that ignored various
        revision bellow tiprev.

        To detect such difference, we build a cache of all ignored revisions.
        c3s$|]}|ˆjkr|VqdS(N(R
(R7R8(RO(s7/usr/lib/python2.7/dist-packages/mercurial/branchmap.pys	<genexpr>—ss%s;N(R:RARtsortedtutiltsha1RDtdigest(RORRGtkeyRCtstrev((ROs7/usr/lib/python2.7/dist-packages/mercurial/branchmap.pyt
_hashfilteredŠs			
cCsQy8|j|jj|jƒko6|j|j|ƒkSWntk
rLtSXdS(s¹Is the cache content valid regarding a repo

        - False when cached tipnode is unknown or if we detect a strip.
        - True when cache is up to date or a subset of current repo.N(R	R:R.R
RRYt
IndexErrortFalse(ROR((s7/usr/lib/python2.7/dist-packages/mercurial/branchmap.pyRŸs

cCsP|d}t}x3t|ƒD]%}||jkr|}t}PqqW||fS(shReturn tuple with last open head in heads and false,
        otherwise return last closed head and true.iÿÿÿÿ(tTruetreversedR R[(ROtheadsttiptclosedth((s7/usr/lib/python2.7/dist-packages/mercurial/branchmap.pyt
_branchtipªs
cCs|j||ƒdS(s“Return the tipmost open head on branch head, otherwise return the
        tipmost closed head on branch.
        Raise KeyError for unknown branch.i(Rb(ROtbranch((s7/usr/lib/python2.7/dist-packages/mercurial/branchmap.pyt	branchtip¶scCs?||}|s;g|D]}||jkr|^q}n|S(N(R (RORcR`R^Ra((s7/usr/lib/python2.7/dist-packages/mercurial/branchmap.pytbranchheads¼s
+ccs9x2|jƒD]$\}}||f|j|ƒVq
WdS(N(t	iteritemsRb(ROtbnR^((s7/usr/lib/python2.7/dist-packages/mercurial/branchmap.pytiterbranchesÂscCs"t||j|j|j|jƒS(s-return an deep copy of the branchcache object(RR	R
RR (RO((s7/usr/lib/python2.7/dist-packages/mercurial/branchmap.pyR@Æsc
Csvy<|jt|ƒddtƒ}t|jƒt|jƒg}|jdk	rg|j	t|jƒƒn|j
dj|ƒdƒd}x‚t|j
ƒƒD]n\}}x_|D]W}|d7}||jkrÕd}nd}|j
d	t|ƒ|tj|ƒfƒq­WqšW|jƒ|jjd
d|jt|ƒ|ƒWn3tttjfk
rq}	|jjd|	ƒnXdS(
Ntwt
atomictempRs
iiR
tos	%s %s %s
Rs2wrote %s branch cache with %d labels and %d nodes
s couldn't write branch cache: %s
(RRR\RR	tstrR
RRRREtjoinRRRfR Rt	fromlocalRR$tlogRRRRRStAbortR&(
RORR'R)t	nodecountR0tnodesR.R/R1((s7/usr/lib/python2.7/dist-packages/mercurial/branchmap.pyREËs,

	
csitjƒ}|j‰i}ˆj}x[|D]S}||ƒ\}}|j|gƒj|ƒ|r+|jjˆj|ƒƒq+q+Wx|jƒD]\}}	|j|gƒ}
t	‡fd†|
Dƒƒ}|	j
ƒ|j|	ƒxS|	r5|	jƒ}||krqãnt	ˆj
|gt|ƒƒƒ}
||
8}qãWt|ƒ}g|D]}ˆj|ƒ^qI||<|d}||jkrˆj|ƒ|_||_qqW|j|ƒs't|_t|_x`|jƒD]O}t‡fd†|Dƒƒ}||jkrшj|ƒ|_||_qÑqÑWn|j|ƒ|_tjƒ|}|jjdd|j|ƒdS(sÙGiven a branchhead cache, self, that may have extra nodes or be
        missing heads, and a generator of nodes that are strictly a superset of
        heads missing, this function updates self to be correct.
        c3s|]}ˆj|ƒVqdS(N(RX(R7R.(RG(s7/usr/lib/python2.7/dist-packages/mercurial/branchmap.pys	<genexpr>ùsiÿÿÿÿc3s|]}ˆj|ƒVqdS(N(RX(R7R.(RG(s7/usr/lib/python2.7/dist-packages/mercurial/branchmap.pys	<genexpr>sRs(updated %s branch cache in %.4f seconds
N(ttimeR:t
branchinfoRRR R!R.RfRNtsortRDRt	ancestorstminRRR
R	RRRtvaluestmaxRYRR$RoR(RORtrevgent	starttimetnewbranchest
getbranchinfoR8RctclosesbranchtnewheadrevstbheadstbheadsettlatestRvt	bheadrevsRXR
R^tduration((RGs7/usr/lib/python2.7/dist-packages/mercurial/branchmap.pyRDåsL		
 

	!&
		(N(t__name__t
__module__t__doc__RRRRMRYRRbRdR[ReRhR@RERD(((s7/usr/lib/python2.7/dist-packages/mercurial/branchmap.pyRfs	
							(R.RRRRRRSRsRRRR=RKtdictR(((s7/usr/lib/python2.7/dist-packages/mercurial/branchmap.pyt<module>s"		5

	

Copyright © 2017 || Recoded By Mr.Bumblebee