403Webshell
Server IP : 80.87.202.40  /  Your IP : 216.73.216.169
Web Server : Apache
System : Linux rospirotorg.ru 5.14.0-539.el9.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Dec 5 22:26:13 UTC 2024 x86_64
User : bitrix ( 600)
PHP Version : 8.2.27
Disable Function : NONE
MySQL : OFF |  cURL : ON |  WGET : ON |  Perl : ON |  Python : OFF |  Sudo : ON |  Pkexec : ON
Directory :  /lib64/python3.9/site-packages/mercurial/__pycache__/

Upload File :
current_dir [ Writeable] document_root [ Writeable]

 

Command :


[ Back ]     

Current File : /lib64/python3.9/site-packages/mercurial/__pycache__/discovery.cpython-39.opt-1.pyc
a

�+�bX�@s�ddlmZddlZddlmZddlmZmZddlm	Z	m
Z
mZmZm
Z
mZmZmZmZmZddd	�ZGd
d�de�Zddd
�Zdd�Zddd�Zdd�Zdd�Zdd�Zdd�ZdS)�)�absolute_importN�)�_)�hex�short)
�	bookmarks�	branchmap�error�obsolete�phases�pycompat�scmutil�setdiscovery�
treediscovery�utilFc	s�|�d�st�||||�S|rF|jj�t�fdd�|D��rF|d|fStj|j||||d�}|\}}}|r�|s�|jj�t	�fdd�|D��}t
|�||p�t
|�fS)a�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 (but may
      still appear 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.
    s	getbundlec3s|]}�|�VqdS�N���.0�h��	knownnoder�9/usr/lib64/python3.9/site-packages/mercurial/discovery.py�	<genexpr>;�z%findcommonincoming.<locals>.<genexpr>F)Zabortwhenunrelated�ancestorsofc3s|]}�|�VqdSrr�r�n)�has_noderrrIr)�capabler�findcommonincoming�	changelog�hasnode�allrZfindcommonheads�ui�any�list)	�repo�remote�heads�forcer�res�commonZanyincZsrvheadsr)rrrr  s$

�
r c@s>eZdZdZddd�Zdd�Zejdd��Zejd	d
��Z	dS)�outgoinga�Represents the result of a findcommonoutgoing() call.

    Members:

      ancestorsof is a list of the nodes whose ancestors are included in the
      outgoing operation.

      missing is a list of those ancestors of ancestorsof that are present in
      local but not in remote.

      common is a set containing revs common between the local and the remote
      repository (at least all of those that are ancestors of ancestorsof).

      commonheads is the list of heads of common.

      excluded is the list of missing changeset that shouldn't be sent
      remotely.

    Some members are computed on demand from the heads, unless provided upfront
    by discovery.Ncs��j}|dur|��}|rxg}|D]"}|��fdd�|�|�D��q"|�||�\}}	}
t|��|
}�fdd�|D�}n|s��jg}||_||_||_	d|_
d|_g|_dS)Ncsg|]}|�jkr|�qSr)�nullid)r�p)r'rr�
<listcomp>nrz%outgoing.__init__.<locals>.<listcomp>csg|]}|�vr|�qSrrr)�includedrrr0ur)
r!r)�extend�parentsZnodesbetween�setr.�commonheadsr�_revlog�_common�_missing�excluded)�selfr'r5rZmissingroots�clZ	discbasesrZcsets�rootsr)r)r1r'r�__init__cs& zoutgoing.__init__cCs"|j�|j|j�}|\|_|_dSr)r6�findcommonmissingr5rr7r8)r:�setsrrr�_computecommonmissings�zoutgoing._computecommonmissingcCs|jdur|��|jSr)r7r@�r:rrrr,�s
zoutgoing.commoncCs|jdur|��|jSr)r8r@rArrr�missing�s
zoutgoing.missing)NNN)
�__name__�
__module__�__qualname__�__doc__r=r@rZ
propertycacher,rBrrrrr-Ms�

r-cs�t|dd�}|dur$t||||d�}|\|_}}|jjtjpB|j}	|	sX|pR|��|_	n�|dur�|�
d���|_	dd�|�d�D�|_n�|j
�|j|�}
|
\|_}g|_}g|_}
|D]8}||}|��tjks�|��r�|
�|�q�|�|�q�t|�t|�k�r|}nt�|||
�}||_	|�r||��|j
��fdd�|jD�}t��|��||_t|j���fd	d�|j	D�|_	|S)
aNReturn 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 ancestorsof,
    to make bundles created from the instance more portable.N)r*rsservedcSsg|]}|���qSr��node�r�ctxrrrr0�rz&findcommonoutgoing.<locals>.<listcomp>ssecret() or extinct()csh|]}��|��qSr��revr)r;rr�	<setcomp>�rz%findcommonoutgoing.<locals>.<setcomp>csg|]}|�vr|�qSrrr)r5rrr0�r)r-r r5�_phasecacheZ
phaserootsrZsecret�obsstorer)rZfilteredr4r9r!r>r7r8�phaseZextinct�append�len�newheadsr@�	ancestors)r'�otherZ	onlyheadsr*Z	commonincZportableZogZ_anyZ_hdsZ
mayexcluder?Z
allmissingrBr9rHrJrZmissingrevsr)r;r5r�findcommonoutgoing�sB�



rVcsV|j��}|j}|j}|j}i}t�}t�}|jD]$}||}	|�|	�|�|	���q2|�	�� }
|
�
di���}Wd�n1s�0Y|j}t
�|�D]T\}
}|
|vr�q�g}g}|D]"}||�r�|�|�q�|�|�q�|t|�|f||
<q�|D]}
|
|vr�dggf||
<q�t�|dd�t
�|�D��}|�|dd�|D��t
�|�D]\}
}|||
ddd�<�qRt
�|�D]6\}
}|D]}|du�r�|���q�|gf||
<�q||j�rR|jj��fdd�|jD�}|�fd	d�|jD�O}|jj|d
d�}tt
�|��D]B\}
}|\}}}}t|||�}|t|d�|t|d�f||
<�q|S)
acompute 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.
    �	branchmapNcss*|]"\}}|ddur||dfVqdS)rNrr�r�branchr)rrrrs�z _headssummary.<locals>.<genexpr>css|]}|��VqdSrrKrIrrrr
rrcsh|]}�|��qSrrr��torevrrrMrz _headssummary.<locals>.<setcomp>csh|]}�|��qSrrrrZrrrMrT)Z	inclusiver)r'�
unfilteredr(r-r!r4rB�addrY�commandexecutor�callcommand�resultr"r�	iteritemsrQr&rZremotebranchcache�update�sortrOrLrr5rT�sorted�_postprocessobsolete)�pushopr'r(r-r;�headssumZ
missingctxZbranchesrrJ�eZ	remotemaprrYr)Zknown�unsyncedrZnewmaprS�items�lZfutureheadsZallfuturecommon�remoteheads�
unsyncedheadsZplaceholderr`rrZr�
_headssummary�sn



.��


�rncs`|jj�t�fdd�|D��}|�d||j�}tdd�|D��}|rLdg}ng}d|||gfiS)z;Compute branchmapsummary for repo without branchmap supportc3s|]}�|�r|VqdSrrrrrrr/rz#_oldheadssummary.<locals>.<genexpr>sheads(%ln + %ln)css|]}|��VqdSrrG)r�crrrr6rN)r!r"rdr4rB)r'rlr-�incZoldheads�rrSrirrr�_oldheadssummary(srrcs�|j��}|j}|j�|���$}|�dddi���}Wd�n1sH0Yt�}�fdd�|j�	dd�D�}�D]l}|�
|�}|r�||vr�|�|||}	}
t�||
|	�r�|�
|	���qx||vrx||vrx|�
�|�qx|S)Nslistkeyss	namespaces	bookmarkscsg|]}��|��qSr)Z
expandname)r�b�Zlocalbookmarksrrr0Ps�z _nowarnheads.<locals>.<listcomp>spushing)r'r\r(Z
_bookmarksr^r_r`r4r$Z
configlist�getrZ	validdestr]rH)rfr'r(rhZremotebookmarksZbookmarkedheadsZnewbookmarksZbmZrnodeZlctxZrctxrrtr�_nowarnheads?s,

��&
�
rvcCsR|j��}|j}|j}|j}|j}t|j�}||jgkr<dS|�	d�rPt
|�}nt||||�}||_dd�t
�|�D�}|�r|�sd�t|��}	t�}
|����D]\}}}
}|r�|
�|�q�|
t|�@}
|
r�td�|	t|
�f}ntd�|	}td�}tj||d	��t|�}d}tt
�|��D�]\}}|\}}}}|du�rJt�}nt|�}|�|�d}t|�}|�|�|�r�d|v�r�d}nt�||�}|du�r�|j�td
��n8|du�r�|j�td�|�n|j�td�||f�|du�r(t|�d
k�rJt|�}|du�rJtd�|}td�}n"t|�t|�k�rJt|||�}|�r"|du�r�|dv�r~td�t |d�|f}nP||d�!��r�td�t |d�||d�!�df}ntd�t |d�}|�r�td�}ntd�}|du�r|j�"td��n|j�"td�|�|D]}|j�"dt |���q�q"|�rNtj||d	��dS)zpCheck that a push won't add any outgoing head

    raise StateError error and display ui message as needed.
    NrWcSs g|]\}}|ddur|�qS)rNrrXrrrr0~s�zcheckheads.<locals>.<listcomp>s, s0push creates new remote branches: %s (%d closed)s$push creates new remote branches: %ss8use 'hg push --new-branch' to create new remote branches)�hints,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
rs0push creates new branch '%s' with multiple headss?merge or see 'hg help push' for details about pushing new heads)sdefaultNs.push creates new remote head %s on branch '%s'rs2push creates new remote head %s with bookmark '%s'spush creates new remote head %ssHpull 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'r\r(r-rl�	newbranch�boolZincomingr.rrnrrZ
pushbranchmaprra�joinrdr4rZiterbranchesr]rrRr	Z
StateErrorrvrbr
Z
nodesummariesr$�statusr&rrZnote)rfr'r(r-rlrxrprgZnewbranchesZbranchnamesZclosedbranches�tagr)ZtipZisclosed�errmsgrwZnowarnheadsZerrormsgrYrSrmZdiscardedheadsZoldhsZdhs�newhsrrrr�
checkheadsbs�



��




�
�����

���

�
�������
rcs�|j}|����jjj�tj��jj����fdd����fdd�}t	�
t�j|���jj
}t�}t�}t�}t�}	|D]H}
|
�vr�|�|
�qx|�|
�dur�d}|j�|t|
��|	�|
�qxt|�dkr�|	t|�Bt�fSt��d�}t��|�|�r�|��}
�|
�}�|
��}�|��s.||v�r:|�|
�q���d|
||�}g}|D]*}�|}|��|k�rR|�|����qRt�fd	d
�|D���s�t��fdd
�|D���s�t�fdd
�|D���r�|�|
�q�|�|
�q�||	O}||fS)
z�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
    cs��|��kSrr)rq)�getphase�public�unfirr�<lambda>rz&_postprocessobsolete.<locals>.<lambda>cs�|��vSrr)r)�futurecommonr[rrr�
rNs=checkheads: remote head unknown locally has local marker: %s
rsobsoletesonly(%n, (%ln+%ln))c3s|]}�|�VqdSrr)rrq)�ispublicrrrCrz'_postprocessobsolete.<locals>.<genexpr>c3s|]}�|��vVqdSrrr)�futurenonobsoleter[rrrDrc3s|]}�|�VqdSrrr)�hasoutmarkerrrrEr)r'r\r!�indexZget_revrr�rNrP�	functools�partial�pushingmarkerforrO�
successorsr4r]rur$�debugrrRr
Zgetrevs�	frozenset�poprYZrevsrQrHr%)rfr�Zcandidate_newhsr'�ispushed�successorsmarkersr~Z	discardedZlocalcandidateZunknownheadsr�msgZobsrevsZnhrqZcurrent_branchZ
branchrevsZbranchnodesror)r�r�r�r�r�r�r[r�rre�sd
�
����recCs�|j}|g}t|�}|r�|��}||�r,dS|�|d�}|D]B}|d}	|	sX|dpVd}	|	D] }
|
|vr\|�|
�|�|
�q\q<qdS)a�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.)
    Trr�F)r�r4r�rur]rQ)rOr�rHr��stack�seen�currentZmarkers�mZnextsrrrrr�Rs"
r�)NFN)NFNF)F)Z
__future__rr�Zi18nrrHrr�rrr	r
rrr
rrrr �objectr-rVrnrrrvrrer�rrrr�<module>s0
-F�
@V
#[

Youez - 2016 - github.com/yon3zu
LinuXploit