original_docstring: Parse progress information from the given line as retrieved by git-push
  		or git-fetch
  		
  		:return: list(line, ...) list of lines that could not be processed
docstring: Parse progress information from the given line as retrieved by git-push
  or git-fetch
docstring_tokens: Parse progress information from the given line as retrieved by git - push or git - fetch
code: def _parse_progress_line(self, line):
  		"""Parse progress information from the given line as retrieved by git-push
  		or git-fetch
  		
  		:return: list(line, ...) list of lines that could not be processed"""
  		# handle
  		# Counting objects: 4, done. 
  		# Compressing objects:	50% (1/2)	\rCompressing objects: 100% (2/2)	\rCompressing objects: 100% (2/2), done.
  		self._cur_line = line
  		sub_lines = line.split('\r')
  		failed_lines = list()
  		for sline in sub_lines:
  			# find esacpe characters and cut them away - regex will not work with 
  			# them as they are non-ascii. As git might expect a tty, it will send them
  			last_valid_index = None
  			for i,c in enumerate(reversed(sline)):
  				if ord(c) < 32:
  					# its a slice index
  					last_valid_index = -i-1 
  				# END character was non-ascii
  			# END for each character in sline
  			if last_valid_index is not None:
  				sline = sline[:last_valid_index]
  			# END cut away invalid part
  			sline = sline.rstrip()
  			
  			cur_count, max_count = None, None
  			match = self.re_op_relative.match(sline)
  			if match is None:
  				match = self.re_op_absolute.match(sline)
  				
  			if not match:
  				self.line_dropped(sline)
  				failed_lines.append(sline)
  				continue
  			# END could not get match
  			
  			op_code = 0
  			remote, op_name, percent, cur_count, max_count, message = match.groups()
  			
  			# get operation id
  			if op_name == "Counting objects":
  				op_code |= self.COUNTING
  			elif op_name == "Compressing objects":
  				op_code |= self.COMPRESSING
  			elif op_name == "Writing objects":
  				op_code |= self.WRITING
  			else:
  				raise ValueError("Operation name %r unknown" % op_name)
  			
  			# figure out stage
  			if op_code not in self._seen_ops:
  				self._seen_ops.append(op_code)
  				op_code |= self.BEGIN
  			# END begin opcode
  			
  			if message is None:
  				message = ''
  			# END message handling
  			
  			message = message.strip()
  			done_token = ', done.'
  			if message.endswith(done_token):
  				op_code |= self.END
  				message = message[:-len(done_token)]
  			# END end message handling
  			
  			self.update(op_code, cur_count, max_count, message)
  		# END for each sub line
  		return failed_lines
code_tokens: def _parse_progress_line ( self , line ) : self . _cur_line = line sub_lines = line . split ( '\r' ) failed_lines = list ( ) for sline in sub_lines : last_valid_index = None for i , c in enumerate ( reversed ( sline ) ) : if ord ( c ) < 32 : last_valid_index = - i - 1 if last_valid_index is not None : sline = sline [ : last_valid_index ] sline = sline . rstrip ( ) cur_count , max_count = None , None match = self . re_op_relative . match ( sline ) if match is None : match = self . re_op_absolute . match ( sline ) if not match : self . line_dropped ( sline ) failed_lines . append ( sline ) continue op_code = 0 remote , op_name , percent , cur_count , max_count , message = match . groups ( ) if op_name == "Counting objects" : op_code |= self . COUNTING elif op_name == "Compressing objects" : op_code |= self . COMPRESSING elif op_name == "Writing objects" : op_code |= self . WRITING else : raise ValueError ( "Operation name %r unknown" % op_name ) if op_code not in self . _seen_ops : self . _seen_ops . append ( op_code ) op_code |= self . BEGIN if message is None : message = '' message = message . strip ( ) done_token = ', done.' if message . endswith ( done_token ) : op_code |= self . END message = message [ : - len ( done_token ) ] self . update ( op_code , cur_count , max_count , message ) return failed_lines
short_docstring: Parse progress information from the given line as retrieved by git-push
  or git-fetch
short_docstring_tokens: Parse progress information from the given line as retrieved by git - push or git - fetch
comment: """Parse progress information from the given line as retrieved by git-push
  		or git-fetch
  		
  		:return: list(line, ...) list of lines that could not be processed"""$SEP$# handle$SEP$# Counting objects: 4, done. $SEP$# Compressing objects:	50% (1/2)	\rCompressing objects: 100% (2/2)	\rCompressing objects: 100% (2/2), done.$SEP$# find esacpe characters and cut them away - regex will not work with $SEP$# them as they are non-ascii. As git might expect a tty, it will send them$SEP$# its a slice index$SEP$# END character was non-ascii$SEP$# END for each character in sline$SEP$# END cut away invalid part$SEP$# END could not get match$SEP$# get operation id$SEP$# figure out stage$SEP$# END begin opcode$SEP$# END message handling$SEP$# END end message handling$SEP$# END for each sub line