@@ -199,33 +199,34 @@ class RemoteProgress(object):
199199 DONE_TOKEN = 'done.'
200200 TOKEN_SEPARATOR = ', '
201201
202- __slots__ = ("_cur_line", "_seen_ops", "_error_lines")
202+ __slots__ = ('_cur_line',
203+ '_seen_ops',
204+ 'error_lines', # Lines that started with 'error:' or 'fatal:'.
205+ 'other_lines') # Lines not denoting progress (i.e.g. push-infos).
203206 re_op_absolute = re.compile(r"(remote: )?([\w\s]+):\s+()(\d+)()(.*)")
204207 re_op_relative = re.compile(r"(remote: )?([\w\s]+):\s+(\d+)% \((\d+)/(\d+)\)(.*)")
205208
206209 def __init__(self):
207210 self._seen_ops = list()
208211 self._cur_line = None
209- self._error_lines = []
210-
211- def error_lines(self):
212- """Returns all lines that started with error: or fatal:"""
213- return self._error_lines
212+ self.error_lines = []
213+ self.other_lines = []
214214
215215 def _parse_progress_line(self, line):
216216 """Parse progress information from the given line as retrieved by git-push
217217 or git-fetch.
218218
219- Lines that seem to contain an error (i.e. start with error: or fatal:) are stored
220- separately and can be queried using `error_lines()`.
219+ - Lines that do not contain progress info are stored in :attr:`other_lines`.
220+ - Lines that seem to contain an error (i.e. start with error: or fatal:) are stored
221+ in :attr:`error_lines`.
221222
222223 :return: list(line, ...) list of lines that could not be processed"""
223224 # handle
224225 # Counting objects: 4, done.
225226 # Compressing objects: 50% (1/2) \rCompressing objects: 100% (2/2) \rCompressing objects: 100% (2/2), done.
226227 self._cur_line = line
227- if len(self._error_lines ) > 0 or self._cur_line.startswith(('error:', 'fatal:')):
228- self._error_lines .append(self._cur_line)
228+ if len(self.error_lines ) > 0 or self._cur_line.startswith(('error:', 'fatal:')):
229+ self.error_lines .append(self._cur_line)
229230 return []
230231
231232 sub_lines = line.split('\r')
@@ -284,6 +285,7 @@ def _parse_progress_line(self, line):
284285 self.line_dropped(sline)
285286 # Note: Don't add this line to the failed lines, as we have to silently
286287 # drop it
288+ self.other_lines.extend(failed_lines)
287289 return failed_lines
288290 # END handle op code
289291
@@ -309,6 +311,7 @@ def _parse_progress_line(self, line):
309311 max_count and float(max_count),
310312 message)
311313 # END for each sub line
314+ self.other_lines.extend(failed_lines)
312315 return failed_lines
313316
314317 def new_message_handler(self):
0 commit comments