139 Commits

Author SHA1 Message Date
Carlos Martín Nieto
d0b00e3124 Add support for libgit2 feature detection
This lets us ask the library whether it supports threading, https and
ssh.
2015-01-14 20:47:47 +01:00
Matthew Duggan
52ac41a362 Make it explicit that Refspec objects are not for construction 2015-01-12 18:20:11 -08:00
Richard Möhn
22d1aef50d Remove obsolete git-branch recipe
The git-branch recipe says: »Note that the next release will probably
allow repo.listall_branches().« Concluding from the README,
Repository.listall_branches() was included in some release prior to
0.20.0, so at least that statement is obsolete.

However, since pygit2.org brings up fairly accurate results for a search
on »list all branches«, I figured that the whole recipe isn't needed
anymore. Therefore delete it.
2015-01-05 10:27:43 +01:00
Kevin KIN-FOO
aff3a64e2d Mention libssh2 in installation#requirements
Fixes #456
2014-12-30 16:08:07 +01:00
J. David Ibáñez
beff871923 Minor styling 2014-11-12 10:21:47 +01:00
Carlos Martín Nieto
b80103b017 Introduce RemoteCollection
This lets us look up remotes by name, which is not possible by just
returning the list of remotes.

Move remote creation to Repostiory.remotes.create() and keep the old
Repository.create_remote() for compatibility, delegating to this new
way.

Existing code should keep working, but this moves us towards what we'd
need for a better interface in 0.22 which makes remote renaming and
deleting work with a name rather than an instance and would make sense
to exist as part of an Remote.remotes object.
2014-11-11 19:57:22 +01:00
J. David Ibáñez
21e2102e7c Get ready for 0.21.4 release 2014-11-04 17:49:43 +01:00
J. David Ibáñez
8e933c8019 issue#441: change modulename to include hash of source
This should make it work both for users and developers.
2014-10-30 19:41:25 +01:00
J. David Ibáñez
7653d12c72 docs: review install section 2014-10-30 13:45:54 +01:00
J. David Ibáñez
6bb2b369fa Merge remote-tracking branch 'wking/instaleld-typo' 2014-10-28 09:25:42 +01:00
J. David Ibáñez
7daa95a3a5 Merge remote-tracking branch 'wking/install-filing-typo' 2014-10-28 09:23:52 +01:00
W. Trevor King
6677de82c2 docs/install: Fix 'instaleld' -> 'installed' typo 2014-10-27 21:36:06 -07:00
W. Trevor King
8ca75e2744 docs/install: Fix 'filling un' -> 'filing a' typo 2014-10-27 21:31:55 -07:00
W. Trevor King
05c570c3fc docs/working-copy: Replace 'del index[path]' with index.remove(path)
Catch up with b12a5960 (Remove "del index[xxx]" from the API,
2013-05-02).
2014-10-27 21:03:37 -07:00
W. Trevor King
120fdedb5a docs/merge: default_signature is an attribute, not a method
Avoid:

  >>> repo.default_signature()
  Traceback (most recent call last):
    File "<stdin>", line 1, in <module>
  TypeError: '_pygit2.Signature' object is not callable
2014-10-26 16:36:34 -07:00
Carlos Martín Nieto
b98e9e85de Reference: implement peel()
This makes both objects and references peelable via the same interface,
simplifying how to get to the wanted type.
2014-10-07 20:27:01 +02:00
J. David Ibáñez
6831983a26 docs: now "pip install pygit2" installs cffi first
This was fixed in PR#407
2014-09-24 09:33:25 +02:00
Soasme
8bb263559d Fix typo pìp to pip 2014-09-24 09:53:39 +08:00
J. David Ibáñez
c997037c7b Get ready for 0.21.3 release 2014-09-15 12:39:27 +02:00
Carlos Martín Nieto
ab730cb1d4 Provide a method to write a tree to an archive
Add Repository.write_archive() to write a given tree to an archive. As
there are many customisation options, we only provide a method to write
to an archive which is created by the user.
2014-09-06 18:59:15 +02:00
Carlos Martín Nieto
70410349ff Update reference documentation 2014-08-28 01:25:21 +02:00
djmattyg007
f98dc8264a Dynamically get version component of build directory for building sphinx docs
This almost certainly isn't perfect, but it's a big step up and should
work on (at least) any 32-bit or 64-bit version of python2 or python3
running on Linux (rather than just 64-bit python2.7 on Linux).
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
a0a70c3264 Get ready for 0.21.1 release 2014-07-22 18:15:20 +02:00
J. David Ibáñez
c51165e379 Add Repository.state_cleanup to the docs 2014-07-19 12:59:26 +02:00
J. David Ibáñez
fdfda17121 docs: review the installation documentation 2014-07-18 20:01:20 +02:00
J. David Ibáñez
d2a62c5268 Merge remote-tracking branch 'carlos/cffi-index' 2014-07-10 15:52:30 +02:00
J. David Ibáñez
5fad06acff Merge remote-tracking branch 'vtemian/sphinx' 2014-07-10 12:47:34 +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
31fc235b59 Fix sphinx complaints about the docs
Use the right namespace so Refspec and TransferProgress show up. These
classes are not instantiated by the user, so they were not promoted to
the pygit2 module. Use autoclass so it lists everything for us.

Also use autoclass for the reflog. We had a difference is oid vs id
between the docs and the code.
2014-07-10 08:25:54 +02:00
vtemian
6f438ad173 Added sphinx rtd theme 2014-07-09 18:13:49 +03:00
Carlos Martín Nieto
9a7348a9d0 Update docs for merging
Remove references to MergeResult and put merge_analysis in the docs.
2014-07-08 13:55:18 +02:00
J. David Ibáñez
7b3201d868 Get ready to release 0.21.0 2014-06-27 17:28:01 +02:00
J. David Ibáñez
88a28f7ed8 Merge remote-tracking branch 'carlos/development' 2014-06-21 10:14:00 +02:00
Michael Jones
1f111c08b6 Provide example for Reference.log_append
I would have found this useful when trying to do reflog additions. It
might not be massively complex but examples always help.
2014-06-15 11:39:24 +01:00
Michael Jones
7296b921cc Fix spelling typo 2014-06-15 11:30:33 +01:00
Michael Jones
28ae47f42b Provide a doc example for discover_repository
To clarify the behaviour and usage.
2014-06-15 11:11:16 +01:00
Michael Jones
bd322fa132 Correct LIBGIT2_VERSION name and add documentation
LIBGIT2_VERSION was previously recorded as LIBGIT2_VER_VERSION which is
incorrect.

We also add basic explanations to all the constants so that the page is
a little less bare. Perhaps this should be done as autodoc style
comments in the code but I guess not.
2014-06-15 11:11:16 +01: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
9e91a390cc Index: accept a tree for read_tree()
An index may not have an associated repository, so giving it an id in
that case is useless. Raise an error in that case and accept a Tree
object to make the function useful then.
2014-05-27 18:52:05 +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
J. David Ibáñez
17ba85831b Drop official support for Python 2.6 2014-04-23 14:01:09 +02:00
J. David Ibáñez
3cc129dd62 Merge remote-tracking branch 'origin/cffi-remote' 2014-04-18 21:56:00 +02:00
Carlos Martín Nieto
4c4968a2fb Fix config documentation keyword
The keyword for linking to a mehtod is 'meth', not 'method'. Setting the
'currentmodule' allows us to link without the 'pygit2' prefix in the
link text.
2014-04-18 12:17:54 +02:00
J. David Ibáñez
397e8ad07c Merge remote-tracking branch 'carlos/config-parse' 2014-04-15 09:01:03 +02:00
Carlos Martín Nieto
73e9e58fa4 Config: make bool and int parsing explicit via functions
Passing a tuple to the mapping interface isn't the best of interfaces,
as the key is only the string.

Instead, expose `Config.get_bool()` and `Config.get_int()` methods to
parse the values as per the git-config rules before returning the
appropriate type to the user.

The mapping interface itself returns a string.
2014-04-14 19:37:44 +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
J. David Ibáñez
d882af8f52 Get ready to release 0.20.3 2014-04-02 22:28:18 +02:00
Carlos Martín Nieto
e5f6798f67 Adjust to oid -> id renaming 2014-04-01 19:47:48 +02:00
Carlos Martín Nieto
687dc5388e config: make type conversion explicit
The type of a config value depends on the tool that interprets
it. Parsing eagerly can lead to a situation where we return a bool
instead of a string or a number.

Let the user specify the type themselves by passing in a (str, type)
tuple into the mapping interface.
2014-03-27 18:04:38 +01:00