void *report_baton;
apr_pool_t *temp_pool, *result_pool;
ReporterObject *ret;
+ PyObject *py_switch_url;
svn_error_t *err;
- if (!PyArg_ParseTuple(args, "lsbsO|bb:do_switch", &revision_to_update_to, &update_target,
- &recurse, &switch_url, &update_editor, &send_copyfrom_args, &ignore_ancestry))
+ if (!PyArg_ParseTuple(args, "lsbOO|bb:do_switch", &revision_to_update_to, &update_target,
+ &recurse, &py_switch_url, &update_editor, &send_copyfrom_args, &ignore_ancestry))
return NULL;
if (ra_check_busy(ra))
return NULL;
return NULL;
}
+ switch_url = py_object_to_svn_uri(py_switch_url, temp_pool);
+ if (switch_url == NULL) {
+ apr_pool_destroy(temp_pool);
+ ra->busy = false;
+ return NULL;
+ }
+
result_pool = Pool(NULL);
if (result_pool == NULL) {
apr_pool_destroy(temp_pool);
#if ONLY_BEFORE_SVN(1, 7)
svn_commit_info_t *commit_info = NULL;
#endif
- PyObject *py_revprops;
+ PyObject *py_revprops = Py_None;
apr_array_header_t *apr_paths;
ClientObject *client = (ClientObject *)self;
apr_hash_t *hash_revprops;
PyObject *peg_revision = Py_None;
PyObject *revision;
ClientObject *client = (ClientObject *)self;
- PyObject *ret;
+ PyObject *ret, *py_target;
- if (!PyArg_ParseTuple(args, "ssO|Ob", &propname, &target, &peg_revision,
+ if (!PyArg_ParseTuple(args, "sOO|Ob", &propname, &py_target, &peg_revision,
&revision, &recurse))
return NULL;
if (!to_opt_revision(peg_revision, &c_peg_rev))
temp_pool = Pool(NULL);
if (temp_pool == NULL)
return NULL;
+ target = py_object_to_svn_abspath(py_target, temp_pool);
+ if (target == NULL) {
+ apr_pool_destroy(temp_pool);
+ return NULL;
+ }
#if ONLY_SINCE_SVN(1, 8)
/* FIXME: Support changelists */
/* FIXME: Support actual_revnum */
return NULL;
}
- path = py_object_to_svn_string(py_path, pool);
+ path = py_object_to_svn_dirent(py_path, pool);
if (path == NULL) {
apr_pool_destroy(pool);
return NULL;
bool depth_is_sticky = false;
int depth = svn_depth_infinity;
char *switch_url;
- PyObject *py_target;
+ PyObject *py_target, *py_switch_url;
char *kwnames[] = {
"target", "switch_url", "use_commit_times", "depth", "notify_func",
"diff3_cmd", "depth_is_sticky", "allow_unver_obstructions", NULL };
- if (!PyArg_ParseTupleAndKeywords(args, kwargs, "Os|biOzbb", kwnames,
- &py_target, &switch_url, &use_commit_times,
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO|biOzbb", kwnames,
+ &py_target, &py_switch_url, &use_commit_times,
&depth, ¬ify_func, &diff3_cmd,
&depth_is_sticky,
&allow_unver_obstructions))
apr_pool_destroy(pool);
return NULL;
}
+
+ switch_url = py_object_to_svn_uri(py_switch_url, pool);
+ if (switch_url == NULL) {
+ apr_pool_destroy(pool);
+ return NULL;
+ }
+
latest_revnum = (svn_revnum_t *)apr_palloc(pool, sizeof(svn_revnum_t));
Py_BEGIN_ALLOW_THREADS
#if ONLY_SINCE_SVN(1, 5)