§
    cÌc_  ã                   ó$   — d Z  G d„ d¦  «        ZdS )z?Record counting support for showing progress of revision fetch.c                   ó2   — e Zd ZdZd„ Zd„ Zd„ Zd	d„Zd„ ZdS )
ÚRecordCounterzüContainer for maintains estimates of work requires for fetch.

    Instance of this class is used along with a progress bar to provide
    the user an estimate of the amount of work pending for a fetch (push,
    pull, branch, checkout) operation.
    c                 óL   — d| _         d| _        d| _        d| _        d| _        d S )NFé    é   )ÚinitializedÚcurrentÚ	key_countÚmaxÚSTEP©Úselfs    ú:/usr/lib/python3/dist-packages/breezy/bzr/recordcounter.pyÚ__init__zRecordCounter.__init__   s,   € Ø ˆÔØˆŒØˆŒØˆŒð ˆŒ	ˆ	ˆ	ó    c                 ó   — | j         S )N)r   r   s    r   Úis_initializedzRecordCounter.is_initialized)   s   € ØÔÐr   c                 ó&   — t          |dz  ¦  «        S )zcEstimate the maximum amount of 'inserting stream' work.

        This is just an estimate.
        gš™™™™™$@)Úint)r   r	   s     r   Ú_estimate_maxzRecordCounter._estimate_max,   s   € õ, �9˜tÑ#Ñ$Ô$Ð$r   r   c                 ód   — || _         || _        |                      |¦  «        | _        d| _        dS )z¥Setup RecordCounter with basic estimate of work pending.

        Setup self.max and self.current to reflect the amount of work
        pending for a fetch.
        TN)r   r	   r   r
   r   )r   r	   r   s      r   ÚsetupzRecordCounter.setupD   s5   € ð ˆŒØ"ˆŒØ×%Ò% iÑ0Ô0ˆŒØˆÔÐÐr   c                 ót   — | xj         |z  c_         | j         | j        k    r| xj        | j        z  c_        dS dS )z“Increment self.current by count.

        Apart from incrementing self.current by count, also ensure
        that self.max > self.current.
        N)r   r
   r	   )r   Úcounts     r   Ú	incrementzRecordCounter.incrementO   sA   € ð 	ˆŒ˜ÑˆŒØŒ<˜$œ(Ò"Ð"ØˆHŒH˜œÑ&ˆHŒHˆHˆHð #Ð"r   N)r   )	Ú__name__Ú
__module__Ú__qualname__Ú__doc__r   r   r   r   r   © r   r   r   r      sn   € € € € € ðð ðð ð ð ð  ð  ð%ð %ð %ð0	 ð 	 ð 	 ð 	 ð'ð 'ð 'ð 'ð 'r   r   N)r   r   r   r   r   ú<module>r       sJ   ðð" FÐ EðC'ð C'ð C'ð C'ð C'ñ C'ô C'ð C'ð C'ð C'r   