File: //proc/thread-self/root/lib64/python2.7/site-packages/mercurial/hbisect.pyo
�
1�3\c @@ s� d d l m Z d d l Z d d l m Z d d l m Z m Z d d l m Z d � Z
d � Z d � Z d
� Z
d � Z d � Z d
� Z d � Z d � Z d S( i ( t absolute_importNi ( t _( t hext short( t errorc @ s� � j � � j } t g | d D] } � j | � ^ q � } � � f d � } t } | | d | d � \ } } | s� t } | | d | d � \ } } n � j | � } | s4t | d � d k rt | d � d k r| d | d k rt j t
d � � � n t j t
d � | t | � f � � n i }
t j
| g � } g } x� | r�| j � }
| |
g k rU| j |
� x` | |
� D]O } | d k r�| |
k r�|
| j |
� q�|
g |
| <| j | � q�q�WqUqUW| j � t | � } g | D]$ } | | k r| | k r| ^ q} | d k sE| rng | D] } � j | � ^ qLd | f S| d
} d } d } t � } xB| D]:}
|
| k r�| j |
j |
g � � q�n | |
p�|
g } d | |
<t | � } | | } t | | � } | | k r>|
| k r>| } |
} | | k r>Pq>n | | k ru|
| k ru| j |
j |
g � � q�n xV |
j |
g � D]B } | | r�t t | | | � � | | <q�| | g | | <q�Wq�W� j | � } | g | | f S( s� find the next node (if any) for testing during a bisect search.
returns a (nodes, number, good) tuple.
'nodes' is the final result of the bisect if 'number' is 0.
Otherwise 'number' indicates the remaining possible candidates for
the search and 'nodes' contains the next bisect target.
'good' is True if bisect is searching for a first good changeset, False
if searching for a first bad one.
t skipc @ s� t g | D] } � j | � ^ q
� } t j d � � } x'