
    q&f^                     ,    d Z ddlmZ ddlmZmZ ddZy)a  enforce_draft_commits us a hook to ensure that all new changesets are
in the draft phase. This allows enforcing policies for work-in-progress
changes in overlay repositories, i.e. a shared hidden repositories with
different views for work-in-progress code and public history.

Usage:
  [hooks]
  pretxnclose-phase.enforce_draft_commits =     python:hgext.hooklib.enforce_draft_commits.hook
    )_)errorpycompatNc                    |dk7  r4t        j                  t        d      t        j                  |      z        |j                         |   }|d   rPt        j                  t        d      t        j                  |d         t        j                  |d         |fz        |d   dk7  r9t        j                  t        d      |t        j                  |d         fz        y )Ns   pretxnclose-phases   Unsupported hook type %roldphases*   Phase change from %r to %r for %s rejectedphases   drafts%   New changeset %s in phase %r rejected)r   Abortr   r   bytestr
unfiltered)uirepohooktypenodekwargsctxs         E/usr/lib/python3/dist-packages/hgext/hooklib/enforce_draft_commits.pyhookr      s    ''kk)*X-=-=h-GG
 	
 //
D
!Cjkk;<  
!34  1
 	
 
H	$kk67H$$VG_567
 	
 
%    )N)__doc__mercurial.i18nr   	mercurialr   r   r    r   r   <module>r      s   	 
r   