File: //usr/lib/python3/dist-packages/mercurial/__pycache__/commit.cpython-310.pyc
o
�]LbJ � @ s� d dl mZ d dlZddlmZ ddlmZmZ ddlm Z m
Z
mZmZm
Z
mZ dd� Zdd
d�Zddd
�Zdd� Zddd�Zdd� Z ddd�Zdd� ZdS )� )�absolute_importN� )�_)�hex�nullrev)�context�
mergestate�metadata�phases�scmutil�subrepoutilc C s@ | j dkr
d}d}||fS | 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� experimentals copies.write-to� changeset-only)r s
compatibility)�filecopiesmode�ui�config)�repo�writechangesetcopy�writefilecopymeta�
writecopiesto� r �2/usr/lib/python3/dist-packages/mercurial/commit.py�_write_copy_meta s
�r Fc
C s� | � � } |�� |�� }}|�� }| �� �� | �d���}t||||d�\}} |�� �� }
|
dur;dD ]}|
� |d� q2| j
jdkrGt| |
| �}
| j
�
� }| j�td�� | j
�|� | j
�|| |�� ||�� |�� ||�� |
� }
| |
�� }|| j
�
� kr�| �|| j
�|�� |�� |r�|�� p�d}}| jdd t|
�||d
� t�| j|�}|| j
�
� ko�| | �� }|r�|s�t�| |||g� |
W d � W d � S 1 s�w Y W d � dS 1 s�w Y dS )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.
s commit)�error�origctxN)� p1copies� p2copies�
filesadded� filesremoveds extras committing changelog
� s pretxncommitT)�throw�node�parent1�parent2) �
unfiltered�p1�p2�user�lock�transaction�_prepare_files�extra�copy�pop� changelog�_copiesstorage�_extra_with_copies�tiprevr �noter �delayupdate�add�descriptionr"