2 * add.c: wrappers around wc add/mkdir functionality.
4 * ====================================================================
5 * Copyright (c) 2000-2007 CollabNet. All rights reserved.
7 * This software is licensed as described in the file COPYING, which
8 * you should have received as part of this distribution. The terms
9 * are also available at http://subversion.tigris.org/license-1.html.
10 * If newer versions of this license are posted there, you may use a
11 * newer version instead, at your option.
13 * This software consists of voluntary contributions made by many
14 * individuals. For exact contribution history, see the revision
15 * history and logs, available at http://subversion.tigris.org/.
16 * ====================================================================
19 /* ==================================================================== */
27 #include <apr_fnmatch.h>
29 #include "svn_client.h"
30 #include "svn_string.h"
31 #include "svn_pools.h"
32 #include "svn_error.h"
35 #include "svn_config.h"
36 #include "svn_props.h"
39 #include "svn_private_config.h"
45 /* This structure is used as baton for enumerating the config entries
46 in the auto-props section.
50 /* the file name for which properties are searched */
53 /* when this flag is set the hash contains svn:executable */
54 svn_boolean_t have_executable
;
56 /* when mimetype is not NULL is set the hash contains svn:mime-type */
59 /* the hash table for storing the property name/value pairs */
60 apr_hash_t
*properties
;
62 /* a pool used for allocating memory */
66 /* Remove leading and trailing white space from a C string, in place. */
68 trim_string(char **pstr
)
73 while (apr_isspace(*str
))
77 while ((i
> 0) && apr_isspace(str
[i
-1]))
82 /* For one auto-props config entry (NAME, VALUE), if the filename pattern
83 NAME matches BATON->filename case insensitively then add the properties
84 listed in VALUE into BATON->properties.
85 BATON must point to an auto_props_baton_t.
88 auto_props_enumerator(const char *name
,
93 auto_props_baton_t
*autoprops
= baton
;
97 /* nothing to do here without a value */
98 if (strlen(value
) == 0)
101 /* check if filename matches and return if it doesn't */
102 if (apr_fnmatch(name
, autoprops
->filename
, APR_FNM_CASE_BLIND
) == APR_FNM_NOMATCH
)
105 /* parse the value (we dup it first to effectively lose the
106 'const', and to avoid messing up the original value) */
107 property
= apr_pstrdup(autoprops
->pool
, value
);
108 property
= apr_strtok(property
, ";", &last_token
);
112 const char *this_value
;
113 char *equal_sign
= strchr(property
, '=');
119 trim_string(&equal_sign
);
120 this_value
= equal_sign
;
126 trim_string(&property
);
127 len
= strlen(property
);
130 svn_string_t
*propval
= svn_string_create(this_value
,
133 apr_hash_set(autoprops
->properties
, property
, len
, propval
);
134 if (strcmp(property
, SVN_PROP_MIME_TYPE
) == 0)
135 autoprops
->mimetype
= this_value
;
136 else if (strcmp(property
, SVN_PROP_EXECUTABLE
) == 0)
137 autoprops
->have_executable
= TRUE
;
139 property
= apr_strtok(NULL
, ";", &last_token
);
145 svn_client__get_auto_props(apr_hash_t
**properties
,
146 const char **mimetype
,
148 svn_client_ctx_t
*ctx
,
152 svn_boolean_t use_autoprops
;
153 auto_props_baton_t autoprops
;
156 autoprops
.properties
= apr_hash_make(pool
);
157 autoprops
.filename
= svn_path_basename(path
, pool
);
158 autoprops
.pool
= pool
;
159 autoprops
.mimetype
= NULL
;
160 autoprops
.have_executable
= FALSE
;
161 *properties
= autoprops
.properties
;
163 cfg
= ctx
->config
? apr_hash_get(ctx
->config
, SVN_CONFIG_CATEGORY_CONFIG
,
164 APR_HASH_KEY_STRING
) : NULL
;
166 /* check that auto props is enabled */
167 SVN_ERR(svn_config_get_bool(cfg
, &use_autoprops
,
168 SVN_CONFIG_SECTION_MISCELLANY
,
169 SVN_CONFIG_OPTION_ENABLE_AUTO_PROPS
, FALSE
));
171 /* search for auto props */
173 svn_config_enumerate2(cfg
, SVN_CONFIG_SECTION_AUTO_PROPS
,
174 auto_props_enumerator
, &autoprops
, pool
);
176 /* if mimetype has not been set check the file */
177 if (! autoprops
.mimetype
)
179 SVN_ERR(svn_io_detect_mimetype2(&autoprops
.mimetype
, path
,
180 ctx
->mimetypes_map
, pool
));
181 if (autoprops
.mimetype
)
182 apr_hash_set(autoprops
.properties
, SVN_PROP_MIME_TYPE
,
183 strlen(SVN_PROP_MIME_TYPE
),
184 svn_string_create(autoprops
.mimetype
, pool
));
187 /* Don't automatically set the svn:executable property on added items
188 * on OS400. While OS400 supports the executable permission its use is
189 * inconsistent at best. */
191 /* if executable has not been set check the file */
192 if (! autoprops
.have_executable
)
194 svn_boolean_t executable
= FALSE
;
195 SVN_ERR(svn_io_is_file_executable(&executable
, path
, pool
));
197 apr_hash_set(autoprops
.properties
, SVN_PROP_EXECUTABLE
,
198 strlen(SVN_PROP_EXECUTABLE
),
199 svn_string_create("", pool
));
203 *mimetype
= autoprops
.mimetype
;
208 add_file(const char *path
,
209 svn_client_ctx_t
*ctx
,
210 svn_wc_adm_access_t
*adm_access
,
213 apr_hash_t
* properties
;
214 apr_hash_index_t
*hi
;
215 const char *mimetype
;
216 svn_node_kind_t kind
;
217 svn_boolean_t is_special
;
219 /* Check to see if this is a special file. */
220 SVN_ERR(svn_io_check_special_path(path
, &kind
, &is_special
, pool
));
225 /* Get automatic properties */
226 /* This may fail on write-only files:
227 we open them to estimate file type.
228 That's why we postpone the add until after this step. */
229 SVN_ERR(svn_client__get_auto_props(&properties
, &mimetype
, path
, ctx
,
233 SVN_ERR(svn_wc_add2(path
, adm_access
, NULL
, SVN_INVALID_REVNUM
,
234 ctx
->cancel_func
, ctx
->cancel_baton
,
238 /* This must be a special file. */
239 SVN_ERR(svn_wc_prop_set2
241 svn_string_create(SVN_PROP_BOOLEAN_TRUE
, pool
),
242 path
, adm_access
, FALSE
, pool
));
245 /* loop through the hashtable and add the properties */
246 for (hi
= apr_hash_first(pool
, properties
);
247 hi
!= NULL
; hi
= apr_hash_next(hi
))
252 apr_hash_this(hi
, &pname
, NULL
, &pval
);
253 /* It's probably best to pass 0 for force, so that if
254 the autoprops say to set some weird combination,
255 we just error and let the user sort it out. */
256 SVN_ERR(svn_wc_prop_set2(pname
, pval
, path
,
257 adm_access
, FALSE
, pool
));
261 /* Report the addition to the caller. */
262 if (ctx
->notify_func2
!= NULL
)
264 svn_wc_notify_t
*notify
= svn_wc_create_notify(path
, svn_wc_notify_add
,
266 notify
->kind
= svn_node_file
;
267 notify
->mime_type
= mimetype
;
268 (*ctx
->notify_func2
)(ctx
->notify_baton2
, notify
, pool
);
274 /* Schedule directory DIRNAME, and some of the tree under it, for
275 * addition with access baton ADM_ACCESS. DEPTH is the depth at this
276 * point in the descent (it may be changed for recursive calls).
278 * If DIRNAME (or any item below directory DIRNAME) is already scheduled for
279 * addition, add will fail and return an error unless FORCE is TRUE.
281 * Files and directories that match ignore patterns will not be added unless
284 * If CTX->CANCEL_FUNC is non-null, call it with CTX->CANCEL_BATON to allow
285 * the user to cancel the operation
288 add_dir_recursive(const char *dirname
,
289 svn_wc_adm_access_t
*adm_access
,
292 svn_boolean_t no_ignore
,
293 svn_client_ctx_t
*ctx
,
297 apr_finfo_t this_entry
;
300 apr_int32_t flags
= APR_FINFO_TYPE
| APR_FINFO_NAME
;
301 svn_wc_adm_access_t
*dir_access
;
302 apr_array_header_t
*ignores
;
304 /* Check cancellation; note that this catches recursive calls too. */
305 if (ctx
->cancel_func
)
306 SVN_ERR(ctx
->cancel_func(ctx
->cancel_baton
));
308 /* Add this directory to revision control. */
309 err
= svn_wc_add2(dirname
, adm_access
,
310 NULL
, SVN_INVALID_REVNUM
,
311 ctx
->cancel_func
, ctx
->cancel_baton
,
312 ctx
->notify_func2
, ctx
->notify_baton2
, pool
);
313 if (err
&& err
->apr_err
== SVN_ERR_ENTRY_EXISTS
&& force
)
314 svn_error_clear(err
);
318 SVN_ERR(svn_wc_adm_retrieve(&dir_access
, adm_access
, dirname
, pool
));
321 SVN_ERR(svn_wc_get_ignores(&ignores
, ctx
->config
, dir_access
, pool
));
323 subpool
= svn_pool_create(pool
);
325 SVN_ERR(svn_io_dir_open(&dir
, dirname
, pool
));
327 /* Read the directory entries one by one and add those things to
331 const char *fullpath
;
333 svn_pool_clear(subpool
);
335 err
= svn_io_dir_read(&this_entry
, flags
, dir
, subpool
);
339 /* Check if we're done reading the dir's entries. */
340 if (APR_STATUS_IS_ENOENT(err
->apr_err
))
342 apr_status_t apr_err
;
344 svn_error_clear(err
);
345 apr_err
= apr_dir_close(dir
);
347 return svn_error_wrap_apr
348 (apr_err
, _("Can't close directory '%s'"),
349 svn_path_local_style(dirname
, subpool
));
354 return svn_error_createf
356 _("Error during add of '%s'"),
357 svn_path_local_style(dirname
, subpool
));
361 /* Skip entries for this dir and its parent. */
362 if (this_entry
.name
[0] == '.'
363 && (this_entry
.name
[1] == '\0'
364 || (this_entry
.name
[1] == '.' && this_entry
.name
[2] == '\0')))
367 /* Check cancellation so you can cancel during an
368 * add of a directory with lots of files. */
369 if (ctx
->cancel_func
)
370 SVN_ERR(ctx
->cancel_func(ctx
->cancel_baton
));
372 /* Skip over SVN admin directories. */
373 if (svn_wc_is_adm_dir(this_entry
.name
, subpool
))
376 if ((!no_ignore
) && svn_wc_match_ignore_list(this_entry
.name
,
380 /* Construct the full path of the entry. */
381 fullpath
= svn_path_join(dirname
, this_entry
.name
, subpool
);
383 /* Recurse on directories; add files; ignore the rest. */
384 if (this_entry
.filetype
== APR_DIR
&& depth
>= svn_depth_immediates
)
386 svn_depth_t depth_below_here
= depth
;
387 if (depth
== svn_depth_immediates
)
388 depth_below_here
= svn_depth_empty
;
390 SVN_ERR(add_dir_recursive(fullpath
, dir_access
, depth_below_here
,
391 force
, no_ignore
, ctx
, subpool
));
393 else if (this_entry
.filetype
!= APR_UNKFILE
394 && this_entry
.filetype
!= APR_DIR
395 && depth
>= svn_depth_files
)
397 err
= add_file(fullpath
, ctx
, dir_access
, subpool
);
398 if (err
&& err
->apr_err
== SVN_ERR_ENTRY_EXISTS
&& force
)
399 svn_error_clear(err
);
405 /* Opened by svn_wc_add */
406 SVN_ERR(svn_wc_adm_close(dir_access
));
408 /* Destroy the per-iteration pool. */
409 svn_pool_destroy(subpool
);
415 /* The main logic of the public svn_client_add4; the only difference
416 is that this function uses an existing access baton.
417 (svn_client_add4 just generates an access baton and calls this func.) */
419 add(const char *path
,
422 svn_boolean_t no_ignore
,
423 svn_wc_adm_access_t
*adm_access
,
424 svn_client_ctx_t
*ctx
,
427 svn_node_kind_t kind
;
430 SVN_ERR(svn_io_check_path(path
, &kind
, pool
));
431 if (kind
== svn_node_dir
&& depth
>= svn_depth_files
)
432 err
= add_dir_recursive(path
, adm_access
, depth
,
433 force
, no_ignore
, ctx
, pool
);
434 else if (kind
== svn_node_file
)
435 err
= add_file(path
, ctx
, adm_access
, pool
);
437 err
= svn_wc_add2(path
, adm_access
, NULL
, SVN_INVALID_REVNUM
,
438 ctx
->cancel_func
, ctx
->cancel_baton
,
439 ctx
->notify_func2
, ctx
->notify_baton2
, pool
);
441 /* Ignore SVN_ERR_ENTRY_EXISTS when FORCE is set. */
442 if (err
&& err
->apr_err
== SVN_ERR_ENTRY_EXISTS
&& force
)
444 svn_error_clear(err
);
451 /* Go up the directory tree, looking for a versioned directory. If found,
452 add all the intermediate directories. Otherwise, return
453 SVN_ERR_CLIENT_NO_VERSIONED_PARENT. */
455 add_parent_dirs(const char *path
,
456 svn_wc_adm_access_t
**parent_access
,
457 svn_client_ctx_t
*ctx
,
460 svn_wc_adm_access_t
*adm_access
;
463 err
= svn_wc_adm_open3(&adm_access
, NULL
, path
, TRUE
, 0,
464 ctx
->cancel_func
, ctx
->cancel_baton
, pool
);
466 if (err
&& err
->apr_err
== SVN_ERR_WC_NOT_DIRECTORY
)
468 if (svn_dirent_is_root(path
, strlen(path
)))
470 svn_error_clear(err
);
472 return svn_error_create
473 (SVN_ERR_CLIENT_NO_VERSIONED_PARENT
, NULL
, NULL
);
477 const char *parent_path
= svn_path_dirname(path
, pool
);
479 svn_error_clear(err
);
480 SVN_ERR(add_parent_dirs(parent_path
, &adm_access
, ctx
, pool
));
481 SVN_ERR(svn_wc_adm_retrieve(&adm_access
, adm_access
, parent_path
,
483 SVN_ERR(svn_wc_add2(path
, adm_access
, NULL
, SVN_INVALID_REVNUM
,
484 ctx
->cancel_func
, ctx
->cancel_baton
,
485 ctx
->notify_func2
, ctx
->notify_baton2
, pool
));
494 *parent_access
= adm_access
;
502 svn_client_add4(const char *path
,
505 svn_boolean_t no_ignore
,
506 svn_boolean_t add_parents
,
507 svn_client_ctx_t
*ctx
,
510 svn_error_t
*err
, *err2
;
511 svn_wc_adm_access_t
*adm_access
;
512 const char *parent_dir
;
518 SVN_ERR(svn_path_get_absolute(&path
, path
, pool
));
519 parent_dir
= svn_path_dirname(path
, pool
);
521 subpool
= svn_pool_create(pool
);
522 SVN_ERR(add_parent_dirs(parent_dir
, &adm_access
, ctx
, subpool
));
523 SVN_ERR(svn_wc_adm_close(adm_access
));
524 svn_pool_destroy(subpool
);
526 SVN_ERR(svn_wc_adm_open3(&adm_access
, NULL
, parent_dir
,
527 TRUE
, 0, ctx
->cancel_func
, ctx
->cancel_baton
,
532 parent_dir
= svn_path_dirname(path
, pool
);
533 SVN_ERR(svn_wc_adm_open3(&adm_access
, NULL
, parent_dir
,
534 TRUE
, 0, ctx
->cancel_func
, ctx
->cancel_baton
,
538 err
= add(path
, depth
, force
, no_ignore
, adm_access
, ctx
, pool
);
540 err2
= svn_wc_adm_close(adm_access
);
544 svn_error_clear(err2
);
553 svn_client_add3(const char *path
,
554 svn_boolean_t recursive
,
556 svn_boolean_t no_ignore
,
557 svn_client_ctx_t
*ctx
,
560 return svn_client_add4(path
, SVN_DEPTH_INFINITY_OR_FILES(recursive
),
561 force
, no_ignore
, FALSE
, ctx
,
566 svn_client_add2(const char *path
,
567 svn_boolean_t recursive
,
569 svn_client_ctx_t
*ctx
,
572 return svn_client_add3(path
, recursive
, force
, FALSE
, ctx
, pool
);
576 svn_client_add(const char *path
,
577 svn_boolean_t recursive
,
578 svn_client_ctx_t
*ctx
,
581 return svn_client_add3(path
, recursive
, FALSE
, FALSE
, ctx
, pool
);
586 path_driver_cb_func(void **dir_baton
,
588 void *callback_baton
,
592 const svn_delta_editor_t
*editor
= callback_baton
;
593 SVN_ERR(svn_path_check_valid(path
, pool
));
594 return editor
->add_directory(path
, parent_baton
, NULL
,
595 SVN_INVALID_REVNUM
, pool
, dir_baton
);
598 /* Append URL, and all it's non-existent parent directories, to TARGETS.
599 Use TEMPPOOL for temporary allocations and POOL for any additions to
602 add_url_parents(svn_ra_session_t
*ra_session
,
604 apr_array_header_t
*targets
,
605 apr_pool_t
*temppool
,
608 svn_node_kind_t kind
;
609 const char *parent_url
;
611 svn_path_split(url
, &parent_url
, NULL
, pool
);
613 SVN_ERR(svn_ra_reparent(ra_session
, parent_url
, temppool
));
614 SVN_ERR(svn_ra_check_path(ra_session
, "", SVN_INVALID_REVNUM
, &kind
,
617 if (kind
== svn_node_none
)
618 SVN_ERR(add_url_parents(ra_session
, parent_url
, targets
, temppool
, pool
));
620 APR_ARRAY_PUSH(targets
, const char *) = url
;
626 mkdir_urls(svn_commit_info_t
**commit_info_p
,
627 const apr_array_header_t
*urls
,
628 svn_boolean_t make_parents
,
629 svn_client_ctx_t
*ctx
,
632 svn_ra_session_t
*ra_session
= NULL
;
633 const svn_delta_editor_t
*editor
;
637 apr_hash_t
*revprop_table
;
638 apr_array_header_t
*targets
;
643 /* Find any non-existent parent directories */
646 apr_array_header_t
*all_urls
= apr_array_make(pool
, urls
->nelts
,
647 sizeof(const char *));
648 const char *first_url
= APR_ARRAY_IDX(urls
, 0, const char *);
649 apr_pool_t
*iterpool
= svn_pool_create(pool
);
651 SVN_ERR(svn_client__open_ra_session_internal(&ra_session
, first_url
,
652 NULL
, NULL
, NULL
, FALSE
,
655 for (i
= 0; i
< urls
->nelts
; i
++)
657 const char *url
= APR_ARRAY_IDX(urls
, i
, const char *);
659 svn_pool_clear(iterpool
);
660 SVN_ERR(add_url_parents(ra_session
, url
, all_urls
, iterpool
, pool
));
663 svn_pool_destroy(iterpool
);
668 /* Condense our list of mkdir targets. */
669 SVN_ERR(svn_path_condense_targets(&common
, &targets
, urls
, FALSE
, pool
));
671 if (! targets
->nelts
)
674 svn_path_split(common
, &common
, &bname
, pool
);
675 APR_ARRAY_PUSH(targets
, const char *) = bname
;
679 svn_boolean_t resplit
= FALSE
;
681 /* We can't "mkdir" the root of an editor drive, so if one of
682 our targets is the empty string, we need to back everything
683 up by a path component. */
684 for (i
= 0; i
< targets
->nelts
; i
++)
686 const char *path
= APR_ARRAY_IDX(targets
, i
, const char *);
696 svn_path_split(common
, &common
, &bname
, pool
);
697 for (i
= 0; i
< targets
->nelts
; i
++)
699 const char *path
= APR_ARRAY_IDX(targets
, i
, const char *);
700 path
= svn_path_join(bname
, path
, pool
);
701 APR_ARRAY_IDX(targets
, i
, const char *) = path
;
706 /* Create new commit items and add them to the array. */
707 if (SVN_CLIENT__HAS_LOG_MSG_FUNC(ctx
))
709 svn_client_commit_item3_t
*item
;
710 const char *tmp_file
;
711 apr_array_header_t
*commit_items
712 = apr_array_make(pool
, targets
->nelts
, sizeof(item
));
714 for (i
= 0; i
< targets
->nelts
; i
++)
716 const char *path
= APR_ARRAY_IDX(targets
, i
, const char *);
717 SVN_ERR(svn_client_commit_item_create
718 ((const svn_client_commit_item3_t
**) &item
, pool
));
719 item
->url
= svn_path_join(common
, path
, pool
);
720 item
->state_flags
= SVN_CLIENT_COMMIT_ITEM_ADD
;
721 APR_ARRAY_PUSH(commit_items
, svn_client_commit_item3_t
*) = item
;
724 SVN_ERR(svn_client__get_log_msg(&log_msg
, &tmp_file
, commit_items
,
733 SVN_ERR(svn_client__get_revprop_table(&revprop_table
, log_msg
, ctx
, pool
));
735 /* Open an RA session for the URL. Note that we don't have a local
736 directory, nor a place to put temp files. */
738 SVN_ERR(svn_client__open_ra_session_internal(&ra_session
, common
, NULL
,
739 NULL
, NULL
, FALSE
, TRUE
,
742 /* URI-decode each target. */
743 for (i
= 0; i
< targets
->nelts
; i
++)
745 const char *path
= APR_ARRAY_IDX(targets
, i
, const char *);
746 path
= svn_path_uri_decode(path
, pool
);
747 APR_ARRAY_IDX(targets
, i
, const char *) = path
;
750 /* Fetch RA commit editor */
751 SVN_ERR(svn_client__commit_get_baton(&commit_baton
, commit_info_p
, pool
));
752 SVN_ERR(svn_ra_get_commit_editor3(ra_session
, &editor
, &edit_baton
,
754 svn_client__commit_callback
,
756 NULL
, TRUE
, /* No lock tokens */
759 /* Call the path-based editor driver. */
760 err
= svn_delta_path_driver(editor
, edit_baton
, SVN_INVALID_REVNUM
,
761 targets
, path_driver_cb_func
,
762 (void *)editor
, pool
);
765 /* At least try to abort the edit (and fs txn) before throwing err. */
766 svn_error_clear(editor
->abort_edit(edit_baton
, pool
));
770 /* Close the edit. */
771 SVN_ERR(editor
->close_edit(edit_baton
, pool
));
779 svn_client__make_local_parents(const char *path
,
780 svn_boolean_t make_parents
,
781 svn_client_ctx_t
*ctx
,
787 SVN_ERR(svn_io_make_dir_recursively(path
, pool
));
789 SVN_ERR(svn_io_dir_make(path
, APR_OS_DEFAULT
, pool
));
791 err
= svn_client_add4(path
, svn_depth_empty
, FALSE
, FALSE
,
792 make_parents
, ctx
, pool
);
794 /* We just created a new directory, but couldn't add it to
795 version control. Don't leave unversioned directories behind. */
798 /* ### If this returns an error, should we link it onto
799 err instead, so that the user is warned that we just
800 created an unversioned directory? */
802 svn_error_clear(svn_io_remove_dir(path
, pool
));
810 svn_client_mkdir3(svn_commit_info_t
**commit_info_p
,
811 const apr_array_header_t
*paths
,
812 svn_boolean_t make_parents
,
813 svn_client_ctx_t
*ctx
,
819 if (svn_path_is_url(APR_ARRAY_IDX(paths
, 0, const char *)))
821 SVN_ERR(mkdir_urls(commit_info_p
, paths
, make_parents
, ctx
, pool
));
825 /* This is a regular "mkdir" + "svn add" */
826 apr_pool_t
*subpool
= svn_pool_create(pool
);
829 for (i
= 0; i
< paths
->nelts
; i
++)
831 const char *path
= APR_ARRAY_IDX(paths
, i
, const char *);
833 svn_pool_clear(subpool
);
835 /* See if the user wants us to stop. */
836 if (ctx
->cancel_func
)
837 SVN_ERR(ctx
->cancel_func(ctx
->cancel_baton
));
839 SVN_ERR(svn_client__make_local_parents(path
, make_parents
, ctx
,
842 svn_pool_destroy(subpool
);
850 svn_client_mkdir2(svn_commit_info_t
**commit_info_p
,
851 const apr_array_header_t
*paths
,
852 svn_client_ctx_t
*ctx
,
855 return svn_client_mkdir3(commit_info_p
, paths
, FALSE
, ctx
, pool
);
860 svn_client_mkdir(svn_client_commit_info_t
**commit_info_p
,
861 const apr_array_header_t
*paths
,
862 svn_client_ctx_t
*ctx
,
865 svn_commit_info_t
*commit_info
= NULL
;
868 err
= svn_client_mkdir2(&commit_info
, paths
, ctx
, pool
);
869 /* These structs have the same layout for the common fields. */
870 *commit_info_p
= (svn_client_commit_info_t
*) commit_info
;