59 Commits

Author SHA1 Message Date
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
J. David Ibáñez
d882af8f52 Get ready to release 0.20.3 2014-04-02 22:28:18 +02:00
J. David Ibáñez
f0874cc1ea Always use new-style classes in Python 2 2014-03-27 21:00:09 +01:00
J. David Ibáñez
69a96975a9 Merge remote-tracking branch 'carlos/credentials' 2014-03-27 20:54:02 +01:00
Carlos Martín Nieto
82d88191bb credentials: use more ducks
Instead of making everyone inherit from our credential types, use an
interface with two attributes, which makes the C code much shorter and
simpler.
2014-03-26 20:23:04 +01:00
Carlos Martín Nieto
b3ce1b5da6 Add credentials support to clone_repository() 2014-03-26 14:50:25 +01:00
Carlos Martín Nieto
75f9f88335 Update clone_repository's docs
It claims you need to checkout a branch after clone, which is not the
case currently (the clone function will do it for you).

While here, format the docstring for sphinx to make it pretty.
2014-03-26 14:48:34 +01:00
Carlos Martín Nieto
fc0cdaebd6 Remote: add documentation for credentials 2014-03-26 14:03:29 +01:00
Carlos Martín Nieto
b49da53962 Introduce credentials 2014-03-26 12:10:24 +01:00
Thomas Kluyver
af2528418a More informative repr for Repository objects 2014-03-25 15:13:10 -07: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
Carlos Martín Nieto
6bdb013592 settings: python 3.3 compat
Python 3.3 doesn't like us overriding properties in __slots__, so set it
to an empty list.
2014-03-24 01:43:40 +01:00
Carlos Martín Nieto
48ff3a8983 Create proxy object for libgit2 options
pygit2.settings proxies though the lower-level varargs option() via
getters and setters which provide a more natural abstraction.
2014-03-23 15:53:32 +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
d04823c3c8 Get ready to release 0.20.1 2013-12-24 10:48:39 +01:00
J. David Ibáñez
e6c270fe35 Get ready to release v0.20.0 2013-11-24 15:22:10 +01:00
Carlos Martín Nieto
b7e906eee9 Adjust to libgit2 development branch
This wraps the previous functionality, though there are some iterator
changes we might still want to bring over.
2013-11-20 12:20:26 +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
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
Daniel Rodríguez Troitiño
1062ab638b Implement Repository.lookup_branch. Constants for local and remote branches. 2013-05-26 17:43:28 +02:00
J. David Ibáñez
0c86307eb5 Coding style: Silent pep8 2013-05-26 14:39:12 +02:00
J. David Ibáñez
5904a8752c docs: fix warning 2013-05-24 23:10:55 +02:00
J. David Ibáñez
f075aa3665 Fix some "errors" found by pyflakes 2013-05-24 21:34:10 +02:00
Nico von Geyso
6dd14d799e Fixed: Use GIT_DIFF_NORMAL as default flag for Diff 2013-05-20 15:38:49 +02:00
Nico von Geyso
86aafebb6d Fixed: remove OrderedDict for compability reasons (python2.6) 2013-05-20 15:13:04 +02:00
Nico von Geyso
77b5cdce5b Refactored: get rid of type check for treeish_to_tree in Diff 2013-05-20 14:58:54 +02:00
Nico von Geyso
6ce71a2799 Added: support for context_lines and interhunk_lines for diffs 2013-05-20 14:49:48 +02:00
Nico von Geyso
b4656cc99c Merge remote-tracking branch 'upstream/master' into features/diff_refactoring
Conflicts:
	src/tree.c
2013-05-18 15:48:27 +02:00
Nico von Geyso
0fc7a4fbad Refactored Index.diff() into Index.diff_to_tree()/diff_to_workdir() 2013-05-18 15:29:28 +02:00
Nico von Geyso
196d0595b0 Added: Repository.diff() - porcelain method similiar to 2013-05-18 14:48:05 +02:00
Bernardo Heynemann
032faf7017 Fixing 80-column width for both the python and C code. 2013-05-16 16:09:39 -03:00
Bernardo Heynemann
a377b32b60 Documentation for the new clone method.
Even though I am aware that the comment lines in pygit2/__init__.py are longer than 79 characters, there's a reason for that.
If I break them, they'll show poorly in the documentation, and in my opinion better docs trump the 80 char requirement. If you think it's still better to have less than 80 characters in the comments, I'll gladly resubmit the changes at the expense of the documentation.
2013-05-16 10:25:47 -03:00
Bernardo Heynemann
57ea19e905 Now __init__ is pep8-compliant 2013-05-16 10:06:46 -03:00
Bernardo Heynemann
3dd998c061 Supporting clone in pygit2 2013-05-15 18:15:00 -03:00
J. David Ibáñez
101715bf37 docs: review, in progress 2013-05-09 14:21:04 +02:00
J. David Ibáñez
974f16ca69 Re-work the checkout API
New API:

  Repository.head = refname
  Repository.checkout_head(strategy)
  Repository.checkout_index(strategy)
  Repository.checkout_tree(treeish, strategy)

Changed API:

  # Before
  Repository.checkout(strategy=GIT_CHECKOUT_SAFE_CREATE, reference=None,
                      head=False)

  # Now
  Repository.checkout(refname=None, strategy=GIT_CHECKOUT_SAFE_CREATE)
2013-05-05 21:45:39 +02:00
J. David Ibáñez
3a0bafa12b Rename "low level" reference creation methods
Rename Repository methods:

- git_reference_create          => create_reference_direct
- git_reference_symbolic_create => create_reference_symbolic
2013-05-04 09:30:37 +02:00
J. David Ibáñez
67417c7f56 create_reference, drop the symbolic param (#213)
Now we figure out whether it is a direct or symbolic reference based on
the type and value of the target. This guessing will fail in very very
rare situations, for that we still have the explicit lower level API.
2013-04-27 11:39:37 +02:00
J. David Ibáñez
e86fee5c7e Release 0.18.1
Changes:

- (#203) Now Repository.head returns the resolved reference, not the
  commit

- (#210) Fix refcount error in Repository.create_remote

- (#212) Improved diff documentation

Thanks to Jun Omae and Nico von Geyso.
2013-04-20 22:27:09 +02:00
J. David Ibáñez
072cc38607 Release v0.18.0 2013-04-16 22:46:53 +02:00
J. David Ibáñez
32e460fe16 docs: complete and improve organization 2013-04-03 19:09:48 +02:00
J. David Ibáñez
c3ca27fa72 Merge branch 'master' into next
Conflicts:
	include/pygit2/types.h
	src/oid.c
2013-03-23 15:54:12 +01:00
J. David Ibáñez
8588c20943 Fix import (#196) using relative imports 2013-03-13 14:43:44 +01:00
J. David Ibáñez
4abd370ea8 Make bug #196 to show up with Python 2 2013-03-13 14:36:40 +01:00
J. David Ibáñez
ad4b4cc4c5 Implement the Repository mapping interface in Python
Add 'Repository.get' and low level 'Repository.git_object_lookup_prefix'
2013-03-09 23:14:17 +01:00
J. David Ibáñez
d8b2514029 Rename low level reference creation methods
The idea is to keep exactly the same name as in libgit2
2013-03-03 23:01:42 +01:00
J. David Ibáñez
9ffc14148e Now we have a Repository class written in Python 2013-03-03 14:44:42 +01:00