HEX

Warning: set_time_limit() [function.set-time-limit]: Cannot set time limit - prohibited by configuration in /home/u547966/brikov.ru/www/wp-content/plugins/admin-menu-editor/menu-editor.php on line 745
Server: Apache
System: Linux 4.19.0-0.bpo.9-amd64 x86_64 at red40
User: u547966 (5490)
PHP: 5.3.29-mh2
Disabled: syslog, dl, popen, proc_open, proc_nice, proc_get_status, proc_close, proc_terminate, posix_mkfifo, chown, chgrp, accelerator_reset, opcache_reset, accelerator_get_status, opcache_get_status, pcntl_alarm, pcntl_fork, pcntl_waitpid, pcntl_wait, pcntl_wifexited, pcntl_wifstopped, pcntl_wifsignaled, pcntl_wifcontinued, pcntl_wexitstatus, pcntl_wtermsig, pcntl_wstopsig, pcntl_signal, pcntl_signal_dispatch, pcntl_get_last_error, pcntl_strerror, pcntl_sigprocmask, pcntl_sigwaitinfo, pcntl_sigtimedwait, pcntl_exec, pcntl_getpriority, pcntl_setpriority
Upload Files
File: //usr/lib/python2.7/dist-packages/mercurial/bookmarks.pyc

Xc@@s5ddlmZddlZddlZddlmZddlmZmZddl	m
Z
mZmZ
mZmZdZdefd	YZd
ZdZdZd
ZdZdZdZdZdZddddZdZddZdZ dZ!dZ"dZ#dS(i(tabsolute_importNi(t_(tbinthex(tencodingterrortlocktobsoletetutilcC@s{d}dtjkrYy|jd}WqYtk
rU}|jtjkrVqVqYXn|dkrw|jd}n|S(sHook so that extensions that mess with the store can hook bm storage.

    For core, this just handles wether we should see pending
    bookmarks or the committed ones. Other extensions (like share)
    may need to tweak this behavior further.
    t
HG_PENDINGsbookmarks.pendingt	bookmarksN(tNonetostenvirontvfstIOErrorterrnotENOENT(trepotbkfiletinst((s7/usr/lib/python2.7/dist-packages/mercurial/bookmarks.pyt
_getbkfiles
tbmstorecB@sweZdZdZedZejdZdZdZdZ	dZ
dZd	Zd
Z
RS(sStorage for bookmarks.

    This object should do all bookmark-related reads and writes, so
    that it's fairly simple to replace the storage underlying
    bookmarks without having to clone the logic surrounding
    bookmarks. This type also should manage the active bookmark, if
    any.

    This particular bmstore implementation stores bookmarks as
    {hash}\s{name}
 (the same format as localtags) in
    .hg/bookmarks. The mapping is stored as {name: nodeid}.
    cC@s&tj|||_yt|}x|D]}|j}|sJq,nd|krv|jjtd|q,n|jdd\}}t	j
|}y|jj|||<Wq,t
k
rq,Xq,WWn+tk
r}|jtjkrqnXt|_t|||_t|_dS(Nt s$malformed line in .hg/bookmarks: %r
i(tdictt__init__t_repoRtstriptuitwarnRtsplitRttolocalt	changelogtlookuptLookupErrorRRRtTruet_cleant_readactivet_activet_aclean(tselfRRtlinetshatrefspecR((s7/usr/lib/python2.7/dist-packages/mercurial/bookmarks.pyR;s0
	


	cC@s|jS(N(R&(R(((s7/usr/lib/python2.7/dist-packages/mercurial/bookmarks.pytactiveUscC@sA|dk	r+||kr+td|n||_t|_dS(Nsbookmark %s does not exist!(RtAssertionErrorR&tFalseR'(R(tmark((s7/usr/lib/python2.7/dist-packages/mercurial/bookmarks.pyR,Ys	cO@st|_tj|||S(N(R.R$Rt__setitem__(R(targstkwargs((s7/usr/lib/python2.7/dist-packages/mercurial/bookmarks.pyR0as	cC@st|_tj||S(N(R.R$Rt__delitem__(R(tkey((s7/usr/lib/python2.7/dist-packages/mercurial/bookmarks.pyR3es	cC@s-|jdd|jddd|jd<dS(srecord that bookmarks have been changed in a transaction

        The transaction is then responsible for updating the file content.R
tlocationtplaint1tbookmark_movedN(R
(taddfilegeneratort_writethookargs(R(ttr((s7/usr/lib/python2.7/dist-packages/mercurial/bookmarks.pytrecordchangeiscC@s|j}|j|kr.d|_|jn|j]|jdddtdt}z,y|j|Wn|jnXWd|j	XWdQXdS(sFactored out for extensibilityR
twt
atomictempt
checkambigN(
t
_bookmarksR,Rt_writeactivetwlockRR#R:tdiscardtclose(R(Rtrbmtfile_((s7/usr/lib/python2.7/dist-packages/mercurial/bookmarks.pyt
_writerepoqs		

	
cC@s|jr
dS|jj|jdk	r{|jjdddtdt}z|jtj	|jWd|j
XnEy|jjjdWn+tk
r}|j
t
jkrqnXWdQXt|_dS(Nsbookmarks.currentR>R?R@(R'RRCR&RRR#twriteRt	fromlocalREtunlinktOSErrorRR(R(tfR((s7/usr/lib/python2.7/dist-packages/mercurial/bookmarks.pyRBs		cC@s]x@|jD]2\}}|jdt|tj|fq
Wt|_|jjdS(Ns%s %s
(	t	iteritemsRIRRRJR#R$Rtinvalidatevolatilesets(R(tfptnametnode((s7/usr/lib/python2.7/dist-packages/mercurial/bookmarks.pyR:s*	cC@s8|dkr4|jr|jStjtdn|S(Nt.sno active bookmark(R,RtAbortR(R(tbname((s7/usr/lib/python2.7/dist-packages/mercurial/bookmarks.pyt
expandnames
	(t__name__t
__module__t__doc__RtpropertyR,tsetterR0R3R=RHRBR:RV(((s7/usr/lib/python2.7/dist-packages/mercurial/bookmarks.pyR-s							cC@sd}y|jd}Wn,tk
rG}|jtjkrCndSXzzyGtj|jpfdgd}|dks||krd}nWn,tk
r}|jtjkrndSXWd|jX|S(s
    Get the active bookmark. We can have an active bookmark that updates
    itself as we commit. This function returns the name of that bookmark.
    It is stored in .hg/bookmarks.current
    sbookmarks.currenttiN(	RRRRRRRt	readlinesRE(RtmarksR/tfileR((s7/usr/lib/python2.7/dist-packages/mercurial/bookmarks.pyR%s$"
	cC@s||j_|jjdS(s
    Set the given bookmark to be 'active', meaning that this bookmark will
    follow new commits that are made.
    The name is recorded in .hg/bookmarks.current
    N(RAR,RB(RR/((s7/usr/lib/python2.7/dist-packages/mercurial/bookmarks.pytactivatescC@sd|j_|jjdS(s7
    Unset the active bookmark in this repository.
    N(RRAR,RB(R((s7/usr/lib/python2.7/dist-packages/mercurial/bookmarks.pyt
deactivatescC@sU|j}|j}g|djD]}|j^q#}||koT|||kS(s
    Tell whether the 'active' bookmark (the one that follows new commits)
    points to one of the parents of the current working directory (wdir).

    While this is normally the case, it can on occasion be false; for example,
    immediately after a pull, the active bookmark can be moved to point
    to a place different than the wdir. This is solved by running `hg update`.
    N(t_activebookmarkRARtparentsRR(RR/R^tpRc((s7/usr/lib/python2.7/dist-packages/mercurial/bookmarks.pytisactivewdirparents			)cC@st}|j}g|D]8}|jddd|jdddkr|^q}xa|D]Y}|dks[d|krq[n|r[|||kr[||kr||=t}qq[q[W|S(sDelete divergent versions of bm on nodes in deletefrom.

    Return True if at least one bookmark was deleted, False otherwise.t@ii(R.RARR#(Rt
deletefromtbmtdeletedR^tbt	divergentR/((s7/usr/lib/python2.7/dist-packages/mercurial/bookmarks.pytdeletedivergents	E
cC@smd}|dkrc|j}t|r:|dj}qc|rc|jtd||}qcn||fS(sReturn a tuple (targetrev, movemarkfrom) indicating the rev to
    check out and where to move the active bookmark from, if needed.RSsupdating to active bookmark %s
N(RRbReRRtstatusR(RRtcheckouttmovemarkfromt
activemark((s7/usr/lib/python2.7/dist-packages/mercurial/bookmarks.pytcalculateupdates	c
C@s|}|j}t}|j}|s(tS|||kr||}g|D]<}|jddd|jdddkrI||^qI}	|jj|jg}
g|	D]0}|j|
ks||kr|j^q}t|||||r|j||<t	}qnt
|||r4t	}n|rd}}z6|j}|j
d}|j||jWdtj||Xn|S(NRfiitbookmark(RAR.R,RR t	ancestorstrevRRt	validdestR#RlRRttransactionR=REtlockmodtrelease(
RRcRRRgR^tupdateR,tnewRjtdivstancRR<((s7/usr/lib/python2.7/dist-packages/mercurial/bookmarks.pyRys4		

<=	

cC@st|di}i}|jj}xT|jD]F\}}||r1d|ksd|jdr1t|||<q1q1W|S(NRARf(tgetattrR thasnodeRNtendswithR(RR^tdR~tktv((s7/usr/lib/python2.7/dist-packages/mercurial/bookmarks.pyt
listbookmarkss'c	C@sd}}}z|j}|j}|jd}|j}t|j|d}||kru||krutS|dkr||=n$||krtS||j||<|j	||j
tSWdtj
|||XdS(NR
R\(RRCRRvRARtgetR.RRR=RER#RwRx(	RR4toldRzR>tlR<R^texisting((s7/usr/lib/python2.7/dist-packages/mercurial/bookmarks.pytpushbookmark,s$	


cC@s|sd}n|s$d}n|r9t|}n"t|}t|}||B}ggggggggf}	|	dj}
|	dj}|	dj}|	dj}
|	dj}|	dj}|	d	j}|	d
j}xt|D]}||krB||kr,||d|||fq||ddfq||krn|
||||dfq|||}|||}||kr||||fq||krp||krp||}||}|j|jkr2t|||r|
|||fqm||||fqt|||rZ||||fq||||fq||||fqW|	S(sCompare bookmarks between srcmarks and dstmarks

    This returns tuple "(addsrc, adddst, advsrc, advdst, diverge,
    differ, invalid)", each are list of bookmarks below:

    :addsrc:  added on src side (removed on dst side, perhaps)
    :adddst:  added on dst side (removed on src side, perhaps)
    :advsrc:  advanced on src side
    :advdst:  advanced on dst side
    :diverge: diverge
    :differ:  changed, but changeset referred on src is unknown on dst
    :invalid: unknown on both side
    :same:    same on both side

    Each elements of lists in result tuple is tuple "(bookmark name,
    changeset ID on source side, changeset ID on destination
    side)". Each changeset IDs are 40 hexadecimal digit string or
    None.

    Changeset IDs of tuples in "addsrc", "adddst", "differ" or
     "invalid" list may be unknown for repo.

    This function expects that "srcmarks" and "dstmarks" return
    changeset ID in 40 hexadecimal digit string for specified
    bookmark. If not so (e.g. bmstore "repo._bookmarks" returning
    binary value), "srchex" or "dsthex" should be specified to convert
    into such form.

    If "targets" is specified, only bookmarks listed in it are
    examined.
    cS@s|S(N((tx((s7/usr/lib/python2.7/dist-packages/mercurial/bookmarks.pyt<lambda>dscS@s|S(N((R((s7/usr/lib/python2.7/dist-packages/mercurial/bookmarks.pyRfsiiiiiiiiN(tsettappendtsortedRRtRu(Rtsrcmarkstdstmarkstsrchextdsthexttargetstbsett
srcmarksett
dstmarksettresultstaddsrctadddsttadvsrctadvdsttdivergetdiffertinvalidtsameRjtscidtdcidtsctxtdctx((s7/usr/lib/python2.7/dist-packages/mercurial/bookmarks.pytcompareBsR!








  

c	C@s|dkrd}n|jdr9tj|j}nx[|jdD]J\}}|jdrytj|j}n||krId||fSqIWxGtddD]6}d||f}||ks|||kr|SqWd	S(
sReturn appropriate diverged bookmark for specified ``path``

    This returns None, if it is failed to assign any divergent
    bookmark name.

    This reuses already existing one with "@number" suffix, if it
    refers ``remotenode``.
    RfR\sfile:tpathss%s@%siids%s@%dN(t
startswithRturltpathtconfigitemstrangeR(	RRjRt
localmarkst
remotenodeRdtuRtn((s7/usr/lib/python2.7/dist-packages/mercurial/bookmarks.pyt_diverges		cC@sU|jd|j}t|||dt\}}}	}
}}}
}|j}|j}|jddtr}|j}}nt|}g}x|D]\}}}||kr|j	|t
||td|fq||kr|j||jtd||d fqqWx@|	D]8\}}}|j	|t
||td|fq%W|j
d	|Dx|D]\}}}||kr|j||j	|t
||td
|fqt
|}t|||||}|r)|j	|||td||ffq|td|qWx`||
D]T\}}}||krL|j||j	|t
||td
|fqLqLWxT|D]L\}}}||kr|j||jtd||d fqqW|rQ|}x4t|D]&\}}}}|||<||qW|j|ndS(
Nschecking for updated bookmarks
RRtquietbookmarkmovesadding remote bookmark %s
s0remote bookmark %s points to locally missing %s
isupdating bookmark %s
cs@s|]}|dVqdS(iN((t.0R((s7/usr/lib/python2.7/dist-packages/mercurial/bookmarks.pys	<genexpr>ssimporting bookmark %s
s#divergent bookmark %s stored as %s
sAwarning: failed to assign numbered name to divergent bookmark %s
(tdebugRARRRmRt
configboolR.RRRRtremovetdifference_updateRDRRR=(RRtremotemarksRttrfunctexplicitRRRRRRRRRRmRtchangedRjRRtsnodetdbR<RRtwritertmsg((s7/usr/lib/python2.7/dist-packages/mercurial/bookmarks.pytupdatefromremotesd
	0		

	

	
c@s|jtdt||jd|jdt}|\}}}}}}	}
}g|jrpdn	d|jrfd}nfd}x-|D]%\}
}}||
|tdqWx-|D]%\}
}}||
|td	qWx-|D]%\}
}}||
|td
qWx-|	D]%\}
}}||
|tdq@Ws|jtdd
Sx!tD]}|j	|qWdS(s/Show bookmarks incoming from other to repo
    s searching for changed bookmarks
R
RcS@s|S(N((tid((s7/usr/lib/python2.7/dist-packages/mercurial/bookmarks.pyRscS@s|d S(Ni((R((s7/usr/lib/python2.7/dist-packages/mercurial/bookmarks.pyRsc@s$jd|||fdS(Ns   %-25s %s %s
(R(RjRtst(tgetidt	incomings(s7/usr/lib/python2.7/dist-packages/mercurial/bookmarks.pytaddsc@s!jd||fdS(Ns   %-25s %s
(R(RjRR(RR(s7/usr/lib/python2.7/dist-packages/mercurial/bookmarks.pyRstaddedtadvancedtdivergedRsno changed bookmarks found
ii(
RmRRtlistkeysRARt	debugflagtverboseRRI(RRtothertrRRRRRRRRRRjRRts((RRs7/usr/lib/python2.7/dist-packages/mercurial/bookmarks.pytincomings2				c@s|jtdt||j|jddt}|\}}}}}}	}
}g|jrpdn	d|jrfd}nfd}x-|D]%\}
}}||
|tdqWx1|D])\}
}}||
d	d
tdqWx-|D]%\}
}}||
|tdqWx-|D]%\}
}}||
|td
qDWx-|	D]%\}
}}||
|tdqtWs|jtddSx!tD]}|j	|qWdS(s/Show bookmarks outgoing from repo to other
    s searching for changed bookmarks
R
RcS@s|S(N((R((s7/usr/lib/python2.7/dist-packages/mercurial/bookmarks.pyR(scS@s|d S(Ni((R((s7/usr/lib/python2.7/dist-packages/mercurial/bookmarks.pyR*sc@s$jd|||fdS(Ns   %-25s %s %s
(R(RjRR(Rt	outgoings(s7/usr/lib/python2.7/dist-packages/mercurial/bookmarks.pyR,sc@s!jd||fdS(Ns   %-25s %s
(R(RjRR(RR(s7/usr/lib/python2.7/dist-packages/mercurial/bookmarks.pyR/sRRi(RiRRRsno changed bookmarks found
ii(
RmRRRARRRRRRI(RRRRRRRRRRRRRRjRRR((RRs7/usr/lib/python2.7/dist-packages/mercurial/bookmarks.pytoutgoings6				cC@sXt||jd|jdt}|\}}}}}}}	}
t|t|fS(sCompare bookmarks between repo and other for "hg summary" output

    This returns "(# of incoming, # of outgoing)" tuple.
    R
R(RRRARtlen(RRRRRRRRRRR((s7/usr/lib/python2.7/dist-packages/mercurial/bookmarks.pytsummaryJs	cC@se|j}||krtS|s&tS|jrT|jtj||jgkS|j|SdS(s?Is the new bookmark destination a valid update from the old oneN(t
unfilteredR.R#tobsstoreRRRt
foregroundt
descendant(RRRz((s7/usr/lib/python2.7/dist-packages/mercurial/bookmarks.pyRuTs	%(($t
__future__RRRti18nRRRRRR\RRRRwRRRRRR%R`RaReRlRqRyRRRRRRRRRRu(((s7/usr/lib/python2.7/dist-packages/mercurial/bookmarks.pyt<module>s.(	w							
	 	
	V	=	*	-