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/hooklib/__pycache__/reject_merge_commits.cpython-39.pyc
a

%0�_^�@s:dZddlmZddlmZddlmZmZddd�ZdS)	awreject_merge_commits is a hook to check new changesets for merge commits.
Merge commits are allowed only between different branches, i.e. merging
a feature branch into the main development branch. This can be used to
enforce policies for linear commit histories.

Usage:
  [hooks]
  pretxnchangegroup.reject_merge_commits =     python:hgext.hooklib.reject_merge_commits.hook
�)�absolute_import)�_)�error�pycompatNcs�|dkr t�td�t�|������|}�jj|��d�D]L������	�}t
|�dkr`q>t��fdd�|D��r>t�td����q>dS)NspretxnchangegroupsUnsupported hook type %r)�start�c3s"|]}�|�����kVqdS)N)�branch)�.0�p��repo�rev��D/usr/lib/python3/dist-packages/hgext/hooklib/reject_merge_commits.py�	<genexpr>&�zhook.<locals>.<genexpr>s@%s rejected as merge on the same branch. Please consider rebase.)rZAbortrrZbytestrZ
unfilteredZ	changelogZrevsr
�parents�len�all)ZuirZhooktypeZnode�kwargs�ctxrrrr�hooks$����r)N)	�__doc__Z
__future__rZmercurial.i18nrZ	mercurialrrrrrrr�<module>s