3 * ====================================================================
4 * Licensed to the Apache Software Foundation (ASF) under one
5 * or more contributor license agreements. See the NOTICE file
6 * distributed with this work for additional information
7 * regarding copyright ownership. The ASF licenses this file
8 * to you under the Apache License, Version 2.0 (the
9 * "License"); you may not use this file except in compliance
10 * with the License. You may obtain a copy of the License at
12 * http://www.apache.org/licenses/LICENSE-2.0
14 * Unless required by applicable law or agreed to in writing,
15 * software distributed under the License is distributed on an
16 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
17 * KIND, either express or implied. See the License for the
18 * specific language governing permissions and limitations
20 * ====================================================================
24 * @brief Subversion's client library
26 * Requires: The working copy library and repository access library.
27 * Provides: Broad wrappers around working copy library functionality.
28 * Used By: Client programs.
35 #include <apr_pools.h>
37 #include <apr_tables.h>
38 #include <apr_getopt.h>
39 #include <apr_file_io.h>
42 #include "svn_types.h"
43 #include "svn_string.h"
52 #endif /* __cplusplus */
57 * Get libsvn_client version information.
62 svn_client_version(void);
64 /** Client supporting functions
66 * @defgroup clnt_support Client supporting subsystem
72 /*** Authentication stuff ***/
74 /** The new authentication system allows the RA layer to "pull"
75 * information as needed from libsvn_client.
77 * @deprecated Replaced by the svn_auth_* functions.
80 * @defgroup auth_fns_depr (deprecated) AuthZ client subsystem
85 /** Create and return @a *provider, an authentication provider of type
86 * svn_auth_cred_simple_t that gets information by prompting the user
87 * with @a prompt_func and @a prompt_baton. Allocate @a *provider in
90 * If both #SVN_AUTH_PARAM_DEFAULT_USERNAME and
91 * #SVN_AUTH_PARAM_DEFAULT_PASSWORD are defined as runtime
92 * parameters in the @c auth_baton, then @a *provider will return the
93 * default arguments when svn_auth_first_credentials() is called. If
94 * svn_auth_first_credentials() fails, then @a *provider will
95 * re-prompt @a retry_limit times (via svn_auth_next_credentials()).
96 * For infinite retries, set @a retry_limit to value less than 0.
98 * @deprecated Provided for backward compatibility with the 1.3 API.
99 * Use svn_auth_get_simple_prompt_provider() instead.
103 svn_client_get_simple_prompt_provider(
104 svn_auth_provider_object_t **provider,
105 svn_auth_simple_prompt_func_t prompt_func,
111 /** Create and return @a *provider, an authentication provider of type
112 * #svn_auth_cred_username_t that gets information by prompting the
113 * user with @a prompt_func and @a prompt_baton. Allocate @a *provider
116 * If #SVN_AUTH_PARAM_DEFAULT_USERNAME is defined as a runtime
117 * parameter in the @c auth_baton, then @a *provider will return the
118 * default argument when svn_auth_first_credentials() is called. If
119 * svn_auth_first_credentials() fails, then @a *provider will
120 * re-prompt @a retry_limit times (via svn_auth_next_credentials()).
121 * For infinite retries, set @a retry_limit to value less than 0.
123 * @deprecated Provided for backward compatibility with the 1.3 API.
124 * Use svn_auth_get_username_prompt_provider() instead.
128 svn_client_get_username_prompt_provider(
129 svn_auth_provider_object_t **provider,
130 svn_auth_username_prompt_func_t prompt_func,
136 /** Create and return @a *provider, an authentication provider of type
137 * #svn_auth_cred_simple_t that gets/sets information from the user's
138 * ~/.subversion configuration directory. Allocate @a *provider in
141 * If a default username or password is available, @a *provider will
142 * honor them as well, and return them when
143 * svn_auth_first_credentials() is called. (see
144 * #SVN_AUTH_PARAM_DEFAULT_USERNAME and #SVN_AUTH_PARAM_DEFAULT_PASSWORD).
146 * @deprecated Provided for backward compatibility with the 1.3 API.
147 * Use svn_auth_get_simple_provider2() instead.
151 svn_client_get_simple_provider(svn_auth_provider_object_t **provider,
155 #if (defined(WIN32) && !defined(__MINGW32__)) || defined(DOXYGEN) || defined(CTYPESGEN) || defined(SWIG)
157 * Create and return @a *provider, an authentication provider of type
158 * #svn_auth_cred_simple_t that gets/sets information from the user's
159 * ~/.subversion configuration directory. Allocate @a *provider in
162 * This is like svn_client_get_simple_provider(), except that, when
163 * running on Window 2000 or newer (or any other Windows version that
164 * includes the CryptoAPI), the provider encrypts the password before
165 * storing it to disk. On earlier versions of Windows, the provider
169 * @note This function is only available on Windows.
171 * @note An administrative password reset may invalidate the account's
172 * secret key. This function will detect that situation and behave as
173 * if the password were not cached at all.
175 * @deprecated Provided for backward compatibility with the 1.3 API.
176 * Use svn_auth_get_windows_simple_provider() instead.
180 svn_client_get_windows_simple_provider(svn_auth_provider_object_t **provider,
182 #endif /* WIN32 && !__MINGW32__ || DOXYGEN || CTYPESGEN || SWIG */
184 /** Create and return @a *provider, an authentication provider of type
185 * #svn_auth_cred_username_t that gets/sets information from a user's
186 * ~/.subversion configuration directory. Allocate @a *provider in
189 * If a default username is available, @a *provider will honor it,
190 * and return it when svn_auth_first_credentials() is called. (see
191 * #SVN_AUTH_PARAM_DEFAULT_USERNAME).
193 * @deprecated Provided for backward compatibility with the 1.3 API.
194 * Use svn_auth_get_username_provider() instead.
198 svn_client_get_username_provider(svn_auth_provider_object_t **provider,
202 /** Create and return @a *provider, an authentication provider of type
203 * #svn_auth_cred_ssl_server_trust_t, allocated in @a pool.
205 * @a *provider retrieves its credentials from the configuration
206 * mechanism. The returned credential is used to override SSL
207 * security on an error.
209 * @deprecated Provided for backward compatibility with the 1.3 API.
210 * Use svn_auth_get_ssl_server_trust_file_provider() instead.
214 svn_client_get_ssl_server_trust_file_provider(
215 svn_auth_provider_object_t **provider,
219 /** Create and return @a *provider, an authentication provider of type
220 * #svn_auth_cred_ssl_client_cert_t, allocated in @a pool.
222 * @a *provider retrieves its credentials from the configuration
223 * mechanism. The returned credential is used to load the appropriate
224 * client certificate for authentication when requested by a server.
226 * @deprecated Provided for backward compatibility with the 1.3 API.
227 * Use svn_auth_get_ssl_client_cert_file_provider() instead.
231 svn_client_get_ssl_client_cert_file_provider(
232 svn_auth_provider_object_t **provider,
236 /** Create and return @a *provider, an authentication provider of type
237 * #svn_auth_cred_ssl_client_cert_pw_t, allocated in @a pool.
239 * @a *provider retrieves its credentials from the configuration
240 * mechanism. The returned credential is used when a loaded client
241 * certificate is protected by a passphrase.
243 * @deprecated Provided for backward compatibility with the 1.3 API.
244 * Use svn_auth_get_ssl_client_cert_pw_file_provider2() instead.
248 svn_client_get_ssl_client_cert_pw_file_provider(
249 svn_auth_provider_object_t **provider,
253 /** Create and return @a *provider, an authentication provider of type
254 * #svn_auth_cred_ssl_server_trust_t, allocated in @a pool.
256 * @a *provider retrieves its credentials by using the @a prompt_func
257 * and @a prompt_baton. The returned credential is used to override
258 * SSL security on an error.
260 * @deprecated Provided for backward compatibility with the 1.3 API.
261 * Use svn_auth_get_ssl_server_trust_prompt_provider() instead.
265 svn_client_get_ssl_server_trust_prompt_provider(
266 svn_auth_provider_object_t **provider,
267 svn_auth_ssl_server_trust_prompt_func_t prompt_func,
272 /** Create and return @a *provider, an authentication provider of type
273 * #svn_auth_cred_ssl_client_cert_t, allocated in @a pool.
275 * @a *provider retrieves its credentials by using the @a prompt_func
276 * and @a prompt_baton. The returned credential is used to load the
277 * appropriate client certificate for authentication when requested by
278 * a server. The prompt will be retried @a retry_limit times.
279 * For infinite retries, set @a retry_limit to value less than 0.
281 * @deprecated Provided for backward compatibility with the 1.3 API.
282 * Use svn_auth_get_ssl_client_cert_prompt_provider() instead.
286 svn_client_get_ssl_client_cert_prompt_provider(
287 svn_auth_provider_object_t **provider,
288 svn_auth_ssl_client_cert_prompt_func_t prompt_func,
294 /** Create and return @a *provider, an authentication provider of type
295 * #svn_auth_cred_ssl_client_cert_pw_t, allocated in @a pool.
297 * @a *provider retrieves its credentials by using the @a prompt_func
298 * and @a prompt_baton. The returned credential is used when a loaded
299 * client certificate is protected by a passphrase. The prompt will
300 * be retried @a retry_limit times. For infinite retries, set @a retry_limit
301 * to value less than 0.
303 * @deprecated Provided for backward compatibility with the 1.3 API.
304 * Use svn_auth_get_ssl_client_cert_pw_prompt_provider() instead.
308 svn_client_get_ssl_client_cert_pw_prompt_provider(
309 svn_auth_provider_object_t **provider,
310 svn_auth_ssl_client_cert_pw_prompt_func_t prompt_func,
318 * Revisions and Peg Revisions
320 * @defgroup clnt_revisions Revisions and Peg Revisions
322 * A brief word on operative and peg revisions.
324 * If the kind of the peg revision is #svn_opt_revision_unspecified, then it
325 * defaults to #svn_opt_revision_head for URLs and #svn_opt_revision_working
328 * For deeper insight, please see the
329 * <a href="http://svnbook.red-bean.com/nightly/en/svn.advanced.pegrevs.html">
330 * Peg and Operative Revisions</a> section of the Subversion Book.
336 * @defgroup clnt_commit Client commit subsystem
341 /** This is a structure which stores a filename and a hash of property
344 * @deprecated Provided for backward compatibility with the 1.4 API.
346 typedef struct svn_client_proplist_item_t
348 /** The name of the node on which these properties are set. */
349 svn_stringbuf_t *node_name;
351 /** A hash of (const char *) property names, and (svn_string_t *) property
353 apr_hash_t *prop_hash;
355 } svn_client_proplist_item_t;
358 * The callback invoked by svn_client_proplist4(). Each invocation
359 * provides the regular and/or inherited properties of @a path, which is
360 * either a working copy path or a URL. If @a prop_hash is not @c NULL, then
361 * it maps explicit <tt>const char *</tt> property names to
362 * <tt>svn_string_t *</tt> explicit property values. If @a inherited_props
363 * is not @c NULL, then it is a depth-first ordered array of
364 * #svn_prop_inherited_item_t * structures representing the
365 * properties inherited by @a path. Use @a scratch_pool for all temporary
368 * The #svn_prop_inherited_item_t->path_or_url members of the
369 * #svn_prop_inherited_item_t * structures in @a inherited_props are
370 * URLs if @a path is a URL or if @a path is a working copy path but the
371 * property represented by the structure is above the working copy root (i.e.
372 * the inherited property is from the cache). In all other cases the
373 * #svn_prop_inherited_item_t->path_or_url members are absolute working copy
378 typedef svn_error_t *(*svn_proplist_receiver2_t)(
381 apr_hash_t *prop_hash,
382 apr_array_header_t *inherited_props,
383 apr_pool_t *scratch_pool);
386 * Similar to #svn_proplist_receiver2_t, but doesn't return inherited
389 * @deprecated Provided for backward compatibility with the 1.7 API.
393 typedef svn_error_t *(*svn_proplist_receiver_t)(
396 apr_hash_t *prop_hash,
400 * Return a duplicate of @a item, allocated in @a pool. No part of the new
401 * structure will be shared with @a item.
405 * @deprecated Provided for backward compatibility with the 1.4 API.
408 svn_client_proplist_item_t *
409 svn_client_proplist_item_dup(const svn_client_proplist_item_t *item,
412 /** Information about commits passed back to client from this module.
414 * @deprecated Provided for backward compatibility with the 1.2 API.
416 typedef struct svn_client_commit_info_t
418 /** just-committed revision. */
419 svn_revnum_t revision;
421 /** server-side date of the commit. */
424 /** author of the commit. */
427 } svn_client_commit_info_t;
431 * @name Commit state flags
432 * @brief State flags for use with the #svn_client_commit_item3_t structure
433 * (see the note about the namespace for that structure, which also
434 * applies to these flags).
437 #define SVN_CLIENT_COMMIT_ITEM_ADD 0x01
438 #define SVN_CLIENT_COMMIT_ITEM_DELETE 0x02
439 #define SVN_CLIENT_COMMIT_ITEM_TEXT_MODS 0x04
440 #define SVN_CLIENT_COMMIT_ITEM_PROP_MODS 0x08
441 #define SVN_CLIENT_COMMIT_ITEM_IS_COPY 0x10
442 /** One of the flags for a commit item. The node has a lock token that
443 * should be released after a successful commit and, if the node is also
444 * modified, transferred to the server as part of the commit process.
446 * @since New in 1.2. */
447 #define SVN_CLIENT_COMMIT_ITEM_LOCK_TOKEN 0x20
448 /** One of the flags for a commit item. The node is the 'moved here'
449 * side of a local move. This is used to check and enforce that the
450 * other side of the move is also included in the commit.
452 * @since New in 1.8. */
453 #define SVN_CLIENT_COMMIT_ITEM_MOVED_HERE 0x40
456 /** The commit candidate structure.
458 * In order to avoid backwards compatibility problems clients should use
459 * svn_client_commit_item3_create() to allocate and initialize this
460 * structure instead of doing so themselves.
464 typedef struct svn_client_commit_item3_t
466 /* IMPORTANT: If you extend this structure, add new fields to the end. */
468 /** absolute working-copy path of item. Always set during normal commits
469 * (and copies from a working copy) to the repository. Can only be NULL
470 * when stub commit items are created for operations that only involve
471 * direct repository operations. During WC->REPOS copy operations, this
472 * path is the WC source path of the operation. */
475 /** node kind (dir, file) */
476 svn_node_kind_t kind;
478 /** commit URL for this item. Points to the repository location of PATH
479 * during commits, or to the final URL of the item when copying from the
480 * working copy to the repository. */
483 /** revision of textbase */
484 svn_revnum_t revision;
486 /** copyfrom-url or NULL if not a copied item */
487 const char *copyfrom_url;
489 /** copyfrom-rev, valid when copyfrom_url != NULL */
490 svn_revnum_t copyfrom_rev;
493 apr_byte_t state_flags;
495 /** An array of #svn_prop_t *'s, which are incoming changes from
496 * the repository to WC properties. These changes are applied
499 * When adding to this array, allocate the #svn_prop_t and its
500 * contents in @c incoming_prop_changes->pool, so that it has the
501 * same lifetime as this data structure.
503 * See http://subversion.tigris.org/issues/show_bug.cgi?id=806 for a
504 * description of what would happen if the post-commit process
505 * didn't group these changes together with all other changes to the
508 apr_array_header_t *incoming_prop_changes;
510 /** An array of #svn_prop_t *'s, which are outgoing changes to
511 * make to properties in the repository. These extra property
512 * changes are declared pre-commit, and applied to the repository as
515 * When adding to this array, allocate the #svn_prop_t and its
516 * contents in @c outgoing_prop_changes->pool, so that it has the
517 * same lifetime as this data structure.
519 apr_array_header_t *outgoing_prop_changes;
522 * When processing the commit this contains the relative path for
523 * the commit session. #NULL until the commit item is preprocessed.
526 const char *session_relpath;
529 * When committing a move, this contains the absolute path where
530 * the node was directly moved from. (If an ancestor at the original
531 * location was moved then it points to where the node itself was
532 * moved from; not the original location.)
535 const char *moved_from_abspath;
537 } svn_client_commit_item3_t;
539 /** The commit candidate structure.
541 * @deprecated Provided for backward compatibility with the 1.4 API.
543 typedef struct svn_client_commit_item2_t
545 /** absolute working-copy path of item */
548 /** node kind (dir, file) */
549 svn_node_kind_t kind;
551 /** commit URL for this item */
554 /** revision of textbase */
555 svn_revnum_t revision;
557 /** copyfrom-url or NULL if not a copied item */
558 const char *copyfrom_url;
560 /** copyfrom-rev, valid when copyfrom_url != NULL */
561 svn_revnum_t copyfrom_rev;
564 apr_byte_t state_flags;
566 /** Analogous to the #svn_client_commit_item3_t.incoming_prop_changes
569 apr_array_header_t *wcprop_changes;
570 } svn_client_commit_item2_t;
572 /** The commit candidate structure.
574 * @deprecated Provided for backward compatibility with the 1.2 API.
576 typedef struct svn_client_commit_item_t
578 /** absolute working-copy path of item */
581 /** node kind (dir, file) */
582 svn_node_kind_t kind;
584 /** commit URL for this item */
587 /** revision (copyfrom-rev if _IS_COPY) */
588 svn_revnum_t revision;
591 const char *copyfrom_url;
594 apr_byte_t state_flags;
596 /** Analogous to the #svn_client_commit_item3_t.incoming_prop_changes
599 apr_array_header_t *wcprop_changes;
601 } svn_client_commit_item_t;
603 /** Return a new commit item object, allocated in @a pool.
605 * In order to avoid backwards compatibility problems, this function
606 * is used to initialize and allocate the #svn_client_commit_item3_t
607 * structure rather than doing so explicitly, as the size of this
608 * structure may change in the future.
612 svn_client_commit_item3_t *
613 svn_client_commit_item3_create(apr_pool_t *pool);
615 /** Like svn_client_commit_item3_create() but with a stupid "const"
616 * qualifier on the returned structure, and it returns an error that
619 * @deprecated Provided for backward compatibility with the 1.5 API.
623 svn_client_commit_item_create(const svn_client_commit_item3_t **item,
627 * Return a duplicate of @a item, allocated in @a pool. No part of the
628 * new structure will be shared with @a item, except for the adm_access
633 svn_client_commit_item3_t *
634 svn_client_commit_item3_dup(const svn_client_commit_item3_t *item,
638 * Return a duplicate of @a item, allocated in @a pool. No part of the new
639 * structure will be shared with @a item.
641 * @deprecated Provided for backward compatibility with the 1.4 API.
644 svn_client_commit_item2_t *
645 svn_client_commit_item2_dup(const svn_client_commit_item2_t *item,
648 /** Callback type used by commit-y operations to get a commit log message
651 * Set @a *log_msg to the log message for the commit, allocated in @a
652 * pool, or @c NULL if wish to abort the commit process. Set @a *tmp_file
653 * to the path of any temporary file which might be holding that log
654 * message, or @c NULL if no such file exists (though, if @a *log_msg is
655 * @c NULL, this value is undefined). The log message MUST be a UTF8
656 * string with LF line separators.
658 * @a commit_items is a read-only array of #svn_client_commit_item3_t
659 * structures, which may be fully or only partially filled-in,
660 * depending on the type of commit operation.
662 * @a baton is provided along with the callback for use by the handler.
664 * All allocations should be performed in @a pool.
668 typedef svn_error_t *(*svn_client_get_commit_log3_t)(
669 const char **log_msg,
670 const char **tmp_file,
671 const apr_array_header_t *commit_items,
675 /** Callback type used by commit-y operations to get a commit log message
678 * Set @a *log_msg to the log message for the commit, allocated in @a
679 * pool, or @c NULL if wish to abort the commit process. Set @a *tmp_file
680 * to the path of any temporary file which might be holding that log
681 * message, or @c NULL if no such file exists (though, if @a *log_msg is
682 * @c NULL, this value is undefined). The log message MUST be a UTF8
683 * string with LF line separators.
685 * @a commit_items is a read-only array of #svn_client_commit_item2_t
686 * structures, which may be fully or only partially filled-in,
687 * depending on the type of commit operation.
689 * @a baton is provided along with the callback for use by the handler.
691 * All allocations should be performed in @a pool.
693 * @deprecated Provided for backward compatibility with the 1.3 API.
695 typedef svn_error_t *(*svn_client_get_commit_log2_t)(
696 const char **log_msg,
697 const char **tmp_file,
698 const apr_array_header_t *commit_items,
702 /** Callback type used by commit-y operations to get a commit log message
705 * Set @a *log_msg to the log message for the commit, allocated in @a
706 * pool, or @c NULL if wish to abort the commit process. Set @a *tmp_file
707 * to the path of any temporary file which might be holding that log
708 * message, or @c NULL if no such file exists (though, if @a *log_msg is
709 * @c NULL, this value is undefined). The log message MUST be a UTF8
710 * string with LF line separators.
712 * @a commit_items is a read-only array of #svn_client_commit_item_t
713 * structures, which may be fully or only partially filled-in,
714 * depending on the type of commit operation.
716 * @a baton is provided along with the callback for use by the handler.
718 * All allocations should be performed in @a pool.
720 * @deprecated Provided for backward compatibility with the 1.2 API.
722 typedef svn_error_t *(*svn_client_get_commit_log_t)(
723 const char **log_msg,
724 const char **tmp_file,
725 apr_array_header_t *commit_items,
734 * @defgroup clnt_blame Client blame functionality
739 /** Callback type used by svn_client_blame5() to notify the caller
740 * that line @a line_no of the blamed file was last changed in @a revision
741 * which has the revision properties @a rev_props, and that the contents were
744 * @a start_revnum and @a end_revnum contain the start and end revision
745 * number of the entire blame operation, as determined from the repository
746 * inside svn_client_blame5(). This can be useful for the blame receiver
747 * to format the blame output.
749 * If svn_client_blame5() was called with @a include_merged_revisions set to
750 * TRUE, @a merged_revision, @a merged_rev_props and @a merged_path will be
751 * set, otherwise they will be NULL. @a merged_path will be set to the
752 * absolute repository path.
754 * All allocations should be performed in @a pool.
756 * @note If there is no blame information for this line, @a revision will be
757 * invalid and @a rev_props will be NULL. In this case @a local_change
758 * will be true if the reason there is no blame information is that the line
759 * was modified locally. In all other cases @a local_change will be false.
763 typedef svn_error_t *(*svn_client_blame_receiver3_t)(
765 svn_revnum_t start_revnum,
766 svn_revnum_t end_revnum,
768 svn_revnum_t revision,
769 apr_hash_t *rev_props,
770 svn_revnum_t merged_revision,
771 apr_hash_t *merged_rev_props,
772 const char *merged_path,
774 svn_boolean_t local_change,
778 * Similar to #svn_client_blame_receiver3_t, but with separate author and
779 * date revision properties instead of all revision properties, and without
780 * information about local changes.
782 * @deprecated Provided for backward compatibility with the 1.6 API.
786 typedef svn_error_t *(*svn_client_blame_receiver2_t)(
789 svn_revnum_t revision,
792 svn_revnum_t merged_revision,
793 const char *merged_author,
794 const char *merged_date,
795 const char *merged_path,
800 * Similar to #svn_client_blame_receiver2_t, but without @a merged_revision,
801 * @a merged_author, @a merged_date, or @a merged_path members.
803 * @note New in 1.4 is that the line is defined to contain only the line
804 * content (and no [partial] EOLs; which was undefined in older versions).
805 * Using this callback with svn_client_blame() or svn_client_blame2()
806 * will still give you the old behaviour.
808 * @deprecated Provided for backward compatibility with the 1.4 API.
810 typedef svn_error_t *(*svn_client_blame_receiver_t)(
813 svn_revnum_t revision,
825 * @defgroup clnt_diff Client diff functionality
829 /** The difference type in an svn_diff_summarize_t structure.
833 typedef enum svn_client_diff_summarize_kind_t
835 /** An item with no text modifications */
836 svn_client_diff_summarize_kind_normal,
839 svn_client_diff_summarize_kind_added,
841 /** An item with text modifications */
842 svn_client_diff_summarize_kind_modified,
844 /** A deleted item */
845 svn_client_diff_summarize_kind_deleted
846 } svn_client_diff_summarize_kind_t;
849 /** A struct that describes the diff of an item. Passed to
850 * #svn_client_diff_summarize_func_t.
852 * @note Fields may be added to the end of this structure in future
853 * versions. Therefore, users shouldn't allocate structures of this
854 * type, to preserve binary compatibility.
858 typedef struct svn_client_diff_summarize_t
860 /** Path relative to the target. If the target is a file, path is
861 * the empty string. */
865 svn_client_diff_summarize_kind_t summarize_kind;
867 /** Properties changed? For consistency with 'svn status' output,
868 * this should be false if summarize_kind is _added or _deleted. */
869 svn_boolean_t prop_changed;
872 svn_node_kind_t node_kind;
873 } svn_client_diff_summarize_t;
876 * Return a duplicate of @a diff, allocated in @a pool. No part of the new
877 * structure will be shared with @a diff.
881 svn_client_diff_summarize_t *
882 svn_client_diff_summarize_dup(const svn_client_diff_summarize_t *diff,
886 /** A callback used in svn_client_diff_summarize2() and
887 * svn_client_diff_summarize_peg2() for reporting a @a diff summary.
889 * All allocations should be performed in @a pool.
891 * @a baton is a closure object; it should be provided by the implementation,
892 * and passed by the caller.
896 typedef svn_error_t *(*svn_client_diff_summarize_func_t)(
897 const svn_client_diff_summarize_t *diff,
909 * @defgroup clnt_ctx Client context management
914 /** A client context structure, which holds client specific callbacks,
915 * batons, serves as a cache for configuration options, and other various
916 * and sundry things. In order to avoid backwards compatibility problems
917 * clients should use svn_client_create_context() to allocate and
918 * initialize this structure instead of doing so themselves.
920 typedef struct svn_client_ctx_t
922 /** main authentication baton. */
923 svn_auth_baton_t *auth_baton;
925 /** notification callback function.
926 * This will be called by notify_func2() by default.
927 * @deprecated Provided for backward compatibility with the 1.1 API.
928 * Use @c notify_func2 instead. */
929 svn_wc_notify_func_t notify_func;
931 /** notification callback baton for notify_func()
932 * @deprecated Provided for backward compatibility with the 1.1 API.
933 * Use @c notify_baton2 instead */
936 /** Log message callback function. NULL means that Subversion
937 * should try not attempt to fetch a log message.
938 * @deprecated Provided for backward compatibility with the 1.2 API.
939 * Use @c log_msg_func2 instead. */
940 svn_client_get_commit_log_t log_msg_func;
942 /** log message callback baton
943 * @deprecated Provided for backward compatibility with the 1.2 API.
944 * Use @c log_msg_baton2 instead. */
947 /** a hash mapping of <tt>const char *</tt> configuration file names to
948 * #svn_config_t *'s. For example, the '~/.subversion/config' file's
949 * contents should have the key "config". May be left unset (or set to
950 * NULL) to use the built-in default settings and not use any configuration.
954 /** a callback to be used to see if the client wishes to cancel the running
956 svn_cancel_func_t cancel_func;
958 /** a baton to pass to the cancellation callback. */
961 /** notification function, defaulting to a function that forwards
962 * to notify_func(). If @c NULL, it will not be invoked.
963 * @since New in 1.2. */
964 svn_wc_notify_func2_t notify_func2;
966 /** notification baton for notify_func2().
967 * @since New in 1.2. */
970 /** Log message callback function. NULL means that Subversion
971 * should try log_msg_func.
972 * @since New in 1.3. */
973 svn_client_get_commit_log2_t log_msg_func2;
975 /** callback baton for log_msg_func2
976 * @since New in 1.3. */
977 void *log_msg_baton2;
979 /** Notification callback for network progress information.
980 * May be NULL if not used.
981 * @since New in 1.3. */
982 svn_ra_progress_notify_func_t progress_func;
984 /** Callback baton for progress_func.
985 * @since New in 1.3. */
986 void *progress_baton;
988 /** Log message callback function. NULL means that Subversion
989 * should try @c log_msg_func2, then @c log_msg_func.
990 * @since New in 1.5. */
991 svn_client_get_commit_log3_t log_msg_func3;
993 /** The callback baton for @c log_msg_func3.
994 * @since New in 1.5. */
995 void *log_msg_baton3;
998 * @since New in 1.5. */
999 apr_hash_t *mimetypes_map;
1001 /** Conflict resolution callback and baton, if available.
1002 * @since New in 1.5. */
1003 svn_wc_conflict_resolver_func_t conflict_func;
1004 void *conflict_baton;
1006 /** Custom client name string, or @c NULL.
1007 * @since New in 1.5. */
1008 const char *client_name;
1010 /** Conflict resolution callback and baton, if available. NULL means that
1011 * subversion should try @c conflict_func.
1012 * @since New in 1.7. */
1013 svn_wc_conflict_resolver_func2_t conflict_func2;
1014 void *conflict_baton2;
1016 /** A working copy context for the client operation to use.
1017 * This is initialized by svn_client_create_context() and should never
1020 * @since New in 1.7. */
1021 svn_wc_context_t *wc_ctx;
1023 /** Check-tunnel callback
1025 * If not @c NULL, and open_tunnel_func is also not @c NULL, this
1026 * callback will be invoked to check if open_tunnel_func should be
1027 * used to create a specific tunnel, or if the default tunnel
1028 * implementation (either built-in or configured in the client
1029 * configuration file) should be used instead.
1030 * @since New in 1.9.
1032 svn_ra_check_tunnel_func_t check_tunnel_func;
1034 /** Open-tunnel callback
1036 * If not @c NULL, this callback will be invoked to create a tunnel
1037 * for a ra_svn connection that needs one, overriding any tunnel
1038 * definitions in the client config file. This callback is used only
1039 * for ra_svn and ignored by the other RA modules.
1040 * @since New in 1.9.
1042 svn_ra_open_tunnel_func_t open_tunnel_func;
1044 /** The baton used with check_tunnel_func and open_tunnel_func.
1045 * @since New in 1.9.
1050 /** Initialize a client context.
1051 * Set @a *ctx to a client context object, allocated in @a pool, that
1052 * represents a particular instance of an svn client. @a cfg_hash is used
1053 * to initialise the config member of the returned context object and should
1054 * remain valid for the lifetime of the object. @a cfg_hash may be @c NULL,
1055 * in which case it is ignored.
1057 * In order to avoid backwards compatibility problems, clients must
1058 * use this function to initialize and allocate the
1059 * #svn_client_ctx_t structure rather than doing so themselves, as
1060 * the size of this structure may change in the future.
1062 * The current implementation never returns error, but callers should
1063 * still check for error, for compatibility with future versions.
1065 * @since New in 1.8.
1068 svn_client_create_context2(svn_client_ctx_t **ctx,
1069 apr_hash_t *cfg_hash,
1073 /** Similar to svn_client_create_context2 but passes a NULL @a cfg_hash.
1075 * @deprecated Provided for backward compatibility with the 1.7 API.
1079 svn_client_create_context(svn_client_ctx_t **ctx,
1082 /** @} end group: Client context management */
1085 * @deprecated Provided for backward compatibility. This constant was never
1086 * used in released versions.
1088 #define SVN_CLIENT_AUTH_USERNAME "username"
1090 * @deprecated Provided for backward compatibility. This constant was never
1091 * used in released versions.
1093 #define SVN_CLIENT_AUTH_PASSWORD "password"
1095 /** Client argument processing
1097 * @defgroup clnt_cmdline Client command-line processing
1103 * Pull remaining target arguments from @a os into @a *targets_p,
1104 * converting them to UTF-8, followed by targets from @a known_targets
1105 * (which might come from, for example, the "--targets" command line option).
1107 * Process each target in one of the following ways. For a repository-
1108 * relative URL: resolve to a full URL, contacting the repository if
1109 * necessary to do so, and then treat as a full URL. For a URL: do some
1110 * IRI-to-URI encoding and some auto-escaping, and canonicalize. For a
1111 * local path: canonicalize case and path separators.
1113 * If @a keep_last_origpath_on_truepath_collision is TRUE, and there are
1114 * exactly two targets which both case-canonicalize to the same path, the last
1115 * target will be returned in the original non-case-canonicalized form.
1117 * Allocate @a *targets_p and its elements in @a pool.
1119 * @a ctx is required for possible repository authentication.
1121 * If a path has the same name as a Subversion working copy
1122 * administrative directory, return #SVN_ERR_RESERVED_FILENAME_SPECIFIED;
1123 * if multiple reserved paths are encountered, return a chain of
1124 * errors, all of which are #SVN_ERR_RESERVED_FILENAME_SPECIFIED. Do
1125 * not return this type of error in a chain with any other type of
1126 * error, and if this is the only type of error encountered, complete
1127 * the operation before returning the error(s).
1129 * Return an error if a target is just a peg specifier with no path, such as
1130 * "@abc". Before v1.6.5 (r878062) this form was interpreted as a literal path;
1131 * it is now ambiguous. The form "@abc@" should now be used to refer to the
1132 * literal path "@abc" with no peg revision, or the form ".@abc" to refer to
1133 * the empty path with peg revision "abc".
1138 svn_client_args_to_target_array2(apr_array_header_t **targets_p,
1140 const apr_array_header_t *known_targets,
1141 svn_client_ctx_t *ctx,
1142 svn_boolean_t keep_last_origpath_on_truepath_collision,
1146 * Similar to svn_client_args_to_target_array2() but with
1147 * @a keep_last_origpath_on_truepath_collision always set to FALSE.
1149 * @since Since 1.6.5, this returns an error if a path contains a peg
1150 * specifier with no path before it, such as "@abc".
1152 * @deprecated Provided for backward compatibility with the 1.6 API.
1156 svn_client_args_to_target_array(apr_array_header_t **targets_p,
1158 const apr_array_header_t *known_targets,
1159 svn_client_ctx_t *ctx,
1162 /** @} group end: Client command-line processing */
1167 * Client working copy management functions
1169 * @defgroup clnt_wc Client working copy management
1175 * @defgroup clnt_wc_checkout Checkout
1182 * Checkout a working copy from a repository.
1184 * @param[out] result_rev If non-NULL, the value of the revision checked
1185 * out from the repository.
1186 * @param[in] URL The repository URL of the checkout source.
1187 * @param[in] path The root of the new working copy.
1188 * @param[in] peg_revision The peg revision.
1189 * @param[in] revision The operative revision.
1190 * @param[in] depth The depth of the operation. If #svn_depth_unknown,
1191 * then behave as if for #svn_depth_infinity, except in the case
1192 * of resuming a previous checkout of @a path (i.e., updating),
1193 * in which case use the depth of the existing working copy.
1194 * @param[in] ignore_externals If @c TRUE, don't process externals
1195 * definitions as part of this operation.
1196 * @param[in] allow_unver_obstructions If @c TRUE, then tolerate existing
1197 * unversioned items that obstruct incoming paths. Only
1198 * obstructions of the same type (file or dir) as the added
1199 * item are tolerated. The text of obstructing files is left
1200 * as-is, effectively treating it as a user modification after
1201 * the checkout. Working properties of obstructing items are
1202 * set equal to the base properties. <br>
1203 * If @c FALSE, then abort if there are any unversioned
1204 * obstructing items.
1205 * @param[in] ctx The standard client context, used for authentication and
1207 * @param[in] pool Used for any temporary allocation.
1209 * @return A pointer to an #svn_error_t of the type (this list is not
1211 * #SVN_ERR_UNSUPPORTED_FEATURE if @a URL refers to a file rather
1212 * than a directory; <br>
1213 * #SVN_ERR_RA_ILLEGAL_URL if @a URL does not exist; <br>
1214 * #SVN_ERR_CLIENT_BAD_REVISION if @a revision is not one of
1215 * #svn_opt_revision_number, #svn_opt_revision_head, or
1216 * #svn_opt_revision_date. <br>
1217 * If no error occurred, return #SVN_NO_ERROR.
1219 * @since New in 1.5.
1221 * @see #svn_depth_t <br> #svn_client_ctx_t <br> @ref clnt_revisions for
1222 * a discussion of operative and peg revisions.
1225 svn_client_checkout3(svn_revnum_t *result_rev,
1228 const svn_opt_revision_t *peg_revision,
1229 const svn_opt_revision_t *revision,
1231 svn_boolean_t ignore_externals,
1232 svn_boolean_t allow_unver_obstructions,
1233 svn_client_ctx_t *ctx,
1238 * Similar to svn_client_checkout3() but with @a allow_unver_obstructions
1239 * always set to FALSE, and @a depth set according to @a recurse: if
1240 * @a recurse is TRUE, @a depth is #svn_depth_infinity, if @a recurse
1241 * is FALSE, @a depth is #svn_depth_files.
1243 * @deprecated Provided for backward compatibility with the 1.4 API.
1247 svn_client_checkout2(svn_revnum_t *result_rev,
1250 const svn_opt_revision_t *peg_revision,
1251 const svn_opt_revision_t *revision,
1252 svn_boolean_t recurse,
1253 svn_boolean_t ignore_externals,
1254 svn_client_ctx_t *ctx,
1259 * Similar to svn_client_checkout2(), but with @a peg_revision
1260 * always set to #svn_opt_revision_unspecified and
1261 * @a ignore_externals always set to FALSE.
1263 * @deprecated Provided for backward compatibility with the 1.1 API.
1267 svn_client_checkout(svn_revnum_t *result_rev,
1270 const svn_opt_revision_t *revision,
1271 svn_boolean_t recurse,
1272 svn_client_ctx_t *ctx,
1277 * @defgroup Update Bring a working copy up-to-date with a repository
1284 * Update working trees @a paths to @a revision, authenticating with the
1285 * authentication baton cached in @a ctx. @a paths is an array of const
1286 * char * paths to be updated. Unversioned paths that are direct children
1287 * of a versioned path will cause an update that attempts to add that path;
1288 * other unversioned paths are skipped. If @a result_revs is not NULL,
1289 * @a *result_revs will be set to an array of svn_revnum_t with each
1290 * element set to the revision to which @a revision was resolved for the
1291 * corresponding element of @a paths.
1293 * @a revision must be of kind #svn_opt_revision_number,
1294 * #svn_opt_revision_head, or #svn_opt_revision_date. If @a
1295 * revision does not meet these requirements, return the error
1296 * #SVN_ERR_CLIENT_BAD_REVISION.
1298 * The paths in @a paths can be from multiple working copies from multiple
1299 * repositories, but even if they all come from the same repository there
1300 * is no guarantee that revision represented by #svn_opt_revision_head
1301 * will remain the same as each path is updated.
1303 * If @a ignore_externals is set, don't process externals definitions
1304 * as part of this operation.
1306 * If @a depth is #svn_depth_infinity, update fully recursively.
1307 * Else if it is #svn_depth_immediates or #svn_depth_files, update
1308 * each target and its file entries, but not its subdirectories. Else
1309 * if #svn_depth_empty, update exactly each target, nonrecursively
1310 * (essentially, update the target's properties).
1312 * If @a depth is #svn_depth_unknown, take the working depth from
1313 * @a paths and then behave as described above.
1315 * If @a depth_is_sticky is set and @a depth is not
1316 * #svn_depth_unknown, then in addition to updating PATHS, also set
1317 * their sticky ambient depth value to @a depth.
1319 * If @a allow_unver_obstructions is TRUE then the update tolerates
1320 * existing unversioned items that obstruct added paths. Only
1321 * obstructions of the same type (file or dir) as the added item are
1322 * tolerated. The text of obstructing files is left as-is, effectively
1323 * treating it as a user modification after the update. Working
1324 * properties of obstructing items are set equal to the base properties.
1325 * If @a allow_unver_obstructions is FALSE then the update will abort
1326 * if there are any unversioned obstructing items.
1328 * If @a adds_as_modification is TRUE, a local addition at the same path
1329 * as an incoming addition of the same node kind results in a normal node
1330 * with a possible local modification, instead of a tree conflict.
1332 * If @a make_parents is TRUE, create any non-existent parent
1333 * directories also by checking them out at depth=empty.
1335 * If @a ctx->notify_func2 is non-NULL, invoke @a ctx->notify_func2 with
1336 * @a ctx->notify_baton2 for each item handled by the update, and also for
1337 * files restored from text-base. If @a ctx->cancel_func is non-NULL, invoke
1338 * it passing @a ctx->cancel_baton at various places during the update.
1340 * Use @a pool for any temporary allocation.
1342 * @todo Multiple Targets
1343 * - Up for debate: an update on multiple targets is *not* atomic.
1344 * Right now, svn_client_update only takes one path. What's
1345 * debatable is whether this should ever change. On the one hand,
1346 * it's kind of losing to have the client application loop over
1347 * targets and call svn_client_update() on each one; each call to
1348 * update initializes a whole new repository session (network
1349 * overhead, etc.) On the other hand, it's a very simple
1350 * implementation, and allows for the possibility that different
1351 * targets may come from different repositories.
1353 * @since New in 1.7.
1356 svn_client_update4(apr_array_header_t **result_revs,
1357 const apr_array_header_t *paths,
1358 const svn_opt_revision_t *revision,
1360 svn_boolean_t depth_is_sticky,
1361 svn_boolean_t ignore_externals,
1362 svn_boolean_t allow_unver_obstructions,
1363 svn_boolean_t adds_as_modification,
1364 svn_boolean_t make_parents,
1365 svn_client_ctx_t *ctx,
1369 * Similar to svn_client_update4() but with @a make_parents always set
1370 * to FALSE and @a adds_as_modification set to TRUE.
1372 * @deprecated Provided for backward compatibility with the 1.6 API.
1373 * @since New in 1.5.
1377 svn_client_update3(apr_array_header_t **result_revs,
1378 const apr_array_header_t *paths,
1379 const svn_opt_revision_t *revision,
1381 svn_boolean_t depth_is_sticky,
1382 svn_boolean_t ignore_externals,
1383 svn_boolean_t allow_unver_obstructions,
1384 svn_client_ctx_t *ctx,
1388 * Similar to svn_client_update3() but with @a allow_unver_obstructions
1389 * always set to FALSE, @a depth_is_sticky to FALSE, and @a depth set
1390 * according to @a recurse: if @a recurse is TRUE, set @a depth to
1391 * #svn_depth_infinity, if @a recurse is FALSE, set @a depth to
1394 * @deprecated Provided for backward compatibility with the 1.4 API.
1398 svn_client_update2(apr_array_header_t **result_revs,
1399 const apr_array_header_t *paths,
1400 const svn_opt_revision_t *revision,
1401 svn_boolean_t recurse,
1402 svn_boolean_t ignore_externals,
1403 svn_client_ctx_t *ctx,
1407 * Similar to svn_client_update2() except that it accepts only a single
1408 * target in @a path, returns a single revision if @a result_rev is
1409 * not NULL, and @a ignore_externals is always set to FALSE.
1411 * @deprecated Provided for backward compatibility with the 1.1 API.
1415 svn_client_update(svn_revnum_t *result_rev,
1417 const svn_opt_revision_t *revision,
1418 svn_boolean_t recurse,
1419 svn_client_ctx_t *ctx,
1424 * @defgroup Switch Switch a working copy to another location.
1430 * Switch an existing working copy directory to a different repository
1433 * This is normally used to switch a working copy directory over to another
1434 * line of development, such as a branch or a tag. Switching an existing
1435 * working copy directory is more efficient than checking out @a url from
1438 * @param[out] result_rev If non-NULL, the value of the revision to which
1439 * the working copy was actually switched.
1440 * @param[in] path The directory to be switched. This need not be the
1441 * root of a working copy.
1442 * @param[in] url The repository URL to switch to.
1443 * @param[in] peg_revision The peg revision.
1444 * @param[in] revision The operative revision.
1445 * @param[in] depth The depth of the operation. If #svn_depth_infinity,
1446 * switch fully recursively. Else if #svn_depth_immediates,
1447 * switch @a path and its file children (if any), and
1448 * switch subdirectories but do not update them. Else if
1449 * #svn_depth_files, switch just file children, ignoring
1450 * subdirectories completely. Else if #svn_depth_empty,
1451 * switch just @a path and touch nothing underneath it.
1452 * @param[in] depth_is_sticky If @c TRUE, and @a depth is not
1453 * #svn_depth_unknown, then in addition to switching @a path, also
1454 * set its sticky ambient depth value to @a depth.
1455 * @param[in] ignore_externals If @c TRUE, don't process externals
1456 * definitions as part of this operation.
1457 * @param[in] allow_unver_obstructions If @c TRUE, then tolerate existing
1458 * unversioned items that obstruct incoming paths. Only
1459 * obstructions of the same type (file or dir) as the added
1460 * item are tolerated. The text of obstructing files is left
1461 * as-is, effectively treating it as a user modification after
1462 * the checkout. Working properties of obstructing items are
1463 * set equal to the base properties. <br>
1464 * If @c FALSE, then abort if there are any unversioned
1465 * obstructing items.
1466 * @param[in] ignore_ancestry If @c FALSE, then verify that the file
1467 * or directory at @a path shares some common version control
1468 * ancestry with the switch URL location (represented by the
1469 * combination of @a url, @a peg_revision, and @a revision),
1470 * and returning #SVN_ERR_CLIENT_UNRELATED_RESOURCES if they
1471 * do not. If @c TRUE, no such sanity checks are performed.
1473 * @param[in] ctx The standard client context, used for authentication and
1474 * notification. The notifier is invoked for paths affected by
1475 * the switch, and also for files which may be restored from the
1476 * pristine store after being previously removed from the working
1478 * @param[in] pool Used for any temporary allocation.
1480 * @return A pointer to an #svn_error_t of the type (this list is not
1482 * #SVN_ERR_CLIENT_BAD_REVISION if @a revision is not one of
1483 * #svn_opt_revision_number, #svn_opt_revision_head, or
1484 * #svn_opt_revision_date. <br>
1485 * If no error occurred, return #SVN_NO_ERROR.
1487 * @since New in 1.7.
1489 * @see #svn_depth_t <br> #svn_client_ctx_t <br> @ref clnt_revisions for
1490 * a discussion of operative and peg revisions.
1493 svn_client_switch3(svn_revnum_t *result_rev,
1496 const svn_opt_revision_t *peg_revision,
1497 const svn_opt_revision_t *revision,
1499 svn_boolean_t depth_is_sticky,
1500 svn_boolean_t ignore_externals,
1501 svn_boolean_t allow_unver_obstructions,
1502 svn_boolean_t ignore_ancestry,
1503 svn_client_ctx_t *ctx,
1508 * Similar to svn_client_switch3() but with @a ignore_ancestry always
1511 * @since New in 1.5.
1512 * @deprecated Provided for backward compatibility with the 1.4 API.
1516 svn_client_switch2(svn_revnum_t *result_rev,
1519 const svn_opt_revision_t *peg_revision,
1520 const svn_opt_revision_t *revision,
1522 svn_boolean_t depth_is_sticky,
1523 svn_boolean_t ignore_externals,
1524 svn_boolean_t allow_unver_obstructions,
1525 svn_client_ctx_t *ctx,
1530 * Similar to svn_client_switch2() but with @a allow_unver_obstructions,
1531 * @a ignore_externals, and @a depth_is_sticky always set to FALSE,
1532 * and @a depth set according to @a recurse: if @a recurse is TRUE,
1533 * set @a depth to #svn_depth_infinity, if @a recurse is FALSE, set
1534 * @a depth to #svn_depth_files.
1536 * @deprecated Provided for backward compatibility with the 1.4 API.
1540 svn_client_switch(svn_revnum_t *result_rev,
1543 const svn_opt_revision_t *revision,
1544 svn_boolean_t recurse,
1545 svn_client_ctx_t *ctx,
1551 * @defgroup Add Begin versioning files/directories in a working copy.
1557 * Schedule a working copy @a path for addition to the repository.
1559 * If @a depth is #svn_depth_empty, add just @a path and nothing
1560 * below it. If #svn_depth_files, add @a path and any file
1561 * children of @a path. If #svn_depth_immediates, add @a path, any
1562 * file children, and any immediate subdirectories (but nothing
1563 * underneath those subdirectories). If #svn_depth_infinity, add
1564 * @a path and everything under it fully recursively.
1566 * @a path's parent must be under revision control already (unless
1567 * @a add_parents is TRUE), but @a path is not.
1569 * If @a force is not set and @a path is already under version
1570 * control, return the error #SVN_ERR_ENTRY_EXISTS. If @a force is
1571 * set, do not error on already-versioned items. When used on a
1572 * directory in conjunction with a @a depth value greater than
1573 * #svn_depth_empty, this has the effect of scheduling for addition
1574 * any unversioned files and directories scattered within even a
1575 * versioned tree (up to @a depth).
1577 * If @a ctx->notify_func2 is non-NULL, then for each added item, call
1578 * @a ctx->notify_func2 with @a ctx->notify_baton2 and the path of the
1581 * If @a no_ignore is FALSE, don't add any file or directory (or recurse
1582 * into any directory) that is unversioned and found by recursion (as
1583 * opposed to being the explicit target @a path) and whose name matches the
1584 * svn:ignore property on its parent directory or the global-ignores list in
1585 * @a ctx->config. If @a no_ignore is TRUE, do include such files and
1586 * directories. (Note that an svn:ignore property can influence this
1587 * behaviour only when recursing into an already versioned directory with @a
1590 * If @a no_autoprops is TRUE, don't set any autoprops on added files. If
1591 * @a no_autoprops is FALSE then all added files have autprops set as per
1592 * the auto-props list in @a ctx->config and the value of any
1593 * @c SVN_PROP_INHERITABLE_AUTO_PROPS properties inherited by the nearest
1594 * parents of @a path which are already under version control.
1596 * If @a add_parents is TRUE, recurse up @a path's directory and look for
1597 * a versioned directory. If found, add all intermediate paths between it
1598 * and @a path. If not found, return #SVN_ERR_CLIENT_NO_VERSIONED_PARENT.
1600 * @a scratch_pool is used for temporary allocations only.
1603 * This is a *scheduling* operation. No changes will
1604 * happen to the repository until a commit occurs. This scheduling
1605 * can be removed with svn_client_revert2().
1607 * @since New in 1.8.
1610 svn_client_add5(const char *path,
1612 svn_boolean_t force,
1613 svn_boolean_t no_ignore,
1614 svn_boolean_t no_autoprops,
1615 svn_boolean_t add_parents,
1616 svn_client_ctx_t *ctx,
1617 apr_pool_t *scratch_pool);
1620 * Similar to svn_client_add5(), but with @a no_autoprops always set to
1623 * @deprecated Provided for backward compatibility with the 1.7 API.
1627 svn_client_add4(const char *path,
1629 svn_boolean_t force,
1630 svn_boolean_t no_ignore,
1631 svn_boolean_t add_parents,
1632 svn_client_ctx_t *ctx,
1636 * Similar to svn_client_add4(), but with @a add_parents always set to
1637 * FALSE and @a depth set according to @a recursive: if TRUE, then
1638 * @a depth is #svn_depth_infinity, if FALSE, then #svn_depth_empty.
1640 * @deprecated Provided for backward compatibility with the 1.4 API.
1644 svn_client_add3(const char *path,
1645 svn_boolean_t recursive,
1646 svn_boolean_t force,
1647 svn_boolean_t no_ignore,
1648 svn_client_ctx_t *ctx,
1652 * Similar to svn_client_add3(), but with @a no_ignore always set to
1655 * @deprecated Provided for backward compatibility with the 1.2 API.
1659 svn_client_add2(const char *path,
1660 svn_boolean_t recursive,
1661 svn_boolean_t force,
1662 svn_client_ctx_t *ctx,
1666 * Similar to svn_client_add2(), but with @a force always set to FALSE.
1668 * @deprecated Provided for backward compatibility with the 1.0 API.
1672 svn_client_add(const char *path,
1673 svn_boolean_t recursive,
1674 svn_client_ctx_t *ctx,
1680 * @defgroup Mkdir Create directories in a working copy or repository.
1685 /** Create a directory, either in a repository or a working copy.
1687 * @a paths is an array of (const char *) paths, either all local WC paths
1690 * If @a paths contains URLs, use the authentication baton in @a ctx
1691 * and @a message to immediately attempt to commit the creation of the
1692 * directories in @a paths in the repository.
1694 * Else, create the directories on disk, and attempt to schedule them
1695 * for addition (using svn_client_add(), whose docstring you should
1698 * If @a make_parents is TRUE, create any non-existent parent directories
1701 * If non-NULL, @a revprop_table is a hash table holding additional,
1702 * custom revision properties (<tt>const char *</tt> names mapped to
1703 * <tt>svn_string_t *</tt> values) to be set on the new revision in
1704 * the event that this is a committing operation. This table cannot
1705 * contain any standard Subversion properties.
1707 * @a ctx->log_msg_func3/@a ctx->log_msg_baton3 are a callback/baton
1708 * combo that this function can use to query for a commit log message
1709 * when one is needed.
1711 * If @a ctx->notify_func2 is non-NULL, when the directory has been created
1712 * (successfully) in the working copy, call @a ctx->notify_func2 with
1713 * @a ctx->notify_baton2 and the path of the new directory. Note that this is
1714 * only called for items added to the working copy.
1716 * If @a commit_callback is non-NULL, then for each successful commit, call
1717 * @a commit_callback with @a commit_baton and a #svn_commit_info_t for
1720 * @since New in 1.7.
1723 svn_client_mkdir4(const apr_array_header_t *paths,
1724 svn_boolean_t make_parents,
1725 const apr_hash_t *revprop_table,
1726 svn_commit_callback2_t commit_callback,
1728 svn_client_ctx_t *ctx,
1732 * Similar to svn_client_mkdir4(), but returns the commit info in
1733 * @a *commit_info_p rather than through a callback function.
1735 * @since New in 1.5.
1736 * @deprecated Provided for backward compatibility with the 1.6 API.
1740 svn_client_mkdir3(svn_commit_info_t **commit_info_p,
1741 const apr_array_header_t *paths,
1742 svn_boolean_t make_parents,
1743 const apr_hash_t *revprop_table,
1744 svn_client_ctx_t *ctx,
1749 * Same as svn_client_mkdir3(), but with @a make_parents always FALSE,
1750 * and @a revprop_table always NULL.
1752 * @since New in 1.3.
1753 * @deprecated Provided for backward compatibility with the 1.4 API.
1757 svn_client_mkdir2(svn_commit_info_t **commit_info_p,
1758 const apr_array_header_t *paths,
1759 svn_client_ctx_t *ctx,
1763 * Same as svn_client_mkdir2(), but takes the #svn_client_commit_info_t
1764 * type for @a commit_info_p.
1766 * @deprecated Provided for backward compatibility with the 1.2 API.
1770 svn_client_mkdir(svn_client_commit_info_t **commit_info_p,
1771 const apr_array_header_t *paths,
1772 svn_client_ctx_t *ctx,
1778 * @defgroup Delete Remove files/directories from a working copy or repository.
1783 /** Delete items from a repository or working copy.
1785 * @a paths is an array of (const char *) paths, either all local WC paths
1788 * If the paths in @a paths are URLs, use the authentication baton in
1789 * @a ctx and @a ctx->log_msg_func3/@a ctx->log_msg_baton3 to
1790 * immediately attempt to commit a deletion of the URLs from the
1791 * repository. Every path must belong to the same repository.
1793 * Else, schedule the working copy paths in @a paths for removal from
1794 * the repository. Each path's parent must be under revision control.
1795 * This is just a *scheduling* operation. No changes will happen to
1796 * the repository until a commit occurs. This scheduling can be
1797 * removed with svn_client_revert2(). If a path is a file it is
1798 * immediately removed from the working copy. If the path is a
1799 * directory it will remain in the working copy but all the files, and
1800 * all unversioned items, it contains will be removed. If @a force is
1801 * not set then this operation will fail if any path contains locally
1802 * modified and/or unversioned items. If @a force is set such items
1805 * If the paths are working copy paths and @a keep_local is TRUE then
1806 * the paths will not be removed from the working copy, only scheduled
1807 * for removal from the repository. Once the scheduled deletion is
1808 * committed, they will appear as unversioned paths in the working copy.
1810 * If non-NULL, @a revprop_table is a hash table holding additional,
1811 * custom revision properties (<tt>const char *</tt> names mapped to
1812 * <tt>svn_string_t *</tt> values) to be set on the new revision in
1813 * the event that this is a committing operation. This table cannot
1814 * contain any standard Subversion properties.
1816 * @a ctx->log_msg_func3/@a ctx->log_msg_baton3 are a callback/baton
1817 * combo that this function can use to query for a commit log message
1818 * when one is needed.
1820 * If @a ctx->notify_func2 is non-NULL, then for each item deleted, call
1821 * @a ctx->notify_func2 with @a ctx->notify_baton2 and the path of the deleted
1824 * If @a commit_callback is non-NULL, then for each successful commit, call
1825 * @a commit_callback with @a commit_baton and a #svn_commit_info_t for
1828 * @since New in 1.7.
1831 svn_client_delete4(const apr_array_header_t *paths,
1832 svn_boolean_t force,
1833 svn_boolean_t keep_local,
1834 const apr_hash_t *revprop_table,
1835 svn_commit_callback2_t commit_callback,
1837 svn_client_ctx_t *ctx,
1841 * Similar to svn_client_delete4(), but returns the commit info in
1842 * @a *commit_info_p rather than through a callback function.
1844 * @since New in 1.5.
1845 * @deprecated Provided for backward compatibility with the 1.6 API.
1849 svn_client_delete3(svn_commit_info_t **commit_info_p,
1850 const apr_array_header_t *paths,
1851 svn_boolean_t force,
1852 svn_boolean_t keep_local,
1853 const apr_hash_t *revprop_table,
1854 svn_client_ctx_t *ctx,
1858 * Similar to svn_client_delete3(), but with @a keep_local always set
1859 * to FALSE, and @a revprop_table passed as NULL.
1861 * @deprecated Provided for backward compatibility with the 1.4 API.
1865 svn_client_delete2(svn_commit_info_t **commit_info_p,
1866 const apr_array_header_t *paths,
1867 svn_boolean_t force,
1868 svn_client_ctx_t *ctx,
1872 * Similar to svn_client_delete2(), but takes the #svn_client_commit_info_t
1873 * type for @a commit_info_p.
1875 * @deprecated Provided for backward compatibility with the 1.2 API.
1879 svn_client_delete(svn_client_commit_info_t **commit_info_p,
1880 const apr_array_header_t *paths,
1881 svn_boolean_t force,
1882 svn_client_ctx_t *ctx,
1889 * @defgroup Import Import files into the repository.
1895 * The callback invoked by svn_client_import5() before adding a node to the
1896 * list of nodes to be imported.
1898 * @a baton is the value passed to @a svn_client_import5 as filter_baton.
1900 * The callback receives the @a local_abspath for each node and the @a dirent
1901 * for it when walking the directory tree. Only the kind of node, including
1902 * special status is available in @a dirent.
1904 * Implementations can set @a *filtered to TRUE, to make the import
1905 * process omit the node and (if the node is a directory) all its
1908 * @a scratch_pool can be used for temporary allocations.
1910 * @since New in 1.8.
1912 typedef svn_error_t *(*svn_client_import_filter_func_t)(
1914 svn_boolean_t *filtered,
1915 const char *local_abspath,
1916 const svn_io_dirent2_t *dirent,
1917 apr_pool_t *scratch_pool);
1919 /** Import file or directory @a path into repository directory @a url at
1920 * head, authenticating with the authentication baton cached in @a ctx,
1921 * and using @a ctx->log_msg_func3/@a ctx->log_msg_baton3 to get a log message
1922 * for the (implied) commit. If some components of @a url do not exist
1923 * then create parent directories as necessary.
1925 * This function reads an unversioned tree from disk and skips any ".svn"
1926 * directories. Even if a file or directory being imported is part of an
1927 * existing WC, this function sees it as unversioned and does not notice any
1928 * existing Subversion properties in it.
1930 * If @a path is a directory, the contents of that directory are
1931 * imported directly into the directory identified by @a url. Note that the
1932 * directory @a path itself is not imported -- that is, the basename of
1933 * @a path is not part of the import.
1935 * If @a path is a file, then the dirname of @a url is the directory
1936 * receiving the import. The basename of @a url is the filename in the
1937 * repository. In this case if @a url already exists, return error.
1939 * If @a ctx->notify_func2 is non-NULL, then call @a ctx->notify_func2 with
1940 * @a ctx->notify_baton2 as the import progresses, with any of the following
1941 * actions: #svn_wc_notify_commit_added,
1942 * #svn_wc_notify_commit_postfix_txdelta.
1944 * Use @a scratch_pool for any temporary allocation.
1946 * If non-NULL, @a revprop_table is a hash table holding additional,
1947 * custom revision properties (<tt>const char *</tt> names mapped to
1948 * <tt>svn_string_t *</tt> values) to be set on the new revision.
1949 * This table cannot contain any standard Subversion properties.
1951 * @a ctx->log_msg_func3/@a ctx->log_msg_baton3 are a callback/baton
1952 * combo that this function can use to query for a commit log message
1953 * when one is needed.
1955 * If @a depth is #svn_depth_empty, import just @a path and nothing
1956 * below it. If #svn_depth_files, import @a path and any file
1957 * children of @a path. If #svn_depth_immediates, import @a path, any
1958 * file children, and any immediate subdirectories (but nothing
1959 * underneath those subdirectories). If #svn_depth_infinity, import
1960 * @a path and everything under it fully recursively.
1962 * If @a no_ignore is @c FALSE, don't import any file or directory (or
1963 * recurse into any directory) that is found by recursion (as opposed to
1964 * being the explicit target @a path) and whose name matches the
1965 * global-ignores list in @a ctx->config. If @a no_ignore is @c TRUE, do
1966 * include such files and directories. (Note that svn:ignore properties are
1967 * not involved, as auto-props cannot set properties on directories and even
1968 * if the target is part of a WC the import ignores any existing
1971 * If @a no_autoprops is TRUE, don't set any autoprops on imported files. If
1972 * @a no_autoprops is FALSE then all imported files have autprops set as per
1973 * the auto-props list in @a ctx->config and the value of any
1974 * @c SVN_PROP_INHERITABLE_AUTO_PROPS properties inherited by and explicitly set
1975 * on @a url if @a url is already under versioned control, or the nearest parents
1976 * of @a path which are already under version control if not.
1978 * If @a ignore_unknown_node_types is @c FALSE, ignore files of which the
1979 * node type is unknown, such as device files and pipes.
1981 * If @a filter_callback is non-NULL, call it for each node that isn't ignored
1982 * for other reasons with @a filter_baton, to allow third party to ignore
1983 * specific nodes during importing.
1985 * If @a commit_callback is non-NULL, then for each successful commit, call
1986 * @a commit_callback with @a commit_baton and a #svn_commit_info_t for
1989 * @since New in 1.8.
1992 svn_client_import5(const char *path,
1995 svn_boolean_t no_ignore,
1996 svn_boolean_t no_autoprops,
1997 svn_boolean_t ignore_unknown_node_types,
1998 const apr_hash_t *revprop_table,
1999 svn_client_import_filter_func_t filter_callback,
2001 svn_commit_callback2_t commit_callback,
2003 svn_client_ctx_t *ctx,
2004 apr_pool_t *scratch_pool);
2007 * Similar to svn_client_import5(), but without support for an optional
2008 * @a filter_callback and @a no_autoprops always set to FALSE.
2010 * @since New in 1.7.
2011 * @deprecated Provided for backward compatibility with the 1.7 API.
2015 svn_client_import4(const char *path,
2018 svn_boolean_t no_ignore,
2019 svn_boolean_t ignore_unknown_node_types,
2020 const apr_hash_t *revprop_table,
2021 svn_commit_callback2_t commit_callback,
2023 svn_client_ctx_t *ctx,
2027 * Similar to svn_client_import4(), but returns the commit info in
2028 * @a *commit_info_p rather than through a callback function.
2030 * @since New in 1.5.
2031 * @deprecated Provided for backward compatibility with the 1.6 API.
2035 svn_client_import3(svn_commit_info_t **commit_info_p,
2039 svn_boolean_t no_ignore,
2040 svn_boolean_t ignore_unknown_node_types,
2041 const apr_hash_t *revprop_table,
2042 svn_client_ctx_t *ctx,
2046 * Similar to svn_client_import3(), but with @a ignore_unknown_node_types
2047 * always set to @c FALSE, @a revprop_table passed as NULL, and @a
2048 * depth set according to @a nonrecursive: if TRUE, then @a depth is
2049 * #svn_depth_files, else #svn_depth_infinity.
2051 * @since New in 1.3.
2053 * @deprecated Provided for backward compatibility with the 1.4 API
2057 svn_client_import2(svn_commit_info_t **commit_info_p,
2060 svn_boolean_t nonrecursive,
2061 svn_boolean_t no_ignore,
2062 svn_client_ctx_t *ctx,
2066 * Similar to svn_client_import2(), but with @a no_ignore always set
2067 * to FALSE and using the #svn_client_commit_info_t type for
2070 * @deprecated Provided for backward compatibility with the 1.2 API.
2074 svn_client_import(svn_client_commit_info_t **commit_info_p,
2077 svn_boolean_t nonrecursive,
2078 svn_client_ctx_t *ctx,
2084 * @defgroup Commit Commit local modifications to the repository.
2090 * Commit files or directories into repository, authenticating with
2091 * the authentication baton cached in @a ctx, and using
2092 * @a ctx->log_msg_func3/@a ctx->log_msg_baton3 to obtain the log message.
2093 * Set @a *commit_info_p to the results of the commit, allocated in @a pool.
2095 * @a targets is an array of <tt>const char *</tt> paths to commit. They
2096 * need not be canonicalized nor condensed; this function will take care of
2097 * that. If @a targets has zero elements, then do nothing and return
2098 * immediately without error.
2100 * If non-NULL, @a revprop_table is a hash table holding additional,
2101 * custom revision properties (<tt>const char *</tt> names mapped to
2102 * <tt>svn_string_t *</tt> values) to be set on the new revision.
2103 * This table cannot contain any standard Subversion properties.
2105 * If @a ctx->notify_func2 is non-NULL, then call @a ctx->notify_func2 with
2106 * @a ctx->notify_baton2 as the commit progresses, with any of the following
2107 * actions: #svn_wc_notify_commit_modified, #svn_wc_notify_commit_added,
2108 * #svn_wc_notify_commit_deleted, #svn_wc_notify_commit_replaced,
2109 * #svn_wc_notify_commit_copied, #svn_wc_notify_commit_copied_replaced,
2110 * #svn_wc_notify_commit_postfix_txdelta.
2112 * If @a depth is #svn_depth_infinity, commit all changes to and
2113 * below named targets. If @a depth is #svn_depth_empty, commit
2114 * only named targets (that is, only property changes on named
2115 * directory targets, and property and content changes for named file
2116 * targets). If @a depth is #svn_depth_files, behave as above for
2117 * named file targets, and for named directory targets, commit
2118 * property changes on a named directory and all changes to files
2119 * directly inside that directory. If #svn_depth_immediates, behave
2120 * as for #svn_depth_files, and for subdirectories of any named
2121 * directory target commit as though for #svn_depth_empty.
2123 * Unlock paths in the repository, unless @a keep_locks is TRUE.
2125 * @a changelists is an array of <tt>const char *</tt> changelist
2126 * names, used as a restrictive filter on items that are committed;
2127 * that is, don't commit anything unless it's a member of one of those
2128 * changelists. After the commit completes successfully, remove
2129 * changelist associations from the targets, unless @a
2130 * keep_changelists is set. If @a changelists is
2131 * empty (or altogether @c NULL), no changelist filtering occurs.
2133 * If @a commit_as_operations is set to FALSE, when a copy is committed
2134 * all changes below the copy are always committed at the same time
2135 * (independent of the value of @a depth). If @a commit_as_operations is
2136 * #TRUE, changes to descendants are only committed if they are itself
2137 * included via @a depth and targets.
2139 * If @a include_file_externals and/or @a include_dir_externals are #TRUE,
2140 * also commit all file and/or dir externals (respectively) that are reached
2141 * by recursion, except for those externals which:
2142 * - have a fixed revision, or
2143 * - come from a different repository root URL (dir externals).
2144 * These flags affect only recursion; externals that directly appear in @a
2145 * targets are always included in the commit.
2147 * ### TODO: currently, file externals hidden inside an unversioned dir are
2148 * skipped deliberately, because we can't commit those yet.
2149 * See STMT_SELECT_COMMITTABLE_EXTERNALS_BELOW.
2151 * ### TODO: With @c depth_immediates, this function acts as if
2152 * @a include_dir_externals was passed #FALSE, but caller expects
2153 * immediate child dir externals to be included @c depth_empty.
2155 * When @a commit_as_operations is #TRUE it is possible to delete a node and
2156 * all its descendants by selecting just the root of the deletion. If it is
2157 * set to #FALSE this will raise an error.
2159 * If @a commit_callback is non-NULL, then for each successful commit, call
2160 * @a commit_callback with @a commit_baton and a #svn_commit_info_t for
2163 * @note #svn_depth_unknown and #svn_depth_exclude must not be passed
2166 * Use @a pool for any temporary allocations.
2168 * @since New in 1.8.
2171 svn_client_commit6(const apr_array_header_t *targets,
2173 svn_boolean_t keep_locks,
2174 svn_boolean_t keep_changelists,
2175 svn_boolean_t commit_as_operations,
2176 svn_boolean_t include_file_externals,
2177 svn_boolean_t include_dir_externals,
2178 const apr_array_header_t *changelists,
2179 const apr_hash_t *revprop_table,
2180 svn_commit_callback2_t commit_callback,
2182 svn_client_ctx_t *ctx,
2186 * Similar to svn_client_commit6(), but passes @a include_file_externals as
2187 * FALSE and @a include_dir_externals as FALSE.
2189 * @since New in 1.7.
2190 * @deprecated Provided for backward compatibility with the 1.7 API.
2194 svn_client_commit5(const apr_array_header_t *targets,
2196 svn_boolean_t keep_locks,
2197 svn_boolean_t keep_changelists,
2198 svn_boolean_t commit_as_operations,
2199 const apr_array_header_t *changelists,
2200 const apr_hash_t *revprop_table,
2201 svn_commit_callback2_t commit_callback,
2203 svn_client_ctx_t *ctx,
2207 * Similar to svn_client_commit5(), but returns the commit info in
2208 * @a *commit_info_p rather than through a callback function. Does not use
2209 * #svn_wc_notify_commit_copied or #svn_wc_notify_commit_copied_replaced
2210 * (preferring #svn_wc_notify_commit_added and
2211 * #svn_wc_notify_commit_replaced, respectively, instead).
2213 * Also, if no error is returned and @a (*commit_info_p)->revision is set to
2214 * #SVN_INVALID_REVNUM, then the commit was a no-op; nothing needed to
2217 * Sets @a commit_as_operations to FALSE to match Subversion 1.6's behavior.
2219 * @since New in 1.5.
2220 * @deprecated Provided for backward compatibility with the 1.6 API.
2224 svn_client_commit4(svn_commit_info_t **commit_info_p,
2225 const apr_array_header_t *targets,
2227 svn_boolean_t keep_locks,
2228 svn_boolean_t keep_changelists,
2229 const apr_array_header_t *changelists,
2230 const apr_hash_t *revprop_table,
2231 svn_client_ctx_t *ctx,
2235 * Similar to svn_client_commit4(), but always with NULL for
2236 * @a changelist_name, FALSE for @a keep_changelist, NULL for @a
2237 * revprop_table, and @a depth set according to @a recurse: if @a
2238 * recurse is TRUE, use #svn_depth_infinity, else #svn_depth_empty.
2240 * @deprecated Provided for backward compatibility with the 1.4 API.
2242 * @since New in 1.3.
2246 svn_client_commit3(svn_commit_info_t **commit_info_p,
2247 const apr_array_header_t *targets,
2248 svn_boolean_t recurse,
2249 svn_boolean_t keep_locks,
2250 svn_client_ctx_t *ctx,
2254 * Similar to svn_client_commit3(), but uses #svn_client_commit_info_t
2255 * for @a commit_info_p.
2257 * @deprecated Provided for backward compatibility with the 1.2 API.
2259 * @since New in 1.2.
2263 svn_client_commit2(svn_client_commit_info_t **commit_info_p,
2264 const apr_array_header_t *targets,
2265 svn_boolean_t recurse,
2266 svn_boolean_t keep_locks,
2267 svn_client_ctx_t *ctx,
2271 * Similar to svn_client_commit2(), but with @a keep_locks set to
2272 * TRUE and @a nonrecursive instead of @a recurse.
2274 * @deprecated Provided for backward compatibility with the 1.1 API.
2278 svn_client_commit(svn_client_commit_info_t **commit_info_p,
2279 const apr_array_header_t *targets,
2280 svn_boolean_t nonrecursive,
2281 svn_client_ctx_t *ctx,
2287 * @defgroup Status Report interesting information about paths in the \
2294 * Structure for holding the "status" of a working copy item.
2296 * @note Fields may be added to the end of this structure in future
2297 * versions. Therefore, to preserve binary compatibility, users
2298 * should not directly allocate structures of this type.
2300 * @since New in 1.7.
2302 typedef struct svn_client_status_t
2304 /** The kind of node as recorded in the working copy */
2305 svn_node_kind_t kind;
2307 /** The absolute path to the node */
2308 const char *local_abspath;
2310 /** The actual size of the working file on disk, or SVN_INVALID_FILESIZE
2311 * if unknown (or if the item isn't a file at all). */
2312 svn_filesize_t filesize;
2314 /** If the path is under version control, versioned is TRUE, otherwise
2316 svn_boolean_t versioned;
2318 /** Set to TRUE if the node is the victim of some kind of conflict. */
2319 svn_boolean_t conflicted;
2321 /** The status of the node, based on the restructuring changes and if the
2322 * node has no restructuring changes the text and prop status. */
2323 enum svn_wc_status_kind node_status;
2325 /** The status of the text of the node, not including restructuring changes.
2326 * Valid values are: svn_wc_status_none, svn_wc_status_normal,
2327 * svn_wc_status_modified and svn_wc_status_conflicted. */
2328 enum svn_wc_status_kind text_status;
2330 /** The status of the node's properties.
2331 * Valid values are: svn_wc_status_none, svn_wc_status_normal,
2332 * svn_wc_status_modified and svn_wc_status_conflicted. */
2333 enum svn_wc_status_kind prop_status;
2335 /** A node can be 'locked' if a working copy update is in progress or
2336 * was interrupted. */
2337 svn_boolean_t wc_is_locked;
2339 /** A file or directory can be 'copied' if it's scheduled for
2340 * addition-with-history (or part of a subtree that is scheduled as such.).
2342 svn_boolean_t copied;
2344 /** The URL of the repository root. */
2345 const char *repos_root_url;
2347 /** The UUID of the repository */
2348 const char *repos_uuid;
2350 /** The in-repository path relative to the repository root. */
2351 const char *repos_relpath;
2353 /** Base revision. */
2354 svn_revnum_t revision;
2356 /** Last revision this was changed */
2357 svn_revnum_t changed_rev;
2359 /** Date of last commit. */
2360 apr_time_t changed_date;
2362 /** Last commit author of this item */
2363 const char *changed_author;
2365 /** A file or directory can be 'switched' if the switch command has been
2366 * used. If this is TRUE, then file_external will be FALSE.
2368 svn_boolean_t switched;
2370 /** If the item is a file that was added to the working copy with an
2371 * svn:externals; if file_external is TRUE, then switched is always
2374 svn_boolean_t file_external;
2376 /** The locally present lock. (Values of path, token, owner, comment and
2377 * are available if a lock is present) */
2378 const svn_lock_t *lock;
2380 /** Which changelist this item is part of, or NULL if not part of any. */
2381 const char *changelist;
2383 /** The depth of the node as recorded in the working copy
2384 * (#svn_depth_unknown for files or when no depth is recorded) */
2388 * @defgroup svn_wc_status_ood WC out-of-date info from the repository
2391 * When the working copy item is out-of-date compared to the
2392 * repository, the following fields represent the state of the
2393 * youngest revision of the item in the repository. If the working
2394 * copy is not out of date, the fields are initialized as described
2398 /** Set to the node kind of the youngest commit, or #svn_node_none
2399 * if not out of date. */
2400 svn_node_kind_t ood_kind;
2402 /** The status of the node, based on the text status if the node has no
2403 * restructuring changes */
2404 enum svn_wc_status_kind repos_node_status;
2406 /** The node's text status in the repository. */
2407 enum svn_wc_status_kind repos_text_status;
2409 /** The node's property status in the repository. */
2410 enum svn_wc_status_kind repos_prop_status;
2412 /** The node's lock in the repository, if any. */
2413 const svn_lock_t *repos_lock;
2415 /** Set to the youngest committed revision, or #SVN_INVALID_REVNUM
2416 * if not out of date. */
2417 svn_revnum_t ood_changed_rev;
2419 /** Set to the most recent commit date, or @c 0 if not out of date. */
2420 apr_time_t ood_changed_date;
2422 /** Set to the user name of the youngest commit, or @c NULL if not
2423 * out of date or non-existent. Because a non-existent @c
2424 * svn:author property has the same behavior as an out-of-date
2425 * working copy, examine @c ood_changed_rev to determine whether
2426 * the working copy is out of date. */
2427 const char *ood_changed_author;
2431 /** Reserved for libsvn_client's internal use; this value is only to be used
2432 * for libsvn_client backwards compatibility wrappers. This value may be NULL
2433 * or to other data in future versions. */
2434 const void *backwards_compatibility_baton;
2436 /** Set to the local absolute path that this node was moved from, if this
2437 * file or directory has been moved here locally and is the root of that
2438 * move. Otherwise set to NULL.
2440 * This will be NULL for moved-here nodes that are just part of a subtree
2441 * that was moved along (and are not themselves a root of a different move
2444 * @since New in 1.8. */
2445 const char *moved_from_abspath;
2447 /** Set to the local absolute path that this node was moved to, if this file
2448 * or directory has been moved away locally and corresponds to the root
2449 * of the destination side of the move. Otherwise set to NULL.
2451 * Note: Saying just "root" here could be misleading. For example:
2454 * creates a situation where A/B is moved-to BB, but one could argue that
2455 * the move source's root actually was AA/B. Note that, as far as the
2456 * working copy is concerned, above case is exactly identical to:
2459 * In both situations, @a moved_to_abspath would be set for nodes A (moved
2460 * to AA) and A/B (moved to BB), only.
2462 * This will be NULL for moved-away nodes that were just part of a subtree
2463 * that was moved along (and are not themselves a root of a different move
2466 * @since New in 1.8. */
2467 const char *moved_to_abspath;
2469 /* NOTE! Please update svn_client_status_dup() when adding new fields here. */
2470 } svn_client_status_t;
2473 * Return a duplicate of @a status, allocated in @a result_pool. No part of the new
2474 * structure will be shared with @a status.
2476 * @since New in 1.7.
2478 svn_client_status_t *
2479 svn_client_status_dup(const svn_client_status_t *status,
2480 apr_pool_t *result_pool);
2483 * A callback for reporting a @a status about @a path (which may be an
2484 * absolute or relative path).
2486 * @a baton is a closure object; it should be provided by the
2487 * implementation, and passed by the caller.
2489 * @a scratch_pool will be cleared between invocations to the callback.
2491 * @since New in 1.7.
2493 typedef svn_error_t *(*svn_client_status_func_t)(
2496 const svn_client_status_t *status,
2497 apr_pool_t *scratch_pool);
2500 * Given @a path to a working copy directory (or single file), call
2501 * @a status_func/status_baton with a set of #svn_wc_status_t *
2502 * structures which describe the status of @a path, and its children
2503 * (recursing according to @a depth).
2505 * - If @a get_all is set, retrieve all entries; otherwise,
2506 * retrieve only "interesting" entries (local mods and/or
2509 * - If @a check_out_of_date is set, contact the repository and
2510 * augment the status structures with information about
2511 * out-of-dateness (with respect to @a revision). Also, if @a
2512 * result_rev is not @c NULL, set @a *result_rev to the actual
2513 * revision against which the working copy was compared (@a
2514 * *result_rev is not meaningful unless @a check_out_of_date is
2517 * - If @a check_working_copy is not set, do not scan the working
2518 * copy for local modifications. This parameter will be ignored
2519 * unless @a check_out_of_date is set. When set, the status
2520 * report will not contain any information about local changes in
2521 * the working copy; this includes local deletions and
2524 * If @a no_ignore is @c FALSE, don't report any file or directory (or
2525 * recurse into any directory) that is found by recursion (as opposed to
2526 * being the explicit target @a path) and whose name matches the
2527 * svn:ignore property on its parent directory or the global-ignores
2528 * list in @a ctx->config. If @a no_ignore is @c TRUE, report each such
2529 * file or directory with the status code #svn_wc_status_ignored.
2531 * If @a ignore_externals is not set, then recurse into externals
2532 * definitions (if any exist) after handling the main target. This
2533 * calls the client notification function (in @a ctx) with the
2534 * #svn_wc_notify_status_external action before handling each externals
2535 * definition, and with #svn_wc_notify_status_completed
2538 * If @a depth_as_sticky is set and @a depth is not
2539 * #svn_depth_unknown, then the status is calculated as if depth_is_sticky
2540 * was passed to an equivalent update command.
2542 * @a changelists is an array of <tt>const char *</tt> changelist
2543 * names, used as a restrictive filter on items whose statuses are
2544 * reported; that is, don't report status about any item unless
2545 * it's a member of one of those changelists. If @a changelists is
2546 * empty (or altogether @c NULL), no changelist filtering occurs.
2548 * If @a path is an absolute path then the @c path parameter passed in each
2549 * call to @a status_func will be an absolute path.
2551 * All temporary allocations are performed in @a scratch_pool.
2553 * @since New in 1.9.
2556 svn_client_status6(svn_revnum_t *result_rev,
2557 svn_client_ctx_t *ctx,
2559 const svn_opt_revision_t *revision,
2561 svn_boolean_t get_all,
2562 svn_boolean_t check_out_of_date,
2563 svn_boolean_t check_working_copy,
2564 svn_boolean_t no_ignore,
2565 svn_boolean_t ignore_externals,
2566 svn_boolean_t depth_as_sticky,
2567 const apr_array_header_t *changelists,
2568 svn_client_status_func_t status_func,
2570 apr_pool_t *scratch_pool);
2574 * Same as svn_client_status6(), but with @a check_out_of_date set to
2575 * @a update and @a check_working_copy set to @c TRUE.
2577 * @since New in 1.7.
2578 * @deprecated Provided for backward compatibility with the 1.8 API.
2582 svn_client_status5(svn_revnum_t *result_rev,
2583 svn_client_ctx_t *ctx,
2585 const svn_opt_revision_t *revision,
2587 svn_boolean_t get_all,
2588 svn_boolean_t update,
2589 svn_boolean_t no_ignore,
2590 svn_boolean_t ignore_externals,
2591 svn_boolean_t depth_as_sticky,
2592 const apr_array_header_t *changelists,
2593 svn_client_status_func_t status_func,
2595 apr_pool_t *scratch_pool);
2598 * Same as svn_client_status5(), but using #svn_wc_status_func3_t
2599 * instead of #svn_client_status_func_t and depth_as_sticky set to TRUE.
2601 * @since New in 1.6.
2602 * @deprecated Provided for backward compatibility with the 1.6 API.
2606 svn_client_status4(svn_revnum_t *result_rev,
2608 const svn_opt_revision_t *revision,
2609 svn_wc_status_func3_t status_func,
2612 svn_boolean_t get_all,
2613 svn_boolean_t update,
2614 svn_boolean_t no_ignore,
2615 svn_boolean_t ignore_externals,
2616 const apr_array_header_t *changelists,
2617 svn_client_ctx_t *ctx,
2621 * Same as svn_client_status4(), but using an #svn_wc_status_func2_t
2622 * instead of an #svn_wc_status_func3_t.
2624 * @since New in 1.5.
2625 * @deprecated Provided for backward compatibility with the 1.5 API.
2629 svn_client_status3(svn_revnum_t *result_rev,
2631 const svn_opt_revision_t *revision,
2632 svn_wc_status_func2_t status_func,
2635 svn_boolean_t get_all,
2636 svn_boolean_t update,
2637 svn_boolean_t no_ignore,
2638 svn_boolean_t ignore_externals,
2639 const apr_array_header_t *changelists,
2640 svn_client_ctx_t *ctx,
2644 * Like svn_client_status3(), except with @a changelists passed as @c
2645 * NULL, and with @a recurse instead of @a depth. If @a recurse is
2646 * TRUE, behave as if for #svn_depth_infinity; else if @a recurse is
2647 * FALSE, behave as if for #svn_depth_immediates.
2649 * @since New in 1.2.
2650 * @deprecated Provided for backward compatibility with the 1.4 API.
2654 svn_client_status2(svn_revnum_t *result_rev,
2656 const svn_opt_revision_t *revision,
2657 svn_wc_status_func2_t status_func,
2659 svn_boolean_t recurse,
2660 svn_boolean_t get_all,
2661 svn_boolean_t update,
2662 svn_boolean_t no_ignore,
2663 svn_boolean_t ignore_externals,
2664 svn_client_ctx_t *ctx,
2669 * Similar to svn_client_status2(), but with @a ignore_externals
2670 * always set to FALSE, taking the #svn_wc_status_func_t type
2671 * instead of the #svn_wc_status_func2_t type for @a status_func,
2672 * and requiring @a *revision to be non-const even though it is
2673 * treated as constant.
2675 * @deprecated Provided for backward compatibility with the 1.1 API.
2679 svn_client_status(svn_revnum_t *result_rev,
2681 svn_opt_revision_t *revision,
2682 svn_wc_status_func_t status_func,
2684 svn_boolean_t recurse,
2685 svn_boolean_t get_all,
2686 svn_boolean_t update,
2687 svn_boolean_t no_ignore,
2688 svn_client_ctx_t *ctx,
2694 * @defgroup Log View information about previous revisions of an object.
2700 * Invoke @a receiver with @a receiver_baton on each log message from
2701 * each (#svn_opt_revision_range_t *) range in @a revision_ranges in turn,
2702 * inclusive (but never invoke @a receiver on a given log message more
2705 * @a targets contains either a URL followed by zero or more relative
2706 * paths, or 1 working copy path, as <tt>const char *</tt>, for which log
2707 * messages are desired. @a receiver is invoked only on messages whose
2708 * revisions involved a change to some path in @a targets. @a peg_revision
2709 * indicates in which revision @a targets are valid. If @a peg_revision is
2710 * #svn_opt_revision_unspecified, it defaults to #svn_opt_revision_head
2711 * for URLs or #svn_opt_revision_working for WC paths.
2713 * If @a limit is greater than zero only invoke @a receiver on the first
2716 * If @a discover_changed_paths is set, then the @c changed_paths and @c
2717 * changed_paths2 fields in the @c log_entry argument to @a receiver will be
2718 * populated on each invocation. @note The @c text_modified and @c
2719 * props_modified fields of the changed paths structure may have the value
2720 * #svn_tristate_unknown if the repository does not report that information.
2722 * If @a strict_node_history is set, copy history (if any exists) will
2723 * not be traversed while harvesting revision logs for each target.
2725 * If @a include_merged_revisions is set, log information for revisions
2726 * which have been merged to @a targets will also be returned.
2728 * If @a revprops is NULL, retrieve all revision properties; else, retrieve
2729 * only the revision properties named by the (const char *) array elements
2730 * (i.e. retrieve none if the array is empty).
2732 * Use @a pool for any temporary allocation.
2734 * If @a ctx->notify_func2 is non-NULL, then call @a ctx->notify_func2/baton2
2735 * with a 'skip' signal on any unversioned targets.
2737 * @since New in 1.6.
2740 svn_client_log5(const apr_array_header_t *targets,
2741 const svn_opt_revision_t *peg_revision,
2742 const apr_array_header_t *revision_ranges,
2744 svn_boolean_t discover_changed_paths,
2745 svn_boolean_t strict_node_history,
2746 svn_boolean_t include_merged_revisions,
2747 const apr_array_header_t *revprops,
2748 svn_log_entry_receiver_t receiver,
2749 void *receiver_baton,
2750 svn_client_ctx_t *ctx,
2754 * Similar to svn_client_log5(), but takes explicit start and end parameters
2755 * instead of an array of revision ranges.
2757 * @deprecated Provided for compatibility with the 1.5 API.
2758 * @since New in 1.5.
2762 svn_client_log4(const apr_array_header_t *targets,
2763 const svn_opt_revision_t *peg_revision,
2764 const svn_opt_revision_t *start,
2765 const svn_opt_revision_t *end,
2767 svn_boolean_t discover_changed_paths,
2768 svn_boolean_t strict_node_history,
2769 svn_boolean_t include_merged_revisions,
2770 const apr_array_header_t *revprops,
2771 svn_log_entry_receiver_t receiver,
2772 void *receiver_baton,
2773 svn_client_ctx_t *ctx,
2777 * Similar to svn_client_log4(), but using #svn_log_message_receiver_t
2778 * instead of #svn_log_entry_receiver_t. Also, @a
2779 * include_merged_revisions is set to @c FALSE and @a revprops is
2780 * svn:author, svn:date, and svn:log.
2782 * @deprecated Provided for compatibility with the 1.4 API.
2783 * @since New in 1.4.
2787 svn_client_log3(const apr_array_header_t *targets,
2788 const svn_opt_revision_t *peg_revision,
2789 const svn_opt_revision_t *start,
2790 const svn_opt_revision_t *end,
2792 svn_boolean_t discover_changed_paths,
2793 svn_boolean_t strict_node_history,
2794 svn_log_message_receiver_t receiver,
2795 void *receiver_baton,
2796 svn_client_ctx_t *ctx,
2801 * Similar to svn_client_log3(), but with the @c kind field of
2802 * @a peg_revision set to #svn_opt_revision_unspecified.
2805 * A special case for the revision range HEAD:1, which was present
2806 * in svn_client_log(), has been removed from svn_client_log2(). Instead, it
2807 * is expected that callers will specify the range HEAD:0, to avoid a
2808 * #SVN_ERR_FS_NO_SUCH_REVISION error when invoked against an empty repository
2809 * (i.e. one not containing a revision 1).
2811 * @deprecated Provided for compatibility with the 1.3 API.
2812 * @since New in 1.2.
2816 svn_client_log2(const apr_array_header_t *targets,
2817 const svn_opt_revision_t *start,
2818 const svn_opt_revision_t *end,
2820 svn_boolean_t discover_changed_paths,
2821 svn_boolean_t strict_node_history,
2822 svn_log_message_receiver_t receiver,
2823 void *receiver_baton,
2824 svn_client_ctx_t *ctx,
2829 * Similar to svn_client_log2(), but with @a limit set to 0, and the
2830 * following special case:
2832 * Special case for repositories at revision 0:
2834 * If @a start->kind is #svn_opt_revision_head, and @a end->kind is
2835 * #svn_opt_revision_number && @a end->number is @c 1, then handle an
2836 * empty (no revisions) repository specially: instead of erroring
2837 * because requested revision 1 when the highest revision is 0, just
2838 * invoke @a receiver on revision 0, passing @c NULL for changed paths and
2839 * empty strings for the author and date. This is because that
2840 * particular combination of @a start and @a end usually indicates the
2841 * common case of log invocation -- the user wants to see all log
2842 * messages from youngest to oldest, where the oldest commit is
2843 * revision 1. That works fine, except when there are no commits in
2844 * the repository, hence this special case.
2846 * @deprecated Provided for backward compatibility with the 1.1 API.
2850 svn_client_log(const apr_array_header_t *targets,
2851 const svn_opt_revision_t *start,
2852 const svn_opt_revision_t *end,
2853 svn_boolean_t discover_changed_paths,
2854 svn_boolean_t strict_node_history,
2855 svn_log_message_receiver_t receiver,
2856 void *receiver_baton,
2857 svn_client_ctx_t *ctx,
2863 * @defgroup Blame Show modification information about lines in a file.
2869 * Invoke @a receiver with @a receiver_baton on each line-blame item
2870 * associated with revision @a end of @a path_or_url, using @a start
2871 * as the default source of all blame. @a peg_revision indicates in
2872 * which revision @a path_or_url is valid. If @a peg_revision->kind
2873 * is #svn_opt_revision_unspecified, then it defaults to
2874 * #svn_opt_revision_head for URLs or #svn_opt_revision_working for
2877 * If @a start->kind or @a end->kind is #svn_opt_revision_unspecified,
2878 * return the error #SVN_ERR_CLIENT_BAD_REVISION. If either are
2879 * #svn_opt_revision_working, return the error
2880 * #SVN_ERR_UNSUPPORTED_FEATURE. If any of the revisions of @a
2881 * path_or_url have a binary mime-type, return the error
2882 * #SVN_ERR_CLIENT_IS_BINARY_FILE, unless @a ignore_mime_type is TRUE,
2883 * in which case blame information will be generated regardless of the
2884 * MIME types of the revisions.
2886 * @a start may resolve to a revision number greater (younger) than @a end
2887 * only if the server is 1.8.0 or greater (supports
2888 * #SVN_RA_CAPABILITY_GET_FILE_REVS_REVERSE) and the client is 1.9.0 or
2891 * Use @a diff_options to determine how to compare different revisions of the
2894 * If @a include_merged_revisions is TRUE, also return data based upon
2895 * revisions which have been merged to @a path_or_url.
2897 * Use @a pool for any temporary allocation.
2899 * @since New in 1.7.
2902 svn_client_blame5(const char *path_or_url,
2903 const svn_opt_revision_t *peg_revision,
2904 const svn_opt_revision_t *start,
2905 const svn_opt_revision_t *end,
2906 const svn_diff_file_options_t *diff_options,
2907 svn_boolean_t ignore_mime_type,
2908 svn_boolean_t include_merged_revisions,
2909 svn_client_blame_receiver3_t receiver,
2910 void *receiver_baton,
2911 svn_client_ctx_t *ctx,
2916 * Similar to svn_client_blame5(), but with #svn_client_blame_receiver3_t
2919 * @deprecated Provided for backwards compatibility with the 1.6 API.
2921 * @since New in 1.5.
2925 svn_client_blame4(const char *path_or_url,
2926 const svn_opt_revision_t *peg_revision,
2927 const svn_opt_revision_t *start,
2928 const svn_opt_revision_t *end,
2929 const svn_diff_file_options_t *diff_options,
2930 svn_boolean_t ignore_mime_type,
2931 svn_boolean_t include_merged_revisions,
2932 svn_client_blame_receiver2_t receiver,
2933 void *receiver_baton,
2934 svn_client_ctx_t *ctx,
2938 * Similar to svn_client_blame4(), but with @a include_merged_revisions set
2939 * to FALSE, and using a #svn_client_blame_receiver2_t as the receiver.
2941 * @deprecated Provided for backwards compatibility with the 1.4 API.
2943 * @since New in 1.4.
2947 svn_client_blame3(const char *path_or_url,
2948 const svn_opt_revision_t *peg_revision,
2949 const svn_opt_revision_t *start,
2950 const svn_opt_revision_t *end,
2951 const svn_diff_file_options_t *diff_options,
2952 svn_boolean_t ignore_mime_type,
2953 svn_client_blame_receiver_t receiver,
2954 void *receiver_baton,
2955 svn_client_ctx_t *ctx,
2959 * Similar to svn_client_blame3(), but with @a diff_options set to
2960 * default options as returned by svn_diff_file_options_parse() and
2961 * @a ignore_mime_type set to FALSE.
2963 * @deprecated Provided for backwards compatibility with the 1.3 API.
2965 * @since New in 1.2.
2969 svn_client_blame2(const char *path_or_url,
2970 const svn_opt_revision_t *peg_revision,
2971 const svn_opt_revision_t *start,
2972 const svn_opt_revision_t *end,
2973 svn_client_blame_receiver_t receiver,
2974 void *receiver_baton,
2975 svn_client_ctx_t *ctx,
2979 * Similar to svn_client_blame2() except that @a peg_revision is always
2980 * the same as @a end.
2982 * @deprecated Provided for backward compatibility with the 1.1 API.
2986 svn_client_blame(const char *path_or_url,
2987 const svn_opt_revision_t *start,
2988 const svn_opt_revision_t *end,
2989 svn_client_blame_receiver_t receiver,
2990 void *receiver_baton,
2991 svn_client_ctx_t *ctx,
2997 * @defgroup Diff Generate differences between paths.
3003 * Produce diff output which describes the delta between
3004 * @a path_or_url1/@a revision1 and @a path_or_url2/@a revision2. Print
3005 * the output of the diff to @a outstream, and any errors to @a
3006 * errstream. @a path_or_url1 and @a path_or_url2 can be either
3007 * working-copy paths or URLs.
3009 * If @a relative_to_dir is not @c NULL, the original path and
3010 * modified path will have the @a relative_to_dir stripped from the
3011 * front of the respective paths. If @a relative_to_dir is @c NULL,
3012 * paths will not be modified. If @a relative_to_dir is not
3013 * @c NULL but @a relative_to_dir is not a parent path of the target,
3014 * an error is returned. Finally, if @a relative_to_dir is a URL, an
3015 * error will be returned.
3017 * If either @a revision1 or @a revision2 has an `unspecified' or
3018 * unrecognized `kind', return #SVN_ERR_CLIENT_BAD_REVISION.
3020 * @a path_or_url1 and @a path_or_url2 must both represent the same node
3021 * kind -- that is, if @a path_or_url1 is a directory, @a path_or_url2
3022 * must also be, and if @a path_or_url1 is a file, @a path_or_url2 must
3025 * If @a depth is #svn_depth_infinity, diff fully recursively.
3026 * Else if it is #svn_depth_immediates, diff the named paths and
3027 * their file children (if any), and diff properties of
3028 * subdirectories, but do not descend further into the subdirectories.
3029 * Else if #svn_depth_files, behave as if for #svn_depth_immediates
3030 * except don't diff properties of subdirectories. If
3031 * #svn_depth_empty, diff exactly the named paths but nothing
3034 * Use @a ignore_ancestry to control whether or not items being
3035 * diffed will be checked for relatedness first. Unrelated items
3036 * are typically transmitted to the editor as a deletion of one thing
3037 * and the addition of another, but if this flag is TRUE, unrelated
3038 * items will be diffed as if they were related.
3040 * If @a no_diff_added is TRUE, then no diff output will be generated
3043 * If @a no_diff_deleted is TRUE, then no diff output will be
3044 * generated on deleted files.
3046 * If @a show_copies_as_adds is TRUE, then copied files will not be diffed
3047 * against their copyfrom source, and will appear in the diff output
3048 * in their entirety, as if they were newly added.
3049 * ### BUGS: For a repos-repos diff, this is ignored. Instead, a file is
3050 * diffed against its copyfrom source iff the file is the diff target
3051 * and not if some parent directory is the diff target. For a repos-WC
3052 * diff, this is ignored if the file is the diff target.
3054 * If @a use_git_diff_format is TRUE, then the git's extended diff format
3056 * ### Do we need to say more about the format? A reference perhaps?
3058 * If @a ignore_properties is TRUE, do not show property differences.
3059 * If @a properties_only is TRUE, show only property changes.
3060 * The above two options are mutually exclusive. It is an error to set
3063 * Generated headers are encoded using @a header_encoding.
3065 * Diff output will not be generated for binary files, unless @a
3066 * ignore_content_type is TRUE, in which case diffs will be shown
3067 * regardless of the content types.
3069 * @a diff_options (an array of <tt>const char *</tt>) is used to pass
3070 * additional command line options to the diff processes invoked to compare
3071 * files. @a diff_options is allowed to be @c NULL, in which case a value
3072 * for this option might still be obtained from the Subversion configuration
3073 * file via client context @a ctx.
3075 * The authentication baton cached in @a ctx is used to communicate with
3078 * @a changelists is an array of <tt>const char *</tt> changelist
3079 * names, used as a restrictive filter on items whose differences are
3080 * reported; that is, don't generate diffs about any item unless
3081 * it's a member of one of those changelists. If @a changelists is
3082 * empty (or altogether @c NULL), no changelist filtering occurs.
3084 * @note Changelist filtering only applies to diffs in which at least
3085 * one side of the diff represents working copy data.
3087 * @note @a header_encoding doesn't affect headers generated by external
3090 * @note @a relative_to_dir doesn't affect the path index generated by
3091 * external diff programs.
3093 * @since New in 1.8.
3096 svn_client_diff6(const apr_array_header_t *diff_options,
3097 const char *path_or_url1,
3098 const svn_opt_revision_t *revision1,
3099 const char *path_or_url2,
3100 const svn_opt_revision_t *revision2,
3101 const char *relative_to_dir,
3103 svn_boolean_t ignore_ancestry,
3104 svn_boolean_t no_diff_added,
3105 svn_boolean_t no_diff_deleted,
3106 svn_boolean_t show_copies_as_adds,
3107 svn_boolean_t ignore_content_type,
3108 svn_boolean_t ignore_properties,
3109 svn_boolean_t properties_only,
3110 svn_boolean_t use_git_diff_format,
3111 const char *header_encoding,
3112 svn_stream_t *outstream,
3113 svn_stream_t *errstream,
3114 const apr_array_header_t *changelists,
3115 svn_client_ctx_t *ctx,
3118 /** Similar to svn_client_diff6(), but with @a outfile and @a errfile,
3119 * instead of @a outstream and @a errstream, and with @a
3120 * no_diff_added, @a ignore_properties, and @a properties_only always
3121 * passed as @c FALSE (which means that additions and property changes
3122 * are always transmitted).
3124 * @deprecated Provided for backward compatibility with the 1.7 API.
3125 * @since New in 1.7.
3129 svn_client_diff5(const apr_array_header_t *diff_options,
3131 const svn_opt_revision_t *revision1,
3133 const svn_opt_revision_t *revision2,
3134 const char *relative_to_dir,
3136 svn_boolean_t ignore_ancestry,
3137 svn_boolean_t no_diff_deleted,
3138 svn_boolean_t show_copies_as_adds,
3139 svn_boolean_t ignore_content_type,
3140 svn_boolean_t use_git_diff_format,
3141 const char *header_encoding,
3142 apr_file_t *outfile,
3143 apr_file_t *errfile,
3144 const apr_array_header_t *changelists,
3145 svn_client_ctx_t *ctx,
3149 * Similar to svn_client_diff5(), but with @a show_copies_as_adds set to
3150 * @c FALSE and @a use_git_diff_format set to @c FALSE.
3152 * @deprecated Provided for backward compatibility with the 1.6 API.
3153 * @since New in 1.5.
3157 svn_client_diff4(const apr_array_header_t *diff_options,
3159 const svn_opt_revision_t *revision1,
3161 const svn_opt_revision_t *revision2,
3162 const char *relative_to_dir,
3164 svn_boolean_t ignore_ancestry,
3165 svn_boolean_t no_diff_deleted,
3166 svn_boolean_t ignore_content_type,
3167 const char *header_encoding,
3168 apr_file_t *outfile,
3169 apr_file_t *errfile,
3170 const apr_array_header_t *changelists,
3171 svn_client_ctx_t *ctx,
3175 * Similar to svn_client_diff4(), but with @a changelists passed as @c
3176 * NULL, and @a depth set according to @a recurse: if @a recurse is
3177 * TRUE, set @a depth to #svn_depth_infinity, if @a recurse is
3178 * FALSE, set @a depth to #svn_depth_empty.
3180 * @deprecated Provided for backward compatibility with the 1.4 API.
3181 * @since New in 1.3.
3185 svn_client_diff3(const apr_array_header_t *diff_options,
3187 const svn_opt_revision_t *revision1,
3189 const svn_opt_revision_t *revision2,
3190 svn_boolean_t recurse,
3191 svn_boolean_t ignore_ancestry,
3192 svn_boolean_t no_diff_deleted,
3193 svn_boolean_t ignore_content_type,
3194 const char *header_encoding,
3195 apr_file_t *outfile,
3196 apr_file_t *errfile,
3197 svn_client_ctx_t *ctx,
3202 * Similar to svn_client_diff3(), but with @a header_encoding set to
3203 * @c APR_LOCALE_CHARSET.
3205 * @deprecated Provided for backward compatibility with the 1.2 API.
3206 * @since New in 1.2.
3210 svn_client_diff2(const apr_array_header_t *diff_options,
3212 const svn_opt_revision_t *revision1,
3214 const svn_opt_revision_t *revision2,
3215 svn_boolean_t recurse,
3216 svn_boolean_t ignore_ancestry,
3217 svn_boolean_t no_diff_deleted,
3218 svn_boolean_t ignore_content_type,
3219 apr_file_t *outfile,
3220 apr_file_t *errfile,
3221 svn_client_ctx_t *ctx,
3225 * Similar to svn_client_diff2(), but with @a ignore_content_type
3226 * always set to FALSE.
3228 * @deprecated Provided for backward compatibility with the 1.1 API.
3232 svn_client_diff(const apr_array_header_t *diff_options,
3234 const svn_opt_revision_t *revision1,
3236 const svn_opt_revision_t *revision2,
3237 svn_boolean_t recurse,
3238 svn_boolean_t ignore_ancestry,
3239 svn_boolean_t no_diff_deleted,
3240 apr_file_t *outfile,
3241 apr_file_t *errfile,
3242 svn_client_ctx_t *ctx,
3246 * Produce diff output which describes the delta between the filesystem
3247 * object @a path_or_url in peg revision @a peg_revision, as it changed
3248 * between @a start_revision and @a end_revision. @a path_or_url can
3249 * be either a working-copy path or URL.
3251 * If @a peg_revision is #svn_opt_revision_unspecified, behave
3252 * identically to svn_client_diff6(), using @a path_or_url for both of that
3253 * function's @a path_or_url1 and @a path_or_url2 arguments.
3255 * All other options are handled identically to svn_client_diff6().
3257 * @since New in 1.8.
3260 svn_client_diff_peg6(const apr_array_header_t *diff_options,
3261 const char *path_or_url,
3262 const svn_opt_revision_t *peg_revision,
3263 const svn_opt_revision_t *start_revision,
3264 const svn_opt_revision_t *end_revision,
3265 const char *relative_to_dir,
3267 svn_boolean_t ignore_ancestry,
3268 svn_boolean_t no_diff_added,
3269 svn_boolean_t no_diff_deleted,
3270 svn_boolean_t show_copies_as_adds,
3271 svn_boolean_t ignore_content_type,
3272 svn_boolean_t ignore_properties,
3273 svn_boolean_t properties_only,
3274 svn_boolean_t use_git_diff_format,
3275 const char *header_encoding,
3276 svn_stream_t *outstream,
3277 svn_stream_t *errstream,
3278 const apr_array_header_t *changelists,
3279 svn_client_ctx_t *ctx,
3282 /** Similar to svn_client_diff6_peg6(), but with @a outfile and @a errfile,
3283 * instead of @a outstream and @a errstream, and with @a
3284 * no_diff_added, @a ignore_properties, and @a properties_only always
3285 * passed as @c FALSE (which means that additions and property changes
3286 * are always transmitted).
3288 * @deprecated Provided for backward compatibility with the 1.7 API.
3289 * @since New in 1.7.
3293 svn_client_diff_peg5(const apr_array_header_t *diff_options,
3295 const svn_opt_revision_t *peg_revision,
3296 const svn_opt_revision_t *start_revision,
3297 const svn_opt_revision_t *end_revision,
3298 const char *relative_to_dir,
3300 svn_boolean_t ignore_ancestry,
3301 svn_boolean_t no_diff_deleted,
3302 svn_boolean_t show_copies_as_adds,
3303 svn_boolean_t ignore_content_type,
3304 svn_boolean_t use_git_diff_format,
3305 const char *header_encoding,
3306 apr_file_t *outfile,
3307 apr_file_t *errfile,
3308 const apr_array_header_t *changelists,
3309 svn_client_ctx_t *ctx,
3313 * Similar to svn_client_diff_peg5(), but with @a show_copies_as_adds set to
3314 * @c FALSE and @a use_git_diff_format set to @c FALSE.
3316 * @since New in 1.5.
3317 * @deprecated Provided for backward compatibility with the 1.6 API.
3321 svn_client_diff_peg4(const apr_array_header_t *diff_options,
3323 const svn_opt_revision_t *peg_revision,
3324 const svn_opt_revision_t *start_revision,
3325 const svn_opt_revision_t *end_revision,
3326 const char *relative_to_dir,
3328 svn_boolean_t ignore_ancestry,
3329 svn_boolean_t no_diff_deleted,
3330 svn_boolean_t ignore_content_type,
3331 const char *header_encoding,
3332 apr_file_t *outfile,
3333 apr_file_t *errfile,
3334 const apr_array_header_t *changelists,
3335 svn_client_ctx_t *ctx,
3339 * Similar to svn_client_diff_peg4(), but with @a changelists passed
3340 * as @c NULL, and @a depth set according to @a recurse: if @a recurse
3341 * is TRUE, set @a depth to #svn_depth_infinity, if @a recurse is
3342 * FALSE, set @a depth to #svn_depth_files.
3344 * @deprecated Provided for backward compatibility with the 1.4 API.
3345 * @since New in 1.3.
3349 svn_client_diff_peg3(const apr_array_header_t *diff_options,
3351 const svn_opt_revision_t *peg_revision,
3352 const svn_opt_revision_t *start_revision,
3353 const svn_opt_revision_t *end_revision,
3354 svn_boolean_t recurse,
3355 svn_boolean_t ignore_ancestry,
3356 svn_boolean_t no_diff_deleted,
3357 svn_boolean_t ignore_content_type,
3358 const char *header_encoding,
3359 apr_file_t *outfile,
3360 apr_file_t *errfile,
3361 svn_client_ctx_t *ctx,
3365 * Similar to svn_client_diff_peg3(), but with @a header_encoding set to
3366 * @c APR_LOCALE_CHARSET.
3368 * @deprecated Provided for backward compatibility with the 1.2 API.
3369 * @since New in 1.2.
3373 svn_client_diff_peg2(const apr_array_header_t *diff_options,
3375 const svn_opt_revision_t *peg_revision,
3376 const svn_opt_revision_t *start_revision,
3377 const svn_opt_revision_t *end_revision,
3378 svn_boolean_t recurse,
3379 svn_boolean_t ignore_ancestry,
3380 svn_boolean_t no_diff_deleted,
3381 svn_boolean_t ignore_content_type,
3382 apr_file_t *outfile,
3383 apr_file_t *errfile,
3384 svn_client_ctx_t *ctx,
3388 * Similar to svn_client_diff_peg2(), but with @a ignore_content_type
3389 * always set to FALSE.
3391 * @since New in 1.1.
3392 * @deprecated Provided for backward compatibility with the 1.1 API.
3396 svn_client_diff_peg(const apr_array_header_t *diff_options,
3398 const svn_opt_revision_t *peg_revision,
3399 const svn_opt_revision_t *start_revision,
3400 const svn_opt_revision_t *end_revision,
3401 svn_boolean_t recurse,
3402 svn_boolean_t ignore_ancestry,
3403 svn_boolean_t no_diff_deleted,
3404 apr_file_t *outfile,
3405 apr_file_t *errfile,
3406 svn_client_ctx_t *ctx,
3410 * Produce a diff summary which lists the changed items between
3411 * @a path_or_url1/@a revision1 and @a path_or_url2/@a revision2 without
3412 * creating text deltas. @a path_or_url1 and @a path_or_url2 can be
3413 * either working-copy paths or URLs.
3415 * The function may report false positives if @a ignore_ancestry is false,
3416 * since a file might have been modified between two revisions, but still
3417 * have the same contents.
3419 * Calls @a summarize_func with @a summarize_baton for each difference
3420 * with a #svn_client_diff_summarize_t structure describing the difference.
3422 * See svn_client_diff6() for a description of the other parameters.
3424 * @since New in 1.5.
3427 svn_client_diff_summarize2(const char *path_or_url1,
3428 const svn_opt_revision_t *revision1,
3429 const char *path_or_url2,
3430 const svn_opt_revision_t *revision2,
3432 svn_boolean_t ignore_ancestry,
3433 const apr_array_header_t *changelists,
3434 svn_client_diff_summarize_func_t summarize_func,
3435 void *summarize_baton,
3436 svn_client_ctx_t *ctx,
3440 * Similar to svn_client_diff_summarize2(), but with @a changelists
3441 * passed as @c NULL, and @a depth set according to @a recurse: if @a
3442 * recurse is TRUE, set @a depth to #svn_depth_infinity, if @a
3443 * recurse is FALSE, set @a depth to #svn_depth_files.
3445 * @deprecated Provided for backward compatibility with the 1.4 API.
3447 * @since New in 1.4.
3451 svn_client_diff_summarize(const char *path1,
3452 const svn_opt_revision_t *revision1,
3454 const svn_opt_revision_t *revision2,
3455 svn_boolean_t recurse,
3456 svn_boolean_t ignore_ancestry,
3457 svn_client_diff_summarize_func_t summarize_func,
3458 void *summarize_baton,
3459 svn_client_ctx_t *ctx,
3463 * Produce a diff summary which lists the changed items between the
3464 * filesystem object @a path_or_url in peg revision @a peg_revision, as it
3465 * changed between @a start_revision and @a end_revision. @a path_or_url can
3466 * be either a working-copy path or URL.
3468 * If @a peg_revision is #svn_opt_revision_unspecified, behave
3469 * identically to svn_client_diff_summarize2(), using @a path_or_url for
3470 * both of that function's @a path_or_url1 and @a path_or_url2 arguments.
3472 * The function may report false positives if @a ignore_ancestry is false,
3473 * as described in the documentation for svn_client_diff_summarize2().
3475 * Call @a summarize_func with @a summarize_baton for each difference
3476 * with a #svn_client_diff_summarize_t structure describing the difference.
3478 * See svn_client_diff_peg5() for a description of the other parameters.
3480 * @since New in 1.5.
3483 svn_client_diff_summarize_peg2(const char *path_or_url,
3484 const svn_opt_revision_t *peg_revision,
3485 const svn_opt_revision_t *start_revision,
3486 const svn_opt_revision_t *end_revision,
3488 svn_boolean_t ignore_ancestry,
3489 const apr_array_header_t *changelists,
3490 svn_client_diff_summarize_func_t summarize_func,
3491 void *summarize_baton,
3492 svn_client_ctx_t *ctx,
3496 * Similar to svn_client_diff_summarize_peg2(), but with @a
3497 * changelists passed as @c NULL, and @a depth set according to @a
3498 * recurse: if @a recurse is TRUE, set @a depth to
3499 * #svn_depth_infinity, if @a recurse is FALSE, set @a depth to
3502 * @deprecated Provided for backward compatibility with the 1.4 API.
3504 * @since New in 1.4.
3508 svn_client_diff_summarize_peg(const char *path,
3509 const svn_opt_revision_t *peg_revision,
3510 const svn_opt_revision_t *start_revision,
3511 const svn_opt_revision_t *end_revision,
3512 svn_boolean_t recurse,
3513 svn_boolean_t ignore_ancestry,
3514 svn_client_diff_summarize_func_t summarize_func,
3515 void *summarize_baton,
3516 svn_client_ctx_t *ctx,
3522 * @defgroup Merge Merge changes between branches.
3527 /** Get information about the state of merging between two branches.
3529 * The source is specified by @a source_path_or_url at @a source_revision.
3530 * The target is specified by @a target_path_or_url at @a target_revision,
3531 * which refers to either a WC or a repository location.
3533 * Set @a *needs_reintegration to true if an automatic merge from source
3534 * to target would be a reintegration merge: that is, if the last automatic
3535 * merge was in the opposite direction; or to false otherwise.
3537 * Set @a *yca_url, @a *yca_rev, @a *base_url, @a *base_rev, @a *right_url,
3538 * @a *right_rev, @a *target_url, @a *target_rev to the repository locations
3539 * of, respectively: the youngest common ancestor of the branches, the base
3540 * chosen for 3-way merge, the right-hand side of the source diff, and the
3543 * Set @a repos_root_url to the URL of the repository root. This is a
3544 * common prefix of all four URL outputs.
3546 * Allocate the results in @a result_pool. Any of the output pointers may
3547 * be NULL if not wanted.
3549 * @since New in 1.8.
3552 svn_client_get_merging_summary(svn_boolean_t *needs_reintegration,
3553 const char **yca_url, svn_revnum_t *yca_rev,
3554 const char **base_url, svn_revnum_t *base_rev,
3555 const char **right_url, svn_revnum_t *right_rev,
3556 const char **target_url, svn_revnum_t *target_rev,
3557 const char **repos_root_url,
3558 const char *source_path_or_url,
3559 const svn_opt_revision_t *source_revision,
3560 const char *target_path_or_url,
3561 const svn_opt_revision_t *target_revision,
3562 svn_client_ctx_t *ctx,
3563 apr_pool_t *result_pool,
3564 apr_pool_t *scratch_pool);
3567 /** Merge changes from @a source1/@a revision1 to @a source2/@a revision2 into
3568 * the working-copy path @a target_wcpath.
3570 * @a source1 and @a source2 are either URLs that refer to entries in the
3571 * repository, or paths to entries in the working copy.
3573 * By "merging", we mean: apply file differences using
3574 * svn_wc_merge(), and schedule additions & deletions when appropriate.
3576 * @a source1 and @a source2 must both represent the same node kind -- that
3577 * is, if @a source1 is a directory, @a source2 must also be, and if @a source1
3578 * is a file, @a source2 must also be.
3580 * If either @a revision1 or @a revision2 has an `unspecified' or
3581 * unrecognized `kind', return #SVN_ERR_CLIENT_BAD_REVISION.
3583 * If @a depth is #svn_depth_infinity, merge fully recursively.
3584 * Else if #svn_depth_immediates, merge changes at most to files
3585 * that are immediate children of @a target_wcpath and to directory
3586 * properties of @a target_wcpath and its immediate subdirectory children.
3587 * Else if #svn_depth_files, merge at most to immediate file
3588 * children of @a target_wcpath and to @a target_wcpath itself.
3589 * Else if #svn_depth_empty, apply changes only to @a target_wcpath
3590 * (i.e., directory property changes only)
3592 * If @a depth is #svn_depth_unknown, use the depth of @a target_wcpath.
3594 * If @a ignore_mergeinfo is true, disable merge tracking, by treating the
3595 * two sources as unrelated even if they actually have a common ancestor.
3597 * If @a diff_ignore_ancestry is true, diff unrelated nodes as if related:
3598 * that is, diff the 'left' and 'right' versions of a node as if they were
3599 * related (if they are the same kind) even if they are not related.
3600 * Otherwise, diff unrelated items as a deletion of one thing and the
3601 * addition of another.
3603 * If @a force_delete is false and the merge involves deleting a file whose
3604 * content differs from the source-left version, or a locally modified
3605 * directory, or an unversioned item, then the operation will fail. If
3606 * @a force_delete is true then all such items will be deleted.
3608 * @a merge_options (an array of <tt>const char *</tt>), if non-NULL,
3609 * is used to pass additional command line arguments to the merge
3610 * processes (internal or external). @see
3611 * svn_diff_file_options_parse().
3613 * If @a ctx->notify_func2 is non-NULL, then call @a ctx->notify_func2 with @a
3614 * ctx->notify_baton2 once for each merged target, passing the target's local
3617 * If @a record_only is TRUE, the merge is performed, but is limited only to
3618 * mergeinfo property changes on existing paths in @a target_wcpath.
3620 * If @a dry_run is TRUE, the merge is carried out, and full notification
3621 * feedback is provided, but the working copy is not modified.
3623 * If allow_mixed_rev is @c FALSE, and @a merge_target is a mixed-revision
3624 * working copy, raise @c SVN_ERR_CLIENT_MERGE_UPDATE_REQUIRED.
3625 * Because users rarely intend to merge into mixed-revision working copies,
3626 * it is recommended to set this parameter to FALSE by default unless the
3627 * user has explicitly requested a merge into a mixed-revision working copy.
3629 * The authentication baton cached in @a ctx is used to communicate with the
3632 * @since New in 1.8.
3635 svn_client_merge5(const char *source1,
3636 const svn_opt_revision_t *revision1,
3637 const char *source2,
3638 const svn_opt_revision_t *revision2,
3639 const char *target_wcpath,
3641 svn_boolean_t ignore_mergeinfo,
3642 svn_boolean_t diff_ignore_ancestry,
3643 svn_boolean_t force_delete,
3644 svn_boolean_t record_only,
3645 svn_boolean_t dry_run,
3646 svn_boolean_t allow_mixed_rev,
3647 const apr_array_header_t *merge_options,
3648 svn_client_ctx_t *ctx,
3652 * Similar to svn_client_merge5(), but the single @a ignore_ancestry
3653 * parameter maps to both @c ignore_mergeinfo and @c diff_ignore_ancestry.
3655 * @deprecated Provided for backward compatibility with the 1.7 API.
3656 * @since New in 1.7.
3660 svn_client_merge4(const char *source1,
3661 const svn_opt_revision_t *revision1,
3662 const char *source2,
3663 const svn_opt_revision_t *revision2,
3664 const char *target_wcpath,
3666 svn_boolean_t ignore_ancestry,
3667 svn_boolean_t force_delete,
3668 svn_boolean_t record_only,
3669 svn_boolean_t dry_run,
3670 svn_boolean_t allow_mixed_rev,
3671 const apr_array_header_t *merge_options,
3672 svn_client_ctx_t *ctx,
3676 * Similar to svn_client_merge4(), but with @a allow_mixed_rev set to
3677 * @c TRUE. The @a force parameter maps to the @c force_delete parameter
3678 * of svn_client_merge4().
3680 * @deprecated Provided for backward compatibility with the 1.6 API.
3682 * @since New in 1.5.
3686 svn_client_merge3(const char *source1,
3687 const svn_opt_revision_t *revision1,
3688 const char *source2,
3689 const svn_opt_revision_t *revision2,
3690 const char *target_wcpath,
3692 svn_boolean_t ignore_ancestry,
3693 svn_boolean_t force,
3694 svn_boolean_t record_only,
3695 svn_boolean_t dry_run,
3696 const apr_array_header_t *merge_options,
3697 svn_client_ctx_t *ctx,
3701 * Similar to svn_client_merge3(), but with @a record_only set to @c
3702 * FALSE, and @a depth set according to @a recurse: if @a recurse is
3703 * TRUE, set @a depth to #svn_depth_infinity, if @a recurse is
3704 * FALSE, set @a depth to #svn_depth_files.
3706 * @deprecated Provided for backward compatibility with the 1.4 API.
3708 * @since New in 1.4.
3712 svn_client_merge2(const char *source1,
3713 const svn_opt_revision_t *revision1,
3714 const char *source2,
3715 const svn_opt_revision_t *revision2,
3716 const char *target_wcpath,
3717 svn_boolean_t recurse,
3718 svn_boolean_t ignore_ancestry,
3719 svn_boolean_t force,
3720 svn_boolean_t dry_run,
3721 const apr_array_header_t *merge_options,
3722 svn_client_ctx_t *ctx,
3727 * Similar to svn_client_merge2(), but with @a merge_options set to NULL.
3729 * @deprecated Provided for backwards compatibility with the 1.3 API.
3733 svn_client_merge(const char *source1,
3734 const svn_opt_revision_t *revision1,
3735 const char *source2,
3736 const svn_opt_revision_t *revision2,
3737 const char *target_wcpath,
3738 svn_boolean_t recurse,
3739 svn_boolean_t ignore_ancestry,
3740 svn_boolean_t force,
3741 svn_boolean_t dry_run,
3742 svn_client_ctx_t *ctx,
3747 * Perform a reintegration merge of @a source_path_or_url at @a source_peg_revision
3748 * into @a target_wcpath.
3749 * @a target_wcpath must be a single-revision, #svn_depth_infinity,
3750 * pristine, unswitched working copy -- in other words, it must
3751 * reflect a single revision tree, the "target". The mergeinfo on @a
3752 * source_path_or_url must reflect that all of the target has been merged into it.
3753 * Then this behaves like a merge with svn_client_merge5() from the
3754 * target's URL to the source.
3756 * All other options are handled identically to svn_client_merge5().
3757 * The depth of the merge is always #svn_depth_infinity.
3759 * @since New in 1.5.
3760 * @deprecated Provided for backwards compatibility with the 1.7 API.
3764 svn_client_merge_reintegrate(const char *source_path_or_url,
3765 const svn_opt_revision_t *source_peg_revision,
3766 const char *target_wcpath,
3767 svn_boolean_t dry_run,
3768 const apr_array_header_t *merge_options,
3769 svn_client_ctx_t *ctx,
3773 * Merge changes from the source branch identified by
3774 * @a source_path_or_url in peg revision @a source_peg_revision,
3775 * into the target branch working copy at @a target_wcpath.
3777 * If @a ranges_to_merge is NULL then perform an automatic merge of
3778 * all the eligible changes up to @a source_peg_revision. If the merge
3779 * required is a reintegrate merge, then return an error if the WC has
3780 * mixed revisions, local modifications and/or switched subtrees; if
3781 * the merge is determined to be of the non-reintegrate kind, then
3782 * return an error if @a allow_mixed_rev is false and the WC contains
3785 * If @a ranges_to_merge is not NULL then merge the changes specified
3786 * by the revision ranges in @a ranges_to_merge, or, when honouring
3787 * mergeinfo, only the eligible parts of those revision ranges.
3788 * @a ranges_to_merge is an array of <tt>svn_opt_revision_range_t
3789 * *</tt> ranges. These ranges may describe additive and/or
3790 * subtractive merge ranges, they may overlap fully or partially,
3791 * and/or they may partially or fully negate each other. This
3792 * rangelist is not required to be sorted. If any revision in the
3793 * list of provided ranges has an `unspecified' or unrecognized
3794 * `kind', return #SVN_ERR_CLIENT_BAD_REVISION.
3796 * If @a ranges_to_merge is an empty array, then do nothing.
3798 * All other options are handled identically to svn_client_merge5().
3800 * @since New in 1.8.
3803 svn_client_merge_peg5(const char *source_path_or_url,
3804 const apr_array_header_t *ranges_to_merge,
3805 const svn_opt_revision_t *source_peg_revision,
3806 const char *target_wcpath,
3808 svn_boolean_t ignore_mergeinfo,
3809 svn_boolean_t diff_ignore_ancestry,
3810 svn_boolean_t force_delete,
3811 svn_boolean_t record_only,
3812 svn_boolean_t dry_run,
3813 svn_boolean_t allow_mixed_rev,
3814 const apr_array_header_t *merge_options,
3815 svn_client_ctx_t *ctx,
3819 * Similar to svn_client_merge_peg5(), but automatic merge is not available
3820 * (@a ranges_to_merge must not be NULL), and the single @a ignore_ancestry
3821 * parameter maps to both @c ignore_mergeinfo and @c diff_ignore_ancestry.
3823 * @deprecated Provided for backward compatibility with the 1.7 API.
3824 * @since New in 1.7.
3828 svn_client_merge_peg4(const char *source_path_or_url,
3829 const apr_array_header_t *ranges_to_merge,
3830 const svn_opt_revision_t *source_peg_revision,
3831 const char *target_wcpath,
3833 svn_boolean_t ignore_ancestry,
3834 svn_boolean_t force_delete,
3835 svn_boolean_t record_only,
3836 svn_boolean_t dry_run,
3837 svn_boolean_t allow_mixed_rev,
3838 const apr_array_header_t *merge_options,
3839 svn_client_ctx_t *ctx,
3843 * Similar to svn_client_merge_peg4(), but with @a allow_mixed_rev set to
3844 * @c TRUE. The @a force parameter maps to the @c force_delete parameter
3845 * of svn_client_merge_peg4().
3847 * @deprecated Provided for backward compatibility with the 1.6 API.
3849 * @since New in 1.5.
3853 svn_client_merge_peg3(const char *source,
3854 const apr_array_header_t *ranges_to_merge,
3855 const svn_opt_revision_t *peg_revision,
3856 const char *target_wcpath,
3858 svn_boolean_t ignore_ancestry,
3859 svn_boolean_t force,
3860 svn_boolean_t record_only,
3861 svn_boolean_t dry_run,
3862 const apr_array_header_t *merge_options,
3863 svn_client_ctx_t *ctx,
3867 * Similar to svn_client_merge_peg3(), but with @a record_only set to
3868 * @c FALSE, and @a depth set according to @a recurse: if @a recurse
3869 * is TRUE, set @a depth to #svn_depth_infinity, if @a recurse is
3870 * FALSE, set @a depth to #svn_depth_files.
3872 * @deprecated Provided for backwards compatibility with the 1.4 API.
3874 * @since New in 1.4.
3878 svn_client_merge_peg2(const char *source,
3879 const svn_opt_revision_t *revision1,
3880 const svn_opt_revision_t *revision2,
3881 const svn_opt_revision_t *peg_revision,
3882 const char *target_wcpath,
3883 svn_boolean_t recurse,
3884 svn_boolean_t ignore_ancestry,
3885 svn_boolean_t force,
3886 svn_boolean_t dry_run,
3887 const apr_array_header_t *merge_options,
3888 svn_client_ctx_t *ctx,
3892 * Similar to svn_client_merge_peg2(), but with @a merge_options set to
3895 * @deprecated Provided for backwards compatibility with the 1.3 API.
3897 * @since New in 1.1.
3901 svn_client_merge_peg(const char *source,
3902 const svn_opt_revision_t *revision1,
3903 const svn_opt_revision_t *revision2,
3904 const svn_opt_revision_t *peg_revision,
3905 const char *target_wcpath,
3906 svn_boolean_t recurse,
3907 svn_boolean_t ignore_ancestry,
3908 svn_boolean_t force,
3909 svn_boolean_t dry_run,
3910 svn_client_ctx_t *ctx,
3914 /** Set @a suggestions to an ordered array of @c const char *
3915 * potential merge sources (expressed as full repository URLs) for @a
3916 * path_or_url at @a peg_revision. @a path_or_url is a working copy
3917 * path or repository URL. @a ctx is a context used for
3918 * authentication in the repository case. Use @a pool for all
3921 * @since New in 1.5.
3924 svn_client_suggest_merge_sources(apr_array_header_t **suggestions,
3925 const char *path_or_url,
3926 const svn_opt_revision_t *peg_revision,
3927 svn_client_ctx_t *ctx,
3932 * Get the mergeinfo for a single target node (ignoring any subtrees).
3934 * Set @a *mergeinfo to a hash mapping <tt>const char *</tt> merge source
3935 * URLs to <tt>svn_rangelist_t *</tt> rangelists describing the ranges which
3936 * have been merged into @a path_or_url as of @a peg_revision, per
3937 * @a path_or_url's explicit mergeinfo or inherited mergeinfo if no
3938 * explicit mergeinfo if found. If no explicit or inherited mergeinfo
3939 * is found, then set @a *mergeinfo to NULL.
3941 * Use @a pool for all necessary allocations.
3943 * If the server doesn't support retrieval of mergeinfo (which will
3944 * never happen for file:// URLs), return an
3945 * #SVN_ERR_UNSUPPORTED_FEATURE error.
3947 * @note Unlike most APIs which deal with mergeinfo, this one returns
3948 * data where the keys of the hash are absolute repository URLs rather
3949 * than repository filesystem paths.
3951 * @since New in 1.5.
3954 svn_client_mergeinfo_get_merged(apr_hash_t **mergeinfo,
3955 const char *path_or_url,
3956 const svn_opt_revision_t *peg_revision,
3957 svn_client_ctx_t *ctx,
3962 * Describe the revisions that either have or have not been merged from
3963 * one source branch (or subtree) into another.
3965 * If @a finding_merged is TRUE, then drive log entry callbacks
3966 * @a receiver / @a receiver_baton with the revisions merged from
3967 * @a source_path_or_url (as of @a source_peg_revision) into
3968 * @a target_path_or_url (as of @a target_peg_revision). If @a
3969 * finding_merged is FALSE then find the revisions eligible for merging.
3971 * If both @a source_start_revision and @a source_end_revision are
3972 * unspecified (that is, of kind @c svn_opt_revision_unspecified),
3973 * @a receiver will be called the requested revisions from 0 to
3974 * @a source_peg_revision and in that order (that is, oldest to
3975 * youngest). Otherwise, both @a source_start_revision and
3976 * @a source_end_revision must be specified, which has two effects:
3978 * - @a receiver will be called only with revisions which fall
3979 * within range of @a source_start_revision to
3980 * @a source_end_revision, inclusive, and
3982 * - those revisions will be ordered in the same "direction" as the
3983 * walk from @a source_start_revision to @a source_end_revision.
3984 * (If @a source_start_revision is the younger of the two, @a
3985 * receiver will be called with revisions in youngest-to-oldest
3986 * order; otherwise, the reverse occurs.)
3988 * If @a depth is #svn_depth_empty consider only the explicit or
3989 * inherited mergeinfo on @a target_path_or_url when calculating merged
3990 * revisions from @a source_path_or_url. If @a depth is #svn_depth_infinity
3991 * then also consider the explicit subtree mergeinfo under @a
3992 * target_path_or_url.
3993 * If a depth other than #svn_depth_empty or #svn_depth_infinity is
3994 * requested then return a #SVN_ERR_UNSUPPORTED_FEATURE error.
3996 * In addition to the behavior of @a discover_changed_paths described in
3997 * svn_client_log5(), if set to TRUE it enables detection of sub-tree
3998 * merges that are complete but can't be detected as complete without
3999 * access to the changed paths. Sub-tree merges detected as complete will
4000 * be included if @a finding_merged is TRUE or filtered if @a finding_merged
4003 * @a revprops is the same as for svn_client_log5(). Use @a scratch_pool for
4004 * all temporary allocations.
4006 * @a ctx is a context used for authentication.
4008 * If the server doesn't support retrieval of mergeinfo, return an
4009 * #SVN_ERR_UNSUPPORTED_FEATURE error.
4011 * @since New in 1.8.
4014 svn_client_mergeinfo_log2(svn_boolean_t finding_merged,
4015 const char *target_path_or_url,
4016 const svn_opt_revision_t *target_peg_revision,
4017 const char *source_path_or_url,
4018 const svn_opt_revision_t *source_peg_revision,
4019 const svn_opt_revision_t *source_start_revision,
4020 const svn_opt_revision_t *source_end_revision,
4021 svn_log_entry_receiver_t receiver,
4022 void *receiver_baton,
4023 svn_boolean_t discover_changed_paths,
4025 const apr_array_header_t *revprops,
4026 svn_client_ctx_t *ctx,
4027 apr_pool_t *scratch_pool);
4030 * Similar to svn_client_mergeinfo_log2(), but with @a source_start_revision
4031 * and @a source_end_revision always of kind @c svn_opt_revision_unspecified;
4033 * @deprecated Provided for backwards compatibility with the 1.7 API.
4034 * @since New in 1.7.
4038 svn_client_mergeinfo_log(svn_boolean_t finding_merged,
4039 const char *target_path_or_url,
4040 const svn_opt_revision_t *target_peg_revision,
4041 const char *source_path_or_url,
4042 const svn_opt_revision_t *source_peg_revision,
4043 svn_log_entry_receiver_t receiver,
4044 void *receiver_baton,
4045 svn_boolean_t discover_changed_paths,
4047 const apr_array_header_t *revprops,
4048 svn_client_ctx_t *ctx,
4049 apr_pool_t *scratch_pool);
4052 * Similar to svn_client_mergeinfo_log(), but finds only merged revisions
4053 * and always operates at @a depth #svn_depth_empty.
4055 * @deprecated Provided for backwards compatibility with the 1.6 API. Use
4056 * svn_client_mergeinfo_log() instead.
4057 * @since New in 1.5.
4061 svn_client_mergeinfo_log_merged(const char *path_or_url,
4062 const svn_opt_revision_t *peg_revision,
4063 const char *merge_source_path_or_url,
4064 const svn_opt_revision_t *src_peg_revision,
4065 svn_log_entry_receiver_t receiver,
4066 void *receiver_baton,
4067 svn_boolean_t discover_changed_paths,
4068 const apr_array_header_t *revprops,
4069 svn_client_ctx_t *ctx,
4073 * Similar to svn_client_mergeinfo_log(), but finds only eligible revisions
4074 * and always operates at @a depth #svn_depth_empty.
4076 * @deprecated Provided for backwards compatibility with the 1.6 API. Use
4077 * svn_client_mergeinfo_log() instead.
4078 * @since New in 1.5.
4082 svn_client_mergeinfo_log_eligible(const char *path_or_url,
4083 const svn_opt_revision_t *peg_revision,
4084 const char *merge_source_path_or_url,
4085 const svn_opt_revision_t *src_peg_revision,
4086 svn_log_entry_receiver_t receiver,
4087 void *receiver_baton,
4088 svn_boolean_t discover_changed_paths,
4089 const apr_array_header_t *revprops,
4090 svn_client_ctx_t *ctx,
4096 * @defgroup Cleanup Cleanup an abnormally terminated working copy.
4101 /** Recursively vacuum a working copy directory @a dir_abspath,
4102 * removing unnecessary data.
4104 * If @a include_externals is @c TRUE, recurse into externals and vacuum them
4107 * If @a remove_unversioned_items is @c TRUE, remove unversioned items
4108 * in @a dir_abspath after successful working copy cleanup.
4109 * If @a remove_ignored_items is @c TRUE, remove ignored unversioned items
4110 * in @a dir_abspath after successful working copy cleanup.
4112 * If @a fix_recorded_timestamps is @c TRUE, this function fixes recorded
4113 * timestamps for unmodified files in the working copy, reducing comparision
4114 * time on future checks.
4116 * If @a vacuum_pristines is @c TRUE, and @a dir_abspath points to the working
4117 * copy root unreferenced files in the pristine store are removed.
4119 * When asked to remove unversioned or ignored items, and the working copy
4120 * is already locked, return #SVN_ERR_WC_LOCKED. This prevents accidental
4121 * working copy corruption in case users run the cleanup operation to
4122 * remove unversioned items while another client is performing some other
4123 * operation on the working copy.
4125 * If @a ctx->cancel_func is non-NULL, invoke it with @a
4126 * ctx->cancel_baton at various points during the operation. If it
4127 * returns an error (typically #SVN_ERR_CANCELLED), return that error
4130 * Use @a scratch_pool for any temporary allocations.
4132 * @since New in 1.9.
4135 svn_client_vacuum(const char *dir_abspath,
4136 svn_boolean_t remove_unversioned_items,
4137 svn_boolean_t remove_ignored_items,
4138 svn_boolean_t fix_recorded_timestamps,
4139 svn_boolean_t vacuum_pristines,
4140 svn_boolean_t include_externals,
4141 svn_client_ctx_t *ctx,
4142 apr_pool_t *scratch_pool);
4145 /** Recursively cleanup a working copy directory @a dir_abspath, finishing any
4146 * incomplete operations, removing lockfiles, etc.
4148 * If @a break_locks is @c TRUE, existing working copy locks at or below @a
4149 * dir_abspath are broken, otherwise a normal write lock is obtained.
4151 * If @a fix_recorded_timestamps is @c TRUE, this function fixes recorded
4152 * timestamps for unmodified files in the working copy, reducing comparision
4153 * time on future checks.
4155 * If @a clear_dav_cache is @c TRUE, the caching of DAV information for older
4156 * mod_dav served repositories is cleared. This clearing invalidates some
4157 * cached information used for pre-HTTPv2 repositories.
4159 * If @a vacuum_pristines is @c TRUE, and @a dir_abspath points to the working
4160 * copy root unreferenced files in the pristine store are removed.
4162 * If @a include_externals is @c TRUE, recurse into externals and clean
4165 * If @a ctx->cancel_func is non-NULL, invoke it with @a
4166 * ctx->cancel_baton at various points during the operation. If it
4167 * returns an error (typically #SVN_ERR_CANCELLED), return that error
4170 * Use @a scratch_pool for any temporary allocations.
4172 * @since New in 1.9.
4175 svn_client_cleanup2(const char *dir_abspath,
4176 svn_boolean_t break_locks,
4177 svn_boolean_t fix_recorded_timestamps,
4178 svn_boolean_t clear_dav_cache,
4179 svn_boolean_t vacuum_pristines,
4180 svn_boolean_t include_externals,
4181 svn_client_ctx_t *ctx,
4182 apr_pool_t *scratch_pool);
4184 /** Like svn_client_cleanup2(), but no support for not breaking locks and
4185 * cleaning up externals and using a potentially non absolute path.
4187 * @deprecated Provided for limited backwards compatibility with the 1.8 API.
4191 svn_client_cleanup(const char *dir,
4192 svn_client_ctx_t *ctx,
4193 apr_pool_t *scratch_pool);
4199 * @defgroup Upgrade Upgrade a working copy.
4204 /** Recursively upgrade a working copy from any older format to the current
4205 * WC metadata storage format. @a wcroot_dir is the path to the WC root.
4207 * Use @a scratch_pool for any temporary allocations.
4209 * @since New in 1.7.
4212 svn_client_upgrade(const char *wcroot_dir,
4213 svn_client_ctx_t *ctx,
4214 apr_pool_t *scratch_pool);
4220 * @defgroup Relocate Switch a working copy to a different repository.
4226 * Recursively modify a working copy rooted at @a wcroot_dir, changing
4227 * any repository URLs that begin with @a from_prefix to begin with @a
4228 * to_prefix instead.
4230 * @param wcroot_dir Working copy root directory
4231 * @param from_prefix Original URL
4232 * @param to_prefix New URL
4233 * @param ignore_externals If not set, recurse into external working
4234 * copies after relocating the primary working copy
4235 * @param ctx svn_client_ctx_t
4236 * @param pool The pool from which to perform memory allocations
4241 svn_client_relocate2(const char *wcroot_dir,
4242 const char *from_prefix,
4243 const char *to_prefix,
4244 svn_boolean_t ignore_externals,
4245 svn_client_ctx_t *ctx,
4249 * Similar to svn_client_relocate2(), but with @a ignore_externals
4252 * @note As of the 1.7 API, @a dir is required to be a working copy
4253 * root directory, and @a recurse is required to be TRUE.
4255 * @deprecated Provided for limited backwards compatibility with the
4260 svn_client_relocate(const char *dir,
4261 const char *from_prefix,
4262 const char *to_prefix,
4263 svn_boolean_t recurse,
4264 svn_client_ctx_t *ctx,
4270 * @defgroup Revert Remove local changes in a repository.
4276 * Restore the pristine version of working copy @a paths,
4277 * effectively undoing any local mods. For each path in @a paths,
4278 * revert it if it is a file. Else if it is a directory, revert
4279 * according to @a depth:
4281 * @a paths is an array of (const char *) local WC paths.
4283 * If @a depth is #svn_depth_empty, revert just the properties on
4284 * the directory; else if #svn_depth_files, revert the properties
4285 * and any files immediately under the directory; else if
4286 * #svn_depth_immediates, revert all of the preceding plus
4287 * properties on immediate subdirectories; else if #svn_depth_infinity,
4288 * revert path and everything under it fully recursively.
4290 * @a changelists is an array of <tt>const char *</tt> changelist
4291 * names, used as a restrictive filter on items reverted; that is,
4292 * don't revert any item unless it's a member of one of those
4293 * changelists. If @a changelists is empty (or altogether @c NULL),
4294 * no changelist filtering occurs.
4296 * If @a clear_changelists is TRUE, then changelist information for the
4297 * paths is cleared while reverting.
4299 * If @a metadata_only is TRUE, the files and directories aren't changed
4300 * by the operation. If there are conflict marker files attached to the
4301 * targets these are removed.
4303 * If @a ctx->notify_func2 is non-NULL, then for each item reverted,
4304 * call @a ctx->notify_func2 with @a ctx->notify_baton2 and the path of
4305 * the reverted item.
4307 * If an item specified for reversion is not under version control,
4308 * then do not error, just invoke @a ctx->notify_func2 with @a
4309 * ctx->notify_baton2, using notification code #svn_wc_notify_skip.
4311 * @since New in 1.9.
4314 svn_client_revert3(const apr_array_header_t *paths,
4316 const apr_array_header_t *changelists,
4317 svn_boolean_t clear_changelists,
4318 svn_boolean_t metadata_only,
4319 svn_client_ctx_t *ctx,
4322 /** Similar to svn_client_revert2, but with @a clear_changelists set to
4323 * FALSE and @a metadata_only set to FALSE.
4325 * @since New in 1.5.
4326 * @deprecated Provided for backwards compatibility with the 1.8 API.
4330 svn_client_revert2(const apr_array_header_t *paths,
4332 const apr_array_header_t *changelists,
4333 svn_client_ctx_t *ctx,
4338 * Similar to svn_client_revert2(), but with @a changelists passed as
4339 * @c NULL, and @a depth set according to @a recurse: if @a recurse is
4340 * TRUE, @a depth is #svn_depth_infinity, else if @a recurse is
4341 * FALSE, @a depth is #svn_depth_empty.
4343 * @note Most APIs map @a recurse==FALSE to @a depth==svn_depth_files;
4344 * revert is deliberately different.
4346 * @deprecated Provided for backwards compatibility with the 1.4 API.
4350 svn_client_revert(const apr_array_header_t *paths,
4351 svn_boolean_t recursive,
4352 svn_client_ctx_t *ctx,
4359 * @defgroup Resolved Mark conflicted paths as resolved.
4365 * Similar to svn_client_resolve(), but without automatic conflict
4366 * resolution support.
4368 * @deprecated Provided for backward compatibility with the 1.4 API.
4369 * Use svn_client_resolve() with @a conflict_choice == @c
4370 * svn_wc_conflict_choose_merged instead.
4374 svn_client_resolved(const char *path,
4375 svn_boolean_t recursive,
4376 svn_client_ctx_t *ctx,
4379 /** Perform automatic conflict resolution on a working copy @a path.
4381 * If @a conflict_choice is
4383 * - #svn_wc_conflict_choose_base:
4384 * resolve the conflict with the old file contents
4386 * - #svn_wc_conflict_choose_mine_full:
4387 * use the original working contents
4389 * - #svn_wc_conflict_choose_theirs_full:
4390 * use the new contents
4392 * - #svn_wc_conflict_choose_merged:
4393 * don't change the contents at all, just remove the conflict
4394 * status, which is the pre-1.5 behavior.
4396 * - #svn_wc_conflict_choose_theirs_conflict
4399 * - #svn_wc_conflict_choose_mine_conflict
4402 * - svn_wc_conflict_choose_unspecified
4403 * invoke @a ctx->conflict_func2 with @a ctx->conflict_baton2 to obtain
4404 * a resolution decision for each conflict. This can be used to
4405 * implement interactive conflict resolution.
4407 * #svn_wc_conflict_choose_theirs_conflict and
4408 * #svn_wc_conflict_choose_mine_conflict are not legal for binary
4409 * files or properties.
4411 * If @a path is not in a state of conflict to begin with, do nothing.
4412 * If @a path's conflict state is removed and @a ctx->notify_func2 is non-NULL,
4413 * call @a ctx->notify_func2 with @a ctx->notify_baton2 and @a path.
4414 * ### with what notification parameters?
4416 * If @a depth is #svn_depth_empty, act only on @a path; if
4417 * #svn_depth_files, resolve @a path and its conflicted file
4418 * children (if any); if #svn_depth_immediates, resolve @a path and
4419 * all its immediate conflicted children (both files and directories,
4420 * if any); if #svn_depth_infinity, resolve @a path and every
4421 * conflicted file or directory anywhere beneath it.
4423 * Note that this operation will try to lock the parent directory of
4424 * @a path in order to be able to resolve tree-conflicts on @a path.
4426 * @since New in 1.5.
4429 svn_client_resolve(const char *path,
4431 svn_wc_conflict_choice_t conflict_choice,
4432 svn_client_ctx_t *ctx,
4439 * @defgroup Copy Copy paths in the working copy and repository.
4445 * A structure which describes the source of a copy operation--its path,
4446 * revision, and peg revision.
4448 * @since New in 1.5.
4450 typedef struct svn_client_copy_source_t
4452 /** The source path or URL. */
4455 /** The source operational revision. */
4456 const svn_opt_revision_t *revision;
4458 /** The source peg revision. */
4459 const svn_opt_revision_t *peg_revision;
4460 } svn_client_copy_source_t;
4462 /** Copy each source in @a sources to @a dst_path.
4464 * If multiple @a sources are given, @a dst_path must be a directory,
4465 * and @a sources will be copied as children of @a dst_path.
4467 * @a sources is an array of <tt>svn_client_copy_source_t *</tt> elements,
4468 * either all referring to local WC items or all referring to versioned
4469 * items in the repository.
4471 * If @a sources has only one item, attempt to copy it to @a dst_path. If
4472 * @a copy_as_child is TRUE and @a dst_path already exists, attempt to copy the
4473 * item as a child of @a dst_path. If @a copy_as_child is FALSE and
4474 * @a dst_path already exists, fail with #SVN_ERR_ENTRY_EXISTS if @a dst_path
4475 * is a working copy path and #SVN_ERR_FS_ALREADY_EXISTS if @a dst_path is a
4478 * If @a sources has multiple items, and @a copy_as_child is TRUE, all
4479 * @a sources are copied as children of @a dst_path. If any child of
4480 * @a dst_path already exists with the same name any item in @a sources,
4481 * fail with #SVN_ERR_ENTRY_EXISTS if @a dst_path is a working copy path and
4482 * #SVN_ERR_FS_ALREADY_EXISTS if @a dst_path is a URL.
4484 * If @a sources has multiple items, and @a copy_as_child is FALSE, fail
4485 * with #SVN_ERR_CLIENT_MULTIPLE_SOURCES_DISALLOWED.
4487 * If @a dst_path is a URL, use the authentication baton
4488 * in @a ctx and @a ctx->log_msg_func3/@a ctx->log_msg_baton3 to immediately
4489 * attempt to commit the copy action in the repository.
4491 * If @a dst_path is not a URL, then this is just a variant of
4492 * svn_client_add(), where the @a sources are scheduled for addition
4493 * as copies. No changes will happen to the repository until a commit occurs.
4494 * This scheduling can be removed with svn_client_revert2().
4496 * If @a make_parents is TRUE, create any non-existent parent directories
4497 * also. Otherwise the parent of @a dst_path must already exist.
4499 * If @a ignore_externals is set, don't process externals definitions
4500 * as part of this operation.
4502 * If @a metadata_only is @c TRUE and copying a file in a working copy,
4503 * everything in the metadata is updated as if the node is moved, but the
4504 * actual disk copy operation is not performed. This feature is useful for
4505 * clients that want to keep the working copy in sync while the actual working
4506 * copy is updated by some other task.
4508 * If @a pin_externals is set, pin URLs in copied externals definitions
4509 * to their current revision unless they were already pinned to a
4510 * particular revision. A pinned external uses a URL which points at a
4511 * fixed revision, rather than the HEAD revision. Externals in the copy
4512 * destination are pinned to either a working copy base revision or the
4513 * HEAD revision of a repository (as of the time the copy operation is
4514 * performed), depending on the type of the copy source:
4516 copy source: working copy (WC) REPOS
4517 ------------+------------------------+---------------------------+
4518 copy WC | external's WC BASE rev | external's repos HEAD rev |
4519 dest: |------------------------+---------------------------+
4520 REPOS | external's WC BASE rev | external's repos HEAD rev |
4521 ------------+------------------------+---------------------------+
4523 * If the copy source is a working copy, then all externals must be checked
4524 * out, be at a single-revision, contain no local modifications, and contain
4525 * no switched subtrees. Else, #SVN_ERR_WC_PATH_UNEXPECTED_STATUS is returned.
4527 * If non-NULL, @a externals_to_pin restricts pinning to a subset of externals.
4528 * It is a hash table keyed by either a local absolute path or a URL at which
4529 * an svn:externals property is set. The hash table contains apr_array_header_t*
4530 * elements as returned by svn_wc_parse_externals_description3(). These arrays
4531 * contain elements of type svn_wc_external_item2_t*, each of which corresponds
4532 * to a single line of an svn:externals definition. Externals corresponding to
4533 * these items will be pinned, other externals will not be pinned.
4534 * If @a externals_to_pin is @c NULL then all externals are pinned.
4535 * If @a pin_externals is @c FALSE then @a externals_to_pin is ignored.
4537 * If non-NULL, @a revprop_table is a hash table holding additional,
4538 * custom revision properties (<tt>const char *</tt> names mapped to
4539 * <tt>svn_string_t *</tt> values) to be set on the new revision in
4540 * the event that this is a committing operation. This table cannot
4541 * contain any standard Subversion properties.
4543 * @a ctx->log_msg_func3/@a ctx->log_msg_baton3 are a callback/baton combo
4544 * that this function can use to query for a commit log message when one is
4547 * If @a ctx->notify_func2 is non-NULL, invoke it with @a ctx->notify_baton2
4548 * for each item added at the new location, passing the new, relative path of
4551 * If @a commit_callback is non-NULL, then for each successful commit, call
4552 * @a commit_callback with @a commit_baton and a #svn_commit_info_t for
4555 * @since New in 1.9.
4558 svn_client_copy7(const apr_array_header_t *sources,
4559 const char *dst_path,
4560 svn_boolean_t copy_as_child,
4561 svn_boolean_t make_parents,
4562 svn_boolean_t ignore_externals,
4563 svn_boolean_t metadata_only,
4564 svn_boolean_t pin_externals,
4565 const apr_hash_t *externals_to_pin,
4566 const apr_hash_t *revprop_table,
4567 svn_commit_callback2_t commit_callback,
4569 svn_client_ctx_t *ctx,
4573 * Similar to svn_client_copy7(), but doesn't support meta_data_only
4574 * and cannot pin externals.
4577 * @since New in 1.7.
4578 * @deprecated Provided for backward compatibility with the 1.8 API.
4582 svn_client_copy6(const apr_array_header_t *sources,
4583 const char *dst_path,
4584 svn_boolean_t copy_as_child,
4585 svn_boolean_t make_parents,
4586 svn_boolean_t ignore_externals,
4587 const apr_hash_t *revprop_table,
4588 svn_commit_callback2_t commit_callback,
4590 svn_client_ctx_t *ctx,
4594 * Similar to svn_client_copy6(), but returns the commit info in
4595 * @a *commit_info_p rather than through a callback function.
4597 * @since New in 1.6.
4598 * @deprecated Provided for backward compatibility with the 1.6 API.
4602 svn_client_copy5(svn_commit_info_t **commit_info_p,
4603 const apr_array_header_t *sources,
4604 const char *dst_path,
4605 svn_boolean_t copy_as_child,
4606 svn_boolean_t make_parents,
4607 svn_boolean_t ignore_externals,
4608 const apr_hash_t *revprop_table,
4609 svn_client_ctx_t *ctx,
4613 * Similar to svn_client_copy5(), with @a ignore_externals set to @c FALSE.
4615 * @since New in 1.5.
4617 * @deprecated Provided for backward compatibility with the 1.5 API.
4621 svn_client_copy4(svn_commit_info_t **commit_info_p,
4622 const apr_array_header_t *sources,
4623 const char *dst_path,
4624 svn_boolean_t copy_as_child,
4625 svn_boolean_t make_parents,
4626 const apr_hash_t *revprop_table,
4627 svn_client_ctx_t *ctx,
4631 * Similar to svn_client_copy4(), with only one @a src_path, @a
4632 * copy_as_child set to @c FALSE, @a revprop_table passed as NULL, and
4633 * @a make_parents set to @c FALSE. Also, use @a src_revision as both
4634 * the operational and peg revision.
4636 * @since New in 1.4.
4638 * @deprecated Provided for backward compatibility with the 1.4 API.
4642 svn_client_copy3(svn_commit_info_t **commit_info_p,
4643 const char *src_path,
4644 const svn_opt_revision_t *src_revision,
4645 const char *dst_path,
4646 svn_client_ctx_t *ctx,
4651 * Similar to svn_client_copy3(), with the difference that if @a dst_path
4652 * already exists and is a directory, copy the item into that directory,
4653 * keeping its name (the last component of @a src_path).
4655 * @since New in 1.3.
4657 * @deprecated Provided for backward compatibility with the 1.3 API.
4661 svn_client_copy2(svn_commit_info_t **commit_info_p,
4662 const char *src_path,
4663 const svn_opt_revision_t *src_revision,
4664 const char *dst_path,
4665 svn_client_ctx_t *ctx,
4670 * Similar to svn_client_copy2(), but uses #svn_client_commit_info_t
4671 * for @a commit_info_p.
4673 * @deprecated Provided for backward compatibility with the 1.2 API.
4677 svn_client_copy(svn_client_commit_info_t **commit_info_p,
4678 const char *src_path,
4679 const svn_opt_revision_t *src_revision,
4680 const char *dst_path,
4681 svn_client_ctx_t *ctx,
4688 * @defgroup Move Move paths in the working copy or repository.
4694 * Move @a src_paths to @a dst_path.
4696 * @a src_paths is an array of (const char *) paths -- either all WC paths
4697 * or all URLs -- of versioned items. If multiple @a src_paths are given,
4698 * @a dst_path must be a directory and @a src_paths will be moved as
4699 * children of @a dst_path.
4701 * If @a src_paths are repository URLs:
4703 * - @a dst_path must also be a repository URL.
4705 * - The authentication baton in @a ctx and @a ctx->log_msg_func/@a
4706 * ctx->log_msg_baton are used to commit the move.
4708 * - The move operation will be immediately committed.
4710 * If @a src_paths are working copy paths:
4712 * - @a dst_path must also be a working copy path.
4714 * - @a ctx->log_msg_func3 and @a ctx->log_msg_baton3 are ignored.
4716 * - This is a scheduling operation. No changes will happen to the
4717 * repository until a commit occurs. This scheduling can be removed
4718 * with svn_client_revert2(). If one of @a src_paths is a file it is
4719 * removed from the working copy immediately. If one of @a src_path
4720 * is a directory it will remain in the working copy but all the files,
4721 * and unversioned items, it contains will be removed.
4723 * If @a src_paths has only one item, attempt to move it to @a dst_path. If
4724 * @a move_as_child is TRUE and @a dst_path already exists, attempt to move the
4725 * item as a child of @a dst_path. If @a move_as_child is FALSE and
4726 * @a dst_path already exists, fail with #SVN_ERR_ENTRY_EXISTS if @a dst_path
4727 * is a working copy path and #SVN_ERR_FS_ALREADY_EXISTS if @a dst_path is a
4730 * If @a src_paths has multiple items, and @a move_as_child is TRUE, all
4731 * @a src_paths are moved as children of @a dst_path. If any child of
4732 * @a dst_path already exists with the same name any item in @a src_paths,
4733 * fail with #SVN_ERR_ENTRY_EXISTS if @a dst_path is a working copy path and
4734 * #SVN_ERR_FS_ALREADY_EXISTS if @a dst_path is a URL.
4736 * If @a src_paths has multiple items, and @a move_as_child is FALSE, fail
4737 * with #SVN_ERR_CLIENT_MULTIPLE_SOURCES_DISALLOWED.
4739 * If @a make_parents is TRUE, create any non-existent parent directories
4740 * also. Otherwise, the parent of @a dst_path must already exist.
4742 * If @a allow_mixed_revisions is @c FALSE, #SVN_ERR_WC_MIXED_REVISIONS
4743 * will be raised if the move source is a mixed-revision subtree.
4744 * If @a allow_mixed_revisions is TRUE, a mixed-revision move source is
4745 * allowed but the move will degrade to a copy and a delete without local
4746 * move tracking. This parameter should be set to FALSE except where backwards
4747 * compatibility to svn_client_move6() is required.
4749 * If @a metadata_only is @c TRUE and moving a file in a working copy,
4750 * everything in the metadata is updated as if the node is moved, but the
4751 * actual disk move operation is not performed. This feature is useful for
4752 * clients that want to keep the working copy in sync while the actual working
4753 * copy is updated by some other task.
4755 * If non-NULL, @a revprop_table is a hash table holding additional,
4756 * custom revision properties (<tt>const char *</tt> names mapped to
4757 * <tt>svn_string_t *</tt> values) to be set on the new revision in
4758 * the event that this is a committing operation. This table cannot
4759 * contain any standard Subversion properties.
4761 * @a ctx->log_msg_func3/@a ctx->log_msg_baton3 are a callback/baton combo that
4762 * this function can use to query for a commit log message when one is needed.
4764 * If @a ctx->notify_func2 is non-NULL, then for each item moved, call
4765 * @a ctx->notify_func2 with the @a ctx->notify_baton2 twice, once to indicate
4766 * the deletion of the moved thing, and once to indicate the addition of
4767 * the new location of the thing.
4769 * ### Is this really true? What about svn_wc_notify_commit_replaced()? ###
4771 * If @a commit_callback is non-NULL, then for each successful commit, call
4772 * @a commit_callback with @a commit_baton and a #svn_commit_info_t for
4775 * @since New in 1.8.
4778 svn_client_move7(const apr_array_header_t *src_paths,
4779 const char *dst_path,
4780 svn_boolean_t move_as_child,
4781 svn_boolean_t make_parents,
4782 svn_boolean_t allow_mixed_revisions,
4783 svn_boolean_t metadata_only,
4784 const apr_hash_t *revprop_table,
4785 svn_commit_callback2_t commit_callback,
4787 svn_client_ctx_t *ctx,
4791 * Similar to svn_client_move7(), but with @a allow_mixed_revisions always
4792 * set to @c TRUE and @a metadata_only always to @c FALSE.
4794 * @since New in 1.7.
4795 * @deprecated Provided for backward compatibility with the 1.7 API.
4799 svn_client_move6(const apr_array_header_t *src_paths,
4800 const char *dst_path,
4801 svn_boolean_t move_as_child,
4802 svn_boolean_t make_parents,
4803 const apr_hash_t *revprop_table,
4804 svn_commit_callback2_t commit_callback,
4806 svn_client_ctx_t *ctx,
4810 * Similar to svn_client_move6(), but returns the commit info in
4811 * @a *commit_info_p rather than through a callback function.
4813 * A WC-to-WC move will include any modified and/or unversioned children.
4814 * @a force is ignored.
4816 * @since New in 1.5.
4817 * @deprecated Provided for backward compatibility with the 1.6 API.
4821 svn_client_move5(svn_commit_info_t **commit_info_p,
4822 const apr_array_header_t *src_paths,
4823 const char *dst_path,
4824 svn_boolean_t force,
4825 svn_boolean_t move_as_child,
4826 svn_boolean_t make_parents,
4827 const apr_hash_t *revprop_table,
4828 svn_client_ctx_t *ctx,
4832 * Similar to svn_client_move5(), with only one @a src_path, @a
4833 * move_as_child set to @c FALSE, @a revprop_table passed as NULL, and
4834 * @a make_parents set to @c FALSE.
4836 * Note: The behaviour of @a force changed in 1.5 (r860885 and r861421), when
4837 * the 'move' semantics were improved to just move the source including any
4838 * modified and/or unversioned items in it. Before that, @a force
4839 * controlled what happened to such items, but now @a force is ignored.
4841 * @since New in 1.4.
4843 * @deprecated Provided for backward compatibility with the 1.4 API.
4847 svn_client_move4(svn_commit_info_t **commit_info_p,
4848 const char *src_path,
4849 const char *dst_path,
4850 svn_boolean_t force,
4851 svn_client_ctx_t *ctx,
4855 * Similar to svn_client_move4(), with the difference that if @a dst_path
4856 * already exists and is a directory, move the item into that directory,
4857 * keeping its name (the last component of @a src_path).
4859 * @since New in 1.3.
4861 * @deprecated Provided for backward compatibility with the 1.3 API.
4865 svn_client_move3(svn_commit_info_t **commit_info_p,
4866 const char *src_path,
4867 const char *dst_path,
4868 svn_boolean_t force,
4869 svn_client_ctx_t *ctx,
4873 * Similar to svn_client_move3(), but uses #svn_client_commit_info_t
4874 * for @a commit_info_p.
4876 * @deprecated Provided for backward compatibility with the 1.2 API.
4878 * @since New in 1.2.
4882 svn_client_move2(svn_client_commit_info_t **commit_info_p,
4883 const char *src_path,
4884 const char *dst_path,
4885 svn_boolean_t force,
4886 svn_client_ctx_t *ctx,
4890 * Similar to svn_client_move2(), but an extra argument @a src_revision
4891 * must be passed. This has no effect, but must be of kind
4892 * #svn_opt_revision_unspecified or #svn_opt_revision_head,
4893 * otherwise error #SVN_ERR_UNSUPPORTED_FEATURE is returned.
4895 * @deprecated Provided for backward compatibility with the 1.1 API.
4899 svn_client_move(svn_client_commit_info_t **commit_info_p,
4900 const char *src_path,
4901 const svn_opt_revision_t *src_revision,
4902 const char *dst_path,
4903 svn_boolean_t force,
4904 svn_client_ctx_t *ctx,
4912 * Note that certain svn-controlled properties must always have their
4913 * values set and stored in UTF8 with LF line endings. When
4914 * retrieving these properties, callers must convert the values back
4915 * to native locale and native line-endings before displaying them to
4916 * the user. For help with this task, see
4917 * svn_prop_needs_translation(), svn_subst_translate_string(), and
4918 * svn_subst_detranslate_string().
4920 * @defgroup svn_client_prop_funcs Property functions
4926 * Set @a propname to @a propval on @a url. A @a propval of @c NULL will
4927 * delete the property.
4929 * Immediately attempt to commit the property change in the repository,
4930 * using the authentication baton in @a ctx and @a
4931 * ctx->log_msg_func3/@a ctx->log_msg_baton3.
4933 * If the property has changed on @a url since revision
4934 * @a base_revision_for_url (which must not be #SVN_INVALID_REVNUM), no
4935 * change will be made and an error will be returned.
4937 * If non-NULL, @a revprop_table is a hash table holding additional,
4938 * custom revision properties (<tt>const char *</tt> names mapped to
4939 * <tt>svn_string_t *</tt> values) to be set on the new revision. This
4940 * table cannot contain any standard Subversion properties.
4942 * If @a commit_callback is non-NULL, then call @a commit_callback with
4943 * @a commit_baton and a #svn_commit_info_t for the commit.
4945 * If @a propname is an svn-controlled property (i.e. prefixed with
4946 * #SVN_PROP_PREFIX), then the caller is responsible for ensuring that
4947 * the value is UTF8-encoded and uses LF line-endings.
4949 * If @a skip_checks is TRUE, do no validity checking. But if @a
4950 * skip_checks is FALSE, and @a propname is not a valid property for @a
4951 * url, return an error, either #SVN_ERR_ILLEGAL_TARGET (if the property is
4952 * not appropriate for @a url), or * #SVN_ERR_BAD_MIME_TYPE (if @a propname
4953 * is "svn:mime-type", but @a propval is not a valid mime-type).
4955 * Use @a scratch_pool for all memory allocation.
4957 * @since New in 1.7.
4960 svn_client_propset_remote(const char *propname,
4961 const svn_string_t *propval,
4963 svn_boolean_t skip_checks,
4964 svn_revnum_t base_revision_for_url,
4965 const apr_hash_t *revprop_table,
4966 svn_commit_callback2_t commit_callback,
4968 svn_client_ctx_t *ctx,
4969 apr_pool_t *scratch_pool);
4972 * Set @a propname to @a propval on each (const char *) target in @a
4973 * targets. The targets must be all working copy paths. A @a propval
4974 * of @c NULL will delete the property.
4976 * If @a depth is #svn_depth_empty, set the property on each member of
4977 * @a targets only; if #svn_depth_files, set it on @a targets and their
4978 * file children (if any); if #svn_depth_immediates, on @a targets and all
4979 * of their immediate children (both files and directories); if
4980 * #svn_depth_infinity, on @a targets and everything beneath them.
4982 * @a changelists is an array of <tt>const char *</tt> changelist
4983 * names, used as a restrictive filter on items whose properties are
4984 * set; that is, don't set properties on any item unless it's a member
4985 * of one of those changelists. If @a changelists is empty (or
4986 * altogether @c NULL), no changelist filtering occurs.
4988 * If @a propname is an svn-controlled property (i.e. prefixed with
4989 * #SVN_PROP_PREFIX), then the caller is responsible for ensuring that
4990 * the value is UTF8-encoded and uses LF line-endings.
4992 * If @a skip_checks is TRUE, do no validity checking. But if @a
4993 * skip_checks is FALSE, and @a propname is not a valid property for @a
4994 * targets, return an error, either #SVN_ERR_ILLEGAL_TARGET (if the
4995 * property is not appropriate for @a targets), or
4996 * #SVN_ERR_BAD_MIME_TYPE (if @a propname is "svn:mime-type", but @a
4997 * propval is not a valid mime-type).
4999 * If @a ctx->cancel_func is non-NULL, invoke it passing @a
5000 * ctx->cancel_baton at various places during the operation.
5002 * Use @a scratch_pool for all memory allocation.
5004 * @since New in 1.7.
5007 svn_client_propset_local(const char *propname,
5008 const svn_string_t *propval,
5009 const apr_array_header_t *targets,
5011 svn_boolean_t skip_checks,
5012 const apr_array_header_t *changelists,
5013 svn_client_ctx_t *ctx,
5014 apr_pool_t *scratch_pool);
5017 * An amalgamation of svn_client_propset_local() and
5018 * svn_client_propset_remote() that takes only a single target, and
5019 * returns the commit info in @a *commit_info_p rather than through a
5020 * callback function.
5022 * @since New in 1.5.
5023 * @deprecated Provided for backward compatibility with the 1.6 API.
5027 svn_client_propset3(svn_commit_info_t **commit_info_p,
5028 const char *propname,
5029 const svn_string_t *propval,
5032 svn_boolean_t skip_checks,
5033 svn_revnum_t base_revision_for_url,
5034 const apr_array_header_t *changelists,
5035 const apr_hash_t *revprop_table,
5036 svn_client_ctx_t *ctx,
5040 * Like svn_client_propset3(), but with @a base_revision_for_url
5041 * always #SVN_INVALID_REVNUM; @a commit_info_p always @c NULL; @a
5042 * changelists always @c NULL; @a revprop_table always @c NULL; and @a
5043 * depth set according to @a recurse: if @a recurse is TRUE, @a depth
5044 * is #svn_depth_infinity, else #svn_depth_empty.
5046 * @deprecated Provided for backward compatibility with the 1.4 API.
5050 svn_client_propset2(const char *propname,
5051 const svn_string_t *propval,
5053 svn_boolean_t recurse,
5054 svn_boolean_t skip_checks,
5055 svn_client_ctx_t *ctx,
5059 * Like svn_client_propset2(), but with @a skip_checks always FALSE and a
5060 * newly created @a ctx.
5062 * @deprecated Provided for backward compatibility with the 1.1 API.
5066 svn_client_propset(const char *propname,
5067 const svn_string_t *propval,
5069 svn_boolean_t recurse,
5072 /** Set @a propname to @a propval on revision @a revision in the repository
5073 * represented by @a URL. Use the authentication baton in @a ctx for
5074 * authentication, and @a pool for all memory allocation. Return the actual
5075 * rev affected in @a *set_rev. A @a propval of @c NULL will delete the
5078 * If @a original_propval is non-NULL, then just before setting the
5079 * new value, check that the old value matches @a original_propval;
5080 * if they do not match, return the error #SVN_ERR_RA_OUT_OF_DATE.
5081 * This is to help clients support interactive editing of revprops:
5082 * without this check, the window during which the property may change
5083 * underneath the user is as wide as the amount of time the user
5084 * spends editing the property. With this check, the window is
5085 * reduced to a small, constant amount of time right before we set the
5086 * new value. (To check that an old value is still non-existent, set
5087 * @a original_propval->data to NULL, and @a original_propval->len is
5089 * If the server advertises #SVN_RA_CAPABILITY_ATOMIC_REVPROPS, the
5090 * check of @a original_propval is done atomically.
5092 * Note: the representation of "property is not set" in @a
5093 * original_propval differs from the representation in other APIs
5094 * (such as svn_fs_change_rev_prop2() and svn_ra_change_rev_prop2()).
5096 * If @a force is TRUE, allow newlines in the author property.
5098 * If @a propname is an svn-controlled property (i.e. prefixed with
5099 * #SVN_PROP_PREFIX), then the caller is responsible for ensuring that
5100 * the value UTF8-encoded and uses LF line-endings.
5102 * Note that unlike its cousin svn_client_propset3(), this routine
5103 * doesn't affect the working copy at all; it's a pure network
5104 * operation that changes an *unversioned* property attached to a
5105 * revision. This can be used to tweak log messages, dates, authors,
5106 * and the like. Be careful: it's a lossy operation.
5108 * @a ctx->notify_func2 and @a ctx->notify_baton2 are the notification
5109 * functions and baton which are called upon successful setting of the
5112 * Also note that unless the administrator creates a
5113 * pre-revprop-change hook in the repository, this feature will fail.
5115 * @since New in 1.6.
5118 svn_client_revprop_set2(const char *propname,
5119 const svn_string_t *propval,
5120 const svn_string_t *original_propval,
5122 const svn_opt_revision_t *revision,
5123 svn_revnum_t *set_rev,
5124 svn_boolean_t force,
5125 svn_client_ctx_t *ctx,
5129 * Similar to svn_client_revprop_set2(), but with @a original_propval
5132 * @deprecated Provided for backward compatibility with the 1.5 API.
5136 svn_client_revprop_set(const char *propname,
5137 const svn_string_t *propval,
5139 const svn_opt_revision_t *revision,
5140 svn_revnum_t *set_rev,
5141 svn_boolean_t force,
5142 svn_client_ctx_t *ctx,
5146 * Set @a *props to a hash table whose keys are absolute paths or URLs
5147 * of items on which property @a propname is explicitly set, and whose
5148 * values are <tt>svn_string_t *</tt> representing the property value for
5149 * @a propname at that path.
5151 * If @a inherited_props is not @c NULL, then set @a *inherited_props to a
5152 * depth-first ordered array of #svn_prop_inherited_item_t * structures
5153 * representing the properties inherited by @a target. If @a target is a
5154 * working copy path, then properties inherited by @a target as far as the
5155 * root of the working copy are obtained from the working copy's actual
5156 * property values. Properties inherited from above the working copy root
5157 * come from the inherited properties cache. If @a target is a URL, then
5158 * the inherited properties come from the repository. If @a inherited_props
5159 * is not @c NULL and no inheritable properties are found, then set
5160 * @a *inherited_props to an empty array.
5162 * The #svn_prop_inherited_item_t->path_or_url members of the
5163 * #svn_prop_inherited_item_t * structures in @a *inherited_props are
5164 * URLs if @a target is a URL or if @a target is a working copy path but the
5165 * property represented by the structure is above the working copy root (i.e.
5166 * the inherited property is from the cache). In all other cases the
5167 * #svn_prop_inherited_item_t->path_or_url members are absolute working copy
5170 * Allocate @a *props (including keys and values) and @a *inherited_props
5171 * (including its elements) in @a result_pool, use @a scratch_pool for
5172 * temporary allocations.
5174 * @a target is a WC absolute path or a URL.
5176 * Don't store any path, not even @a target, if it does not have a
5177 * property named @a propname.
5179 * If @a revision->kind is #svn_opt_revision_unspecified, then: get
5180 * properties from the working copy if @a target is a working copy
5181 * path, or from the repository head if @a target is a URL. Else get
5182 * the properties as of @a revision. The actual node revision
5183 * selected is determined by the path as it exists in @a peg_revision.
5184 * If @a peg_revision->kind is #svn_opt_revision_unspecified, then
5185 * it defaults to #svn_opt_revision_head for URLs or
5186 * #svn_opt_revision_working for WC targets. Use the authentication
5187 * baton in @a ctx for authentication if contacting the repository.
5188 * If @a actual_revnum is not @c NULL, the actual revision number used
5189 * for the fetch is stored in @a *actual_revnum.
5191 * If @a depth is #svn_depth_empty, fetch the property from
5192 * @a target only; if #svn_depth_files, fetch from @a target and its
5193 * file children (if any); if #svn_depth_immediates, from @a target
5194 * and all of its immediate children (both files and directories); if
5195 * #svn_depth_infinity, from @a target and everything beneath it.
5197 * @a changelists is an array of <tt>const char *</tt> changelist
5198 * names, used as a restrictive filter on items whose properties are
5199 * gotten; that is, don't get @a propname on any item unless it's a member
5200 * of one of those changelists. If @a changelists is empty (or
5201 * altogether @c NULL), no changelist filtering occurs.
5203 * If error, don't touch @a *props, otherwise @a *props is a hash table
5206 * This function returns SVN_ERR_UNVERSIONED_RESOURCE when it is called on
5207 * unversioned nodes.
5209 * @since New in 1.8.
5212 svn_client_propget5(apr_hash_t **props,
5213 apr_array_header_t **inherited_props,
5214 const char *propname,
5215 const char *target, /* abspath or URL */
5216 const svn_opt_revision_t *peg_revision,
5217 const svn_opt_revision_t *revision,
5218 svn_revnum_t *actual_revnum,
5220 const apr_array_header_t *changelists,
5221 svn_client_ctx_t *ctx,
5222 apr_pool_t *result_pool,
5223 apr_pool_t *scratch_pool);
5226 * Similar to svn_client_propget5 but with @a inherited_props always
5229 * @since New in 1.7.
5230 * @deprecated Provided for backward compatibility with the 1.7 API.
5234 svn_client_propget4(apr_hash_t **props,
5235 const char *propname,
5236 const char *target, /* abspath or URL */
5237 const svn_opt_revision_t *peg_revision,
5238 const svn_opt_revision_t *revision,
5239 svn_revnum_t *actual_revnum,
5241 const apr_array_header_t *changelists,
5242 svn_client_ctx_t *ctx,
5243 apr_pool_t *result_pool,
5244 apr_pool_t *scratch_pool);
5247 * Similar to svn_client_propget4(), but with the following change to the
5248 * output hash keys: keys are `<tt>char *</tt>' paths, prefixed by
5249 * @a target, which is a working copy path or a URL.
5251 * This function returns SVN_ERR_ENTRY_NOT_FOUND where svn_client_propget4
5252 * would return SVN_ERR_UNVERSIONED_RESOURCE.
5254 * @since New in 1.5.
5255 * @deprecated Provided for backward compatibility with the 1.6 API.
5259 svn_client_propget3(apr_hash_t **props,
5260 const char *propname,
5262 const svn_opt_revision_t *peg_revision,
5263 const svn_opt_revision_t *revision,
5264 svn_revnum_t *actual_revnum,
5266 const apr_array_header_t *changelists,
5267 svn_client_ctx_t *ctx,
5271 * Similar to svn_client_propget3(), except that @a actual_revnum and
5272 * @a changelists are always @c NULL, and @a depth is set according to
5273 * @a recurse: if @a recurse is TRUE, then @a depth is
5274 * #svn_depth_infinity, else #svn_depth_empty.
5276 * @deprecated Provided for backward compatibility with the 1.4 API.
5280 svn_client_propget2(apr_hash_t **props,
5281 const char *propname,
5283 const svn_opt_revision_t *peg_revision,
5284 const svn_opt_revision_t *revision,
5285 svn_boolean_t recurse,
5286 svn_client_ctx_t *ctx,
5290 * Similar to svn_client_propget2(), except that @a peg_revision is
5291 * always the same as @a revision.
5293 * @deprecated Provided for backward compatibility with the 1.1 API.
5297 svn_client_propget(apr_hash_t **props,
5298 const char *propname,
5300 const svn_opt_revision_t *revision,
5301 svn_boolean_t recurse,
5302 svn_client_ctx_t *ctx,
5305 /** Set @a *propval to the value of @a propname on revision @a revision
5306 * in the repository represented by @a URL. Use the authentication baton
5307 * in @a ctx for authentication, and @a pool for all memory allocation.
5308 * Return the actual rev queried in @a *set_rev.
5310 * If @a propname does not exist on @a revision, set @a *propval to @c NULL.
5312 * Note that unlike its cousin svn_client_propget(), this routine
5313 * doesn't affect the working copy at all; it's a pure network
5314 * operation that queries an *unversioned* property attached to a
5315 * revision. This can query log messages, dates, authors, and the
5319 svn_client_revprop_get(const char *propname,
5320 svn_string_t **propval,
5322 const svn_opt_revision_t *revision,
5323 svn_revnum_t *set_rev,
5324 svn_client_ctx_t *ctx,
5328 * Invoke @a receiver with @a receiver_baton to return the regular explicit, and
5329 * possibly the inherited, properties of @a target, a URL or working copy path.
5330 * @a receiver will be called for each path encountered.
5332 * @a target is a WC path or a URL.
5334 * If @a revision->kind is #svn_opt_revision_unspecified, then get the
5335 * explicit (and possibly the inherited) properties from the working copy,
5336 * if @a target is a working copy path, or from the repository head if
5337 * @a target is a URL. Else get the properties as of @a revision.
5338 * The actual node revision selected is determined by the path as it exists
5339 * in @a peg_revision. If @a peg_revision->kind is
5340 * #svn_opt_revision_unspecified, then it defaults to #svn_opt_revision_head
5341 * for URLs or #svn_opt_revision_working for WC targets. Use the
5342 * authentication baton cached in @a ctx for authentication if contacting
5345 * If @a depth is #svn_depth_empty, list only the properties of
5346 * @a target itself. If @a depth is #svn_depth_files, and
5347 * @a target is a directory, list the properties of @a target
5348 * and its file entries. If #svn_depth_immediates, list the properties
5349 * of its immediate file and directory entries. If #svn_depth_infinity,
5350 * list the properties of its file entries and recurse (with
5351 * #svn_depth_infinity) on directory entries. #svn_depth_unknown is
5352 * equivalent to #svn_depth_empty. All other values produce undefined
5355 * @a changelists is an array of <tt>const char *</tt> changelist
5356 * names, used as a restrictive filter on items whose properties are
5357 * listed; that is, don't list properties on any item unless it's a member
5358 * of one of those changelists. If @a changelists is empty (or
5359 * altogether @c NULL), no changelist filtering occurs.
5361 * If @a get_target_inherited_props is true, then also return any inherited
5362 * properties when @a receiver is called for @a target. If @a target is a
5363 * working copy path, then properties inherited by @a target as far as the
5364 * root of the working copy are obtained from the working copy's actual
5365 * property values. Properties inherited from above the working copy
5366 * root come from the inherited properties cache. If @a target is a URL,
5367 * then the inherited properties come from the repository.
5368 * If @a get_target_inherited_props is false, then no inherited properties
5369 * are returned to @a receiver.
5371 * If @a target is not found, return the error #SVN_ERR_ENTRY_NOT_FOUND.
5373 * @since New in 1.8.
5376 svn_client_proplist4(const char *target,
5377 const svn_opt_revision_t *peg_revision,
5378 const svn_opt_revision_t *revision,
5380 const apr_array_header_t *changelists,
5381 svn_boolean_t get_target_inherited_props,
5382 svn_proplist_receiver2_t receiver,
5383 void *receiver_baton,
5384 svn_client_ctx_t *ctx,
5385 apr_pool_t *scratch_pool);
5388 * Similar to svn_client_proplist4(), except that the @a receiver type
5389 * is a #svn_proplist_receiver_t, @a get_target_inherited_props is
5390 * always passed NULL, and there is no separate scratch pool.
5392 * @since New in 1.5.
5393 * @deprecated Provided for backward compatibility with the 1.7 API.
5397 svn_client_proplist3(const char *target,
5398 const svn_opt_revision_t *peg_revision,
5399 const svn_opt_revision_t *revision,
5401 const apr_array_header_t *changelists,
5402 svn_proplist_receiver_t receiver,
5403 void *receiver_baton,
5404 svn_client_ctx_t *ctx,
5408 * Similar to svn_client_proplist3(), except the properties are
5409 * returned as an array of #svn_client_proplist_item_t * structures
5410 * instead of by invoking the receiver function, there's no support
5411 * for @a changelists filtering, and @a recurse is used instead of a
5412 * #svn_depth_t parameter (FALSE corresponds to #svn_depth_empty,
5413 * and TRUE to #svn_depth_infinity).
5415 * @since New in 1.2.
5417 * @deprecated Provided for backward compatibility with the 1.4 API.
5421 svn_client_proplist2(apr_array_header_t **props,
5423 const svn_opt_revision_t *peg_revision,
5424 const svn_opt_revision_t *revision,
5425 svn_boolean_t recurse,
5426 svn_client_ctx_t *ctx,
5430 * Similar to svn_client_proplist2(), except that @a peg_revision is
5431 * always the same as @a revision.
5433 * @deprecated Provided for backward compatibility with the 1.1 API.
5437 svn_client_proplist(apr_array_header_t **props,
5439 const svn_opt_revision_t *revision,
5440 svn_boolean_t recurse,
5441 svn_client_ctx_t *ctx,
5444 /** Set @a *props to a hash of the revision props attached to @a revision in
5445 * the repository represented by @a URL. Use the authentication baton cached
5446 * in @a ctx for authentication, and @a pool for all memory allocation.
5447 * Return the actual rev queried in @a *set_rev.
5449 * The allocated hash maps (<tt>const char *</tt>) property names to
5450 * (#svn_string_t *) property values.
5452 * Note that unlike its cousin svn_client_proplist(), this routine
5453 * doesn't read a working copy at all; it's a pure network operation
5454 * that reads *unversioned* properties attached to a revision.
5457 svn_client_revprop_list(apr_hash_t **props,
5459 const svn_opt_revision_t *revision,
5460 svn_revnum_t *set_rev,
5461 svn_client_ctx_t *ctx,
5467 * @defgroup Export Export a tree from version control.
5473 * Export the contents of either a subversion repository or a
5474 * subversion working copy into a 'clean' directory (meaning a
5475 * directory with no administrative directories). If @a result_rev
5476 * is not @c NULL and the path being exported is a repository URL, set
5477 * @a *result_rev to the value of the revision actually exported (set
5478 * it to #SVN_INVALID_REVNUM for local exports).
5480 * @a from_path_or_url is either the path the working copy on disk, or
5481 * a URL to the repository you wish to export.
5483 * When exporting a directory, @a to_path is the path to the directory
5484 * where you wish to create the exported tree; when exporting a file, it
5485 * is the path of the file that will be created. If @a to_path is the
5486 * empty path, then the basename of the export file/directory in the repository
5487 * will be used. If @a to_path represents an existing directory, and a
5488 * file is being exported, then a file with the that basename will be
5489 * created under that directory (as with 'copy' operations).
5491 * @a peg_revision is the revision where the path is first looked up
5492 * when exporting from a repository. If @a peg_revision->kind is
5493 * #svn_opt_revision_unspecified, then it defaults to #svn_opt_revision_head
5494 * for URLs or #svn_opt_revision_working for WC targets.
5496 * @a revision is the revision that should be exported, which is only used
5497 * when exporting from a repository.
5499 * @a peg_revision and @a revision must not be @c NULL.
5501 * @a ctx->notify_func2 and @a ctx->notify_baton2 are the notification
5502 * functions and baton which are passed to svn_client_checkout() when
5503 * exporting from a repository.
5505 * @a ctx is a context used for authentication in the repository case.
5507 * @a overwrite if TRUE will cause the export to overwrite files or
5510 * If @a ignore_externals is set, don't process externals definitions
5511 * as part of this operation.
5513 * If @a ignore_keywords is set, don't expand keywords as part of this
5516 * @a native_eol allows you to override the standard eol marker on the
5517 * platform you are running on. Can be either "LF", "CR" or "CRLF" or
5518 * NULL. If NULL will use the standard eol marker. Any other value
5519 * will cause the #SVN_ERR_IO_UNKNOWN_EOL error to be returned.
5521 * If @a depth is #svn_depth_infinity, export fully recursively. Else
5522 * if it is #svn_depth_immediates, export @a from_path_or_url and its
5523 * immediate children (if any), but with subdirectories empty and at
5524 * #svn_depth_empty. Else if #svn_depth_files, export @a
5525 * from_path_or_url and its immediate file children (if any) only. If
5526 * @a depth is #svn_depth_empty, then export exactly @a
5527 * from_path_or_url and none of its children.
5529 * All allocations are done in @a pool.
5531 * @since New in 1.7.
5534 svn_client_export5(svn_revnum_t *result_rev,
5535 const char *from_path_or_url,
5536 const char *to_path,
5537 const svn_opt_revision_t *peg_revision,
5538 const svn_opt_revision_t *revision,
5539 svn_boolean_t overwrite,
5540 svn_boolean_t ignore_externals,
5541 svn_boolean_t ignore_keywords,
5543 const char *native_eol,
5544 svn_client_ctx_t *ctx,
5548 * Similar to svn_client_export5(), but with @a ignore_keywords set
5551 * @deprecated Provided for backward compatibility with the 1.6 API.
5552 * @since New in 1.5.
5556 svn_client_export4(svn_revnum_t *result_rev,
5557 const char *from_path_or_url,
5558 const char *to_path,
5559 const svn_opt_revision_t *peg_revision,
5560 const svn_opt_revision_t *revision,
5561 svn_boolean_t overwrite,
5562 svn_boolean_t ignore_externals,
5564 const char *native_eol,
5565 svn_client_ctx_t *ctx,
5570 * Similar to svn_client_export4(), but with @a depth set according to
5571 * @a recurse: if @a recurse is TRUE, set @a depth to
5572 * #svn_depth_infinity, if @a recurse is FALSE, set @a depth to
5575 * @deprecated Provided for backward compatibility with the 1.4 API.
5577 * @since New in 1.2.
5581 svn_client_export3(svn_revnum_t *result_rev,
5582 const char *from_path_or_url,
5583 const char *to_path,
5584 const svn_opt_revision_t *peg_revision,
5585 const svn_opt_revision_t *revision,
5586 svn_boolean_t overwrite,
5587 svn_boolean_t ignore_externals,
5588 svn_boolean_t recurse,
5589 const char *native_eol,
5590 svn_client_ctx_t *ctx,
5595 * Similar to svn_client_export3(), but with @a peg_revision
5596 * always set to #svn_opt_revision_unspecified, @a overwrite set to
5597 * the value of @a force, @a ignore_externals always FALSE, and
5598 * @a recurse always TRUE.
5600 * @since New in 1.1.
5601 * @deprecated Provided for backward compatibility with the 1.1 API.
5605 svn_client_export2(svn_revnum_t *result_rev,
5606 const char *from_path_or_url,
5607 const char *to_path,
5608 svn_opt_revision_t *revision,
5609 svn_boolean_t force,
5610 const char *native_eol,
5611 svn_client_ctx_t *ctx,
5616 * Similar to svn_client_export2(), but with @a native_eol always set
5619 * @deprecated Provided for backward compatibility with the 1.0 API.
5623 svn_client_export(svn_revnum_t *result_rev,
5624 const char *from_path_or_url,
5625 const char *to_path,
5626 svn_opt_revision_t *revision,
5627 svn_boolean_t force,
5628 svn_client_ctx_t *ctx,
5634 * @defgroup List List / ls
5639 /** The type of function invoked by svn_client_list3() to report the details
5640 * of each directory entry being listed.
5642 * @a baton is the baton that was passed to the caller. @a path is the
5643 * entry's path relative to @a abs_path; it is the empty path when reporting
5644 * the top node of the list operation. @a dirent contains some or all of
5645 * the directory entry's details, as determined by the caller. @a lock is
5646 * the entry's lock, if it is locked and if lock information is being
5647 * reported by the caller; otherwise @a lock is NULL. @a abs_path is the
5648 * repository path of the top node of the list operation; it is relative to
5649 * the repository root and begins with "/".
5651 * If svn_client_list3() was called with @a include_externals set to TRUE,
5652 * @a external_parent_url and @a external_target will be set.
5653 * @a external_parent_url is url of the directory which has the
5654 * externals definitions. @a external_target is the target subdirectory of
5655 * externals definitions which is relative to the parent directory that holds
5656 * the external item.
5658 * If external_parent_url and external_target are defined, the item being
5659 * listed is part of the external described by external_parent_url and
5660 * external_target. Else, the item is not part of any external.
5661 * Moreover, we will never mix items which are part of separate
5662 * externals, and will always finish listing an external before listing
5665 * @a scratch_pool may be used for temporary allocations.
5667 * @since New in 1.8.
5669 typedef svn_error_t *(*svn_client_list_func2_t)(
5672 const svn_dirent_t *dirent,
5673 const svn_lock_t *lock,
5674 const char *abs_path,
5675 const char *external_parent_url,
5676 const char *external_target,
5677 apr_pool_t *scratch_pool);
5680 * Similar to #svn_client_list_func2_t, but without any information about
5681 * externals definitions.
5683 * @deprecated Provided for backward compatibility with the 1.7 API.
5688 typedef svn_error_t *(*svn_client_list_func_t)(void *baton,
5690 const svn_dirent_t *dirent,
5691 const svn_lock_t *lock,
5692 const char *abs_path,
5696 * Report the directory entry, and possibly children, for @a
5697 * path_or_url at @a revision. The actual node revision selected is
5698 * determined by the path as it exists in @a peg_revision. If @a
5699 * peg_revision->kind is #svn_opt_revision_unspecified, then it defaults
5700 * to #svn_opt_revision_head for URLs or #svn_opt_revision_working
5703 * Report directory entries by invoking @a list_func/@a baton with @a path
5704 * relative to @a path_or_url. The dirent for @a path_or_url is reported
5705 * using an empty @a path. If @a path_or_url is a directory, also report
5706 * its children. If @a path_or_url is non-existent, return
5707 * #SVN_ERR_FS_NOT_FOUND.
5709 * If @a fetch_locks is TRUE, include locks when reporting directory entries.
5711 * If @a include_externals is TRUE, also list all external items
5712 * reached by recursion. @a depth value passed to the original list target
5713 * applies for the externals also.
5715 * Use @a pool for temporary allocations.
5717 * Use authentication baton cached in @a ctx to authenticate against the
5720 * If @a depth is #svn_depth_empty, list just @a path_or_url itself.
5721 * If @a depth is #svn_depth_files, list @a path_or_url and its file
5722 * entries. If #svn_depth_immediates, list its immediate file and
5723 * directory entries. If #svn_depth_infinity, list file entries and
5724 * recurse (with #svn_depth_infinity) on directory entries.
5726 * @a dirent_fields controls which fields in the #svn_dirent_t's are
5727 * filled in. To have them totally filled in use #SVN_DIRENT_ALL,
5728 * otherwise simply bitwise OR together the combination of @c SVN_DIRENT_
5729 * fields you care about.
5731 * @since New in 1.8.
5734 svn_client_list3(const char *path_or_url,
5735 const svn_opt_revision_t *peg_revision,
5736 const svn_opt_revision_t *revision,
5738 apr_uint32_t dirent_fields,
5739 svn_boolean_t fetch_locks,
5740 svn_boolean_t include_externals,
5741 svn_client_list_func2_t list_func,
5743 svn_client_ctx_t *ctx,
5747 /** Similar to svn_client_list3(), but with @a include_externals set
5748 * to FALSE, and using a #svn_client_list_func_t as callback.
5750 * @deprecated Provided for backwards compatibility with the 1.7 API.
5752 * @since New in 1.5.
5756 svn_client_list2(const char *path_or_url,
5757 const svn_opt_revision_t *peg_revision,
5758 const svn_opt_revision_t *revision,
5760 apr_uint32_t dirent_fields,
5761 svn_boolean_t fetch_locks,
5762 svn_client_list_func_t list_func,
5764 svn_client_ctx_t *ctx,
5768 * Similar to svn_client_list2(), but with @a recurse instead of @a depth.
5769 * If @a recurse is TRUE, pass #svn_depth_files for @a depth; else
5770 * pass #svn_depth_infinity.
5772 * @since New in 1.4.
5774 * @deprecated Provided for backward compatibility with the 1.4 API.
5778 svn_client_list(const char *path_or_url,
5779 const svn_opt_revision_t *peg_revision,
5780 const svn_opt_revision_t *revision,
5781 svn_boolean_t recurse,
5782 apr_uint32_t dirent_fields,
5783 svn_boolean_t fetch_locks,
5784 svn_client_list_func_t list_func,
5786 svn_client_ctx_t *ctx,
5790 * Same as svn_client_list(), but always passes #SVN_DIRENT_ALL for
5791 * the @a dirent_fields argument and returns all information in two
5792 * hash tables instead of invoking a callback.
5794 * Set @a *dirents to a newly allocated hash of directory entries.
5795 * The @a dirents hash maps entry names (<tt>const char *</tt>) to
5796 * #svn_dirent_t *'s.
5798 * If @a locks is not @c NULL, set @a *locks to a hash table mapping
5799 * entry names (<tt>const char *</tt>) to #svn_lock_t *'s.
5801 * @since New in 1.3.
5803 * @deprecated Provided for backward compatibility with the 1.3 API.
5804 * Use svn_client_list2() instead.
5808 svn_client_ls3(apr_hash_t **dirents,
5810 const char *path_or_url,
5811 const svn_opt_revision_t *peg_revision,
5812 const svn_opt_revision_t *revision,
5813 svn_boolean_t recurse,
5814 svn_client_ctx_t *ctx,
5818 * Same as svn_client_ls3(), but without the ability to get locks.
5820 * @since New in 1.2.
5822 * @deprecated Provided for backward compatibility with the 1.2 API.
5823 * Use svn_client_list2() instead.
5827 svn_client_ls2(apr_hash_t **dirents,
5828 const char *path_or_url,
5829 const svn_opt_revision_t *peg_revision,
5830 const svn_opt_revision_t *revision,
5831 svn_boolean_t recurse,
5832 svn_client_ctx_t *ctx,
5836 * Similar to svn_client_ls2() except that @a peg_revision is always
5837 * the same as @a revision.
5839 * @deprecated Provided for backward compatibility with the 1.1 API.
5840 * Use svn_client_list2() instead.
5844 svn_client_ls(apr_hash_t **dirents,
5845 const char *path_or_url,
5846 svn_opt_revision_t *revision,
5847 svn_boolean_t recurse,
5848 svn_client_ctx_t *ctx,
5855 * @defgroup Cat View the contents of a file in the repository.
5861 * Output the content of a file.
5863 * @param[out] props Optional output argument to obtain properties.
5864 * @param[in] out The stream to which the content will be written.
5865 * @param[in] path_or_url The path or URL of the file.
5866 * @param[in] peg_revision The peg revision.
5867 * @param[in] revision The operative revision.
5868 * @param[in] expand_keywords When true, keywords (when set) are expanded.
5869 * @param[in] ctx The standard client context, used for possible
5872 * @return A pointer to an #svn_error_t of the type (this list is not
5874 * An unspecified error if @a revision is of kind
5875 * #svn_opt_revision_previous (or some other kind that requires
5876 * a local path), because the desired revision cannot be
5878 * If no error occurred, return #SVN_NO_ERROR.
5880 * If @a *props is not NULL it is set to a hash of all the file's
5881 * non-inherited properties. If it is NULL, the properties are only
5882 * used for determining how and if the file should be translated.
5884 * @see #svn_client_ctx_t <br> @ref clnt_revisions for
5885 * a discussion of operative and peg revisions.
5887 * @since New in 1.9.
5890 svn_client_cat3(apr_hash_t **props,
5892 const char *path_or_url,
5893 const svn_opt_revision_t *peg_revision,
5894 const svn_opt_revision_t *revision,
5895 svn_boolean_t expand_keywords,
5896 svn_client_ctx_t *ctx,
5897 apr_pool_t *result_pool,
5898 apr_pool_t *scratch_pool);
5901 * Similar to svn_client_cat3() except without the option of directly
5902 * reading the properties, and with @a expand_keywords always TRUE.
5904 * @since New in 1.2.
5905 * @deprecated Provided for backward compatibility with the 1.8 API.
5909 svn_client_cat2(svn_stream_t *out,
5910 const char *path_or_url,
5911 const svn_opt_revision_t *peg_revision,
5912 const svn_opt_revision_t *revision,
5913 svn_client_ctx_t *ctx,
5918 * Similar to svn_client_cat2() except that the peg revision is always
5919 * the same as @a revision.
5921 * @deprecated Provided for backward compatibility with the 1.1 API.
5925 svn_client_cat(svn_stream_t *out,
5926 const char *path_or_url,
5927 const svn_opt_revision_t *revision,
5928 svn_client_ctx_t *ctx,
5931 /** @} end group: cat */
5935 /** Changelist commands
5937 * @defgroup svn_client_changelist_funcs Client Changelist Functions
5941 /** Implementation note:
5943 * For now, changelists are implemented by scattering the
5944 * associations across multiple .svn/entries files in a working copy.
5945 * However, this client API was written so that we have the option of
5946 * changing the underlying implementation -- we may someday want to
5947 * store changelist definitions in a centralized database.
5951 * Add each path in @a paths (recursing to @a depth as necessary) to
5952 * @a changelist. If a path is already a member of another
5953 * changelist, then remove it from the other changelist and add it to
5954 * @a changelist. (For now, a path cannot belong to two changelists
5957 * @a paths is an array of (const char *) local WC paths.
5959 * @a changelists is an array of <tt>const char *</tt> changelist
5960 * names, used as a restrictive filter on items whose changelist
5961 * assignments are adjusted; that is, don't tweak the changeset of any
5962 * item unless it's currently a member of one of those changelists.
5963 * If @a changelists is empty (or altogether @c NULL), no changelist
5966 * @note This metadata is purely a client-side "bookkeeping"
5967 * convenience, and is entirely managed by the working copy.
5969 * @since New in 1.5.
5972 svn_client_add_to_changelist(const apr_array_header_t *paths,
5973 const char *changelist,
5975 const apr_array_header_t *changelists,
5976 svn_client_ctx_t *ctx,
5980 * Remove each path in @a paths (recursing to @a depth as necessary)
5981 * from changelists to which they are currently assigned.
5983 * @a paths is an array of (const char *) local WC paths.
5985 * @a changelists is an array of <tt>const char *</tt> changelist
5986 * names, used as a restrictive filter on items whose changelist
5987 * assignments are removed; that is, don't remove from a changeset any
5988 * item unless it's currently a member of one of those changelists.
5989 * If @a changelists is empty (or altogether @c NULL), all changelist
5990 * assignments in and under each path in @a paths (to @a depth) will
5993 * @note This metadata is purely a client-side "bookkeeping"
5994 * convenience, and is entirely managed by the working copy.
5996 * @since New in 1.5.
5999 svn_client_remove_from_changelists(const apr_array_header_t *paths,
6001 const apr_array_header_t *changelists,
6002 svn_client_ctx_t *ctx,
6007 * Beginning at @a path, crawl to @a depth to discover every path in
6008 * or under @a path which belongs to one of the changelists in @a
6009 * changelists (an array of <tt>const char *</tt> changelist names).
6010 * If @a changelists is @c NULL, discover paths with any changelist.
6011 * Call @a callback_func (with @a callback_baton) each time a
6012 * changelist-having path is discovered.
6014 * @a path is a local WC path.
6016 * If @a ctx->cancel_func is not @c NULL, invoke it passing @a
6017 * ctx->cancel_baton during the recursive walk.
6019 * @since New in 1.5.
6022 svn_client_get_changelists(const char *path,
6023 const apr_array_header_t *changelists,
6025 svn_changelist_receiver_t callback_func,
6026 void *callback_baton,
6027 svn_client_ctx_t *ctx,
6034 /** Locking commands
6036 * @defgroup svn_client_locking_funcs Client Locking Functions
6041 * Lock @a targets in the repository. @a targets is an array of
6042 * <tt>const char *</tt> paths - either all working copy paths or all URLs.
6043 * All targets must be in the same repository.
6045 * If a target is already locked in the repository, no lock will be
6046 * acquired unless @a steal_lock is TRUE, in which case the locks are
6047 * stolen. @a comment, if non-NULL, is an xml-escapable description
6048 * stored with each lock in the repository. Each acquired lock will
6049 * be stored in the working copy if the targets are WC paths.
6051 * For each target @a ctx->notify_func2/notify_baton2 will be used to indicate
6052 * whether it was locked. An action of #svn_wc_notify_locked
6053 * means that the path was locked. If the path was not locked because
6054 * it was out of date or there was already a lock in the repository,
6055 * the notification function will be called with
6056 * #svn_wc_notify_failed_lock, and the error passed in the notification
6059 * Use @a pool for temporary allocations.
6061 * @since New in 1.2.
6064 svn_client_lock(const apr_array_header_t *targets,
6065 const char *comment,
6066 svn_boolean_t steal_lock,
6067 svn_client_ctx_t *ctx,
6071 * Unlock @a targets in the repository. @a targets is an array of
6072 * <tt>const char *</tt> paths - either all working copy paths or all URLs.
6073 * All targets must be in the same repository.
6075 * If the targets are WC paths, and @a break_lock is FALSE, the working
6076 * copy must contain a lock for each target.
6077 * If this is not the case, or the working copy lock doesn't match the
6078 * lock token in the repository, an error will be signaled.
6080 * If the targets are URLs, the locks may be broken even if @a break_lock
6081 * is FALSE, but only if the lock owner is the same as the
6082 * authenticated user.
6084 * If @a break_lock is TRUE, the locks will be broken in the
6085 * repository. In both cases, the locks, if any, will be removed from
6086 * the working copy if the targets are WC paths.
6088 * The notification functions in @a ctx will be called for each
6089 * target. If the target was successfully unlocked,
6090 * #svn_wc_notify_unlocked will be used. Else, if the error is
6091 * directly related to unlocking the path (see
6092 * #SVN_ERR_IS_UNLOCK_ERROR), #svn_wc_notify_failed_unlock will be
6093 * used and the error will be passed in the notification structure.
6095 * Use @a pool for temporary allocations.
6097 * @since New in 1.2.
6100 svn_client_unlock(const apr_array_header_t *targets,
6101 svn_boolean_t break_lock,
6102 svn_client_ctx_t *ctx,
6108 * @defgroup Info Show repository information about a working copy.
6113 /** The size of the file is unknown.
6114 * Used as value in fields of type @c apr_size_t in #svn_info_t.
6117 * @deprecated Provided for backward compatibility with the 1.6 API.
6119 #define SVN_INFO_SIZE_UNKNOWN ((apr_size_t) -1)
6122 * A structure which describes various system-generated metadata about
6123 * a working-copy path or URL.
6125 * @note Fields may be added to the end of this structure in future
6126 * versions. Therefore, users shouldn't allocate structures of this
6127 * type, to preserve binary compatibility.
6129 * @since New in 1.2.
6130 * @deprecated Provided for backward compatibility with the 1.6 API. The new
6131 * API is #svn_client_info2_t.
6133 typedef struct svn_info_t
6135 /** Where the item lives in the repository. */
6138 /** The revision of the object. If path_or_url is a working-copy
6139 * path, then this is its current working revnum. If path_or_url
6140 * is a URL, then this is the repos revision that path_or_url lives in. */
6143 /** The node's kind. */
6144 svn_node_kind_t kind;
6146 /** The root URL of the repository. */
6147 const char *repos_root_URL;
6149 /** The repository's UUID. */
6150 const char *repos_UUID;
6152 /** The last revision in which this object changed. */
6153 svn_revnum_t last_changed_rev;
6155 /** The date of the last_changed_rev. */
6156 apr_time_t last_changed_date;
6158 /** The author of the last_changed_rev. */
6159 const char *last_changed_author;
6161 /** An exclusive lock, if present. Could be either local or remote. */
6164 /** Whether or not to ignore the next 10 wc-specific fields. */
6165 svn_boolean_t has_wc_info;
6168 * @name Working-copy path fields
6169 * These things only apply to a working-copy path.
6170 * See svn_wc_entry_t for explanations.
6173 svn_wc_schedule_t schedule;
6174 const char *copyfrom_url;
6175 svn_revnum_t copyfrom_rev;
6176 apr_time_t text_time;
6177 apr_time_t prop_time; /* will always be 0 for svn 1.4 and later */
6178 const char *checksum;
6179 const char *conflict_old;
6180 const char *conflict_new;
6181 const char *conflict_wrk;
6182 const char *prejfile;
6183 /** @since New in 1.5. */
6184 const char *changelist;
6185 /** @since New in 1.5. */
6189 * Similar to working_size64, but will be #SVN_INFO_SIZE_UNKNOWN when
6190 * its value would overflow apr_size_t (so when size >= 4 GB - 1 byte).
6192 * @deprecated Provided for backward compatibility with the 1.5 API.
6194 apr_size_t working_size;
6199 * Similar to size64, but size will be #SVN_INFO_SIZE_UNKNOWN when
6200 * its value would overflow apr_size_t (so when size >= 4 GB - 1 byte).
6202 * @deprecated Provided for backward compatibility with the 1.5 API.
6207 * The size of the file in the repository (untranslated,
6208 * e.g. without adjustment of line endings and keyword
6209 * expansion). Only applicable for file -- not directory -- URLs.
6210 * For working copy paths, size64 will be #SVN_INVALID_FILESIZE.
6211 * @since New in 1.6.
6213 svn_filesize_t size64;
6216 * The size of the file after being translated into its local
6217 * representation, or #SVN_INVALID_FILESIZE if unknown.
6218 * Not applicable for directories.
6219 * @since New in 1.6.
6220 * @name Working-copy path fields
6223 svn_filesize_t working_size64;
6226 * Info on any tree conflict of which this node is a victim. Otherwise NULL.
6227 * @since New in 1.6.
6229 svn_wc_conflict_description_t *tree_conflict;
6237 * The callback invoked by svn_client_info2(). Each invocation
6238 * describes @a path with the information present in @a info. Note
6239 * that any fields within @a info may be NULL if information is
6240 * unavailable. Use @a pool for all temporary allocation.
6242 * @since New in 1.2.
6243 * @deprecated Provided for backward compatibility with the 1.6 API. The new
6244 * API is #svn_client_info_receiver2_t.
6246 typedef svn_error_t *(*svn_info_receiver_t)(
6249 const svn_info_t *info,
6253 * Return a duplicate of @a info, allocated in @a pool. No part of the new
6254 * structure will be shared with @a info.
6256 * @since New in 1.3.
6257 * @deprecated Provided for backward compatibility with the 1.6 API. The new
6258 * API is #svn_client_info2_dup().
6262 svn_info_dup(const svn_info_t *info,
6266 * A structure which describes various system-generated metadata about
6267 * a working-copy path or URL.
6269 * @note Fields may be added to the end of this structure in future
6270 * versions. Therefore, users shouldn't allocate structures of this
6271 * type, to preserve binary compatibility.
6273 * @since New in 1.7.
6275 typedef struct svn_client_info2_t
6277 /** Where the item lives in the repository. */
6280 /** The revision of the object. If the target is a working-copy
6281 * path, then this is its current working revnum. If the target
6282 * is a URL, then this is the repos revision that it lives in. */
6285 /** The root URL of the repository. */
6286 const char *repos_root_URL;
6288 /** The repository's UUID. */
6289 const char *repos_UUID;
6291 /** The node's kind. */
6292 svn_node_kind_t kind;
6294 /** The size of the file in the repository (untranslated,
6295 * e.g. without adjustment of line endings and keyword
6296 * expansion). Only applicable for file -- not directory -- URLs.
6297 * For working copy paths, @a size will be #SVN_INVALID_FILESIZE. */
6298 svn_filesize_t size;
6300 /** The last revision in which this object changed. */
6301 svn_revnum_t last_changed_rev;
6303 /** The date of the last_changed_rev. */
6304 apr_time_t last_changed_date;
6306 /** The author of the last_changed_rev. */
6307 const char *last_changed_author;
6309 /** An exclusive lock, if present. Could be either local or remote. */
6310 const svn_lock_t *lock;
6312 /** Possible information about the working copy, NULL if not valid. */
6313 const svn_wc_info_t *wc_info;
6315 } svn_client_info2_t;
6318 * Return a duplicate of @a info, allocated in @a pool. No part of the new
6319 * structure will be shared with @a info.
6321 * @since New in 1.7.
6323 svn_client_info2_t *
6324 svn_client_info2_dup(const svn_client_info2_t *info,
6328 * The callback invoked by info retrievers. Each invocation
6329 * describes @a abspath_or_url with the information present in @a info.
6330 * Use @a scratch_pool for all temporary allocation.
6332 * @since New in 1.7.
6334 typedef svn_error_t *(*svn_client_info_receiver2_t)(
6336 const char *abspath_or_url,
6337 const svn_client_info2_t *info,
6338 apr_pool_t *scratch_pool);
6341 * Invoke @a receiver with @a receiver_baton to return information
6342 * about @a abspath_or_url in @a revision. The information returned is
6343 * system-generated metadata, not the sort of "property" metadata
6344 * created by users. See #svn_client_info2_t.
6346 * If both revision arguments are either #svn_opt_revision_unspecified
6347 * or @c NULL, then information will be pulled solely from the working copy;
6348 * no network connections will be made.
6350 * Otherwise, information will be pulled from a repository. The
6351 * actual node revision selected is determined by the @a abspath_or_url
6352 * as it exists in @a peg_revision. If @a peg_revision->kind is
6353 * #svn_opt_revision_unspecified, then it defaults to
6354 * #svn_opt_revision_head for URLs or #svn_opt_revision_working for
6357 * If @a abspath_or_url is not a local path, then if @a revision is of
6358 * kind #svn_opt_revision_previous (or some other kind that requires
6359 * a local path), an error will be returned, because the desired
6360 * revision cannot be determined.
6362 * Use the authentication baton cached in @a ctx to authenticate
6363 * against the repository.
6365 * If @a abspath_or_url is a file, just invoke @a receiver on it. If it
6366 * is a directory, then descend according to @a depth. If @a depth is
6367 * #svn_depth_empty, invoke @a receiver on @a abspath_or_url and
6368 * nothing else; if #svn_depth_files, on @a abspath_or_url and its
6369 * immediate file children; if #svn_depth_immediates, the preceding
6370 * plus on each immediate subdirectory; if #svn_depth_infinity, then
6371 * recurse fully, invoking @a receiver on @a abspath_or_url and
6372 * everything beneath it.
6374 * If @a fetch_excluded is TRUE, also also send excluded nodes in the working
6375 * copy to @a receiver, otherwise these are skipped. If @a fetch_actual_only
6376 * is TRUE also send nodes that don't exist as versioned but are still
6379 * If @a include_externals is @c TRUE, recurse into externals and report about
6382 * @a changelists is an array of <tt>const char *</tt> changelist
6383 * names, used as a restrictive filter on items whose info is
6384 * reported; that is, don't report info about any item unless
6385 * it's a member of one of those changelists. If @a changelists is
6386 * empty (or altogether @c NULL), no changelist filtering occurs.
6388 * @since New in 1.9.
6391 svn_client_info4(const char *abspath_or_url,
6392 const svn_opt_revision_t *peg_revision,
6393 const svn_opt_revision_t *revision,
6395 svn_boolean_t fetch_excluded,
6396 svn_boolean_t fetch_actual_only,
6397 svn_boolean_t include_externals,
6398 const apr_array_header_t *changelists,
6399 svn_client_info_receiver2_t receiver,
6400 void *receiver_baton,
6401 svn_client_ctx_t *ctx,
6402 apr_pool_t *scratch_pool);
6405 /** Similar to svn_client_info4, but doesn't support walking externals.
6407 * @since New in 1.7.
6408 * @deprecated Provided for backward compatibility with the 1.8 API.
6412 svn_client_info3(const char *abspath_or_url,
6413 const svn_opt_revision_t *peg_revision,
6414 const svn_opt_revision_t *revision,
6416 svn_boolean_t fetch_excluded,
6417 svn_boolean_t fetch_actual_only,
6418 const apr_array_header_t *changelists,
6419 svn_client_info_receiver2_t receiver,
6420 void *receiver_baton,
6421 svn_client_ctx_t *ctx,
6422 apr_pool_t *scratch_pool);
6424 /** Similar to svn_client_info3, but uses an svn_info_receiver_t instead of
6425 * a #svn_client_info_receiver2_t, and @a path_or_url may be a relative path.
6427 * @since New in 1.5.
6428 * @deprecated Provided for backward compatibility with the 1.6 API.
6432 svn_client_info2(const char *path_or_url,
6433 const svn_opt_revision_t *peg_revision,
6434 const svn_opt_revision_t *revision,
6435 svn_info_receiver_t receiver,
6436 void *receiver_baton,
6438 const apr_array_header_t *changelists,
6439 svn_client_ctx_t *ctx,
6443 * Similar to svn_client_info2() but with @a changelists passed as @c
6444 * NULL, and @a depth set according to @a recurse: if @a recurse is
6445 * TRUE, @a depth is #svn_depth_infinity, else #svn_depth_empty.
6447 * @deprecated Provided for backward compatibility with the 1.4 API.
6451 svn_client_info(const char *path_or_url,
6452 const svn_opt_revision_t *peg_revision,
6453 const svn_opt_revision_t *revision,
6454 svn_info_receiver_t receiver,
6455 void *receiver_baton,
6456 svn_boolean_t recurse,
6457 svn_client_ctx_t *ctx,
6461 * Set @a *wcroot_abspath to the local abspath of the root of the
6462 * working copy in which @a local_abspath resides.
6464 * @since New in 1.7.
6467 svn_client_get_wc_root(const char **wcroot_abspath,
6468 const char *local_abspath,
6469 svn_client_ctx_t *ctx,
6470 apr_pool_t *result_pool,
6471 apr_pool_t *scratch_pool);
6474 * Set @a *min_revision and @a *max_revision to the lowest and highest
6475 * revision numbers found within @a local_abspath. If @a committed is
6476 * TRUE, set @a *min_revision and @a *max_revision to the lowest and
6477 * highest comitted (i.e. "last changed") revision numbers,
6478 * respectively. NULL may be passed for either of @a min_revision and
6479 * @a max_revision to indicate the caller's lack of interest in the
6480 * value. Use @a scratch_pool for temporary allocations.
6482 * @since New in 1.7.
6485 svn_client_min_max_revisions(svn_revnum_t *min_revision,
6486 svn_revnum_t *max_revision,
6487 const char *local_abspath,
6488 svn_boolean_t committed,
6489 svn_client_ctx_t *ctx,
6490 apr_pool_t *scratch_pool);
6496 * @defgroup Patch Apply a patch to the working copy
6502 * The callback invoked by svn_client_patch() before attempting to patch
6503 * the target file at @a canon_path_from_patchfile (the path as parsed from
6504 * the patch file, but in canonicalized form). The callback can set
6505 * @a *filtered to @c TRUE to prevent the file from being patched, or else
6506 * must set it to @c FALSE.
6508 * The callback is also provided with @a patch_abspath, the path of a
6509 * temporary file containing the patched result, and with @a reject_abspath,
6510 * the path to a temporary file containing the diff text of any hunks
6511 * which were rejected during patching.
6513 * Because the callback is invoked before the patching attempt is made,
6514 * there is no guarantee that the target file will actually be patched
6515 * successfully. Client implementations must pay attention to notification
6516 * feedback provided by svn_client_patch() to find out which paths were
6517 * patched successfully.
6519 * Note also that the files at @a patch_abspath and @a reject_abspath are
6520 * guaranteed to remain on disk after patching only if the
6521 * @a remove_tempfiles parameter for svn_client_patch() is @c FALSE.
6523 * The const char * parameters may be allocated in @a scratch_pool which
6524 * will be cleared after each invocation.
6526 * @since New in 1.7.
6528 typedef svn_error_t *(*svn_client_patch_func_t)(
6530 svn_boolean_t *filtered,
6531 const char *canon_path_from_patchfile,
6532 const char *patch_abspath,
6533 const char *reject_abspath,
6534 apr_pool_t *scratch_pool);
6537 * Apply a unidiff patch that's located at absolute path
6538 * @a patch_abspath to the working copy directory at @a wc_dir_abspath.
6540 * This function makes a best-effort attempt at applying the patch.
6541 * It might skip patch targets which cannot be patched (e.g. targets
6542 * that are outside of the working copy). It will also reject hunks
6543 * which cannot be applied to a target in case the hunk's context
6544 * does not match anywhere in the patch target.
6546 * If @a dry_run is TRUE, the patching process is carried out, and full
6547 * notification feedback is provided, but the working copy is not modified.
6549 * @a strip_count specifies how many leading path components should be
6550 * stripped from paths obtained from the patch. It is an error if a
6551 * negative strip count is passed.
6553 * If @a reverse is @c TRUE, apply patches in reverse, deleting lines
6554 * the patch would add and adding lines the patch would delete.
6556 * If @a ignore_whitespace is TRUE, allow patches to be applied if they
6557 * only differ from the target by whitespace.
6559 * If @a remove_tempfiles is TRUE, lifetimes of temporary files created
6560 * during patching will be managed internally. Otherwise, the caller should
6561 * take ownership of these files, the names of which can be obtained by
6562 * passing a @a patch_func callback.
6564 * If @a patch_func is non-NULL, invoke @a patch_func with @a patch_baton
6565 * for each patch target processed.
6567 * If @a ctx->notify_func2 is non-NULL, invoke @a ctx->notify_func2 with
6568 * @a ctx->notify_baton2 as patching progresses.
6570 * If @a ctx->cancel_func is non-NULL, invoke it passing @a
6571 * ctx->cancel_baton at various places during the operation.
6573 * Use @a scratch_pool for temporary allocations.
6575 * @since New in 1.7.
6578 svn_client_patch(const char *patch_abspath,
6579 const char *wc_dir_abspath,
6580 svn_boolean_t dry_run,
6582 svn_boolean_t reverse,
6583 svn_boolean_t ignore_whitespace,
6584 svn_boolean_t remove_tempfiles,
6585 svn_client_patch_func_t patch_func,
6587 svn_client_ctx_t *ctx,
6588 apr_pool_t *scratch_pool);
6592 /** @} end group: Client working copy management */
6596 * @defgroup clnt_sessions Client session related functions
6603 /* Converting paths to URLs. */
6605 /** Set @a *url to the URL for @a path_or_url allocated in result_pool.
6607 * If @a path_or_url is already a URL, set @a *url to @a path_or_url.
6609 * If @a path_or_url is a versioned item, set @a *url to @a
6610 * path_or_url's entry URL. If @a path_or_url is unversioned (has
6611 * no entry), set @a *url to NULL.
6613 * Use @a ctx->wc_ctx to retrieve the information. Use
6614 ** @a scratch_pool for temporary allocations.
6616 * @since New in 1.7.
6619 svn_client_url_from_path2(const char **url,
6620 const char *path_or_url,
6621 svn_client_ctx_t *ctx,
6622 apr_pool_t *result_pool,
6623 apr_pool_t *scratch_pool);
6625 /** Similar to svn_client_url_from_path2(), but without a context argument.
6627 * @since New in 1.5.
6628 * @deprecated Provided for backward compatibility with the 1.6 API.
6632 svn_client_url_from_path(const char **url,
6633 const char *path_or_url,
6638 /* Fetching a repository's root URL and UUID. */
6640 /** Set @a *repos_root_url and @a *repos_uuid, to the root URL and UUID of
6641 * the repository in which @a abspath_or_url is versioned. Use the
6642 * authentication baton and working copy context cached in @a ctx as
6643 * necessary. @a repos_root_url and/or @a repos_uuid may be NULL if not
6646 * This function will open a temporary RA session to the repository if
6647 * necessary to get the information.
6649 * Allocate @a *repos_root_url and @a *repos_uuid in @a result_pool.
6650 * Use @a scratch_pool for temporary allocations.
6652 * @since New in 1.8.
6655 svn_client_get_repos_root(const char **repos_root_url,
6656 const char **repos_uuid,
6657 const char *abspath_or_url,
6658 svn_client_ctx_t *ctx,
6659 apr_pool_t *result_pool,
6660 apr_pool_t *scratch_pool);
6662 /** Set @a *url to the repository root URL of the repository in which
6663 * @a path_or_url is versioned (or scheduled to be versioned),
6664 * allocated in @a pool. @a ctx is required for possible repository
6667 * @since New in 1.5.
6668 * @deprecated Provided for backward compatibility with the 1.7 API. Use
6669 * svn_client_get_repos_root() instead, with an absolute path.
6673 svn_client_root_url_from_path(const char **url,
6674 const char *path_or_url,
6675 svn_client_ctx_t *ctx,
6678 /** Get repository @a uuid for @a url.
6680 * Use a @a pool to open a temporary RA session to @a url, discover the
6681 * repository uuid, and free the session. Return the uuid in @a uuid,
6682 * allocated in @a pool. @a ctx is required for possible repository
6685 * @deprecated Provided for backward compatibility with the 1.7 API. Use
6686 * svn_client_get_repos_root() instead.
6690 svn_client_uuid_from_url(const char **uuid,
6692 svn_client_ctx_t *ctx,
6696 /** Return the repository @a uuid for working-copy @a local_abspath,
6697 * allocated in @a result_pool. Use @a ctx->wc_ctx to retrieve the
6700 * Use @a scratch_pool for temporary allocations.
6702 * @since New in 1.7.
6703 * @deprecated Provided for backward compatibility with the 1.7 API. Use
6704 * svn_client_get_repos_root() instead.
6708 svn_client_uuid_from_path2(const char **uuid,
6709 const char *local_abspath,
6710 svn_client_ctx_t *ctx,
6711 apr_pool_t *result_pool,
6712 apr_pool_t *scratch_pool);
6714 /** Similar to svn_client_uuid_from_path2(), but with a relative path and
6717 * @deprecated Provided for backward compatibility with the 1.6 API.
6721 svn_client_uuid_from_path(const char **uuid,
6723 svn_wc_adm_access_t *adm_access,
6724 svn_client_ctx_t *ctx,
6728 /* Opening RA sessions. */
6730 /** Open an RA session rooted at @a url, and return it in @a *session.
6732 * Use the authentication baton stored in @a ctx for authentication.
6733 * @a *session is allocated in @a result_pool.
6735 * If @a wri_abspath is not NULL, use the working copy identified by @a
6736 * wri_abspath to potentially avoid transferring unneeded data.
6738 * @note This function is similar to svn_ra_open4(), but the caller avoids
6739 * having to providing its own callback functions.
6740 * @since New in 1.8.
6743 svn_client_open_ra_session2(svn_ra_session_t **session,
6745 const char *wri_abspath,
6746 svn_client_ctx_t *ctx,
6747 apr_pool_t *result_pool,
6748 apr_pool_t *scratch_pool);
6750 /** Similar to svn_client_open_ra_session2(), but with @ wri_abspath
6751 * always passed as NULL, and with the same pool used as both @a
6752 * result_pool and @a scratch_pool.
6754 * @since New in 1.3.
6755 * @deprecated Provided for backward compatibility with the 1.7 API.
6759 svn_client_open_ra_session(svn_ra_session_t **session,
6761 svn_client_ctx_t *ctx,
6765 /** @} end group: Client session related functions */
6771 #endif /* __cplusplus */
6773 #endif /* SVN_CLIENT_H */