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
a91bc9fa19
Fix compilation on Windows
2011-10-14 18:43:19 +02:00
J. David Ibáñez
5e72746a7a
Fix warning on Windows, don't use strnlen
...
strnlen is a GNU extension
2011-10-14 17:57:55 +02:00
J. David Ibáñez
1b14bf15bc
Fix warnings
2011-10-14 17:00:41 +02:00
J. David Ibáñez
ab96646e91
py_str_to_git_oid now supports short prefixes
...
py_str_to_git_oid now returns the length of the oid on success.
We don't yet do anything useful with the length, but every call to
py_str_to_git_oid has been properly updated.
This is half the work needed to fix issue #50 . The changes made to
py_str_to_git_oid are based on a patch by Hugh Cole-Baker.
2011-10-10 19:25:13 +02:00
J. David Ibáñez
f9b57d5eb9
py_str_to_git_oid: don't decrease refcount too early
...
Error handling still broken in py_str_to_git_oid, can be verified by
typing repo['toto']
2011-09-04 00:28:55 +02:00
J. David Ibáñez
7b3685aaea
git_object_id cannot return NULL
2011-09-03 23:58:34 +02:00
J. David Ibáñez
83642a6954
Rename '.sha' to '.hex'
2011-09-02 16:53:17 +02:00
J. David Ibáñez
9f2e61cd8f
Add TreeEntry.oid, IndexEntry.oid, Reference.oid
2011-09-02 16:48:35 +02:00
J. David Ibáñez
11ff1842b7
Add Object.oid to get the raw object id
2011-09-02 16:12:05 +02:00
J. David Ibáñez
54dd6714f2
Methods to create objects return raw oid
...
Now methods that create new objects return the raw oid instead of the
hexadecimal form.
2011-09-02 15:43:44 +02:00
J. David Ibáñez
05058d8167
Commit messages with non-ascii chars now work
...
And so do author & committers names
2011-08-24 08:52:41 +02:00
J. David Ibáñez
ae1d178d7a
Fix most unit tests with Python 3
2011-08-21 00:54:57 +02:00
J. David Ibáñez
ef9a5f6e55
Merge branch 'python3'
2011-08-19 21:59:31 +02:00
J. David Ibáñez
8137dc84b5
Support 'tree[name]' where name is a text string
2011-08-19 08:49:46 +02:00
J. David Ibáñez
60f50d9f08
Support 'index[path]' where path is a text string
...
Encode text strings to UTF-8.
2011-08-19 00:31:37 +02:00
J. David Ibáñez
4e9a34b870
Fix segfault on Repository_write
...
This likely fixes issue #44
2011-08-18 01:26:09 +02:00
J. David Ibáñez
3805909cd0
Merge remote branch 'erik/v0.14.0-tz'
2011-08-16 23:38:15 +02:00
J. David Ibáñez
323d2e23cd
Fix revision walker
2011-08-16 22:56:45 +02:00
Erik van Zijst
11997d8a85
Added support for commit_time_offset
...
Signed-off-by: Erik van Zijst <erik.van.zijst@gmail.com>
2011-08-16 16:49:41 +10:00
J. David Ibáñez
18846c1b55
Now Commit.message returns a text string
2011-08-15 23:16:31 +02:00
J. David Ibáñez
caccfb4006
Return text strings for hex-sha (like Object.sha)
2011-08-15 22:57:20 +02:00
J. David Ibáñez
81bfabea73
Use byte strings for raw-sha and text for hex-sha
...
As suggested by Douglas Morrison in issue 43:
https://github.com/libgit2/pygit2/issues/43
(Unit tests still broken.)
2011-08-13 23:22:17 +02:00
J. David Ibáñez
7035598c73
Fix warning in 'Commit_get_message_encoding'
2011-08-13 21:50:51 +02:00
J. David Ibáñez
b634a19bd4
Update to latest changes in libgit2
...
Commit.message_short removed, Commit.message_encoding added
2011-08-13 20:36:37 +02:00
J. David Ibáñez
7b8ae0e10c
Python 3, now pygit2 builds
...
Tests do not yet pass.
2011-08-10 22:52:42 +02:00
J. David Ibáñez
7f7a512e66
Fix issue #39 , add missing Py_INCREF
2011-08-05 12:52:43 +02:00
J. David Ibáñez
7545cdf9f3
Updato use new 'git_signature_new' prototype
2011-08-04 10:29:45 +02:00
J. David Ibáñez
61124f42db
Merge remote branch 'julien/status3'
2011-07-29 10:52:54 +02:00
Julien Miotte
1c9602e58e
Following PEP7 recommendations on function definition style.
2011-07-28 11:26:02 +02:00
Julien Miotte
f4e75e5b6f
New Repository method: status().
...
Using git2's status methods to be able to read the status of a
repository. The returned status is a dictionnary with file paths as keys
and status flags as values.
2011-07-27 18:39:12 +02:00
Julien Miotte
d6a3014208
According to PEP7, restricting lines to 79 chars, fixing code structure.
2011-07-21 12:15:50 +02:00
Julien Miotte
b62fcc8877
Purely cosmetic, alining all PyTypeObjects comments.
2011-07-21 12:15:17 +02:00
J. David Ibáñez
d55ea4c102
Reuse the function 'git_oid_to_py_str'
2011-07-20 15:29:58 +02:00
J. David Ibáñez
dafe4b11b2
Fix coding style
...
- do not use tabs
- remove trailing white spaces
- lines are 79 chars max.
2011-07-20 15:05:17 +02:00
J. David Ibáñez
cd83372230
Merge remote branch 'byron/repo_write_improved' into repo_write
2011-07-18 22:45:46 +02:00
Sebastian Thiel
d0bc776121
Repository.write implemented
...
Implemented Repository write function, using odb write streams
Added simple test
2011-07-18 17:02:26 +02:00
J. David Ibáñez
a139335098
Fix memory leak in 'wrap_index_entry' (issue #18 )
2011-07-14 22:01:40 +02:00