diff options
author | Sebastian Thiel <byronimo@gmail.com> | 2011-06-13 15:57:42 +0200 |
---|---|---|
committer | Sebastian Thiel <byronimo@gmail.com> | 2011-06-13 15:57:42 +0200 |
commit | 59587d81412ca9da1fd06427efd864174d76c1c5 (patch) | |
tree | 2a02ddc3ea62bd7b51ca2b518533fc00653657dc /git/util.py | |
parent | 48fab54afab49f18c260463a79b90d594c7a5833 (diff) | |
download | gitpython-59587d81412ca9da1fd06427efd864174d76c1c5.tar.gz |
Made remote line parsing more stable. On windows it can be that we encounter partial or intermixed lines from the pipe. This really shouldn't be, but its windows so it happens
Diffstat (limited to 'git/util.py')
-rw-r--r-- | git/util.py | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/git/util.py b/git/util.py index 71bf6977..6576640a 100644 --- a/git/util.py +++ b/git/util.py @@ -176,7 +176,18 @@ class RemoteProgress(object): elif op_name == 'Resolving deltas': op_code |= self.RESOLVING else: - raise ValueError("Operation name %r unknown" % op_name) + # Note: On windows it can happen that partial lines are sent + # Hence we get something like "CompreReceiving objects", which is + # a blend of "Compressing objects" and "Receiving objects". + # This can't really be prevented, so we drop the line verbosely + # to make sure we get informed in case the process spits out new + # commands at some point. + self.line_dropped(sline) + sys.stderr.write("Operation name %r unknown - skipping line '%s'" % (op_name, sline)) + # Note: Don't add this line to the failed lines, as we have to silently + # drop it + return failed_lines + # END handle op code # figure out stage if op_code not in self._seen_ops: |