php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Return to Bug #60293
Patch pach-svn_import revision 2011-11-14 11:56 UTC by slungo at 9online dot fr

Patch pach-svn_import for svn Bug #60293

Patch version 2011-11-14 11:56 UTC

Return to Bug #60293 | Download this patch
Patch Revisions:

Developer: slungo@9online.fr

Index: svn.c
===================================================================
--- svn.c	(révision 319167)
+++ svn.c	(copie de travail)
@@ -464,22 +464,22 @@
 }
 /* }}} */
 
-/* {{{ proto bool svn_import(string path, string url, bool nonrecursive)
+/* {{{ proto bool svn_import(string path, string url, bool nonrecursive [, string message ])
 	Imports unversioned path into repository at url */
 PHP_FUNCTION(svn_import)
 {
 	svn_client_commit_info_t *commit_info_p = NULL;
-	const char *path = NULL;
+	const char *path = NULL, *logmsg = NULL;
 	const char *utf8_path = NULL;
-	int pathlen;
+	int pathlen, logmsg_len;
 	char *url;
 	int urllen;
-	svn_boolean_t nonrecursive;
+	zend_bool nonrecursive;
 	svn_error_t *err;
 	apr_pool_t *subpool;
 
-	if (FAILURE == zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ssb",
-				&path, &pathlen, &url, &urllen, &nonrecursive)) {
+	if (FAILURE == zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ssb|s",
+				&path, &pathlen, &url, &urllen, &nonrecursive, &logmsg, &logmsg_len)) {
 		RETURN_FALSE;
 	}
 
@@ -493,9 +493,13 @@
 	svn_utf_cstring_to_utf8 (&utf8_path, path, subpool);
 	path = svn_path_canonicalize(utf8_path, subpool);
 
+	SVN_G(ctx)->log_msg_baton = logmsg;
+
 	err = svn_client_import(&commit_info_p, path, url, nonrecursive,
 			SVN_G(ctx), subpool);
 
+	SVN_G(ctx)->log_msg_baton = NULL;
+
 	if (err) {
 		php_svn_handle_error (err TSRMLS_CC);
 		RETVAL_FALSE;
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Apr 18 15:01:28 2024 UTC