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__/commit.cpython-39.pyc
a

�+�bJ�@s�ddlmZddlZddlmZddlmZmZddlm	Z	m
Z
mZmZm
Z
mZdd�Zdd
d�Zddd
�Zdd�Zddd�Zdd�Zddd�Zdd�ZdS)�)�absolute_importN�)�_)�hex�nullrev)�context�
mergestate�metadata�phases�scmutil�subrepoutilcCs:|jdkrd}d}n|j�dd�}|dk}|dv}||fS)z�return a (changelog, filelog) boolean tuple

    changelog: copy related information should be stored in the changeset
    filelof:   copy related information should be written in the file revision
    �changeset-sidedataT�experimentalscopies.write-to�changeset-only)rs
compatibility)�filecopiesmode�uiZconfig)�repo�writechangesetcopy�writefilecopymetaZ
writecopiesto�r�6/usr/lib64/python3.9/site-packages/mercurial/commit.py�_write_copy_metas
rFc
Cs�|��}|��|��}}|��}|�����|�d���z}t||||d�\}}	|����}
|
durzdD]}|
�	|d�qh|j
jdkr�t||
|	�}
|j
�
�}|j�td��|j
�|�|j
�||	|��||��|��||��|
�	}
||
��}||j
�
�k�r|�||j
�|��|��|�r*|���p,d}}|jdd	t|
�||d
�t�|j|�}||j
�
�k�ot||��}|�r�|�s�t�||||g�|
Wd�Wd�S1�s�0YWd�n1�s�0YdS)a�Add a new revision to the target repository.
    Revision information is passed via the context argument.

    ctx.files() should list all files involved in this commit, i.e.
    modified/added/removed files. On merge, it may be wider than the
    ctx.files() to be committed, since any file nodes derived directly
    from p1 or p2 are excluded from the committed ctx.files().

    origctx is for convert to work around the problem that bug
    fixes to the files list in changesets change hashes. For
    convert to be the identity, it can pass an origctx and this
    function will use the same files list when it makes sense to
    do so.
    scommit)�error�origctxN)�p1copies�p2copies�
filesadded�filesremovedsextrascommitting changelog
�spretxncommitT)�throw�nodeZparent1Zparent2) Z
unfiltered�p1�p2�user�lockZtransaction�_prepare_files�extra�copy�popZ	changelogZ_copiesstorage�_extra_with_copiesZtiprevr�noterZdelayupdate�add�descriptionr �date�revZregister_changesetZchangelogrevisionr�hookrZnewcommitphaseZphaser
Zregisternew)r�ctxrrr!r"r#�tr�mn�filesr&�nameZoldtip�nr.Zxp1Zxp2ZtargetphaseZ	waspublicrrr�	commitctx-sR
��r6cCs�|��}|��}t|�\}}t��}tj�|�}	t||	|�}
|
D]}|�|�q@i}|���	��
�s�|	����D]"\}
}|�
d�}|durp|||
<qp|��r�|s�|j�d�|��}|�|���|r�|�|���|�|���n:|���s
|�s
|j�d�|��}nt|||	|||d�}|�rV|��|k�rV|��}|j�|��sLJ�|�|�|�rx|�|���|�|���||fS)Nsoutside-narrow-merge-actionsreusing known manifest
s*reusing manifest from p1 (no file change)
)r)rr!rr	Z
ChangingFilesr�read�
_get_salvagedZ
mark_salvaged�narrowmatch�always�	allextras�items�get�manifestnoder�debugZupdate_touchedr3Zupdate_added�
filesadded�update_removed�filesremoved�_process_files�touched�issubsetZupdate_copies_from_p1�p1copiesZupdate_copies_from_p2�p2copies)r1r0rrrr!rrr3�ms�salvaged�s�narrow_files�f�e�actionr2Z	origfilesrrrr%~sB



r%cCsng}|jdk}|rjt|���dkrj|��rjt|�����D].}|�|��d�}|dkr:||vr:|�	|�q:|S)zzreturns a list of salvaged files

    returns empty list if config option which process salvaged files are
    not enabledr
r�merge-removal-candidate�yes)
r�len�parents�active�sortedr;�keys�extrasr=�append)rrHr0rIZcopy_sd�fnameZ
might_removedrrrr8�s
r8cs�|��}|��}|��}t|�\}	}
|��}|��}|��}
|
���|���|���g}t|���}t	|�}|j
�td��t
�|�}|��|��}|�|���|��|D�]2}|j
�||�d�||v�r�|�|�}|tjkr�|�|�|�|�q�|tjk�rL|�|�|�|��|�|<|�|�d�p<d}��||�q�|tjk�r�|�|�|�|��|�|<|�|�d�p�d}��||�q�td�}td�}|j||d��q�z�||}|du�r�|�|�nt|�|�t ||��|||
|�\�|<}|�r>|dk�r|�|�n |d	k�r4|�!|�n
|�|���||�"��Wq�t#�y~|j
�$td
�||���Yq�t%�y�}zLt&|dt'j(�}|�s�|�r�|t'j(k�r�|j
�$td
�||���WYd}~q�d}~00q���fdd
�|D�}t)�fdd
�|D��}|D]}�|=�q|�*�t+k�r<|�,|�n4t-�.|||��f�}|D]}||��sT|�|��qTt/||||
�|j0||t1|��	}|S)Nscommitting files:
�
rrs/corrupted mergestate, unknown narrow action: %bsrestart the merge)�hint�added�mergedstrouble committing %s!
�errnocs g|]}|�vs|�vr|�qSrr��.0rL)�m1�m2rr�
<listcomp>rz"_process_files.<locals>.<listcomp>csg|]}|�vr|�qSrrr^)�mrrrbr)2rr!r"r�manifestctxr'r7�list�removedrQrr*rrZgetuipathfn�modifiedr[�extendrU�sortr=rZCHANGE_REMOVEDZmark_removedrWZCHANGE_ADDEDZ
mark_added�findZsetflagZCHANGE_MODIFIEDZmark_touchedZAbort�_filecommitZmark_merged�flags�OSError�warn�IOError�getattrr]�ENOENTrTr.rrAr	Zget_removal_filter�_commit_manifestrD�bool)r1r0rHr3rKrrr!r"rr�m1ctxZm2ctx�mctxr[rf�linkrevZuipathfnZ	all_filesrLZ
narrow_actionrl�msgrZ�fctxZ
is_touched�instZerrcode�dropZrfr2r)rcr`rarrC�s�











�




�rCcCs|��}|�||j�}	|�||j�}
d}|	|
kr>|jkrFnnd}t|tj�r�|��}||	|
fvr�|j�d|�|	|jkr�|�	|�|�	�ks�|
|jkr�|�	|�|�	�kr�d}||fS|�
|�}
i}|��}d}|�r�||k�r�|�|�}|
}|�r$|
|jk�s|du�r$||v�r$||}|	}|�rl|j�d||t|�f�|�r^||d<t|�|d<|j|}	}
n|j�
td�||f�n�|	|jk�r�|
|j}	}
n�|
|jk�r<|���r�|�|��d	�d
k�r�|
|j}	}
nb|���r|�|��d�dk�r|	|j}	}
n4|
�|	|
�}|	|v�r,|
|j}	}
n|
|v�r<|j}
d
}|j�dd��rt|���rt|�|��d�dk�rtd}|��}|
|jk�s�|	|jk�s�|�s�|
�|	|��s�|�r�|du�r�|
|jk�r�d}nd}|
�|||||	|
�}n,||v�r|�	|�|�	�k�rd}|	}n|	}||fS)a
    commit an individual file as part of a larger transaction

    input:

        fctx:       a file context with the content we are trying to commit
        manifest1:  manifest of changeset first parent
        manifest2:  manifest of changeset second parent
        linkrev:    revision number of the changeset being created
        tr:         current transation
        includecopymeta: boolean, set to False to skip storing the copy data
                    (only used by the Google specific feature of using
                    changeset extra as copy source of truth).
        ms:         mergestate object

    output: (filenode, touched)

        filenode: the filenode that should be used by this changeset
        touched:  one of: None (mean untouched), 'added' or 'modified'
    Nr[sreusing %s filelog entry
rgs %s: copy %s:%s
scopyscopyrevs8warning: can't find ancestor for '%s' copied from '%s'!
sfilenode-sourcesothersmergedrPFrsmerge-track-salvagedrOTr\)�pathr=Znullid�
isinstancerZfilectxZfilenoderr?rl�fileZ
copysourcerrnrrSrVZcommonancestorsheadsZ
configbool�data�cmpr+)rrxZ	manifest1Z	manifest2rvr1ZincludecopymetarHrXZfparent1Zfparent2rDr Zflog�metaZcfnameZfnodeZcnodeZ
newfparentZfparentancestorsZforce_new_node�textrrrrk s�����

��
���  

������
��
rkc		Cs�|��}	d}
|��}|��}|��}
|
��}|sH|�|t�|	|����}
|s\|
r\|	j	�
d�|sd|
r�|	j	�td��|r~d}n|	�
�}|j|||��|��|||d�}n|	j	�
d�|��}|S)amake a new manifest entry (or reuse a new one)

    given an initialised manifest context and precomputed list of
    - files: files affected by the commit
    - added: new entries in the manifest
    - drop:  entries present in parents but absent of this one

    Create a new manifest revision, reuse existing ones if possible.

    Return the nodeid of the manifest revision.
    NsInot reusing manifest (no file change in changelog, but manifest differs)
scommitting manifest
)�matchs;reusing manifest from p1 (listed files actually unchanged)
)rr!r"rdr7�diffrZ
matchfilesr3rr?r*rr9�writer>)r1rvr0ruZmanifestr3r[rzZhas_some_narrow_actionrZmdr!r"rtr`r�r2rrrrr�s>��
�rrcCs�|j}|j}|j}|j}t|j�}t|�dsN|p4d}|p<d}|pDd}|pLd}||||f}|durxtdd�|D��rxi}|dur�t�	||�}||d<|dur�t�	||�}||d<|dur�t�
||�}||d<|dur�t�
||�}||d<|S)	z2encode copy information into a `extra` dictionnaryrNcss|]}|duVqdS)Nr)r_�xrrr�	<genexpr>!rz%_extra_with_copies.<locals>.<genexpr>rrrr)Zcopied_from_p1Zcopied_from_p2r[rfrTrDr�anyr	ZencodecopiesZencodefileindices)rr&r3rFrGr@rBZ
extrasentriesrrrr)s4
r))FN)FN)NF)F)Z
__future__rr]Zi18nrr rr�rrr	r
rrrr6r%r8rCrkrrr)rrrr�<module>s 

Q
+
f/�
J

Youez - 2016 - github.com/yon3zu
LinuXploit