20 Commits

Author SHA1 Message Date
J. David Ibáñez
dad9bc3612 Merge remote-tracking branch 'mduggan/remote-refcount-fix' 2014-08-26 10:02:07 +02:00
Matthew Duggan
2f2d4005c7 Ensure self handle stays alive - keeping it in callbacks is not enough. 2014-08-25 22:39:16 +09:00
Matthew Duggan
99433ca66a Hard-code callback version because we'll need to change the defs if it changes. 2014-08-18 21:12:34 +09:00
Matthew Duggan
794dbe7b9c set callbacks just before fetch, clear them after (fixes #403). 2014-08-18 18:22:45 +09:00
djmattyg007
f787a52e66 Document list of parameters for the Keypair credential callback.
Includes a couple of small grammar fixes to other docstrings.
2014-08-10 12:39:27 +10:00
J. David Ibáñez
be807a1dfc internal: split code for Python 2/3 compatibility 2014-07-28 17:51:51 +02:00
J. David Ibáñez
7df11bf817 internal: rename "to_str" to "to_bytes" for clarity 2014-07-28 17:30:38 +02:00
J. David Ibáñez
5d01300956 Testing a docstring formating that's nice with pydoc 2014-07-22 17:35:23 +02:00
J. David Ibáñez
794e82c799 Add some error checks 2014-07-15 21:10:51 +02:00
vtemian
93369b0a7c Cleanup a little bit the code 2014-07-14 20:21:24 +03:00
Carlos Martín Nieto
bde58d9727 Remote: make renaming take a method call
Renaming a remote in pygit2 has been done via Remote.name= up to now,
but this is inherently unsafe, as it provides no way to pass up the
refspecs that libgit2 was unable to remap.

In fact, if there ever was such problem, we would have segfaulted.

libgit2 now provides a much more direct way of getting back the results,
so expose it as the return value of Remote.rename(). This also removes
the hint that a rename might be something that happens only to the
in-memory structure.
2014-06-08 20:35:21 +02:00
Carlos Martín Nieto
2b5e408029 Merge remote-tracking branch 'upstream/master' into development
Reconcile the changes between the ffi changes upstream with the changes
to libgit2 in the dev branch.

Conflicts:
	src/config.c
	src/options.c
	src/refspec.c
	src/remote.c
2014-05-16 04:41:26 +02:00
Carlos Martín Nieto
7ed89b0aab Remote: protect against invalid input on rename
The C API expects a non-NULL new name and raises an assertion if we
don't protect against such input, so let's guard against falsy values,
which also takes care of the empty string, which is also not valid
input.
2014-04-17 23:18:31 +02:00
Carlos Martín Nieto
e56ab370a7 Remote: make sure to take the contents of the id
Pass the contents of the buffer containing the git_oid to bytes() so
build a raw representation of its contents. Using bytes(ffi.buffer(...))
returns the representation of the buffer.
2014-04-16 22:12:24 +02:00
Carlos Martín Nieto
674546bbb5 Some python3 fixes 2014-04-16 22:12:09 +02:00
Carlos Martín Nieto
072b038210 Implement clone via CFFI as well
This lets us get rid of the last piece of C for anything related to
remotes and credentials.
2014-04-14 11:42:51 +02:00
Carlos Martín Nieto
cf2703998e Remote: add documentation strings
Now that it has the features of the old implementation, let's add
documentation on how to use it.
2014-04-14 11:42:51 +02:00
Carlos Martín Nieto
2d1615dd29 Remote: add support for transfer and update_tips though CFFI 2014-04-14 11:42:51 +02:00
Carlos Martín Nieto
4ef3be18cc Remote: support credentials via CFFI 2014-04-14 11:42:51 +02:00
Carlos Martín Nieto
c76c3f0195 Start implementing remotes with CFFI
This moves enough code into python with CFFI to pass the test_remotes
unit tests. There is no credentials support yet.

There is a small change in the return value of Remote.fetch() in that we
now return a TransferProgress object instead of extracting a few values
into a dictionary.
2014-04-14 11:42:51 +02:00