File: //usr/lib/python3/dist-packages/hgext/__pycache__/split.cpython-310.pyc
o
�]Lb � @ s� d Z ddlmZ ddlmZ ddlmZmZ ddlm Z m
Z
mZmZm
Z
mZmZmZmZmZmZmZ ddlmZ i Ze�e�ZdZed d
dded
�ed�fddded�fge
j ed�ejdd�dd� �Zdd� Zdd� ZdS )z=command to split a changeset into smaller ones (EXPERIMENTAL)� )�absolute_import)�_)�nullrev�short)� bookmarks�cmdutil�commands�error�hg�
logcmdutil�pycompat� registrar�
revsetlang�rewriteutil�scmutil�util� )�rebases ships-with-hg-core� split� r� rev� s revision to splits REV� rebaseTs rebase descendants after splits! hg split [--no-rebase] [[-r] REV])�helpcategory� helpbasicc
O s� t �|�}g }|�d�r|�|�d�� |�|� |�� ��5 |�� �� |�d�}t� |��� t
�||p7dg�}t|�dkrFt
�td���|�� }|du sR|tkrn| �td�� W d � W d � W d � dS || }|�� du rt
�td���|�d �r�t|�d
||��}t|�d||��} ng } t�||g| d� t|�� �dkr�t
�td���t�|� |j}
|
r�|j|
|�� kr�t�|� |d �� }d}z$t| ||||�}W |du s�||�� kr�t j!||d
d� |
r�t�"||
� n|du �s||�� k�rt j!||d
d� |
�rt�"||
� w w | �r#|�r#t#| || |� W d � n 1 �s.w Y W d � n1 �s>w Y W d � dS W d � dS 1 �sWw Y dS )af split a changeset into smaller ones
Repeatedly prompt changes and commit message for new changesets until there
is nothing left in the original changeset.
If --rev was not given, split the working directory parent.
By default, rebase connected non-obsoleted descendants onto the new
changeset. Use --no-rebase to avoid the rebase.
r r � .r s cannot split multiple revisionsNs nothing to split
s cannot split working directoryr s
(%d::) - (%d)s %ld - (%ld & obsolete())::s cannot split a merge changesetF��
show_stats)$r �byteskwargs�get�append�extend�wlock�lock�transactionr �acceptinterventionr �revrange�lenr �
InputErrorr �firstr �status�node�list�revsr �precheck�parentsr �
bailifchanged�_activebookmark�
_bookmarksr �
deactivate�dosplitr
�clean�activate�dorebase)
�ui�repor- �opts�revlist�tr�rev�ctx�descendants�torebase�bname�wnode�top� rD �-/usr/lib/python3/dist-packages/hgext/split.py�split/ sn
��
��
������T�rF c C s� g }|� � |j�� krtj||� � dd� |j�� � t�||�� � W d � n1 s-w Y dd� }||�r�|rytd�t |� � � }| �
ddid�� |D ]}t�| |d�} |td �| 7 }qQW d � n1 smw Y |td
�7 }n
td�t |� � � }|�
dd||�� d
�� |d }
tj| |fi t�|��� |d }|
� � |� � kr�|�|� ||�s:|s�t�td���t|�dks�|d � � |� � kr�tj||� � dd� |D �iddd� |d S )NFr c S s | � � }t|j|j|j|jf�S )N)r* �any�modified�added�removed�deleted)r9 �strD rD rE �
incomplete� s zdosplit.<locals>.incompletes1 HG: Splitting %s. So far it has been split into:
)s
templatealiass
label(l,x)� xr s HG: - %s
s7 HG: Write commit message for the next split changeset.
sF HG: Splitting %s. Write commit message for the first split changeset.
T)s edits interactives messager s cannot split an empty revisionr r c S s g | ]}|� � �qS rD )r+ )�.0�crD rD rE �
<listcomp>� s zdosplit.<locals>.<listcomp>)� operation�fixphase���)r+ �dirstate�p1r
r5 �parentchanger �movedirstater r �configoverrider �format_changeset_summary�update�descriptionr �commitr � strkwargsr r r( r'