§
    	^µcç  ã                   óˆ   — d dl mZmZmZmZmZmZmZmZm	Z	 ddl
mZ d„ Zd„ Z e	j        ddd¬	¦  «        d
„ ¦   «         Zd„ ZdS )é    )	Úbundle2ÚerrorÚexchangeÚ
extensionsÚhgÚ
narrowspecÚwireprototypesÚwireprotov1peerÚwireprotov1serveré   )Únarrowbundle2c                  ó2   — t           t          j        _        d S )N)Úpeernarrowwidenr
   ÚwirepeerÚnarrow_widen© ó    ú=/usr/lib/python3/dist-packages/hgext/narrow/narrowwirepeer.pyÚuisetupr      s   € Ý,;…OÔÔ)Ð)Ð)r   c                 óP   ‡ — ˆ fd„}t           j                             |¦  «         d S )Nc                 ó>   •— ˆfd„}t          j        |d|¦  «         d S )Nc                 óœ   •— |dk    r:‰j         \  }}d                     |¦  «        |d<   d                     |¦  «        |d<    | |g|¢R i |¤ŽS )Ns   unbundleó   ,ÚincludepatsÚexcludepats)Ú
narrowpatsÚjoin)ÚorigÚcmdÚargsÚkwargsÚincludeÚexcludeÚrepos         €r   Úwrappedz1reposetup.<locals>.wirereposetup.<locals>.wrapped   sh   ø€ Ø�kÒ!Ð!ð $(¤?Ñ �˜Ø(,¯	ª	°'Ñ(:Ô(:��}Ñ%Ø(,¯	ª	°'Ñ(:Ô(:��}Ñ%Ø�4˜Ð-˜dÐ-Ð-Ð- fÐ-Ð-Ð-r   s   _calltwowaystream)r   Úwrapfunction)ÚuiÚpeerr%   r$   s      €r   Úwirereposetupz reposetup.<locals>.wirereposetup   s:   ø€ ð	.ð 	.ð 	.ð 	.ð 	.õ 	Ô Ð&:¸GÑDÔDÐDÐDÐDr   )r   ÚwirepeersetupfuncsÚappend)r$   r)   s   ` r   Ú	reposetupr,      s@   ø€ ð
Eð 
Eð 
Eð 
Eð 
Eõ Ô× Ò  Ñ/Ô/Ð/Ð/Ð/r   ó   narrow_widensT   oldincludes oldexcludes newincludes newexcludes commonheads cgversion known ellipsess   pull)Ú
permissionc
           
      óî  — d}
	 d„ } ||¦  «        } ||¦  «        } ||¦  «        } ||¦  «        }| j                              t          j        ¦  «        rt          j        | d|i¦  «         t          j        t          |¦  «        ¦  «         t          j        t          |¦  «        ¦  «         t          j        t          |¦  «        ¦  «         t          j        t          |¦  «        ¦  «         t          j	        |¦  «        }t          j	        |¦  «        }|	dk    rd}	nt          |	¦  «        }	|}t          j        | j         ¦  «        }t          j        | j        ||¬¦  «        }t          j        | j        ||¬¦  «        }|	st          j        || ||||||	¦  «         nt!          j        || |||||¦  «         n�# t$          j        $ r}}t          j        | j         ¦  «        }d|j        fg}g }|j        �|                     d|j        f¦  «         |                     t          j        d	||¦  «        ¦  «         d
}
Y d}~nd}~ww xY w|                     ¦   «         }t          j        ||
¬¦  «        S )aƒ  wireprotocol command to send data when a narrow clone is widen. We will
    be sending a changegroup here.

    The current set of arguments which are required:
    oldincludes: the old includes of the narrow copy
    oldexcludes: the old excludes of the narrow copy
    newincludes: the new includes of the narrow copy
    newexcludes: the new excludes of the narrow copy
    commonheads: list of heads which are common between the server and client
    cgversion(maybe): the changegroup version to produce
    known: list of nodes which are known on the client (used in ellipses cases)
    ellipses: whether to send ellipses data or not
    Fc                 ó4   — | r|                       d¦  «        ng S )Nr   )Úsplit)Údatas    r   Ú
splitpathsz narrow_widen.<locals>.splitpathsQ   s   € à'+Ð3�4—:’:˜dÑ#Ô#Ð#°Ð3r   r   ó   0)r"   r#   s   messageNs   hints   error:abortT)ÚgenÚprefer_uncompressed)r'   Úhas_sectionr   Ú_NARROWACL_SECTIONÚapplynarrowaclr   ÚvalidatepatternsÚsetr	   Ú
decodelistÚboolr   Úbundle20ÚmatchÚrootÚwiden_bundler   Ú&generate_ellipses_bundle2_for_wideningr   ÚAbortÚmessageÚhintr+   ÚaddpartÚ
bundlepartÚ	getchunksÚ	streamres)r$   ÚprotoÚoldincludesÚoldexcludesÚnewincludesÚnewexcludesÚcommonheadsÚ	cgversionÚknownÚellipsesÚpreferuncompressedr3   ÚcommonÚbundlerÚnewmatchÚoldmatchÚexcÚmanargsÚadvargsÚchunkss                       r   r   r   ,   sÌ  € ðD Ðð@"ð	4ð 	4ð 	4ð !�j Ñ-Ô-ˆØ �j Ñ-Ô-ˆØ �j Ñ-Ô-ˆØ �j Ñ-Ô-ˆð Œ7×Ò�xÔ:Ñ;Ô;ð 	HÝÔ# D¨=¸+Ð*FÑGÔGÐGõ 	Ô#¥C¨Ñ$4Ô$4Ñ5Ô5Ð5ÝÔ#¥C¨Ñ$4Ô$4Ñ5Ô5Ð5ÝÔ#¥C¨Ñ$4Ô$4Ñ5Ô5Ð5ÝÔ#¥C¨Ñ$4Ô$4Ñ5Ô5Ð5åÔ*¨;Ñ7Ô7ˆÝÔ)¨%Ñ0Ô0ˆØ�tÒÐØˆHˆHå˜H‘~”~ˆHØˆ	åÔ" 4¤7Ñ+Ô+ˆÝÔ#ØŒI˜{°Kð
ñ 
ô 
ˆõ Ô#ØŒI˜{°Kð
ñ 
ô 
ˆð ð 	ÝÔ ØØØØØØØØñ	ô 	ð 	ð 	õ Ô@ØØØØØØØñô ð øøõ Œ;ð "ð "ð "ÝÔ" 4¤7Ñ+Ô+ˆØ ¤Ð,Ð-ˆØˆØŒ8ÐØ�NŠN˜G S¤XÐ.Ñ/Ô/Ð/Ø�Š�Ô*¨>¸7ÀGÑLÔLÑMÔMÐMØ!ÐÐÐÐÐÐøøøøð"øøøð ×ÒÑ Ô €FÝÔ#ØÐ(:ðñ ô ð s   „F9F> Æ>I
ÇA3IÉI
c                 ó  — dD ]}t          j        ||         ¦  «        ||<   Œ dD ] }d                     ||         ¦  «        ||<   Œ!dt          |d         ¦  «        z  |d<    | j        di |¤Ž}t          j        | j        |¦  «        S )N)rO   rQ   )rK   rM   rL   rN   r   s   %irR   r-   )r-   )r	   Ú
encodelistr   r=   Ú_callcompressabler   Úgetunbundlerr'   )Úremoter!   ÚchÚfs       r   r   r   —   sž   € Ø&ð ;ð ;ˆÝ#Ô.¨v°b¬zÑ:Ô:ˆˆr‰
ˆ
àJð +ð +ˆØ—Y’Y˜v bœzÑ*Ô*ˆˆr‰
ˆ
à¥ f¨ZÔ&8Ñ!9Ô!9Ñ9€Fˆ:ÑØ ˆÔ Ð;Ð;°FÐ;Ð;€AÝÔ ¤	¨1Ñ-Ô-Ð-r   N)Ú	mercurialr   r   r   r   r   r   r	   r
   r   Ú r   r   r,   Úwireprotocommandr   r   r   r   r   ú<module>rf      s  ðð
ð 
ð 
ð 
ð 
ð 
ð 
ð 
ð 
ð 
ð 
ð 
ð 
ð 
ð 
ð 
ð 
ð 
ð 
ð 
ð 
ð 
ð Ð Ð Ð Ð Ð ð<ð <ð <ð0ð 0ð 0ð  $ÐÔ#Øðð ðñ ô ð`ð `ñô ð`ðF	.ð 	.ð 	.ð 	.ð 	.r   