From c257d0da45fc01dda7a440fedb7fe9caead4b3b9 Mon Sep 17 00:00:00 2001 From: "Luiz Fernando N. Capitulino" Date: Thu, 19 Jul 2007 21:11:35 -0300 Subject: [PATCH] libgit-thin: pygit: Document revlist methods Signed-off-by: Luiz Fernando N. Capitulino --- libgit-thin/pygit/pygit.c | 40 +++++++++++++++++++++++++++++++++++----- 1 file changed, 35 insertions(+), 5 deletions(-) diff --git a/libgit-thin/pygit/pygit.c b/libgit-thin/pygit/pygit.c index 7fe5bcc5b9..dbc12417ff 100644 --- a/libgit-thin/pygit/pygit.c +++ b/libgit-thin/pygit/pygit.c @@ -309,18 +309,33 @@ revlist_add_commit(GitRevListObject *self, PyObject *args, int exclude) Py_RETURN_NONE; } +PyDoc_STRVAR(rev_include_doc, +"revlist.include(id) -> None\n\ +\n\ +Include the commit (repesented by id) in the revision listing."); + static PyObject * revlist_include(GitRevListObject *self, PyObject *args) { return revlist_add_commit(self, args, 0); } +PyDoc_STRVAR(rev_exclude_doc, +"revlist.exclude(id) -> None\n\ +\n\ +Exclude the commit (repesented by id) from the revision listing."); + static PyObject * revlist_exclude(GitRevListObject *self, PyObject *args) { return revlist_add_commit(self, args, 1); } +PyDoc_STRVAR(rev_reverse_doc, +"revlist.reserve() -> None\n\ +\n\ +If called, sets the 'reserve' revision listing option."); + static PyObject * revlist_reverse(GitRevListObject *self, PyObject *args) { @@ -335,6 +350,11 @@ revlist_reverse(GitRevListObject *self, PyObject *args) Py_RETURN_NONE; } +PyDoc_STRVAR(rev_show_merges_doc, +"revlist.show_merges() -> None\n\ +\n\ +If called, sets the 'show merges' revision listing option."); + static PyObject * revlist_show_merges(GitRevListObject *self, PyObject *args) { @@ -349,6 +369,11 @@ revlist_show_merges(GitRevListObject *self, PyObject *args) Py_RETURN_NONE; } +PyDoc_STRVAR(rev_max_count_doc, +"revlist.max_count(count) -> None\n\ +\n\ +Set the number of commits to walk through."); + static PyObject * revlist_max_count(GitRevListObject *self, PyObject *args) { @@ -366,11 +391,16 @@ revlist_max_count(GitRevListObject *self, PyObject *args) } static PyMethodDef revlist_methods[] = { - {"include", (PyCFunction) revlist_include, METH_VARARGS, NULL}, - {"exclude", (PyCFunction) revlist_exclude, METH_VARARGS, NULL}, - {"reverse", (PyCFunction) revlist_reverse, METH_NOARGS, NULL}, - {"show_merges", (PyCFunction) revlist_show_merges, METH_NOARGS, NULL}, - {"max_count", (PyCFunction) revlist_max_count,METH_VARARGS,NULL}, + {"include", (PyCFunction) revlist_include, METH_VARARGS, + rev_include_doc}, + {"exclude", (PyCFunction) revlist_exclude, METH_VARARGS, + rev_exclude_doc}, + {"reverse", (PyCFunction) revlist_reverse, METH_NOARGS, + rev_reverse_doc}, + {"show_merges", (PyCFunction) revlist_show_merges, METH_NOARGS, + rev_show_merges_doc}, + {"max_count", (PyCFunction) revlist_max_count,METH_VARARGS, + rev_max_count_doc}, {NULL, NULL, 0, NULL} }; -- 2.11.4.GIT