OpenQuizz
Une application de gestion des contenus pédagogiques
RemoteProgress Class Reference
Inheritance diagram for RemoteProgress:
Collaboration diagram for RemoteProgress:

Public Member Functions

def __init__ (self)
 
def new_message_handler (self)
 
def line_dropped (self, line)
 
def update (self, op_code, cur_count, max_count=None, message='')
 

Data Fields

 error_lines
 
 other_lines
 

Static Public Attributes

 BEGIN
 
 END
 
 COUNTING
 
 COMPRESSING
 
 WRITING
 
 RECEIVING
 
 RESOLVING
 
 FINDING_SOURCES
 
 CHECKING_OUT
 
 STAGE_MASK
 
 OP_MASK
 
 DONE_TOKEN
 
 TOKEN_SEPARATOR
 
 re_op_absolute
 
 re_op_relative
 

Detailed Description

Handler providing an interface to parse progress information emitted by git-push
and git-fetch and to dispatch callbacks allowing subclasses to react to the progress.

Constructor & Destructor Documentation

◆ __init__()

def __init__ (   self)

Member Function Documentation

◆ line_dropped()

def line_dropped (   self,
  line 
)
Called whenever a line could not be understood and was therefore dropped.

◆ new_message_handler()

def new_message_handler (   self)
:return:
    a progress handler suitable for handle_process_output(), passing lines on to this Progress
    handler in a suitable format

◆ update()

def update (   self,
  op_code,
  cur_count,
  max_count = None,
  message = '' 
)
Called whenever the progress changes

:param op_code:
    Integer allowing to be compared against Operation IDs and stage IDs.

    Stage IDs are BEGIN and END. BEGIN will only be set once for each Operation
    ID as well as END. It may be that BEGIN and END are set at once in case only
    one progress message was emitted due to the speed of the operation.
    Between BEGIN and END, none of these flags will be set

    Operation IDs are all held within the OP_MASK. Only one Operation ID will
    be active per call.
:param cur_count: Current absolute count of items

:param max_count:
    The maximum count of items we expect. It may be None in case there is
    no maximum number of items or if it is (yet) unknown.

:param message:
    In case of the 'WRITING' operation, it contains the amount of bytes
    transferred. It may possibly be used for other purposes as well.

You may read the contents of the current line in self._cur_line

Field Documentation

◆ BEGIN

BEGIN
static

◆ CHECKING_OUT

CHECKING_OUT
static

◆ COMPRESSING

COMPRESSING
static

◆ COUNTING

COUNTING
static

◆ DONE_TOKEN

DONE_TOKEN
static

◆ END

END
static

◆ error_lines

error_lines

◆ FINDING_SOURCES

FINDING_SOURCES
static

◆ OP_MASK

OP_MASK
static

◆ other_lines

other_lines

◆ re_op_absolute

re_op_absolute
static

◆ re_op_relative

re_op_relative
static

◆ RECEIVING

RECEIVING
static

◆ RESOLVING

RESOLVING
static

◆ STAGE_MASK

STAGE_MASK
static

◆ TOKEN_SEPARATOR

TOKEN_SEPARATOR
static

◆ WRITING

WRITING
static

The documentation for this class was generated from the following file: