HEX
Server: Apache
System: Linux infong-uk86 4.4.400-icpu-106 #2 SMP Mon Sep 15 08:23:40 UTC 2025 x86_64
User: u44115835 (4976590)
PHP: 8.4.17
Disabled: NONE
Upload Files
File: //kunden/lib/python3/dist-packages/hgext/__pycache__/closehead.cpython-39.pyc
a

%0�_�
�@s�dZddlmZddlmZddlmZmZmZm	Z	m
Z
mZmZiZ
e�e
�ZdZejZejZddged�ed	�fgZed
eeeed�ejdd
�dd��ZdS)z5close arbitrary heads without checking them out first�)�absolute_import)�_)�	bookmarks�cmdutil�context�error�pycompat�	registrar�scmutilsships-with-hg-core�r�revsrevision to checksREVsclose-head|close-headss[OPTION]... [REV]...T)ZhelpcategoryZ	inferrepoc		sN����fdd�}t����|t��dg��7}t��|�}|sNt�td���g}��	�D]}|�
��|��qZ�fdd�|D�}|D]}||vr�t�td�|��q�t�
|����s�t�td���d	d
i�����d����:|D]$}�|}|��}|�d<||�q�Wd�n1�s 0YWd�n1�s@0Yd
S)a	close the given head revisions

    This is equivalent to checking out each revision in a clean tree and running
    ``hg commit --close-branch``, except that it doesn't change the working
    directory.

    The commit message must be specified with -l or -m.
    c
shtj�|dg�gd��d���d��d�}��d�}��|d�}t��|dg|�|�|�|��dS)Nsusersdate)�parents�text�filesZ	filectxfn�user�date�extrascommitT)	rZmemctx�getZtransactionZ	commitctxr�updateZ
markcommitted�close)�revZcctxZtrZret�r�message�opts�repo��1/usr/lib/python3/dist-packages/hgext/closehead.py�docommit3s�


zclose_branch.<locals>.docommitrsno revisions specifiedcsh|]}�|���qSr)r)�.0�h)rrr�	<setcomp>O�zclose_branch.<locals>.<setcomp>s revision is not an open head: %ds)no commit message specified with -l or -msclose�1sbranchNr)rZbyteskwargs�tuplerr
ZrevrangerZAbortrZ	branchmap�extendZbranchheadsrZ
logmessageZwlock�lock�branch)	ZuirZrevsrrZheadsr&r�rrrr�close_branch"s0
Jr(N)�__doc__Z
__future__rZmercurial.i18nrZ	mercurialrrrrrr	r
ZcmdtableZcommandZ
testedwithZ
commitoptsZcommitopts2Zcommitopts3ZCATEGORY_CHANGE_MANAGEMENTr(rrrr�<module>s"$


�