§
    cÌcÀ@  ã                   ó²   — d Z ddlZddlmZ ddlmZ ddlmZ ddl	m
Z
 ddlmZ dd	lmZ d
ZdZ G d„ d¦  «        Z G d„ d¦  «        Z G d„ de¦  «        ZdS )zbisect command implementations.é    Né   )Ú
ControlDir)Úrevision)ÚCommand)ÚCommandError)ÚOption)ÚnoteÚbisectÚbisect_revidc                   óL   — e Zd ZdZefd„Zd„ Zd„ Zd„ Zd„ Z	d„ Z
d„ Zd	„ Zd
„ ZdS )ÚBisectCurrentz/Bisect class for managing the current revision.c                 óH  — || _         || _        | j                             ¦   «         | _        | j        j                             |¦  «        r8| j        j                             |¦  «                             ¦   «         | _        d S | j         	                    ¦   «         | _        d S ©N)
Ú	_filenameÚ_controldirÚopen_branchÚ_branchÚcontrol_transportÚhasÚ	get_bytesÚstripÚ_revidÚlast_revision©ÚselfÚ
controldirÚfilenames      ú//usr/lib/python3/dist-packages/breezy/bisect.pyÚ__init__zBisectCurrent.__init__"   sŽ   € Ø!ˆŒØ%ˆÔØÔ'×3Ò3Ñ5Ô5ˆŒØÔÔ-×1Ò1°(Ñ;Ô;ð 	7ØÔ*Ô<×FÒFØñô ßš%™'œ'ð ŒKˆKˆKð œ,×4Ò4Ñ6Ô6ˆDŒKˆKˆKó    c                 ó`   — | j         j                             | j        | j        dz   ¦  «         dS )zSave the current revision.ó   
N)r   r   Ú	put_bytesr   r   ©r   s    r   Ú_savezBisectCurrent._save,   s8   € àÔÔ*×4Ò4ØŒN˜DœK¨%Ñ/ñ	1ô 	1ð 	1ð 	1ð 	1r    c                 ó   — | j         S )zReturn the current revision id.)r   r$   s    r   Úget_current_revidzBisectCurrent.get_current_revid1   s
   € àŒ{Ðr    c                 ó@   — | j                              | j        ¦  «        S )z.Return the current revision number as a tuple.)r   Úrevision_id_to_dotted_revnor   r$   s    r   Úget_current_revnozBisectCurrent.get_current_revno5   s   € àŒ|×7Ò7¸¼ÑDÔDÐDr    c                 óÞ   — | j         j        }|                     ¦   «         5  |                     | j        g¦  «                             | j        d¦  «        }ddd¦  «         n# 1 swxY w Y   |S )z6Return the IDs of the current revision's predecessors.N)r   Ú
repositoryÚ	lock_readÚget_parent_mapr   Úget)r   ÚrepoÚretvals      r   Úget_parent_revidszBisectCurrent.get_parent_revids9   s°   € àŒ|Ô&ˆØ�^Š^ÑÔð 	Oð 	OØ×(Ò(¨$¬+¨Ñ7Ô7×;Ò;¸D¼KÈÑNÔNˆFð	Oð 	Oð 	Oñ 	Oô 	Oð 	Oð 	Oð 	Oð 	Oð 	Oð 	Oøøøð 	Oð 	Oð 	Oð 	Oàˆs   ¡5A"Á"A&Á)A&c                 óL   — t          |                      ¦   «         ¦  «        dk    S )z&Is the current revision a merge point?r   ©Úlenr2   r$   s    r   Úis_merge_pointzBisectCurrent.is_merge_point@   s!   € å�4×)Ò)Ñ+Ô+Ñ,Ô,¨qÒ0Ð0r    c                 ó  — | j         j                             | j        ¦  «        }d                     d„ |                      ¦   «         D ¦   «         ¦  «        }|                     d                     ||j        |j	        ¦  «        ¦  «         dS )z1Write the current revision's log entry to a file.ú.c                 ó,   — g | ]}t          |¦  «        ‘ŒS © )Ústr©Ú.0Úxs     r   ú
<listcomp>z.BisectCurrent.show_rev_log.<locals>.<listcomp>G   s   € ÐCÐCÐC Q�#˜a™&œ&ÐCÐCÐCr    zOn revision {} ({}):
{}
N)
r   r,   Úget_revisionr   Újoinr*   ÚwriteÚformatÚrevision_idÚmessage)r   ÚoutfÚrevÚrevnos       r   Úshow_rev_logzBisectCurrent.show_rev_logD   s�   € àŒlÔ%×2Ò2°4´;Ñ?Ô?ˆØ—’ÐCÐC¨$×*@Ò*@Ñ*BÔ*BÐCÑCÔCÑDÔDˆØ�
Š
Ð/×6Ò6°u¸c¼oØ36´;ñ@ô @ñ 	Aô 	Að 	Að 	Að 	Ar    c                 óª  — | j                              ¦   «         }t          |t          ¦  «        r| j                             |¦  «        }n:t          |t          ¦  «        r%|d                              |j        ¦  «        j	        }| 
                    d|j        j                             |¦  «        d¦  «         || _        |                      ¦   «          dS )z/Switch the current revision to the given revid.r   NF)r   Úopen_workingtreeÚ
isinstanceÚintr   Ú
get_rev_idÚlistÚ
in_historyÚbranchÚrev_idÚrevertr,   Úrevision_treer   r%   )r   ÚrevidÚworkings      r   ÚswitchzBisectCurrent.switchK   sµ   € àÔ"×3Ò3Ñ5Ô5ˆÝ�e�SÑ!Ô!ð 	?Ø”L×+Ò+¨EÑ2Ô2ˆEˆEÝ˜�tÑ$Ô$ð 	?Ø˜!”H×'Ò'¨¬Ñ7Ô7Ô>ˆEØ�Š�t˜Wœ^Ô6×DÒDÀUÑKÔKØñ	ô 	ð 	àˆŒØ�
Š
‰Œˆˆˆr    c                 ój  — | j                              ¦   «         }|j                             ¦   «         }|j        j                             |¦  «        }|                     d|d¦  «         | j         j                             t          ¦  «        r&| j         j         
                    t          ¦  «         dS dS )z5Revert bisection, setting the working tree to normal.NF)r   rK   rQ   r   r,   rT   rS   r   r   ÚBISECT_REV_PATHÚdelete)r   rV   Úlast_revÚrev_trees       r   ÚresetzBisectCurrent.resetW   s    € àÔ"×3Ò3Ñ5Ô5ˆØ”>×/Ò/Ñ1Ô1ˆØ”>Ô,×:Ò:¸8ÑDÔDˆØ�Š�t˜X uÑ-Ô-Ð-ØÔÔ-×1Ò1µ/ÑBÔBð 	GØÔÔ.×5Ò5µoÑFÔFÐFÐFÐFð	Gð 	Gr    N)Ú__name__Ú
__module__Ú__qualname__Ú__doc__rY   r   r%   r'   r*   r2   r6   rI   rW   r]   r:   r    r   r   r      s´   € € € € € Ø9Ð9à,;ð 7ð 7ð 7ð 7ð1ð 1ð 1ð
ð ð ðEð Eð Eðð ð ð1ð 1ð 1ðAð Að Að
ð 
ð 
ðGð Gð Gð Gð Gr    r   c                   ór   — e Zd ZdZefd„Zd„ Zd„ Zdd„Zd„ Z	d„ Z
d	„ Zd
„ Zd„ Zd„ Zd„ Zd„ Zd„ Zd„ Zd„ ZdS )Ú	BisectLogzBisect log file handler.c                 ó¸   — g | _         t          |¦  «        | _        || _        d | _        d | _        d | _        d | _        || _        |  	                    ¦   «          d S r   )
Ú_itemsr   Ú_currentr   r   Ú_high_revidÚ
_low_revidÚ_middle_revidr   Úloadr   s      r   r   zBisectLog.__init__d   sV   € ØˆŒÝ% jÑ1Ô1ˆŒØ%ˆÔØˆŒØˆÔØˆŒØ!ˆÔØ!ˆŒØ�	Š	‰Œˆˆˆr    c                 óp   — | j         r$| j        j                             | j         ¦  «        S t          j        S )zOpen log file for reading.)r   r   r   r/   ÚsysÚstdinr$   s    r   Ú_open_for_readzBisectLog._open_for_reado   s0   € àŒ>ð 	ØÔ#Ô5×9Ò9¸$¼.ÑIÔIÐIå”9Ðr    c                 óT   — | j         s | j                             ¦   «         | _         dS dS )zLoad bzr information.N)r   r   r   r$   s    r   Ú
_load_treezBisectLog._load_treev   s0   € àŒ|ð 	:ØÔ+×7Ò7Ñ9Ô9ˆDŒLˆLˆLð	:ð 	:r    Nc                 óF  ‡— |                       ¦   «          d| _        |s| j                             ¦   «         }n|}| j        j        }|                     ¦   «         5  |                     ¦   «         }|                     |t          j	        f¦  «        }d}d}g }|D ]wŠ| 
                    d‰¦  «         ˆfd„| j        D ¦   «         }	|	sŒ.t          |	¦  «        dk    rt          d‰z  ¦  «        ‚|	d         dk    r‰}g }Œd|	d         dk    r‰}|d=  nŒx|s|}|s| j                             d¦  «        }ddd¦  «         n# 1 swxY w Y   t          |¦  «        dz   }
|
dk     rd}n|
dz  dz
  }t          |¦  «        dk    r||         | _        n|| _        || _        || _        dS )	z2Find the current revision range, and the midpoint.Nr   c                 óL   •— g | ] }|d          ‰k    ¯|d         dv ¯|d         ‘Œ!S )r   r   ©ÚyesÚnor:   )r=   r>   r   s     €r   r?   z4BisectLog._find_range_and_middle.<locals>.<listcomp>�   sF   ø€ ð Jð Jð J AØ œd hÒ.Ð.°1°Q´4¸=Ð3HÐ3Hð ˜Qœ4Ø3HÐ3HÐ3Hr    r   zrevision %s duplicatedrt   ru   é   )rp   ri   r   r   r,   r-   Ú	get_graphÚiter_lefthand_ancestryÚ_mod_revisionÚNULL_REVISIONÚinsertre   r5   ÚRuntimeErrorrN   rg   rh   )r   Úbranch_last_revÚ
last_revidr0   ÚgraphÚrev_sequenceÚ
high_revidÚ	low_revidÚbetween_revsÚmatchesÚspreadÚmiddle_indexr   s               @r   Ú_find_range_and_middlez BisectLog._find_range_and_middle{   sL  ø€ à�ŠÑÔÐØ!ˆÔàð 	)Øœ×3Ò3Ñ5Ô5ˆJˆJà(ˆJàŒ|Ô&ˆØ�^Š^ÑÔð 	7ð 	7Ø—N’NÑ$Ô$ˆEØ ×7Ò7Ø�]Ô8Ð:ñ<ô <ˆLàˆJØˆIØˆLØ(ð ð �Ø×#Ò# A xÑ0Ô0Ð0ðJð Jð Jð J¨¬ð Jñ Jô J�àð ØÝ�w‘<”< !Ò#Ð#Ý&Ð'?À(Ñ'JÑKÔKÐKØ˜1”: Ò&Ð&Ø!)�JØ#%�L�LØ˜Q”Z 4Ò'Ð'Ø (�IØ$ Q˜Ø�Eð (ð
 ð (Ø'�
Øð 7Ø œL×3Ò3°AÑ6Ô6�	ð5	7ð 	7ð 	7ñ 	7ô 	7ð 	7ð 	7ð 	7ð 	7ð 	7ð 	7øøøð 	7ð 	7ð 	7ð 	7õ@ �\Ñ"Ô" QÑ&ˆØ�AŠ:ˆ:ØˆLˆLà" a™K¨1Ñ,ˆLåˆ|ÑÔ˜qÒ Ð Ø!-¨lÔ!;ˆDÔÐà!+ˆDÔà%ˆÔØ#ˆŒˆˆs   ÁCD=Ä=EÅEc                 óp   — | j                              |¦  «         | j                              |¬¦  «         dS )z)Move the working tree to the given revno.©rF   N)rf   rW   rI   )r   rH   rF   s      r   Ú_switch_wc_to_revnozBisectLog._switch_wc_to_revno´   s7   € àŒ×Ò˜UÑ#Ô#Ð#ØŒ×"Ò"¨Ð"Ñ-Ô-Ð-Ð-Ð-r    c                 óÀ   — |                       ¦   «         sI|dk    r%|d„ | j        D ¦   «         v rt          d|z  ¦  «        ‚| j                             ||f¦  «         dS dS )z*Set the bisect status for the given revid.Údonec                 ó2   — g | ]}|d          dv ¯|d         ‘ŒS )r   rs   r   r:   r<   s     r   r?   z)BisectLog._set_status.<locals>.<listcomp>¼   s7   € ð .Hð .Hð .H°qØ12°1´¸Ð1FÐ1Fð /0°¬dØ1FÐ1FÐ1Fr    z attempting to add revid %s twiceN)Úis_donere   r|   Úappend)r   rU   Ústatuss      r   Ú_set_statuszBisectLog._set_status¹   s‹   € à�|Š|‰~Œ~ð 	0Ø˜ÒÐ Eð .Hð .H¸D¼Kð .Hñ .Hô .Hð %Hð %Hå"Ð#EÈÑ#MÑNÔNÐNØŒK×Ò  v˜Ñ/Ô/Ð/Ð/Ð/ð		0ð 	0r    c                 ó   — || _         dS )zSwitch log files.N)r   )r   r   s     r   Úchange_file_namezBisectLog.change_file_nameÁ   s   € à!ˆŒˆˆr    c                 ó  — g | _         | j        j                             | j        ¦  «        r_|                      ¦   «         }|D ]J}|                     ¦   «         \  }}| j                              ||                     d¦  «        f¦  «         ŒIdS dS )zLoad the bisection log.ÚasciiN)	re   r   r   r   r   rn   Úsplitr�   Údecode)r   ÚrevlogÚlinerU   r�   s        r   rj   zBisectLog.loadÅ   s�   € àˆŒØÔÔ-×1Ò1°$´.ÑAÔAð 	DØ×(Ò(Ñ*Ô*ˆFØð Dð D�Ø"&§*¢*¡,¤,‘�˜Ø”×"Ò" E¨6¯=ª=¸Ñ+AÔ+AÐ#BÑCÔCÐCÐCð		Dð 	DðDð Dr    c                 óè   — d                      d„ | j        D ¦   «         ¦  «        }| j        r'| j        j                             | j        |¦  «         dS t          j                             |¦  «         dS )zSave the bisection log.r    c              3   óP   K  — | ]!\  }}d ||                      d¦  «        fz  V — Œ"dS )s   %s %s
r•   N)Úencode)r=   rU   r�   s      r   ú	<genexpr>z!BisectLog.save.<locals>.<genexpr>Ð   sP   è è € ð 0ð 0á�˜ð ˜5 &§-¢-°Ñ"8Ô"8Ð9Ñ9ð0ð 0ð 0ð 0ð 0ð 0r    N)	rA   re   r   r   r   r#   rl   ÚstdoutrB   )r   Úcontentss     r   ÚsavezBisectLog.saveÎ   sŒ   € à—8’8ð 0ð 0à#'¤;ð0ñ 0ô 0ñ 0ô 0ˆð Œ>ð 	'ØÔÔ.×8Ò8Ø” ñ*ô *ð *ð *ð *õ ŒJ×Ò˜XÑ&Ô&Ð&Ð&Ð&r    c                 ó`   — t          | j        ¦  «        dk    o| j        d         d         dk    S )z.Report whether we've found the right revision.r   éÿÿÿÿr   rŒ   )r5   re   r$   s    r   rŽ   zBisectLog.is_doneÙ   s,   € å�4”;ÑÔ !Ò#ÐD¨¬°B¬¸Ô(:¸fÒ(DÐDr    c                 ó¤   — |                       ¦   «          |d                              | j        ¦  «        j        }|                      ||¦  «         dS )z5Set the bisection status for the revision in revspec.r   N)rp   rP   r   rR   r‘   )r   Úrevspecr�   rU   s       r   Úset_status_from_revspecz!BisectLog.set_status_from_revspecÝ   sJ   € à�ŠÑÔÐØ˜”
×%Ò% d¤lÑ3Ô3Ô:ˆØ×Ò˜ Ñ'Ô'Ð'Ð'Ð'r    c                 ó`   — |                       | j                             ¦   «         |¦  «         dS )z7Set the current revision to the given bisection status.N)r‘   rf   r'   )r   r�   s     r   Úset_currentzBisectLog.set_currentã   s,   € à×Ò˜œ×8Ò8Ñ:Ô:¸FÑCÔCÐCÐCÐCr    c                 óN   — t          |                      |¦  «        ¦  «        dk    S )Nr   r4   )r   rU   s     r   r6   zBisectLog.is_merge_pointç   s#   € Ý�4×)Ò)¨%Ñ0Ô0Ñ1Ô1°AÒ5Ð5r    c                 óÊ   — | j         j        }|                     ¦   «         5  |                     |g¦  «                             |d ¦  «        }d d d ¦  «         n# 1 swxY w Y   |S r   )r   r,   r-   r.   r/   )r   rU   r0   r1   s       r   r2   zBisectLog.get_parent_revidsê   s¬   € ØŒ|Ô&ˆØ�^Š^ÑÔð 	Cð 	CØ×(Ò(¨%¨Ñ1Ô1×5Ò5°e¸TÑBÔBˆFð	Cð 	Cð 	Cñ 	Cô 	Cð 	Cð 	Cð 	Cð 	Cð 	Cð 	Cøøøð 	Cð 	Cð 	Cð 	Càˆs   ¡+AÁAÁAc                 ó6  — |                       ¦   «          | j        | j        k    s| j        | j        k    r’|                      | j        ¦  «        rx|                      | j        ¦  «        D ]#}|| j        k    rŒ|                       |¦  «          | j        | j        k    s| j        | j        k    r|                      | j        ¦  «        °x|                      | j        |¦  «         | j        | j        k    s| j        | j        k    r|                      d¦  «         dS dS )z4Using the current revision's status, do a bisection.rŒ   N)r‡   ri   rg   rh   r6   r2   rŠ   r§   )r   rF   Úparents      r   r
   zBisectLog.bisectð   s1  € à×#Ò#Ñ%Ô%Ð%ð Ô" dÔ&6Ò6Ð6ØÔ" d¤oÒ5Ð5Ø×#Ò# DÔ$6Ñ7Ô7ð 6à×0Ò0°Ô1CÑDÔDð ð �Ø˜Tœ_Ò,Ð,Øà×/Ò/°Ñ7Ô7Ð7Øð Ô" dÔ&6Ò6Ð6ØÔ" d¤oÒ5Ð5Ø×#Ò# DÔ$6Ñ7Ô7ð 6ð 	× Ò  Ô!3°TÑ:Ô:Ð:ØÔ Ô!1Ò1Ð1ØÔ ¤Ò0Ð0Ø×Ò˜VÑ$Ô$Ð$Ð$Ð$ð 1Ð0r    r   )r^   r_   r`   ra   ÚBISECT_INFO_PATHr   rn   rp   r‡   rŠ   r‘   r“   rj   r    rŽ   r¥   r§   r6   r2   r
   r:   r    r   rc   rc   a   s  € € € € € Ø"Ð"à,<ð 	ð 	ð 	ð 	ðð ð ð:ð :ð :ð
7$ð 7$ð 7$ð 7$ðr.ð .ð .ð
0ð 0ð 0ð"ð "ð "ðDð Dð Dð	'ð 	'ð 	'ðEð Eð Eð(ð (ð (ðDð Dð Dð6ð 6ð 6ðð ð ð%ð %ð %ð %ð %r    rc   c                   ó†   — e Zd ZdZddgZ eddde¬¦  «        dd	gZd
„ Zd„ Z		 	 dd„Z
d„ Zd„ Zd„ Zd„ Zd„ Zd„ Zd„ Zd„ ZdS )Ú
cmd_bisecta  Find an interesting commit using a binary search.

    Bisecting, in a nutshell, is a way to find the commit at which
    some testable change was made, such as the introduction of a bug
    or feature.  By identifying a version which did not have the
    interesting change and a later version which did, a developer
    can test for the presence of the change at various points in
    the history, eventually ending up at the precise commit when
    the change was first introduced.

    This command uses subcommands to implement the search, each
    of which changes the state of the bisection.  The
    subcommands are:

    brz bisect start
        Start a bisect, possibly clearing out a previous bisect.

    brz bisect yes [-r rev]
        The specified revision (or the current revision, if not given)
        has the characteristic we're looking for,

    brz bisect no [-r rev]
        The specified revision (or the current revision, if not given)
        does not have the characteristic we're looking for,

    brz bisect move -r rev
        Switch to a different revision manually.  Use if the bisect
        algorithm chooses a revision that is not suitable.  Try to
        move as little as possible.

    brz bisect reset
        Clear out a bisection in progress.

    brz bisect log [-o file]
        Output a log of the current bisection to standard output, or
        to the specified file.

    brz bisect replay <logfile>
        Replay a previously-saved bisect log, forgetting any bisection
        that might be in progress.

    brz bisect run <script>
        Bisect automatically using <script> to determine 'yes' or 'no'.
        <script> should exit with:
           0 for yes
           125 for unknown (like build failed so we could not test)
           anything else for no
    Ú
subcommandzargs*ÚoutputÚozWrite log to this file.)Ú
short_nameÚhelpÚtyper   Ú	directoryc                 ób   — |j                              t          ¦  «        st          d¦  «        ‚dS )z0Check preconditions for most operations to work.zNo bisection in progress.N)r   r   r¬   r   ©r   r   s     r   Ú_checkzcmd_bisect._check;  s5   € àÔ+×/Ò/Õ0@ÑAÔAð 	<ÝÐ:Ñ;Ô;Ð;ð	<ð 	<r    c                 óf  — t          |¦  «        }|                     ¦   «         r1t          d¦  «         |j                             | j        ¬¦  «         dS |r|                     ||¦  «         n|                     |¦  «         |                     | j        ¦  «         | 	                    ¦   «          dS )zkSet the state of the given revspec and bisecting.

        Returns boolean indicating if bisection is done.z"No further bisection is possible.
r‰   TF)
rc   rŽ   r	   rf   rI   rF   r¥   r§   r
   r    )r   r   r¤   ÚstateÚ
bisect_logs        r   Ú
_set_statezcmd_bisect._set_state@  sµ   € õ ˜zÑ*Ô*ˆ
Ø×ÒÑÔð 	ÝÐ6Ñ7Ô7Ð7ØÔ×,Ò,°$´)Ð,Ñ<Ô<Ð<Ø�4àð 	*Ø×.Ò.¨w¸Ñ>Ô>Ð>Ð>à×"Ò" 5Ñ)Ô)Ð)Ø×Ò˜$œ)Ñ$Ô$Ð$Ø�ŠÑÔÐØˆur    r8   Nc                 óö  — d}|dv r|rnZ|dv r|rt          |¦  «        dk    r	|d         }n8|dv r|st          d¦  «        ‚|dv r	|d         }n|s|rt          d	|z   ¦  «        ‚t          j        |¦  «        \  }}	|d
k    r|                      |¦  «         dS |dk    r|                      ||¦  «         dS |dk    r|                      ||¦  «         dS |dk    r|                      ||¦  «         dS |dk    r|                      |¦  «         dS |dk    r|  	                    ||¦  «         dS |dk    r|  
                    ||¦  «         dS |dk    r|                      ||¦  «         dS t          d|z   ¦  «        ‚)zHandle the bisect command.N)rt   ru   Úmove)Úreplayr   r   )r¾   z.The 'bisect move' command requires a revision.)ÚrunzImproper arguments to bisect Ústartrt   ru   r¾   r]   Úlogr¿   rÀ   zUnknown bisect command: )r5   r   r   Úopen_containingrÁ   rt   ru   r¾   r]   rÂ   r¿   Ú
run_bisect)
r   r¯   Ú	args_listrµ   r   r°   Úlog_fnÚ
run_scriptr   Ú_s
             r   rÀ   zcmd_bisect.runR  s  € ð ˆØÐ.Ð.Ð.°8Ð.ØØ˜<Ð'Ð'¨IÐ'½#¸i¹.¼.ÈAÒ:MÐ:MØ˜q”\ˆFˆFØ˜:Ð%Ð%¨hÐ%ÝØ@ñBô Bð Bà˜9Ð$Ð$Ø" 1œˆJˆJØð 	>˜(ð 	>ÝØ/°*Ñ<ñ>ô >ð >õ #Ô2°9Ñ=Ô=‰ˆ
�Að ˜Ò Ð Ø�JŠJ�zÑ"Ô"Ð"Ð"Ð"Ø˜5Ò Ð Ø�HŠH�Z Ñ*Ô*Ð*Ð*Ð*Ø˜4ÒÐØ�GŠG�J Ñ)Ô)Ð)Ð)Ð)Ø˜6Ò!Ð!Ø�IŠI�j (Ñ+Ô+Ð+Ð+Ð+Ø˜7Ò"Ð"Ø�JŠJ�zÑ"Ô"Ð"Ð"Ð"Ø˜5Ò Ð Ø�HŠH�Z Ñ(Ô(Ð(Ð(Ð(Ø˜8Ò#Ð#Ø�KŠK˜
 FÑ+Ô+Ð+Ð+Ð+Ø˜5Ò Ð Ø�OŠO˜J¨
Ñ3Ô3Ð3Ð3Ð3åØ*¨ZÑ7ñ9ô 9ð 9r    c                 ó°   — |                       |¦  «         t          |¦  «                             ¦   «          |j                             t
          ¦  «         dS )z#Reset the bisect state to no state.N)r¸   r   r]   r   rZ   r¬   r·   s     r   r]   zcmd_bisect.reset{  sL   € à�Š�JÑÔÐÝ�jÑ!Ô!×'Ò'Ñ)Ô)Ð)ØÔ$×+Ò+Õ,<Ñ=Ô=Ð=Ð=Ð=r    c                 ó4  — |j                              t          ¦  «        r@t          |¦  «                             ¦   «          |j                              t          ¦  «         t          |¦  «        }|                     d¦  «         |                     ¦   «          dS )z9Reset the bisect state, then prepare for a new bisection.rÁ   N)	r   r   r¬   r   r]   rZ   rc   r§   r    )r   r   r»   s      r   rÁ   zcmd_bisect.start�  s†   € àÔ'×+Ò+Õ,<Ñ=Ô=ð 	BÝ˜*Ñ%Ô%×+Ò+Ñ-Ô-Ð-ØÔ(×/Ò/Õ0@ÑAÔAÐAå˜zÑ*Ô*ˆ
Ø×Ò˜wÑ'Ô'Ð'Ø�ŠÑÔÐÐÐr    c                 ó4   — |                       ||d¦  «         dS )z;Mark that a given revision has the state we're looking for.rt   N©r¼   ©r   r   r¤   s      r   rt   zcmd_bisect.yes‹  s   € à�Š˜
 G¨UÑ3Ô3Ð3Ð3Ð3r    c                 ó4   — |                       ||d¦  «         dS )zMark a given revision as wrong.ru   NrÌ   rÍ   s      r   ru   zcmd_bisect.no�  s   € à�Š˜
 G¨TÑ2Ô2Ð2Ð2Ð2r    c                 ó„   — t          |¦  «        }|                     |¦  «         |                     | j        ¬¦  «         dS )z&Move to a different revision manually.r‰   N)r   rW   rI   rF   )r   r   r¤   Úcurrents       r   r¾   zcmd_bisect.move“  s@   € å 
Ñ+Ô+ˆØ�Š�wÑÔÐØ×Ò $¤)ÐÑ,Ô,Ð,Ð,Ð,r    c                 ó    — |                       |¦  «         t          |¦  «        }|                     |¦  «         |                     ¦   «          dS )z'Write the current bisect log to a file.N)r¸   rc   r“   r    ©r   r   r   r»   s       r   rÂ   zcmd_bisect.log™  sK   € à�Š�JÑÔÐÝ˜zÑ*Ô*ˆ
Ø×#Ò# HÑ-Ô-Ð-Ø�ŠÑÔÐÐÐr    c                 ót  — |j                              t          ¦  «        r@t          |¦  «                             ¦   «          |j                              t          ¦  «         t          ||¦  «        }|                     t          ¦  «         |                     ¦   «          | 	                    | j
        ¦  «         dS )zlApply the given log file to a clean state, so the state is
        exactly as it was when the log was saved.N)r   r   r¬   r   r]   rZ   rc   r“   r    r
   rF   rÒ   s       r   r¿   zcmd_bisect.replay   s¡   € ð Ô'×+Ò+Õ,<Ñ=Ô=ð 	BÝ˜*Ñ%Ô%×+Ò+Ñ-Ô-Ð-ØÔ(×/Ò/Õ0@ÑAÔAÐAÝ˜z¨8Ñ4Ô4ˆ
Ø×#Ò#Õ$4Ñ5Ô5Ð5Ø�ŠÑÔÐà×Ò˜$œ)Ñ$Ô$Ð$Ð$Ð$r    c                 ób  — dd l }t          d¦  «         |                      |¦  «         	 	 |                     |d¬¦  «        }|                     ¦   «          |j        }|dk    r|                      |d d¦  «        }n|dk    rd S |                      |d d¦  «        }|rd S n# t          $ r Y d S w xY wŒ‡)Nr   zStarting bisect.T)Úshellrt   é}   ru   )Ú
subprocessr	   rÁ   ÚPopenÚwaitÚ
returncoder¼   r|   )r   r   Úscriptr×   ÚprocessÚretcoderŒ   s          r   rÄ   zcmd_bisect.run_bisect¬  sâ   € ØÐÐÐÝÐÑ Ô Ð Ø�
Š
�:ÑÔÐð	ðØ$×*Ò*¨6¸Ð*Ñ>Ô>�Ø—’‘”�Ø!Ô,�Ø˜a’<�<ØŸ?š?¨:°t¸UÑCÔC�D�DØ ’^�^Ø�EàŸ?š?¨:°t¸TÑBÔB�DØð Ø�Eðøåð ð ð Ø��ðøøøð	s   «AB ÂB Â
B-Â,B-)r8   NN)r^   r_   r`   ra   Ú
takes_argsr   r;   Útakes_optionsr¸   r¼   rÀ   r]   rÁ   rt   ru   r¾   rÂ   r¿   rÄ   r:   r    r   r®   r®     s  € € € € € ð/ð /ðb  Ð(€JØ�V˜H°Ø!:ÀðFñ Fô Fà ð.€Mð<ð <ð <ð
ð ð ð$ BFØð'9ð '9ð '9ð '9ðR>ð >ð >ðð ð ð4ð 4ð 4ð3ð 3ð 3ð-ð -ð -ðð ð ð
%ð 
%ð 
%ðð ð ð ð r    r®   )ra   rl   r   r   Ú r   ry   Úcommandsr   Úerrorsr   Úoptionr   Útracer	   r¬   rY   r   rc   r®   r:   r    r   ú<module>rå      s-  ðð" &Ð %à 
€
€
€
Ø "Ð "Ð "Ð "Ð "Ð "Ø 'Ð 'Ð 'Ð 'Ð 'Ð 'Ø Ð Ð Ð Ð Ð Ø  Ð  Ð  Ð  Ð  Ð  Ø Ð Ð Ð Ð Ð Ø Ð Ð Ð Ð Ð àÐ Ø €ð?Gð ?Gð ?Gð ?Gð ?Gñ ?Gô ?Gð ?GðD`%ð `%ð `%ð `%ð `%ñ `%ô `%ð `%ðFzð zð zð zð z�ñ zô zð zð zð zr    