HEX
Server: Apache
System: Linux infong-uk86 4.4.400-icpu-106 #2 SMP Mon Sep 15 08:23:40 UTC 2025 x86_64
User: u44115835 (4976590)
PHP: 8.4.17
Disabled: NONE
Upload Files
File: //kunden/lib/python3/dist-packages/breezy/__pycache__/recordcounter.cpython-39.pyc
a

�*�^��@s$dZddlmZGdd�de�ZdS)z?Record counting support for showing progress of revision fetch.�)�absolute_importc@s:eZdZdZdd�Zdd�Zdd�Zdd	d
�Zdd�Zd
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.
    cCs"d|_d|_d|_d|_d|_dS)NFr�)�initialized�current�	key_count�maxZSTEP��self�r�6/usr/lib/python3/dist-packages/breezy/recordcounter.py�__init__s
zRecordCounter.__init__cCs|jS)N)rr	rrr�is_initialized+szRecordCounter.is_initializedcCst|d�S)zcEstimate the maximum amount of 'inserting stream' work.

        This is just an estimate.
        g������$@)�int)r
rrrr�
_estimate_max.szRecordCounter._estimate_maxrcCs"||_||_|�|�|_d|_dS)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)rrrrr)r
rrrrr�setupFszRecordCounter.setupcCs.|j|7_|j|jkr*|j|j7_dS)z�Increment self.current by count.

        Apart from incrementing self.current by count, also ensure
        that self.max > self.current.
        N)rrr)r
�countrrr�	incrementQszRecordCounter.incrementN)r)	�__name__�
__module__�__qualname__�__doc__r
rrrrrrrrrs

rN)rZ
__future__r�objectrrrrr�<module>s