summaryrefslogtreecommitdiff
path: root/subvertpy/repos.c
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2011-09-13 12:55:54 +0200
committerJelmer Vernooij <jelmer@samba.org>2011-09-13 12:55:54 +0200
commitc7b1e87450351b4b993d25b1427c1ed729a1fb5c (patch)
treee7b0fdefaf3d7963c6b8ef1c13f6daf718bf9735 /subvertpy/repos.c
parent7e238669f5ff93f7a8779d58598ee5cf6febe98f (diff)
Add repos.verify_fs.
Diffstat (limited to 'subvertpy/repos.c')
-rw-r--r--subvertpy/repos.c27
1 files changed, 25 insertions, 2 deletions
diff --git a/subvertpy/repos.c b/subvertpy/repos.c
index a472dfe4..98022f07 100644
--- a/subvertpy/repos.c
+++ b/subvertpy/repos.c
@@ -380,7 +380,8 @@ static PyObject *repos_hotcopy(RepositoryObject *self, PyObject *args)
if (temp_pool == NULL)
return NULL;
- RUN_SVN_WITH_POOL(temp_pool, svn_repos_hotcopy(src_path, dest_path, clean_logs, temp_pool));
+ RUN_SVN_WITH_POOL(temp_pool,
+ svn_repos_hotcopy(src_path, dest_path, clean_logs, temp_pool));
apr_pool_destroy(temp_pool);
@@ -446,7 +447,8 @@ static PyObject *repos_has_capability(RepositoryObject *self, PyObject *args)
temp_pool = Pool(NULL);
if (temp_pool == NULL)
return NULL;
- RUN_SVN_WITH_POOL(temp_pool, svn_repos_has_capability(self->repos, &has, name, temp_pool));
+ RUN_SVN_WITH_POOL(temp_pool,
+ svn_repos_has_capability(self->repos, &has, name, temp_pool));
apr_pool_destroy(temp_pool);
return PyBool_FromLong(has);
#else
@@ -455,10 +457,31 @@ static PyObject *repos_has_capability(RepositoryObject *self, PyObject *args)
#endif
}
+static PyObject *repos_verify(RepositoryObject *self, PyObject *args)
+{
+ apr_pool_t *temp_pool;
+ PyObject *py_feedback_stream;
+ long start_rev, end_rev;
+ if (!PyArg_ParseTuple(args, "Oii", &py_feedback_stream, &start_rev, &end_rev))
+ return NULL;
+ temp_pool = Pool(NULL);
+ if (temp_pool == NULL)
+ return NULL;
+ RUN_SVN_WITH_POOL(temp_pool,
+ svn_repos_verify_fs(self->repos,
+ new_py_stream(temp_pool, py_feedback_stream), start_rev, end_rev,
+ py_cancel_check, NULL, temp_pool));
+ apr_pool_destroy(temp_pool);
+
+ Py_RETURN_NONE;
+}
+
static PyMethodDef repos_methods[] = {
{ "load_fs", (PyCFunction)repos_load_fs, METH_VARARGS|METH_KEYWORDS, NULL },
{ "fs", (PyCFunction)repos_fs, METH_NOARGS, NULL },
{ "has_capability", (PyCFunction)repos_has_capability, METH_VARARGS, NULL },
+ { "verify_fs", (PyCFunction)repos_verify, METH_VARARGS,
+ "S.verify_repos(feedback_stream, start_revnum, end_revnum)" },
{ NULL, }
};