123 Commits

Author SHA1 Message Date
J. David Ibáñez
a53d8b2213 Merge remote-tracking branch 'djmattyg007/doc_fixes' 2014-08-26 10:31:53 +02:00
J. David Ibáñez
fe5c9d68c3 Merge remote-tracking branch 'djmattyg007/branches_are_references' 2014-08-26 10:15:33 +02:00
J. David Ibáñez
617dd34f5e Merge remote-tracking branch 'carlos/checkout-branch' 2014-08-26 10:09:32 +02:00
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
Carlos Martín Nieto
b550027234 Fix cloning a repository with a particular branch to checkout
We were missing a cast to bytes. Add a test for this option as well and
remove the old commented-out test for checkout_branch, which is
superseded by this one and whose last bit seemed confused about what the
option means.

This fixes #399
2014-08-25 13:58:41 +02:00
djmattyg007
629eea01e9 Allow objects of type Branch to be passed to Repository.checkout()
Branch inherits from Reference, so there's no reason why we shouldn't be
able to pass a Branch object.
2014-08-23 11:23:17 +10:00
djmattyg007
9718fd8c32 Add note about checkout('HEAD') being identical to checkout_head() 2014-08-23 01:08:32 +10:00
djmattyg007
2bd73f3bdf Clear up confusion regarding accepted types for Repository.checkout() refname parameter 2014-08-23 01:06:30 +10:00
J. David Ibáñez
99f295e2e8 docs: fix reST errors 2014-08-20 17:00:33 +02:00
J. David Ibáñez
f0631868af Merge remote-tracking branch 'djmattyg007/doc_updates' 2014-08-20 16:34:01 +02: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
Mathieu Bridon
6c4e1d093b Fix syntax error 2014-08-12 11:25:17 +02:00
djmattyg007
d752e8550b Further clarified purpose of user field in docstring for Keypair class 2014-08-12 08:43:05 +10: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
f5765b0968 Get ready for 0.21.2 release 2014-08-09 16:56:13 +02:00
J. David Ibáñez
ed26ed3944 Get back IndexEntry.oid for backwards compatibility 2014-07-30 12:58:27 +02:00
J. David Ibáñez
3ccba38725 Fix regression in v0.21.1, IndexEntry.path returns str
And str in Python 2 means bytes. Recall, we are supposed to give a
native experience to both Python 2 and 3 users.
2014-07-28 18:02:24 +02: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
Carlos Martín Nieto
2a429aae98 config: only return the config key in iteration
At its core, the config is a key-value storage with peculiar key
equality rules. Make it behave more like a python dictionary and return
the key on iteration.
2014-07-24 18:43:54 +02:00
Carlos Martín Nieto
e437e13182 config: decode the string with utf-8 on getitem
This is what we do elsewhere, but this was missed.
2014-07-24 18:43:18 +02:00
J. David Ibáñez
a0a70c3264 Get ready for 0.21.1 release 2014-07-22 18:15:20 +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
57e25c1a4a index: replace has_conflicts by conflicts returning None 2014-07-22 10:50:30 +02:00
J. David Ibáñez
4c375907c5 Make checkout to fail on unexpected options 2014-07-19 12:22:34 +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
763b571c84 checkout: add support for overriding the target directory 2014-07-11 14:49:56 +02:00
Carlos Martín Nieto
af38211d0c checkout: move the code to cffi
As part of this, make the strategy part of **kwargs, in preparation for
supporting more options.
2014-07-11 14:42:29 +02:00
Carlos Martín Nieto
ae32ad12ee Support del in ConflictCollection 2014-07-10 11:27:10 +02:00
Carlos Martín Nieto
5ed9eb4228 Add documentation for conflicts and fixup Index
Add documentation for the conflicts, and add some for IndexEntry and
Index which went missing during the conversion to cffi.
2014-07-10 09:08:16 +02:00
Carlos Martín Nieto
1985a95b6b Add looking up conflicts in an Index 2014-07-10 09:08:16 +02:00
Carlos Martín Nieto
97ee7ab179 Move Index to cffi
This commit gives us feature-parity with the version in C.
2014-07-10 09:08:16 +02:00
vtemian
d8864bdf02 Added docs 2014-07-09 16:50:17 +03:00
vtemian
19dd7629d3 Proper naming 2014-07-09 16:46:52 +03:00
vtemian
02fd05baae Added clean_state_files 2014-07-09 16:39:34 +03:00
Jasper Lievisse Adriaanse
b0bf223276 Tweak include/lib dir detection in ffi.py
Joint work with @carlosmn
2014-07-03 10:51:32 +02:00
J. David Ibáñez
7b3201d868 Get ready to release 0.21.0 2014-06-27 17:28:01 +02: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
d3af09e86d Adjust to clone_into signature change 2014-06-07 21:45:10 +02:00
Carlos Martín Nieto
1d4031bacd Merge remote-tracking branch 'upstream/master' into development
Conflicts:
	pygit2/decl.h
	test/test_repository.py
2014-06-07 21:38:07 +02:00
Carlos Martín Nieto
491e352e41 Update to latest libgit2 2014-06-07 21:31:47 +02:00
J. David Ibáñez
95e6593625 init_repository now wraps git_repository_init_ext
Fixes #347
2014-06-03 12:52:46 +02:00
J. David Ibáñez
6cf06ba9fe Rewrite init_repository using cffi 2014-06-02 18:50:55 +02:00
Carlos Martín Nieto
19be4b6aa4 clone: wrap clone_into()
This allows the user to prepare the repository and remote with whichever
custom settings they want before performing the "clone" proper.
2014-05-20 03:23:25 +02:00
Carlos Martín Nieto
b1bacdd8d5 Wrap config snapshot functions
These allow complex reads to come from the same version of the config.
2014-05-18 11:03:30 +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
9309329b5a Merge pull request #361 from carlosmn/cffi-config
Config: move to cffi
2014-04-26 16:39:50 +02:00