
    6h                    :    S r SSKJr  SSKJr  SSKJrJr  SS jrg)aB  reject_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
    )annotations)_)errorpycompatNc                   US:w  a6  [         R                  " [        S5      [        R                  " U5      -  5      eUR                  5       U   n[        5       nUR                  R                  UR                  5       S9 H&  nX   nUR                  UR                  5       5        M(     U HX  n[        UR                  SU5      5      S:  d  M$  [         R                  " [        S5      [        R                  " U5      -  5      e   g )Ns   pretxncloses   Unsupported hook type %r)startz&head() and not closed() and branch(%s)   s/   Changes on branch %r resulted in multiple heads)r   Abortr   r   bytestr
unfilteredset	changelogrevsrevaddbranchlen)	uirepohooktypenodekwargsctxbranchesr   r   s	            @/usr/lib/python3/dist-packages/hgext/hooklib/reject_new_heads.pyhookr      s    >!kk)*X-=-=h-GG
 	
 //
D
!CuH~~"""3iSZZ\" 4 tyyA6JKaO++DE""6*+      )N)	__doc__
__future__r   mercurial.i18nr   	mercurialr   r   r    r   r   <module>r#      s   	 # r   