Skip to content

Conversation

@matt-jordan
Copy link
Contributor

When running a long running operation (such as a clone on a large repo),
Git may return a message indicating that it is 'Finding sources'. Since
there is no bit field value for this message, this causes a large amount
of error messages to be emitted to stderr.

This patch fixes this by adding another bit field value for this
message, FINDING_SOURCES. Derived classes can look for this op_code and
handle it appropriately.

When running a long running operation (such as a clone on a large repo), Git may return a message indicating that it is 'Finding sources'. Since there is no bit field value for this message, this causes a large amount of error messages to be emitted to stderr. This patch fixes this by adding another bit field value for this message, FINDING_SOURCES. Derived classes can look for this op_code and handle it appropriately.
@Byron
Copy link
Member

Thank you ! It seems it wasn't actually tested locally though. Setting _num_op_codes to 8 should make it work.

@matt-jordan
Copy link
ContributorAuthor

Eek. Sorry about that - I had originally made the change in another branch, and did a poor copy over to the new branch. Whoops.

The previous patch failed to update the expected number of op_codes, which would result in an exception when creating an instance of RemoteProgress. This patch corrects the value to the new expected number of op_codes (8)
@matt-jordan
Copy link
ContributorAuthor

The flake8 error is complaining about the length of the line. I don't normally like using '', but would the following be acceptable:

168 BEGIN, END, COUNTING, COMPRESSING, WRITING, RECEIVING, RESOLVING, FINDING_SOURCES = \ 169 [1 << x for x in range(_num_op_codes)] 

I'd be happy with any other suggestion for wrapping that line.

@matt-jordan
Copy link
ContributorAuthor

I'm not sure I know what is occurring with this test:

====================================================================== FAIL: test_init_repo_object (git.test.test_docs.Tutorials) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/travis/build/gitpython-developers/GitPython/git/ext/gitdb/gitdb/test/lib.py", line 87, in wrapper return func(self, path) File "/home/travis/build/gitpython-developers/GitPython/git/test/test_docs.py", line 97, in test_init_repo_object assert (now.commit.tree / 'VERSION').data_stream.read().decode('ascii').startswith('0') AssertionError 

If you can give me a hint, I'd be happy to go in and fix it.

@ByronByron self-assigned this Apr 16, 2015
@ByronByron merged commit 6d83f44 into gitpython-developers:masterApr 16, 2015
@Byron
Copy link
Member

Thanks, I will take it from here :).

You can watch the development stream on youtube.

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@matt-jordan@Byron