Skip to content
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

Implement remote callbacks #324

Merged
merged 3 commits into from
Jan 27, 2014
Merged

Conversation

carlosmn
Copy link
Member

The callbacks get set on the Remote object and are called whenever libgit2 calls us. There is a layer inside the Remote object that converts the libgit2 data into something more manageable for python.

When we can change what Remote.fetch() returns, I think we should return a TransferProgress as well.

This fixes #274.

The user can set 'progress', 'transfer_progress' and 'update_tips' to be
notified whenever one of those happen.
This gets passed to the transfer progress callback, instead of the
stripped-down version which Remote.fetch() returns.
@xtao
Copy link
Contributor

xtao commented Jan 25, 2014

🍻

@@ -256,7 +258,7 @@
PyTypeObject RefspecType = {
PyVarObject_HEAD_INIT(NULL, 0)
"_pygit2.Refspec", /* tp_name */
sizeof(Remote), /* tp_basicsize */
sizeof(Refspec), /* tp_basicsize */
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

More than one space.

@jdavid jdavid merged commit 9a428f9 into libgit2:master Jan 27, 2014
@carlosmn carlosmn deleted the remote-callbacks branch January 29, 2014 07:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add progress callback support
3 participants