Skip to content

Progress parsing #20

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 6 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Parse more git-fetch operation log codes.
  • Loading branch information
int3 committed May 23, 2011
commit 1f8cb16e6d88626507f60cd584b54e9d9987576a
8 changes: 6 additions & 2 deletions git/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,8 +109,8 @@ class RemoteProgress(object):
Handler providing an interface to parse progress information emitted by git-push
and git-fetch and to dispatch callbacks allowing subclasses to react to the progress.
"""
_num_op_codes = 5
BEGIN, END, COUNTING, COMPRESSING, WRITING = [1 << x for x in range(_num_op_codes)]
_num_op_codes = 7
BEGIN, END, COUNTING, COMPRESSING, WRITING, RECEIVING, RESOLVING = [1 << x for x in range(_num_op_codes)]
STAGE_MASK = BEGIN|END
OP_MASK = ~STAGE_MASK

Expand Down Expand Up @@ -168,6 +168,10 @@ def _parse_progress_line(self, line):
op_code |= self.COMPRESSING
elif op_name == "Writing objects":
op_code |= self.WRITING
elif op_name == 'Receiving objects':
op_code |= self.RECEIVING
elif op_name == 'Resolving deltas':
op_code |= self.RESOLVING
else:
raise ValueError("Operation name %r unknown" % op_name)

Expand Down