/
lib64
/
python3.9
/
site-packages
/
hgext
/
__pycache__
/
Upload File
HOME
a �+�b�( � @ s" d Z ddlmZ ddlmZ ddlmZmZmZm Z mZmZm Z mZmZmZmZ i Ze�e�Zi Ze�e�Zedddd� edd dd� d Zd#dd �Zedddded�fddded�fddded�ed�fgej ej ej ej ed�ejd�dd� �Zdd� Zedg ejdd �d!d"� �ZdS )$aH uncommit 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.keeps ships-with-hg-coreNc s� |� � }t|�� �}�fdd�|D �} | s.dS |s>|� � �� S || �t�||�� �fdd�t�� �D �� |df� fdd� } �s�| j� t d �� |du r�|�� }|s�|�� }|s�|� � }tj| |�� | jg|�| |||�� d �}| �|�S )zrRecommit ctx with changed files not in match. Return the new node identifier, or None if nothing changed. c s h | ]}� |�r|�qS � r ��.0�f)�matchr �4/usr/lib64/python3.9/site-packages/hgext/uncommit.py� <setcomp>G � z"_commitfiltered.<locals>.<setcomp>Nc s i | ]\}}|� v r||�qS r r )r �dst�src)�filesr r � <dictcomp>T s z#_commitfiltered.<locals>.<dictcomp>r c sF ||vrd S || }t j| ||�� |�� |�� |�� � �|�d�}|S )N)Z copysource)r Z memfilectx�path�data�islinkZisexec�get)�repo�memctxr Z contentctxZredirectZfctxZmctx)�copiedr r � filectxfnX s � z"_commitfiltered.<locals>.filectxfns note: keeping empty commit ��parents�textr r&