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

Conversation

Projects
None yet
3 participants
@carlosmn
Member

carlosmn commented Jan 25, 2014

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.

carlosmn added some commits Nov 4, 2013

remote: call user-provided callbacks
The user can set 'progress', 'transfer_progress' and 'update_tips' to be
notified whenever one of those happen.
TransferProgress: create this type for transfer progress reporting
This gets passed to the transfer progress callback, instead of the
stripped-down version which Remote.fetch() returns.
@xtao

This comment has been minimized.

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 */

This comment has been minimized.

@xtao

xtao Jan 25, 2014

Contributor

More than one space.

@jdavid jdavid merged commit 9a428f9 into libgit2:master Jan 27, 2014

1 check passed

default The Travis CI build passed
Details

@carlosmn carlosmn deleted the carlosmn:remote-callbacks branch Jan 29, 2014

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