
    6h
                       S r SSKJr  SSKJr  SSKJrJrJrJ	r	J
r
JrJr  0 r\R                  " \5      rSr\R                   r\R"                  rSS/ \" S5      \" S	5      4/r\" S
\\-   \-   \" S5      \R&                  SS9S 5       rg)z5close arbitrary heads without checking them out first    )annotations)_)	bookmarkscmdutilcontexterror
logcmdutilpycompat	registrars   ships-with-hg-core   rs   revs   revision to checks   REVs   close-head|close-headss   [OPTION]... [REV]...T)helpcategory	inferrepoc                  ^^^
^ U
UUU4S jnU[        TR                  S/ 5      5      -  n[        R                  " TU5      nU(       d  [        R
                  " [        S5      5      e/ nTR                  5        H#  nUR                  TR                  U5      5        M%     U Vs1 s H  nTU   R                  5       iM     nnU H*  nX;  d  M
  [        R
                  " [        S5      U-  5      e   [        R                  " U [        R                  " T5      5      mT(       d  [        R
                  " [        S5      5      eSS0m
TR                  5          TR!                  5          U H%  nTU   n	U	R#                  5       nUT
S'   U" U	5        M'     S	S	S	5        S	S	S	5        g
s  snf ! , (       d  f       N= f! , (       d  f       g
= f)zclose 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                L  > [         R                  " TU S /T/ S TR                  S5      TR                  S5      TS9nTR                  S5         TR	                  US5      n[
        R                  " TU S /U5        UR                  U5        S S S 5        g ! , (       d  f       g = f)Nuserdate)parentstextfiles	filectxfnr   r   extras   commitT)r   memctxgettransaction	commitctxr   updatemarkcommitted)revcctxretr   messageoptsrepos      1/usr/lib/python3/dist-packages/hgext/closehead.pydocommitclose_branch.<locals>.docommit3   s    ~~$K&!&!	
 i(..t,CTC;4s# )((s   >B
B#r   s   no revisions specifieds    revision is not an open head: %ds)   no commit message specified with -l or -ms   close   1s   branchNr   )tupler   r	   revranger   Abortr   	branchmapextendbranchheadsr   r   
logmessager
   byteskwargswlocklockbranch)uir#   revsr"   r%   headsr2   hr   rr   r!   s    ` `      @@r$   close_branchr8   "   sl   "$ $  	E$((5"%&&DtT*Dkk!5677E.."T%%f-. #$)*EqT!W[[]EE*++a CDsJKK    X%9%9$%?@Gkk!HIJJtE	tyy{CS	AXXZF%E)QK	  # ! + #{ s*   &F(F>+,F-F>-
F;	7F>>
GN)__doc__
__future__r   mercurial.i18nr   	mercurialr   r   r   r   r	   r
   r   cmdtablecommand
testedwith
commitoptscommitopts2commitopts3CATEGORY_CHANGE_MANAGEMENTr8        r$   <module>rF      s    < "    


H
%
 #

!!fb!$8"91V9EF 	{*3333rE   