Merge tag '0.24.1' into debian/unstable
This commit is contained in:
42
README.rst
42
README.rst
@@ -25,6 +25,29 @@ How to install
|
|||||||
Changelog
|
Changelog
|
||||||
==============
|
==============
|
||||||
|
|
||||||
|
0.24.1 (2016-06-21)
|
||||||
|
-------------------------
|
||||||
|
|
||||||
|
- New ``Repository.listall_reference_objects()``
|
||||||
|
`#634 <https://github.com/libgit2/pygit2/pull/634>`_
|
||||||
|
|
||||||
|
- Fix ``Repository.write_archive(...)``
|
||||||
|
`#619 <https://github.com/libgit2/pygit2/pull/619>`_
|
||||||
|
`#621 <https://github.com/libgit2/pygit2/pull/621>`_
|
||||||
|
|
||||||
|
- Reproducible builds
|
||||||
|
`#636 <https://github.com/libgit2/pygit2/pull/636>`_
|
||||||
|
|
||||||
|
- Documentation fixes
|
||||||
|
`#606 <https://github.com/libgit2/pygit2/pull/606>`_
|
||||||
|
`#607 <https://github.com/libgit2/pygit2/pull/607>`_
|
||||||
|
`#609 <https://github.com/libgit2/pygit2/pull/609>`_
|
||||||
|
`#623 <https://github.com/libgit2/pygit2/pull/623>`_
|
||||||
|
|
||||||
|
- Test updates
|
||||||
|
`#629 <https://github.com/libgit2/pygit2/pull/629>`_
|
||||||
|
|
||||||
|
|
||||||
0.24.0 (2016-03-05)
|
0.24.0 (2016-03-05)
|
||||||
-------------------------
|
-------------------------
|
||||||
|
|
||||||
@@ -774,7 +797,7 @@ Other: `#331 <https://github.com/libgit2/pygit2/pull/331>`_
|
|||||||
Authors
|
Authors
|
||||||
==============
|
==============
|
||||||
|
|
||||||
104 developers have contributed at least 1 commit to pygit2::
|
108 developers have contributed at least 1 commit to pygit2::
|
||||||
|
|
||||||
J. David Ibáñez Carlos Martín Nieto Nico von Geyso
|
J. David Ibáñez Carlos Martín Nieto Nico von Geyso
|
||||||
W. Trevor King Dave Borowitz Daniel Rodríguez Troitiño
|
W. Trevor King Dave Borowitz Daniel Rodríguez Troitiño
|
||||||
@@ -783,19 +806,20 @@ Authors
|
|||||||
Matthew Duggan Matthew Gamble Martin Lenders
|
Matthew Duggan Matthew Gamble Martin Lenders
|
||||||
Petr Hosek Victor Garcia Xavier Delannoy
|
Petr Hosek Victor Garcia Xavier Delannoy
|
||||||
Yonggang Luo Patrick Steinhardt Valentin Haenel
|
Yonggang Luo Patrick Steinhardt Valentin Haenel
|
||||||
Michael Jones Bernardo Heynemann John Szakmeister
|
Michael Jones Bernardo Heynemann Brodie Rao
|
||||||
Vlad Temian Brodie Rao Nicolas Dandrimont
|
John Szakmeister Vlad Temian Nicolas Dandrimont
|
||||||
David Versmisse Rémi Duraffort Santiago Perez De Rosso
|
David Versmisse Rémi Duraffort Santiago Perez De Rosso
|
||||||
Sebastian Thiel Thom Wiggers Alok Singhal
|
Sebastian Thiel Thom Wiggers Alok Singhal
|
||||||
Fraser Tweedale Han-Wen Nienhuys Leonardo Rhodes
|
Fraser Tweedale Han-Wen Nienhuys Leonardo Rhodes
|
||||||
Petr Viktorin Ron Cohen Thomas Kluyver
|
Petr Viktorin Ron Cohen Thomas Kluyver
|
||||||
Alex Chamberlain Alexander Bayandin Amit Bakshi
|
Alex Chamberlain Alexander Bayandin Amit Bakshi
|
||||||
Andrey Devyatkin Arno van Lumig Ben Davis
|
Andrey Devyatkin Arno van Lumig Ben Davis
|
||||||
Eric Schrijver Greg Fitzgerald Hervé Cauwelier
|
Dustin Raimondi Eric Schrijver Greg Fitzgerald
|
||||||
Huang Huang Ian P. McCullough Jack O'Connor
|
Hervé Cauwelier Huang Huang Ian P. McCullough
|
||||||
Jared Flatow Jiunn Haur Lim Jun Omae
|
Igor Gnatenko Jack O'Connor Jared Flatow
|
||||||
Kaarel Kitsemets Kevin KIN-FOO Masud Rahman
|
Jiunn Haur Lim Jun Omae Kaarel Kitsemets
|
||||||
Michael Sondergaard Sarath Lakshman Vicent Marti
|
Kevin KIN-FOO Masud Rahman Michael Sondergaard
|
||||||
|
Ondřej Nový Sarath Lakshman Vicent Marti
|
||||||
Zoran Zaric Adam Spiers Andrew Chin
|
Zoran Zaric Adam Spiers Andrew Chin
|
||||||
András Veres-Szentkirályi Ash Berlin Benjamin Kircher
|
András Veres-Szentkirályi Ash Berlin Benjamin Kircher
|
||||||
Benjamin Pollack Bryan O'Sullivan Cam Cope
|
Benjamin Pollack Bryan O'Sullivan Cam Cope
|
||||||
@@ -810,7 +834,7 @@ Authors
|
|||||||
Óscar San José Peter Dave Hello Philippe Ombredanne
|
Óscar San José Peter Dave Hello Philippe Ombredanne
|
||||||
Ridge Kennedy Ross Nicoll Rui Abreu Ferreira
|
Ridge Kennedy Ross Nicoll Rui Abreu Ferreira
|
||||||
Sheeo Soasme Vladimir Rutsky
|
Sheeo Soasme Vladimir Rutsky
|
||||||
chengyuhang earl
|
Yu Jianjian chengyuhang earl
|
||||||
|
|
||||||
|
|
||||||
License
|
License
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ library that has been built against. The version number has a
|
|||||||
.. py:data:: LIBGIT2_VER_MAJOR
|
.. py:data:: LIBGIT2_VER_MAJOR
|
||||||
|
|
||||||
Integer value of the major version number. For example, for the version
|
Integer value of the major version number. For example, for the version
|
||||||
``0.24.0``::
|
``0.24.1``::
|
||||||
|
|
||||||
>>> print LIBGIT2_VER_MAJOR
|
>>> print LIBGIT2_VER_MAJOR
|
||||||
0
|
0
|
||||||
@@ -26,7 +26,7 @@ library that has been built against. The version number has a
|
|||||||
.. py:data:: LIBGIT2_VER_MINOR
|
.. py:data:: LIBGIT2_VER_MINOR
|
||||||
|
|
||||||
Integer value of the minor version number. For example, for the version
|
Integer value of the minor version number. For example, for the version
|
||||||
``0.24.0``::
|
``0.24.1``::
|
||||||
|
|
||||||
>>> print LIBGIT2_VER_MINOR
|
>>> print LIBGIT2_VER_MINOR
|
||||||
24
|
24
|
||||||
@@ -34,17 +34,17 @@ library that has been built against. The version number has a
|
|||||||
.. py:data:: LIBGIT2_VER_REVISION
|
.. py:data:: LIBGIT2_VER_REVISION
|
||||||
|
|
||||||
Integer value of the revision version number. For example, for the version
|
Integer value of the revision version number. For example, for the version
|
||||||
``0.24.0``::
|
``0.24.1``::
|
||||||
|
|
||||||
>>> print LIBGIT2_VER_REVISION
|
>>> print LIBGIT2_VER_REVISION
|
||||||
0
|
1
|
||||||
|
|
||||||
.. py:data:: LIBGIT2_VERSION
|
.. py:data:: LIBGIT2_VERSION
|
||||||
|
|
||||||
The libgit2 version number as a string::
|
The libgit2 version number as a string::
|
||||||
|
|
||||||
>>> print LIBGIT2_VERSION
|
>>> print LIBGIT2_VERSION
|
||||||
'0.24.0'
|
'0.24.1'
|
||||||
|
|
||||||
Errors
|
Errors
|
||||||
======
|
======
|
||||||
|
|||||||
@@ -43,11 +43,11 @@ while the last number |lq| *.micro* |rq| auto-increments independently.
|
|||||||
|
|
||||||
As illustration see this table of compatible releases:
|
As illustration see this table of compatible releases:
|
||||||
|
|
||||||
+-----------+--------+----------------------------------------+
|
+-----------+----------------+----------------------------------------+
|
||||||
|**libgit2**| 0.24.0 | 0.23.0, 0.23.1, 0.23.2, 0.23.3, 0.23.4 |
|
|**libgit2**| 0.24.0, 0.24.1 | 0.23.0, 0.23.1, 0.23.2, 0.23.3, 0.23.4 |
|
||||||
+-----------+--------+----------------------------------------+
|
+-----------+----------------+----------------------------------------+
|
||||||
|**pygit2** | 0.24.0 | 0.23.0, 0.23.1, 0.23.2, 0.23.3 |
|
|**pygit2** | 0.24.0, 0.24.1 | 0.23.0, 0.23.1, 0.23.2, 0.23.3 |
|
||||||
+-----------+--------+----------------------------------------+
|
+-----------+----------------+----------------------------------------+
|
||||||
|
|
||||||
.. warning::
|
.. warning::
|
||||||
|
|
||||||
@@ -64,9 +64,9 @@ directory, do:
|
|||||||
|
|
||||||
.. code-block:: sh
|
.. code-block:: sh
|
||||||
|
|
||||||
$ wget https://github.com/libgit2/libgit2/archive/v0.23.4.tar.gz
|
$ wget https://github.com/libgit2/libgit2/archive/v0.24.1.tar.gz
|
||||||
$ tar xzf v0.23.4.tar.gz
|
$ tar xzf v0.24.1.tar.gz
|
||||||
$ cd libgit2-0.23.4/
|
$ cd libgit2-0.24.1/
|
||||||
$ cmake .
|
$ cmake .
|
||||||
$ make
|
$ make
|
||||||
$ sudo make install
|
$ sudo make install
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ References
|
|||||||
|
|
||||||
.. contents::
|
.. contents::
|
||||||
|
|
||||||
|
.. automethod:: pygit2.Repository.listall_reference_objects
|
||||||
.. automethod:: pygit2.Repository.listall_references
|
.. automethod:: pygit2.Repository.listall_references
|
||||||
.. automethod:: pygit2.Repository.lookup_reference
|
.. automethod:: pygit2.Repository.lookup_reference
|
||||||
|
|
||||||
|
|||||||
@@ -37,7 +37,7 @@ from os import getenv
|
|||||||
#
|
#
|
||||||
# The version number of pygit2
|
# The version number of pygit2
|
||||||
#
|
#
|
||||||
__version__ = '0.24.0'
|
__version__ = '0.24.1'
|
||||||
|
|
||||||
|
|
||||||
#
|
#
|
||||||
|
|||||||
@@ -765,7 +765,7 @@ class Repository(_Repository):
|
|||||||
>>> import tarfile, pygit2
|
>>> import tarfile, pygit2
|
||||||
>>>> with tarfile.open('foo.tar', 'w') as archive:
|
>>>> with tarfile.open('foo.tar', 'w') as archive:
|
||||||
>>>> repo = pygit2.Repsitory('.')
|
>>>> repo = pygit2.Repsitory('.')
|
||||||
>>>> repo.write_archive(archive, repo.head.target)
|
>>>> repo.write_archive(repo.head.target, archive)
|
||||||
"""
|
"""
|
||||||
|
|
||||||
# Try to get a tree form whatever we got
|
# Try to get a tree form whatever we got
|
||||||
@@ -799,8 +799,8 @@ class Repository(_Repository):
|
|||||||
info.mtime = timestamp
|
info.mtime = timestamp
|
||||||
info.uname = info.gname = 'root' # just because git does this
|
info.uname = info.gname = 'root' # just because git does this
|
||||||
if entry.mode == GIT_FILEMODE_LINK:
|
if entry.mode == GIT_FILEMODE_LINK:
|
||||||
info.type = archive.SYMTYPE
|
info.type = tarfile.SYMTYPE
|
||||||
info.linkname = content
|
info.linkname = content.decode("utf-8")
|
||||||
info.mode = 0o777 # symlinks get placeholder
|
info.mode = 0o777 # symlinks get placeholder
|
||||||
info.size = 0
|
info.size = 0
|
||||||
archive.addfile(info)
|
archive.addfile(info)
|
||||||
|
|||||||
2
setup.py
2
setup.py
@@ -72,7 +72,7 @@ else:
|
|||||||
|
|
||||||
libgit2_bin, libgit2_include, libgit2_lib = get_libgit2_paths()
|
libgit2_bin, libgit2_include, libgit2_lib = get_libgit2_paths()
|
||||||
|
|
||||||
pygit2_exts = [os.path.join('src', name) for name in listdir('src')
|
pygit2_exts = [os.path.join('src', name) for name in sorted(listdir('src'))
|
||||||
if name.endswith('.c')]
|
if name.endswith('.c')]
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1123,6 +1123,56 @@ out:
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
PyDoc_STRVAR(Repository_listall_reference_objects__doc__,
|
||||||
|
"listall_reference_objects() -> [Reference, ...]\n"
|
||||||
|
"\n"
|
||||||
|
"Return a list with all the reference objects in the repository.");
|
||||||
|
|
||||||
|
PyObject *
|
||||||
|
Repository_listall_reference_objects(Repository *self, PyObject *args)
|
||||||
|
{
|
||||||
|
git_reference_iterator *iter;
|
||||||
|
git_reference *ref = NULL;
|
||||||
|
int err;
|
||||||
|
PyObject *list;
|
||||||
|
|
||||||
|
list = PyList_New(0);
|
||||||
|
if (list == NULL)
|
||||||
|
return NULL;
|
||||||
|
|
||||||
|
if ((err = git_reference_iterator_new(&iter, self->repo)) < 0)
|
||||||
|
return Error_set(err);
|
||||||
|
|
||||||
|
while ((err = git_reference_next(&ref, iter)) == 0) {
|
||||||
|
PyObject *py_ref = wrap_reference(ref, self);
|
||||||
|
if (py_ref == NULL)
|
||||||
|
goto error;
|
||||||
|
|
||||||
|
err = PyList_Append(list, py_ref);
|
||||||
|
Py_DECREF(py_ref);
|
||||||
|
|
||||||
|
if (err < 0)
|
||||||
|
goto error;
|
||||||
|
}
|
||||||
|
|
||||||
|
git_reference_iterator_free(iter);
|
||||||
|
if (err == GIT_ITEROVER)
|
||||||
|
err = 0;
|
||||||
|
|
||||||
|
if (err < 0) {
|
||||||
|
Py_CLEAR(list);
|
||||||
|
return Error_set(err);
|
||||||
|
}
|
||||||
|
|
||||||
|
return list;
|
||||||
|
|
||||||
|
error:
|
||||||
|
git_reference_iterator_free(iter);
|
||||||
|
Py_CLEAR(list);
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
PyDoc_STRVAR(Repository_listall_branches__doc__,
|
PyDoc_STRVAR(Repository_listall_branches__doc__,
|
||||||
"listall_branches([flag]) -> [str, ...]\n"
|
"listall_branches([flag]) -> [str, ...]\n"
|
||||||
"\n"
|
"\n"
|
||||||
@@ -1575,8 +1625,8 @@ PyDoc_STRVAR(Repository_reset__doc__,
|
|||||||
"\n"
|
"\n"
|
||||||
"Resets current head to the provided oid.\n"
|
"Resets current head to the provided oid.\n"
|
||||||
"reset_type:\n"
|
"reset_type:\n"
|
||||||
"GIT_RESET_SOFT: resets head to point to oid, but does not modfy working copy, and leaves the changes in the index.\n"
|
"GIT_RESET_SOFT: resets head to point to oid, but does not modify working copy, and leaves the changes in the index.\n"
|
||||||
"GIT_RESET_MIXED: resets head to point to oid, but does not modfy working copy. It empties the index too.\n"
|
"GIT_RESET_MIXED: resets head to point to oid, but does not modify working copy. It empties the index too.\n"
|
||||||
"GIT_RESET_HARD: resets head to point to oid, and resets too the working copy and the content of the index.\n");
|
"GIT_RESET_HARD: resets head to point to oid, and resets too the working copy and the content of the index.\n");
|
||||||
|
|
||||||
PyObject *
|
PyObject *
|
||||||
@@ -1643,6 +1693,7 @@ PyMethodDef Repository_methods[] = {
|
|||||||
METHOD(Repository, create_reference_direct, METH_VARARGS),
|
METHOD(Repository, create_reference_direct, METH_VARARGS),
|
||||||
METHOD(Repository, create_reference_symbolic, METH_VARARGS),
|
METHOD(Repository, create_reference_symbolic, METH_VARARGS),
|
||||||
METHOD(Repository, listall_references, METH_NOARGS),
|
METHOD(Repository, listall_references, METH_NOARGS),
|
||||||
|
METHOD(Repository, listall_reference_objects, METH_NOARGS),
|
||||||
METHOD(Repository, listall_submodules, METH_NOARGS),
|
METHOD(Repository, listall_submodules, METH_NOARGS),
|
||||||
METHOD(Repository, lookup_reference, METH_O),
|
METHOD(Repository, lookup_reference, METH_O),
|
||||||
METHOD(Repository, revparse_single, METH_O),
|
METHOD(Repository, revparse_single, METH_O),
|
||||||
|
|||||||
@@ -58,6 +58,8 @@ PyObject* Repository_create_commit(Repository *self, PyObject *args);
|
|||||||
PyObject* Repository_create_tag(Repository *self, PyObject *args);
|
PyObject* Repository_create_tag(Repository *self, PyObject *args);
|
||||||
PyObject* Repository_create_branch(Repository *self, PyObject *args);
|
PyObject* Repository_create_branch(Repository *self, PyObject *args);
|
||||||
PyObject* Repository_listall_references(Repository *self, PyObject *args);
|
PyObject* Repository_listall_references(Repository *self, PyObject *args);
|
||||||
|
PyObject* Repository_listall_reference_objects(Repository *self,
|
||||||
|
PyObject *args);
|
||||||
PyObject* Repository_listall_branches(Repository *self, PyObject *args);
|
PyObject* Repository_listall_branches(Repository *self, PyObject *args);
|
||||||
PyObject* Repository_lookup_reference(Repository *self, PyObject *py_name);
|
PyObject* Repository_lookup_reference(Repository *self, PyObject *py_name);
|
||||||
|
|
||||||
|
|||||||
@@ -42,6 +42,17 @@ LAST_COMMIT = '2be5719152d4f82c7302b1c0932d8e5f0a4a0e98'
|
|||||||
|
|
||||||
class ReferencesTest(utils.RepoTestCase):
|
class ReferencesTest(utils.RepoTestCase):
|
||||||
|
|
||||||
|
def test_list_all_reference_objects(self):
|
||||||
|
repo = self.repo
|
||||||
|
|
||||||
|
refs = [(ref.name, ref.target.hex)
|
||||||
|
for ref in repo.listall_reference_objects()]
|
||||||
|
self.assertEqual(sorted(refs),
|
||||||
|
[('refs/heads/i18n',
|
||||||
|
'5470a671a80ac3789f1a6a8cefbcf43ce7af0563'),
|
||||||
|
('refs/heads/master',
|
||||||
|
'2be5719152d4f82c7302b1c0932d8e5f0a4a0e98')])
|
||||||
|
|
||||||
def test_list_all_references(self):
|
def test_list_all_references(self):
|
||||||
repo = self.repo
|
repo = self.repo
|
||||||
|
|
||||||
|
|||||||
@@ -188,21 +188,6 @@ class RepositoryTest(utils.RepoTestCase):
|
|||||||
end = sys.getrefcount(self.repo)
|
end = sys.getrefcount(self.repo)
|
||||||
self.assertEqual(start, end)
|
self.assertEqual(start, end)
|
||||||
|
|
||||||
def test_remote_callback_typecheck(self):
|
|
||||||
remote = self.repo.remotes[0]
|
|
||||||
remote.progress = 5
|
|
||||||
self.assertRaises(TypeError, remote, 'fetch')
|
|
||||||
|
|
||||||
remote = self.repo.remotes[0]
|
|
||||||
remote.transfer_progress = 5
|
|
||||||
self.assertRaises(TypeError, remote, 'fetch')
|
|
||||||
|
|
||||||
remote = self.repo.remotes[0]
|
|
||||||
remote.update_tips = 5
|
|
||||||
self.assertRaises(TypeError, remote, 'fetch')
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
class EmptyRepositoryTest(utils.EmptyRepoTestCase):
|
class EmptyRepositoryTest(utils.EmptyRepoTestCase):
|
||||||
def test_fetch(self):
|
def test_fetch(self):
|
||||||
remote = self.repo.remotes[0]
|
remote = self.repo.remotes[0]
|
||||||
|
|||||||
Reference in New Issue
Block a user