Carlos Martín Nieto
8b71a8045b
Allow a 'source' arg to TreeBuilder()
2012-02-21 12:36:51 +01:00
Carlos Martín Nieto
2044699a53
Add TreeBuilder_write
2012-02-21 12:36:51 +01:00
Carlos Martín Nieto
5d327c7205
Add TreeBuilder_insert
2012-02-21 12:36:51 +01:00
Carlos Martín Nieto
d43577a464
Create the TreeBuilder type
2012-02-21 12:36:38 +01:00
J. David Ibáñez
7e1e8435aa
todo: add note about surrogateescape
2012-02-19 17:13:33 +01:00
J. David Ibáñez
b143c0ccde
Fix compilation warnings
2012-02-19 09:20:58 +01:00
Yonggang Luo
5da739270a
Arrange Tree and Index definition.
2012-02-18 17:10:08 +08:00
Yonggang Luo
5ece88300a
Repository_create_tag return error when necessary.
2012-02-18 16:28:35 +08:00
Yonggang Luo
8394dfb814
Remove extra print.
2012-02-16 01:02:55 +08:00
Yonggang Luo
2b4e5504af
Get pygit2 can be build under Windows.
2012-02-16 01:00:49 +08:00
J. David Ibáñez
3bf5b4c794
status: new method 'Repository.status_file'
...
Exposes libgit2 function 'git_status_file'.
2012-02-10 19:38:25 +01:00
J. David Ibáñez
f11a05b610
docs: fix for the previous commit
2012-02-08 23:29:27 +01:00
J. David Ibáñez
a11f3c52a9
docs: use readme file for both github and pypi
...
The readme file is now written in reStructuredText (instead of
markdown). This is because reST is the only thing pypi understands.
So now the same readme file will be used for pygit2's homepage at github
and pypi:
- https://github.com/libgit2/pygit2
- http://pypi.python.org/pypi/pygit2
2012-02-08 23:21:37 +01:00
J. David Ibáñez
0fa8503f91
Release v0.16.0
...
Changes since v0.15.1:
- Update to libgit2 v0.16.0
- Improve support for references
- New method Index.read_tree
- Rename Index.create_tree to Index.write_tree
- Fix compilation error with MSVC (issue #53 )
- Fix a few segfaults (including issue #55 )
v0.16.0
2012-02-06 23:30:00 +01:00
J. David Ibáñez
42006d7153
docs: update talk about signatures
2012-02-06 23:05:19 +01:00
Carlos Martín Nieto
bc7db4ba8a
errors: don't segfault if the library didn't set an error
...
git_lasterror() can return NULL. Passing that to the error formatting
functions leads to a segmentation fault.
Add a wrapper with a generic "no more information" string for the
cases when the library didn't set one.
2012-02-03 18:33:48 +01:00
J. David Ibáñez
39bb5de7c5
Fixing compilation with MSVC (issue #53 )
2012-01-25 19:04:16 +01:00
J. David Ibáñez
9d8d2ace64
index: implement Index.read_tree
2012-01-02 23:11:30 +01:00
J. David Ibáñez
550c966111
Rename Index.create_tree to Index.write_tree
...
Like Git command "git write-tree"
2012-01-02 20:10:28 +01:00
J. David Ibáñez
35ed84cf44
Update to latest changes in libgit2
...
Now Repository.index also works on bare repositories. Unit tests pass
again.
And fix a memory leak (add a call to git_index_free).
2012-01-02 19:42:49 +01:00
J. David Ibáñez
4a33c7f806
refs: implement reference reload
2011-12-25 10:46:38 +01:00
J. David Ibáñez
73a4a3a649
refs: resolving a direct ref returns the same object
...
When resolving a direct reference the same Python object is returned,
with the refcount incremented by one. The reference is reloaded.
2011-12-24 17:04:24 +01:00
J. David Ibáñez
584a8b1473
refs: implement reference dealloc
2011-12-20 22:19:15 +01:00
J. David Ibáñez
5986688197
refs: fix segfault when using a deleted reference
...
Before this patch the code below produced a segfault:
>>> reference.delete()
>>> reference.name
Now an exception is raised.
2011-12-19 23:40:27 +01:00
J. David Ibáñez
01cb80b4c8
errors: pass through git_lasterror in several places
...
And clean up related code a little bit.
2011-12-06 23:36:20 +01:00
J. David Ibáñez
2dee35d1be
Update to latest changes in libgit2
2011-12-04 23:38:15 +01:00
J. David Ibáñez
3073a7c3da
Return bytes for paths (and encodings) on Python 2
v0.15.1
2011-11-28 23:33:16 +01:00
J. David Ibáñez
1a34bc3b60
Update .gitignore, add test/__pycache__
...
The __pycache__ folder is genarated by Python 3.2
2011-11-28 22:47:35 +01:00
J. David Ibáñez
3037d26c9d
Fix unit tests with Python 3.2
2011-11-27 10:05:58 +01:00
J. David Ibáñez
ee9429217b
Start using inline functions
...
Actually, the Py_LOCAL_INLINE macro only works with Python 3.2, we
should fix this.
2011-11-26 23:57:22 +01:00
J. David Ibáñez
dd33369fba
signature: minor test addition
2011-11-26 13:21:40 +01:00
J. David Ibáñez
a50c886cbb
signature: add bytes accessors for name/email
...
Now Signature.email returns unicode. The name and email are available as
byte strings through the Signature._name and Signature._email accessors
respectively. Signature._encoding returns the encoding used in the
signature.
2011-11-25 00:08:39 +01:00
J. David Ibáñez
eafcef38f6
Do not pretend Python 2.5 is supported
2011-11-24 22:26:29 +01:00
J. David Ibáñez
9064b8e038
Introduce the Signature object
2011-11-23 23:48:41 +01:00
J. David Ibáñez
63ab0f3b26
Minor coding style fixes
2011-11-23 23:13:19 +01:00
J. David Ibáñez
cb00e7a6b9
Break reference cycle with repositoy/index
2011-11-22 00:23:54 +01:00
J. David Ibáñez
46ab810636
Use PyObject_New/PyObject_Del
2011-11-20 12:43:28 +01:00
J. David Ibáñez
38f1884b29
tp_alloc already sets no memory error
2011-11-19 19:04:31 +01:00
J. David Ibáñez
fb1ca247f8
Commit.tree, check for no memory error
2011-11-19 17:43:52 +01:00
J. David Ibáñez
ce41de9417
Repository.create_commit, make encoding optional
2011-11-19 09:37:45 +01:00
J. David Ibáñez
1eb0c6a9f0
Fix memory leak in 'Repository.create_tag'
...
Free the signature.
2011-11-15 23:18:04 +01:00
J. David Ibáñez
3851f725f9
Fix memory leak in 'Repository.create_commit'
...
Free the signatures.
2011-11-15 00:45:20 +01:00
J. David Ibáñez
8d4c8415da
Use file system encoding to decode/encode paths
...
Instead of UTF-8. This is done for better interoperability with Git.
2011-11-13 12:47:08 +01:00
J. David Ibáñez
4f5298d6b7
Repository.create_commit supports message encoding
...
Now the 'Repository.create_commit' method expects one more argument,
the message encoding. If 'None', it defaults to UTF-8.
2011-11-12 20:13:28 +01:00
J. David Ibáñez
9fadd57445
Fix typo in error string
2011-11-12 00:13:31 +01:00
J. David Ibáñez
81c0ed3281
Python 3: fix 'Error_set_py_obj'
2011-10-23 15:09:55 +02:00
Hugh Cole-Baker
160cf64abc
Add support for using short hex string prefixes
...
Allows Repository_getitem, Repository_read(_raw), Repository_create_commit,
Repository_create_tag and Object_read_raw to use short hex strings to
lookup objects.
Also test getting objects from Repository using prefixes, looking up commit
trees and parents by hex prefix, and looking up tag targets by prefix.
Also stop raising TypeError if passing a too-short hex prefix to the
lookup functions, instead use ValueError.
2011-10-22 22:01:16 +01:00
J. David Ibáñez
73af642b8f
tags: properly dealloc tags
...
There were two memory leaks: we were not closing the git_tag object,
and we were not decreasing the refcount on the repo.
This finishes fixing issue #20
2011-10-18 11:27:32 +02:00
J. David Ibáñez
af983b989a
tests: fixing issue #20
...
There were two problems:
- Windows refuses to remove a file that is in use. Solution, close
the repo before cleaning the temporary directory.
- Windows refuses to remove a read-only file. Solution, change mode
to writable.
2011-10-17 20:44:54 +02:00
J. David Ibáñez
a91bc9fa19
Fix compilation on Windows
2011-10-14 18:43:19 +02:00