codecrepos.clone_progress

class CloneProgress[source]

Bases: RemoteProgress

update(op_code, cur_count, max_count=None, message='')[source]

Called whenever the progress changes.

Parameters:
  • op_code (int) –

    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.

  • cur_count (int) – Current absolute count of items.

  • max_count (int | None) – 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.

  • message (str) – In case of the WRITING operation, it contains the amount of bytes transferred. It may possibly be used for other purposes as well.

Note:

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

Return type:

None

error_lines: List[str]
other_lines: List[str]