HEX
Server: Apache
System: Linux pdx1-shared-a1-38 6.6.104-grsec-jammy+ #3 SMP Tue Sep 16 00:28:11 UTC 2025 x86_64
User: mmickelson (3396398)
PHP: 8.1.31
Disabled: NONE
Upload Files
File: //usr/lib/python3/dist-packages/hgext/hooklib/__pycache__/reject_new_heads.cpython-310.pyc
o

�]Lb��@s:dZddlmZddlmZddlmZmZddd�ZdS)	aBreject_new_heads is a hook to check that branches touched by new changesets
have at most one open head. It can be used to enforce policies for
merge-before-push or rebase-before-push. It does not handle pre-existing
hydras.

Usage:
  [hooks]
  pretxnclose.reject_new_heads =     python:hgext.hooklib.reject_new_heads.hook
�)�absolute_import)�_)�error�pycompatNc	Ks�|dkrt�td�t�|���|��|}t�}|jj|�	�d�D]
}||}|�
|���q"|D]}t|�d|��dkrJt�td�t�|���q2dS)NspretxnclosesUnsupported hook type %r)�startz&head() and not closed() and branch(%s)�s/Changes on branch %r resulted in multiple heads)
r�Abortrr�bytestr�
unfiltered�set�	changelog�revs�rev�add�branch�len)	�ui�repo�hooktype�node�kwargs�ctx�branchesrr�r�@/usr/lib/python3/dist-packages/hgext/hooklib/reject_new_heads.py�hooks$�����r)N)	�__doc__�
__future__r�mercurial.i18nr�	mercurialrrrrrrr�<module>s