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 */
471 /** node kind (dir, file) */
472 svn_node_kind_t kind;
474 /** commit URL for this item */
477 /** revision of textbase */
478 svn_revnum_t revision;
480 /** copyfrom-url or NULL if not a copied item */
481 const char *copyfrom_url;
483 /** copyfrom-rev, valid when copyfrom_url != NULL */
484 svn_revnum_t copyfrom_rev;
487 apr_byte_t state_flags;
489 /** An array of #svn_prop_t *'s, which are incoming changes from
490 * the repository to WC properties. These changes are applied
493 * When adding to this array, allocate the #svn_prop_t and its
494 * contents in @c incoming_prop_changes->pool, so that it has the
495 * same lifetime as this data structure.
497 * See http://subversion.tigris.org/issues/show_bug.cgi?id=806 for a
498 * description of what would happen if the post-commit process
499 * didn't group these changes together with all other changes to the
502 apr_array_header_t *incoming_prop_changes;
504 /** An array of #svn_prop_t *'s, which are outgoing changes to
505 * make to properties in the repository. These extra property
506 * changes are declared pre-commit, and applied to the repository as
509 * When adding to this array, allocate the #svn_prop_t and its
510 * contents in @c outgoing_prop_changes->pool, so that it has the
511 * same lifetime as this data structure.
513 apr_array_header_t *outgoing_prop_changes;
516 * When processing the commit this contains the relative path for
517 * the commit session. #NULL until the commit item is preprocessed.
520 const char *session_relpath;
523 * When committing a move, this contains the absolute path where
524 * the node was directly moved from. (If an ancestor at the original
525 * location was moved then it points to where the node itself was
526 * moved from; not the original location.)
529 const char *moved_from_abspath;
531 } svn_client_commit_item3_t;
533 /** The commit candidate structure.
535 * @deprecated Provided for backward compatibility with the 1.4 API.
537 typedef struct svn_client_commit_item2_t
539 /** absolute working-copy path of item */
542 /** node kind (dir, file) */
543 svn_node_kind_t kind;
545 /** commit URL for this item */
548 /** revision of textbase */
549 svn_revnum_t revision;
551 /** copyfrom-url or NULL if not a copied item */
552 const char *copyfrom_url;
554 /** copyfrom-rev, valid when copyfrom_url != NULL */
555 svn_revnum_t copyfrom_rev;
558 apr_byte_t state_flags;
560 /** Analogous to the #svn_client_commit_item3_t.incoming_prop_changes
563 apr_array_header_t *wcprop_changes;
564 } svn_client_commit_item2_t;
566 /** The commit candidate structure.
568 * @deprecated Provided for backward compatibility with the 1.2 API.
570 typedef struct svn_client_commit_item_t
572 /** absolute working-copy path of item */
575 /** node kind (dir, file) */
576 svn_node_kind_t kind;
578 /** commit URL for this item */
581 /** revision (copyfrom-rev if _IS_COPY) */
582 svn_revnum_t revision;
585 const char *copyfrom_url;
588 apr_byte_t state_flags;
590 /** Analogous to the #svn_client_commit_item3_t.incoming_prop_changes
593 apr_array_header_t *wcprop_changes;
595 } svn_client_commit_item_t;
597 /** Return a new commit item object, allocated in @a pool.
599 * In order to avoid backwards compatibility problems, this function
600 * is used to initialize and allocate the #svn_client_commit_item3_t
601 * structure rather than doing so explicitly, as the size of this
602 * structure may change in the future.
606 svn_client_commit_item3_t *
607 svn_client_commit_item3_create(apr_pool_t *pool);
609 /** Like svn_client_commit_item3_create() but with a stupid "const"
610 * qualifier on the returned structure, and it returns an error that
613 * @deprecated Provided for backward compatibility with the 1.5 API.
617 svn_client_commit_item_create(const svn_client_commit_item3_t **item,
621 * Return a duplicate of @a item, allocated in @a pool. No part of the
622 * new structure will be shared with @a item, except for the adm_access
627 svn_client_commit_item3_t *
628 svn_client_commit_item3_dup(const svn_client_commit_item3_t *item,
632 * Return a duplicate of @a item, allocated in @a pool. No part of the new
633 * structure will be shared with @a item.
635 * @deprecated Provided for backward compatibility with the 1.4 API.
638 svn_client_commit_item2_t *
639 svn_client_commit_item2_dup(const svn_client_commit_item2_t *item,
642 /** Callback type used by commit-y operations to get a commit log message
645 * Set @a *log_msg to the log message for the commit, allocated in @a
646 * pool, or @c NULL if wish to abort the commit process. Set @a *tmp_file
647 * to the path of any temporary file which might be holding that log
648 * message, or @c NULL if no such file exists (though, if @a *log_msg is
649 * @c NULL, this value is undefined). The log message MUST be a UTF8
650 * string with LF line separators.
652 * @a commit_items is a read-only array of #svn_client_commit_item3_t
653 * structures, which may be fully or only partially filled-in,
654 * depending on the type of commit operation.
656 * @a baton is provided along with the callback for use by the handler.
658 * All allocations should be performed in @a pool.
662 typedef svn_error_t *(*svn_client_get_commit_log3_t)(
663 const char **log_msg,
664 const char **tmp_file,
665 const apr_array_header_t *commit_items,
669 /** Callback type used by commit-y operations to get a commit log message
672 * Set @a *log_msg to the log message for the commit, allocated in @a
673 * pool, or @c NULL if wish to abort the commit process. Set @a *tmp_file
674 * to the path of any temporary file which might be holding that log
675 * message, or @c NULL if no such file exists (though, if @a *log_msg is
676 * @c NULL, this value is undefined). The log message MUST be a UTF8
677 * string with LF line separators.
679 * @a commit_items is a read-only array of #svn_client_commit_item2_t
680 * structures, which may be fully or only partially filled-in,
681 * depending on the type of commit operation.
683 * @a baton is provided along with the callback for use by the handler.
685 * All allocations should be performed in @a pool.
687 * @deprecated Provided for backward compatibility with the 1.3 API.
689 typedef svn_error_t *(*svn_client_get_commit_log2_t)(
690 const char **log_msg,
691 const char **tmp_file,
692 const apr_array_header_t *commit_items,
696 /** Callback type used by commit-y operations to get a commit log message
699 * Set @a *log_msg to the log message for the commit, allocated in @a
700 * pool, or @c NULL if wish to abort the commit process. Set @a *tmp_file
701 * to the path of any temporary file which might be holding that log
702 * message, or @c NULL if no such file exists (though, if @a *log_msg is
703 * @c NULL, this value is undefined). The log message MUST be a UTF8
704 * string with LF line separators.
706 * @a commit_items is a read-only array of #svn_client_commit_item_t
707 * structures, which may be fully or only partially filled-in,
708 * depending on the type of commit operation.
710 * @a baton is provided along with the callback for use by the handler.
712 * All allocations should be performed in @a pool.
714 * @deprecated Provided for backward compatibility with the 1.2 API.
716 typedef svn_error_t *(*svn_client_get_commit_log_t)(
717 const char **log_msg,
718 const char **tmp_file,
719 apr_array_header_t *commit_items,
728 * @defgroup clnt_blame Client blame functionality
733 /** Callback type used by svn_client_blame5() to notify the caller
734 * that line @a line_no of the blamed file was last changed in @a revision
735 * which has the revision properties @a rev_props, and that the contents were
738 * @a start_revnum and @a end_revnum contain the start and end revision
739 * number of the entire blame operation, as determined from the repository
740 * inside svn_client_blame5(). This can be useful for the blame receiver
741 * to format the blame output.
743 * If svn_client_blame5() was called with @a include_merged_revisions set to
744 * TRUE, @a merged_revision, @a merged_rev_props and @a merged_path will be
745 * set, otherwise they will be NULL. @a merged_path will be set to the
746 * absolute repository path.
748 * All allocations should be performed in @a pool.
750 * @note If there is no blame information for this line, @a revision will be
751 * invalid and @a rev_props will be NULL. In this case @a local_change
752 * will be true if the reason there is no blame information is that the line
753 * was modified locally. In all other cases @a local_change will be false.
757 typedef svn_error_t *(*svn_client_blame_receiver3_t)(
759 svn_revnum_t start_revnum,
760 svn_revnum_t end_revnum,
762 svn_revnum_t revision,
763 apr_hash_t *rev_props,
764 svn_revnum_t merged_revision,
765 apr_hash_t *merged_rev_props,
766 const char *merged_path,
768 svn_boolean_t local_change,
772 * Similar to #svn_client_blame_receiver3_t, but with separate author and
773 * date revision properties instead of all revision properties, and without
774 * information about local changes.
776 * @deprecated Provided for backward compatibility with the 1.6 API.
780 typedef svn_error_t *(*svn_client_blame_receiver2_t)(
783 svn_revnum_t revision,
786 svn_revnum_t merged_revision,
787 const char *merged_author,
788 const char *merged_date,
789 const char *merged_path,
794 * Similar to #svn_client_blame_receiver2_t, but without @a merged_revision,
795 * @a merged_author, @a merged_date, or @a merged_path members.
797 * @note New in 1.4 is that the line is defined to contain only the line
798 * content (and no [partial] EOLs; which was undefined in older versions).
799 * Using this callback with svn_client_blame() or svn_client_blame2()
800 * will still give you the old behaviour.
802 * @deprecated Provided for backward compatibility with the 1.4 API.
804 typedef svn_error_t *(*svn_client_blame_receiver_t)(
807 svn_revnum_t revision,
819 * @defgroup clnt_diff Client diff functionality
823 /** The difference type in an svn_diff_summarize_t structure.
827 typedef enum svn_client_diff_summarize_kind_t
829 /** An item with no text modifications */
830 svn_client_diff_summarize_kind_normal,
833 svn_client_diff_summarize_kind_added,
835 /** An item with text modifications */
836 svn_client_diff_summarize_kind_modified,
838 /** A deleted item */
839 svn_client_diff_summarize_kind_deleted
840 } svn_client_diff_summarize_kind_t;
843 /** A struct that describes the diff of an item. Passed to
844 * #svn_client_diff_summarize_func_t.
846 * @note Fields may be added to the end of this structure in future
847 * versions. Therefore, users shouldn't allocate structures of this
848 * type, to preserve binary compatibility.
852 typedef struct svn_client_diff_summarize_t
854 /** Path relative to the target. If the target is a file, path is
855 * the empty string. */
859 svn_client_diff_summarize_kind_t summarize_kind;
861 /** Properties changed? For consistency with 'svn status' output,
862 * this should be false if summarize_kind is _added or _deleted. */
863 svn_boolean_t prop_changed;
866 svn_node_kind_t node_kind;
867 } svn_client_diff_summarize_t;
870 * Return a duplicate of @a diff, allocated in @a pool. No part of the new
871 * structure will be shared with @a diff.
875 svn_client_diff_summarize_t *
876 svn_client_diff_summarize_dup(const svn_client_diff_summarize_t *diff,
880 /** A callback used in svn_client_diff_summarize2() and
881 * svn_client_diff_summarize_peg2() for reporting a @a diff summary.
883 * All allocations should be performed in @a pool.
885 * @a baton is a closure object; it should be provided by the implementation,
886 * and passed by the caller.
890 typedef svn_error_t *(*svn_client_diff_summarize_func_t)(
891 const svn_client_diff_summarize_t *diff,
903 * @defgroup clnt_ctx Client context management
908 /** A client context structure, which holds client specific callbacks,
909 * batons, serves as a cache for configuration options, and other various
910 * and sundry things. In order to avoid backwards compatibility problems
911 * clients should use svn_client_create_context() to allocate and
912 * initialize this structure instead of doing so themselves.
914 typedef struct svn_client_ctx_t
916 /** main authentication baton. */
917 svn_auth_baton_t *auth_baton;
919 /** notification callback function.
920 * This will be called by notify_func2() by default.
921 * @deprecated Provided for backward compatibility with the 1.1 API.
922 * Use @c notify_func2 instead. */
923 svn_wc_notify_func_t notify_func;
925 /** notification callback baton for notify_func()
926 * @deprecated Provided for backward compatibility with the 1.1 API.
927 * Use @c notify_baton2 instead */
930 /** Log message callback function. NULL means that Subversion
931 * should try not attempt to fetch a log message.
932 * @deprecated Provided for backward compatibility with the 1.2 API.
933 * Use @c log_msg_func2 instead. */
934 svn_client_get_commit_log_t log_msg_func;
936 /** log message callback baton
937 * @deprecated Provided for backward compatibility with the 1.2 API.
938 * Use @c log_msg_baton2 instead. */
941 /** a hash mapping of <tt>const char *</tt> configuration file names to
942 * #svn_config_t *'s. For example, the '~/.subversion/config' file's
943 * contents should have the key "config". May be left unset (or set to
944 * NULL) to use the built-in default settings and not use any configuration.
948 /** a callback to be used to see if the client wishes to cancel the running
950 svn_cancel_func_t cancel_func;
952 /** a baton to pass to the cancellation callback. */
955 /** notification function, defaulting to a function that forwards
956 * to notify_func(). If @c NULL, it will not be invoked.
957 * @since New in 1.2. */
958 svn_wc_notify_func2_t notify_func2;
960 /** notification baton for notify_func2().
961 * @since New in 1.2. */
964 /** Log message callback function. NULL means that Subversion
965 * should try log_msg_func.
966 * @since New in 1.3. */
967 svn_client_get_commit_log2_t log_msg_func2;
969 /** callback baton for log_msg_func2
970 * @since New in 1.3. */
971 void *log_msg_baton2;
973 /** Notification callback for network progress information.
974 * May be NULL if not used.
975 * @since New in 1.3. */
976 svn_ra_progress_notify_func_t progress_func;
978 /** Callback baton for progress_func.
979 * @since New in 1.3. */
980 void *progress_baton;
982 /** Log message callback function. NULL means that Subversion
983 * should try @c log_msg_func2, then @c log_msg_func.
984 * @since New in 1.5. */
985 svn_client_get_commit_log3_t log_msg_func3;
987 /** The callback baton for @c log_msg_func3.
988 * @since New in 1.5. */
989 void *log_msg_baton3;
992 * @since New in 1.5. */
993 apr_hash_t *mimetypes_map;
995 /** Conflict resolution callback and baton, if available.
996 * @since New in 1.5. */
997 svn_wc_conflict_resolver_func_t conflict_func;
998 void *conflict_baton;
1000 /** Custom client name string, or @c NULL.
1001 * @since New in 1.5. */
1002 const char *client_name;
1004 /** Conflict resolution callback and baton, if available. NULL means that
1005 * subversion should try @c conflict_func.
1006 * @since New in 1.7. */
1007 svn_wc_conflict_resolver_func2_t conflict_func2;
1008 void *conflict_baton2;
1010 /** A working copy context for the client operation to use.
1011 * This is initialized by svn_client_create_context() and should never
1014 * @since New in 1.7. */
1015 svn_wc_context_t *wc_ctx;
1019 /** Initialize a client context.
1020 * Set @a *ctx to a client context object, allocated in @a pool, that
1021 * represents a particular instance of an svn client. @a cfg_hash is used
1022 * to initialise the config member of the returned context object and should
1023 * remain valid for the lifetime of the object. @a cfg_hash may be @c NULL,
1024 * in which case it is ignored.
1026 * In order to avoid backwards compatibility problems, clients must
1027 * use this function to initialize and allocate the
1028 * #svn_client_ctx_t structure rather than doing so themselves, as
1029 * the size of this structure may change in the future.
1031 * The current implementation never returns error, but callers should
1032 * still check for error, for compatibility with future versions.
1034 * @since New in 1.8.
1037 svn_client_create_context2(svn_client_ctx_t **ctx,
1038 apr_hash_t *cfg_hash,
1042 /** Similar to svn_client_create_context2 but passes a NULL @a cfg_hash.
1044 * @deprecated Provided for backward compatibility with the 1.7 API.
1048 svn_client_create_context(svn_client_ctx_t **ctx,
1051 /** @} end group: Client context management */
1054 * @name Authentication information file names
1056 * Names of files that contain authentication information.
1058 * These filenames are decided by libsvn_client, since this library
1059 * implements all the auth-protocols; libsvn_wc does nothing but
1060 * blindly store and retrieve these files from protected areas.
1062 * @defgroup clnt_auth_filenames Client authentication file names
1065 #define SVN_CLIENT_AUTH_USERNAME "username"
1066 #define SVN_CLIENT_AUTH_PASSWORD "password"
1067 /** @} group end: Authentication information file names */
1069 /** Client argument processing
1071 * @defgroup clnt_cmdline Client command-line processing
1077 * Pull remaining target arguments from @a os into @a *targets_p,
1078 * converting them to UTF-8, followed by targets from @a known_targets
1079 * (which might come from, for example, the "--targets" command line option).
1081 * Process each target in one of the following ways. For a repository-
1082 * relative URL: resolve to a full URL, contacting the repository if
1083 * necessary to do so, and then treat as a full URL. For a URL: do some
1084 * IRI-to-URI encoding and some auto-escaping, and canonicalize. For a
1085 * local path: canonicalize case and path separators.
1087 * If @a keep_last_origpath_on_truepath_collision is TRUE, and there are
1088 * exactly two targets which both case-canonicalize to the same path, the last
1089 * target will be returned in the original non-case-canonicalized form.
1091 * Allocate @a *targets_p and its elements in @a pool.
1093 * @a ctx is required for possible repository authentication.
1095 * If a path has the same name as a Subversion working copy
1096 * administrative directory, return #SVN_ERR_RESERVED_FILENAME_SPECIFIED;
1097 * if multiple reserved paths are encountered, return a chain of
1098 * errors, all of which are #SVN_ERR_RESERVED_FILENAME_SPECIFIED. Do
1099 * not return this type of error in a chain with any other type of
1100 * error, and if this is the only type of error encountered, complete
1101 * the operation before returning the error(s).
1106 svn_client_args_to_target_array2(apr_array_header_t **targets_p,
1108 const apr_array_header_t *known_targets,
1109 svn_client_ctx_t *ctx,
1110 svn_boolean_t keep_last_origpath_on_truepath_collision,
1114 * Similar to svn_client_args_to_target_array2() but with
1115 * @a keep_last_origpath_on_truepath_collision always set to FALSE.
1117 * @deprecated Provided for backward compatibility with the 1.6 API.
1121 svn_client_args_to_target_array(apr_array_header_t **targets_p,
1123 const apr_array_header_t *known_targets,
1124 svn_client_ctx_t *ctx,
1127 /** @} group end: Client command-line processing */
1132 * Client working copy management functions
1134 * @defgroup clnt_wc Client working copy management
1140 * @defgroup clnt_wc_checkout Checkout
1147 * Checkout a working copy from a repository.
1149 * @param[out] result_rev If non-NULL, the value of the revision checked
1150 * out from the repository.
1151 * @param[in] URL The repository URL of the checkout source.
1152 * @param[in] path The root of the new working copy.
1153 * @param[in] peg_revision The peg revision.
1154 * @param[in] revision The operative revision.
1155 * @param[in] depth The depth of the operation. If #svn_depth_unknown,
1156 * then behave as if for #svn_depth_infinity, except in the case
1157 * of resuming a previous checkout of @a path (i.e., updating),
1158 * in which case use the depth of the existing working copy.
1159 * @param[in] ignore_externals If @c TRUE, don't process externals
1160 * definitions as part of this operation.
1161 * @param[in] allow_unver_obstructions If @c TRUE, then tolerate existing
1162 * unversioned items that obstruct incoming paths. Only
1163 * obstructions of the same type (file or dir) as the added
1164 * item are tolerated. The text of obstructing files is left
1165 * as-is, effectively treating it as a user modification after
1166 * the checkout. Working properties of obstructing items are
1167 * set equal to the base properties. <br>
1168 * If @c FALSE, then abort if there are any unversioned
1169 * obstructing items.
1170 * @param[in] ctx The standard client context, used for authentication and
1172 * @param[in] pool Used for any temporary allocation.
1174 * @return A pointer to an #svn_error_t of the type (this list is not
1176 * #SVN_ERR_UNSUPPORTED_FEATURE if @a URL refers to a file rather
1177 * than a directory; <br>
1178 * #SVN_ERR_RA_ILLEGAL_URL if @a URL does not exist; <br>
1179 * #SVN_ERR_CLIENT_BAD_REVISION if @a revision is not one of
1180 * #svn_opt_revision_number, #svn_opt_revision_head, or
1181 * #svn_opt_revision_date. <br>
1182 * If no error occurred, return #SVN_NO_ERROR.
1184 * @since New in 1.5.
1186 * @see #svn_depth_t <br> #svn_client_ctx_t <br> @ref clnt_revisions for
1187 * a discussion of operative and peg revisions.
1190 svn_client_checkout3(svn_revnum_t *result_rev,
1193 const svn_opt_revision_t *peg_revision,
1194 const svn_opt_revision_t *revision,
1196 svn_boolean_t ignore_externals,
1197 svn_boolean_t allow_unver_obstructions,
1198 svn_client_ctx_t *ctx,
1203 * Similar to svn_client_checkout3() but with @a allow_unver_obstructions
1204 * always set to FALSE, and @a depth set according to @a recurse: if
1205 * @a recurse is TRUE, @a depth is #svn_depth_infinity, if @a recurse
1206 * is FALSE, @a depth is #svn_depth_files.
1208 * @deprecated Provided for backward compatibility with the 1.4 API.
1212 svn_client_checkout2(svn_revnum_t *result_rev,
1215 const svn_opt_revision_t *peg_revision,
1216 const svn_opt_revision_t *revision,
1217 svn_boolean_t recurse,
1218 svn_boolean_t ignore_externals,
1219 svn_client_ctx_t *ctx,
1224 * Similar to svn_client_checkout2(), but with @a peg_revision
1225 * always set to #svn_opt_revision_unspecified and
1226 * @a ignore_externals always set to FALSE.
1228 * @deprecated Provided for backward compatibility with the 1.1 API.
1232 svn_client_checkout(svn_revnum_t *result_rev,
1235 const svn_opt_revision_t *revision,
1236 svn_boolean_t recurse,
1237 svn_client_ctx_t *ctx,
1242 * @defgroup Update Bring a working copy up-to-date with a repository
1249 * Update working trees @a paths to @a revision, authenticating with the
1250 * authentication baton cached in @a ctx. @a paths is an array of const
1251 * char * paths to be updated. Unversioned paths that are direct children
1252 * of a versioned path will cause an update that attempts to add that path;
1253 * other unversioned paths are skipped. If @a result_revs is not NULL,
1254 * @a *result_revs will be set to an array of svn_revnum_t with each
1255 * element set to the revision to which @a revision was resolved for the
1256 * corresponding element of @a paths.
1258 * @a revision must be of kind #svn_opt_revision_number,
1259 * #svn_opt_revision_head, or #svn_opt_revision_date. If @a
1260 * revision does not meet these requirements, return the error
1261 * #SVN_ERR_CLIENT_BAD_REVISION.
1263 * The paths in @a paths can be from multiple working copies from multiple
1264 * repositories, but even if they all come from the same repository there
1265 * is no guarantee that revision represented by #svn_opt_revision_head
1266 * will remain the same as each path is updated.
1268 * If @a ignore_externals is set, don't process externals definitions
1269 * as part of this operation.
1271 * If @a depth is #svn_depth_infinity, update fully recursively.
1272 * Else if it is #svn_depth_immediates or #svn_depth_files, update
1273 * each target and its file entries, but not its subdirectories. Else
1274 * if #svn_depth_empty, update exactly each target, nonrecursively
1275 * (essentially, update the target's properties).
1277 * If @a depth is #svn_depth_unknown, take the working depth from
1278 * @a paths and then behave as described above.
1280 * If @a depth_is_sticky is set and @a depth is not
1281 * #svn_depth_unknown, then in addition to updating PATHS, also set
1282 * their sticky ambient depth value to @a depth.
1284 * If @a allow_unver_obstructions is TRUE then the update tolerates
1285 * existing unversioned items that obstruct added paths. Only
1286 * obstructions of the same type (file or dir) as the added item are
1287 * tolerated. The text of obstructing files is left as-is, effectively
1288 * treating it as a user modification after the update. Working
1289 * properties of obstructing items are set equal to the base properties.
1290 * If @a allow_unver_obstructions is FALSE then the update will abort
1291 * if there are any unversioned obstructing items.
1293 * If @a adds_as_modification is TRUE, a local addition at the same path
1294 * as an incoming addition of the same node kind results in a normal node
1295 * with a possible local modification, instead of a tree conflict.
1297 * If @a make_parents is TRUE, create any non-existent parent
1298 * directories also by checking them out at depth=empty.
1300 * If @a ctx->notify_func2 is non-NULL, invoke @a ctx->notify_func2 with
1301 * @a ctx->notify_baton2 for each item handled by the update, and also for
1302 * files restored from text-base. If @a ctx->cancel_func is non-NULL, invoke
1303 * it passing @a ctx->cancel_baton at various places during the update.
1305 * Use @a pool for any temporary allocation.
1307 * @todo Multiple Targets
1308 * - Up for debate: an update on multiple targets is *not* atomic.
1309 * Right now, svn_client_update only takes one path. What's
1310 * debatable is whether this should ever change. On the one hand,
1311 * it's kind of losing to have the client application loop over
1312 * targets and call svn_client_update() on each one; each call to
1313 * update initializes a whole new repository session (network
1314 * overhead, etc.) On the other hand, it's a very simple
1315 * implementation, and allows for the possibility that different
1316 * targets may come from different repositories.
1318 * @since New in 1.7.
1321 svn_client_update4(apr_array_header_t **result_revs,
1322 const apr_array_header_t *paths,
1323 const svn_opt_revision_t *revision,
1325 svn_boolean_t depth_is_sticky,
1326 svn_boolean_t ignore_externals,
1327 svn_boolean_t allow_unver_obstructions,
1328 svn_boolean_t adds_as_modification,
1329 svn_boolean_t make_parents,
1330 svn_client_ctx_t *ctx,
1334 * Similar to svn_client_update4() but with @a make_parents always set
1335 * to FALSE and @a adds_as_modification set to TRUE.
1337 * @deprecated Provided for backward compatibility with the 1.6 API.
1338 * @since New in 1.5.
1342 svn_client_update3(apr_array_header_t **result_revs,
1343 const apr_array_header_t *paths,
1344 const svn_opt_revision_t *revision,
1346 svn_boolean_t depth_is_sticky,
1347 svn_boolean_t ignore_externals,
1348 svn_boolean_t allow_unver_obstructions,
1349 svn_client_ctx_t *ctx,
1353 * Similar to svn_client_update3() but with @a allow_unver_obstructions
1354 * always set to FALSE, @a depth_is_sticky to FALSE, and @a depth set
1355 * according to @a recurse: if @a recurse is TRUE, set @a depth to
1356 * #svn_depth_infinity, if @a recurse is FALSE, set @a depth to
1359 * @deprecated Provided for backward compatibility with the 1.4 API.
1363 svn_client_update2(apr_array_header_t **result_revs,
1364 const apr_array_header_t *paths,
1365 const svn_opt_revision_t *revision,
1366 svn_boolean_t recurse,
1367 svn_boolean_t ignore_externals,
1368 svn_client_ctx_t *ctx,
1372 * Similar to svn_client_update2() except that it accepts only a single
1373 * target in @a path, returns a single revision if @a result_rev is
1374 * not NULL, and @a ignore_externals is always set to FALSE.
1376 * @deprecated Provided for backward compatibility with the 1.1 API.
1380 svn_client_update(svn_revnum_t *result_rev,
1382 const svn_opt_revision_t *revision,
1383 svn_boolean_t recurse,
1384 svn_client_ctx_t *ctx,
1389 * @defgroup Switch Switch a working copy to another location.
1395 * Switch an existing working copy directory to a different repository
1398 * This is normally used to switch a working copy directory over to another
1399 * line of development, such as a branch or a tag. Switching an existing
1400 * working copy directory is more efficient than checking out @a url from
1403 * @param[out] result_rev If non-NULL, the value of the revision to which
1404 * the working copy was actually switched.
1405 * @param[in] path The directory to be switched. This need not be the
1406 * root of a working copy.
1407 * @param[in] url The repository URL to switch to.
1408 * @param[in] peg_revision The peg revision.
1409 * @param[in] revision The operative revision.
1410 * @param[in] depth The depth of the operation. If #svn_depth_infinity,
1411 * switch fully recursively. Else if #svn_depth_immediates,
1412 * switch @a path and its file children (if any), and
1413 * switch subdirectories but do not update them. Else if
1414 * #svn_depth_files, switch just file children, ignoring
1415 * subdirectories completely. Else if #svn_depth_empty,
1416 * switch just @a path and touch nothing underneath it.
1417 * @param[in] depth_is_sticky If @c TRUE, and @a depth is not
1418 * #svn_depth_unknown, then in addition to switching @a path, also
1419 * set its sticky ambient depth value to @a depth.
1420 * @param[in] ignore_externals If @c TRUE, don't process externals
1421 * definitions as part of this operation.
1422 * @param[in] allow_unver_obstructions If @c TRUE, then tolerate existing
1423 * unversioned items that obstruct incoming paths. Only
1424 * obstructions of the same type (file or dir) as the added
1425 * item are tolerated. The text of obstructing files is left
1426 * as-is, effectively treating it as a user modification after
1427 * the checkout. Working properties of obstructing items are
1428 * set equal to the base properties. <br>
1429 * If @c FALSE, then abort if there are any unversioned
1430 * obstructing items.
1431 * @param[in] ignore_ancestry If @c FALSE, then verify that the file
1432 * or directory at @a path shares some common version control
1433 * ancestry with the switch URL location (represented by the
1434 * combination of @a url, @a peg_revision, and @a revision),
1435 * and returning #SVN_ERR_CLIENT_UNRELATED_RESOURCES if they
1436 * do not. If @c TRUE, no such sanity checks are performed.
1438 * @param[in] ctx The standard client context, used for authentication and
1439 * notification. The notifier is invoked for paths affected by
1440 * the switch, and also for files which may be restored from the
1441 * pristine store after being previously removed from the working
1443 * @param[in] pool Used for any temporary allocation.
1445 * @return A pointer to an #svn_error_t of the type (this list is not
1447 * #SVN_ERR_CLIENT_BAD_REVISION if @a revision is not one of
1448 * #svn_opt_revision_number, #svn_opt_revision_head, or
1449 * #svn_opt_revision_date. <br>
1450 * If no error occurred, return #SVN_NO_ERROR.
1452 * @since New in 1.7.
1454 * @see #svn_depth_t <br> #svn_client_ctx_t <br> @ref clnt_revisions for
1455 * a discussion of operative and peg revisions.
1458 svn_client_switch3(svn_revnum_t *result_rev,
1461 const svn_opt_revision_t *peg_revision,
1462 const svn_opt_revision_t *revision,
1464 svn_boolean_t depth_is_sticky,
1465 svn_boolean_t ignore_externals,
1466 svn_boolean_t allow_unver_obstructions,
1467 svn_boolean_t ignore_ancestry,
1468 svn_client_ctx_t *ctx,
1473 * Similar to svn_client_switch3() but with @a ignore_ancestry always
1476 * @since New in 1.5.
1477 * @deprecated Provided for backward compatibility with the 1.4 API.
1481 svn_client_switch2(svn_revnum_t *result_rev,
1484 const svn_opt_revision_t *peg_revision,
1485 const svn_opt_revision_t *revision,
1487 svn_boolean_t depth_is_sticky,
1488 svn_boolean_t ignore_externals,
1489 svn_boolean_t allow_unver_obstructions,
1490 svn_client_ctx_t *ctx,
1495 * Similar to svn_client_switch2() but with @a allow_unver_obstructions,
1496 * @a ignore_externals, and @a depth_is_sticky always set to FALSE,
1497 * and @a depth set according to @a recurse: if @a recurse is TRUE,
1498 * set @a depth to #svn_depth_infinity, if @a recurse is FALSE, set
1499 * @a depth to #svn_depth_files.
1501 * @deprecated Provided for backward compatibility with the 1.4 API.
1505 svn_client_switch(svn_revnum_t *result_rev,
1508 const svn_opt_revision_t *revision,
1509 svn_boolean_t recurse,
1510 svn_client_ctx_t *ctx,
1516 * @defgroup Add Begin versioning files/directories in a working copy.
1522 * Schedule a working copy @a path for addition to the repository.
1524 * If @a depth is #svn_depth_empty, add just @a path and nothing
1525 * below it. If #svn_depth_files, add @a path and any file
1526 * children of @a path. If #svn_depth_immediates, add @a path, any
1527 * file children, and any immediate subdirectories (but nothing
1528 * underneath those subdirectories). If #svn_depth_infinity, add
1529 * @a path and everything under it fully recursively.
1531 * @a path's parent must be under revision control already (unless
1532 * @a add_parents is TRUE), but @a path is not.
1534 * If @a force is not set and @a path is already under version
1535 * control, return the error #SVN_ERR_ENTRY_EXISTS. If @a force is
1536 * set, do not error on already-versioned items. When used on a
1537 * directory in conjunction with a @a depth value greater than
1538 * #svn_depth_empty, this has the effect of scheduling for addition
1539 * any unversioned files and directories scattered within even a
1540 * versioned tree (up to @a depth).
1542 * If @a ctx->notify_func2 is non-NULL, then for each added item, call
1543 * @a ctx->notify_func2 with @a ctx->notify_baton2 and the path of the
1546 * If @a no_ignore is FALSE, don't add any file or directory (or recurse
1547 * into any directory) that is unversioned and found by recursion (as
1548 * opposed to being the explicit target @a path) and whose name matches the
1549 * svn:ignore property on its parent directory or the global-ignores list in
1550 * @a ctx->config. If @a no_ignore is TRUE, do include such files and
1551 * directories. (Note that an svn:ignore property can influence this
1552 * behaviour only when recursing into an already versioned directory with @a
1555 * If @a no_autoprops is TRUE, don't set any autoprops on added files. If
1556 * @a no_autoprops is FALSE then all added files have autprops set as per
1557 * the auto-props list in @a ctx->config and the value of any
1558 * @c SVN_PROP_INHERITABLE_AUTO_PROPS properties inherited by the nearest
1559 * parents of @a path which are already under version control.
1561 * If @a add_parents is TRUE, recurse up @a path's directory and look for
1562 * a versioned directory. If found, add all intermediate paths between it
1563 * and @a path. If not found, return #SVN_ERR_CLIENT_NO_VERSIONED_PARENT.
1565 * @a scratch_pool is used for temporary allocations only.
1568 * This is a *scheduling* operation. No changes will
1569 * happen to the repository until a commit occurs. This scheduling
1570 * can be removed with svn_client_revert2().
1572 * @since New in 1.8.
1575 svn_client_add5(const char *path,
1577 svn_boolean_t force,
1578 svn_boolean_t no_ignore,
1579 svn_boolean_t no_autoprops,
1580 svn_boolean_t add_parents,
1581 svn_client_ctx_t *ctx,
1582 apr_pool_t *scratch_pool);
1585 * Similar to svn_client_add5(), but with @a no_autoprops always set to
1588 * @deprecated Provided for backward compatibility with the 1.7 API.
1592 svn_client_add4(const char *path,
1594 svn_boolean_t force,
1595 svn_boolean_t no_ignore,
1596 svn_boolean_t add_parents,
1597 svn_client_ctx_t *ctx,
1601 * Similar to svn_client_add4(), but with @a add_parents always set to
1602 * FALSE and @a depth set according to @a recursive: if TRUE, then
1603 * @a depth is #svn_depth_infinity, if FALSE, then #svn_depth_empty.
1605 * @deprecated Provided for backward compatibility with the 1.4 API.
1609 svn_client_add3(const char *path,
1610 svn_boolean_t recursive,
1611 svn_boolean_t force,
1612 svn_boolean_t no_ignore,
1613 svn_client_ctx_t *ctx,
1617 * Similar to svn_client_add3(), but with @a no_ignore always set to
1620 * @deprecated Provided for backward compatibility with the 1.2 API.
1624 svn_client_add2(const char *path,
1625 svn_boolean_t recursive,
1626 svn_boolean_t force,
1627 svn_client_ctx_t *ctx,
1631 * Similar to svn_client_add2(), but with @a force always set to FALSE.
1633 * @deprecated Provided for backward compatibility with the 1.0 API.
1637 svn_client_add(const char *path,
1638 svn_boolean_t recursive,
1639 svn_client_ctx_t *ctx,
1645 * @defgroup Mkdir Create directories in a working copy or repository.
1650 /** Create a directory, either in a repository or a working copy.
1652 * @a paths is an array of (const char *) paths, either all local WC paths
1655 * If @a paths contains URLs, use the authentication baton in @a ctx
1656 * and @a message to immediately attempt to commit the creation of the
1657 * directories in @a paths in the repository.
1659 * Else, create the directories on disk, and attempt to schedule them
1660 * for addition (using svn_client_add(), whose docstring you should
1663 * If @a make_parents is TRUE, create any non-existent parent directories
1666 * If non-NULL, @a revprop_table is a hash table holding additional,
1667 * custom revision properties (<tt>const char *</tt> names mapped to
1668 * <tt>svn_string_t *</tt> values) to be set on the new revision in
1669 * the event that this is a committing operation. This table cannot
1670 * contain any standard Subversion properties.
1672 * @a ctx->log_msg_func3/@a ctx->log_msg_baton3 are a callback/baton
1673 * combo that this function can use to query for a commit log message
1674 * when one is needed.
1676 * If @a ctx->notify_func2 is non-NULL, when the directory has been created
1677 * (successfully) in the working copy, call @a ctx->notify_func2 with
1678 * @a ctx->notify_baton2 and the path of the new directory. Note that this is
1679 * only called for items added to the working copy.
1681 * If @a commit_callback is non-NULL, then for each successful commit, call
1682 * @a commit_callback with @a commit_baton and a #svn_commit_info_t for
1685 * @since New in 1.7.
1688 svn_client_mkdir4(const apr_array_header_t *paths,
1689 svn_boolean_t make_parents,
1690 const apr_hash_t *revprop_table,
1691 svn_commit_callback2_t commit_callback,
1693 svn_client_ctx_t *ctx,
1697 * Similar to svn_client_mkdir4(), but returns the commit info in
1698 * @a *commit_info_p rather than through a callback function.
1700 * @since New in 1.5.
1701 * @deprecated Provided for backward compatibility with the 1.6 API.
1705 svn_client_mkdir3(svn_commit_info_t **commit_info_p,
1706 const apr_array_header_t *paths,
1707 svn_boolean_t make_parents,
1708 const apr_hash_t *revprop_table,
1709 svn_client_ctx_t *ctx,
1714 * Same as svn_client_mkdir3(), but with @a make_parents always FALSE,
1715 * and @a revprop_table always NULL.
1717 * @since New in 1.3.
1718 * @deprecated Provided for backward compatibility with the 1.4 API.
1722 svn_client_mkdir2(svn_commit_info_t **commit_info_p,
1723 const apr_array_header_t *paths,
1724 svn_client_ctx_t *ctx,
1728 * Same as svn_client_mkdir2(), but takes the #svn_client_commit_info_t
1729 * type for @a commit_info_p.
1731 * @deprecated Provided for backward compatibility with the 1.2 API.
1735 svn_client_mkdir(svn_client_commit_info_t **commit_info_p,
1736 const apr_array_header_t *paths,
1737 svn_client_ctx_t *ctx,
1743 * @defgroup Delete Remove files/directories from a working copy or repository.
1748 /** Delete items from a repository or working copy.
1750 * @a paths is an array of (const char *) paths, either all local WC paths
1753 * If the paths in @a paths are URLs, use the authentication baton in
1754 * @a ctx and @a ctx->log_msg_func3/@a ctx->log_msg_baton3 to
1755 * immediately attempt to commit a deletion of the URLs from the
1756 * repository. Every path must belong to the same repository.
1758 * Else, schedule the working copy paths in @a paths for removal from
1759 * the repository. Each path's parent must be under revision control.
1760 * This is just a *scheduling* operation. No changes will happen to
1761 * the repository until a commit occurs. This scheduling can be
1762 * removed with svn_client_revert2(). If a path is a file it is
1763 * immediately removed from the working copy. If the path is a
1764 * directory it will remain in the working copy but all the files, and
1765 * all unversioned items, it contains will be removed. If @a force is
1766 * not set then this operation will fail if any path contains locally
1767 * modified and/or unversioned items. If @a force is set such items
1770 * If the paths are working copy paths and @a keep_local is TRUE then
1771 * the paths will not be removed from the working copy, only scheduled
1772 * for removal from the repository. Once the scheduled deletion is
1773 * committed, they will appear as unversioned paths in the working copy.
1775 * If non-NULL, @a revprop_table is a hash table holding additional,
1776 * custom revision properties (<tt>const char *</tt> names mapped to
1777 * <tt>svn_string_t *</tt> values) to be set on the new revision in
1778 * the event that this is a committing operation. This table cannot
1779 * contain any standard Subversion properties.
1781 * @a ctx->log_msg_func3/@a ctx->log_msg_baton3 are a callback/baton
1782 * combo that this function can use to query for a commit log message
1783 * when one is needed.
1785 * If @a ctx->notify_func2 is non-NULL, then for each item deleted, call
1786 * @a ctx->notify_func2 with @a ctx->notify_baton2 and the path of the deleted
1789 * If @a commit_callback is non-NULL, then for each successful commit, call
1790 * @a commit_callback with @a commit_baton and a #svn_commit_info_t for
1793 * @since New in 1.7.
1796 svn_client_delete4(const apr_array_header_t *paths,
1797 svn_boolean_t force,
1798 svn_boolean_t keep_local,
1799 const apr_hash_t *revprop_table,
1800 svn_commit_callback2_t commit_callback,
1802 svn_client_ctx_t *ctx,
1806 * Similar to svn_client_delete4(), but returns the commit info in
1807 * @a *commit_info_p rather than through a callback function.
1809 * @since New in 1.5.
1810 * @deprecated Provided for backward compatibility with the 1.6 API.
1814 svn_client_delete3(svn_commit_info_t **commit_info_p,
1815 const apr_array_header_t *paths,
1816 svn_boolean_t force,
1817 svn_boolean_t keep_local,
1818 const apr_hash_t *revprop_table,
1819 svn_client_ctx_t *ctx,
1823 * Similar to svn_client_delete3(), but with @a keep_local always set
1824 * to FALSE, and @a revprop_table passed as NULL.
1826 * @deprecated Provided for backward compatibility with the 1.4 API.
1830 svn_client_delete2(svn_commit_info_t **commit_info_p,
1831 const apr_array_header_t *paths,
1832 svn_boolean_t force,
1833 svn_client_ctx_t *ctx,
1837 * Similar to svn_client_delete2(), but takes the #svn_client_commit_info_t
1838 * type for @a commit_info_p.
1840 * @deprecated Provided for backward compatibility with the 1.2 API.
1844 svn_client_delete(svn_client_commit_info_t **commit_info_p,
1845 const apr_array_header_t *paths,
1846 svn_boolean_t force,
1847 svn_client_ctx_t *ctx,
1854 * @defgroup Import Import files into the repository.
1860 * The callback invoked by svn_client_import5() before adding a node to the
1861 * list of nodes to be imported.
1863 * @a baton is the value passed to @a svn_client_import5 as filter_baton.
1865 * The callback receives the @a local_abspath for each node and the @a dirent
1866 * for it when walking the directory tree. Only the kind of node, including
1867 * special status is available in @a dirent.
1869 * Implementations can set @a *filtered to TRUE, to make the import
1870 * process omit the node and (if the node is a directory) all its
1873 * @a scratch_pool can be used for temporary allocations.
1875 * @since New in 1.8.
1877 typedef svn_error_t *(*svn_client_import_filter_func_t)(
1879 svn_boolean_t *filtered,
1880 const char *local_abspath,
1881 const svn_io_dirent2_t *dirent,
1882 apr_pool_t *scratch_pool);
1884 /** Import file or directory @a path into repository directory @a url at
1885 * head, authenticating with the authentication baton cached in @a ctx,
1886 * and using @a ctx->log_msg_func3/@a ctx->log_msg_baton3 to get a log message
1887 * for the (implied) commit. If some components of @a url do not exist
1888 * then create parent directories as necessary.
1890 * This function reads an unversioned tree from disk and skips any ".svn"
1891 * directories. Even if a file or directory being imported is part of an
1892 * existing WC, this function sees it as unversioned and does not notice any
1893 * existing Subversion properties in it.
1895 * If @a path is a directory, the contents of that directory are
1896 * imported directly into the directory identified by @a url. Note that the
1897 * directory @a path itself is not imported -- that is, the basename of
1898 * @a path is not part of the import.
1900 * If @a path is a file, then the dirname of @a url is the directory
1901 * receiving the import. The basename of @a url is the filename in the
1902 * repository. In this case if @a url already exists, return error.
1904 * If @a ctx->notify_func2 is non-NULL, then call @a ctx->notify_func2 with
1905 * @a ctx->notify_baton2 as the import progresses, with any of the following
1906 * actions: #svn_wc_notify_commit_added,
1907 * #svn_wc_notify_commit_postfix_txdelta.
1909 * Use @a scratch_pool for any temporary allocation.
1911 * If non-NULL, @a revprop_table is a hash table holding additional,
1912 * custom revision properties (<tt>const char *</tt> names mapped to
1913 * <tt>svn_string_t *</tt> values) to be set on the new revision.
1914 * This table cannot contain any standard Subversion properties.
1916 * @a ctx->log_msg_func3/@a ctx->log_msg_baton3 are a callback/baton
1917 * combo that this function can use to query for a commit log message
1918 * when one is needed.
1920 * If @a depth is #svn_depth_empty, import just @a path and nothing
1921 * below it. If #svn_depth_files, import @a path and any file
1922 * children of @a path. If #svn_depth_immediates, import @a path, any
1923 * file children, and any immediate subdirectories (but nothing
1924 * underneath those subdirectories). If #svn_depth_infinity, import
1925 * @a path and everything under it fully recursively.
1927 * If @a no_ignore is @c FALSE, don't import any file or directory (or
1928 * recurse into any directory) that is found by recursion (as opposed to
1929 * being the explicit target @a path) and whose name matches the
1930 * global-ignores list in @a ctx->config. If @a no_ignore is @c TRUE, do
1931 * include such files and directories. (Note that svn:ignore properties are
1932 * not involved, as auto-props cannot set properties on directories and even
1933 * if the target is part of a WC the import ignores any existing
1936 * If @a no_autoprops is TRUE, don't set any autoprops on imported files. If
1937 * @a no_autoprops is FALSE then all imported files have autprops set as per
1938 * the auto-props list in @a ctx->config and the value of any
1939 * @c SVN_PROP_INHERITABLE_AUTO_PROPS properties inherited by and explicitly set
1940 * on @a url if @a url is already under versioned control, or the nearest parents
1941 * of @a path which are already under version control if not.
1943 * If @a ignore_unknown_node_types is @c FALSE, ignore files of which the
1944 * node type is unknown, such as device files and pipes.
1946 * If @a filter_callback is non-NULL, call it for each node that isn't ignored
1947 * for other reasons with @a filter_baton, to allow third party to ignore
1948 * specific nodes during importing.
1950 * If @a commit_callback is non-NULL, then for each successful commit, call
1951 * @a commit_callback with @a commit_baton and a #svn_commit_info_t for
1954 * @since New in 1.8.
1957 svn_client_import5(const char *path,
1960 svn_boolean_t no_ignore,
1961 svn_boolean_t no_autoprops,
1962 svn_boolean_t ignore_unknown_node_types,
1963 const apr_hash_t *revprop_table,
1964 svn_client_import_filter_func_t filter_callback,
1966 svn_commit_callback2_t commit_callback,
1968 svn_client_ctx_t *ctx,
1969 apr_pool_t *scratch_pool);
1972 * Similar to svn_client_import5(), but without support for an optional
1973 * @a filter_callback and @a no_autoprops always set to FALSE.
1975 * @since New in 1.7.
1976 * @deprecated Provided for backward compatibility with the 1.7 API.
1980 svn_client_import4(const char *path,
1983 svn_boolean_t no_ignore,
1984 svn_boolean_t ignore_unknown_node_types,
1985 const apr_hash_t *revprop_table,
1986 svn_commit_callback2_t commit_callback,
1988 svn_client_ctx_t *ctx,
1992 * Similar to svn_client_import4(), but returns the commit info in
1993 * @a *commit_info_p rather than through a callback function.
1995 * @since New in 1.5.
1996 * @deprecated Provided for backward compatibility with the 1.6 API.
2000 svn_client_import3(svn_commit_info_t **commit_info_p,
2004 svn_boolean_t no_ignore,
2005 svn_boolean_t ignore_unknown_node_types,
2006 const apr_hash_t *revprop_table,
2007 svn_client_ctx_t *ctx,
2011 * Similar to svn_client_import3(), but with @a ignore_unknown_node_types
2012 * always set to @c FALSE, @a revprop_table passed as NULL, and @a
2013 * depth set according to @a nonrecursive: if TRUE, then @a depth is
2014 * #svn_depth_files, else #svn_depth_infinity.
2016 * @since New in 1.3.
2018 * @deprecated Provided for backward compatibility with the 1.4 API
2022 svn_client_import2(svn_commit_info_t **commit_info_p,
2025 svn_boolean_t nonrecursive,
2026 svn_boolean_t no_ignore,
2027 svn_client_ctx_t *ctx,
2031 * Similar to svn_client_import2(), but with @a no_ignore always set
2032 * to FALSE and using the #svn_client_commit_info_t type for
2035 * @deprecated Provided for backward compatibility with the 1.2 API.
2039 svn_client_import(svn_client_commit_info_t **commit_info_p,
2042 svn_boolean_t nonrecursive,
2043 svn_client_ctx_t *ctx,
2049 * @defgroup Commit Commit local modifications to the repository.
2055 * Commit files or directories into repository, authenticating with
2056 * the authentication baton cached in @a ctx, and using
2057 * @a ctx->log_msg_func3/@a ctx->log_msg_baton3 to obtain the log message.
2058 * Set @a *commit_info_p to the results of the commit, allocated in @a pool.
2060 * @a targets is an array of <tt>const char *</tt> paths to commit. They
2061 * need not be canonicalized nor condensed; this function will take care of
2062 * that. If @a targets has zero elements, then do nothing and return
2063 * immediately without error.
2065 * If non-NULL, @a revprop_table is a hash table holding additional,
2066 * custom revision properties (<tt>const char *</tt> names mapped to
2067 * <tt>svn_string_t *</tt> values) to be set on the new revision.
2068 * This table cannot contain any standard Subversion properties.
2070 * If @a ctx->notify_func2 is non-NULL, then call @a ctx->notify_func2 with
2071 * @a ctx->notify_baton2 as the commit progresses, with any of the following
2072 * actions: #svn_wc_notify_commit_modified, #svn_wc_notify_commit_added,
2073 * #svn_wc_notify_commit_deleted, #svn_wc_notify_commit_replaced,
2074 * #svn_wc_notify_commit_copied, #svn_wc_notify_commit_copied_replaced,
2075 * #svn_wc_notify_commit_postfix_txdelta.
2077 * If @a depth is #svn_depth_infinity, commit all changes to and
2078 * below named targets. If @a depth is #svn_depth_empty, commit
2079 * only named targets (that is, only property changes on named
2080 * directory targets, and property and content changes for named file
2081 * targets). If @a depth is #svn_depth_files, behave as above for
2082 * named file targets, and for named directory targets, commit
2083 * property changes on a named directory and all changes to files
2084 * directly inside that directory. If #svn_depth_immediates, behave
2085 * as for #svn_depth_files, and for subdirectories of any named
2086 * directory target commit as though for #svn_depth_empty.
2088 * Unlock paths in the repository, unless @a keep_locks is TRUE.
2090 * @a changelists is an array of <tt>const char *</tt> changelist
2091 * names, used as a restrictive filter on items that are committed;
2092 * that is, don't commit anything unless it's a member of one of those
2093 * changelists. After the commit completes successfully, remove
2094 * changelist associations from the targets, unless @a
2095 * keep_changelists is set. If @a changelists is
2096 * empty (or altogether @c NULL), no changelist filtering occurs.
2098 * If @a commit_as_operations is set to FALSE, when a copy is committed
2099 * all changes below the copy are always committed at the same time
2100 * (independent of the value of @a depth). If @a commit_as_operations is
2101 * #TRUE, changes to descendants are only committed if they are itself
2102 * included via @a depth and targets.
2104 * If @a include_file_externals and/or @a include_dir_externals are #TRUE,
2105 * also commit all file and/or dir externals (respectively) that are reached
2106 * by recursion, except for those externals which:
2107 * - have a fixed revision, or
2108 * - come from a different repository root URL (dir externals).
2109 * These flags affect only recursion; externals that directly appear in @a
2110 * targets are always included in the commit.
2112 * ### TODO: currently, file externals hidden inside an unversioned dir are
2113 * skipped deliberately, because we can't commit those yet.
2114 * See STMT_SELECT_COMMITTABLE_EXTERNALS_BELOW.
2116 * ### TODO: With @c depth_immediates, this function acts as if
2117 * @a include_dir_externals was passed #FALSE, but caller expects
2118 * immediate child dir externals to be included @c depth_empty.
2120 * When @a commit_as_operations is #TRUE it is possible to delete a node and
2121 * all its descendants by selecting just the root of the deletion. If it is
2122 * set to #FALSE this will raise an error.
2124 * If @a commit_callback is non-NULL, then for each successful commit, call
2125 * @a commit_callback with @a commit_baton and a #svn_commit_info_t for
2128 * @note #svn_depth_unknown and #svn_depth_exclude must not be passed
2131 * Use @a pool for any temporary allocations.
2133 * @since New in 1.8.
2136 svn_client_commit6(const apr_array_header_t *targets,
2138 svn_boolean_t keep_locks,
2139 svn_boolean_t keep_changelists,
2140 svn_boolean_t commit_as_operations,
2141 svn_boolean_t include_file_externals,
2142 svn_boolean_t include_dir_externals,
2143 const apr_array_header_t *changelists,
2144 const apr_hash_t *revprop_table,
2145 svn_commit_callback2_t commit_callback,
2147 svn_client_ctx_t *ctx,
2151 * Similar to svn_client_commit6(), but passes @a include_file_externals as
2152 * FALSE and @a include_dir_externals as FALSE.
2154 * @since New in 1.7.
2155 * @deprecated Provided for backward compatibility with the 1.7 API.
2159 svn_client_commit5(const apr_array_header_t *targets,
2161 svn_boolean_t keep_locks,
2162 svn_boolean_t keep_changelists,
2163 svn_boolean_t commit_as_operations,
2164 const apr_array_header_t *changelists,
2165 const apr_hash_t *revprop_table,
2166 svn_commit_callback2_t commit_callback,
2168 svn_client_ctx_t *ctx,
2172 * Similar to svn_client_commit5(), but returns the commit info in
2173 * @a *commit_info_p rather than through a callback function. Does not use
2174 * #svn_wc_notify_commit_copied or #svn_wc_notify_commit_copied_replaced
2175 * (preferring #svn_wc_notify_commit_added and
2176 * #svn_wc_notify_commit_replaced, respectively, instead).
2178 * Also, if no error is returned and @a (*commit_info_p)->revision is set to
2179 * #SVN_INVALID_REVNUM, then the commit was a no-op; nothing needed to
2182 * Sets @a commit_as_operations to FALSE to match Subversion 1.6's behavior.
2184 * @since New in 1.5.
2185 * @deprecated Provided for backward compatibility with the 1.6 API.
2189 svn_client_commit4(svn_commit_info_t **commit_info_p,
2190 const apr_array_header_t *targets,
2192 svn_boolean_t keep_locks,
2193 svn_boolean_t keep_changelists,
2194 const apr_array_header_t *changelists,
2195 const apr_hash_t *revprop_table,
2196 svn_client_ctx_t *ctx,
2200 * Similar to svn_client_commit4(), but always with NULL for
2201 * @a changelist_name, FALSE for @a keep_changelist, NULL for @a
2202 * revprop_table, and @a depth set according to @a recurse: if @a
2203 * recurse is TRUE, use #svn_depth_infinity, else #svn_depth_empty.
2205 * @deprecated Provided for backward compatibility with the 1.4 API.
2207 * @since New in 1.3.
2211 svn_client_commit3(svn_commit_info_t **commit_info_p,
2212 const apr_array_header_t *targets,
2213 svn_boolean_t recurse,
2214 svn_boolean_t keep_locks,
2215 svn_client_ctx_t *ctx,
2219 * Similar to svn_client_commit3(), but uses #svn_client_commit_info_t
2220 * for @a commit_info_p.
2222 * @deprecated Provided for backward compatibility with the 1.2 API.
2224 * @since New in 1.2.
2228 svn_client_commit2(svn_client_commit_info_t **commit_info_p,
2229 const apr_array_header_t *targets,
2230 svn_boolean_t recurse,
2231 svn_boolean_t keep_locks,
2232 svn_client_ctx_t *ctx,
2236 * Similar to svn_client_commit2(), but with @a keep_locks set to
2237 * TRUE and @a nonrecursive instead of @a recurse.
2239 * @deprecated Provided for backward compatibility with the 1.1 API.
2243 svn_client_commit(svn_client_commit_info_t **commit_info_p,
2244 const apr_array_header_t *targets,
2245 svn_boolean_t nonrecursive,
2246 svn_client_ctx_t *ctx,
2252 * @defgroup Status Report interesting information about paths in the \
2259 * Structure for holding the "status" of a working copy item.
2261 * @note Fields may be added to the end of this structure in future
2262 * versions. Therefore, to preserve binary compatibility, users
2263 * should not directly allocate structures of this type.
2265 * @since New in 1.7.
2267 typedef struct svn_client_status_t
2269 /** The kind of node as recorded in the working copy */
2270 svn_node_kind_t kind;
2272 /** The absolute path to the node */
2273 const char *local_abspath;
2275 /** The actual size of the working file on disk, or SVN_INVALID_FILESIZE
2276 * if unknown (or if the item isn't a file at all). */
2277 svn_filesize_t filesize;
2279 /** If the path is under version control, versioned is TRUE, otherwise
2281 svn_boolean_t versioned;
2283 /** Set to TRUE if the node is the victim of some kind of conflict. */
2284 svn_boolean_t conflicted;
2286 /** The status of the node, based on the restructuring changes and if the
2287 * node has no restructuring changes the text and prop status. */
2288 enum svn_wc_status_kind node_status;
2290 /** The status of the text of the node, not including restructuring changes.
2291 * Valid values are: svn_wc_status_none, svn_wc_status_normal,
2292 * svn_wc_status_modified and svn_wc_status_conflicted. */
2293 enum svn_wc_status_kind text_status;
2295 /** The status of the node's properties.
2296 * Valid values are: svn_wc_status_none, svn_wc_status_normal,
2297 * svn_wc_status_modified and svn_wc_status_conflicted. */
2298 enum svn_wc_status_kind prop_status;
2300 /** A node can be 'locked' if a working copy update is in progress or
2301 * was interrupted. */
2302 svn_boolean_t wc_is_locked;
2304 /** A file or directory can be 'copied' if it's scheduled for
2305 * addition-with-history (or part of a subtree that is scheduled as such.).
2307 svn_boolean_t copied;
2309 /** The URL of the repository root. */
2310 const char *repos_root_url;
2312 /** The UUID of the repository */
2313 const char *repos_uuid;
2315 /** The in-repository path relative to the repository root. */
2316 const char *repos_relpath;
2318 /** Base revision. */
2319 svn_revnum_t revision;
2321 /** Last revision this was changed */
2322 svn_revnum_t changed_rev;
2324 /** Date of last commit. */
2325 apr_time_t changed_date;
2327 /** Last commit author of this item */
2328 const char *changed_author;
2330 /** A file or directory can be 'switched' if the switch command has been
2331 * used. If this is TRUE, then file_external will be FALSE.
2333 svn_boolean_t switched;
2335 /** If the item is a file that was added to the working copy with an
2336 * svn:externals; if file_external is TRUE, then switched is always
2339 svn_boolean_t file_external;
2341 /** The locally present lock. (Values of path, token, owner, comment and
2342 * are available if a lock is present) */
2343 const svn_lock_t *lock;
2345 /** Which changelist this item is part of, or NULL if not part of any. */
2346 const char *changelist;
2348 /** The depth of the node as recorded in the working copy
2349 * (#svn_depth_unknown for files or when no depth is recorded) */
2353 * @defgroup svn_wc_status_ood WC out-of-date info from the repository
2356 * When the working copy item is out-of-date compared to the
2357 * repository, the following fields represent the state of the
2358 * youngest revision of the item in the repository. If the working
2359 * copy is not out of date, the fields are initialized as described
2363 /** Set to the node kind of the youngest commit, or #svn_node_none
2364 * if not out of date. */
2365 svn_node_kind_t ood_kind;
2367 /** The status of the node, based on the text status if the node has no
2368 * restructuring changes */
2369 enum svn_wc_status_kind repos_node_status;
2371 /** The node's text status in the repository. */
2372 enum svn_wc_status_kind repos_text_status;
2374 /** The node's property status in the repository. */
2375 enum svn_wc_status_kind repos_prop_status;
2377 /** The node's lock in the repository, if any. */
2378 const svn_lock_t *repos_lock;
2380 /** Set to the youngest committed revision, or #SVN_INVALID_REVNUM
2381 * if not out of date. */
2382 svn_revnum_t ood_changed_rev;
2384 /** Set to the most recent commit date, or @c 0 if not out of date. */
2385 apr_time_t ood_changed_date;
2387 /** Set to the user name of the youngest commit, or @c NULL if not
2388 * out of date or non-existent. Because a non-existent @c
2389 * svn:author property has the same behavior as an out-of-date
2390 * working copy, examine @c ood_changed_rev to determine whether
2391 * the working copy is out of date. */
2392 const char *ood_changed_author;
2396 /** Reserved for libsvn_client's internal use; this value is only to be used
2397 * for libsvn_client backwards compatibility wrappers. This value may be NULL
2398 * or to other data in future versions. */
2399 const void *backwards_compatibility_baton;
2401 /** Set to the local absolute path that this node was moved from, if this
2402 * file or directory has been moved here locally and is the root of that
2403 * move. Otherwise set to NULL.
2405 * This will be NULL for moved-here nodes that are just part of a subtree
2406 * that was moved along (and are not themselves a root of a different move
2409 * @since New in 1.8. */
2410 const char *moved_from_abspath;
2412 /** Set to the local absolute path that this node was moved to, if this file
2413 * or directory has been moved away locally and corresponds to the root
2414 * of the destination side of the move. Otherwise set to NULL.
2416 * Note: Saying just "root" here could be misleading. For example:
2419 * creates a situation where A/B is moved-to BB, but one could argue that
2420 * the move source's root actually was AA/B. Note that, as far as the
2421 * working copy is concerned, above case is exactly identical to:
2424 * In both situations, @a moved_to_abspath would be set for nodes A (moved
2425 * to AA) and A/B (moved to BB), only.
2427 * This will be NULL for moved-away nodes that were just part of a subtree
2428 * that was moved along (and are not themselves a root of a different move
2431 * @since New in 1.8. */
2432 const char *moved_to_abspath;
2434 /* NOTE! Please update svn_client_status_dup() when adding new fields here. */
2435 } svn_client_status_t;
2438 * Return a duplicate of @a status, allocated in @a result_pool. No part of the new
2439 * structure will be shared with @a status.
2441 * @since New in 1.7.
2443 svn_client_status_t *
2444 svn_client_status_dup(const svn_client_status_t *status,
2445 apr_pool_t *result_pool);
2448 * A callback for reporting a @a status about @a path (which may be an
2449 * absolute or relative path).
2451 * @a baton is a closure object; it should be provided by the
2452 * implementation, and passed by the caller.
2454 * @a scratch_pool will be cleared between invocations to the callback.
2456 * @since New in 1.7.
2458 typedef svn_error_t *(*svn_client_status_func_t)(
2461 const svn_client_status_t *status,
2462 apr_pool_t *scratch_pool);
2465 * Given @a path to a working copy directory (or single file), call
2466 * @a status_func/status_baton with a set of #svn_wc_status_t *
2467 * structures which describe the status of @a path, and its children
2468 * (recursing according to @a depth).
2470 * - If @a get_all is set, retrieve all entries; otherwise,
2471 * retrieve only "interesting" entries (local mods and/or
2474 * - If @a update is set, contact the repository and augment the
2475 * status structures with information about out-of-dateness (with
2476 * respect to @a revision). Also, if @a result_rev is not @c NULL,
2477 * set @a *result_rev to the actual revision against which the
2478 * working copy was compared (@a *result_rev is not meaningful unless
2479 * @a update is set).
2481 * If @a no_ignore is @c FALSE, don't report any file or directory (or
2482 * recurse into any directory) that is found by recursion (as opposed to
2483 * being the explicit target @a path) and whose name matches the
2484 * svn:ignore property on its parent directory or the global-ignores
2485 * list in @a ctx->config. If @a no_ignore is @c TRUE, report each such
2486 * file or directory with the status code #svn_wc_status_ignored.
2488 * If @a ignore_externals is not set, then recurse into externals
2489 * definitions (if any exist) after handling the main target. This
2490 * calls the client notification function (in @a ctx) with the
2491 * #svn_wc_notify_status_external action before handling each externals
2492 * definition, and with #svn_wc_notify_status_completed
2495 * If @a depth_as_sticky is set and @a depth is not
2496 * #svn_depth_unknown, then the status is calculated as if depth_is_sticky
2497 * was passed to an equivalent update command.
2499 * @a changelists is an array of <tt>const char *</tt> changelist
2500 * names, used as a restrictive filter on items whose statuses are
2501 * reported; that is, don't report status about any item unless
2502 * it's a member of one of those changelists. If @a changelists is
2503 * empty (or altogether @c NULL), no changelist filtering occurs.
2505 * If @a path is an absolute path then the @c path parameter passed in each
2506 * call to @a status_func will be an absolute path.
2508 * All temporary allocations are performed in @a scratch_pool.
2510 * @since New in 1.7.
2513 svn_client_status5(svn_revnum_t *result_rev,
2514 svn_client_ctx_t *ctx,
2516 const svn_opt_revision_t *revision,
2518 svn_boolean_t get_all,
2519 svn_boolean_t update,
2520 svn_boolean_t no_ignore,
2521 svn_boolean_t ignore_externals,
2522 svn_boolean_t depth_as_sticky,
2523 const apr_array_header_t *changelists,
2524 svn_client_status_func_t status_func,
2526 apr_pool_t *scratch_pool);
2529 * Same as svn_client_status5(), but using #svn_wc_status_func3_t
2530 * instead of #svn_client_status_func_t and depth_as_sticky set to TRUE.
2532 * @since New in 1.6.
2533 * @deprecated Provided for backward compatibility with the 1.6 API.
2537 svn_client_status4(svn_revnum_t *result_rev,
2539 const svn_opt_revision_t *revision,
2540 svn_wc_status_func3_t status_func,
2543 svn_boolean_t get_all,
2544 svn_boolean_t update,
2545 svn_boolean_t no_ignore,
2546 svn_boolean_t ignore_externals,
2547 const apr_array_header_t *changelists,
2548 svn_client_ctx_t *ctx,
2552 * Same as svn_client_status4(), but using an #svn_wc_status_func2_t
2553 * instead of an #svn_wc_status_func3_t.
2555 * @since New in 1.5.
2556 * @deprecated Provided for backward compatibility with the 1.5 API.
2560 svn_client_status3(svn_revnum_t *result_rev,
2562 const svn_opt_revision_t *revision,
2563 svn_wc_status_func2_t status_func,
2566 svn_boolean_t get_all,
2567 svn_boolean_t update,
2568 svn_boolean_t no_ignore,
2569 svn_boolean_t ignore_externals,
2570 const apr_array_header_t *changelists,
2571 svn_client_ctx_t *ctx,
2575 * Like svn_client_status3(), except with @a changelists passed as @c
2576 * NULL, and with @a recurse instead of @a depth. If @a recurse is
2577 * TRUE, behave as if for #svn_depth_infinity; else if @a recurse is
2578 * FALSE, behave as if for #svn_depth_immediates.
2580 * @since New in 1.2.
2581 * @deprecated Provided for backward compatibility with the 1.4 API.
2585 svn_client_status2(svn_revnum_t *result_rev,
2587 const svn_opt_revision_t *revision,
2588 svn_wc_status_func2_t status_func,
2590 svn_boolean_t recurse,
2591 svn_boolean_t get_all,
2592 svn_boolean_t update,
2593 svn_boolean_t no_ignore,
2594 svn_boolean_t ignore_externals,
2595 svn_client_ctx_t *ctx,
2600 * Similar to svn_client_status2(), but with @a ignore_externals
2601 * always set to FALSE, taking the #svn_wc_status_func_t type
2602 * instead of the #svn_wc_status_func2_t type for @a status_func,
2603 * and requiring @a *revision to be non-const even though it is
2604 * treated as constant.
2606 * @deprecated Provided for backward compatibility with the 1.1 API.
2610 svn_client_status(svn_revnum_t *result_rev,
2612 svn_opt_revision_t *revision,
2613 svn_wc_status_func_t status_func,
2615 svn_boolean_t recurse,
2616 svn_boolean_t get_all,
2617 svn_boolean_t update,
2618 svn_boolean_t no_ignore,
2619 svn_client_ctx_t *ctx,
2625 * @defgroup Log View information about previous revisions of an object.
2631 * Invoke @a receiver with @a receiver_baton on each log message from
2632 * each (#svn_opt_revision_range_t *) range in @a revision_ranges in turn,
2633 * inclusive (but never invoke @a receiver on a given log message more
2636 * @a targets contains either a URL followed by zero or more relative
2637 * paths, or 1 working copy path, as <tt>const char *</tt>, for which log
2638 * messages are desired. @a receiver is invoked only on messages whose
2639 * revisions involved a change to some path in @a targets. @a peg_revision
2640 * indicates in which revision @a targets are valid. If @a peg_revision is
2641 * #svn_opt_revision_unspecified, it defaults to #svn_opt_revision_head
2642 * for URLs or #svn_opt_revision_working for WC paths.
2644 * If @a limit is non-zero only invoke @a receiver on the first @a limit
2647 * If @a discover_changed_paths is set, then the @c changed_paths and @c
2648 * changed_paths2 fields in the @c log_entry argument to @a receiver will be
2649 * populated on each invocation. @note The @c text_modified and @c
2650 * props_modified fields of the changed paths structure may have the value
2651 * #svn_tristate_unknown if the repository does not report that information.
2653 * If @a strict_node_history is set, copy history (if any exists) will
2654 * not be traversed while harvesting revision logs for each target.
2656 * If @a include_merged_revisions is set, log information for revisions
2657 * which have been merged to @a targets will also be returned.
2659 * If @a revprops is NULL, retrieve all revision properties; else, retrieve
2660 * only the revision properties named by the (const char *) array elements
2661 * (i.e. retrieve none if the array is empty).
2663 * Use @a pool for any temporary allocation.
2665 * If @a ctx->notify_func2 is non-NULL, then call @a ctx->notify_func2/baton2
2666 * with a 'skip' signal on any unversioned targets.
2668 * @since New in 1.6.
2671 svn_client_log5(const apr_array_header_t *targets,
2672 const svn_opt_revision_t *peg_revision,
2673 const apr_array_header_t *revision_ranges,
2675 svn_boolean_t discover_changed_paths,
2676 svn_boolean_t strict_node_history,
2677 svn_boolean_t include_merged_revisions,
2678 const apr_array_header_t *revprops,
2679 svn_log_entry_receiver_t receiver,
2680 void *receiver_baton,
2681 svn_client_ctx_t *ctx,
2685 * Similar to svn_client_log5(), but takes explicit start and end parameters
2686 * instead of an array of revision ranges.
2688 * @deprecated Provided for compatibility with the 1.5 API.
2689 * @since New in 1.5.
2693 svn_client_log4(const apr_array_header_t *targets,
2694 const svn_opt_revision_t *peg_revision,
2695 const svn_opt_revision_t *start,
2696 const svn_opt_revision_t *end,
2698 svn_boolean_t discover_changed_paths,
2699 svn_boolean_t strict_node_history,
2700 svn_boolean_t include_merged_revisions,
2701 const apr_array_header_t *revprops,
2702 svn_log_entry_receiver_t receiver,
2703 void *receiver_baton,
2704 svn_client_ctx_t *ctx,
2708 * Similar to svn_client_log4(), but using #svn_log_message_receiver_t
2709 * instead of #svn_log_entry_receiver_t. Also, @a
2710 * include_merged_revisions is set to @c FALSE and @a revprops is
2711 * svn:author, svn:date, and svn:log.
2713 * @deprecated Provided for compatibility with the 1.4 API.
2714 * @since New in 1.4.
2718 svn_client_log3(const apr_array_header_t *targets,
2719 const svn_opt_revision_t *peg_revision,
2720 const svn_opt_revision_t *start,
2721 const svn_opt_revision_t *end,
2723 svn_boolean_t discover_changed_paths,
2724 svn_boolean_t strict_node_history,
2725 svn_log_message_receiver_t receiver,
2726 void *receiver_baton,
2727 svn_client_ctx_t *ctx,
2732 * Similar to svn_client_log3(), but with the @c kind field of
2733 * @a peg_revision set to #svn_opt_revision_unspecified.
2736 * A special case for the revision range HEAD:1, which was present
2737 * in svn_client_log(), has been removed from svn_client_log2(). Instead, it
2738 * is expected that callers will specify the range HEAD:0, to avoid a
2739 * #SVN_ERR_FS_NO_SUCH_REVISION error when invoked against an empty repository
2740 * (i.e. one not containing a revision 1).
2742 * @deprecated Provided for compatibility with the 1.3 API.
2743 * @since New in 1.2.
2747 svn_client_log2(const apr_array_header_t *targets,
2748 const svn_opt_revision_t *start,
2749 const svn_opt_revision_t *end,
2751 svn_boolean_t discover_changed_paths,
2752 svn_boolean_t strict_node_history,
2753 svn_log_message_receiver_t receiver,
2754 void *receiver_baton,
2755 svn_client_ctx_t *ctx,
2760 * Similar to svn_client_log2(), but with @a limit set to 0, and the
2761 * following special case:
2763 * Special case for repositories at revision 0:
2765 * If @a start->kind is #svn_opt_revision_head, and @a end->kind is
2766 * #svn_opt_revision_number && @a end->number is @c 1, then handle an
2767 * empty (no revisions) repository specially: instead of erroring
2768 * because requested revision 1 when the highest revision is 0, just
2769 * invoke @a receiver on revision 0, passing @c NULL for changed paths and
2770 * empty strings for the author and date. This is because that
2771 * particular combination of @a start and @a end usually indicates the
2772 * common case of log invocation -- the user wants to see all log
2773 * messages from youngest to oldest, where the oldest commit is
2774 * revision 1. That works fine, except when there are no commits in
2775 * the repository, hence this special case.
2777 * @deprecated Provided for backward compatibility with the 1.1 API.
2781 svn_client_log(const apr_array_header_t *targets,
2782 const svn_opt_revision_t *start,
2783 const svn_opt_revision_t *end,
2784 svn_boolean_t discover_changed_paths,
2785 svn_boolean_t strict_node_history,
2786 svn_log_message_receiver_t receiver,
2787 void *receiver_baton,
2788 svn_client_ctx_t *ctx,
2794 * @defgroup Blame Show modification information about lines in a file.
2800 * Invoke @a receiver with @a receiver_baton on each line-blame item
2801 * associated with revision @a end of @a path_or_url, using @a start
2802 * as the default source of all blame. @a peg_revision indicates in
2803 * which revision @a path_or_url is valid. If @a peg_revision->kind
2804 * is #svn_opt_revision_unspecified, then it defaults to
2805 * #svn_opt_revision_head for URLs or #svn_opt_revision_working for
2808 * If @a start->kind or @a end->kind is #svn_opt_revision_unspecified,
2809 * return the error #SVN_ERR_CLIENT_BAD_REVISION. If either are
2810 * #svn_opt_revision_working, return the error
2811 * #SVN_ERR_UNSUPPORTED_FEATURE. If any of the revisions of @a
2812 * path_or_url have a binary mime-type, return the error
2813 * #SVN_ERR_CLIENT_IS_BINARY_FILE, unless @a ignore_mime_type is TRUE,
2814 * in which case blame information will be generated regardless of the
2815 * MIME types of the revisions.
2817 * Use @a diff_options to determine how to compare different revisions of the
2820 * If @a include_merged_revisions is TRUE, also return data based upon
2821 * revisions which have been merged to @a path_or_url.
2823 * Use @a pool for any temporary allocation.
2825 * @since New in 1.7.
2828 svn_client_blame5(const char *path_or_url,
2829 const svn_opt_revision_t *peg_revision,
2830 const svn_opt_revision_t *start,
2831 const svn_opt_revision_t *end,
2832 const svn_diff_file_options_t *diff_options,
2833 svn_boolean_t ignore_mime_type,
2834 svn_boolean_t include_merged_revisions,
2835 svn_client_blame_receiver3_t receiver,
2836 void *receiver_baton,
2837 svn_client_ctx_t *ctx,
2842 * Similar to svn_client_blame5(), but with #svn_client_blame_receiver3_t
2845 * @deprecated Provided for backwards compatibility with the 1.6 API.
2847 * @since New in 1.5.
2851 svn_client_blame4(const char *path_or_url,
2852 const svn_opt_revision_t *peg_revision,
2853 const svn_opt_revision_t *start,
2854 const svn_opt_revision_t *end,
2855 const svn_diff_file_options_t *diff_options,
2856 svn_boolean_t ignore_mime_type,
2857 svn_boolean_t include_merged_revisions,
2858 svn_client_blame_receiver2_t receiver,
2859 void *receiver_baton,
2860 svn_client_ctx_t *ctx,
2864 * Similar to svn_client_blame4(), but with @a include_merged_revisions set
2865 * to FALSE, and using a #svn_client_blame_receiver2_t as the receiver.
2867 * @deprecated Provided for backwards compatibility with the 1.4 API.
2869 * @since New in 1.4.
2873 svn_client_blame3(const char *path_or_url,
2874 const svn_opt_revision_t *peg_revision,
2875 const svn_opt_revision_t *start,
2876 const svn_opt_revision_t *end,
2877 const svn_diff_file_options_t *diff_options,
2878 svn_boolean_t ignore_mime_type,
2879 svn_client_blame_receiver_t receiver,
2880 void *receiver_baton,
2881 svn_client_ctx_t *ctx,
2885 * Similar to svn_client_blame3(), but with @a diff_options set to
2886 * default options as returned by svn_diff_file_options_parse() and
2887 * @a ignore_mime_type set to FALSE.
2889 * @deprecated Provided for backwards compatibility with the 1.3 API.
2891 * @since New in 1.2.
2895 svn_client_blame2(const char *path_or_url,
2896 const svn_opt_revision_t *peg_revision,
2897 const svn_opt_revision_t *start,
2898 const svn_opt_revision_t *end,
2899 svn_client_blame_receiver_t receiver,
2900 void *receiver_baton,
2901 svn_client_ctx_t *ctx,
2905 * Similar to svn_client_blame2() except that @a peg_revision is always
2906 * the same as @a end.
2908 * @deprecated Provided for backward compatibility with the 1.1 API.
2912 svn_client_blame(const char *path_or_url,
2913 const svn_opt_revision_t *start,
2914 const svn_opt_revision_t *end,
2915 svn_client_blame_receiver_t receiver,
2916 void *receiver_baton,
2917 svn_client_ctx_t *ctx,
2923 * @defgroup Diff Generate differences between paths.
2929 * Produce diff output which describes the delta between
2930 * @a path_or_url1/@a revision1 and @a path_or_url2/@a revision2. Print
2931 * the output of the diff to @a outstream, and any errors to @a
2932 * errstream. @a path_or_url1 and @a path_or_url2 can be either
2933 * working-copy paths or URLs.
2935 * If @a relative_to_dir is not @c NULL, the original path and
2936 * modified path will have the @a relative_to_dir stripped from the
2937 * front of the respective paths. If @a relative_to_dir is @c NULL,
2938 * paths will not be modified. If @a relative_to_dir is not
2939 * @c NULL but @a relative_to_dir is not a parent path of the target,
2940 * an error is returned. Finally, if @a relative_to_dir is a URL, an
2941 * error will be returned.
2943 * If either @a revision1 or @a revision2 has an `unspecified' or
2944 * unrecognized `kind', return #SVN_ERR_CLIENT_BAD_REVISION.
2946 * @a path_or_url1 and @a path_or_url2 must both represent the same node
2947 * kind -- that is, if @a path_or_url1 is a directory, @a path_or_url2
2948 * must also be, and if @a path_or_url1 is a file, @a path_or_url2 must
2951 * If @a depth is #svn_depth_infinity, diff fully recursively.
2952 * Else if it is #svn_depth_immediates, diff the named paths and
2953 * their file children (if any), and diff properties of
2954 * subdirectories, but do not descend further into the subdirectories.
2955 * Else if #svn_depth_files, behave as if for #svn_depth_immediates
2956 * except don't diff properties of subdirectories. If
2957 * #svn_depth_empty, diff exactly the named paths but nothing
2960 * Use @a ignore_ancestry to control whether or not items being
2961 * diffed will be checked for relatedness first. Unrelated items
2962 * are typically transmitted to the editor as a deletion of one thing
2963 * and the addition of another, but if this flag is TRUE, unrelated
2964 * items will be diffed as if they were related.
2966 * If @a no_diff_added is TRUE, then no diff output will be generated
2969 * If @a no_diff_deleted is TRUE, then no diff output will be
2970 * generated on deleted files.
2972 * If @a show_copies_as_adds is TRUE, then copied files will not be diffed
2973 * against their copyfrom source, and will appear in the diff output
2974 * in their entirety, as if they were newly added.
2975 * ### BUGS: For a repos-repos diff, this is ignored. Instead, a file is
2976 * diffed against its copyfrom source iff the file is the diff target
2977 * and not if some parent directory is the diff target. For a repos-WC
2978 * diff, this is ignored if the file is the diff target.
2980 * If @a use_git_diff_format is TRUE, then the git's extended diff format
2982 * ### Do we need to say more about the format? A reference perhaps?
2984 * If @a ignore_properties is TRUE, do not show property differences.
2985 * If @a properties_only is TRUE, show only property changes.
2986 * The above two options are mutually exclusive. It is an error to set
2989 * Generated headers are encoded using @a header_encoding.
2991 * Diff output will not be generated for binary files, unless @a
2992 * ignore_content_type is TRUE, in which case diffs will be shown
2993 * regardless of the content types.
2995 * @a diff_options (an array of <tt>const char *</tt>) is used to pass
2996 * additional command line options to the diff processes invoked to compare
2997 * files. @a diff_options is allowed to be @c NULL, in which case a value
2998 * for this option might still be obtained from the Subversion configuration
2999 * file via client context @a ctx.
3001 * The authentication baton cached in @a ctx is used to communicate with
3004 * @a changelists is an array of <tt>const char *</tt> changelist
3005 * names, used as a restrictive filter on items whose differences are
3006 * reported; that is, don't generate diffs about any item unless
3007 * it's a member of one of those changelists. If @a changelists is
3008 * empty (or altogether @c NULL), no changelist filtering occurs.
3010 * @note Changelist filtering only applies to diffs in which at least
3011 * one side of the diff represents working copy data.
3013 * @note @a header_encoding doesn't affect headers generated by external
3016 * @note @a relative_to_dir doesn't affect the path index generated by
3017 * external diff programs.
3019 * @since New in 1.8.
3022 svn_client_diff6(const apr_array_header_t *diff_options,
3023 const char *path_or_url1,
3024 const svn_opt_revision_t *revision1,
3025 const char *path_or_url2,
3026 const svn_opt_revision_t *revision2,
3027 const char *relative_to_dir,
3029 svn_boolean_t ignore_ancestry,
3030 svn_boolean_t no_diff_added,
3031 svn_boolean_t no_diff_deleted,
3032 svn_boolean_t show_copies_as_adds,
3033 svn_boolean_t ignore_content_type,
3034 svn_boolean_t ignore_properties,
3035 svn_boolean_t properties_only,
3036 svn_boolean_t use_git_diff_format,
3037 const char *header_encoding,
3038 svn_stream_t *outstream,
3039 svn_stream_t *errstream,
3040 const apr_array_header_t *changelists,
3041 svn_client_ctx_t *ctx,
3044 /** Similar to svn_client_diff6(), but with @a outfile and @a errfile,
3045 * instead of @a outstream and @a errstream, and with @a
3046 * no_diff_added, @a ignore_properties, and @a properties_only always
3047 * passed as @c FALSE (which means that additions and property changes
3048 * are always transmitted).
3050 * @deprecated Provided for backward compatibility with the 1.7 API.
3051 * @since New in 1.7.
3055 svn_client_diff5(const apr_array_header_t *diff_options,
3057 const svn_opt_revision_t *revision1,
3059 const svn_opt_revision_t *revision2,
3060 const char *relative_to_dir,
3062 svn_boolean_t ignore_ancestry,
3063 svn_boolean_t no_diff_deleted,
3064 svn_boolean_t show_copies_as_adds,
3065 svn_boolean_t ignore_content_type,
3066 svn_boolean_t use_git_diff_format,
3067 const char *header_encoding,
3068 apr_file_t *outfile,
3069 apr_file_t *errfile,
3070 const apr_array_header_t *changelists,
3071 svn_client_ctx_t *ctx,
3075 * Similar to svn_client_diff5(), but with @a show_copies_as_adds set to
3076 * @c FALSE and @a use_git_diff_format set to @c FALSE.
3078 * @deprecated Provided for backward compatibility with the 1.6 API.
3079 * @since New in 1.5.
3083 svn_client_diff4(const apr_array_header_t *diff_options,
3085 const svn_opt_revision_t *revision1,
3087 const svn_opt_revision_t *revision2,
3088 const char *relative_to_dir,
3090 svn_boolean_t ignore_ancestry,
3091 svn_boolean_t no_diff_deleted,
3092 svn_boolean_t ignore_content_type,
3093 const char *header_encoding,
3094 apr_file_t *outfile,
3095 apr_file_t *errfile,
3096 const apr_array_header_t *changelists,
3097 svn_client_ctx_t *ctx,
3101 * Similar to svn_client_diff4(), but with @a changelists passed as @c
3102 * NULL, and @a depth set according to @a recurse: if @a recurse is
3103 * TRUE, set @a depth to #svn_depth_infinity, if @a recurse is
3104 * FALSE, set @a depth to #svn_depth_empty.
3106 * @deprecated Provided for backward compatibility with the 1.4 API.
3107 * @since New in 1.3.
3111 svn_client_diff3(const apr_array_header_t *diff_options,
3113 const svn_opt_revision_t *revision1,
3115 const svn_opt_revision_t *revision2,
3116 svn_boolean_t recurse,
3117 svn_boolean_t ignore_ancestry,
3118 svn_boolean_t no_diff_deleted,
3119 svn_boolean_t ignore_content_type,
3120 const char *header_encoding,
3121 apr_file_t *outfile,
3122 apr_file_t *errfile,
3123 svn_client_ctx_t *ctx,
3128 * Similar to svn_client_diff3(), but with @a header_encoding set to
3129 * @c APR_LOCALE_CHARSET.
3131 * @deprecated Provided for backward compatibility with the 1.2 API.
3132 * @since New in 1.2.
3136 svn_client_diff2(const apr_array_header_t *diff_options,
3138 const svn_opt_revision_t *revision1,
3140 const svn_opt_revision_t *revision2,
3141 svn_boolean_t recurse,
3142 svn_boolean_t ignore_ancestry,
3143 svn_boolean_t no_diff_deleted,
3144 svn_boolean_t ignore_content_type,
3145 apr_file_t *outfile,
3146 apr_file_t *errfile,
3147 svn_client_ctx_t *ctx,
3151 * Similar to svn_client_diff2(), but with @a ignore_content_type
3152 * always set to FALSE.
3154 * @deprecated Provided for backward compatibility with the 1.1 API.
3158 svn_client_diff(const apr_array_header_t *diff_options,
3160 const svn_opt_revision_t *revision1,
3162 const svn_opt_revision_t *revision2,
3163 svn_boolean_t recurse,
3164 svn_boolean_t ignore_ancestry,
3165 svn_boolean_t no_diff_deleted,
3166 apr_file_t *outfile,
3167 apr_file_t *errfile,
3168 svn_client_ctx_t *ctx,
3172 * Produce diff output which describes the delta between the filesystem
3173 * object @a path_or_url in peg revision @a peg_revision, as it changed
3174 * between @a start_revision and @a end_revision. @a path_or_url can
3175 * be either a working-copy path or URL.
3177 * If @a peg_revision is #svn_opt_revision_unspecified, behave
3178 * identically to svn_client_diff6(), using @a path_or_url for both of that
3179 * function's @a path_or_url1 and @a path_or_url2 arguments.
3181 * All other options are handled identically to svn_client_diff6().
3183 * @since New in 1.8.
3186 svn_client_diff_peg6(const apr_array_header_t *diff_options,
3187 const char *path_or_url,
3188 const svn_opt_revision_t *peg_revision,
3189 const svn_opt_revision_t *start_revision,
3190 const svn_opt_revision_t *end_revision,
3191 const char *relative_to_dir,
3193 svn_boolean_t ignore_ancestry,
3194 svn_boolean_t no_diff_added,
3195 svn_boolean_t no_diff_deleted,
3196 svn_boolean_t show_copies_as_adds,
3197 svn_boolean_t ignore_content_type,
3198 svn_boolean_t ignore_properties,
3199 svn_boolean_t properties_only,
3200 svn_boolean_t use_git_diff_format,
3201 const char *header_encoding,
3202 svn_stream_t *outstream,
3203 svn_stream_t *errstream,
3204 const apr_array_header_t *changelists,
3205 svn_client_ctx_t *ctx,
3208 /** Similar to svn_client_diff6_peg6(), but with @a outfile and @a errfile,
3209 * instead of @a outstream and @a errstream, and with @a
3210 * no_diff_added, @a ignore_properties, and @a properties_only always
3211 * passed as @c FALSE (which means that additions and property changes
3212 * are always transmitted).
3214 * @deprecated Provided for backward compatibility with the 1.7 API.
3215 * @since New in 1.7.
3219 svn_client_diff_peg5(const apr_array_header_t *diff_options,
3221 const svn_opt_revision_t *peg_revision,
3222 const svn_opt_revision_t *start_revision,
3223 const svn_opt_revision_t *end_revision,
3224 const char *relative_to_dir,
3226 svn_boolean_t ignore_ancestry,
3227 svn_boolean_t no_diff_deleted,
3228 svn_boolean_t show_copies_as_adds,
3229 svn_boolean_t ignore_content_type,
3230 svn_boolean_t use_git_diff_format,
3231 const char *header_encoding,
3232 apr_file_t *outfile,
3233 apr_file_t *errfile,
3234 const apr_array_header_t *changelists,
3235 svn_client_ctx_t *ctx,
3239 * Similar to svn_client_diff_peg5(), but with @a show_copies_as_adds set to
3240 * @c FALSE and @a use_git_diff_format set to @c FALSE.
3242 * @since New in 1.5.
3243 * @deprecated Provided for backward compatibility with the 1.6 API.
3247 svn_client_diff_peg4(const apr_array_header_t *diff_options,
3249 const svn_opt_revision_t *peg_revision,
3250 const svn_opt_revision_t *start_revision,
3251 const svn_opt_revision_t *end_revision,
3252 const char *relative_to_dir,
3254 svn_boolean_t ignore_ancestry,
3255 svn_boolean_t no_diff_deleted,
3256 svn_boolean_t ignore_content_type,
3257 const char *header_encoding,
3258 apr_file_t *outfile,
3259 apr_file_t *errfile,
3260 const apr_array_header_t *changelists,
3261 svn_client_ctx_t *ctx,
3265 * Similar to svn_client_diff_peg4(), but with @a changelists passed
3266 * as @c NULL, and @a depth set according to @a recurse: if @a recurse
3267 * is TRUE, set @a depth to #svn_depth_infinity, if @a recurse is
3268 * FALSE, set @a depth to #svn_depth_files.
3270 * @deprecated Provided for backward compatibility with the 1.4 API.
3271 * @since New in 1.3.
3275 svn_client_diff_peg3(const apr_array_header_t *diff_options,
3277 const svn_opt_revision_t *peg_revision,
3278 const svn_opt_revision_t *start_revision,
3279 const svn_opt_revision_t *end_revision,
3280 svn_boolean_t recurse,
3281 svn_boolean_t ignore_ancestry,
3282 svn_boolean_t no_diff_deleted,
3283 svn_boolean_t ignore_content_type,
3284 const char *header_encoding,
3285 apr_file_t *outfile,
3286 apr_file_t *errfile,
3287 svn_client_ctx_t *ctx,
3291 * Similar to svn_client_diff_peg3(), but with @a header_encoding set to
3292 * @c APR_LOCALE_CHARSET.
3294 * @deprecated Provided for backward compatibility with the 1.2 API.
3295 * @since New in 1.2.
3299 svn_client_diff_peg2(const apr_array_header_t *diff_options,
3301 const svn_opt_revision_t *peg_revision,
3302 const svn_opt_revision_t *start_revision,
3303 const svn_opt_revision_t *end_revision,
3304 svn_boolean_t recurse,
3305 svn_boolean_t ignore_ancestry,
3306 svn_boolean_t no_diff_deleted,
3307 svn_boolean_t ignore_content_type,
3308 apr_file_t *outfile,
3309 apr_file_t *errfile,
3310 svn_client_ctx_t *ctx,
3314 * Similar to svn_client_diff_peg2(), but with @a ignore_content_type
3315 * always set to FALSE.
3317 * @since New in 1.1.
3318 * @deprecated Provided for backward compatibility with the 1.1 API.
3322 svn_client_diff_peg(const apr_array_header_t *diff_options,
3324 const svn_opt_revision_t *peg_revision,
3325 const svn_opt_revision_t *start_revision,
3326 const svn_opt_revision_t *end_revision,
3327 svn_boolean_t recurse,
3328 svn_boolean_t ignore_ancestry,
3329 svn_boolean_t no_diff_deleted,
3330 apr_file_t *outfile,
3331 apr_file_t *errfile,
3332 svn_client_ctx_t *ctx,
3336 * Produce a diff summary which lists the changed items between
3337 * @a path_or_url1/@a revision1 and @a path_or_url2/@a revision2 without
3338 * creating text deltas. @a path_or_url1 and @a path_or_url2 can be
3339 * either working-copy paths or URLs.
3341 * The function may report false positives if @a ignore_ancestry is false,
3342 * since a file might have been modified between two revisions, but still
3343 * have the same contents.
3345 * Calls @a summarize_func with @a summarize_baton for each difference
3346 * with a #svn_client_diff_summarize_t structure describing the difference.
3348 * See svn_client_diff6() for a description of the other parameters.
3350 * @since New in 1.5.
3353 svn_client_diff_summarize2(const char *path_or_url1,
3354 const svn_opt_revision_t *revision1,
3355 const char *path_or_url2,
3356 const svn_opt_revision_t *revision2,
3358 svn_boolean_t ignore_ancestry,
3359 const apr_array_header_t *changelists,
3360 svn_client_diff_summarize_func_t summarize_func,
3361 void *summarize_baton,
3362 svn_client_ctx_t *ctx,
3366 * Similar to svn_client_diff_summarize2(), but with @a changelists
3367 * passed as @c NULL, and @a depth set according to @a recurse: if @a
3368 * recurse is TRUE, set @a depth to #svn_depth_infinity, if @a
3369 * recurse is FALSE, set @a depth to #svn_depth_files.
3371 * @deprecated Provided for backward compatibility with the 1.4 API.
3373 * @since New in 1.4.
3377 svn_client_diff_summarize(const char *path1,
3378 const svn_opt_revision_t *revision1,
3380 const svn_opt_revision_t *revision2,
3381 svn_boolean_t recurse,
3382 svn_boolean_t ignore_ancestry,
3383 svn_client_diff_summarize_func_t summarize_func,
3384 void *summarize_baton,
3385 svn_client_ctx_t *ctx,
3389 * Produce a diff summary which lists the changed items between the
3390 * filesystem object @a path_or_url in peg revision @a peg_revision, as it
3391 * changed between @a start_revision and @a end_revision. @a path_or_url can
3392 * be either a working-copy path or URL.
3394 * If @a peg_revision is #svn_opt_revision_unspecified, behave
3395 * identically to svn_client_diff_summarize2(), using @a path_or_url for
3396 * both of that function's @a path_or_url1 and @a path_or_url2 arguments.
3398 * The function may report false positives if @a ignore_ancestry is false,
3399 * as described in the documentation for svn_client_diff_summarize2().
3401 * Call @a summarize_func with @a summarize_baton for each difference
3402 * with a #svn_client_diff_summarize_t structure describing the difference.
3404 * See svn_client_diff_peg5() for a description of the other parameters.
3406 * @since New in 1.5.
3409 svn_client_diff_summarize_peg2(const char *path_or_url,
3410 const svn_opt_revision_t *peg_revision,
3411 const svn_opt_revision_t *start_revision,
3412 const svn_opt_revision_t *end_revision,
3414 svn_boolean_t ignore_ancestry,
3415 const apr_array_header_t *changelists,
3416 svn_client_diff_summarize_func_t summarize_func,
3417 void *summarize_baton,
3418 svn_client_ctx_t *ctx,
3422 * Similar to svn_client_diff_summarize_peg2(), but with @a
3423 * changelists passed as @c NULL, and @a depth set according to @a
3424 * recurse: if @a recurse is TRUE, set @a depth to
3425 * #svn_depth_infinity, if @a recurse is FALSE, set @a depth to
3428 * @deprecated Provided for backward compatibility with the 1.4 API.
3430 * @since New in 1.4.
3434 svn_client_diff_summarize_peg(const char *path,
3435 const svn_opt_revision_t *peg_revision,
3436 const svn_opt_revision_t *start_revision,
3437 const svn_opt_revision_t *end_revision,
3438 svn_boolean_t recurse,
3439 svn_boolean_t ignore_ancestry,
3440 svn_client_diff_summarize_func_t summarize_func,
3441 void *summarize_baton,
3442 svn_client_ctx_t *ctx,
3448 * @defgroup Merge Merge changes between branches.
3453 /** Get information about the state of merging between two branches.
3455 * The source is specified by @a source_path_or_url at @a source_revision.
3456 * The target is specified by @a target_path_or_url at @a target_revision,
3457 * which refers to either a WC or a repository location.
3459 * Set @a *needs_reintegration to true if an automatic merge from source
3460 * to target would be a reintegration merge: that is, if the last automatic
3461 * merge was in the opposite direction; or to false otherwise.
3463 * Set @a *yca_url, @a *yca_rev, @a *base_url, @a *base_rev, @a *right_url,
3464 * @a *right_rev, @a *target_url, @a *target_rev to the repository locations
3465 * of, respectively: the youngest common ancestor of the branches, the base
3466 * chosen for 3-way merge, the right-hand side of the source diff, and the
3469 * Set @a repos_root_url to the URL of the repository root. This is a
3470 * common prefix of all four URL outputs.
3472 * Allocate the results in @a result_pool. Any of the output pointers may
3473 * be NULL if not wanted.
3475 * @since New in 1.8.
3478 svn_client_get_merging_summary(svn_boolean_t *needs_reintegration,
3479 const char **yca_url, svn_revnum_t *yca_rev,
3480 const char **base_url, svn_revnum_t *base_rev,
3481 const char **right_url, svn_revnum_t *right_rev,
3482 const char **target_url, svn_revnum_t *target_rev,
3483 const char **repos_root_url,
3484 const char *source_path_or_url,
3485 const svn_opt_revision_t *source_revision,
3486 const char *target_path_or_url,
3487 const svn_opt_revision_t *target_revision,
3488 svn_client_ctx_t *ctx,
3489 apr_pool_t *result_pool,
3490 apr_pool_t *scratch_pool);
3493 /** Merge changes from @a source1/@a revision1 to @a source2/@a revision2 into
3494 * the working-copy path @a target_wcpath.
3496 * @a source1 and @a source2 are either URLs that refer to entries in the
3497 * repository, or paths to entries in the working copy.
3499 * By "merging", we mean: apply file differences using
3500 * svn_wc_merge(), and schedule additions & deletions when appropriate.
3502 * @a source1 and @a source2 must both represent the same node kind -- that
3503 * is, if @a source1 is a directory, @a source2 must also be, and if @a source1
3504 * is a file, @a source2 must also be.
3506 * If either @a revision1 or @a revision2 has an `unspecified' or
3507 * unrecognized `kind', return #SVN_ERR_CLIENT_BAD_REVISION.
3509 * If @a depth is #svn_depth_infinity, merge fully recursively.
3510 * Else if #svn_depth_immediates, merge changes at most to files
3511 * that are immediate children of @a target_wcpath and to directory
3512 * properties of @a target_wcpath and its immediate subdirectory children.
3513 * Else if #svn_depth_files, merge at most to immediate file
3514 * children of @a target_wcpath and to @a target_wcpath itself.
3515 * Else if #svn_depth_empty, apply changes only to @a target_wcpath
3516 * (i.e., directory property changes only)
3518 * If @a depth is #svn_depth_unknown, use the depth of @a target_wcpath.
3520 * If @a ignore_mergeinfo is true, disable merge tracking, by treating the
3521 * two sources as unrelated even if they actually have a common ancestor.
3523 * If @a diff_ignore_ancestry is true, diff unrelated nodes as if related:
3524 * that is, diff the 'left' and 'right' versions of a node as if they were
3525 * related (if they are the same kind) even if they are not related.
3526 * Otherwise, diff unrelated items as a deletion of one thing and the
3527 * addition of another.
3529 * If @a force_delete is false and the merge involves deleting a file whose
3530 * content differs from the source-left version, or a locally modified
3531 * directory, or an unversioned item, then the operation will fail. If
3532 * @a force_delete is true then all such items will be deleted.
3534 * @a merge_options (an array of <tt>const char *</tt>), if non-NULL,
3535 * is used to pass additional command line arguments to the merge
3536 * processes (internal or external). @see
3537 * svn_diff_file_options_parse().
3539 * If @a ctx->notify_func2 is non-NULL, then call @a ctx->notify_func2 with @a
3540 * ctx->notify_baton2 once for each merged target, passing the target's local
3543 * If @a record_only is TRUE, the merge is performed, but is limited only to
3544 * mergeinfo property changes on existing paths in @a target_wcpath.
3546 * If @a dry_run is TRUE, the merge is carried out, and full notification
3547 * feedback is provided, but the working copy is not modified.
3549 * If allow_mixed_rev is @c FALSE, and @a merge_target is a mixed-revision
3550 * working copy, raise @c SVN_ERR_CLIENT_MERGE_UPDATE_REQUIRED.
3551 * Because users rarely intend to merge into mixed-revision working copies,
3552 * it is recommended to set this parameter to FALSE by default unless the
3553 * user has explicitly requested a merge into a mixed-revision working copy.
3555 * The authentication baton cached in @a ctx is used to communicate with the
3558 * @since New in 1.8.
3561 svn_client_merge5(const char *source1,
3562 const svn_opt_revision_t *revision1,
3563 const char *source2,
3564 const svn_opt_revision_t *revision2,
3565 const char *target_wcpath,
3567 svn_boolean_t ignore_mergeinfo,
3568 svn_boolean_t diff_ignore_ancestry,
3569 svn_boolean_t force_delete,
3570 svn_boolean_t record_only,
3571 svn_boolean_t dry_run,
3572 svn_boolean_t allow_mixed_rev,
3573 const apr_array_header_t *merge_options,
3574 svn_client_ctx_t *ctx,
3578 * Similar to svn_client_merge5(), but the single @a ignore_ancestry
3579 * parameter maps to both @c ignore_mergeinfo and @c diff_ignore_ancestry.
3581 * @deprecated Provided for backward compatibility with the 1.7 API.
3582 * @since New in 1.7.
3586 svn_client_merge4(const char *source1,
3587 const svn_opt_revision_t *revision1,
3588 const char *source2,
3589 const svn_opt_revision_t *revision2,
3590 const char *target_wcpath,
3592 svn_boolean_t ignore_ancestry,
3593 svn_boolean_t force_delete,
3594 svn_boolean_t record_only,
3595 svn_boolean_t dry_run,
3596 svn_boolean_t allow_mixed_rev,
3597 const apr_array_header_t *merge_options,
3598 svn_client_ctx_t *ctx,
3602 * Similar to svn_client_merge4(), but with @a allow_mixed_rev set to
3603 * @c TRUE. The @a force parameter maps to the @c force_delete parameter
3604 * of svn_client_merge4().
3606 * @deprecated Provided for backward compatibility with the 1.6 API.
3608 * @since New in 1.5.
3612 svn_client_merge3(const char *source1,
3613 const svn_opt_revision_t *revision1,
3614 const char *source2,
3615 const svn_opt_revision_t *revision2,
3616 const char *target_wcpath,
3618 svn_boolean_t ignore_ancestry,
3619 svn_boolean_t force,
3620 svn_boolean_t record_only,
3621 svn_boolean_t dry_run,
3622 const apr_array_header_t *merge_options,
3623 svn_client_ctx_t *ctx,
3627 * Similar to svn_client_merge3(), but with @a record_only set to @c
3628 * FALSE, and @a depth set according to @a recurse: if @a recurse is
3629 * TRUE, set @a depth to #svn_depth_infinity, if @a recurse is
3630 * FALSE, set @a depth to #svn_depth_files.
3632 * @deprecated Provided for backward compatibility with the 1.4 API.
3634 * @since New in 1.4.
3638 svn_client_merge2(const char *source1,
3639 const svn_opt_revision_t *revision1,
3640 const char *source2,
3641 const svn_opt_revision_t *revision2,
3642 const char *target_wcpath,
3643 svn_boolean_t recurse,
3644 svn_boolean_t ignore_ancestry,
3645 svn_boolean_t force,
3646 svn_boolean_t dry_run,
3647 const apr_array_header_t *merge_options,
3648 svn_client_ctx_t *ctx,
3653 * Similar to svn_client_merge2(), but with @a merge_options set to NULL.
3655 * @deprecated Provided for backwards compatibility with the 1.3 API.
3659 svn_client_merge(const char *source1,
3660 const svn_opt_revision_t *revision1,
3661 const char *source2,
3662 const svn_opt_revision_t *revision2,
3663 const char *target_wcpath,
3664 svn_boolean_t recurse,
3665 svn_boolean_t ignore_ancestry,
3666 svn_boolean_t force,
3667 svn_boolean_t dry_run,
3668 svn_client_ctx_t *ctx,
3673 * Perform a reintegration merge of @a source_path_or_url at @a source_peg_revision
3674 * into @a target_wcpath.
3675 * @a target_wcpath must be a single-revision, #svn_depth_infinity,
3676 * pristine, unswitched working copy -- in other words, it must
3677 * reflect a single revision tree, the "target". The mergeinfo on @a
3678 * source_path_or_url must reflect that all of the target has been merged into it.
3679 * Then this behaves like a merge with svn_client_merge5() from the
3680 * target's URL to the source.
3682 * All other options are handled identically to svn_client_merge5().
3683 * The depth of the merge is always #svn_depth_infinity.
3685 * @since New in 1.5.
3686 * @deprecated Provided for backwards compatibility with the 1.7 API.
3690 svn_client_merge_reintegrate(const char *source_path_or_url,
3691 const svn_opt_revision_t *source_peg_revision,
3692 const char *target_wcpath,
3693 svn_boolean_t dry_run,
3694 const apr_array_header_t *merge_options,
3695 svn_client_ctx_t *ctx,
3699 * Merge changes from the source branch identified by
3700 * @a source_path_or_url in peg revision @a source_peg_revision,
3701 * into the target branch working copy at @a target_wcpath.
3703 * If @a ranges_to_merge is NULL then perform an automatic merge of
3704 * all the eligible changes up to @a source_peg_revision. If the merge
3705 * required is a reintegrate merge, then return an error if the WC has
3706 * mixed revisions, local modifications and/or switched subtrees; if
3707 * the merge is determined to be of the non-reintegrate kind, then
3708 * return an error if @a allow_mixed_rev is false and the WC contains
3711 * If @a ranges_to_merge is not NULL then merge the changes specified
3712 * by the revision ranges in @a ranges_to_merge, or, when honouring
3713 * mergeinfo, only the eligible parts of those revision ranges.
3714 * @a ranges_to_merge is an array of <tt>svn_opt_revision_range_t
3715 * *</tt> ranges. These ranges may describe additive and/or
3716 * subtractive merge ranges, they may overlap fully or partially,
3717 * and/or they may partially or fully negate each other. This
3718 * rangelist is not required to be sorted. If any revision in the
3719 * list of provided ranges has an `unspecified' or unrecognized
3720 * `kind', return #SVN_ERR_CLIENT_BAD_REVISION.
3722 * If @a ranges_to_merge is an empty array, then do nothing.
3724 * All other options are handled identically to svn_client_merge5().
3726 * @since New in 1.8.
3729 svn_client_merge_peg5(const char *source_path_or_url,
3730 const apr_array_header_t *ranges_to_merge,
3731 const svn_opt_revision_t *source_peg_revision,
3732 const char *target_wcpath,
3734 svn_boolean_t ignore_mergeinfo,
3735 svn_boolean_t diff_ignore_ancestry,
3736 svn_boolean_t force_delete,
3737 svn_boolean_t record_only,
3738 svn_boolean_t dry_run,
3739 svn_boolean_t allow_mixed_rev,
3740 const apr_array_header_t *merge_options,
3741 svn_client_ctx_t *ctx,
3745 * Similar to svn_client_merge_peg5(), but automatic merge is not available
3746 * (@a ranges_to_merge must not be NULL), and the single @a ignore_ancestry
3747 * parameter maps to both @c ignore_mergeinfo and @c diff_ignore_ancestry.
3749 * @deprecated Provided for backward compatibility with the 1.7 API.
3750 * @since New in 1.7.
3754 svn_client_merge_peg4(const char *source_path_or_url,
3755 const apr_array_header_t *ranges_to_merge,
3756 const svn_opt_revision_t *source_peg_revision,
3757 const char *target_wcpath,
3759 svn_boolean_t ignore_ancestry,
3760 svn_boolean_t force_delete,
3761 svn_boolean_t record_only,
3762 svn_boolean_t dry_run,
3763 svn_boolean_t allow_mixed_rev,
3764 const apr_array_header_t *merge_options,
3765 svn_client_ctx_t *ctx,
3769 * Similar to svn_client_merge_peg4(), but with @a allow_mixed_rev set to
3770 * @c TRUE. The @a force parameter maps to the @c force_delete parameter
3771 * of svn_client_merge_peg4().
3773 * @deprecated Provided for backward compatibility with the 1.6 API.
3775 * @since New in 1.5.
3779 svn_client_merge_peg3(const char *source,
3780 const apr_array_header_t *ranges_to_merge,
3781 const svn_opt_revision_t *peg_revision,
3782 const char *target_wcpath,
3784 svn_boolean_t ignore_ancestry,
3785 svn_boolean_t force,
3786 svn_boolean_t record_only,
3787 svn_boolean_t dry_run,
3788 const apr_array_header_t *merge_options,
3789 svn_client_ctx_t *ctx,
3793 * Similar to svn_client_merge_peg3(), but with @a record_only set to
3794 * @c FALSE, and @a depth set according to @a recurse: if @a recurse
3795 * is TRUE, set @a depth to #svn_depth_infinity, if @a recurse is
3796 * FALSE, set @a depth to #svn_depth_files.
3798 * @deprecated Provided for backwards compatibility with the 1.4 API.
3800 * @since New in 1.4.
3804 svn_client_merge_peg2(const char *source,
3805 const svn_opt_revision_t *revision1,
3806 const svn_opt_revision_t *revision2,
3807 const svn_opt_revision_t *peg_revision,
3808 const char *target_wcpath,
3809 svn_boolean_t recurse,
3810 svn_boolean_t ignore_ancestry,
3811 svn_boolean_t force,
3812 svn_boolean_t dry_run,
3813 const apr_array_header_t *merge_options,
3814 svn_client_ctx_t *ctx,
3818 * Similar to svn_client_merge_peg2(), but with @a merge_options set to
3821 * @deprecated Provided for backwards compatibility with the 1.3 API.
3823 * @since New in 1.1.
3827 svn_client_merge_peg(const char *source,
3828 const svn_opt_revision_t *revision1,
3829 const svn_opt_revision_t *revision2,
3830 const svn_opt_revision_t *peg_revision,
3831 const char *target_wcpath,
3832 svn_boolean_t recurse,
3833 svn_boolean_t ignore_ancestry,
3834 svn_boolean_t force,
3835 svn_boolean_t dry_run,
3836 svn_client_ctx_t *ctx,
3840 /** Set @a suggestions to an ordered array of @c const char *
3841 * potential merge sources (expressed as full repository URLs) for @a
3842 * path_or_url at @a peg_revision. @a path_or_url is a working copy
3843 * path or repository URL. @a ctx is a context used for
3844 * authentication in the repository case. Use @a pool for all
3847 * @since New in 1.5.
3850 svn_client_suggest_merge_sources(apr_array_header_t **suggestions,
3851 const char *path_or_url,
3852 const svn_opt_revision_t *peg_revision,
3853 svn_client_ctx_t *ctx,
3858 * Get the mergeinfo for a single target node (ignoring any subtrees).
3860 * Set @a *mergeinfo to a hash mapping <tt>const char *</tt> merge source
3861 * URLs to <tt>svn_rangelist_t *</tt> rangelists describing the ranges which
3862 * have been merged into @a path_or_url as of @a peg_revision, per
3863 * @a path_or_url's explicit mergeinfo or inherited mergeinfo if no
3864 * explicit mergeinfo if found. If no explicit or inherited mergeinfo
3865 * is found, then set @a *mergeinfo to NULL.
3867 * Use @a pool for all necessary allocations.
3869 * If the server doesn't support retrieval of mergeinfo (which will
3870 * never happen for file:// URLs), return an
3871 * #SVN_ERR_UNSUPPORTED_FEATURE error.
3873 * @note Unlike most APIs which deal with mergeinfo, this one returns
3874 * data where the keys of the hash are absolute repository URLs rather
3875 * than repository filesystem paths.
3877 * @since New in 1.5.
3880 svn_client_mergeinfo_get_merged(apr_hash_t **mergeinfo,
3881 const char *path_or_url,
3882 const svn_opt_revision_t *peg_revision,
3883 svn_client_ctx_t *ctx,
3888 * Describe the revisions that either have or have not been merged from
3889 * one source branch (or subtree) into another.
3891 * If @a finding_merged is TRUE, then drive log entry callbacks
3892 * @a receiver / @a receiver_baton with the revisions merged from
3893 * @a source_path_or_url (as of @a source_peg_revision) into
3894 * @a target_path_or_url (as of @a target_peg_revision). If @a
3895 * finding_merged is FALSE then find the revisions eligible for merging.
3897 * If both @a source_start_revision and @a source_end_revision are
3898 * unspecified (that is, of kind @c svn_opt_revision_unspecified),
3899 * @a receiver will be called the requested revisions from 0 to
3900 * @a source_peg_revision and in that order (that is, oldest to
3901 * youngest). Otherwise, both @a source_start_revision and
3902 * @a source_end_revision must be specified, which has two effects:
3904 * - @a receiver will be called only with revisions which fall
3905 * within range of @a source_start_revision to
3906 * @a source_end_revision, inclusive, and
3908 * - those revisions will be ordered in the same "direction" as the
3909 * walk from @a source_start_revision to @a source_end_revision.
3910 * (If @a source_start_revision is the younger of the two, @a
3911 * receiver will be called with revisions in youngest-to-oldest
3912 * order; otherwise, the reverse occurs.)
3914 * If @a depth is #svn_depth_empty consider only the explicit or
3915 * inherited mergeinfo on @a target_path_or_url when calculating merged
3916 * revisions from @a source_path_or_url. If @a depth is #svn_depth_infinity
3917 * then also consider the explicit subtree mergeinfo under @a
3918 * target_path_or_url.
3919 * If a depth other than #svn_depth_empty or #svn_depth_infinity is
3920 * requested then return a #SVN_ERR_UNSUPPORTED_FEATURE error.
3922 * @a discover_changed_paths and @a revprops are the same as for
3923 * svn_client_log5(). Use @a scratch_pool for all temporary allocations.
3925 * @a ctx is a context used for authentication.
3927 * If the server doesn't support retrieval of mergeinfo, return an
3928 * #SVN_ERR_UNSUPPORTED_FEATURE error.
3930 * @since New in 1.8.
3933 svn_client_mergeinfo_log2(svn_boolean_t finding_merged,
3934 const char *target_path_or_url,
3935 const svn_opt_revision_t *target_peg_revision,
3936 const char *source_path_or_url,
3937 const svn_opt_revision_t *source_peg_revision,
3938 const svn_opt_revision_t *source_start_revision,
3939 const svn_opt_revision_t *source_end_revision,
3940 svn_log_entry_receiver_t receiver,
3941 void *receiver_baton,
3942 svn_boolean_t discover_changed_paths,
3944 const apr_array_header_t *revprops,
3945 svn_client_ctx_t *ctx,
3946 apr_pool_t *scratch_pool);
3949 * Similar to svn_client_mergeinfo_log2(), but with @a source_start_revision
3950 * and @a source_end_revision always of kind @c svn_opt_revision_unspecified;
3952 * @deprecated Provided for backwards compatibility with the 1.7 API.
3953 * @since New in 1.7.
3957 svn_client_mergeinfo_log(svn_boolean_t finding_merged,
3958 const char *target_path_or_url,
3959 const svn_opt_revision_t *target_peg_revision,
3960 const char *source_path_or_url,
3961 const svn_opt_revision_t *source_peg_revision,
3962 svn_log_entry_receiver_t receiver,
3963 void *receiver_baton,
3964 svn_boolean_t discover_changed_paths,
3966 const apr_array_header_t *revprops,
3967 svn_client_ctx_t *ctx,
3968 apr_pool_t *scratch_pool);
3971 * Similar to svn_client_mergeinfo_log(), but finds only merged revisions
3972 * and always operates at @a depth #svn_depth_empty.
3974 * @deprecated Provided for backwards compatibility with the 1.6 API. Use
3975 * svn_client_mergeinfo_log() instead.
3976 * @since New in 1.5.
3980 svn_client_mergeinfo_log_merged(const char *path_or_url,
3981 const svn_opt_revision_t *peg_revision,
3982 const char *merge_source_path_or_url,
3983 const svn_opt_revision_t *src_peg_revision,
3984 svn_log_entry_receiver_t receiver,
3985 void *receiver_baton,
3986 svn_boolean_t discover_changed_paths,
3987 const apr_array_header_t *revprops,
3988 svn_client_ctx_t *ctx,
3992 * Similar to svn_client_mergeinfo_log(), but finds only eligible revisions
3993 * and always operates at @a depth #svn_depth_empty.
3995 * @deprecated Provided for backwards compatibility with the 1.6 API. Use
3996 * svn_client_mergeinfo_log() instead.
3997 * @since New in 1.5.
4001 svn_client_mergeinfo_log_eligible(const char *path_or_url,
4002 const svn_opt_revision_t *peg_revision,
4003 const char *merge_source_path_or_url,
4004 const svn_opt_revision_t *src_peg_revision,
4005 svn_log_entry_receiver_t receiver,
4006 void *receiver_baton,
4007 svn_boolean_t discover_changed_paths,
4008 const apr_array_header_t *revprops,
4009 svn_client_ctx_t *ctx,
4015 * @defgroup Cleanup Cleanup an abnormally terminated working copy.
4020 /** Recursively cleanup a working copy directory @a dir, finishing any
4021 * incomplete operations, removing lockfiles, etc.
4023 * If @a ctx->cancel_func is non-NULL, invoke it with @a
4024 * ctx->cancel_baton at various points during the operation. If it
4025 * returns an error (typically #SVN_ERR_CANCELLED), return that error
4028 * Use @a scratch_pool for any temporary allocations.
4031 svn_client_cleanup(const char *dir,
4032 svn_client_ctx_t *ctx,
4033 apr_pool_t *scratch_pool);
4039 * @defgroup Upgrade Upgrade a working copy.
4044 /** Recursively upgrade a working copy from any older format to the current
4045 * WC metadata storage format. @a wcroot_dir is the path to the WC root.
4047 * Use @a scratch_pool for any temporary allocations.
4049 * @since New in 1.7.
4052 svn_client_upgrade(const char *wcroot_dir,
4053 svn_client_ctx_t *ctx,
4054 apr_pool_t *scratch_pool);
4060 * @defgroup Relocate Switch a working copy to a different repository.
4066 * Recursively modify a working copy rooted at @a wcroot_dir, changing
4067 * any repository URLs that begin with @a from_prefix to begin with @a
4068 * to_prefix instead.
4070 * @param wcroot_dir Working copy root directory
4071 * @param from_prefix Original URL
4072 * @param to_prefix New URL
4073 * @param ignore_externals If not set, recurse into external working
4074 * copies after relocating the primary working copy
4075 * @param ctx svn_client_ctx_t
4076 * @param pool The pool from which to perform memory allocations
4081 svn_client_relocate2(const char *wcroot_dir,
4082 const char *from_prefix,
4083 const char *to_prefix,
4084 svn_boolean_t ignore_externals,
4085 svn_client_ctx_t *ctx,
4089 * Similar to svn_client_relocate2(), but with @a ignore_externals
4092 * @note As of the 1.7 API, @a dir is required to be a working copy
4093 * root directory, and @a recurse is required to be TRUE.
4095 * @deprecated Provided for limited backwards compatibility with the
4100 svn_client_relocate(const char *dir,
4101 const char *from_prefix,
4102 const char *to_prefix,
4103 svn_boolean_t recurse,
4104 svn_client_ctx_t *ctx,
4110 * @defgroup Revert Remove local changes in a repository.
4116 * Restore the pristine version of working copy @a paths,
4117 * effectively undoing any local mods. For each path in @a paths,
4118 * revert it if it is a file. Else if it is a directory, revert
4119 * according to @a depth:
4121 * @a paths is an array of (const char *) local WC paths.
4123 * If @a depth is #svn_depth_empty, revert just the properties on
4124 * the directory; else if #svn_depth_files, revert the properties
4125 * and any files immediately under the directory; else if
4126 * #svn_depth_immediates, revert all of the preceding plus
4127 * properties on immediate subdirectories; else if #svn_depth_infinity,
4128 * revert path and everything under it fully recursively.
4130 * @a changelists is an array of <tt>const char *</tt> changelist
4131 * names, used as a restrictive filter on items reverted; that is,
4132 * don't revert any item unless it's a member of one of those
4133 * changelists. If @a changelists is empty (or altogether @c NULL),
4134 * no changelist filtering occurs.
4136 * If @a ctx->notify_func2 is non-NULL, then for each item reverted,
4137 * call @a ctx->notify_func2 with @a ctx->notify_baton2 and the path of
4138 * the reverted item.
4140 * If an item specified for reversion is not under version control,
4141 * then do not error, just invoke @a ctx->notify_func2 with @a
4142 * ctx->notify_baton2, using notification code #svn_wc_notify_skip.
4144 * @since New in 1.5.
4147 svn_client_revert2(const apr_array_header_t *paths,
4149 const apr_array_header_t *changelists,
4150 svn_client_ctx_t *ctx,
4155 * Similar to svn_client_revert2(), but with @a changelists passed as
4156 * @c NULL, and @a depth set according to @a recurse: if @a recurse is
4157 * TRUE, @a depth is #svn_depth_infinity, else if @a recurse is
4158 * FALSE, @a depth is #svn_depth_empty.
4160 * @note Most APIs map @a recurse==FALSE to @a depth==svn_depth_files;
4161 * revert is deliberately different.
4163 * @deprecated Provided for backwards compatibility with the 1.0 API.
4167 svn_client_revert(const apr_array_header_t *paths,
4168 svn_boolean_t recursive,
4169 svn_client_ctx_t *ctx,
4176 * @defgroup Resolved Mark conflicted paths as resolved.
4182 * Similar to svn_client_resolve(), but without automatic conflict
4183 * resolution support.
4185 * @deprecated Provided for backward compatibility with the 1.4 API.
4186 * Use svn_client_resolve() with @a conflict_choice == @c
4187 * svn_wc_conflict_choose_merged instead.
4191 svn_client_resolved(const char *path,
4192 svn_boolean_t recursive,
4193 svn_client_ctx_t *ctx,
4196 /** Perform automatic conflict resolution on a working copy @a path.
4198 * If @a conflict_choice is
4200 * - #svn_wc_conflict_choose_base:
4201 * resolve the conflict with the old file contents
4203 * - #svn_wc_conflict_choose_mine_full:
4204 * use the original working contents
4206 * - #svn_wc_conflict_choose_theirs_full:
4207 * use the new contents
4209 * - #svn_wc_conflict_choose_merged:
4210 * don't change the contents at all, just remove the conflict
4211 * status, which is the pre-1.5 behavior.
4213 * - #svn_wc_conflict_choose_theirs_conflict
4216 * - #svn_wc_conflict_choose_mine_conflict
4219 * - svn_wc_conflict_choose_unspecified
4220 * invoke @a ctx->conflict_func2 with @a ctx->conflict_baton2 to obtain
4221 * a resolution decision for each conflict. This can be used to
4222 * implement interactive conflict resolution.
4224 * #svn_wc_conflict_choose_theirs_conflict and
4225 * #svn_wc_conflict_choose_mine_conflict are not legal for binary
4226 * files or properties.
4228 * If @a path is not in a state of conflict to begin with, do nothing.
4229 * If @a path's conflict state is removed and @a ctx->notify_func2 is non-NULL,
4230 * call @a ctx->notify_func2 with @a ctx->notify_baton2 and @a path.
4231 * ### with what notification parameters?
4233 * If @a depth is #svn_depth_empty, act only on @a path; if
4234 * #svn_depth_files, resolve @a path and its conflicted file
4235 * children (if any); if #svn_depth_immediates, resolve @a path and
4236 * all its immediate conflicted children (both files and directories,
4237 * if any); if #svn_depth_infinity, resolve @a path and every
4238 * conflicted file or directory anywhere beneath it.
4240 * Note that this operation will try to lock the parent directory of
4241 * @a path in order to be able to resolve tree-conflicts on @a path.
4243 * @since New in 1.5.
4246 svn_client_resolve(const char *path,
4248 svn_wc_conflict_choice_t conflict_choice,
4249 svn_client_ctx_t *ctx,
4256 * @defgroup Copy Copy paths in the working copy and repository.
4262 * A structure which describes the source of a copy operation--its path,
4263 * revision, and peg revision.
4265 * @since New in 1.5.
4267 typedef struct svn_client_copy_source_t
4269 /** The source path or URL. */
4272 /** The source operational revision. */
4273 const svn_opt_revision_t *revision;
4275 /** The source peg revision. */
4276 const svn_opt_revision_t *peg_revision;
4277 } svn_client_copy_source_t;
4279 /** Copy each source in @a sources to @a dst_path.
4281 * If multiple @a sources are given, @a dst_path must be a directory,
4282 * and @a sources will be copied as children of @a dst_path.
4284 * @a sources is an array of <tt>svn_client_copy_source_t *</tt> elements,
4285 * either all referring to local WC items or all referring to versioned
4286 * items in the repository.
4288 * If @a sources has only one item, attempt to copy it to @a dst_path. If
4289 * @a copy_as_child is TRUE and @a dst_path already exists, attempt to copy the
4290 * item as a child of @a dst_path. If @a copy_as_child is FALSE and
4291 * @a dst_path already exists, fail with #SVN_ERR_ENTRY_EXISTS if @a dst_path
4292 * is a working copy path and #SVN_ERR_FS_ALREADY_EXISTS if @a dst_path is a
4295 * If @a sources has multiple items, and @a copy_as_child is TRUE, all
4296 * @a sources are copied as children of @a dst_path. If any child of
4297 * @a dst_path already exists with the same name any item in @a sources,
4298 * fail with #SVN_ERR_ENTRY_EXISTS if @a dst_path is a working copy path and
4299 * #SVN_ERR_FS_ALREADY_EXISTS if @a dst_path is a URL.
4301 * If @a sources has multiple items, and @a copy_as_child is FALSE, fail
4302 * with #SVN_ERR_CLIENT_MULTIPLE_SOURCES_DISALLOWED.
4304 * If @a dst_path is a URL, use the authentication baton
4305 * in @a ctx and @a ctx->log_msg_func3/@a ctx->log_msg_baton3 to immediately
4306 * attempt to commit the copy action in the repository.
4308 * If @a dst_path is not a URL, then this is just a variant of
4309 * svn_client_add(), where the @a sources are scheduled for addition
4310 * as copies. No changes will happen to the repository until a commit occurs.
4311 * This scheduling can be removed with svn_client_revert2().
4313 * If @a make_parents is TRUE, create any non-existent parent directories
4314 * also. Otherwise the parent of @a dst_path must already exist.
4316 * If @a ignore_externals is set, don't process externals definitions
4317 * as part of this operation.
4319 * If non-NULL, @a revprop_table is a hash table holding additional,
4320 * custom revision properties (<tt>const char *</tt> names mapped to
4321 * <tt>svn_string_t *</tt> values) to be set on the new revision in
4322 * the event that this is a committing operation. This table cannot
4323 * contain any standard Subversion properties.
4325 * @a ctx->log_msg_func3/@a ctx->log_msg_baton3 are a callback/baton combo
4326 * that this function can use to query for a commit log message when one is
4329 * If @a ctx->notify_func2 is non-NULL, invoke it with @a ctx->notify_baton2
4330 * for each item added at the new location, passing the new, relative path of
4333 * If @a commit_callback is non-NULL, then for each successful commit, call
4334 * @a commit_callback with @a commit_baton and a #svn_commit_info_t for
4337 * @since New in 1.7.
4340 svn_client_copy6(const apr_array_header_t *sources,
4341 const char *dst_path,
4342 svn_boolean_t copy_as_child,
4343 svn_boolean_t make_parents,
4344 svn_boolean_t ignore_externals,
4345 const apr_hash_t *revprop_table,
4346 svn_commit_callback2_t commit_callback,
4348 svn_client_ctx_t *ctx,
4352 * Similar to svn_client_copy6(), but returns the commit info in
4353 * @a *commit_info_p rather than through a callback function.
4355 * @since New in 1.6.
4356 * @deprecated Provided for backward compatibility with the 1.6 API.
4360 svn_client_copy5(svn_commit_info_t **commit_info_p,
4361 const apr_array_header_t *sources,
4362 const char *dst_path,
4363 svn_boolean_t copy_as_child,
4364 svn_boolean_t make_parents,
4365 svn_boolean_t ignore_externals,
4366 const apr_hash_t *revprop_table,
4367 svn_client_ctx_t *ctx,
4371 * Similar to svn_client_copy5(), with @a ignore_externals set to @c FALSE.
4373 * @since New in 1.5.
4375 * @deprecated Provided for backward compatibility with the 1.5 API.
4379 svn_client_copy4(svn_commit_info_t **commit_info_p,
4380 const apr_array_header_t *sources,
4381 const char *dst_path,
4382 svn_boolean_t copy_as_child,
4383 svn_boolean_t make_parents,
4384 const apr_hash_t *revprop_table,
4385 svn_client_ctx_t *ctx,
4389 * Similar to svn_client_copy4(), with only one @a src_path, @a
4390 * copy_as_child set to @c FALSE, @a revprop_table passed as NULL, and
4391 * @a make_parents set to @c FALSE. Also, use @a src_revision as both
4392 * the operational and peg revision.
4394 * @since New in 1.4.
4396 * @deprecated Provided for backward compatibility with the 1.4 API.
4400 svn_client_copy3(svn_commit_info_t **commit_info_p,
4401 const char *src_path,
4402 const svn_opt_revision_t *src_revision,
4403 const char *dst_path,
4404 svn_client_ctx_t *ctx,
4409 * Similar to svn_client_copy3(), with the difference that if @a dst_path
4410 * already exists and is a directory, copy the item into that directory,
4411 * keeping its name (the last component of @a src_path).
4413 * @since New in 1.3.
4415 * @deprecated Provided for backward compatibility with the 1.3 API.
4419 svn_client_copy2(svn_commit_info_t **commit_info_p,
4420 const char *src_path,
4421 const svn_opt_revision_t *src_revision,
4422 const char *dst_path,
4423 svn_client_ctx_t *ctx,
4428 * Similar to svn_client_copy2(), but uses #svn_client_commit_info_t
4429 * for @a commit_info_p.
4431 * @deprecated Provided for backward compatibility with the 1.2 API.
4435 svn_client_copy(svn_client_commit_info_t **commit_info_p,
4436 const char *src_path,
4437 const svn_opt_revision_t *src_revision,
4438 const char *dst_path,
4439 svn_client_ctx_t *ctx,
4446 * @defgroup Move Move paths in the working copy or repository.
4452 * Move @a src_paths to @a dst_path.
4454 * @a src_paths is an array of (const char *) paths -- either all WC paths
4455 * or all URLs -- of versioned items. If multiple @a src_paths are given,
4456 * @a dst_path must be a directory and @a src_paths will be moved as
4457 * children of @a dst_path.
4459 * If @a src_paths are repository URLs:
4461 * - @a dst_path must also be a repository URL.
4463 * - The authentication baton in @a ctx and @a ctx->log_msg_func/@a
4464 * ctx->log_msg_baton are used to commit the move.
4466 * - The move operation will be immediately committed.
4468 * If @a src_paths are working copy paths:
4470 * - @a dst_path must also be a working copy path.
4472 * - @a ctx->log_msg_func3 and @a ctx->log_msg_baton3 are ignored.
4474 * - This is a scheduling operation. No changes will happen to the
4475 * repository until a commit occurs. This scheduling can be removed
4476 * with svn_client_revert2(). If one of @a src_paths is a file it is
4477 * removed from the working copy immediately. If one of @a src_path
4478 * is a directory it will remain in the working copy but all the files,
4479 * and unversioned items, it contains will be removed.
4481 * If @a src_paths has only one item, attempt to move it to @a dst_path. If
4482 * @a move_as_child is TRUE and @a dst_path already exists, attempt to move the
4483 * item as a child of @a dst_path. If @a move_as_child is FALSE and
4484 * @a dst_path already exists, fail with #SVN_ERR_ENTRY_EXISTS if @a dst_path
4485 * is a working copy path and #SVN_ERR_FS_ALREADY_EXISTS if @a dst_path is a
4488 * If @a src_paths has multiple items, and @a move_as_child is TRUE, all
4489 * @a src_paths are moved as children of @a dst_path. If any child of
4490 * @a dst_path already exists with the same name any item in @a src_paths,
4491 * fail with #SVN_ERR_ENTRY_EXISTS if @a dst_path is a working copy path and
4492 * #SVN_ERR_FS_ALREADY_EXISTS if @a dst_path is a URL.
4494 * If @a src_paths has multiple items, and @a move_as_child is FALSE, fail
4495 * with #SVN_ERR_CLIENT_MULTIPLE_SOURCES_DISALLOWED.
4497 * If @a make_parents is TRUE, create any non-existent parent directories
4498 * also. Otherwise, the parent of @a dst_path must already exist.
4500 * If @a allow_mixed_revisions is @c FALSE, #SVN_ERR_WC_MIXED_REVISIONS
4501 * will be raised if the move source is a mixed-revision subtree.
4502 * If @a allow_mixed_revisions is TRUE, a mixed-revision move source is
4503 * allowed but the move will degrade to a copy and a delete without local
4504 * move tracking. This parameter should be set to FALSE except where backwards
4505 * compatibility to svn_client_move6() is required.
4507 * If @a metadata_only is @c TRUE and moving a file in a working copy,
4508 * everything in the metadata is updated as if the node is moved, but the
4509 * actual disk move operation is not performed. This feature is useful for
4510 * clients that want to keep the working copy in sync while the actual working
4511 * copy is updated by some other task.
4513 * If non-NULL, @a revprop_table is a hash table holding additional,
4514 * custom revision properties (<tt>const char *</tt> names mapped to
4515 * <tt>svn_string_t *</tt> values) to be set on the new revision in
4516 * the event that this is a committing operation. This table cannot
4517 * contain any standard Subversion properties.
4519 * @a ctx->log_msg_func3/@a ctx->log_msg_baton3 are a callback/baton combo that
4520 * this function can use to query for a commit log message when one is needed.
4522 * If @a ctx->notify_func2 is non-NULL, then for each item moved, call
4523 * @a ctx->notify_func2 with the @a ctx->notify_baton2 twice, once to indicate
4524 * the deletion of the moved thing, and once to indicate the addition of
4525 * the new location of the thing.
4527 * ### Is this really true? What about svn_wc_notify_commit_replaced()? ###
4529 * If @a commit_callback is non-NULL, then for each successful commit, call
4530 * @a commit_callback with @a commit_baton and a #svn_commit_info_t for
4533 * @since New in 1.8.
4536 svn_client_move7(const apr_array_header_t *src_paths,
4537 const char *dst_path,
4538 svn_boolean_t move_as_child,
4539 svn_boolean_t make_parents,
4540 svn_boolean_t allow_mixed_revisions,
4541 svn_boolean_t metadata_only,
4542 const apr_hash_t *revprop_table,
4543 svn_commit_callback2_t commit_callback,
4545 svn_client_ctx_t *ctx,
4549 * Similar to svn_client_move7(), but with @a allow_mixed_revisions always
4550 * set to @c TRUE and @a metadata_only always to @c FALSE.
4552 * @since New in 1.7.
4553 * @deprecated Provided for backward compatibility with the 1.7 API.
4557 svn_client_move6(const apr_array_header_t *src_paths,
4558 const char *dst_path,
4559 svn_boolean_t move_as_child,
4560 svn_boolean_t make_parents,
4561 const apr_hash_t *revprop_table,
4562 svn_commit_callback2_t commit_callback,
4564 svn_client_ctx_t *ctx,
4568 * Similar to svn_client_move6(), but returns the commit info in
4569 * @a *commit_info_p rather than through a callback function.
4571 * A WC-to-WC move will include any modified and/or unversioned children.
4572 * @a force is ignored.
4574 * @since New in 1.5.
4575 * @deprecated Provided for backward compatibility with the 1.6 API.
4579 svn_client_move5(svn_commit_info_t **commit_info_p,
4580 const apr_array_header_t *src_paths,
4581 const char *dst_path,
4582 svn_boolean_t force,
4583 svn_boolean_t move_as_child,
4584 svn_boolean_t make_parents,
4585 const apr_hash_t *revprop_table,
4586 svn_client_ctx_t *ctx,
4590 * Similar to svn_client_move5(), with only one @a src_path, @a
4591 * move_as_child set to @c FALSE, @a revprop_table passed as NULL, and
4592 * @a make_parents set to @c FALSE.
4594 * Note: The behaviour of @a force changed in 1.5 (r860885 and r861421), when
4595 * the 'move' semantics were improved to just move the source including any
4596 * modified and/or unversioned items in it. Before that, @a force
4597 * controlled what happened to such items, but now @a force is ignored.
4599 * @since New in 1.4.
4601 * @deprecated Provided for backward compatibility with the 1.4 API.
4605 svn_client_move4(svn_commit_info_t **commit_info_p,
4606 const char *src_path,
4607 const char *dst_path,
4608 svn_boolean_t force,
4609 svn_client_ctx_t *ctx,
4613 * Similar to svn_client_move4(), with the difference that if @a dst_path
4614 * already exists and is a directory, move the item into that directory,
4615 * keeping its name (the last component of @a src_path).
4617 * @since New in 1.3.
4619 * @deprecated Provided for backward compatibility with the 1.3 API.
4623 svn_client_move3(svn_commit_info_t **commit_info_p,
4624 const char *src_path,
4625 const char *dst_path,
4626 svn_boolean_t force,
4627 svn_client_ctx_t *ctx,
4631 * Similar to svn_client_move3(), but uses #svn_client_commit_info_t
4632 * for @a commit_info_p.
4634 * @deprecated Provided for backward compatibility with the 1.2 API.
4636 * @since New in 1.2.
4640 svn_client_move2(svn_client_commit_info_t **commit_info_p,
4641 const char *src_path,
4642 const char *dst_path,
4643 svn_boolean_t force,
4644 svn_client_ctx_t *ctx,
4648 * Similar to svn_client_move2(), but an extra argument @a src_revision
4649 * must be passed. This has no effect, but must be of kind
4650 * #svn_opt_revision_unspecified or #svn_opt_revision_head,
4651 * otherwise error #SVN_ERR_UNSUPPORTED_FEATURE is returned.
4653 * @deprecated Provided for backward compatibility with the 1.1 API.
4657 svn_client_move(svn_client_commit_info_t **commit_info_p,
4658 const char *src_path,
4659 const svn_opt_revision_t *src_revision,
4660 const char *dst_path,
4661 svn_boolean_t force,
4662 svn_client_ctx_t *ctx,
4670 * Note that certain svn-controlled properties must always have their
4671 * values set and stored in UTF8 with LF line endings. When
4672 * retrieving these properties, callers must convert the values back
4673 * to native locale and native line-endings before displaying them to
4674 * the user. For help with this task, see
4675 * svn_prop_needs_translation(), svn_subst_translate_string(), and
4676 * svn_subst_detranslate_string().
4678 * @defgroup svn_client_prop_funcs Property functions
4684 * Set @a propname to @a propval on @a url. A @a propval of @c NULL will
4685 * delete the property.
4687 * Immediately attempt to commit the property change in the repository,
4688 * using the authentication baton in @a ctx and @a
4689 * ctx->log_msg_func3/@a ctx->log_msg_baton3.
4691 * If the property has changed on @a url since revision
4692 * @a base_revision_for_url (which must not be #SVN_INVALID_REVNUM), no
4693 * change will be made and an error will be returned.
4695 * If non-NULL, @a revprop_table is a hash table holding additional,
4696 * custom revision properties (<tt>const char *</tt> names mapped to
4697 * <tt>svn_string_t *</tt> values) to be set on the new revision. This
4698 * table cannot contain any standard Subversion properties.
4700 * If @a commit_callback is non-NULL, then call @a commit_callback with
4701 * @a commit_baton and a #svn_commit_info_t for the commit.
4703 * If @a propname is an svn-controlled property (i.e. prefixed with
4704 * #SVN_PROP_PREFIX), then the caller is responsible for ensuring that
4705 * the value is UTF8-encoded and uses LF line-endings.
4707 * If @a skip_checks is TRUE, do no validity checking. But if @a
4708 * skip_checks is FALSE, and @a propname is not a valid property for @a
4709 * url, return an error, either #SVN_ERR_ILLEGAL_TARGET (if the property is
4710 * not appropriate for @a url), or * #SVN_ERR_BAD_MIME_TYPE (if @a propname
4711 * is "svn:mime-type", but @a propval is not a valid mime-type).
4713 * Use @a scratch_pool for all memory allocation.
4715 * @since New in 1.7.
4718 svn_client_propset_remote(const char *propname,
4719 const svn_string_t *propval,
4721 svn_boolean_t skip_checks,
4722 svn_revnum_t base_revision_for_url,
4723 const apr_hash_t *revprop_table,
4724 svn_commit_callback2_t commit_callback,
4726 svn_client_ctx_t *ctx,
4727 apr_pool_t *scratch_pool);
4730 * Set @a propname to @a propval on each (const char *) target in @a
4731 * targets. The targets must be all working copy paths. A @a propval
4732 * of @c NULL will delete the property.
4734 * If @a depth is #svn_depth_empty, set the property on each member of
4735 * @a targets only; if #svn_depth_files, set it on @a targets and their
4736 * file children (if any); if #svn_depth_immediates, on @a targets and all
4737 * of their immediate children (both files and directories); if
4738 * #svn_depth_infinity, on @a targets and everything beneath them.
4740 * @a changelists is an array of <tt>const char *</tt> changelist
4741 * names, used as a restrictive filter on items whose properties are
4742 * set; that is, don't set properties on any item unless it's a member
4743 * of one of those changelists. If @a changelists is empty (or
4744 * altogether @c NULL), no changelist filtering occurs.
4746 * If @a propname is an svn-controlled property (i.e. prefixed with
4747 * #SVN_PROP_PREFIX), then the caller is responsible for ensuring that
4748 * the value is UTF8-encoded and uses LF line-endings.
4750 * If @a skip_checks is TRUE, do no validity checking. But if @a
4751 * skip_checks is FALSE, and @a propname is not a valid property for @a
4752 * targets, return an error, either #SVN_ERR_ILLEGAL_TARGET (if the
4753 * property is not appropriate for @a targets), or
4754 * #SVN_ERR_BAD_MIME_TYPE (if @a propname is "svn:mime-type", but @a
4755 * propval is not a valid mime-type).
4757 * If @a ctx->cancel_func is non-NULL, invoke it passing @a
4758 * ctx->cancel_baton at various places during the operation.
4760 * Use @a scratch_pool for all memory allocation.
4762 * @since New in 1.7.
4765 svn_client_propset_local(const char *propname,
4766 const svn_string_t *propval,
4767 const apr_array_header_t *targets,
4769 svn_boolean_t skip_checks,
4770 const apr_array_header_t *changelists,
4771 svn_client_ctx_t *ctx,
4772 apr_pool_t *scratch_pool);
4775 * An amalgamation of svn_client_propset_local() and
4776 * svn_client_propset_remote() that takes only a single target, and
4777 * returns the commit info in @a *commit_info_p rather than through a
4778 * callback function.
4780 * @since New in 1.5.
4781 * @deprecated Provided for backward compatibility with the 1.6 API.
4785 svn_client_propset3(svn_commit_info_t **commit_info_p,
4786 const char *propname,
4787 const svn_string_t *propval,
4790 svn_boolean_t skip_checks,
4791 svn_revnum_t base_revision_for_url,
4792 const apr_array_header_t *changelists,
4793 const apr_hash_t *revprop_table,
4794 svn_client_ctx_t *ctx,
4798 * Like svn_client_propset3(), but with @a base_revision_for_url
4799 * always #SVN_INVALID_REVNUM; @a commit_info_p always @c NULL; @a
4800 * changelists always @c NULL; @a revprop_table always @c NULL; and @a
4801 * depth set according to @a recurse: if @a recurse is TRUE, @a depth
4802 * is #svn_depth_infinity, else #svn_depth_empty.
4804 * @deprecated Provided for backward compatibility with the 1.4 API.
4808 svn_client_propset2(const char *propname,
4809 const svn_string_t *propval,
4811 svn_boolean_t recurse,
4812 svn_boolean_t skip_checks,
4813 svn_client_ctx_t *ctx,
4817 * Like svn_client_propset2(), but with @a skip_checks always FALSE and a
4818 * newly created @a ctx.
4820 * @deprecated Provided for backward compatibility with the 1.1 API.
4824 svn_client_propset(const char *propname,
4825 const svn_string_t *propval,
4827 svn_boolean_t recurse,
4830 /** Set @a propname to @a propval on revision @a revision in the repository
4831 * represented by @a URL. Use the authentication baton in @a ctx for
4832 * authentication, and @a pool for all memory allocation. Return the actual
4833 * rev affected in @a *set_rev. A @a propval of @c NULL will delete the
4836 * If @a original_propval is non-NULL, then just before setting the
4837 * new value, check that the old value matches @a original_propval;
4838 * if they do not match, return the error #SVN_ERR_RA_OUT_OF_DATE.
4839 * This is to help clients support interactive editing of revprops:
4840 * without this check, the window during which the property may change
4841 * underneath the user is as wide as the amount of time the user
4842 * spends editing the property. With this check, the window is
4843 * reduced to a small, constant amount of time right before we set the
4844 * new value. (To check that an old value is still non-existent, set
4845 * @a original_propval->data to NULL, and @a original_propval->len is
4847 * If the server advertises #SVN_RA_CAPABILITY_ATOMIC_REVPROPS, the
4848 * check of @a original_propval is done atomically.
4850 * Note: the representation of "property is not set" in @a
4851 * original_propval differs from the representation in other APIs
4852 * (such as svn_fs_change_rev_prop2() and svn_ra_change_rev_prop2()).
4854 * If @a force is TRUE, allow newlines in the author property.
4856 * If @a propname is an svn-controlled property (i.e. prefixed with
4857 * #SVN_PROP_PREFIX), then the caller is responsible for ensuring that
4858 * the value UTF8-encoded and uses LF line-endings.
4860 * Note that unlike its cousin svn_client_propset3(), this routine
4861 * doesn't affect the working copy at all; it's a pure network
4862 * operation that changes an *unversioned* property attached to a
4863 * revision. This can be used to tweak log messages, dates, authors,
4864 * and the like. Be careful: it's a lossy operation.
4866 * @a ctx->notify_func2 and @a ctx->notify_baton2 are the notification
4867 * functions and baton which are called upon successful setting of the
4870 * Also note that unless the administrator creates a
4871 * pre-revprop-change hook in the repository, this feature will fail.
4873 * @since New in 1.6.
4876 svn_client_revprop_set2(const char *propname,
4877 const svn_string_t *propval,
4878 const svn_string_t *original_propval,
4880 const svn_opt_revision_t *revision,
4881 svn_revnum_t *set_rev,
4882 svn_boolean_t force,
4883 svn_client_ctx_t *ctx,
4887 * Similar to svn_client_revprop_set2(), but with @a original_propval
4890 * @deprecated Provided for backward compatibility with the 1.5 API.
4894 svn_client_revprop_set(const char *propname,
4895 const svn_string_t *propval,
4897 const svn_opt_revision_t *revision,
4898 svn_revnum_t *set_rev,
4899 svn_boolean_t force,
4900 svn_client_ctx_t *ctx,
4904 * Set @a *props to a hash table whose keys are absolute paths or URLs
4905 * of items on which property @a propname is explicitly set, and whose
4906 * values are <tt>svn_string_t *</tt> representing the property value for
4907 * @a propname at that path.
4909 * If @a inherited_props is not @c NULL, then set @a *inherited_props to a
4910 * depth-first ordered array of #svn_prop_inherited_item_t * structures
4911 * representing the properties inherited by @a target. If @a target is a
4912 * working copy path, then properties inherited by @a target as far as the
4913 * root of the working copy are obtained from the working copy's actual
4914 * property values. Properties inherited from above the working copy root
4915 * come from the inherited properties cache. If @a target is a URL, then
4916 * the inherited properties come from the repository. If @a inherited_props
4917 * is not @c NULL and no inheritable properties are found, then set
4918 * @a *inherited_props to an empty array.
4920 * The #svn_prop_inherited_item_t->path_or_url members of the
4921 * #svn_prop_inherited_item_t * structures in @a *inherited_props are
4922 * URLs if @a target is a URL or if @a target is a working copy path but the
4923 * property represented by the structure is above the working copy root (i.e.
4924 * the inherited property is from the cache). In all other cases the
4925 * #svn_prop_inherited_item_t->path_or_url members are absolute working copy
4928 * Allocate @a *props (including keys and values) and @a *inherited_props
4929 * (including its elements) in @a result_pool, use @a scratch_pool for
4930 * temporary allocations.
4932 * @a target is a WC absolute path or a URL.
4934 * Don't store any path, not even @a target, if it does not have a
4935 * property named @a propname.
4937 * If @a revision->kind is #svn_opt_revision_unspecified, then: get
4938 * properties from the working copy if @a target is a working copy
4939 * path, or from the repository head if @a target is a URL. Else get
4940 * the properties as of @a revision. The actual node revision
4941 * selected is determined by the path as it exists in @a peg_revision.
4942 * If @a peg_revision->kind is #svn_opt_revision_unspecified, then
4943 * it defaults to #svn_opt_revision_head for URLs or
4944 * #svn_opt_revision_working for WC targets. Use the authentication
4945 * baton in @a ctx for authentication if contacting the repository.
4946 * If @a actual_revnum is not @c NULL, the actual revision number used
4947 * for the fetch is stored in @a *actual_revnum.
4949 * If @a depth is #svn_depth_empty, fetch the property from
4950 * @a target only; if #svn_depth_files, fetch from @a target and its
4951 * file children (if any); if #svn_depth_immediates, from @a target
4952 * and all of its immediate children (both files and directories); if
4953 * #svn_depth_infinity, from @a target and everything beneath it.
4955 * @a changelists is an array of <tt>const char *</tt> changelist
4956 * names, used as a restrictive filter on items whose properties are
4957 * gotten; that is, don't get @a propname on any item unless it's a member
4958 * of one of those changelists. If @a changelists is empty (or
4959 * altogether @c NULL), no changelist filtering occurs.
4961 * If error, don't touch @a *props, otherwise @a *props is a hash table
4964 * This function returns SVN_ERR_UNVERSIONED_RESOURCE when it is called on
4965 * unversioned nodes.
4967 * @since New in 1.8.
4970 svn_client_propget5(apr_hash_t **props,
4971 apr_array_header_t **inherited_props,
4972 const char *propname,
4973 const char *target, /* abspath or URL */
4974 const svn_opt_revision_t *peg_revision,
4975 const svn_opt_revision_t *revision,
4976 svn_revnum_t *actual_revnum,
4978 const apr_array_header_t *changelists,
4979 svn_client_ctx_t *ctx,
4980 apr_pool_t *result_pool,
4981 apr_pool_t *scratch_pool);
4984 * Similar to svn_client_propget5 but with @a inherited_props always
4987 * @since New in 1.7.
4988 * @deprecated Provided for backward compatibility with the 1.7 API.
4992 svn_client_propget4(apr_hash_t **props,
4993 const char *propname,
4994 const char *target, /* abspath or URL */
4995 const svn_opt_revision_t *peg_revision,
4996 const svn_opt_revision_t *revision,
4997 svn_revnum_t *actual_revnum,
4999 const apr_array_header_t *changelists,
5000 svn_client_ctx_t *ctx,
5001 apr_pool_t *result_pool,
5002 apr_pool_t *scratch_pool);
5005 * Similar to svn_client_propget4(), but with the following change to the
5006 * output hash keys: keys are `<tt>char *</tt>' paths, prefixed by
5007 * @a target, which is a working copy path or a URL.
5009 * This function returns SVN_ERR_ENTRY_NOT_FOUND where svn_client_propget4
5010 * would return SVN_ERR_UNVERSIONED_RESOURCE.
5012 * @since New in 1.5.
5013 * @deprecated Provided for backward compatibility with the 1.6 API.
5017 svn_client_propget3(apr_hash_t **props,
5018 const char *propname,
5020 const svn_opt_revision_t *peg_revision,
5021 const svn_opt_revision_t *revision,
5022 svn_revnum_t *actual_revnum,
5024 const apr_array_header_t *changelists,
5025 svn_client_ctx_t *ctx,
5029 * Similar to svn_client_propget3(), except that @a actual_revnum and
5030 * @a changelists are always @c NULL, and @a depth is set according to
5031 * @a recurse: if @a recurse is TRUE, then @a depth is
5032 * #svn_depth_infinity, else #svn_depth_empty.
5034 * @deprecated Provided for backward compatibility with the 1.4 API.
5038 svn_client_propget2(apr_hash_t **props,
5039 const char *propname,
5041 const svn_opt_revision_t *peg_revision,
5042 const svn_opt_revision_t *revision,
5043 svn_boolean_t recurse,
5044 svn_client_ctx_t *ctx,
5048 * Similar to svn_client_propget2(), except that @a peg_revision is
5049 * always the same as @a revision.
5051 * @deprecated Provided for backward compatibility with the 1.1 API.
5055 svn_client_propget(apr_hash_t **props,
5056 const char *propname,
5058 const svn_opt_revision_t *revision,
5059 svn_boolean_t recurse,
5060 svn_client_ctx_t *ctx,
5063 /** Set @a *propval to the value of @a propname on revision @a revision
5064 * in the repository represented by @a URL. Use the authentication baton
5065 * in @a ctx for authentication, and @a pool for all memory allocation.
5066 * Return the actual rev queried in @a *set_rev.
5068 * Note that unlike its cousin svn_client_propget(), this routine
5069 * doesn't affect the working copy at all; it's a pure network
5070 * operation that queries an *unversioned* property attached to a
5071 * revision. This can query log messages, dates, authors, and the
5075 svn_client_revprop_get(const char *propname,
5076 svn_string_t **propval,
5078 const svn_opt_revision_t *revision,
5079 svn_revnum_t *set_rev,
5080 svn_client_ctx_t *ctx,
5084 * Invoke @a receiver with @a receiver_baton to return the regular explicit, and
5085 * possibly the inherited, properties of @a target, a URL or working copy path.
5086 * @a receiver will be called for each path encountered.
5088 * @a target is a WC path or a URL.
5090 * If @a revision->kind is #svn_opt_revision_unspecified, then get the
5091 * explicit (and possibly the inherited) properties from the working copy,
5092 * if @a target is a working copy path, or from the repository head if
5093 * @a target is a URL. Else get the properties as of @a revision.
5094 * The actual node revision selected is determined by the path as it exists
5095 * in @a peg_revision. If @a peg_revision->kind is
5096 * #svn_opt_revision_unspecified, then it defaults to #svn_opt_revision_head
5097 * for URLs or #svn_opt_revision_working for WC targets. Use the
5098 * authentication baton cached in @a ctx for authentication if contacting
5101 * If @a depth is #svn_depth_empty, list only the properties of
5102 * @a target itself. If @a depth is #svn_depth_files, and
5103 * @a target is a directory, list the properties of @a target
5104 * and its file entries. If #svn_depth_immediates, list the properties
5105 * of its immediate file and directory entries. If #svn_depth_infinity,
5106 * list the properties of its file entries and recurse (with
5107 * #svn_depth_infinity) on directory entries. #svn_depth_unknown is
5108 * equivalent to #svn_depth_empty. All other values produce undefined
5111 * @a changelists is an array of <tt>const char *</tt> changelist
5112 * names, used as a restrictive filter on items whose properties are
5113 * listed; that is, don't list properties on any item unless it's a member
5114 * of one of those changelists. If @a changelists is empty (or
5115 * altogether @c NULL), no changelist filtering occurs.
5117 * If @a get_target_inherited_props is true, then also return any inherited
5118 * properties when @a receiver is called for @a target. If @a target is a
5119 * working copy path, then properties inherited by @a target as far as the
5120 * root of the working copy are obtained from the working copy's actual
5121 * property values. Properties inherited from above the working copy
5122 * root come from the inherited properties cache. If @a target is a URL,
5123 * then the inherited properties come from the repository.
5124 * If @a get_target_inherited_props is false, then no inherited properties
5125 * are returned to @a receiver.
5127 * If @a target is not found, return the error #SVN_ERR_ENTRY_NOT_FOUND.
5129 * @since New in 1.8.
5132 svn_client_proplist4(const char *target,
5133 const svn_opt_revision_t *peg_revision,
5134 const svn_opt_revision_t *revision,
5136 const apr_array_header_t *changelists,
5137 svn_boolean_t get_target_inherited_props,
5138 svn_proplist_receiver2_t receiver,
5139 void *receiver_baton,
5140 svn_client_ctx_t *ctx,
5141 apr_pool_t *scratch_pool);
5144 * Similar to svn_client_proplist4(), except that the @a receiver type
5145 * is a #svn_proplist_receiver_t, @a get_target_inherited_props is
5146 * always passed NULL, and there is no separate scratch pool.
5148 * @since New in 1.5.
5149 * @deprecated Provided for backward compatibility with the 1.7 API.
5153 svn_client_proplist3(const char *target,
5154 const svn_opt_revision_t *peg_revision,
5155 const svn_opt_revision_t *revision,
5157 const apr_array_header_t *changelists,
5158 svn_proplist_receiver_t receiver,
5159 void *receiver_baton,
5160 svn_client_ctx_t *ctx,
5164 * Similar to svn_client_proplist3(), except the properties are
5165 * returned as an array of #svn_client_proplist_item_t * structures
5166 * instead of by invoking the receiver function, there's no support
5167 * for @a changelists filtering, and @a recurse is used instead of a
5168 * #svn_depth_t parameter (FALSE corresponds to #svn_depth_empty,
5169 * and TRUE to #svn_depth_infinity).
5171 * @since New in 1.2.
5173 * @deprecated Provided for backward compatibility with the 1.4 API.
5177 svn_client_proplist2(apr_array_header_t **props,
5179 const svn_opt_revision_t *peg_revision,
5180 const svn_opt_revision_t *revision,
5181 svn_boolean_t recurse,
5182 svn_client_ctx_t *ctx,
5186 * Similar to svn_client_proplist2(), except that @a peg_revision is
5187 * always the same as @a revision.
5189 * @deprecated Provided for backward compatibility with the 1.1 API.
5193 svn_client_proplist(apr_array_header_t **props,
5195 const svn_opt_revision_t *revision,
5196 svn_boolean_t recurse,
5197 svn_client_ctx_t *ctx,
5200 /** Set @a *props to a hash of the revision props attached to @a revision in
5201 * the repository represented by @a URL. Use the authentication baton cached
5202 * in @a ctx for authentication, and @a pool for all memory allocation.
5203 * Return the actual rev queried in @a *set_rev.
5205 * The allocated hash maps (<tt>const char *</tt>) property names to
5206 * (#svn_string_t *) property values.
5208 * Note that unlike its cousin svn_client_proplist(), this routine
5209 * doesn't read a working copy at all; it's a pure network operation
5210 * that reads *unversioned* properties attached to a revision.
5213 svn_client_revprop_list(apr_hash_t **props,
5215 const svn_opt_revision_t *revision,
5216 svn_revnum_t *set_rev,
5217 svn_client_ctx_t *ctx,
5223 * @defgroup Export Export a tree from version control.
5229 * Export the contents of either a subversion repository or a
5230 * subversion working copy into a 'clean' directory (meaning a
5231 * directory with no administrative directories). If @a result_rev
5232 * is not @c NULL and the path being exported is a repository URL, set
5233 * @a *result_rev to the value of the revision actually exported (set
5234 * it to #SVN_INVALID_REVNUM for local exports).
5236 * @a from_path_or_url is either the path the working copy on disk, or
5237 * a URL to the repository you wish to export.
5239 * When exporting a directory, @a to_path is the path to the directory
5240 * where you wish to create the exported tree; when exporting a file, it
5241 * is the path of the file that will be created. If @a to_path is the
5242 * empty path, then the basename of the export file/directory in the repository
5243 * will be used. If @a to_path represents an existing directory, and a
5244 * file is being exported, then a file with the that basename will be
5245 * created under that directory (as with 'copy' operations).
5247 * @a peg_revision is the revision where the path is first looked up
5248 * when exporting from a repository. If @a peg_revision->kind is
5249 * #svn_opt_revision_unspecified, then it defaults to #svn_opt_revision_head
5250 * for URLs or #svn_opt_revision_working for WC targets.
5252 * @a revision is the revision that should be exported, which is only used
5253 * when exporting from a repository.
5255 * @a peg_revision and @a revision must not be @c NULL.
5257 * @a ctx->notify_func2 and @a ctx->notify_baton2 are the notification
5258 * functions and baton which are passed to svn_client_checkout() when
5259 * exporting from a repository.
5261 * @a ctx is a context used for authentication in the repository case.
5263 * @a overwrite if TRUE will cause the export to overwrite files or
5266 * If @a ignore_externals is set, don't process externals definitions
5267 * as part of this operation.
5269 * If @a ignore_keywords is set, don't expand keywords as part of this
5272 * @a native_eol allows you to override the standard eol marker on the
5273 * platform you are running on. Can be either "LF", "CR" or "CRLF" or
5274 * NULL. If NULL will use the standard eol marker. Any other value
5275 * will cause the #SVN_ERR_IO_UNKNOWN_EOL error to be returned.
5277 * If @a depth is #svn_depth_infinity, export fully recursively. Else
5278 * if it is #svn_depth_immediates, export @a from_path_or_url and its
5279 * immediate children (if any), but with subdirectories empty and at
5280 * #svn_depth_empty. Else if #svn_depth_files, export @a
5281 * from_path_or_url and its immediate file children (if any) only. If
5282 * @a depth is #svn_depth_empty, then export exactly @a
5283 * from_path_or_url and none of its children.
5285 * All allocations are done in @a pool.
5287 * @since New in 1.7.
5290 svn_client_export5(svn_revnum_t *result_rev,
5291 const char *from_path_or_url,
5292 const char *to_path,
5293 const svn_opt_revision_t *peg_revision,
5294 const svn_opt_revision_t *revision,
5295 svn_boolean_t overwrite,
5296 svn_boolean_t ignore_externals,
5297 svn_boolean_t ignore_keywords,
5299 const char *native_eol,
5300 svn_client_ctx_t *ctx,
5304 * Similar to svn_client_export5(), but with @a ignore_keywords set
5307 * @deprecated Provided for backward compatibility with the 1.6 API.
5308 * @since New in 1.5.
5312 svn_client_export4(svn_revnum_t *result_rev,
5313 const char *from_path_or_url,
5314 const char *to_path,
5315 const svn_opt_revision_t *peg_revision,
5316 const svn_opt_revision_t *revision,
5317 svn_boolean_t overwrite,
5318 svn_boolean_t ignore_externals,
5320 const char *native_eol,
5321 svn_client_ctx_t *ctx,
5326 * Similar to svn_client_export4(), but with @a depth set according to
5327 * @a recurse: if @a recurse is TRUE, set @a depth to
5328 * #svn_depth_infinity, if @a recurse is FALSE, set @a depth to
5331 * @deprecated Provided for backward compatibility with the 1.4 API.
5333 * @since New in 1.2.
5337 svn_client_export3(svn_revnum_t *result_rev,
5338 const char *from_path_or_url,
5339 const char *to_path,
5340 const svn_opt_revision_t *peg_revision,
5341 const svn_opt_revision_t *revision,
5342 svn_boolean_t overwrite,
5343 svn_boolean_t ignore_externals,
5344 svn_boolean_t recurse,
5345 const char *native_eol,
5346 svn_client_ctx_t *ctx,
5351 * Similar to svn_client_export3(), but with @a peg_revision
5352 * always set to #svn_opt_revision_unspecified, @a overwrite set to
5353 * the value of @a force, @a ignore_externals always FALSE, and
5354 * @a recurse always TRUE.
5356 * @since New in 1.1.
5357 * @deprecated Provided for backward compatibility with the 1.1 API.
5361 svn_client_export2(svn_revnum_t *result_rev,
5362 const char *from_path_or_url,
5363 const char *to_path,
5364 svn_opt_revision_t *revision,
5365 svn_boolean_t force,
5366 const char *native_eol,
5367 svn_client_ctx_t *ctx,
5372 * Similar to svn_client_export2(), but with @a native_eol always set
5375 * @deprecated Provided for backward compatibility with the 1.0 API.
5379 svn_client_export(svn_revnum_t *result_rev,
5380 const char *from_path_or_url,
5381 const char *to_path,
5382 svn_opt_revision_t *revision,
5383 svn_boolean_t force,
5384 svn_client_ctx_t *ctx,
5390 * @defgroup List List / ls
5395 /** The type of function invoked by svn_client_list3() to report the details
5396 * of each directory entry being listed.
5398 * @a baton is the baton that was passed to the caller. @a path is the
5399 * entry's path relative to @a abs_path; it is the empty path when reporting
5400 * the top node of the list operation. @a dirent contains some or all of
5401 * the directory entry's details, as determined by the caller. @a lock is
5402 * the entry's lock, if it is locked and if lock information is being
5403 * reported by the caller; otherwise @a lock is NULL. @a abs_path is the
5404 * repository path of the top node of the list operation; it is relative to
5405 * the repository root and begins with "/".
5407 * If svn_client_list3() was called with @a include_externals set to TRUE,
5408 * @a external_parent_url and @a external_target will be set.
5409 * @a external_parent_url is url of the directory which has the
5410 * externals definitions. @a external_target is the target subdirectory of
5411 * externals definitions which is relative to the parent directory that holds
5412 * the external item.
5414 * If external_parent_url and external_target are defined, the item being
5415 * listed is part of the external described by external_parent_url and
5416 * external_target. Else, the item is not part of any external.
5417 * Moreover, we will never mix items which are part of separate
5418 * externals, and will always finish listing an external before listing
5421 * @a scratch_pool may be used for temporary allocations.
5423 * @since New in 1.8.
5425 typedef svn_error_t *(*svn_client_list_func2_t)(
5428 const svn_dirent_t *dirent,
5429 const svn_lock_t *lock,
5430 const char *abs_path,
5431 const char *external_parent_url,
5432 const char *external_target,
5433 apr_pool_t *scratch_pool);
5436 * Similar to #svn_client_list_func2_t, but without any information about
5437 * externals definitions.
5439 * @deprecated Provided for backward compatibility with the 1.7 API.
5444 typedef svn_error_t *(*svn_client_list_func_t)(void *baton,
5446 const svn_dirent_t *dirent,
5447 const svn_lock_t *lock,
5448 const char *abs_path,
5452 * Report the directory entry, and possibly children, for @a
5453 * path_or_url at @a revision. The actual node revision selected is
5454 * determined by the path as it exists in @a peg_revision. If @a
5455 * peg_revision->kind is #svn_opt_revision_unspecified, then it defaults
5456 * to #svn_opt_revision_head for URLs or #svn_opt_revision_working
5459 * Report directory entries by invoking @a list_func/@a baton with @a path
5460 * relative to @a path_or_url. The dirent for @a path_or_url is reported
5461 * using an empty @a path. If @a path_or_url is a directory, also report
5462 * its children. If @a path_or_url is non-existent, return
5463 * #SVN_ERR_FS_NOT_FOUND.
5465 * If @a fetch_locks is TRUE, include locks when reporting directory entries.
5467 * If @a include_externals is TRUE, also list all external items
5468 * reached by recursion. @a depth value passed to the original list target
5469 * applies for the externals also.
5471 * Use @a pool for temporary allocations.
5473 * Use authentication baton cached in @a ctx to authenticate against the
5476 * If @a depth is #svn_depth_empty, list just @a path_or_url itself.
5477 * If @a depth is #svn_depth_files, list @a path_or_url and its file
5478 * entries. If #svn_depth_immediates, list its immediate file and
5479 * directory entries. If #svn_depth_infinity, list file entries and
5480 * recurse (with #svn_depth_infinity) on directory entries.
5482 * @a dirent_fields controls which fields in the #svn_dirent_t's are
5483 * filled in. To have them totally filled in use #SVN_DIRENT_ALL,
5484 * otherwise simply bitwise OR together the combination of @c SVN_DIRENT_
5485 * fields you care about.
5487 * @since New in 1.8.
5490 svn_client_list3(const char *path_or_url,
5491 const svn_opt_revision_t *peg_revision,
5492 const svn_opt_revision_t *revision,
5494 apr_uint32_t dirent_fields,
5495 svn_boolean_t fetch_locks,
5496 svn_boolean_t include_externals,
5497 svn_client_list_func2_t list_func,
5499 svn_client_ctx_t *ctx,
5503 /** Similar to svn_client_list3(), but with @a include_externals set
5504 * to FALSE, and using a #svn_client_list_func_t as callback.
5506 * @deprecated Provided for backwards compatibility with the 1.7 API.
5508 * @since New in 1.5.
5512 svn_client_list2(const char *path_or_url,
5513 const svn_opt_revision_t *peg_revision,
5514 const svn_opt_revision_t *revision,
5516 apr_uint32_t dirent_fields,
5517 svn_boolean_t fetch_locks,
5518 svn_client_list_func_t list_func,
5520 svn_client_ctx_t *ctx,
5524 * Similar to svn_client_list2(), but with @a recurse instead of @a depth.
5525 * If @a recurse is TRUE, pass #svn_depth_files for @a depth; else
5526 * pass #svn_depth_infinity.
5528 * @since New in 1.4.
5530 * @deprecated Provided for backward compatibility with the 1.4 API.
5534 svn_client_list(const char *path_or_url,
5535 const svn_opt_revision_t *peg_revision,
5536 const svn_opt_revision_t *revision,
5537 svn_boolean_t recurse,
5538 apr_uint32_t dirent_fields,
5539 svn_boolean_t fetch_locks,
5540 svn_client_list_func_t list_func,
5542 svn_client_ctx_t *ctx,
5546 * Same as svn_client_list(), but always passes #SVN_DIRENT_ALL for
5547 * the @a dirent_fields argument and returns all information in two
5548 * hash tables instead of invoking a callback.
5550 * Set @a *dirents to a newly allocated hash of directory entries.
5551 * The @a dirents hash maps entry names (<tt>const char *</tt>) to
5552 * #svn_dirent_t *'s.
5554 * If @a locks is not @c NULL, set @a *locks to a hash table mapping
5555 * entry names (<tt>const char *</tt>) to #svn_lock_t *'s.
5557 * @since New in 1.3.
5559 * @deprecated Provided for backward compatibility with the 1.3 API.
5560 * Use svn_client_list2() instead.
5564 svn_client_ls3(apr_hash_t **dirents,
5566 const char *path_or_url,
5567 const svn_opt_revision_t *peg_revision,
5568 const svn_opt_revision_t *revision,
5569 svn_boolean_t recurse,
5570 svn_client_ctx_t *ctx,
5574 * Same as svn_client_ls3(), but without the ability to get locks.
5576 * @since New in 1.2.
5578 * @deprecated Provided for backward compatibility with the 1.2 API.
5579 * Use svn_client_list2() instead.
5583 svn_client_ls2(apr_hash_t **dirents,
5584 const char *path_or_url,
5585 const svn_opt_revision_t *peg_revision,
5586 const svn_opt_revision_t *revision,
5587 svn_boolean_t recurse,
5588 svn_client_ctx_t *ctx,
5592 * Similar to svn_client_ls2() except that @a peg_revision is always
5593 * the same as @a revision.
5595 * @deprecated Provided for backward compatibility with the 1.1 API.
5596 * Use svn_client_list2() instead.
5600 svn_client_ls(apr_hash_t **dirents,
5601 const char *path_or_url,
5602 svn_opt_revision_t *revision,
5603 svn_boolean_t recurse,
5604 svn_client_ctx_t *ctx,
5611 * @defgroup Cat View the contents of a file in the repository.
5617 * Output the content of a file.
5619 * @param[in] out The stream to which the content will be written.
5620 * @param[in] path_or_url The path or URL of the file.
5621 * @param[in] peg_revision The peg revision.
5622 * @param[in] revision The operative revision.
5623 * @param[in] ctx The standard client context, used for possible
5625 * @param[in] pool Used for any temporary allocation.
5627 * @todo Add an expansion/translation flag?
5629 * @return A pointer to an #svn_error_t of the type (this list is not
5631 * An unspecified error if @a revision is of kind
5632 * #svn_opt_revision_previous (or some other kind that requires
5633 * a local path), because the desired revision cannot be
5635 * If no error occurred, return #SVN_NO_ERROR.
5637 * @since New in 1.2.
5639 * @see #svn_client_ctx_t <br> @ref clnt_revisions for
5640 * a discussion of operative and peg revisions.
5643 svn_client_cat2(svn_stream_t *out,
5644 const char *path_or_url,
5645 const svn_opt_revision_t *peg_revision,
5646 const svn_opt_revision_t *revision,
5647 svn_client_ctx_t *ctx,
5652 * Similar to svn_client_cat2() except that the peg revision is always
5653 * the same as @a revision.
5655 * @deprecated Provided for backward compatibility with the 1.1 API.
5659 svn_client_cat(svn_stream_t *out,
5660 const char *path_or_url,
5661 const svn_opt_revision_t *revision,
5662 svn_client_ctx_t *ctx,
5665 /** @} end group: cat */
5669 /** Changelist commands
5671 * @defgroup svn_client_changelist_funcs Client Changelist Functions
5675 /** Implementation note:
5677 * For now, changelists are implemented by scattering the
5678 * associations across multiple .svn/entries files in a working copy.
5679 * However, this client API was written so that we have the option of
5680 * changing the underlying implementation -- we may someday want to
5681 * store changelist definitions in a centralized database.
5685 * Add each path in @a paths (recursing to @a depth as necessary) to
5686 * @a changelist. If a path is already a member of another
5687 * changelist, then remove it from the other changelist and add it to
5688 * @a changelist. (For now, a path cannot belong to two changelists
5691 * @a paths is an array of (const char *) local WC paths.
5693 * @a changelists is an array of <tt>const char *</tt> changelist
5694 * names, used as a restrictive filter on items whose changelist
5695 * assignments are adjusted; that is, don't tweak the changeset of any
5696 * item unless it's currently a member of one of those changelists.
5697 * If @a changelists is empty (or altogether @c NULL), no changelist
5700 * @note This metadata is purely a client-side "bookkeeping"
5701 * convenience, and is entirely managed by the working copy.
5703 * @since New in 1.5.
5706 svn_client_add_to_changelist(const apr_array_header_t *paths,
5707 const char *changelist,
5709 const apr_array_header_t *changelists,
5710 svn_client_ctx_t *ctx,
5714 * Remove each path in @a paths (recursing to @a depth as necessary)
5715 * from changelists to which they are currently assigned.
5717 * @a paths is an array of (const char *) local WC paths.
5719 * @a changelists is an array of <tt>const char *</tt> changelist
5720 * names, used as a restrictive filter on items whose changelist
5721 * assignments are removed; that is, don't remove from a changeset any
5722 * item unless it's currently a member of one of those changelists.
5723 * If @a changelists is empty (or altogether @c NULL), all changelist
5724 * assignments in and under each path in @a paths (to @a depth) will
5727 * @note This metadata is purely a client-side "bookkeeping"
5728 * convenience, and is entirely managed by the working copy.
5730 * @since New in 1.5.
5733 svn_client_remove_from_changelists(const apr_array_header_t *paths,
5735 const apr_array_header_t *changelists,
5736 svn_client_ctx_t *ctx,
5741 * Beginning at @a path, crawl to @a depth to discover every path in
5742 * or under @a path which belongs to one of the changelists in @a
5743 * changelists (an array of <tt>const char *</tt> changelist names).
5744 * If @a changelists is @c NULL, discover paths with any changelist.
5745 * Call @a callback_func (with @a callback_baton) each time a
5746 * changelist-having path is discovered.
5748 * @a path is a local WC path.
5750 * If @a ctx->cancel_func is not @c NULL, invoke it passing @a
5751 * ctx->cancel_baton during the recursive walk.
5753 * @since New in 1.5.
5756 svn_client_get_changelists(const char *path,
5757 const apr_array_header_t *changelists,
5759 svn_changelist_receiver_t callback_func,
5760 void *callback_baton,
5761 svn_client_ctx_t *ctx,
5768 /** Locking commands
5770 * @defgroup svn_client_locking_funcs Client Locking Functions
5775 * Lock @a targets in the repository. @a targets is an array of
5776 * <tt>const char *</tt> paths - either all working copy paths or all URLs.
5777 * All targets must be in the same repository.
5779 * If a target is already locked in the repository, no lock will be
5780 * acquired unless @a steal_lock is TRUE, in which case the locks are
5781 * stolen. @a comment, if non-NULL, is an xml-escapable description
5782 * stored with each lock in the repository. Each acquired lock will
5783 * be stored in the working copy if the targets are WC paths.
5785 * For each target @a ctx->notify_func2/notify_baton2 will be used to indicate
5786 * whether it was locked. An action of #svn_wc_notify_locked
5787 * means that the path was locked. If the path was not locked because
5788 * it was out of date or there was already a lock in the repository,
5789 * the notification function will be called with
5790 * #svn_wc_notify_failed_lock, and the error passed in the notification
5793 * Use @a pool for temporary allocations.
5795 * @since New in 1.2.
5798 svn_client_lock(const apr_array_header_t *targets,
5799 const char *comment,
5800 svn_boolean_t steal_lock,
5801 svn_client_ctx_t *ctx,
5805 * Unlock @a targets in the repository. @a targets is an array of
5806 * <tt>const char *</tt> paths - either all working copy paths or all URLs.
5807 * All targets must be in the same repository.
5809 * If the targets are WC paths, and @a break_lock is FALSE, the working
5810 * copy must contain a lock for each target.
5811 * If this is not the case, or the working copy lock doesn't match the
5812 * lock token in the repository, an error will be signaled.
5814 * If the targets are URLs, the locks may be broken even if @a break_lock
5815 * is FALSE, but only if the lock owner is the same as the
5816 * authenticated user.
5818 * If @a break_lock is TRUE, the locks will be broken in the
5819 * repository. In both cases, the locks, if any, will be removed from
5820 * the working copy if the targets are WC paths.
5822 * The notification functions in @a ctx will be called for each
5823 * target. If the target was successfully unlocked,
5824 * #svn_wc_notify_unlocked will be used. Else, if the error is
5825 * directly related to unlocking the path (see
5826 * #SVN_ERR_IS_UNLOCK_ERROR), #svn_wc_notify_failed_unlock will be
5827 * used and the error will be passed in the notification structure.
5829 * Use @a pool for temporary allocations.
5831 * @since New in 1.2.
5834 svn_client_unlock(const apr_array_header_t *targets,
5835 svn_boolean_t break_lock,
5836 svn_client_ctx_t *ctx,
5842 * @defgroup Info Show repository information about a working copy.
5847 /** The size of the file is unknown.
5848 * Used as value in fields of type @c apr_size_t in #svn_info_t.
5851 * @deprecated Provided for backward compatibility with the 1.6 API.
5853 #define SVN_INFO_SIZE_UNKNOWN ((apr_size_t) -1)
5856 * A structure which describes various system-generated metadata about
5857 * a working-copy path or URL.
5859 * @note Fields may be added to the end of this structure in future
5860 * versions. Therefore, users shouldn't allocate structures of this
5861 * type, to preserve binary compatibility.
5863 * @since New in 1.2.
5864 * @deprecated Provided for backward compatibility with the 1.6 API. The new
5865 * API is #svn_client_info2_t.
5867 typedef struct svn_info_t
5869 /** Where the item lives in the repository. */
5872 /** The revision of the object. If path_or_url is a working-copy
5873 * path, then this is its current working revnum. If path_or_url
5874 * is a URL, then this is the repos revision that path_or_url lives in. */
5877 /** The node's kind. */
5878 svn_node_kind_t kind;
5880 /** The root URL of the repository. */
5881 const char *repos_root_URL;
5883 /** The repository's UUID. */
5884 const char *repos_UUID;
5886 /** The last revision in which this object changed. */
5887 svn_revnum_t last_changed_rev;
5889 /** The date of the last_changed_rev. */
5890 apr_time_t last_changed_date;
5892 /** The author of the last_changed_rev. */
5893 const char *last_changed_author;
5895 /** An exclusive lock, if present. Could be either local or remote. */
5898 /** Whether or not to ignore the next 10 wc-specific fields. */
5899 svn_boolean_t has_wc_info;
5902 * @name Working-copy path fields
5903 * These things only apply to a working-copy path.
5904 * See svn_wc_entry_t for explanations.
5907 svn_wc_schedule_t schedule;
5908 const char *copyfrom_url;
5909 svn_revnum_t copyfrom_rev;
5910 apr_time_t text_time;
5911 apr_time_t prop_time; /* will always be 0 for svn 1.4 and later */
5912 const char *checksum;
5913 const char *conflict_old;
5914 const char *conflict_new;
5915 const char *conflict_wrk;
5916 const char *prejfile;
5917 /** @since New in 1.5. */
5918 const char *changelist;
5919 /** @since New in 1.5. */
5923 * Similar to working_size64, but will be #SVN_INFO_SIZE_UNKNOWN when
5924 * its value would overflow apr_size_t (so when size >= 4 GB - 1 byte).
5926 * @deprecated Provided for backward compatibility with the 1.5 API.
5928 apr_size_t working_size;
5933 * Similar to size64, but size will be #SVN_INFO_SIZE_UNKNOWN when
5934 * its value would overflow apr_size_t (so when size >= 4 GB - 1 byte).
5936 * @deprecated Provided for backward compatibility with the 1.5 API.
5941 * The size of the file in the repository (untranslated,
5942 * e.g. without adjustment of line endings and keyword
5943 * expansion). Only applicable for file -- not directory -- URLs.
5944 * For working copy paths, size64 will be #SVN_INVALID_FILESIZE.
5945 * @since New in 1.6.
5947 svn_filesize_t size64;
5950 * The size of the file after being translated into its local
5951 * representation, or #SVN_INVALID_FILESIZE if unknown.
5952 * Not applicable for directories.
5953 * @since New in 1.6.
5954 * @name Working-copy path fields
5957 svn_filesize_t working_size64;
5960 * Info on any tree conflict of which this node is a victim. Otherwise NULL.
5961 * @since New in 1.6.
5963 svn_wc_conflict_description_t *tree_conflict;
5971 * The callback invoked by svn_client_info2(). Each invocation
5972 * describes @a path with the information present in @a info. Note
5973 * that any fields within @a info may be NULL if information is
5974 * unavailable. Use @a pool for all temporary allocation.
5976 * @since New in 1.2.
5977 * @deprecated Provided for backward compatibility with the 1.6 API. The new
5978 * API is #svn_client_info_receiver2_t.
5980 typedef svn_error_t *(*svn_info_receiver_t)(
5983 const svn_info_t *info,
5987 * Return a duplicate of @a info, allocated in @a pool. No part of the new
5988 * structure will be shared with @a info.
5990 * @since New in 1.3.
5991 * @deprecated Provided for backward compatibility with the 1.6 API. The new
5992 * API is #svn_client_info2_dup().
5996 svn_info_dup(const svn_info_t *info,
6000 * A structure which describes various system-generated metadata about
6001 * a working-copy path or URL.
6003 * @note Fields may be added to the end of this structure in future
6004 * versions. Therefore, users shouldn't allocate structures of this
6005 * type, to preserve binary compatibility.
6007 * @since New in 1.7.
6009 typedef struct svn_client_info2_t
6011 /** Where the item lives in the repository. */
6014 /** The revision of the object. If the target is a working-copy
6015 * path, then this is its current working revnum. If the target
6016 * is a URL, then this is the repos revision that it lives in. */
6019 /** The root URL of the repository. */
6020 const char *repos_root_URL;
6022 /** The repository's UUID. */
6023 const char *repos_UUID;
6025 /** The node's kind. */
6026 svn_node_kind_t kind;
6028 /** The size of the file in the repository (untranslated,
6029 * e.g. without adjustment of line endings and keyword
6030 * expansion). Only applicable for file -- not directory -- URLs.
6031 * For working copy paths, @a size will be #SVN_INVALID_FILESIZE. */
6032 svn_filesize_t size;
6034 /** The last revision in which this object changed. */
6035 svn_revnum_t last_changed_rev;
6037 /** The date of the last_changed_rev. */
6038 apr_time_t last_changed_date;
6040 /** The author of the last_changed_rev. */
6041 const char *last_changed_author;
6043 /** An exclusive lock, if present. Could be either local or remote. */
6044 const svn_lock_t *lock;
6046 /** Possible information about the working copy, NULL if not valid. */
6047 const svn_wc_info_t *wc_info;
6049 } svn_client_info2_t;
6052 * Return a duplicate of @a info, allocated in @a pool. No part of the new
6053 * structure will be shared with @a info.
6055 * @since New in 1.7.
6057 svn_client_info2_t *
6058 svn_client_info2_dup(const svn_client_info2_t *info,
6062 * The callback invoked by info retrievers. Each invocation
6063 * describes @a abspath_or_url with the information present in @a info.
6064 * Use @a scratch_pool for all temporary allocation.
6066 * @since New in 1.7.
6068 typedef svn_error_t *(*svn_client_info_receiver2_t)(
6070 const char *abspath_or_url,
6071 const svn_client_info2_t *info,
6072 apr_pool_t *scratch_pool);
6075 * Invoke @a receiver with @a receiver_baton to return information
6076 * about @a abspath_or_url in @a revision. The information returned is
6077 * system-generated metadata, not the sort of "property" metadata
6078 * created by users. See #svn_client_info2_t.
6080 * If both revision arguments are either #svn_opt_revision_unspecified
6081 * or @c NULL, then information will be pulled solely from the working copy;
6082 * no network connections will be made.
6084 * Otherwise, information will be pulled from a repository. The
6085 * actual node revision selected is determined by the @a abspath_or_url
6086 * as it exists in @a peg_revision. If @a peg_revision->kind is
6087 * #svn_opt_revision_unspecified, then it defaults to
6088 * #svn_opt_revision_head for URLs or #svn_opt_revision_working for
6091 * If @a abspath_or_url is not a local path, then if @a revision is of
6092 * kind #svn_opt_revision_previous (or some other kind that requires
6093 * a local path), an error will be returned, because the desired
6094 * revision cannot be determined.
6096 * Use the authentication baton cached in @a ctx to authenticate
6097 * against the repository.
6099 * If @a abspath_or_url is a file, just invoke @a receiver on it. If it
6100 * is a directory, then descend according to @a depth. If @a depth is
6101 * #svn_depth_empty, invoke @a receiver on @a abspath_or_url and
6102 * nothing else; if #svn_depth_files, on @a abspath_or_url and its
6103 * immediate file children; if #svn_depth_immediates, the preceding
6104 * plus on each immediate subdirectory; if #svn_depth_infinity, then
6105 * recurse fully, invoking @a receiver on @a abspath_or_url and
6106 * everything beneath it.
6108 * If @a fetch_excluded is TRUE, also also send excluded nodes in the working
6109 * copy to @a receiver, otherwise these are skipped. If @a fetch_actual_only
6110 * is TRUE also send nodes that don't exist as versioned but are still
6113 * @a changelists is an array of <tt>const char *</tt> changelist
6114 * names, used as a restrictive filter on items whose info is
6115 * reported; that is, don't report info about any item unless
6116 * it's a member of one of those changelists. If @a changelists is
6117 * empty (or altogether @c NULL), no changelist filtering occurs.
6119 * @since New in 1.7.
6122 svn_client_info3(const char *abspath_or_url,
6123 const svn_opt_revision_t *peg_revision,
6124 const svn_opt_revision_t *revision,
6126 svn_boolean_t fetch_excluded,
6127 svn_boolean_t fetch_actual_only,
6128 const apr_array_header_t *changelists,
6129 svn_client_info_receiver2_t receiver,
6130 void *receiver_baton,
6131 svn_client_ctx_t *ctx,
6132 apr_pool_t *scratch_pool);
6134 /** Similar to svn_client_info3, but uses an svn_info_receiver_t instead of
6135 * a #svn_client_info_receiver2_t, and @a path_or_url may be a relative path.
6137 * @since New in 1.5.
6138 * @deprecated Provided for backward compatibility with the 1.6 API.
6142 svn_client_info2(const char *path_or_url,
6143 const svn_opt_revision_t *peg_revision,
6144 const svn_opt_revision_t *revision,
6145 svn_info_receiver_t receiver,
6146 void *receiver_baton,
6148 const apr_array_header_t *changelists,
6149 svn_client_ctx_t *ctx,
6153 * Similar to svn_client_info2() but with @a changelists passed as @c
6154 * NULL, and @a depth set according to @a recurse: if @a recurse is
6155 * TRUE, @a depth is #svn_depth_infinity, else #svn_depth_empty.
6157 * @deprecated Provided for backward compatibility with the 1.4 API.
6161 svn_client_info(const char *path_or_url,
6162 const svn_opt_revision_t *peg_revision,
6163 const svn_opt_revision_t *revision,
6164 svn_info_receiver_t receiver,
6165 void *receiver_baton,
6166 svn_boolean_t recurse,
6167 svn_client_ctx_t *ctx,
6171 * Set @a *wcroot_abspath to the local abspath of the root of the
6172 * working copy in which @a local_abspath resides.
6174 * @since New in 1.7.
6177 svn_client_get_wc_root(const char **wcroot_abspath,
6178 const char *local_abspath,
6179 svn_client_ctx_t *ctx,
6180 apr_pool_t *result_pool,
6181 apr_pool_t *scratch_pool);
6184 * Set @a *min_revision and @a *max_revision to the lowest and highest
6185 * revision numbers found within @a local_abspath. If @a committed is
6186 * TRUE, set @a *min_revision and @a *max_revision to the lowest and
6187 * highest comitted (i.e. "last changed") revision numbers,
6188 * respectively. NULL may be passed for either of @a min_revision and
6189 * @a max_revision to indicate the caller's lack of interest in the
6190 * value. Use @a scratch_pool for temporary allocations.
6192 * @since New in 1.7.
6195 svn_client_min_max_revisions(svn_revnum_t *min_revision,
6196 svn_revnum_t *max_revision,
6197 const char *local_abspath,
6198 svn_boolean_t committed,
6199 svn_client_ctx_t *ctx,
6200 apr_pool_t *scratch_pool);
6206 * @defgroup Patch Apply a patch to the working copy
6212 * The callback invoked by svn_client_patch() before attempting to patch
6213 * the target file at @a canon_path_from_patchfile (the path as parsed from
6214 * the patch file, but in canonicalized form). The callback can set
6215 * @a *filtered to @c TRUE to prevent the file from being patched, or else
6216 * must set it to @c FALSE.
6218 * The callback is also provided with @a patch_abspath, the path of a
6219 * temporary file containing the patched result, and with @a reject_abspath,
6220 * the path to a temporary file containing the diff text of any hunks
6221 * which were rejected during patching.
6223 * Because the callback is invoked before the patching attempt is made,
6224 * there is no guarantee that the target file will actually be patched
6225 * successfully. Client implementations must pay attention to notification
6226 * feedback provided by svn_client_patch() to find out which paths were
6227 * patched successfully.
6229 * Note also that the files at @a patch_abspath and @a reject_abspath are
6230 * guaranteed to remain on disk after patching only if the
6231 * @a remove_tempfiles parameter for svn_client_patch() is @c FALSE.
6233 * The const char * parameters may be allocated in @a scratch_pool which
6234 * will be cleared after each invocation.
6236 * @since New in 1.7.
6238 typedef svn_error_t *(*svn_client_patch_func_t)(
6240 svn_boolean_t *filtered,
6241 const char *canon_path_from_patchfile,
6242 const char *patch_abspath,
6243 const char *reject_abspath,
6244 apr_pool_t *scratch_pool);
6247 * Apply a unidiff patch that's located at absolute path
6248 * @a patch_abspath to the working copy directory at @a wc_dir_abspath.
6250 * This function makes a best-effort attempt at applying the patch.
6251 * It might skip patch targets which cannot be patched (e.g. targets
6252 * that are outside of the working copy). It will also reject hunks
6253 * which cannot be applied to a target in case the hunk's context
6254 * does not match anywhere in the patch target.
6256 * If @a dry_run is TRUE, the patching process is carried out, and full
6257 * notification feedback is provided, but the working copy is not modified.
6259 * @a strip_count specifies how many leading path components should be
6260 * stripped from paths obtained from the patch. It is an error if a
6261 * negative strip count is passed.
6263 * If @a reverse is @c TRUE, apply patches in reverse, deleting lines
6264 * the patch would add and adding lines the patch would delete.
6266 * If @a ignore_whitespace is TRUE, allow patches to be applied if they
6267 * only differ from the target by whitespace.
6269 * If @a remove_tempfiles is TRUE, lifetimes of temporary files created
6270 * during patching will be managed internally. Otherwise, the caller should
6271 * take ownership of these files, the names of which can be obtained by
6272 * passing a @a patch_func callback.
6274 * If @a patch_func is non-NULL, invoke @a patch_func with @a patch_baton
6275 * for each patch target processed.
6277 * If @a ctx->notify_func2 is non-NULL, invoke @a ctx->notify_func2 with
6278 * @a ctx->notify_baton2 as patching progresses.
6280 * If @a ctx->cancel_func is non-NULL, invoke it passing @a
6281 * ctx->cancel_baton at various places during the operation.
6283 * Use @a scratch_pool for temporary allocations.
6285 * @since New in 1.7.
6288 svn_client_patch(const char *patch_abspath,
6289 const char *wc_dir_abspath,
6290 svn_boolean_t dry_run,
6292 svn_boolean_t reverse,
6293 svn_boolean_t ignore_whitespace,
6294 svn_boolean_t remove_tempfiles,
6295 svn_client_patch_func_t patch_func,
6297 svn_client_ctx_t *ctx,
6298 apr_pool_t *scratch_pool);
6302 /** @} end group: Client working copy management */
6306 * @defgroup clnt_sessions Client session related functions
6313 /* Converting paths to URLs. */
6315 /** Set @a *url to the URL for @a path_or_url allocated in result_pool.
6317 * If @a path_or_url is already a URL, set @a *url to @a path_or_url.
6319 * If @a path_or_url is a versioned item, set @a *url to @a
6320 * path_or_url's entry URL. If @a path_or_url is unversioned (has
6321 * no entry), set @a *url to NULL.
6323 * Use @a ctx->wc_ctx to retrieve the information. Use
6324 ** @a scratch_pool for temporary allocations.
6326 * @since New in 1.7.
6329 svn_client_url_from_path2(const char **url,
6330 const char *path_or_url,
6331 svn_client_ctx_t *ctx,
6332 apr_pool_t *result_pool,
6333 apr_pool_t *scratch_pool);
6335 /** Similar to svn_client_url_from_path2(), but without a context argument.
6337 * @since New in 1.5.
6338 * @deprecated Provided for backward compatibility with the 1.6 API.
6342 svn_client_url_from_path(const char **url,
6343 const char *path_or_url,
6348 /* Fetching a repository's root URL and UUID. */
6350 /** Set @a *repos_root_url and @a *repos_uuid, to the root URL and UUID of
6351 * the repository in which @a abspath_or_url is versioned. Use the
6352 * authentication baton and working copy context cached in @a ctx as
6353 * necessary. @a repos_root_url and/or @a repos_uuid may be NULL if not
6356 * This function will open a temporary RA session to the repository if
6357 * necessary to get the information.
6359 * Allocate @a *repos_root_url and @a *repos_uuid in @a result_pool.
6360 * Use @a scratch_pool for temporary allocations.
6362 * @since New in 1.8.
6365 svn_client_get_repos_root(const char **repos_root_url,
6366 const char **repos_uuid,
6367 const char *abspath_or_url,
6368 svn_client_ctx_t *ctx,
6369 apr_pool_t *result_pool,
6370 apr_pool_t *scratch_pool);
6372 /** Set @a *url to the repository root URL of the repository in which
6373 * @a path_or_url is versioned (or scheduled to be versioned),
6374 * allocated in @a pool. @a ctx is required for possible repository
6377 * @since New in 1.5.
6378 * @deprecated Provided for backward compatibility with the 1.7 API. Use
6379 * svn_client_get_repos_root() instead, with an absolute path.
6383 svn_client_root_url_from_path(const char **url,
6384 const char *path_or_url,
6385 svn_client_ctx_t *ctx,
6388 /** Get repository @a uuid for @a url.
6390 * Use a @a pool to open a temporary RA session to @a url, discover the
6391 * repository uuid, and free the session. Return the uuid in @a uuid,
6392 * allocated in @a pool. @a ctx is required for possible repository
6395 * @deprecated Provided for backward compatibility with the 1.7 API. Use
6396 * svn_client_get_repos_root() instead.
6400 svn_client_uuid_from_url(const char **uuid,
6402 svn_client_ctx_t *ctx,
6406 /** Return the repository @a uuid for working-copy @a local_abspath,
6407 * allocated in @a result_pool. Use @a ctx->wc_ctx to retrieve the
6410 * Use @a scratch_pool for temporary allocations.
6412 * @since New in 1.7.
6413 * @deprecated Provided for backward compatibility with the 1.7 API. Use
6414 * svn_client_get_repos_root() instead.
6418 svn_client_uuid_from_path2(const char **uuid,
6419 const char *local_abspath,
6420 svn_client_ctx_t *ctx,
6421 apr_pool_t *result_pool,
6422 apr_pool_t *scratch_pool);
6424 /** Similar to svn_client_uuid_from_path2(), but with a relative path and
6427 * @deprecated Provided for backward compatibility with the 1.6 API.
6431 svn_client_uuid_from_path(const char **uuid,
6433 svn_wc_adm_access_t *adm_access,
6434 svn_client_ctx_t *ctx,
6438 /* Opening RA sessions. */
6440 /** Open an RA session rooted at @a url, and return it in @a *session.
6442 * Use the authentication baton stored in @a ctx for authentication.
6443 * @a *session is allocated in @a result_pool.
6445 * If @a wri_abspath is not NULL, use the working copy identified by @a
6446 * wri_abspath to potentially avoid transferring unneeded data.
6448 * @note This function is similar to svn_ra_open4(), but the caller avoids
6449 * having to providing its own callback functions.
6450 * @since New in 1.8.
6453 svn_client_open_ra_session2(svn_ra_session_t **session,
6455 const char *wri_abspath,
6456 svn_client_ctx_t *ctx,
6457 apr_pool_t *result_pool,
6458 apr_pool_t *scratch_pool);
6460 /** Similar to svn_client_open_ra_session2(), but with @ wri_abspath
6461 * always passed as NULL, and with the same pool used as both @a
6462 * result_pool and @a scratch_pool.
6464 * @since New in 1.3.
6465 * @deprecated Provided for backward compatibility with the 1.7 API.
6469 svn_client_open_ra_session(svn_ra_session_t **session,
6471 svn_client_ctx_t *ctx,
6475 /** @} end group: Client session related functions */
6481 #endif /* __cplusplus */
6483 #endif /* SVN_CLIENT_H */