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 :  /usr/lib64/python3.9/site-packages/mercurial/__pycache__/

Upload File :
current_dir [ Writeable] document_root [ Writeable]

 

Command :


[ Back ]     

Current File : /usr/lib64/python3.9/site-packages/mercurial/__pycache__/rewriteutil.cpython-39.pyc
a

�+�b+"�@s�ddlmZddlZddlmZddlmZmZddlm	Z	mZm
Z
mZmZm
Z
mZe�d�Zdd	d
�Zdd
d�Zdd�Zdd�Zdd�Zdd�Zddd�ZdS)�)�absolute_importN�)�_)�hex�nullrev)�error�node�obsolete�obsutil�revset�scmutil�utils\b[0-9a-f]{6,64}\b�csd|jj�t|�}||kr6�fdd�|D�}d�|�}n*|��}td�}|t��|��|df;}|S)z�returns a string summarizing revisions in a decent size

    If there are few enough revisions, we list them all. Otherwise we display a
    summary of the form:

        1ea73414a91b and 5 others
    csg|]}t��|���qS�)r�short��.0�r�Ztonoder�;/usr/lib64/python3.9/site-packages/mercurial/rewriteutil.py�
<listcomp>+�z_formatrevs.<locals>.<listcomp>s, s%s and %d othersr)Z	changelogr�len�join�firstrr)�repo�revsZmaxrevsZnumrevsZshorts�summaryrrrr�_formatrevs sr�rewriteTc
Cs�t|vr*td�|}td�}tj||d��tdd�|D��rV|j�d�dd�|D�}t|d���d	kr|t�	td
�|��|�
d|�}|r�t||�}td�||f}td
�}tj||d��t||�}|r�td�}tjtd�|t|�f|d��|s�dSt
�|t
j��s�t||�}	|	�r�|	\}
}}td�||
|f}|
��|��k�rV|td�|7}|jj�r�|
��|��k�r�|td�|
|f7}|td�|||
f7}tj|td�d��ntj|td�d��dS)a&check if revs can be rewritten
    action is used to control the error message.

    check_divergence allows skipping the divergence checks in cases like adding
    a prune marker (A, ()) to obsstore (which can't be diverging).

    Make sure this function is called after taking the lock.
    scannot %s the null revisionsno changeset checked out)�hintcss|]}t�|d�VqdS)�revN)r
Zsafehasattrrrrr�	<genexpr>Brzprecheck.<locals>.<genexpr>s-rewriteutil.precheck called with ctx not revscss|]}|��VqdS)N)r!rrrrr"DrNrs"cannot %s changesets while mergings%ld and public()scannot %s public changesets: %ss see 'hg help phases' for detailss#see 'hg help evolution.instability's7cannot %s changeset, as that will orphan %d descendantss8cannot %s %s, as that creates content-divergence with %ss	, from %ss0
    changeset %s is a successor of changeset %ss�
    changeset %s already has a successor in changeset %s
    rewriting changeset %s would create "content-divergence"
    set experimental.evolution.allowdivergence=True to skip this checksEsee 'hg help evolution.instability' for details on content-divergences@add --verbose for details or see 'hg help evolution.instability')rrrZ
InputError�any�uiZ	develwarnr�parentsZ
StateErrorrr�disallowednewunstabler	�	isenabledZallowdivergenceopt�_find_new_divergencer!�verbose)
rr�actionZcheck_divergence�msgr Z
publicrevsrZnewunstableZnew_divergenceZ	local_ctxZ	other_ctxZbase_ctxrrr�precheck4s�	
�


��

���
��������r,cCs(t�|tj�}|rt��S|�d||�S)z�Checks whether editing the revs will create new unstable changesets and
    are we allowed to create them.

    To allow new unstable changesets, set the config:
        `experimental.evolution.allowunstable=True`
    s
(%ld::) - %ld)r	r'ZallowunstableoptrZbasesetr)rrZ
allowunstablerrrr&�sr&cCsR|�d|�}|D]<}t|||�}|r||||d|��|dfSqdS)Ns%ld and obsolete()rr)r�find_new_divergence_from�
unfiltered)rrZobsrevsrZdivrrrr(�s(r(cCsp|��sdSt�||���}|r4|dd|��fSt�||�}|rh|dd}|dd}|d|fSdSdS)z�return divergent revision if rewriting an obsolete cset (ctx) will
    create divergence

    Returns (<other node>, <common ancestor node>) or None
    Nrsdivergentnodesscommonpredecessor)r	r
�successorssetsrZ
divergentsets)r�ctxZssetZdivsetsZnsuccsetZprecrrrr-�sr-cCs>|�dd�}|dkrdS|dkr$dSt�td�||f��dS)Nrsempty-successorsskipTskeepFsf%s doesn't know how to handle config rewrite.empty-successor=%s (only 'skip' and 'keep' are supported))ZconfigrZConfigErrorr)r$ZcommandZempty_successorrrr�skip_empty_successor�s���r1c
Cs(|si}i}t�t|�}|��}|D]�}zt�||�}WntjtjfyVYq$Yn0|durbq$||}|�	�s�|�
|�}	|	dur�q$|	g}	ntj||�
�|d�}	t|	�dk�rt|	d�dk�r|	dd}
|
dur�t|
�}|�||dt|���}n|j�td�|�q$|j�td�|�q$|S)a�Replace all obsolete commit hashes in the message with the current hash.

    If the obsolete commit was split or is divergent, the hash is not replaced
    as there's no way to know which successor to choose.

    For commands that update a series of commits in the current transaction, the
    new obsolete markers can be considered by setting ``pending`` to a mapping
    of ``pending[oldnode] = [successor_node1, successor_node2,..]``.
    N)�cacherrsbThe stale commit message reference to %s could not be updated
(The referenced commit was dropped)
s>The stale commit message reference to %s could not be updated
)�re�findall�NODE_REr.rZresolvehexnodeidprefixrZWdirUnsupportedZAmbiguousPrefixLookupErrorr	�getr
r/rrr�replacer$Znoter)rZ	commitmsg�pendingr2ZhashesZunfi�hZfullnoder0Z
successors�	successorZnewhashrrr�update_hash_refs�sN


 ������r;)r)rT)N)Z
__future__rr3Zi18nrrrr�rr	r
rrr
�compiler5rr,r&r(r-r1r;rrrr�<module>s$


T
	

Youez - 2016 - github.com/yon3zu
LinuXploit