199 Commits

Author SHA1 Message Date
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
Carlos Martín Nieto
fc0cdaebd6 Remote: add documentation for credentials 2014-03-26 14:03:29 +01:00
Carlos Martín Nieto
87c8aef7d9 Settings: add documentation
The search_path attribute is now inside __init__() so it shows properly
in the generated documentation.
2014-03-24 01:44:36 +01:00
J. David Ibáñez
a794d66558 docs: document TreeBuilder.get
Fixes #302
2014-02-11 22:48:34 +01:00
J. David Ibáñez
92547db18d docs: clarify git-init recipe
Fixes #336
2014-02-11 22:07:05 +01:00
Carlos Martín Nieto
de3dba668a object: implement peel()
This simplifies getting one type of object from a higher-level one as
well as accepting a commit-ish or tree-ish.
2014-02-11 18:30:47 +01:00
J. David Ibáñez
140305e410 Get ready to release 0.20.2 2014-02-04 22:26:46 +01:00
J. David Ibáñez
d7071b88cd Update copyright year 2014-02-04 08:02:12 +01:00
J. David Ibáñez
7b1310f31b docs: fix warnings 2014-02-04 07:52:58 +01:00
J. David Ibáñez
b95ee3758c Preparing release 2014-02-02 23:32:21 +01:00
J. David Ibáñez
977c315c21 Preparing for release 2014-02-02 15:07:47 +01:00
J. David Ibáñez
6a8e7a97cb Merge remote-tracking branch 'carlos/index-add-entry' 2014-01-29 11:57:44 +01:00
Carlos Martín Nieto
c43c320c3e Index: accept adding either a path or an IndexEntry
A path is only useful if we have the file on the worktree. Passing an
IndexEntry allows us to add an entry with arbitrary attributes.
2014-01-29 11:46:53 +01:00
Carlos Martín Nieto
0bbd15b4f1 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.
2014-01-25 10:48:49 +01:00
Carlos Martín Nieto
c2b2c5dd16 remote: call user-provided callbacks
The user can set 'progress', 'transfer_progress' and 'update_tips' to be
notified whenever one of those happen.
2014-01-25 10:48:49 +01:00
Carlos Martín Nieto
1cc112c32f docs: adjust to recent changes
It seems I have been forgetting to update the documentation with the
last few  changes, so adjust to the oid -> id renaming and add missing
attributes to the listings.
2014-01-25 04:25:42 +01:00
Carlos Martín Nieto
de5244d7c7 Refspec: add documentation 2014-01-19 23:59:49 +01:00
Carlos Martín Nieto
35386cbec2 Config: switch from foreach iterator
An iterator is much more natural in python, so let's use that.
2014-01-19 17:57:26 +01:00
Brodie Rao
78d134c016 repository: add listall_reference_objects() method
This allows for efficient reading of many references and their targets,
without incurring the overhead of lookup_reference() (which stats for
a loose ref and then reads packed-refs) which can be expensive on NFS
with thousands of refs.
2014-01-08 15:14:27 -08:00
J. David Ibáñez
d04823c3c8 Get ready to release 0.20.1 2013-12-24 10:48:39 +01:00
J. David Ibáñez
9a5184ba35 Add documentation for the Walker type 2013-12-23 17:26:02 +01:00
J. David Ibáñez
46543a85d3 Docs: Fix and add missing stuff 2013-12-20 19:00:58 +01:00
Victor Garcia
1938147b3d implementing merge: removing index field from merge.rst 2013-12-10 16:02:37 +01:00
Victor Garcia
1cf6e748e5 implementing merge: some small fixes in merge.rst 2013-12-09 15:51:29 +01:00
Victor Garcia
7d9d2667e5 implementing merge: merge.rst doc and implementing MergeResult as a simple type that maps git_merge_result to it 2013-12-09 15:40:39 +01:00
J. David Ibáñez
87724370d9 Merge remote-tracking branch 'jplana/change_refspec_api' 2013-12-02 16:26:30 +01:00
Jose Plana
05798fc5aa Fixed some error exceptions, docs 2013-12-02 13:40:38 +01:00
J. David Ibáñez
e6c270fe35 Get ready to release v0.20.0 2013-11-24 15:22:10 +01:00
J. David Ibáñez
c80fb4814f Update documentation 2013-11-24 13:34:27 +01:00
J. David Ibáñez
9c13be8dec Release 0.19.1
API changes:

- Rename Commit._message to Commit.raw_message
- Rename Signature._name to Signature.raw_name
- Rename Signature._email to Signature.raw_email

New features:

- Remote.push(refspec)
- Tag.get_object()

And some bugs fixed.

Thanks to Brodie Rao, Fraser Tweedale, Andrew Chin and Carlos Martín
Nieto.
2013-10-03 20:35:58 +02:00
J. David Ibáñez
bde9639314 Merge remote-tracking branch 'fraser/feature/push' 2013-09-02 10:29:10 +02:00
Andrew Chin
d5c0a23630 Doc fixes: change head.oid to head.target in examples 2013-09-01 12:58:55 -04:00
Fraser Tweedale
134d87ab2a implement push support
Implement push support via Remote.push which is called with a single
refspec and raises GitError (with an appropriate message where
possible) if the push fails.

Note that local push to non-bare repository is currently not
supported by libgit2.
2013-08-30 17:42:24 +10:00
Brodie Rao
3d6225d753 Merge branch 'brodie/signature-raw-name-email' into bitbucket 2013-08-19 13:41:25 -07:00
Brodie Rao
aec44c9ca2 signature: rename Signature._name/_email to Signature.raw_name/raw_email 2013-08-19 13:38:57 -07:00
Brodie Rao
b55650e093 commit: rename Commit._message to Commit.raw_message 2013-08-19 11:54:28 -07:00
Brodie Rao
298f941036 tag: add get_object() method
This maps to git_tag_peel().
2013-08-14 20:13:03 -07:00
J. David Ibáñez
5a007802d0 Release 0.19.0
API changes:

- New Oid type
- Changed signature of Repository.create_reference
- Reference.oid and Reference.hex removed, use Reference.target instead
- Drop "del Index[path]" from the API, use Index.remove(path) instead
- Drop TreeEntry.to_object
- Changed signature of Repository.checkout
- Repository.create_blob_from_file removed, use instead new methods
  Repository.create_blob_fromworkdir and
  Repository.create_blob_from_disk

New features:

- Add len(TreeBuilder) and TreeBuilder.get
- Add Repository.merge_base
- Support changing the head with "Repository.head = refname"
- Improved support for diff
- Add support for clone
- Python 2: Support hex oids as byte strings
- Add Reference.get_object()
- Add Remote.save
- Add support for branches, new type Branch

Other:

- Upgraded to libgit2 0.19
- Partial documentation review

Thanks to Nico von Geyso, Daniel Rodríguez Troitiño, Bernardo Heynemann,
Rémi Duraffort, Andrey Devyatkin, Hervé Cauwelier, Jiunn Haur Lim, Richo
Healey, Carlos Martín Nieto, David Fischer, Fraser Tweedale, Jun Omae
and Xu Tao.
2013-07-13 12:04:14 +02:00
Jiunn Haur Lim
38bd4c065d restructured recipes 2013-07-05 20:14:33 -04:00
Jiunn Haur Lim
5dfabbd825 added some quick examples to documentation 2013-07-05 10:44:39 -04:00
J. David Ibáñez
e56e8600ac Upgrading to libgit2 0.19 (wip)
Removed:

- Remote.fetchspec

Added:

- Remote.refspec_count
- Remote.get_refspec(n)
2013-06-30 13:35:51 +02:00
David Fischer
4b051e38ef
Added note about pygit2/libgit2 versioning 2013-06-14 08:04:56 -07:00