我们从Python开源项目中,提取了以下4个代码示例,用于说明如何使用git.RemoteProgress()。
def update( self, op_code, cur_count, max_count=None, message='' ): stage_name = self.all_update_stages.get( op_code&git.RemoteProgress.OP_MASK, 'Unknown' ) is_begin = op_code&git.RemoteProgress.BEGIN != 0 is_end = op_code&git.RemoteProgress.END != 0 self.progress_call_back( is_begin, is_end, stage_name, cur_count, max_count, message )
def __init__(self,delegate): git.RemoteProgress.__init__(self) self.delegate = delegate
def __init__(self, username, callback, max_lines=10): git.RemoteProgress.__init__(self) self.lines = deque(maxlen=max_lines) self.username = username self.callback = callback