https://t.me/RX1948
Server : Apache
System : Linux iad1-shared-b8-43 6.6.49-grsec-jammy+ #10 SMP Thu Sep 12 23:23:08 UTC 2024 x86_64
User : dh_edsupp ( 6597262)
PHP Version : 8.2.26
Disable Function : NONE
Directory :  /lib/python3/dist-packages/hgext/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //lib/python3/dist-packages/hgext/__pycache__/uncommit.cpython-310.pyc
o

�]Lb�(�
@s$dZddlmZddlmZddlmZmZmZm	Z
mZmZm
Z
mZmZmZmZiZe�e�ZiZe�e�Zedddd�edd	dd�d
Z	d#dd
�Zedddded�fddded�fddded�ed�fgejejejejed�ejd�dd��Zdd�Zedgejdd �d!d"��ZdS)$aHuncommit part or all of a local changeset (EXPERIMENTAL)

This command undoes the effect of a local commit, returning the affected
files to their uncommitted state. This means that files modified, added or
removed in the changeset will be left unchanged, and so will remain modified,
added and removed in the working directory.
�)�absolute_import)�_)�cmdutil�commands�context�copies�error�obsutil�pathutil�pycompat�	registrar�rewriteutil�scmutil�experimental�uncommitondirtywdirF)�default�
uncommit.keepsships-with-hg-coreNc
s�|��}t|���}�fdd�|D�}	|	sdS|s|����S||	�t�||���fdd�t���D��|df�fdd�	}
�sH|j�	t
d	��|durP|��}|sV|��}|s\|�
�}tj||��|jg|�|
|||��d
�}|�|�S)zrRecommit ctx with changed files not in match. Return the new
    node identifier, or None if nothing changed.
    csh|]}�|�r|�qS�r��.0�f)�matchr�0/usr/lib/python3/dist-packages/hgext/uncommit.py�	<setcomp>Gsz"_commitfiltered.<locals>.<setcomp>Ncsi|]\}}|�vr||�qSrr)r�dst�src)�filesrr�
<dictcomp>Tsz#_commitfiltered.<locals>.<dictcomp>rc
sF||vrdS||}tj|||��|��|��|����|�d�}|S)N)�
copysource)r�
memfilectx�path�data�islink�isexec�get)�repo�memctxr �
contentctx�redirect�fctx�mctx)�copiedrr�	filectxfnXs�	z"_commitfiltered.<locals>.filectxfnsnote: keeping empty commit
��parents�textrr,�user�date�extra)�p1�setr�node�	copiesmod�
pathcopiesr�	iteritems�ui�statusr�descriptionr0r1rr&�nullidr2�	commitctx)r%�ctxr�
keepcommit�messager0r1�base�initialfiles�excluder,�newr)r+rrr�_commitfiltered>s@
��

rE�uncommit��keeps(allow an empty commit after uncommittingsallow-dirty-working-copys'allow uncommit with outstanding changes�nsnotesstore a note on uncommitsTEXTs[OPTION]... [FILE]...)�helpcategoryc
Os~t�|�t�||�t�|�}|�����|�����|��}|j|j	|j
|jf\}}}}tt
||||�t
|�@�}	|dpH|j�dd�}
|
sX|rO|	rXtj|td�d�|d}t�||��gd�t|���dkrut�td	���t�|||�}|��r�|j|��|d
d�}
t
|
j	�t
|
j�Bt
|
j
�B}t
|���|}|r�|dd
�t�|�D�8}t|�D]*}||
j vr�td�}n|j!�"|�r�td�}ntd�}tjtd�t�#|�|�|d��|�$d���|ds�|ds�|�%�|d<t�&||�}|}|�s|�'d�du�r|�'d�}n|�dd�}t(||||||�'d�|�'d�d�}|du�rC|�td��	Wd�Wd�Wd�dSi}||���)�k�rV|f||�)�<nd||�)�<|j*�+��t�,||||�Wd�n	1�svwYtj-||dd
d�Wd�n	1�s�wYWd�n1�s�wYWd�dSWd�dS1�s�wYdS)a�uncommit part or all of a local changeset

    This command undoes the effect of a local commit, returning the affected
    files to their uncommitted state. This means that files modified or
    deleted in the changeset will be left unchanged, and so will remain
    modified in the working directory.

    If no files are specified, the commit will be pruned, unless --keep is
    given.
    sallow_dirty_working_copyrrs/requires --allow-dirty-working-copy to uncommit)�hint�.rF�scannot uncommit merge changesetT)�	listcleancSsh|]}|�qSrrrrrrr�szuncommit.<locals>.<setcomp>s0file was not changed in working directory parents.file was untracked in working directory parentsfile does not existscannot uncommit "%s"smessageslogfilerHNrsusersdate)r@r0r1snothing to uncommit
r��fixphase).r�check_note_size�resolve_commit_optionsr�byteskwargs�wlock�lockr:�modified�added�removed�deleted�anyr4r9�
configbool�
bailifchangedrr
�precheck�rev�lenr.r�
InputErrorrrrr3r
�dirs�sorted�clean�wvfs�exists�getuipathfn�transactionr;�
logmessager$rEr5�dirstate�parentchange�movedirstate�cleanupnodes)r9r%�pats�opts�st�m�a�r�d�isdirtypath�allowdirtywcopy�oldr�s�eligible�badfilesrrKr@r?�newid�mappingrrr�uncommit~s�

 ���
�
���
	��J���T�r|ccs6�|��jj�|��d�D]}t�|��|�Vq
dS)zFyields the obsolete markers marking the given changeset as a successorrN)r%�obsstore�predecessorsr$r5r	�marker)r>r!rrr�predecessormarkers�s��r��unamendT)rJ�	helpbasicc
s|��}|����|����|�d���|d�t�|���gd�t����dkr1t	�
td���d}t�fdd�|D��sEt	�
td���t
t���}t|�dkr^td	�}t	�
|t|���|d
��}||����}���|d<�fdd
�}	tj|������f������|	������|d�}
|�|
�}||}|j}
|
���t�||�Wd�n1s�wY���|fi}tj ||ddd�Wd�n1s�wYWd�n1s�wYWd�dSWd�dS1s�wYdS)a3undo the most recent amend operation on a current changeset

    This command will roll back to the previous version of a changeset,
    leaving working directory in state in which it was before running
    `hg amend` (e.g. files modified as part of an amend will be
    marked as modified `hg status`)
    r�rLrMscannot unamend merge changeset)samend_source�unamend_sourcec3s�|]	}|���vVqdS�N)r2)r�key)�curctxrr�	<genexpr>s�zunamend.<locals>.<genexpr>sAworking copy parent was not created by 'hg amend' or 'hg unamend's:changeset must have one predecessor, found %i predecessorsrr�cs"z��|�WStyYdSwr�)�filectx�KeyError)r%�ctx_r )�predctxrrr,.s
�zunamend.<locals>.filectxfnr-NTrO)!�
unfilteredrTrUrgr
r]r^r_r.rr`rrZ�listr��prednoder2�hexrr&r3�p2r;rr0r1r=rirjrrkr5rl)r9r%rn�unfi�
expected_keys�markers�er��extrasr,�newctx�newprednode�
newpredctxrir{r)r�r�r�unamend�sV ���


���Pr�)NNN) �__doc__�
__future__r�mercurial.i18nr�	mercurialrrrrr6rr	r
rrr
r�cmdtable�command�configtable�
configitem�
testedwithrE�walkopts�
commitopts�commitopts2�commitopts3�CATEGORY_CHANGE_MANAGEMENTr|r�r�rrrr�<module>sf4

��

�@��
���
��
g�

https://t.me/RX1948 - 2025