HEX
Server: Apache
System: Linux p102.lithium.hosting 4.18.0-553.141.1.el8_10.x86_64 #1 SMP Fri Jul 10 17:48:02 UTC 2026 x86_64
User: bvzmoamr (9955)
PHP: 8.1.34
Disabled: syslog
Upload Files
File: //usr/lib64/python2.7/site-packages/mercurial/discovery.pyc
�
1�3\c@@s�ddlmZddlZddlmZddlmZmZmZddl	m
Z
mZmZm
Z
mZmZmZmZdedd�Zdefd	��YZdeded
�Zd�Zed�Zd
�Zd�Zd�Zd�ZdS(i(tabsolute_importNi(t_(thextnullidtshort(t	bookmarkst	branchmapterrortphasestscmutiltsetdiscoveryt
treediscoverytutilc	@s�|jd�s%tj||||�S|rc|jj�t�fd�|D��rc|t|fSntj|j	||d|d|�}|\}}}t
|�||p�t
|�fS(s�Return a tuple (common, anyincoming, heads) used to identify the common
    subset of nodes between repo and remote.

    "common" is a list of (at least) the heads of the common subset.
    "anyincoming" is testable as a boolean indicating if any nodes are missing
      locally. If remote does not support getbundle, this actually is a list of
      roots of the nodes that would be incoming, to be supplied to
      changegroupsubset. No code except for pull should be relying on this fact
      any longer.
    "heads" is either the supplied heads, or else the remote's heads.
    "ancestorsof" if not None, restrict the discovery to a subset defined by
      these nodes. Changeset outside of this set won't be considered (and
      won't appears in "common")

    If you pass heads and they are all known locally, the response lists just
    these heads in "common" and in "heads".

    Please use findcommonoutgoing to compute the set of outgoing nodes to give
    extensions a good hook into outgoing.
    t	getbundlec3@s|]}�|�VqdS(N((t.0th(t	knownnode(s9/usr/lib64/python2.7/site-packages/mercurial/discovery.pys	<genexpr>9stabortwhenunrelatedtancestorsof(tcapableRtfindcommonincomingt	changelogthasnodetalltFalseR
tfindcommonheadstuitlist(	trepotremotetheadstforceRtrestcommontanyinctsrvheads((Rs9/usr/lib64/python2.7/site-packages/mercurial/discovery.pyRs	toutgoingcB@sMeZdZdddd�Zd�Zejd��Zejd��Z	RS(sRepresents the set of nodes present in a local repo but not in a
    (possibly) remote one.

    Members:

      missing is a list of all nodes present in local but not in remote.
      common is a list of all nodes shared between the two repos.
      excluded is the list of missing changeset that shouldn't be sent remotely.
      missingheads is the list of heads of missing.
      commonheads is the list of heads of common.

    The sets are computed on demand from the heads, unless provided upfront
    by discovery.c
C@s/d||fkst�|j}|dkr<|j�}n|r�g}xC|D];}|jg|j|�D]}|tkrk|^qk�qOW|j||�\}	}
}t|	�}|}g|D]}||kr�|^q�}n|s�tg}n||_	||_
||_d|_d|_
g|_dS(N(tNonetAssertionErrorRRtextendtparentsRtnodesbetweentsettcommonheadstmissingheadst_revlogt_commont_missingtexcluded(
tselfRR+R,tmissingrootstclt	discbasestntptcsetstrootsRtincluded((s9/usr/lib64/python2.7/site-packages/mercurial/discovery.pyt__init__Qs(	
9(					cC@s1|jj|j|j�}|\|_|_dS(N(R-tfindcommonmissingR+R,R.R/(R1tsets((s9/usr/lib64/python2.7/site-packages/mercurial/discovery.pyt_computecommonmissinglscC@s#|jdkr|j�n|jS(N(R.R%R=(R1((s9/usr/lib64/python2.7/site-packages/mercurial/discovery.pyR!qs
cC@s#|jdkr|j�n|jS(N(R/R%R=(R1((s9/usr/lib64/python2.7/site-packages/mercurial/discovery.pytmissingws
N(
t__name__t
__module__t__doc__R%R:R=Rt
propertycacheR!R>(((s9/usr/lib64/python2.7/site-packages/mercurial/discovery.pyR$Bs
	c@sHt|dd�}|dkr<t||d|d|�}n|\|_}}|jjtjpg|j}	|	s�|p|j	�|_
n+|dkr�|jd�j	�|_
g|jd�D]}
|
j
�^q�|_n�|jj|j|�}|\|_}g|_}
g|_}xV|D]N}||}
|
j�tjksS|
j�rc|j|�q"|
j|�q"Wt|
�t|�kr�|}ntj|||�}||_
|rD|j�|j�t�fd�|jD��}t�j|��||_t|j�}g|j
D]}||kr |^q |_
n|S(sOReturn an outgoing instance to identify the nodes present in repo but
    not in other.

    If onlyheads is given, only nodes ancestral to nodes in onlyheads
    (inclusive) are included. If you already know the local repo's heads,
    passing them in onlyheads is faster than letting them be recomputed here.

    If commoninc is given, it must be the result of a prior call to
    findcommonincoming(repo, other, force) to avoid recomputing it here.

    If portable is given, compute more conservative common and missingheads,
    to make bundles created from the instance more portable.RRtservedssecret() or extinct()c3@s|]}�j|�VqdS(N(trev(RR5(R3(s9/usr/lib64/python2.7/site-packages/mercurial/discovery.pys	<genexpr>�sN(R$R%RR+t_phasecachet
phaserootsRtsecrettobsstoreRR,tfilteredR*tnodeR0RR;R.R/tphasetextincttappendtlentnewheadsR=t	ancestors(Rtothert	onlyheadsRt	commoninctportabletogt_anyt_hdst
mayexcludetctxR<t
allmissingR>R0RJR,tmissingrevsR+R((R3s9/usr/lib64/python2.7/site-packages/mercurial/discovery.pytfindcommonoutgoing}s@.



!		
	.c@sh|jj��|j}|j}�j}i}t�fd�|jD��}|j��}|jdi�j	�}WdQX|t|�}|j
|�t�}	x�|j�D]�\}
}|	j|
�g}g}
|j
}x7|D]/}||�r|j|�q�|
j|�q�W|t|�|
f||
<q�Wt�fd�|jD��}t�}xI|D]A}|j�}
|j|
�|
|krcdggf||
<qcqcWx|	|D]
}
||
=q�Wtjd�|j�D��}|j�d�|D��x)|j�D]\}
}|||
d(q
WxU|j�D]G\}
}x'|D]}|dk	rI|j�qIqIW|gf||
<q6W�jrd�jj�t�fd�|jD��}|t�fd	�|jD��O}�jj|d
t�}xqt|j��D]Z\}
}|\}}}}t|||�}|t|d�|t|d�f||
<qWn|S(scompute a summary of branch and heads status before and after push

    return {'branch': ([remoteheads], [newheads],
                       [unsyncedheads], [discardedheads])} mapping

    - branch: the branch name,
    - remoteheads: the list of remote heads known locally
                   None if the branch is new,
    - newheads: the new remote heads (known locally) with outgoing pushed,
    - unsyncedheads: the list of remote heads unknown locally,
    - discardedheads: the list of heads made obsolete by the push.
    c3@s|]}�|j�VqdS(N(tbranch(RR5(R(s9/usr/lib64/python2.7/site-packages/mercurial/discovery.pys	<genexpr>�sRNc3@s|]}�|VqdS(N((RR5(R(s9/usr/lib64/python2.7/site-packages/mercurial/discovery.pys	<genexpr>�scs@s5|]+\}}|ddk	r||dfVqdS(iiN(R%(RR]R((s9/usr/lib64/python2.7/site-packages/mercurial/discovery.pys	<genexpr>�s	cs@s|]}|j�VqdS(N(RD(RRY((s9/usr/lib64/python2.7/site-packages/mercurial/discovery.pys	<genexpr>�sic3@s|]}�|�VqdS(N((RR(ttorev(s9/usr/lib64/python2.7/site-packages/mercurial/discovery.pys	<genexpr>sc3@s|]}�|�VqdS(N((RR(R^(s9/usr/lib64/python2.7/site-packages/mercurial/discovery.pys	<genexpr>st	inclusivei(Rt
unfilteredRR$RR*R>tcommandexecutortcallcommandtresulttdifference_updatet	iteritemstaddRRMRR]R%RtbranchcachetupdatetsortRHRDR,R+RPtTruetsortedt_postprocessobsolete(tpushopRR$R3theadssumtbranchestet	remotemaptnewbranchestremotebranchesR]RtknowntunsyncedRRt
missingctxttouchedbranchesRYtnewmapROtitemstltfutureheadstallfuturecommontremoteheadst
unsyncedheadstplaceholderRc((RR^s9/usr/lib64/python2.7/site-packages/mercurial/discovery.pyt
_headssummary�sf
			
	
	
	


	#c@s�|jj�t�fd�|D��}|jd||j�}td�|D��}|rhdg}ng}i|||gfd6S(s;Compute branchmapsummary for repo without branchmap supportc3@s!|]}�|�r|VqdS(N((RR(R(s9/usr/lib64/python2.7/site-packages/mercurial/discovery.pys	<genexpr>ssheads(%ln + %ln)cs@s|]}|j�VqdS(N(RJ(Rtc((s9/usr/lib64/python2.7/site-packages/mercurial/discovery.pys	<genexpr>sN(RRRkR*R>R%(RR}R$tinctoldheadstrRORu((Rs9/usr/lib64/python2.7/site-packages/mercurial/discovery.pyt_oldheadssummary
sc
	C@s9|jj�}|j}|j}|j��&}|jdidd6�j�}WdQXt�}g|jj	dd�D]}|j
|�^qt}x�|D]�}	|j|	�}
|
r|
|kr|j|	�||
}}t
j|||�r1|j|j��q1q�|	|kr�|	|kr�|j||	�q�q�W|S(NtlistkeysRt	namespacetpushing(RR`Rt
_bookmarksRaRbRcR*Rt
configlistt
expandnametgett	changectxRt	validdestRfRJ(
RmRRtlocalbookmarksRptremotebookmarkstbookmarkedheadstbtnewbookmarkstbmtrnodetlctxtrctx((s9/usr/lib64/python2.7/site-packages/mercurial/discovery.pyt_nowarnheads s$			.
cC@s&|jj�}|j}|j}|j}|j}t|j�}|tgkrUdS|j	d�rst
|�}nt||||�}||_g|j
�D]"\}}	|	ddkr�|^q�}
|
r|rdjt|
��}tjtd�|dtd���nt|�}d}
x�t|j
��D]�\}}	|	\}}}}|dkrkt�}nt|�}|j|�d}t|�}|j|�|rAd|kr�d}	ntj||�}	|	dkr�|jjtd��qA|dkr|jjtd	�|	�qA|jjtd
�||	f�n|dkr�t|�dkr�t|�}|
dkr�td�|}
td
�}q�q�n/t|�t|�kr�t|||�}n|r5|
dkr�|dkrtd�t|d�|f}
nc||dj�rUtd�t|d�||dj�df}
ntd�t|d�}
|r�td�}q�td
�}n|dkr�|jjtd��n|jjtd�|�x+|D] }|jjdt|��q�Wq5q5W|
r"tj|
d|��ndS(skCheck that a push won't add any outgoing head

    raise Abort error and display ui message as needed.
    NRis, s%push creates new remote branches: %s!thints8use 'hg push --new-branch' to create new remote branchess,remote has heads that are not known locally
s0remote has heads that are not known locally: %s
s?remote has heads on branch '%s' that are not known locally: %s
is0push creates new branch '%s' with multiple headss?merge or see 'hg help push' for details about pushing new headstdefaults/push creates new remote head %s on branch '%s'!s3push creates new remote head %s with bookmark '%s'!s push creates new remote head %s!sHpull and merge or see 'hg help push' for details about pushing new headssnew remote heads:
s!new remote heads on branch '%s':
s %s
(R�N( RR`RR$R}t	newbranchtbooltincomingRRR�R�t
pushbranchmapReR%tjoinRkRtAbortRR�R*RhR	t
nodesummariesRtstatusRNRRRtnote(RmRRR$R}R�R�RnR]RRrtbranchnamestnowarnheadsterrormsgROR~tdiscardedheadstoldhstdhstnewhsR�R((s9/usr/lib64/python2.7/site-packages/mercurial/discovery.pyt
checkheads=s�					


				,	
%c@s^|j}|j���jj}�jjj�tj��jj	����fd����fd�}t
jt�j
|���j
j}t�}t�}t�}	t�}
xo|D]g}|�kr�|	j|�q�|j|�d	k	rd}|jj|t|��n|
j|�q�Wt|	�dkrO|
t|�Bt�fSx�|	rI|	j�}
�|
��ks���|
��r�|j|
�qRn�jd|
|	|�}g|D]}||�^q�}t�fd�|D��s)t��fd�|D��s)t�fd�|D��r9|j|
�qR|j|
�qRW||
O}||fS(
s�post process the list of new heads with obsolescence information

    Exists as a sub-function to contain the complexity and allow extensions to
    experiment with smarter logic.

    Returns (newheads, discarded_heads) tuple
    c@s��|��kS(N((R�(tgetphasetpublictunfi(s9/usr/lib64/python2.7/site-packages/mercurial/discovery.pyt<lambda>�tc@s�|��kS(N((R5(tfuturecommonR^(s9/usr/lib64/python2.7/site-packages/mercurial/discovery.pyR��R�s=checkheads: remote head unknown locally has local marker: %s
isonly(%n, (%ln+%ln))c3@s|]}�|�VqdS(N((RR�(tispublic(s9/usr/lib64/python2.7/site-packages/mercurial/discovery.pys	<genexpr>�sc3@s!|]}�|��kVqdS(N((RR5(R�R^(s9/usr/lib64/python2.7/site-packages/mercurial/discovery.pys	<genexpr>�sc3@s|]}�|�VqdS(N((RR5(thasoutmarker(s9/usr/lib64/python2.7/site-packages/mercurial/discovery.pys	<genexpr>�sN(RR`RRJtnodemapR�RR�RERKt	functoolstpartialtpushingmarkerforRHt
successorsR*RfR%RtdebugRRNtpoptrevstany(RmR�tcandidate_newhsRttonodetispushedtsuccessorsmarkersR�t	discardedtlocalcandidatetunknownheadsRtmsgtnht
branchrevsR�tbranchnodes((R�R�R�R�R�R^R�s9/usr/lib64/python2.7/site-packages/mercurial/discovery.pyRl�sL						
	$
	
cC@s�|j}|g}t|�}x�|r�|j�}||�rCtS|j|d�}xk|D]c}|d}	|	s�|dpd}	nx7|	D]/}
|
|kr�|j|
�|j|
�q�q�Wq\Wq!WtS(s�true if some markers are to be pushed for node

    We cannot just look in to the pushed obsmarkers from the pushop because
    discovery might have filtered relevant markers. In addition listing all
    markers relevant to all changesets in the pushed set would be too expensive
    (O(len(repo)))

    (note: There are cache opportunity in this function. but it would requires
    a two dimensional stack.)
    ii(((R�R*R�RjR�RfRMR(RHR�RJR�tstacktseentcurrenttmarkerstmtnextsR5((s9/usr/lib64/python2.7/site-packages/mercurial/discovery.pyR��s"			



(t
__future__RR�ti18nRRJRRRR�RRRRR	R
RRR%RRtobjectR$R\R�R�R�R�RlR�(((s9/usr/lib64/python2.7/site-packages/mercurial/discovery.pyt<module>s:$;<	P		p	L