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 /** @since New in 1.2. */
443 #define SVN_CLIENT_COMMIT_ITEM_LOCK_TOKEN 0x20
444 /** @since New in 1.8. */
445 #define SVN_CLIENT_COMMIT_ITEM_MOVED_HERE 0x40
448 /** The commit candidate structure.
450 * In order to avoid backwards compatibility problems clients should use
451 * svn_client_commit_item3_create() to allocate and initialize this
452 * structure instead of doing so themselves.
456 typedef struct svn_client_commit_item3_t
458 /* IMPORTANT: If you extend this structure, add new fields to the end. */
460 /** absolute working-copy path of item */
463 /** node kind (dir, file) */
464 svn_node_kind_t kind;
466 /** commit URL for this item */
469 /** revision of textbase */
470 svn_revnum_t revision;
472 /** copyfrom-url or NULL if not a copied item */
473 const char *copyfrom_url;
475 /** copyfrom-rev, valid when copyfrom_url != NULL */
476 svn_revnum_t copyfrom_rev;
479 apr_byte_t state_flags;
481 /** An array of #svn_prop_t *'s, which are incoming changes from
482 * the repository to WC properties. These changes are applied
485 * When adding to this array, allocate the #svn_prop_t and its
486 * contents in @c incoming_prop_changes->pool, so that it has the
487 * same lifetime as this data structure.
489 * See http://subversion.tigris.org/issues/show_bug.cgi?id=806 for a
490 * description of what would happen if the post-commit process
491 * didn't group these changes together with all other changes to the
494 apr_array_header_t *incoming_prop_changes;
496 /** An array of #svn_prop_t *'s, which are outgoing changes to
497 * make to properties in the repository. These extra property
498 * changes are declared pre-commit, and applied to the repository as
501 * When adding to this array, allocate the #svn_prop_t and its
502 * contents in @c outgoing_prop_changes->pool, so that it has the
503 * same lifetime as this data structure.
505 apr_array_header_t *outgoing_prop_changes;
508 * When processing the commit this contains the relative path for
509 * the commit session. #NULL until the commit item is preprocessed.
512 const char *session_relpath;
515 * When committing a move, this contains the absolute path where
516 * the node was directly moved from. (If an ancestor at the original
517 * location was moved then it points to where the node itself was
518 * moved from; not the original location.)
521 const char *moved_from_abspath;
523 } svn_client_commit_item3_t;
525 /** The commit candidate structure.
527 * @deprecated Provided for backward compatibility with the 1.4 API.
529 typedef struct svn_client_commit_item2_t
531 /** absolute working-copy path of item */
534 /** node kind (dir, file) */
535 svn_node_kind_t kind;
537 /** commit URL for this item */
540 /** revision of textbase */
541 svn_revnum_t revision;
543 /** copyfrom-url or NULL if not a copied item */
544 const char *copyfrom_url;
546 /** copyfrom-rev, valid when copyfrom_url != NULL */
547 svn_revnum_t copyfrom_rev;
550 apr_byte_t state_flags;
552 /** Analogous to the #svn_client_commit_item3_t.incoming_prop_changes
555 apr_array_header_t *wcprop_changes;
556 } svn_client_commit_item2_t;
558 /** The commit candidate structure.
560 * @deprecated Provided for backward compatibility with the 1.2 API.
562 typedef struct svn_client_commit_item_t
564 /** absolute working-copy path of item */
567 /** node kind (dir, file) */
568 svn_node_kind_t kind;
570 /** commit URL for this item */
573 /** revision (copyfrom-rev if _IS_COPY) */
574 svn_revnum_t revision;
577 const char *copyfrom_url;
580 apr_byte_t state_flags;
582 /** Analogous to the #svn_client_commit_item3_t.incoming_prop_changes
585 apr_array_header_t *wcprop_changes;
587 } svn_client_commit_item_t;
589 /** Return a new commit item object, allocated in @a pool.
591 * In order to avoid backwards compatibility problems, this function
592 * is used to initialize and allocate the #svn_client_commit_item3_t
593 * structure rather than doing so explicitly, as the size of this
594 * structure may change in the future.
598 svn_client_commit_item3_t *
599 svn_client_commit_item3_create(apr_pool_t *pool);
601 /** Like svn_client_commit_item3_create() but with a stupid "const"
602 * qualifier on the returned structure, and it returns an error that
605 * @deprecated Provided for backward compatibility with the 1.5 API.
609 svn_client_commit_item_create(const svn_client_commit_item3_t **item,
613 * Return a duplicate of @a item, allocated in @a pool. No part of the
614 * new structure will be shared with @a item, except for the adm_access
619 svn_client_commit_item3_t *
620 svn_client_commit_item3_dup(const svn_client_commit_item3_t *item,
624 * Return a duplicate of @a item, allocated in @a pool. No part of the new
625 * structure will be shared with @a item.
627 * @deprecated Provided for backward compatibility with the 1.4 API.
630 svn_client_commit_item2_t *
631 svn_client_commit_item2_dup(const svn_client_commit_item2_t *item,
634 /** Callback type used by commit-y operations to get a commit log message
637 * Set @a *log_msg to the log message for the commit, allocated in @a
638 * pool, or @c NULL if wish to abort the commit process. Set @a *tmp_file
639 * to the path of any temporary file which might be holding that log
640 * message, or @c NULL if no such file exists (though, if @a *log_msg is
641 * @c NULL, this value is undefined). The log message MUST be a UTF8
642 * string with LF line separators.
644 * @a commit_items is a read-only array of #svn_client_commit_item3_t
645 * structures, which may be fully or only partially filled-in,
646 * depending on the type of commit operation.
648 * @a baton is provided along with the callback for use by the handler.
650 * All allocations should be performed in @a pool.
654 typedef svn_error_t *(*svn_client_get_commit_log3_t)(
655 const char **log_msg,
656 const char **tmp_file,
657 const apr_array_header_t *commit_items,
661 /** Callback type used by commit-y operations to get a commit log message
664 * Set @a *log_msg to the log message for the commit, allocated in @a
665 * pool, or @c NULL if wish to abort the commit process. Set @a *tmp_file
666 * to the path of any temporary file which might be holding that log
667 * message, or @c NULL if no such file exists (though, if @a *log_msg is
668 * @c NULL, this value is undefined). The log message MUST be a UTF8
669 * string with LF line separators.
671 * @a commit_items is a read-only array of #svn_client_commit_item2_t
672 * structures, which may be fully or only partially filled-in,
673 * depending on the type of commit operation.
675 * @a baton is provided along with the callback for use by the handler.
677 * All allocations should be performed in @a pool.
679 * @deprecated Provided for backward compatibility with the 1.3 API.
681 typedef svn_error_t *(*svn_client_get_commit_log2_t)(
682 const char **log_msg,
683 const char **tmp_file,
684 const apr_array_header_t *commit_items,
688 /** Callback type used by commit-y operations to get a commit log message
691 * Set @a *log_msg to the log message for the commit, allocated in @a
692 * pool, or @c NULL if wish to abort the commit process. Set @a *tmp_file
693 * to the path of any temporary file which might be holding that log
694 * message, or @c NULL if no such file exists (though, if @a *log_msg is
695 * @c NULL, this value is undefined). The log message MUST be a UTF8
696 * string with LF line separators.
698 * @a commit_items is a read-only array of #svn_client_commit_item_t
699 * structures, which may be fully or only partially filled-in,
700 * depending on the type of commit operation.
702 * @a baton is provided along with the callback for use by the handler.
704 * All allocations should be performed in @a pool.
706 * @deprecated Provided for backward compatibility with the 1.2 API.
708 typedef svn_error_t *(*svn_client_get_commit_log_t)(
709 const char **log_msg,
710 const char **tmp_file,
711 apr_array_header_t *commit_items,
720 * @defgroup clnt_blame Client blame functionality
725 /** Callback type used by svn_client_blame5() to notify the caller
726 * that line @a line_no of the blamed file was last changed in @a revision
727 * which has the revision properties @a rev_props, and that the contents were
730 * @a start_revnum and @a end_revnum contain the start and end revision
731 * number of the entire blame operation, as determined from the repository
732 * inside svn_client_blame5(). This can be useful for the blame receiver
733 * to format the blame output.
735 * If svn_client_blame5() was called with @a include_merged_revisions set to
736 * TRUE, @a merged_revision, @a merged_rev_props and @a merged_path will be
737 * set, otherwise they will be NULL. @a merged_path will be set to the
738 * absolute repository path.
740 * All allocations should be performed in @a pool.
742 * @note If there is no blame information for this line, @a revision will be
743 * invalid and @a rev_props will be NULL. In this case @a local_change
744 * will be true if the reason there is no blame information is that the line
745 * was modified locally. In all other cases @a local_change will be false.
749 typedef svn_error_t *(*svn_client_blame_receiver3_t)(
751 svn_revnum_t start_revnum,
752 svn_revnum_t end_revnum,
754 svn_revnum_t revision,
755 apr_hash_t *rev_props,
756 svn_revnum_t merged_revision,
757 apr_hash_t *merged_rev_props,
758 const char *merged_path,
760 svn_boolean_t local_change,
764 * Similar to #svn_client_blame_receiver3_t, but with separate author and
765 * date revision properties instead of all revision properties, and without
766 * information about local changes.
768 * @deprecated Provided for backward compatibility with the 1.6 API.
772 typedef svn_error_t *(*svn_client_blame_receiver2_t)(
775 svn_revnum_t revision,
778 svn_revnum_t merged_revision,
779 const char *merged_author,
780 const char *merged_date,
781 const char *merged_path,
786 * Similar to #svn_client_blame_receiver2_t, but without @a merged_revision,
787 * @a merged_author, @a merged_date, or @a merged_path members.
789 * @note New in 1.4 is that the line is defined to contain only the line
790 * content (and no [partial] EOLs; which was undefined in older versions).
791 * Using this callback with svn_client_blame() or svn_client_blame2()
792 * will still give you the old behaviour.
794 * @deprecated Provided for backward compatibility with the 1.4 API.
796 typedef svn_error_t *(*svn_client_blame_receiver_t)(
799 svn_revnum_t revision,
811 * @defgroup clnt_diff Client diff functionality
815 /** The difference type in an svn_diff_summarize_t structure.
819 typedef enum svn_client_diff_summarize_kind_t
821 /** An item with no text modifications */
822 svn_client_diff_summarize_kind_normal,
825 svn_client_diff_summarize_kind_added,
827 /** An item with text modifications */
828 svn_client_diff_summarize_kind_modified,
830 /** A deleted item */
831 svn_client_diff_summarize_kind_deleted
832 } svn_client_diff_summarize_kind_t;
835 /** A struct that describes the diff of an item. Passed to
836 * #svn_client_diff_summarize_func_t.
838 * @note Fields may be added to the end of this structure in future
839 * versions. Therefore, users shouldn't allocate structures of this
840 * type, to preserve binary compatibility.
844 typedef struct svn_client_diff_summarize_t
846 /** Path relative to the target. If the target is a file, path is
847 * the empty string. */
851 svn_client_diff_summarize_kind_t summarize_kind;
853 /** Properties changed? For consistency with 'svn status' output,
854 * this should be false if summarize_kind is _added or _deleted. */
855 svn_boolean_t prop_changed;
858 svn_node_kind_t node_kind;
859 } svn_client_diff_summarize_t;
862 * Return a duplicate of @a diff, allocated in @a pool. No part of the new
863 * structure will be shared with @a diff.
867 svn_client_diff_summarize_t *
868 svn_client_diff_summarize_dup(const svn_client_diff_summarize_t *diff,
872 /** A callback used in svn_client_diff_summarize2() and
873 * svn_client_diff_summarize_peg2() for reporting a @a diff summary.
875 * All allocations should be performed in @a pool.
877 * @a baton is a closure object; it should be provided by the implementation,
878 * and passed by the caller.
882 typedef svn_error_t *(*svn_client_diff_summarize_func_t)(
883 const svn_client_diff_summarize_t *diff,
895 * @defgroup clnt_ctx Client context management
900 /** A client context structure, which holds client specific callbacks,
901 * batons, serves as a cache for configuration options, and other various
902 * and sundry things. In order to avoid backwards compatibility problems
903 * clients should use svn_client_create_context() to allocate and
904 * initialize this structure instead of doing so themselves.
906 typedef struct svn_client_ctx_t
908 /** main authentication baton. */
909 svn_auth_baton_t *auth_baton;
911 /** notification callback function.
912 * This will be called by notify_func2() by default.
913 * @deprecated Provided for backward compatibility with the 1.1 API.
914 * Use @c notify_func2 instead. */
915 svn_wc_notify_func_t notify_func;
917 /** notification callback baton for notify_func()
918 * @deprecated Provided for backward compatibility with the 1.1 API.
919 * Use @c notify_baton2 instead */
922 /** Log message callback function. NULL means that Subversion
923 * should try not attempt to fetch a log message.
924 * @deprecated Provided for backward compatibility with the 1.2 API.
925 * Use @c log_msg_func2 instead. */
926 svn_client_get_commit_log_t log_msg_func;
928 /** log message callback baton
929 * @deprecated Provided for backward compatibility with the 1.2 API.
930 * Use @c log_msg_baton2 instead. */
933 /** a hash mapping of <tt>const char *</tt> configuration file names to
934 * #svn_config_t *'s. For example, the '~/.subversion/config' file's
935 * contents should have the key "config". May be left unset (or set to
936 * NULL) to use the built-in default settings and not use any configuration.
940 /** a callback to be used to see if the client wishes to cancel the running
942 svn_cancel_func_t cancel_func;
944 /** a baton to pass to the cancellation callback. */
947 /** notification function, defaulting to a function that forwards
948 * to notify_func(). If @c NULL, it will not be invoked.
949 * @since New in 1.2. */
950 svn_wc_notify_func2_t notify_func2;
952 /** notification baton for notify_func2().
953 * @since New in 1.2. */
956 /** Log message callback function. NULL means that Subversion
957 * should try log_msg_func.
958 * @since New in 1.3. */
959 svn_client_get_commit_log2_t log_msg_func2;
961 /** callback baton for log_msg_func2
962 * @since New in 1.3. */
963 void *log_msg_baton2;
965 /** Notification callback for network progress information.
966 * May be NULL if not used.
967 * @since New in 1.3. */
968 svn_ra_progress_notify_func_t progress_func;
970 /** Callback baton for progress_func.
971 * @since New in 1.3. */
972 void *progress_baton;
974 /** Log message callback function. NULL means that Subversion
975 * should try @c log_msg_func2, then @c log_msg_func.
976 * @since New in 1.5. */
977 svn_client_get_commit_log3_t log_msg_func3;
979 /** The callback baton for @c log_msg_func3.
980 * @since New in 1.5. */
981 void *log_msg_baton3;
984 * @since New in 1.5. */
985 apr_hash_t *mimetypes_map;
987 /** Conflict resolution callback and baton, if available.
988 * @since New in 1.5. */
989 svn_wc_conflict_resolver_func_t conflict_func;
990 void *conflict_baton;
992 /** Custom client name string, or @c NULL.
993 * @since New in 1.5. */
994 const char *client_name;
996 /** Conflict resolution callback and baton, if available. NULL means that
997 * subversion should try @c conflict_func.
998 * @since New in 1.7. */
999 svn_wc_conflict_resolver_func2_t conflict_func2;
1000 void *conflict_baton2;
1002 /** A working copy context for the client operation to use.
1003 * This is initialized by svn_client_create_context() and should never
1006 * @since New in 1.7. */
1007 svn_wc_context_t *wc_ctx;
1011 /** Initialize a client context.
1012 * Set @a *ctx to a client context object, allocated in @a pool, that
1013 * represents a particular instance of an svn client. @a cfg_hash is used
1014 * to initialise the config member of the returned context object and should
1015 * remain valid for the lifetime of the object. @a cfg_hash may be @c NULL,
1016 * in which case it is ignored.
1018 * In order to avoid backwards compatibility problems, clients must
1019 * use this function to initialize and allocate the
1020 * #svn_client_ctx_t structure rather than doing so themselves, as
1021 * the size of this structure may change in the future.
1023 * The current implementation never returns error, but callers should
1024 * still check for error, for compatibility with future versions.
1026 * @since New in 1.8.
1029 svn_client_create_context2(svn_client_ctx_t **ctx,
1030 apr_hash_t *cfg_hash,
1034 /** Similar to svn_client_create_context2 but passes a NULL @a cfg_hash.
1036 * @deprecated Provided for backward compatibility with the 1.7 API.
1040 svn_client_create_context(svn_client_ctx_t **ctx,
1043 /** @} end group: Client context management */
1046 * @name Authentication information file names
1048 * Names of files that contain authentication information.
1050 * These filenames are decided by libsvn_client, since this library
1051 * implements all the auth-protocols; libsvn_wc does nothing but
1052 * blindly store and retrieve these files from protected areas.
1054 * @defgroup clnt_auth_filenames Client authentication file names
1057 #define SVN_CLIENT_AUTH_USERNAME "username"
1058 #define SVN_CLIENT_AUTH_PASSWORD "password"
1059 /** @} group end: Authentication information file names */
1061 /** Client argument processing
1063 * @defgroup clnt_cmdline Client command-line processing
1069 * Pull remaining target arguments from @a os into @a *targets_p,
1070 * converting them to UTF-8, followed by targets from @a known_targets
1071 * (which might come from, for example, the "--targets" command line option).
1073 * Process each target in one of the following ways. For a repository-
1074 * relative URL: resolve to a full URL, contacting the repository if
1075 * necessary to do so, and then treat as a full URL. For a URL: do some
1076 * IRI-to-URI encoding and some auto-escaping, and canonicalize. For a
1077 * local path: canonicalize case and path separators.
1079 * If @a keep_last_origpath_on_truepath_collision is TRUE, and there are
1080 * exactly two targets which both case-canonicalize to the same path, the last
1081 * target will be returned in the original non-case-canonicalized form.
1083 * Allocate @a *targets_p and its elements in @a pool.
1085 * @a ctx is required for possible repository authentication.
1087 * If a path has the same name as a Subversion working copy
1088 * administrative directory, return #SVN_ERR_RESERVED_FILENAME_SPECIFIED;
1089 * if multiple reserved paths are encountered, return a chain of
1090 * errors, all of which are #SVN_ERR_RESERVED_FILENAME_SPECIFIED. Do
1091 * not return this type of error in a chain with any other type of
1092 * error, and if this is the only type of error encountered, complete
1093 * the operation before returning the error(s).
1098 svn_client_args_to_target_array2(apr_array_header_t **targets_p,
1100 const apr_array_header_t *known_targets,
1101 svn_client_ctx_t *ctx,
1102 svn_boolean_t keep_last_origpath_on_truepath_collision,
1106 * Similar to svn_client_args_to_target_array2() but with
1107 * @a keep_last_origpath_on_truepath_collision always set to FALSE.
1109 * @deprecated Provided for backward compatibility with the 1.6 API.
1113 svn_client_args_to_target_array(apr_array_header_t **targets_p,
1115 const apr_array_header_t *known_targets,
1116 svn_client_ctx_t *ctx,
1119 /** @} group end: Client command-line processing */
1124 * Client working copy management functions
1126 * @defgroup clnt_wc Client working copy management
1132 * @defgroup clnt_wc_checkout Checkout
1139 * Checkout a working copy from a repository.
1141 * @param[out] result_rev If non-NULL, the value of the revision checked
1142 * out from the repository.
1143 * @param[in] URL The repository URL of the checkout source.
1144 * @param[in] path The root of the new working copy.
1145 * @param[in] peg_revision The peg revision.
1146 * @param[in] revision The operative revision.
1147 * @param[in] depth The depth of the operation. If #svn_depth_unknown,
1148 * then behave as if for #svn_depth_infinity, except in the case
1149 * of resuming a previous checkout of @a path (i.e., updating),
1150 * in which case use the depth of the existing working copy.
1151 * @param[in] ignore_externals If @c TRUE, don't process externals
1152 * definitions as part of this operation.
1153 * @param[in] allow_unver_obstructions If @c TRUE, then tolerate existing
1154 * unversioned items that obstruct incoming paths. Only
1155 * obstructions of the same type (file or dir) as the added
1156 * item are tolerated. The text of obstructing files is left
1157 * as-is, effectively treating it as a user modification after
1158 * the checkout. Working properties of obstructing items are
1159 * set equal to the base properties. <br>
1160 * If @c FALSE, then abort if there are any unversioned
1161 * obstructing items.
1162 * @param[in] ctx The standard client context, used for authentication and
1164 * @param[in] pool Used for any temporary allocation.
1166 * @return A pointer to an #svn_error_t of the type (this list is not
1168 * #SVN_ERR_UNSUPPORTED_FEATURE if @a URL refers to a file rather
1169 * than a directory; <br>
1170 * #SVN_ERR_RA_ILLEGAL_URL if @a URL does not exist; <br>
1171 * #SVN_ERR_CLIENT_BAD_REVISION if @a revision is not one of
1172 * #svn_opt_revision_number, #svn_opt_revision_head, or
1173 * #svn_opt_revision_date. <br>
1174 * If no error occurred, return #SVN_NO_ERROR.
1176 * @since New in 1.5.
1178 * @see #svn_depth_t <br> #svn_client_ctx_t <br> @ref clnt_revisions for
1179 * a discussion of operative and peg revisions.
1182 svn_client_checkout3(svn_revnum_t *result_rev,
1185 const svn_opt_revision_t *peg_revision,
1186 const svn_opt_revision_t *revision,
1188 svn_boolean_t ignore_externals,
1189 svn_boolean_t allow_unver_obstructions,
1190 svn_client_ctx_t *ctx,
1195 * Similar to svn_client_checkout3() but with @a allow_unver_obstructions
1196 * always set to FALSE, and @a depth set according to @a recurse: if
1197 * @a recurse is TRUE, @a depth is #svn_depth_infinity, if @a recurse
1198 * is FALSE, @a depth is #svn_depth_files.
1200 * @deprecated Provided for backward compatibility with the 1.4 API.
1204 svn_client_checkout2(svn_revnum_t *result_rev,
1207 const svn_opt_revision_t *peg_revision,
1208 const svn_opt_revision_t *revision,
1209 svn_boolean_t recurse,
1210 svn_boolean_t ignore_externals,
1211 svn_client_ctx_t *ctx,
1216 * Similar to svn_client_checkout2(), but with @a peg_revision
1217 * always set to #svn_opt_revision_unspecified and
1218 * @a ignore_externals always set to FALSE.
1220 * @deprecated Provided for backward compatibility with the 1.1 API.
1224 svn_client_checkout(svn_revnum_t *result_rev,
1227 const svn_opt_revision_t *revision,
1228 svn_boolean_t recurse,
1229 svn_client_ctx_t *ctx,
1234 * @defgroup Update Bring a working copy up-to-date with a repository
1241 * Update working trees @a paths to @a revision, authenticating with the
1242 * authentication baton cached in @a ctx. @a paths is an array of const
1243 * char * paths to be updated. Unversioned paths that are direct children
1244 * of a versioned path will cause an update that attempts to add that path;
1245 * other unversioned paths are skipped. If @a result_revs is not NULL,
1246 * @a *result_revs will be set to an array of svn_revnum_t with each
1247 * element set to the revision to which @a revision was resolved for the
1248 * corresponding element of @a paths.
1250 * @a revision must be of kind #svn_opt_revision_number,
1251 * #svn_opt_revision_head, or #svn_opt_revision_date. If @a
1252 * revision does not meet these requirements, return the error
1253 * #SVN_ERR_CLIENT_BAD_REVISION.
1255 * The paths in @a paths can be from multiple working copies from multiple
1256 * repositories, but even if they all come from the same repository there
1257 * is no guarantee that revision represented by #svn_opt_revision_head
1258 * will remain the same as each path is updated.
1260 * If @a ignore_externals is set, don't process externals definitions
1261 * as part of this operation.
1263 * If @a depth is #svn_depth_infinity, update fully recursively.
1264 * Else if it is #svn_depth_immediates or #svn_depth_files, update
1265 * each target and its file entries, but not its subdirectories. Else
1266 * if #svn_depth_empty, update exactly each target, nonrecursively
1267 * (essentially, update the target's properties).
1269 * If @a depth is #svn_depth_unknown, take the working depth from
1270 * @a paths and then behave as described above.
1272 * If @a depth_is_sticky is set and @a depth is not
1273 * #svn_depth_unknown, then in addition to updating PATHS, also set
1274 * their sticky ambient depth value to @a depth.
1276 * If @a allow_unver_obstructions is TRUE then the update tolerates
1277 * existing unversioned items that obstruct added paths. Only
1278 * obstructions of the same type (file or dir) as the added item are
1279 * tolerated. The text of obstructing files is left as-is, effectively
1280 * treating it as a user modification after the update. Working
1281 * properties of obstructing items are set equal to the base properties.
1282 * If @a allow_unver_obstructions is FALSE then the update will abort
1283 * if there are any unversioned obstructing items.
1285 * If @a adds_as_modification is TRUE, a local addition at the same path
1286 * as an incoming addition of the same node kind results in a normal node
1287 * with a possible local modification, instead of a tree conflict.
1289 * If @a make_parents is TRUE, create any non-existent parent
1290 * directories also by checking them out at depth=empty.
1292 * If @a ctx->notify_func2 is non-NULL, invoke @a ctx->notify_func2 with
1293 * @a ctx->notify_baton2 for each item handled by the update, and also for
1294 * files restored from text-base. If @a ctx->cancel_func is non-NULL, invoke
1295 * it passing @a ctx->cancel_baton at various places during the update.
1297 * Use @a pool for any temporary allocation.
1299 * @todo Multiple Targets
1300 * - Up for debate: an update on multiple targets is *not* atomic.
1301 * Right now, svn_client_update only takes one path. What's
1302 * debatable is whether this should ever change. On the one hand,
1303 * it's kind of losing to have the client application loop over
1304 * targets and call svn_client_update() on each one; each call to
1305 * update initializes a whole new repository session (network
1306 * overhead, etc.) On the other hand, it's a very simple
1307 * implementation, and allows for the possibility that different
1308 * targets may come from different repositories.
1310 * @since New in 1.7.
1313 svn_client_update4(apr_array_header_t **result_revs,
1314 const apr_array_header_t *paths,
1315 const svn_opt_revision_t *revision,
1317 svn_boolean_t depth_is_sticky,
1318 svn_boolean_t ignore_externals,
1319 svn_boolean_t allow_unver_obstructions,
1320 svn_boolean_t adds_as_modification,
1321 svn_boolean_t make_parents,
1322 svn_client_ctx_t *ctx,
1326 * Similar to svn_client_update4() but with @a make_parents always set
1327 * to FALSE and @a adds_as_modification set to TRUE.
1329 * @deprecated Provided for backward compatibility with the 1.6 API.
1330 * @since New in 1.5.
1334 svn_client_update3(apr_array_header_t **result_revs,
1335 const apr_array_header_t *paths,
1336 const svn_opt_revision_t *revision,
1338 svn_boolean_t depth_is_sticky,
1339 svn_boolean_t ignore_externals,
1340 svn_boolean_t allow_unver_obstructions,
1341 svn_client_ctx_t *ctx,
1345 * Similar to svn_client_update3() but with @a allow_unver_obstructions
1346 * always set to FALSE, @a depth_is_sticky to FALSE, and @a depth set
1347 * according to @a recurse: if @a recurse is TRUE, set @a depth to
1348 * #svn_depth_infinity, if @a recurse is FALSE, set @a depth to
1351 * @deprecated Provided for backward compatibility with the 1.4 API.
1355 svn_client_update2(apr_array_header_t **result_revs,
1356 const apr_array_header_t *paths,
1357 const svn_opt_revision_t *revision,
1358 svn_boolean_t recurse,
1359 svn_boolean_t ignore_externals,
1360 svn_client_ctx_t *ctx,
1364 * Similar to svn_client_update2() except that it accepts only a single
1365 * target in @a path, returns a single revision if @a result_rev is
1366 * not NULL, and @a ignore_externals is always set to FALSE.
1368 * @deprecated Provided for backward compatibility with the 1.1 API.
1372 svn_client_update(svn_revnum_t *result_rev,
1374 const svn_opt_revision_t *revision,
1375 svn_boolean_t recurse,
1376 svn_client_ctx_t *ctx,
1381 * @defgroup Switch Switch a working copy to another location.
1387 * Switch an existing working copy directory to a different repository
1390 * This is normally used to switch a working copy directory over to another
1391 * line of development, such as a branch or a tag. Switching an existing
1392 * working copy directory is more efficient than checking out @a url from
1395 * @param[out] result_rev If non-NULL, the value of the revision to which
1396 * the working copy was actually switched.
1397 * @param[in] path The directory to be switched. This need not be the
1398 * root of a working copy.
1399 * @param[in] url The repository URL to switch to.
1400 * @param[in] peg_revision The peg revision.
1401 * @param[in] revision The operative revision.
1402 * @param[in] depth The depth of the operation. If #svn_depth_infinity,
1403 * switch fully recursively. Else if #svn_depth_immediates,
1404 * switch @a path and its file children (if any), and
1405 * switch subdirectories but do not update them. Else if
1406 * #svn_depth_files, switch just file children, ignoring
1407 * subdirectories completely. Else if #svn_depth_empty,
1408 * switch just @a path and touch nothing underneath it.
1409 * @param[in] depth_is_sticky If @c TRUE, and @a depth is not
1410 * #svn_depth_unknown, then in addition to switching @a path, also
1411 * set its sticky ambient depth value to @a depth.
1412 * @param[in] ignore_externals If @c TRUE, don't process externals
1413 * definitions as part of this operation.
1414 * @param[in] allow_unver_obstructions If @c TRUE, then tolerate existing
1415 * unversioned items that obstruct incoming paths. Only
1416 * obstructions of the same type (file or dir) as the added
1417 * item are tolerated. The text of obstructing files is left
1418 * as-is, effectively treating it as a user modification after
1419 * the checkout. Working properties of obstructing items are
1420 * set equal to the base properties. <br>
1421 * If @c FALSE, then abort if there are any unversioned
1422 * obstructing items.
1423 * @param[in] ignore_ancestry If @c FALSE, then verify that the file
1424 * or directory at @a path shares some common version control
1425 * ancestry with the switch URL location (represented by the
1426 * combination of @a url, @a peg_revision, and @a revision),
1427 * and returning #SVN_ERR_CLIENT_UNRELATED_RESOURCES if they
1428 * do not. If @c TRUE, no such sanity checks are performed.
1430 * @param[in] ctx The standard client context, used for authentication and
1431 * notification. The notifier is invoked for paths affected by
1432 * the switch, and also for files which may be restored from the
1433 * pristine store after being previously removed from the working
1435 * @param[in] pool Used for any temporary allocation.
1437 * @return A pointer to an #svn_error_t of the type (this list is not
1439 * #SVN_ERR_CLIENT_BAD_REVISION if @a revision is not one of
1440 * #svn_opt_revision_number, #svn_opt_revision_head, or
1441 * #svn_opt_revision_date. <br>
1442 * If no error occurred, return #SVN_NO_ERROR.
1444 * @since New in 1.7.
1446 * @see #svn_depth_t <br> #svn_client_ctx_t <br> @ref clnt_revisions for
1447 * a discussion of operative and peg revisions.
1450 svn_client_switch3(svn_revnum_t *result_rev,
1453 const svn_opt_revision_t *peg_revision,
1454 const svn_opt_revision_t *revision,
1456 svn_boolean_t depth_is_sticky,
1457 svn_boolean_t ignore_externals,
1458 svn_boolean_t allow_unver_obstructions,
1459 svn_boolean_t ignore_ancestry,
1460 svn_client_ctx_t *ctx,
1465 * Similar to svn_client_switch3() but with @a ignore_ancestry always
1468 * @since New in 1.5.
1469 * @deprecated Provided for backward compatibility with the 1.4 API.
1473 svn_client_switch2(svn_revnum_t *result_rev,
1476 const svn_opt_revision_t *peg_revision,
1477 const svn_opt_revision_t *revision,
1479 svn_boolean_t depth_is_sticky,
1480 svn_boolean_t ignore_externals,
1481 svn_boolean_t allow_unver_obstructions,
1482 svn_client_ctx_t *ctx,
1487 * Similar to svn_client_switch2() but with @a allow_unver_obstructions,
1488 * @a ignore_externals, and @a depth_is_sticky always set to FALSE,
1489 * and @a depth set according to @a recurse: if @a recurse is TRUE,
1490 * set @a depth to #svn_depth_infinity, if @a recurse is FALSE, set
1491 * @a depth to #svn_depth_files.
1493 * @deprecated Provided for backward compatibility with the 1.4 API.
1497 svn_client_switch(svn_revnum_t *result_rev,
1500 const svn_opt_revision_t *revision,
1501 svn_boolean_t recurse,
1502 svn_client_ctx_t *ctx,
1508 * @defgroup Add Begin versioning files/directories in a working copy.
1514 * Schedule a working copy @a path for addition to the repository.
1516 * If @a depth is #svn_depth_empty, add just @a path and nothing
1517 * below it. If #svn_depth_files, add @a path and any file
1518 * children of @a path. If #svn_depth_immediates, add @a path, any
1519 * file children, and any immediate subdirectories (but nothing
1520 * underneath those subdirectories). If #svn_depth_infinity, add
1521 * @a path and everything under it fully recursively.
1523 * @a path's parent must be under revision control already (unless
1524 * @a add_parents is TRUE), but @a path is not.
1526 * If @a force is not set and @a path is already under version
1527 * control, return the error #SVN_ERR_ENTRY_EXISTS. If @a force is
1528 * set, do not error on already-versioned items. When used on a
1529 * directory in conjunction with a @a depth value greater than
1530 * #svn_depth_empty, this has the effect of scheduling for addition
1531 * any unversioned files and directories scattered within even a
1532 * versioned tree (up to @a depth).
1534 * If @a ctx->notify_func2 is non-NULL, then for each added item, call
1535 * @a ctx->notify_func2 with @a ctx->notify_baton2 and the path of the
1538 * If @a no_ignore is FALSE, don't add any file or directory (or recurse
1539 * into any directory) that is unversioned and found by recursion (as
1540 * opposed to being the explicit target @a path) and whose name matches the
1541 * svn:ignore property on its parent directory or the global-ignores list in
1542 * @a ctx->config. If @a no_ignore is TRUE, do include such files and
1543 * directories. (Note that an svn:ignore property can influence this
1544 * behaviour only when recursing into an already versioned directory with @a
1547 * If @a no_autoprops is TRUE, don't set any autoprops on added files. If
1548 * @a no_autoprops is FALSE then all added files have autprops set as per
1549 * the auto-props list in @a ctx->config and the value of any
1550 * @c SVN_PROP_INHERITABLE_AUTO_PROPS properties inherited by the nearest
1551 * parents of @a path which are already under version control.
1553 * If @a add_parents is TRUE, recurse up @a path's directory and look for
1554 * a versioned directory. If found, add all intermediate paths between it
1555 * and @a path. If not found, return #SVN_ERR_CLIENT_NO_VERSIONED_PARENT.
1557 * @a scratch_pool is used for temporary allocations only.
1560 * This is a *scheduling* operation. No changes will
1561 * happen to the repository until a commit occurs. This scheduling
1562 * can be removed with svn_client_revert2().
1564 * @since New in 1.8.
1567 svn_client_add5(const char *path,
1569 svn_boolean_t force,
1570 svn_boolean_t no_ignore,
1571 svn_boolean_t no_autoprops,
1572 svn_boolean_t add_parents,
1573 svn_client_ctx_t *ctx,
1574 apr_pool_t *scratch_pool);
1577 * Similar to svn_client_add5(), but with @a no_autoprops always set to
1580 * @deprecated Provided for backward compatibility with the 1.7 API.
1584 svn_client_add4(const char *path,
1586 svn_boolean_t force,
1587 svn_boolean_t no_ignore,
1588 svn_boolean_t add_parents,
1589 svn_client_ctx_t *ctx,
1593 * Similar to svn_client_add4(), but with @a add_parents always set to
1594 * FALSE and @a depth set according to @a recursive: if TRUE, then
1595 * @a depth is #svn_depth_infinity, if FALSE, then #svn_depth_empty.
1597 * @deprecated Provided for backward compatibility with the 1.4 API.
1601 svn_client_add3(const char *path,
1602 svn_boolean_t recursive,
1603 svn_boolean_t force,
1604 svn_boolean_t no_ignore,
1605 svn_client_ctx_t *ctx,
1609 * Similar to svn_client_add3(), but with @a no_ignore always set to
1612 * @deprecated Provided for backward compatibility with the 1.2 API.
1616 svn_client_add2(const char *path,
1617 svn_boolean_t recursive,
1618 svn_boolean_t force,
1619 svn_client_ctx_t *ctx,
1623 * Similar to svn_client_add2(), but with @a force always set to FALSE.
1625 * @deprecated Provided for backward compatibility with the 1.0 API.
1629 svn_client_add(const char *path,
1630 svn_boolean_t recursive,
1631 svn_client_ctx_t *ctx,
1637 * @defgroup Mkdir Create directories in a working copy or repository.
1642 /** Create a directory, either in a repository or a working copy.
1644 * @a paths is an array of (const char *) paths, either all local WC paths
1647 * If @a paths contains URLs, use the authentication baton in @a ctx
1648 * and @a message to immediately attempt to commit the creation of the
1649 * directories in @a paths in the repository.
1651 * Else, create the directories on disk, and attempt to schedule them
1652 * for addition (using svn_client_add(), whose docstring you should
1655 * If @a make_parents is TRUE, create any non-existent parent directories
1658 * If non-NULL, @a revprop_table is a hash table holding additional,
1659 * custom revision properties (<tt>const char *</tt> names mapped to
1660 * <tt>svn_string_t *</tt> values) to be set on the new revision in
1661 * the event that this is a committing operation. This table cannot
1662 * contain any standard Subversion properties.
1664 * @a ctx->log_msg_func3/@a ctx->log_msg_baton3 are a callback/baton
1665 * combo that this function can use to query for a commit log message
1666 * when one is needed.
1668 * If @a ctx->notify_func2 is non-NULL, when the directory has been created
1669 * (successfully) in the working copy, call @a ctx->notify_func2 with
1670 * @a ctx->notify_baton2 and the path of the new directory. Note that this is
1671 * only called for items added to the working copy.
1673 * If @a commit_callback is non-NULL, then for each successful commit, call
1674 * @a commit_callback with @a commit_baton and a #svn_commit_info_t for
1677 * @since New in 1.7.
1680 svn_client_mkdir4(const apr_array_header_t *paths,
1681 svn_boolean_t make_parents,
1682 const apr_hash_t *revprop_table,
1683 svn_commit_callback2_t commit_callback,
1685 svn_client_ctx_t *ctx,
1689 * Similar to svn_client_mkdir4(), but returns the commit info in
1690 * @a *commit_info_p rather than through a callback function.
1692 * @since New in 1.5.
1693 * @deprecated Provided for backward compatibility with the 1.6 API.
1697 svn_client_mkdir3(svn_commit_info_t **commit_info_p,
1698 const apr_array_header_t *paths,
1699 svn_boolean_t make_parents,
1700 const apr_hash_t *revprop_table,
1701 svn_client_ctx_t *ctx,
1706 * Same as svn_client_mkdir3(), but with @a make_parents always FALSE,
1707 * and @a revprop_table always NULL.
1709 * @since New in 1.3.
1710 * @deprecated Provided for backward compatibility with the 1.4 API.
1714 svn_client_mkdir2(svn_commit_info_t **commit_info_p,
1715 const apr_array_header_t *paths,
1716 svn_client_ctx_t *ctx,
1720 * Same as svn_client_mkdir2(), but takes the #svn_client_commit_info_t
1721 * type for @a commit_info_p.
1723 * @deprecated Provided for backward compatibility with the 1.2 API.
1727 svn_client_mkdir(svn_client_commit_info_t **commit_info_p,
1728 const apr_array_header_t *paths,
1729 svn_client_ctx_t *ctx,
1735 * @defgroup Delete Remove files/directories from a working copy or repository.
1740 /** Delete items from a repository or working copy.
1742 * @a paths is an array of (const char *) paths, either all local WC paths
1745 * If the paths in @a paths are URLs, use the authentication baton in
1746 * @a ctx and @a ctx->log_msg_func3/@a ctx->log_msg_baton3 to
1747 * immediately attempt to commit a deletion of the URLs from the
1748 * repository. Every path must belong to the same repository.
1750 * Else, schedule the working copy paths in @a paths for removal from
1751 * the repository. Each path's parent must be under revision control.
1752 * This is just a *scheduling* operation. No changes will happen to
1753 * the repository until a commit occurs. This scheduling can be
1754 * removed with svn_client_revert2(). If a path is a file it is
1755 * immediately removed from the working copy. If the path is a
1756 * directory it will remain in the working copy but all the files, and
1757 * all unversioned items, it contains will be removed. If @a force is
1758 * not set then this operation will fail if any path contains locally
1759 * modified and/or unversioned items. If @a force is set such items
1762 * If the paths are working copy paths and @a keep_local is TRUE then
1763 * the paths will not be removed from the working copy, only scheduled
1764 * for removal from the repository. Once the scheduled deletion is
1765 * committed, they will appear as unversioned paths in the working copy.
1767 * If non-NULL, @a revprop_table is a hash table holding additional,
1768 * custom revision properties (<tt>const char *</tt> names mapped to
1769 * <tt>svn_string_t *</tt> values) to be set on the new revision in
1770 * the event that this is a committing operation. This table cannot
1771 * contain any standard Subversion properties.
1773 * @a ctx->log_msg_func3/@a ctx->log_msg_baton3 are a callback/baton
1774 * combo that this function can use to query for a commit log message
1775 * when one is needed.
1777 * If @a ctx->notify_func2 is non-NULL, then for each item deleted, call
1778 * @a ctx->notify_func2 with @a ctx->notify_baton2 and the path of the deleted
1781 * If @a commit_callback is non-NULL, then for each successful commit, call
1782 * @a commit_callback with @a commit_baton and a #svn_commit_info_t for
1785 * @since New in 1.7.
1788 svn_client_delete4(const apr_array_header_t *paths,
1789 svn_boolean_t force,
1790 svn_boolean_t keep_local,
1791 const apr_hash_t *revprop_table,
1792 svn_commit_callback2_t commit_callback,
1794 svn_client_ctx_t *ctx,
1798 * Similar to svn_client_delete4(), but returns the commit info in
1799 * @a *commit_info_p rather than through a callback function.
1801 * @since New in 1.5.
1802 * @deprecated Provided for backward compatibility with the 1.6 API.
1806 svn_client_delete3(svn_commit_info_t **commit_info_p,
1807 const apr_array_header_t *paths,
1808 svn_boolean_t force,
1809 svn_boolean_t keep_local,
1810 const apr_hash_t *revprop_table,
1811 svn_client_ctx_t *ctx,
1815 * Similar to svn_client_delete3(), but with @a keep_local always set
1816 * to FALSE, and @a revprop_table passed as NULL.
1818 * @deprecated Provided for backward compatibility with the 1.4 API.
1822 svn_client_delete2(svn_commit_info_t **commit_info_p,
1823 const apr_array_header_t *paths,
1824 svn_boolean_t force,
1825 svn_client_ctx_t *ctx,
1829 * Similar to svn_client_delete2(), but takes the #svn_client_commit_info_t
1830 * type for @a commit_info_p.
1832 * @deprecated Provided for backward compatibility with the 1.2 API.
1836 svn_client_delete(svn_client_commit_info_t **commit_info_p,
1837 const apr_array_header_t *paths,
1838 svn_boolean_t force,
1839 svn_client_ctx_t *ctx,
1846 * @defgroup Import Import files into the repository.
1852 * The callback invoked by svn_client_import5() before adding a node to the
1853 * list of nodes to be imported.
1855 * @a baton is the value passed to @a svn_client_import5 as filter_baton.
1857 * The callback receives the @a local_abspath for each node and the @a dirent
1858 * for it when walking the directory tree. Only the kind of node, including
1859 * special status is available in @a dirent.
1861 * Implementations can set @a *filtered to TRUE, to make the import
1862 * process omit the node and (if the node is a directory) all its
1865 * @a scratch_pool can be used for temporary allocations.
1867 * @since New in 1.8.
1869 typedef svn_error_t *(*svn_client_import_filter_func_t)(
1871 svn_boolean_t *filtered,
1872 const char *local_abspath,
1873 const svn_io_dirent2_t *dirent,
1874 apr_pool_t *scratch_pool);
1876 /** Import file or directory @a path into repository directory @a url at
1877 * head, authenticating with the authentication baton cached in @a ctx,
1878 * and using @a ctx->log_msg_func3/@a ctx->log_msg_baton3 to get a log message
1879 * for the (implied) commit. If some components of @a url do not exist
1880 * then create parent directories as necessary.
1882 * This function reads an unversioned tree from disk and skips any ".svn"
1883 * directories. Even if a file or directory being imported is part of an
1884 * existing WC, this function sees it as unversioned and does not notice any
1885 * existing Subversion properties in it.
1887 * If @a path is a directory, the contents of that directory are
1888 * imported directly into the directory identified by @a url. Note that the
1889 * directory @a path itself is not imported -- that is, the basename of
1890 * @a path is not part of the import.
1892 * If @a path is a file, then the dirname of @a url is the directory
1893 * receiving the import. The basename of @a url is the filename in the
1894 * repository. In this case if @a url already exists, return error.
1896 * If @a ctx->notify_func2 is non-NULL, then call @a ctx->notify_func2 with
1897 * @a ctx->notify_baton2 as the import progresses, with any of the following
1898 * actions: #svn_wc_notify_commit_added,
1899 * #svn_wc_notify_commit_postfix_txdelta.
1901 * Use @a scratch_pool for any temporary allocation.
1903 * If non-NULL, @a revprop_table is a hash table holding additional,
1904 * custom revision properties (<tt>const char *</tt> names mapped to
1905 * <tt>svn_string_t *</tt> values) to be set on the new revision.
1906 * This table cannot contain any standard Subversion properties.
1908 * @a ctx->log_msg_func3/@a ctx->log_msg_baton3 are a callback/baton
1909 * combo that this function can use to query for a commit log message
1910 * when one is needed.
1912 * If @a depth is #svn_depth_empty, import just @a path and nothing
1913 * below it. If #svn_depth_files, import @a path and any file
1914 * children of @a path. If #svn_depth_immediates, import @a path, any
1915 * file children, and any immediate subdirectories (but nothing
1916 * underneath those subdirectories). If #svn_depth_infinity, import
1917 * @a path and everything under it fully recursively.
1919 * If @a no_ignore is @c FALSE, don't import any file or directory (or
1920 * recurse into any directory) that is found by recursion (as opposed to
1921 * being the explicit target @a path) and whose name matches the
1922 * global-ignores list in @a ctx->config. If @a no_ignore is @c TRUE, do
1923 * include such files and directories. (Note that svn:ignore properties are
1924 * not involved, as auto-props cannot set properties on directories and even
1925 * if the target is part of a WC the import ignores any existing
1928 * If @a no_autoprops is TRUE, don't set any autoprops on imported files. If
1929 * @a no_autoprops is FALSE then all imported files have autprops set as per
1930 * the auto-props list in @a ctx->config and the value of any
1931 * @c SVN_PROP_INHERITABLE_AUTO_PROPS properties inherited by and explicitly set
1932 * on @a url if @a url is already under versioned control, or the nearest parents
1933 * of @a path which are already under version control if not.
1935 * If @a ignore_unknown_node_types is @c FALSE, ignore files of which the
1936 * node type is unknown, such as device files and pipes.
1938 * If @a filter_callback is non-NULL, call it for each node that isn't ignored
1939 * for other reasons with @a filter_baton, to allow third party to ignore
1940 * specific nodes during importing.
1942 * If @a commit_callback is non-NULL, then for each successful commit, call
1943 * @a commit_callback with @a commit_baton and a #svn_commit_info_t for
1946 * @since New in 1.8.
1949 svn_client_import5(const char *path,
1952 svn_boolean_t no_ignore,
1953 svn_boolean_t no_autoprops,
1954 svn_boolean_t ignore_unknown_node_types,
1955 const apr_hash_t *revprop_table,
1956 svn_client_import_filter_func_t filter_callback,
1958 svn_commit_callback2_t commit_callback,
1960 svn_client_ctx_t *ctx,
1961 apr_pool_t *scratch_pool);
1964 * Similar to svn_client_import5(), but without support for an optional
1965 * @a filter_callback and @a no_autoprops always set to FALSE.
1967 * @since New in 1.7.
1968 * @deprecated Provided for backward compatibility with the 1.7 API.
1972 svn_client_import4(const char *path,
1975 svn_boolean_t no_ignore,
1976 svn_boolean_t ignore_unknown_node_types,
1977 const apr_hash_t *revprop_table,
1978 svn_commit_callback2_t commit_callback,
1980 svn_client_ctx_t *ctx,
1984 * Similar to svn_client_import4(), but returns the commit info in
1985 * @a *commit_info_p rather than through a callback function.
1987 * @since New in 1.5.
1988 * @deprecated Provided for backward compatibility with the 1.6 API.
1992 svn_client_import3(svn_commit_info_t **commit_info_p,
1996 svn_boolean_t no_ignore,
1997 svn_boolean_t ignore_unknown_node_types,
1998 const apr_hash_t *revprop_table,
1999 svn_client_ctx_t *ctx,
2003 * Similar to svn_client_import3(), but with @a ignore_unknown_node_types
2004 * always set to @c FALSE, @a revprop_table passed as NULL, and @a
2005 * depth set according to @a nonrecursive: if TRUE, then @a depth is
2006 * #svn_depth_files, else #svn_depth_infinity.
2008 * @since New in 1.3.
2010 * @deprecated Provided for backward compatibility with the 1.4 API
2014 svn_client_import2(svn_commit_info_t **commit_info_p,
2017 svn_boolean_t nonrecursive,
2018 svn_boolean_t no_ignore,
2019 svn_client_ctx_t *ctx,
2023 * Similar to svn_client_import2(), but with @a no_ignore always set
2024 * to FALSE and using the #svn_client_commit_info_t type for
2027 * @deprecated Provided for backward compatibility with the 1.2 API.
2031 svn_client_import(svn_client_commit_info_t **commit_info_p,
2034 svn_boolean_t nonrecursive,
2035 svn_client_ctx_t *ctx,
2041 * @defgroup Commit Commit local modifications to the repository.
2047 * Commit files or directories into repository, authenticating with
2048 * the authentication baton cached in @a ctx, and using
2049 * @a ctx->log_msg_func3/@a ctx->log_msg_baton3 to obtain the log message.
2050 * Set @a *commit_info_p to the results of the commit, allocated in @a pool.
2052 * @a targets is an array of <tt>const char *</tt> paths to commit. They
2053 * need not be canonicalized nor condensed; this function will take care of
2054 * that. If @a targets has zero elements, then do nothing and return
2055 * immediately without error.
2057 * If non-NULL, @a revprop_table is a hash table holding additional,
2058 * custom revision properties (<tt>const char *</tt> names mapped to
2059 * <tt>svn_string_t *</tt> values) to be set on the new revision.
2060 * This table cannot contain any standard Subversion properties.
2062 * If @a ctx->notify_func2 is non-NULL, then call @a ctx->notify_func2 with
2063 * @a ctx->notify_baton2 as the commit progresses, with any of the following
2064 * actions: #svn_wc_notify_commit_modified, #svn_wc_notify_commit_added,
2065 * #svn_wc_notify_commit_deleted, #svn_wc_notify_commit_replaced,
2066 * #svn_wc_notify_commit_copied, #svn_wc_notify_commit_copied_replaced,
2067 * #svn_wc_notify_commit_postfix_txdelta.
2069 * If @a depth is #svn_depth_infinity, commit all changes to and
2070 * below named targets. If @a depth is #svn_depth_empty, commit
2071 * only named targets (that is, only property changes on named
2072 * directory targets, and property and content changes for named file
2073 * targets). If @a depth is #svn_depth_files, behave as above for
2074 * named file targets, and for named directory targets, commit
2075 * property changes on a named directory and all changes to files
2076 * directly inside that directory. If #svn_depth_immediates, behave
2077 * as for #svn_depth_files, and for subdirectories of any named
2078 * directory target commit as though for #svn_depth_empty.
2080 * Unlock paths in the repository, unless @a keep_locks is TRUE.
2082 * @a changelists is an array of <tt>const char *</tt> changelist
2083 * names, used as a restrictive filter on items that are committed;
2084 * that is, don't commit anything unless it's a member of one of those
2085 * changelists. After the commit completes successfully, remove
2086 * changelist associations from the targets, unless @a
2087 * keep_changelists is set. If @a changelists is
2088 * empty (or altogether @c NULL), no changelist filtering occurs.
2090 * If @a commit_as_operations is set to FALSE, when a copy is committed
2091 * all changes below the copy are always committed at the same time
2092 * (independent of the value of @a depth). If @a commit_as_operations is
2093 * #TRUE, changes to descendants are only committed if they are itself
2094 * included via @a depth and targets.
2096 * If @a include_file_externals and/or @a include_dir_externals are #TRUE,
2097 * also commit all file and/or dir externals (respectively) that are reached
2098 * by recursion, except for those externals which:
2099 * - have a fixed revision, or
2100 * - come from a different repository root URL (dir externals).
2101 * These flags affect only recursion; externals that directly appear in @a
2102 * targets are always included in the commit.
2104 * ### TODO: currently, file externals hidden inside an unversioned dir are
2105 * skipped deliberately, because we can't commit those yet.
2106 * See STMT_SELECT_COMMITTABLE_EXTERNALS_BELOW.
2108 * ### TODO: With @c depth_immediates, this function acts as if
2109 * @a include_dir_externals was passed #FALSE, but caller expects
2110 * immediate child dir externals to be included @c depth_empty.
2112 * When @a commit_as_operations is #TRUE it is possible to delete a node and
2113 * all its descendants by selecting just the root of the deletion. If it is
2114 * set to #FALSE this will raise an error.
2116 * If @a commit_callback is non-NULL, then for each successful commit, call
2117 * @a commit_callback with @a commit_baton and a #svn_commit_info_t for
2120 * @note #svn_depth_unknown and #svn_depth_exclude must not be passed
2123 * Use @a pool for any temporary allocations.
2125 * @since New in 1.8.
2128 svn_client_commit6(const apr_array_header_t *targets,
2130 svn_boolean_t keep_locks,
2131 svn_boolean_t keep_changelists,
2132 svn_boolean_t commit_as_operations,
2133 svn_boolean_t include_file_externals,
2134 svn_boolean_t include_dir_externals,
2135 const apr_array_header_t *changelists,
2136 const apr_hash_t *revprop_table,
2137 svn_commit_callback2_t commit_callback,
2139 svn_client_ctx_t *ctx,
2143 * Similar to svn_client_commit6(), but passes @a include_file_externals as
2144 * FALSE and @a include_dir_externals as FALSE.
2146 * @since New in 1.7.
2147 * @deprecated Provided for backward compatibility with the 1.7 API.
2151 svn_client_commit5(const apr_array_header_t *targets,
2153 svn_boolean_t keep_locks,
2154 svn_boolean_t keep_changelists,
2155 svn_boolean_t commit_as_operations,
2156 const apr_array_header_t *changelists,
2157 const apr_hash_t *revprop_table,
2158 svn_commit_callback2_t commit_callback,
2160 svn_client_ctx_t *ctx,
2164 * Similar to svn_client_commit5(), but returns the commit info in
2165 * @a *commit_info_p rather than through a callback function. Does not use
2166 * #svn_wc_notify_commit_copied or #svn_wc_notify_commit_copied_replaced
2167 * (preferring #svn_wc_notify_commit_added and
2168 * #svn_wc_notify_commit_replaced, respectively, instead).
2170 * Also, if no error is returned and @a (*commit_info_p)->revision is set to
2171 * #SVN_INVALID_REVNUM, then the commit was a no-op; nothing needed to
2174 * Sets @a commit_as_operations to FALSE to match Subversion 1.6's behavior.
2176 * @since New in 1.5.
2177 * @deprecated Provided for backward compatibility with the 1.6 API.
2181 svn_client_commit4(svn_commit_info_t **commit_info_p,
2182 const apr_array_header_t *targets,
2184 svn_boolean_t keep_locks,
2185 svn_boolean_t keep_changelists,
2186 const apr_array_header_t *changelists,
2187 const apr_hash_t *revprop_table,
2188 svn_client_ctx_t *ctx,
2192 * Similar to svn_client_commit4(), but always with NULL for
2193 * @a changelist_name, FALSE for @a keep_changelist, NULL for @a
2194 * revprop_table, and @a depth set according to @a recurse: if @a
2195 * recurse is TRUE, use #svn_depth_infinity, else #svn_depth_empty.
2197 * @deprecated Provided for backward compatibility with the 1.4 API.
2199 * @since New in 1.3.
2203 svn_client_commit3(svn_commit_info_t **commit_info_p,
2204 const apr_array_header_t *targets,
2205 svn_boolean_t recurse,
2206 svn_boolean_t keep_locks,
2207 svn_client_ctx_t *ctx,
2211 * Similar to svn_client_commit3(), but uses #svn_client_commit_info_t
2212 * for @a commit_info_p.
2214 * @deprecated Provided for backward compatibility with the 1.2 API.
2216 * @since New in 1.2.
2220 svn_client_commit2(svn_client_commit_info_t **commit_info_p,
2221 const apr_array_header_t *targets,
2222 svn_boolean_t recurse,
2223 svn_boolean_t keep_locks,
2224 svn_client_ctx_t *ctx,
2228 * Similar to svn_client_commit2(), but with @a keep_locks set to
2229 * TRUE and @a nonrecursive instead of @a recurse.
2231 * @deprecated Provided for backward compatibility with the 1.1 API.
2235 svn_client_commit(svn_client_commit_info_t **commit_info_p,
2236 const apr_array_header_t *targets,
2237 svn_boolean_t nonrecursive,
2238 svn_client_ctx_t *ctx,
2244 * @defgroup Status Report interesting information about paths in the \
2251 * Structure for holding the "status" of a working copy item.
2253 * @note Fields may be added to the end of this structure in future
2254 * versions. Therefore, to preserve binary compatibility, users
2255 * should not directly allocate structures of this type.
2257 * @since New in 1.7.
2259 typedef struct svn_client_status_t
2261 /** The kind of node as recorded in the working copy */
2262 svn_node_kind_t kind;
2264 /** The absolute path to the node */
2265 const char *local_abspath;
2267 /** The actual size of the working file on disk, or SVN_INVALID_FILESIZE
2268 * if unknown (or if the item isn't a file at all). */
2269 svn_filesize_t filesize;
2271 /** If the path is under version control, versioned is TRUE, otherwise
2273 svn_boolean_t versioned;
2275 /** Set to TRUE if the node is the victim of some kind of conflict. */
2276 svn_boolean_t conflicted;
2278 /** The status of the node, based on the restructuring changes and if the
2279 * node has no restructuring changes the text and prop status. */
2280 enum svn_wc_status_kind node_status;
2282 /** The status of the text of the node, not including restructuring changes.
2283 * Valid values are: svn_wc_status_none, svn_wc_status_normal,
2284 * svn_wc_status_modified and svn_wc_status_conflicted. */
2285 enum svn_wc_status_kind text_status;
2287 /** The status of the node's properties.
2288 * Valid values are: svn_wc_status_none, svn_wc_status_normal,
2289 * svn_wc_status_modified and svn_wc_status_conflicted. */
2290 enum svn_wc_status_kind prop_status;
2292 /** A node can be 'locked' if a working copy update is in progress or
2293 * was interrupted. */
2294 svn_boolean_t wc_is_locked;
2296 /** A file or directory can be 'copied' if it's scheduled for
2297 * addition-with-history (or part of a subtree that is scheduled as such.).
2299 svn_boolean_t copied;
2301 /** The URL of the repository root. */
2302 const char *repos_root_url;
2304 /** The UUID of the repository */
2305 const char *repos_uuid;
2307 /** The in-repository path relative to the repository root. */
2308 const char *repos_relpath;
2310 /** Base revision. */
2311 svn_revnum_t revision;
2313 /** Last revision this was changed */
2314 svn_revnum_t changed_rev;
2316 /** Date of last commit. */
2317 apr_time_t changed_date;
2319 /** Last commit author of this item */
2320 const char *changed_author;
2322 /** A file or directory can be 'switched' if the switch command has been
2323 * used. If this is TRUE, then file_external will be FALSE.
2325 svn_boolean_t switched;
2327 /** If the item is a file that was added to the working copy with an
2328 * svn:externals; if file_external is TRUE, then switched is always
2331 svn_boolean_t file_external;
2333 /** The locally present lock. (Values of path, token, owner, comment and
2334 * are available if a lock is present) */
2335 const svn_lock_t *lock;
2337 /** Which changelist this item is part of, or NULL if not part of any. */
2338 const char *changelist;
2340 /** The depth of the node as recorded in the working copy
2341 * (#svn_depth_unknown for files or when no depth is recorded) */
2345 * @defgroup svn_wc_status_ood WC out-of-date info from the repository
2348 * When the working copy item is out-of-date compared to the
2349 * repository, the following fields represent the state of the
2350 * youngest revision of the item in the repository. If the working
2351 * copy is not out of date, the fields are initialized as described
2355 /** Set to the node kind of the youngest commit, or #svn_node_none
2356 * if not out of date. */
2357 svn_node_kind_t ood_kind;
2359 /** The status of the node, based on the text status if the node has no
2360 * restructuring changes */
2361 enum svn_wc_status_kind repos_node_status;
2363 /** The node's text status in the repository. */
2364 enum svn_wc_status_kind repos_text_status;
2366 /** The node's property status in the repository. */
2367 enum svn_wc_status_kind repos_prop_status;
2369 /** The node's lock in the repository, if any. */
2370 const svn_lock_t *repos_lock;
2372 /** Set to the youngest committed revision, or #SVN_INVALID_REVNUM
2373 * if not out of date. */
2374 svn_revnum_t ood_changed_rev;
2376 /** Set to the most recent commit date, or @c 0 if not out of date. */
2377 apr_time_t ood_changed_date;
2379 /** Set to the user name of the youngest commit, or @c NULL if not
2380 * out of date or non-existent. Because a non-existent @c
2381 * svn:author property has the same behavior as an out-of-date
2382 * working copy, examine @c ood_changed_rev to determine whether
2383 * the working copy is out of date. */
2384 const char *ood_changed_author;
2388 /** Reserved for libsvn_client's internal use; this value is only to be used
2389 * for libsvn_client backwards compatibility wrappers. This value may be NULL
2390 * or to other data in future versions. */
2391 const void *backwards_compatibility_baton;
2393 /** Set to the local absolute path that this node was moved from, if this
2394 * file or directory has been moved here locally and is the root of that
2395 * move. Otherwise set to NULL.
2397 * This will be NULL for moved-here nodes that are just part of a subtree
2398 * that was moved along (and are not themselves a root of a different move
2401 * @since New in 1.8. */
2402 const char *moved_from_abspath;
2404 /** Set to the local absolute path that this node was moved to, if this file
2405 * or directory has been moved away locally and corresponds to the root
2406 * of the destination side of the move. Otherwise set to NULL.
2408 * Note: Saying just "root" here could be misleading. For example:
2411 * creates a situation where A/B is moved-to BB, but one could argue that
2412 * the move source's root actually was AA/B. Note that, as far as the
2413 * working copy is concerned, above case is exactly identical to:
2416 * In both situations, @a moved_to_abspath would be set for nodes A (moved
2417 * to AA) and A/B (moved to BB), only.
2419 * This will be NULL for moved-away nodes that were just part of a subtree
2420 * that was moved along (and are not themselves a root of a different move
2423 * @since New in 1.8. */
2424 const char *moved_to_abspath;
2426 /* NOTE! Please update svn_client_status_dup() when adding new fields here. */
2427 } svn_client_status_t;
2430 * Return a duplicate of @a status, allocated in @a result_pool. No part of the new
2431 * structure will be shared with @a status.
2433 * @since New in 1.7.
2435 svn_client_status_t *
2436 svn_client_status_dup(const svn_client_status_t *status,
2437 apr_pool_t *result_pool);
2440 * A callback for reporting a @a status about @a path (which may be an
2441 * absolute or relative path).
2443 * @a baton is a closure object; it should be provided by the
2444 * implementation, and passed by the caller.
2446 * @a scratch_pool will be cleared between invocations to the callback.
2448 * @since New in 1.7.
2450 typedef svn_error_t *(*svn_client_status_func_t)(
2453 const svn_client_status_t *status,
2454 apr_pool_t *scratch_pool);
2457 * Given @a path to a working copy directory (or single file), call
2458 * @a status_func/status_baton with a set of #svn_wc_status_t *
2459 * structures which describe the status of @a path, and its children
2460 * (recursing according to @a depth).
2462 * - If @a get_all is set, retrieve all entries; otherwise,
2463 * retrieve only "interesting" entries (local mods and/or
2466 * - If @a update is set, contact the repository and augment the
2467 * status structures with information about out-of-dateness (with
2468 * respect to @a revision). Also, if @a result_rev is not @c NULL,
2469 * set @a *result_rev to the actual revision against which the
2470 * working copy was compared (@a *result_rev is not meaningful unless
2471 * @a update is set).
2473 * If @a no_ignore is @c FALSE, don't report any file or directory (or
2474 * recurse into any directory) that is found by recursion (as opposed to
2475 * being the explicit target @a path) and whose name matches the
2476 * svn:ignore property on its parent directory or the global-ignores
2477 * list in @a ctx->config. If @a no_ignore is @c TRUE, report each such
2478 * file or directory with the status code #svn_wc_status_ignored.
2480 * If @a ignore_externals is not set, then recurse into externals
2481 * definitions (if any exist) after handling the main target. This
2482 * calls the client notification function (in @a ctx) with the
2483 * #svn_wc_notify_status_external action before handling each externals
2484 * definition, and with #svn_wc_notify_status_completed
2487 * If @a depth_as_sticky is set and @a depth is not
2488 * #svn_depth_unknown, then the status is calculated as if depth_is_sticky
2489 * was passed to an equivalent update command.
2491 * @a changelists is an array of <tt>const char *</tt> changelist
2492 * names, used as a restrictive filter on items whose statuses are
2493 * reported; that is, don't report status about any item unless
2494 * it's a member of one of those changelists. If @a changelists is
2495 * empty (or altogether @c NULL), no changelist filtering occurs.
2497 * If @a path is an absolute path then the @c path parameter passed in each
2498 * call to @a status_func will be an absolute path.
2500 * All temporary allocations are performed in @a scratch_pool.
2502 * @since New in 1.7.
2505 svn_client_status5(svn_revnum_t *result_rev,
2506 svn_client_ctx_t *ctx,
2508 const svn_opt_revision_t *revision,
2510 svn_boolean_t get_all,
2511 svn_boolean_t update,
2512 svn_boolean_t no_ignore,
2513 svn_boolean_t ignore_externals,
2514 svn_boolean_t depth_as_sticky,
2515 const apr_array_header_t *changelists,
2516 svn_client_status_func_t status_func,
2518 apr_pool_t *scratch_pool);
2521 * Same as svn_client_status5(), but using #svn_wc_status_func3_t
2522 * instead of #svn_client_status_func_t and depth_as_sticky set to TRUE.
2524 * @since New in 1.6.
2525 * @deprecated Provided for backward compatibility with the 1.6 API.
2529 svn_client_status4(svn_revnum_t *result_rev,
2531 const svn_opt_revision_t *revision,
2532 svn_wc_status_func3_t status_func,
2535 svn_boolean_t get_all,
2536 svn_boolean_t update,
2537 svn_boolean_t no_ignore,
2538 svn_boolean_t ignore_externals,
2539 const apr_array_header_t *changelists,
2540 svn_client_ctx_t *ctx,
2544 * Same as svn_client_status4(), but using an #svn_wc_status_func2_t
2545 * instead of an #svn_wc_status_func3_t.
2547 * @since New in 1.5.
2548 * @deprecated Provided for backward compatibility with the 1.5 API.
2552 svn_client_status3(svn_revnum_t *result_rev,
2554 const svn_opt_revision_t *revision,
2555 svn_wc_status_func2_t status_func,
2558 svn_boolean_t get_all,
2559 svn_boolean_t update,
2560 svn_boolean_t no_ignore,
2561 svn_boolean_t ignore_externals,
2562 const apr_array_header_t *changelists,
2563 svn_client_ctx_t *ctx,
2567 * Like svn_client_status3(), except with @a changelists passed as @c
2568 * NULL, and with @a recurse instead of @a depth. If @a recurse is
2569 * TRUE, behave as if for #svn_depth_infinity; else if @a recurse is
2570 * FALSE, behave as if for #svn_depth_immediates.
2572 * @since New in 1.2.
2573 * @deprecated Provided for backward compatibility with the 1.4 API.
2577 svn_client_status2(svn_revnum_t *result_rev,
2579 const svn_opt_revision_t *revision,
2580 svn_wc_status_func2_t status_func,
2582 svn_boolean_t recurse,
2583 svn_boolean_t get_all,
2584 svn_boolean_t update,
2585 svn_boolean_t no_ignore,
2586 svn_boolean_t ignore_externals,
2587 svn_client_ctx_t *ctx,
2592 * Similar to svn_client_status2(), but with @a ignore_externals
2593 * always set to FALSE, taking the #svn_wc_status_func_t type
2594 * instead of the #svn_wc_status_func2_t type for @a status_func,
2595 * and requiring @a *revision to be non-const even though it is
2596 * treated as constant.
2598 * @deprecated Provided for backward compatibility with the 1.1 API.
2602 svn_client_status(svn_revnum_t *result_rev,
2604 svn_opt_revision_t *revision,
2605 svn_wc_status_func_t status_func,
2607 svn_boolean_t recurse,
2608 svn_boolean_t get_all,
2609 svn_boolean_t update,
2610 svn_boolean_t no_ignore,
2611 svn_client_ctx_t *ctx,
2617 * @defgroup Log View information about previous revisions of an object.
2623 * Invoke @a receiver with @a receiver_baton on each log message from
2624 * each (#svn_opt_revision_range_t *) range in @a revision_ranges in turn,
2625 * inclusive (but never invoke @a receiver on a given log message more
2628 * @a targets contains either a URL followed by zero or more relative
2629 * paths, or 1 working copy path, as <tt>const char *</tt>, for which log
2630 * messages are desired. @a receiver is invoked only on messages whose
2631 * revisions involved a change to some path in @a targets. @a peg_revision
2632 * indicates in which revision @a targets are valid. If @a peg_revision is
2633 * #svn_opt_revision_unspecified, it defaults to #svn_opt_revision_head
2634 * for URLs or #svn_opt_revision_working for WC paths.
2636 * If @a limit is non-zero only invoke @a receiver on the first @a limit
2639 * If @a discover_changed_paths is set, then the @c changed_paths and @c
2640 * changed_paths2 fields in the @c log_entry argument to @a receiver will be
2641 * populated on each invocation. @note The @c text_modified and @c
2642 * props_modified fields of the changed paths structure may have the value
2643 * #svn_tristate_unknown if the repository does not report that information.
2645 * If @a strict_node_history is set, copy history (if any exists) will
2646 * not be traversed while harvesting revision logs for each target.
2648 * If @a include_merged_revisions is set, log information for revisions
2649 * which have been merged to @a targets will also be returned.
2651 * If @a revprops is NULL, retrieve all revision properties; else, retrieve
2652 * only the revision properties named by the (const char *) array elements
2653 * (i.e. retrieve none if the array is empty).
2655 * Use @a pool for any temporary allocation.
2657 * If @a ctx->notify_func2 is non-NULL, then call @a ctx->notify_func2/baton2
2658 * with a 'skip' signal on any unversioned targets.
2660 * @since New in 1.6.
2663 svn_client_log5(const apr_array_header_t *targets,
2664 const svn_opt_revision_t *peg_revision,
2665 const apr_array_header_t *revision_ranges,
2667 svn_boolean_t discover_changed_paths,
2668 svn_boolean_t strict_node_history,
2669 svn_boolean_t include_merged_revisions,
2670 const apr_array_header_t *revprops,
2671 svn_log_entry_receiver_t receiver,
2672 void *receiver_baton,
2673 svn_client_ctx_t *ctx,
2677 * Similar to svn_client_log5(), but takes explicit start and end parameters
2678 * instead of an array of revision ranges.
2680 * @deprecated Provided for compatibility with the 1.5 API.
2681 * @since New in 1.5.
2685 svn_client_log4(const apr_array_header_t *targets,
2686 const svn_opt_revision_t *peg_revision,
2687 const svn_opt_revision_t *start,
2688 const svn_opt_revision_t *end,
2690 svn_boolean_t discover_changed_paths,
2691 svn_boolean_t strict_node_history,
2692 svn_boolean_t include_merged_revisions,
2693 const apr_array_header_t *revprops,
2694 svn_log_entry_receiver_t receiver,
2695 void *receiver_baton,
2696 svn_client_ctx_t *ctx,
2700 * Similar to svn_client_log4(), but using #svn_log_message_receiver_t
2701 * instead of #svn_log_entry_receiver_t. Also, @a
2702 * include_merged_revisions is set to @c FALSE and @a revprops is
2703 * svn:author, svn:date, and svn:log.
2705 * @deprecated Provided for compatibility with the 1.4 API.
2706 * @since New in 1.4.
2710 svn_client_log3(const apr_array_header_t *targets,
2711 const svn_opt_revision_t *peg_revision,
2712 const svn_opt_revision_t *start,
2713 const svn_opt_revision_t *end,
2715 svn_boolean_t discover_changed_paths,
2716 svn_boolean_t strict_node_history,
2717 svn_log_message_receiver_t receiver,
2718 void *receiver_baton,
2719 svn_client_ctx_t *ctx,
2724 * Similar to svn_client_log3(), but with the @c kind field of
2725 * @a peg_revision set to #svn_opt_revision_unspecified.
2728 * A special case for the revision range HEAD:1, which was present
2729 * in svn_client_log(), has been removed from svn_client_log2(). Instead, it
2730 * is expected that callers will specify the range HEAD:0, to avoid a
2731 * #SVN_ERR_FS_NO_SUCH_REVISION error when invoked against an empty repository
2732 * (i.e. one not containing a revision 1).
2734 * @deprecated Provided for compatibility with the 1.3 API.
2735 * @since New in 1.2.
2739 svn_client_log2(const apr_array_header_t *targets,
2740 const svn_opt_revision_t *start,
2741 const svn_opt_revision_t *end,
2743 svn_boolean_t discover_changed_paths,
2744 svn_boolean_t strict_node_history,
2745 svn_log_message_receiver_t receiver,
2746 void *receiver_baton,
2747 svn_client_ctx_t *ctx,
2752 * Similar to svn_client_log2(), but with @a limit set to 0, and the
2753 * following special case:
2755 * Special case for repositories at revision 0:
2757 * If @a start->kind is #svn_opt_revision_head, and @a end->kind is
2758 * #svn_opt_revision_number && @a end->number is @c 1, then handle an
2759 * empty (no revisions) repository specially: instead of erroring
2760 * because requested revision 1 when the highest revision is 0, just
2761 * invoke @a receiver on revision 0, passing @c NULL for changed paths and
2762 * empty strings for the author and date. This is because that
2763 * particular combination of @a start and @a end usually indicates the
2764 * common case of log invocation -- the user wants to see all log
2765 * messages from youngest to oldest, where the oldest commit is
2766 * revision 1. That works fine, except when there are no commits in
2767 * the repository, hence this special case.
2769 * @deprecated Provided for backward compatibility with the 1.1 API.
2773 svn_client_log(const apr_array_header_t *targets,
2774 const svn_opt_revision_t *start,
2775 const svn_opt_revision_t *end,
2776 svn_boolean_t discover_changed_paths,
2777 svn_boolean_t strict_node_history,
2778 svn_log_message_receiver_t receiver,
2779 void *receiver_baton,
2780 svn_client_ctx_t *ctx,
2786 * @defgroup Blame Show modification information about lines in a file.
2792 * Invoke @a receiver with @a receiver_baton on each line-blame item
2793 * associated with revision @a end of @a path_or_url, using @a start
2794 * as the default source of all blame. @a peg_revision indicates in
2795 * which revision @a path_or_url is valid. If @a peg_revision->kind
2796 * is #svn_opt_revision_unspecified, then it defaults to
2797 * #svn_opt_revision_head for URLs or #svn_opt_revision_working for
2800 * If @a start->kind or @a end->kind is #svn_opt_revision_unspecified,
2801 * return the error #SVN_ERR_CLIENT_BAD_REVISION. If either are
2802 * #svn_opt_revision_working, return the error
2803 * #SVN_ERR_UNSUPPORTED_FEATURE. If any of the revisions of @a
2804 * path_or_url have a binary mime-type, return the error
2805 * #SVN_ERR_CLIENT_IS_BINARY_FILE, unless @a ignore_mime_type is TRUE,
2806 * in which case blame information will be generated regardless of the
2807 * MIME types of the revisions.
2809 * Use @a diff_options to determine how to compare different revisions of the
2812 * If @a include_merged_revisions is TRUE, also return data based upon
2813 * revisions which have been merged to @a path_or_url.
2815 * Use @a pool for any temporary allocation.
2817 * @since New in 1.7.
2820 svn_client_blame5(const char *path_or_url,
2821 const svn_opt_revision_t *peg_revision,
2822 const svn_opt_revision_t *start,
2823 const svn_opt_revision_t *end,
2824 const svn_diff_file_options_t *diff_options,
2825 svn_boolean_t ignore_mime_type,
2826 svn_boolean_t include_merged_revisions,
2827 svn_client_blame_receiver3_t receiver,
2828 void *receiver_baton,
2829 svn_client_ctx_t *ctx,
2834 * Similar to svn_client_blame5(), but with #svn_client_blame_receiver3_t
2837 * @deprecated Provided for backwards compatibility with the 1.6 API.
2839 * @since New in 1.5.
2843 svn_client_blame4(const char *path_or_url,
2844 const svn_opt_revision_t *peg_revision,
2845 const svn_opt_revision_t *start,
2846 const svn_opt_revision_t *end,
2847 const svn_diff_file_options_t *diff_options,
2848 svn_boolean_t ignore_mime_type,
2849 svn_boolean_t include_merged_revisions,
2850 svn_client_blame_receiver2_t receiver,
2851 void *receiver_baton,
2852 svn_client_ctx_t *ctx,
2856 * Similar to svn_client_blame4(), but with @a include_merged_revisions set
2857 * to FALSE, and using a #svn_client_blame_receiver2_t as the receiver.
2859 * @deprecated Provided for backwards compatibility with the 1.4 API.
2861 * @since New in 1.4.
2865 svn_client_blame3(const char *path_or_url,
2866 const svn_opt_revision_t *peg_revision,
2867 const svn_opt_revision_t *start,
2868 const svn_opt_revision_t *end,
2869 const svn_diff_file_options_t *diff_options,
2870 svn_boolean_t ignore_mime_type,
2871 svn_client_blame_receiver_t receiver,
2872 void *receiver_baton,
2873 svn_client_ctx_t *ctx,
2877 * Similar to svn_client_blame3(), but with @a diff_options set to
2878 * default options as returned by svn_diff_file_options_parse() and
2879 * @a ignore_mime_type set to FALSE.
2881 * @deprecated Provided for backwards compatibility with the 1.3 API.
2883 * @since New in 1.2.
2887 svn_client_blame2(const char *path_or_url,
2888 const svn_opt_revision_t *peg_revision,
2889 const svn_opt_revision_t *start,
2890 const svn_opt_revision_t *end,
2891 svn_client_blame_receiver_t receiver,
2892 void *receiver_baton,
2893 svn_client_ctx_t *ctx,
2897 * Similar to svn_client_blame2() except that @a peg_revision is always
2898 * the same as @a end.
2900 * @deprecated Provided for backward compatibility with the 1.1 API.
2904 svn_client_blame(const char *path_or_url,
2905 const svn_opt_revision_t *start,
2906 const svn_opt_revision_t *end,
2907 svn_client_blame_receiver_t receiver,
2908 void *receiver_baton,
2909 svn_client_ctx_t *ctx,
2915 * @defgroup Diff Generate differences between paths.
2921 * Produce diff output which describes the delta between
2922 * @a path_or_url1/@a revision1 and @a path_or_url2/@a revision2. Print
2923 * the output of the diff to @a outstream, and any errors to @a
2924 * errstream. @a path_or_url1 and @a path_or_url2 can be either
2925 * working-copy paths or URLs.
2927 * If @a relative_to_dir is not @c NULL, the original path and
2928 * modified path will have the @a relative_to_dir stripped from the
2929 * front of the respective paths. If @a relative_to_dir is @c NULL,
2930 * paths will not be modified. If @a relative_to_dir is not
2931 * @c NULL but @a relative_to_dir is not a parent path of the target,
2932 * an error is returned. Finally, if @a relative_to_dir is a URL, an
2933 * error will be returned.
2935 * If either @a revision1 or @a revision2 has an `unspecified' or
2936 * unrecognized `kind', return #SVN_ERR_CLIENT_BAD_REVISION.
2938 * @a path_or_url1 and @a path_or_url2 must both represent the same node
2939 * kind -- that is, if @a path_or_url1 is a directory, @a path_or_url2
2940 * must also be, and if @a path_or_url1 is a file, @a path_or_url2 must
2943 * If @a depth is #svn_depth_infinity, diff fully recursively.
2944 * Else if it is #svn_depth_immediates, diff the named paths and
2945 * their file children (if any), and diff properties of
2946 * subdirectories, but do not descend further into the subdirectories.
2947 * Else if #svn_depth_files, behave as if for #svn_depth_immediates
2948 * except don't diff properties of subdirectories. If
2949 * #svn_depth_empty, diff exactly the named paths but nothing
2952 * Use @a ignore_ancestry to control whether or not items being
2953 * diffed will be checked for relatedness first. Unrelated items
2954 * are typically transmitted to the editor as a deletion of one thing
2955 * and the addition of another, but if this flag is TRUE, unrelated
2956 * items will be diffed as if they were related.
2958 * If @a no_diff_added is TRUE, then no diff output will be generated
2961 * If @a no_diff_deleted is TRUE, then no diff output will be
2962 * generated on deleted files.
2964 * If @a show_copies_as_adds is TRUE, then copied files will not be diffed
2965 * against their copyfrom source, and will appear in the diff output
2966 * in their entirety, as if they were newly added.
2967 * ### BUGS: For a repos-repos diff, this is ignored. Instead, a file is
2968 * diffed against its copyfrom source iff the file is the diff target
2969 * and not if some parent directory is the diff target. For a repos-WC
2970 * diff, this is ignored if the file is the diff target.
2972 * If @a use_git_diff_format is TRUE, then the git's extended diff format
2974 * ### Do we need to say more about the format? A reference perhaps?
2976 * If @a ignore_properties is TRUE, do not show property differences.
2977 * If @a properties_only is TRUE, show only property changes.
2978 * The above two options are mutually exclusive. It is an error to set
2981 * Generated headers are encoded using @a header_encoding.
2983 * Diff output will not be generated for binary files, unless @a
2984 * ignore_content_type is TRUE, in which case diffs will be shown
2985 * regardless of the content types.
2987 * @a diff_options (an array of <tt>const char *</tt>) is used to pass
2988 * additional command line options to the diff processes invoked to compare
2989 * files. @a diff_options is allowed to be @c NULL, in which case a value
2990 * for this option might still be obtained from the Subversion configuration
2991 * file via client context @a ctx.
2993 * The authentication baton cached in @a ctx is used to communicate with
2996 * @a changelists is an array of <tt>const char *</tt> changelist
2997 * names, used as a restrictive filter on items whose differences are
2998 * reported; that is, don't generate diffs about any item unless
2999 * it's a member of one of those changelists. If @a changelists is
3000 * empty (or altogether @c NULL), no changelist filtering occurs.
3002 * @note Changelist filtering only applies to diffs in which at least
3003 * one side of the diff represents working copy data.
3005 * @note @a header_encoding doesn't affect headers generated by external
3008 * @note @a relative_to_dir doesn't affect the path index generated by
3009 * external diff programs.
3011 * @since New in 1.8.
3014 svn_client_diff6(const apr_array_header_t *diff_options,
3015 const char *path_or_url1,
3016 const svn_opt_revision_t *revision1,
3017 const char *path_or_url2,
3018 const svn_opt_revision_t *revision2,
3019 const char *relative_to_dir,
3021 svn_boolean_t ignore_ancestry,
3022 svn_boolean_t no_diff_added,
3023 svn_boolean_t no_diff_deleted,
3024 svn_boolean_t show_copies_as_adds,
3025 svn_boolean_t ignore_content_type,
3026 svn_boolean_t ignore_properties,
3027 svn_boolean_t properties_only,
3028 svn_boolean_t use_git_diff_format,
3029 const char *header_encoding,
3030 svn_stream_t *outstream,
3031 svn_stream_t *errstream,
3032 const apr_array_header_t *changelists,
3033 svn_client_ctx_t *ctx,
3036 /** Similar to svn_client_diff6(), but with @a outfile and @a errfile,
3037 * instead of @a outstream and @a errstream, and with @a
3038 * no_diff_added, @a ignore_properties, and @a properties_only always
3039 * passed as @c FALSE (which means that additions and property changes
3040 * are always transmitted).
3042 * @deprecated Provided for backward compatibility with the 1.7 API.
3043 * @since New in 1.7.
3047 svn_client_diff5(const apr_array_header_t *diff_options,
3049 const svn_opt_revision_t *revision1,
3051 const svn_opt_revision_t *revision2,
3052 const char *relative_to_dir,
3054 svn_boolean_t ignore_ancestry,
3055 svn_boolean_t no_diff_deleted,
3056 svn_boolean_t show_copies_as_adds,
3057 svn_boolean_t ignore_content_type,
3058 svn_boolean_t use_git_diff_format,
3059 const char *header_encoding,
3060 apr_file_t *outfile,
3061 apr_file_t *errfile,
3062 const apr_array_header_t *changelists,
3063 svn_client_ctx_t *ctx,
3067 * Similar to svn_client_diff5(), but with @a show_copies_as_adds set to
3068 * @c FALSE and @a use_git_diff_format set to @c FALSE.
3070 * @deprecated Provided for backward compatibility with the 1.6 API.
3071 * @since New in 1.5.
3075 svn_client_diff4(const apr_array_header_t *diff_options,
3077 const svn_opt_revision_t *revision1,
3079 const svn_opt_revision_t *revision2,
3080 const char *relative_to_dir,
3082 svn_boolean_t ignore_ancestry,
3083 svn_boolean_t no_diff_deleted,
3084 svn_boolean_t ignore_content_type,
3085 const char *header_encoding,
3086 apr_file_t *outfile,
3087 apr_file_t *errfile,
3088 const apr_array_header_t *changelists,
3089 svn_client_ctx_t *ctx,
3093 * Similar to svn_client_diff4(), but with @a changelists passed as @c
3094 * NULL, and @a depth set according to @a recurse: if @a recurse is
3095 * TRUE, set @a depth to #svn_depth_infinity, if @a recurse is
3096 * FALSE, set @a depth to #svn_depth_empty.
3098 * @deprecated Provided for backward compatibility with the 1.4 API.
3099 * @since New in 1.3.
3103 svn_client_diff3(const apr_array_header_t *diff_options,
3105 const svn_opt_revision_t *revision1,
3107 const svn_opt_revision_t *revision2,
3108 svn_boolean_t recurse,
3109 svn_boolean_t ignore_ancestry,
3110 svn_boolean_t no_diff_deleted,
3111 svn_boolean_t ignore_content_type,
3112 const char *header_encoding,
3113 apr_file_t *outfile,
3114 apr_file_t *errfile,
3115 svn_client_ctx_t *ctx,
3120 * Similar to svn_client_diff3(), but with @a header_encoding set to
3121 * @c APR_LOCALE_CHARSET.
3123 * @deprecated Provided for backward compatibility with the 1.2 API.
3124 * @since New in 1.2.
3128 svn_client_diff2(const apr_array_header_t *diff_options,
3130 const svn_opt_revision_t *revision1,
3132 const svn_opt_revision_t *revision2,
3133 svn_boolean_t recurse,
3134 svn_boolean_t ignore_ancestry,
3135 svn_boolean_t no_diff_deleted,
3136 svn_boolean_t ignore_content_type,
3137 apr_file_t *outfile,
3138 apr_file_t *errfile,
3139 svn_client_ctx_t *ctx,
3143 * Similar to svn_client_diff2(), but with @a ignore_content_type
3144 * always set to FALSE.
3146 * @deprecated Provided for backward compatibility with the 1.1 API.
3150 svn_client_diff(const apr_array_header_t *diff_options,
3152 const svn_opt_revision_t *revision1,
3154 const svn_opt_revision_t *revision2,
3155 svn_boolean_t recurse,
3156 svn_boolean_t ignore_ancestry,
3157 svn_boolean_t no_diff_deleted,
3158 apr_file_t *outfile,
3159 apr_file_t *errfile,
3160 svn_client_ctx_t *ctx,
3164 * Produce diff output which describes the delta between the filesystem
3165 * object @a path_or_url in peg revision @a peg_revision, as it changed
3166 * between @a start_revision and @a end_revision. @a path_or_url can
3167 * be either a working-copy path or URL.
3169 * If @a peg_revision is #svn_opt_revision_unspecified, behave
3170 * identically to svn_client_diff6(), using @a path_or_url for both of that
3171 * function's @a path_or_url1 and @a path_or_url2 arguments.
3173 * All other options are handled identically to svn_client_diff6().
3175 * @since New in 1.8.
3178 svn_client_diff_peg6(const apr_array_header_t *diff_options,
3179 const char *path_or_url,
3180 const svn_opt_revision_t *peg_revision,
3181 const svn_opt_revision_t *start_revision,
3182 const svn_opt_revision_t *end_revision,
3183 const char *relative_to_dir,
3185 svn_boolean_t ignore_ancestry,
3186 svn_boolean_t no_diff_added,
3187 svn_boolean_t no_diff_deleted,
3188 svn_boolean_t show_copies_as_adds,
3189 svn_boolean_t ignore_content_type,
3190 svn_boolean_t ignore_properties,
3191 svn_boolean_t properties_only,
3192 svn_boolean_t use_git_diff_format,
3193 const char *header_encoding,
3194 svn_stream_t *outstream,
3195 svn_stream_t *errstream,
3196 const apr_array_header_t *changelists,
3197 svn_client_ctx_t *ctx,
3200 /** Similar to svn_client_diff6_peg6(), but with @a outfile and @a errfile,
3201 * instead of @a outstream and @a errstream, and with @a
3202 * no_diff_added, @a ignore_properties, and @a properties_only always
3203 * passed as @c FALSE (which means that additions and property changes
3204 * are always transmitted).
3206 * @deprecated Provided for backward compatibility with the 1.7 API.
3207 * @since New in 1.7.
3211 svn_client_diff_peg5(const apr_array_header_t *diff_options,
3213 const svn_opt_revision_t *peg_revision,
3214 const svn_opt_revision_t *start_revision,
3215 const svn_opt_revision_t *end_revision,
3216 const char *relative_to_dir,
3218 svn_boolean_t ignore_ancestry,
3219 svn_boolean_t no_diff_deleted,
3220 svn_boolean_t show_copies_as_adds,
3221 svn_boolean_t ignore_content_type,
3222 svn_boolean_t use_git_diff_format,
3223 const char *header_encoding,
3224 apr_file_t *outfile,
3225 apr_file_t *errfile,
3226 const apr_array_header_t *changelists,
3227 svn_client_ctx_t *ctx,
3231 * Similar to svn_client_diff_peg5(), but with @a show_copies_as_adds set to
3232 * @c FALSE and @a use_git_diff_format set to @c FALSE.
3234 * @since New in 1.5.
3235 * @deprecated Provided for backward compatibility with the 1.6 API.
3239 svn_client_diff_peg4(const apr_array_header_t *diff_options,
3241 const svn_opt_revision_t *peg_revision,
3242 const svn_opt_revision_t *start_revision,
3243 const svn_opt_revision_t *end_revision,
3244 const char *relative_to_dir,
3246 svn_boolean_t ignore_ancestry,
3247 svn_boolean_t no_diff_deleted,
3248 svn_boolean_t ignore_content_type,
3249 const char *header_encoding,
3250 apr_file_t *outfile,
3251 apr_file_t *errfile,
3252 const apr_array_header_t *changelists,
3253 svn_client_ctx_t *ctx,
3257 * Similar to svn_client_diff_peg4(), but with @a changelists passed
3258 * as @c NULL, and @a depth set according to @a recurse: if @a recurse
3259 * is TRUE, set @a depth to #svn_depth_infinity, if @a recurse is
3260 * FALSE, set @a depth to #svn_depth_files.
3262 * @deprecated Provided for backward compatibility with the 1.4 API.
3263 * @since New in 1.3.
3267 svn_client_diff_peg3(const apr_array_header_t *diff_options,
3269 const svn_opt_revision_t *peg_revision,
3270 const svn_opt_revision_t *start_revision,
3271 const svn_opt_revision_t *end_revision,
3272 svn_boolean_t recurse,
3273 svn_boolean_t ignore_ancestry,
3274 svn_boolean_t no_diff_deleted,
3275 svn_boolean_t ignore_content_type,
3276 const char *header_encoding,
3277 apr_file_t *outfile,
3278 apr_file_t *errfile,
3279 svn_client_ctx_t *ctx,
3283 * Similar to svn_client_diff_peg3(), but with @a header_encoding set to
3284 * @c APR_LOCALE_CHARSET.
3286 * @deprecated Provided for backward compatibility with the 1.2 API.
3287 * @since New in 1.2.
3291 svn_client_diff_peg2(const apr_array_header_t *diff_options,
3293 const svn_opt_revision_t *peg_revision,
3294 const svn_opt_revision_t *start_revision,
3295 const svn_opt_revision_t *end_revision,
3296 svn_boolean_t recurse,
3297 svn_boolean_t ignore_ancestry,
3298 svn_boolean_t no_diff_deleted,
3299 svn_boolean_t ignore_content_type,
3300 apr_file_t *outfile,
3301 apr_file_t *errfile,
3302 svn_client_ctx_t *ctx,
3306 * Similar to svn_client_diff_peg2(), but with @a ignore_content_type
3307 * always set to FALSE.
3309 * @since New in 1.1.
3310 * @deprecated Provided for backward compatibility with the 1.1 API.
3314 svn_client_diff_peg(const apr_array_header_t *diff_options,
3316 const svn_opt_revision_t *peg_revision,
3317 const svn_opt_revision_t *start_revision,
3318 const svn_opt_revision_t *end_revision,
3319 svn_boolean_t recurse,
3320 svn_boolean_t ignore_ancestry,
3321 svn_boolean_t no_diff_deleted,
3322 apr_file_t *outfile,
3323 apr_file_t *errfile,
3324 svn_client_ctx_t *ctx,
3328 * Produce a diff summary which lists the changed items between
3329 * @a path_or_url1/@a revision1 and @a path_or_url2/@a revision2 without
3330 * creating text deltas. @a path_or_url1 and @a path_or_url2 can be
3331 * either working-copy paths or URLs.
3333 * The function may report false positives if @a ignore_ancestry is false,
3334 * since a file might have been modified between two revisions, but still
3335 * have the same contents.
3337 * Calls @a summarize_func with @a summarize_baton for each difference
3338 * with a #svn_client_diff_summarize_t structure describing the difference.
3340 * See svn_client_diff6() for a description of the other parameters.
3342 * @since New in 1.5.
3345 svn_client_diff_summarize2(const char *path_or_url1,
3346 const svn_opt_revision_t *revision1,
3347 const char *path_or_url2,
3348 const svn_opt_revision_t *revision2,
3350 svn_boolean_t ignore_ancestry,
3351 const apr_array_header_t *changelists,
3352 svn_client_diff_summarize_func_t summarize_func,
3353 void *summarize_baton,
3354 svn_client_ctx_t *ctx,
3358 * Similar to svn_client_diff_summarize2(), but with @a changelists
3359 * passed as @c NULL, and @a depth set according to @a recurse: if @a
3360 * recurse is TRUE, set @a depth to #svn_depth_infinity, if @a
3361 * recurse is FALSE, set @a depth to #svn_depth_files.
3363 * @deprecated Provided for backward compatibility with the 1.4 API.
3365 * @since New in 1.4.
3369 svn_client_diff_summarize(const char *path1,
3370 const svn_opt_revision_t *revision1,
3372 const svn_opt_revision_t *revision2,
3373 svn_boolean_t recurse,
3374 svn_boolean_t ignore_ancestry,
3375 svn_client_diff_summarize_func_t summarize_func,
3376 void *summarize_baton,
3377 svn_client_ctx_t *ctx,
3381 * Produce a diff summary which lists the changed items between the
3382 * filesystem object @a path_or_url in peg revision @a peg_revision, as it
3383 * changed between @a start_revision and @a end_revision. @a path_or_url can
3384 * be either a working-copy path or URL.
3386 * If @a peg_revision is #svn_opt_revision_unspecified, behave
3387 * identically to svn_client_diff_summarize2(), using @a path_or_url for
3388 * both of that function's @a path_or_url1 and @a path_or_url2 arguments.
3390 * The function may report false positives if @a ignore_ancestry is false,
3391 * as described in the documentation for svn_client_diff_summarize2().
3393 * Call @a summarize_func with @a summarize_baton for each difference
3394 * with a #svn_client_diff_summarize_t structure describing the difference.
3396 * See svn_client_diff_peg5() for a description of the other parameters.
3398 * @since New in 1.5.
3401 svn_client_diff_summarize_peg2(const char *path_or_url,
3402 const svn_opt_revision_t *peg_revision,
3403 const svn_opt_revision_t *start_revision,
3404 const svn_opt_revision_t *end_revision,
3406 svn_boolean_t ignore_ancestry,
3407 const apr_array_header_t *changelists,
3408 svn_client_diff_summarize_func_t summarize_func,
3409 void *summarize_baton,
3410 svn_client_ctx_t *ctx,
3414 * Similar to svn_client_diff_summarize_peg2(), but with @a
3415 * changelists passed as @c NULL, and @a depth set according to @a
3416 * recurse: if @a recurse is TRUE, set @a depth to
3417 * #svn_depth_infinity, if @a recurse is FALSE, set @a depth to
3420 * @deprecated Provided for backward compatibility with the 1.4 API.
3422 * @since New in 1.4.
3426 svn_client_diff_summarize_peg(const char *path,
3427 const svn_opt_revision_t *peg_revision,
3428 const svn_opt_revision_t *start_revision,
3429 const svn_opt_revision_t *end_revision,
3430 svn_boolean_t recurse,
3431 svn_boolean_t ignore_ancestry,
3432 svn_client_diff_summarize_func_t summarize_func,
3433 void *summarize_baton,
3434 svn_client_ctx_t *ctx,
3440 * @defgroup Merge Merge changes between branches.
3445 /** Get information about the state of merging between two branches.
3447 * The source is specified by @a source_path_or_url at @a source_revision.
3448 * The target is specified by @a target_path_or_url at @a target_revision,
3449 * which refers to either a WC or a repository location.
3451 * Set @a *needs_reintegration to true if an automatic merge from source
3452 * to target would be a reintegration merge: that is, if the last automatic
3453 * merge was in the opposite direction; or to false otherwise.
3455 * Set @a *yca_url, @a *yca_rev, @a *base_url, @a *base_rev, @a *right_url,
3456 * @a *right_rev, @a *target_url, @a *target_rev to the repository locations
3457 * of, respectively: the youngest common ancestor of the branches, the base
3458 * chosen for 3-way merge, the right-hand side of the source diff, and the
3461 * Set @a repos_root_url to the URL of the repository root. This is a
3462 * common prefix of all four URL outputs.
3464 * Allocate the results in @a result_pool. Any of the output pointers may
3465 * be NULL if not wanted.
3467 * @since New in 1.8.
3470 svn_client_get_merging_summary(svn_boolean_t *needs_reintegration,
3471 const char **yca_url, svn_revnum_t *yca_rev,
3472 const char **base_url, svn_revnum_t *base_rev,
3473 const char **right_url, svn_revnum_t *right_rev,
3474 const char **target_url, svn_revnum_t *target_rev,
3475 const char **repos_root_url,
3476 const char *source_path_or_url,
3477 const svn_opt_revision_t *source_revision,
3478 const char *target_path_or_url,
3479 const svn_opt_revision_t *target_revision,
3480 svn_client_ctx_t *ctx,
3481 apr_pool_t *result_pool,
3482 apr_pool_t *scratch_pool);
3485 /** Merge changes from @a source1/@a revision1 to @a source2/@a revision2 into
3486 * the working-copy path @a target_wcpath.
3488 * @a source1 and @a source2 are either URLs that refer to entries in the
3489 * repository, or paths to entries in the working copy.
3491 * By "merging", we mean: apply file differences using
3492 * svn_wc_merge(), and schedule additions & deletions when appropriate.
3494 * @a source1 and @a source2 must both represent the same node kind -- that
3495 * is, if @a source1 is a directory, @a source2 must also be, and if @a source1
3496 * is a file, @a source2 must also be.
3498 * If either @a revision1 or @a revision2 has an `unspecified' or
3499 * unrecognized `kind', return #SVN_ERR_CLIENT_BAD_REVISION.
3501 * If @a depth is #svn_depth_infinity, merge fully recursively.
3502 * Else if #svn_depth_immediates, merge changes at most to files
3503 * that are immediate children of @a target_wcpath and to directory
3504 * properties of @a target_wcpath and its immediate subdirectory children.
3505 * Else if #svn_depth_files, merge at most to immediate file
3506 * children of @a target_wcpath and to @a target_wcpath itself.
3507 * Else if #svn_depth_empty, apply changes only to @a target_wcpath
3508 * (i.e., directory property changes only)
3510 * If @a depth is #svn_depth_unknown, use the depth of @a target_wcpath.
3512 * If @a ignore_mergeinfo is true, disable merge tracking, by treating the
3513 * two sources as unrelated even if they actually have a common ancestor.
3515 * If @a diff_ignore_ancestry is true, diff unrelated nodes as if related:
3516 * that is, diff the 'left' and 'right' versions of a node as if they were
3517 * related (if they are the same kind) even if they are not related.
3518 * Otherwise, diff unrelated items as a deletion of one thing and the
3519 * addition of another.
3521 * If @a force_delete is false and the merge involves deleting a file whose
3522 * content differs from the source-left version, or a locally modified
3523 * directory, or an unversioned item, then the operation will fail. If
3524 * @a force_delete is true then all such items will be deleted.
3526 * @a merge_options (an array of <tt>const char *</tt>), if non-NULL,
3527 * is used to pass additional command line arguments to the merge
3528 * processes (internal or external). @see
3529 * svn_diff_file_options_parse().
3531 * If @a ctx->notify_func2 is non-NULL, then call @a ctx->notify_func2 with @a
3532 * ctx->notify_baton2 once for each merged target, passing the target's local
3535 * If @a record_only is TRUE, the merge is performed, but is limited only to
3536 * mergeinfo property changes on existing paths in @a target_wcpath.
3538 * If @a dry_run is TRUE, the merge is carried out, and full notification
3539 * feedback is provided, but the working copy is not modified.
3541 * If allow_mixed_rev is @c FALSE, and @a merge_target is a mixed-revision
3542 * working copy, raise @c SVN_ERR_CLIENT_MERGE_UPDATE_REQUIRED.
3543 * Because users rarely intend to merge into mixed-revision working copies,
3544 * it is recommended to set this parameter to FALSE by default unless the
3545 * user has explicitly requested a merge into a mixed-revision working copy.
3547 * The authentication baton cached in @a ctx is used to communicate with the
3550 * @since New in 1.8.
3553 svn_client_merge5(const char *source1,
3554 const svn_opt_revision_t *revision1,
3555 const char *source2,
3556 const svn_opt_revision_t *revision2,
3557 const char *target_wcpath,
3559 svn_boolean_t ignore_mergeinfo,
3560 svn_boolean_t diff_ignore_ancestry,
3561 svn_boolean_t force_delete,
3562 svn_boolean_t record_only,
3563 svn_boolean_t dry_run,
3564 svn_boolean_t allow_mixed_rev,
3565 const apr_array_header_t *merge_options,
3566 svn_client_ctx_t *ctx,
3570 * Similar to svn_client_merge5(), but the single @a ignore_ancestry
3571 * parameter maps to both @c ignore_mergeinfo and @c diff_ignore_ancestry.
3573 * @deprecated Provided for backward compatibility with the 1.7 API.
3574 * @since New in 1.7.
3578 svn_client_merge4(const char *source1,
3579 const svn_opt_revision_t *revision1,
3580 const char *source2,
3581 const svn_opt_revision_t *revision2,
3582 const char *target_wcpath,
3584 svn_boolean_t ignore_ancestry,
3585 svn_boolean_t force_delete,
3586 svn_boolean_t record_only,
3587 svn_boolean_t dry_run,
3588 svn_boolean_t allow_mixed_rev,
3589 const apr_array_header_t *merge_options,
3590 svn_client_ctx_t *ctx,
3594 * Similar to svn_client_merge4(), but with @a allow_mixed_rev set to
3595 * @c TRUE. The @a force parameter maps to the @c force_delete parameter
3596 * of svn_client_merge4().
3598 * @deprecated Provided for backward compatibility with the 1.6 API.
3600 * @since New in 1.5.
3604 svn_client_merge3(const char *source1,
3605 const svn_opt_revision_t *revision1,
3606 const char *source2,
3607 const svn_opt_revision_t *revision2,
3608 const char *target_wcpath,
3610 svn_boolean_t ignore_ancestry,
3611 svn_boolean_t force,
3612 svn_boolean_t record_only,
3613 svn_boolean_t dry_run,
3614 const apr_array_header_t *merge_options,
3615 svn_client_ctx_t *ctx,
3619 * Similar to svn_client_merge3(), but with @a record_only set to @c
3620 * FALSE, and @a depth set according to @a recurse: if @a recurse is
3621 * TRUE, set @a depth to #svn_depth_infinity, if @a recurse is
3622 * FALSE, set @a depth to #svn_depth_files.
3624 * @deprecated Provided for backward compatibility with the 1.4 API.
3626 * @since New in 1.4.
3630 svn_client_merge2(const char *source1,
3631 const svn_opt_revision_t *revision1,
3632 const char *source2,
3633 const svn_opt_revision_t *revision2,
3634 const char *target_wcpath,
3635 svn_boolean_t recurse,
3636 svn_boolean_t ignore_ancestry,
3637 svn_boolean_t force,
3638 svn_boolean_t dry_run,
3639 const apr_array_header_t *merge_options,
3640 svn_client_ctx_t *ctx,
3645 * Similar to svn_client_merge2(), but with @a merge_options set to NULL.
3647 * @deprecated Provided for backwards compatibility with the 1.3 API.
3651 svn_client_merge(const char *source1,
3652 const svn_opt_revision_t *revision1,
3653 const char *source2,
3654 const svn_opt_revision_t *revision2,
3655 const char *target_wcpath,
3656 svn_boolean_t recurse,
3657 svn_boolean_t ignore_ancestry,
3658 svn_boolean_t force,
3659 svn_boolean_t dry_run,
3660 svn_client_ctx_t *ctx,
3665 * Perform a reintegration merge of @a source_path_or_url at @a source_peg_revision
3666 * into @a target_wcpath.
3667 * @a target_wcpath must be a single-revision, #svn_depth_infinity,
3668 * pristine, unswitched working copy -- in other words, it must
3669 * reflect a single revision tree, the "target". The mergeinfo on @a
3670 * source_path_or_url must reflect that all of the target has been merged into it.
3671 * Then this behaves like a merge with svn_client_merge5() from the
3672 * target's URL to the source.
3674 * All other options are handled identically to svn_client_merge5().
3675 * The depth of the merge is always #svn_depth_infinity.
3677 * @since New in 1.5.
3678 * @deprecated Provided for backwards compatibility with the 1.7 API.
3682 svn_client_merge_reintegrate(const char *source_path_or_url,
3683 const svn_opt_revision_t *source_peg_revision,
3684 const char *target_wcpath,
3685 svn_boolean_t dry_run,
3686 const apr_array_header_t *merge_options,
3687 svn_client_ctx_t *ctx,
3691 * Merge changes from the source branch identified by
3692 * @a source_path_or_url in peg revision @a source_peg_revision,
3693 * into the target branch working copy at @a target_wcpath.
3695 * If @a ranges_to_merge is NULL then perform an automatic merge of
3696 * all the eligible changes up to @a source_peg_revision. If the merge
3697 * required is a reintegrate merge, then return an error if the WC has
3698 * mixed revisions, local modifications and/or switched subtrees; if
3699 * the merge is determined to be of the non-reintegrate kind, then
3700 * return an error if @a allow_mixed_rev is false and the WC contains
3703 * If @a ranges_to_merge is not NULL then merge the changes specified
3704 * by the revision ranges in @a ranges_to_merge, or, when honouring
3705 * mergeinfo, only the eligible parts of those revision ranges.
3706 * @a ranges_to_merge is an array of <tt>svn_opt_revision_range_t
3707 * *</tt> ranges. These ranges may describe additive and/or
3708 * subtractive merge ranges, they may overlap fully or partially,
3709 * and/or they may partially or fully negate each other. This
3710 * rangelist is not required to be sorted. If any revision in the
3711 * list of provided ranges has an `unspecified' or unrecognized
3712 * `kind', return #SVN_ERR_CLIENT_BAD_REVISION.
3714 * If @a ranges_to_merge is an empty array, then do nothing.
3716 * All other options are handled identically to svn_client_merge5().
3718 * @since New in 1.8.
3721 svn_client_merge_peg5(const char *source_path_or_url,
3722 const apr_array_header_t *ranges_to_merge,
3723 const svn_opt_revision_t *source_peg_revision,
3724 const char *target_wcpath,
3726 svn_boolean_t ignore_mergeinfo,
3727 svn_boolean_t diff_ignore_ancestry,
3728 svn_boolean_t force_delete,
3729 svn_boolean_t record_only,
3730 svn_boolean_t dry_run,
3731 svn_boolean_t allow_mixed_rev,
3732 const apr_array_header_t *merge_options,
3733 svn_client_ctx_t *ctx,
3737 * Similar to svn_client_merge_peg5(), but automatic merge is not available
3738 * (@a ranges_to_merge must not be NULL), and the single @a ignore_ancestry
3739 * parameter maps to both @c ignore_mergeinfo and @c diff_ignore_ancestry.
3741 * @deprecated Provided for backward compatibility with the 1.7 API.
3742 * @since New in 1.7.
3746 svn_client_merge_peg4(const char *source_path_or_url,
3747 const apr_array_header_t *ranges_to_merge,
3748 const svn_opt_revision_t *source_peg_revision,
3749 const char *target_wcpath,
3751 svn_boolean_t ignore_ancestry,
3752 svn_boolean_t force_delete,
3753 svn_boolean_t record_only,
3754 svn_boolean_t dry_run,
3755 svn_boolean_t allow_mixed_rev,
3756 const apr_array_header_t *merge_options,
3757 svn_client_ctx_t *ctx,
3761 * Similar to svn_client_merge_peg4(), but with @a allow_mixed_rev set to
3762 * @c TRUE. The @a force parameter maps to the @c force_delete parameter
3763 * of svn_client_merge_peg4().
3765 * @deprecated Provided for backward compatibility with the 1.6 API.
3767 * @since New in 1.5.
3771 svn_client_merge_peg3(const char *source,
3772 const apr_array_header_t *ranges_to_merge,
3773 const svn_opt_revision_t *peg_revision,
3774 const char *target_wcpath,
3776 svn_boolean_t ignore_ancestry,
3777 svn_boolean_t force,
3778 svn_boolean_t record_only,
3779 svn_boolean_t dry_run,
3780 const apr_array_header_t *merge_options,
3781 svn_client_ctx_t *ctx,
3785 * Similar to svn_client_merge_peg3(), but with @a record_only set to
3786 * @c FALSE, and @a depth set according to @a recurse: if @a recurse
3787 * is TRUE, set @a depth to #svn_depth_infinity, if @a recurse is
3788 * FALSE, set @a depth to #svn_depth_files.
3790 * @deprecated Provided for backwards compatibility with the 1.4 API.
3792 * @since New in 1.4.
3796 svn_client_merge_peg2(const char *source,
3797 const svn_opt_revision_t *revision1,
3798 const svn_opt_revision_t *revision2,
3799 const svn_opt_revision_t *peg_revision,
3800 const char *target_wcpath,
3801 svn_boolean_t recurse,
3802 svn_boolean_t ignore_ancestry,
3803 svn_boolean_t force,
3804 svn_boolean_t dry_run,
3805 const apr_array_header_t *merge_options,
3806 svn_client_ctx_t *ctx,
3810 * Similar to svn_client_merge_peg2(), but with @a merge_options set to
3813 * @deprecated Provided for backwards compatibility with the 1.3 API.
3815 * @since New in 1.1.
3819 svn_client_merge_peg(const char *source,
3820 const svn_opt_revision_t *revision1,
3821 const svn_opt_revision_t *revision2,
3822 const svn_opt_revision_t *peg_revision,
3823 const char *target_wcpath,
3824 svn_boolean_t recurse,
3825 svn_boolean_t ignore_ancestry,
3826 svn_boolean_t force,
3827 svn_boolean_t dry_run,
3828 svn_client_ctx_t *ctx,
3832 /** Set @a suggestions to an ordered array of @c const char *
3833 * potential merge sources (expressed as full repository URLs) for @a
3834 * path_or_url at @a peg_revision. @a path_or_url is a working copy
3835 * path or repository URL. @a ctx is a context used for
3836 * authentication in the repository case. Use @a pool for all
3839 * @since New in 1.5.
3842 svn_client_suggest_merge_sources(apr_array_header_t **suggestions,
3843 const char *path_or_url,
3844 const svn_opt_revision_t *peg_revision,
3845 svn_client_ctx_t *ctx,
3850 * Get the mergeinfo for a single target node (ignoring any subtrees).
3852 * Set @a *mergeinfo to a hash mapping <tt>const char *</tt> merge source
3853 * URLs to <tt>svn_rangelist_t *</tt> rangelists describing the ranges which
3854 * have been merged into @a path_or_url as of @a peg_revision, per
3855 * @a path_or_url's explicit mergeinfo or inherited mergeinfo if no
3856 * explicit mergeinfo if found. If no explicit or inherited mergeinfo
3857 * is found, then set @a *mergeinfo to NULL.
3859 * Use @a pool for all necessary allocations.
3861 * If the server doesn't support retrieval of mergeinfo (which will
3862 * never happen for file:// URLs), return an
3863 * #SVN_ERR_UNSUPPORTED_FEATURE error.
3865 * @note Unlike most APIs which deal with mergeinfo, this one returns
3866 * data where the keys of the hash are absolute repository URLs rather
3867 * than repository filesystem paths.
3869 * @since New in 1.5.
3872 svn_client_mergeinfo_get_merged(apr_hash_t **mergeinfo,
3873 const char *path_or_url,
3874 const svn_opt_revision_t *peg_revision,
3875 svn_client_ctx_t *ctx,
3880 * Describe the revisions that either have or have not been merged from
3881 * one source branch (or subtree) into another.
3883 * If @a finding_merged is TRUE, then drive log entry callbacks
3884 * @a receiver / @a receiver_baton with the revisions merged from
3885 * @a source_path_or_url (as of @a source_peg_revision) into
3886 * @a target_path_or_url (as of @a target_peg_revision). If @a
3887 * finding_merged is FALSE then find the revisions eligible for merging.
3889 * If both @a source_start_revision and @a source_end_revision are
3890 * unspecified (that is, of kind @c svn_opt_revision_unspecified),
3891 * @a receiver will be called the requested revisions from 0 to
3892 * @a source_peg_revision and in that order (that is, oldest to
3893 * youngest). Otherwise, both @a source_start_revision and
3894 * @a source_end_revision must be specified, which has two effects:
3896 * - @a receiver will be called only with revisions which fall
3897 * within range of @a source_start_revision to
3898 * @a source_end_revision, inclusive, and
3900 * - those revisions will be ordered in the same "direction" as the
3901 * walk from @a source_start_revision to @a source_end_revision.
3902 * (If @a source_start_revision is the younger of the two, @a
3903 * receiver will be called with revisions in youngest-to-oldest
3904 * order; otherwise, the reverse occurs.)
3906 * If @a depth is #svn_depth_empty consider only the explicit or
3907 * inherited mergeinfo on @a target_path_or_url when calculating merged
3908 * revisions from @a source_path_or_url. If @a depth is #svn_depth_infinity
3909 * then also consider the explicit subtree mergeinfo under @a
3910 * target_path_or_url.
3911 * If a depth other than #svn_depth_empty or #svn_depth_infinity is
3912 * requested then return a #SVN_ERR_UNSUPPORTED_FEATURE error.
3914 * @a discover_changed_paths and @a revprops are the same as for
3915 * svn_client_log5(). Use @a scratch_pool for all temporary allocations.
3917 * @a ctx is a context used for authentication.
3919 * If the server doesn't support retrieval of mergeinfo, return an
3920 * #SVN_ERR_UNSUPPORTED_FEATURE error.
3922 * @since New in 1.8.
3925 svn_client_mergeinfo_log2(svn_boolean_t finding_merged,
3926 const char *target_path_or_url,
3927 const svn_opt_revision_t *target_peg_revision,
3928 const char *source_path_or_url,
3929 const svn_opt_revision_t *source_peg_revision,
3930 const svn_opt_revision_t *source_start_revision,
3931 const svn_opt_revision_t *source_end_revision,
3932 svn_log_entry_receiver_t receiver,
3933 void *receiver_baton,
3934 svn_boolean_t discover_changed_paths,
3936 const apr_array_header_t *revprops,
3937 svn_client_ctx_t *ctx,
3938 apr_pool_t *scratch_pool);
3941 * Similar to svn_client_mergeinfo_log2(), but with @a source_start_revision
3942 * and @a source_end_revision always of kind @c svn_opt_revision_unspecified;
3944 * @deprecated Provided for backwards compatibility with the 1.7 API.
3945 * @since New in 1.7.
3949 svn_client_mergeinfo_log(svn_boolean_t finding_merged,
3950 const char *target_path_or_url,
3951 const svn_opt_revision_t *target_peg_revision,
3952 const char *source_path_or_url,
3953 const svn_opt_revision_t *source_peg_revision,
3954 svn_log_entry_receiver_t receiver,
3955 void *receiver_baton,
3956 svn_boolean_t discover_changed_paths,
3958 const apr_array_header_t *revprops,
3959 svn_client_ctx_t *ctx,
3960 apr_pool_t *scratch_pool);
3963 * Similar to svn_client_mergeinfo_log(), but finds only merged revisions
3964 * and always operates at @a depth #svn_depth_empty.
3966 * @deprecated Provided for backwards compatibility with the 1.6 API. Use
3967 * svn_client_mergeinfo_log() instead.
3968 * @since New in 1.5.
3972 svn_client_mergeinfo_log_merged(const char *path_or_url,
3973 const svn_opt_revision_t *peg_revision,
3974 const char *merge_source_path_or_url,
3975 const svn_opt_revision_t *src_peg_revision,
3976 svn_log_entry_receiver_t receiver,
3977 void *receiver_baton,
3978 svn_boolean_t discover_changed_paths,
3979 const apr_array_header_t *revprops,
3980 svn_client_ctx_t *ctx,
3984 * Similar to svn_client_mergeinfo_log(), but finds only eligible revisions
3985 * and always operates at @a depth #svn_depth_empty.
3987 * @deprecated Provided for backwards compatibility with the 1.6 API. Use
3988 * svn_client_mergeinfo_log() instead.
3989 * @since New in 1.5.
3993 svn_client_mergeinfo_log_eligible(const char *path_or_url,
3994 const svn_opt_revision_t *peg_revision,
3995 const char *merge_source_path_or_url,
3996 const svn_opt_revision_t *src_peg_revision,
3997 svn_log_entry_receiver_t receiver,
3998 void *receiver_baton,
3999 svn_boolean_t discover_changed_paths,
4000 const apr_array_header_t *revprops,
4001 svn_client_ctx_t *ctx,
4007 * @defgroup Cleanup Cleanup an abnormally terminated working copy.
4012 /** Recursively cleanup a working copy directory @a dir, finishing any
4013 * incomplete operations, removing lockfiles, etc.
4015 * If @a ctx->cancel_func is non-NULL, invoke it with @a
4016 * ctx->cancel_baton at various points during the operation. If it
4017 * returns an error (typically #SVN_ERR_CANCELLED), return that error
4020 * Use @a scratch_pool for any temporary allocations.
4023 svn_client_cleanup(const char *dir,
4024 svn_client_ctx_t *ctx,
4025 apr_pool_t *scratch_pool);
4031 * @defgroup Upgrade Upgrade a working copy.
4036 /** Recursively upgrade a working copy from any older format to the current
4037 * WC metadata storage format. @a wcroot_dir is the path to the WC root.
4039 * Use @a scratch_pool for any temporary allocations.
4041 * @since New in 1.7.
4044 svn_client_upgrade(const char *wcroot_dir,
4045 svn_client_ctx_t *ctx,
4046 apr_pool_t *scratch_pool);
4052 * @defgroup Relocate Switch a working copy to a different repository.
4058 * Recursively modify a working copy rooted at @a wcroot_dir, changing
4059 * any repository URLs that begin with @a from_prefix to begin with @a
4060 * to_prefix instead.
4062 * @param wcroot_dir Working copy root directory
4063 * @param from_prefix Original URL
4064 * @param to_prefix New URL
4065 * @param ignore_externals If not set, recurse into external working
4066 * copies after relocating the primary working copy
4067 * @param ctx svn_client_ctx_t
4068 * @param pool The pool from which to perform memory allocations
4073 svn_client_relocate2(const char *wcroot_dir,
4074 const char *from_prefix,
4075 const char *to_prefix,
4076 svn_boolean_t ignore_externals,
4077 svn_client_ctx_t *ctx,
4081 * Similar to svn_client_relocate2(), but with @a ignore_externals
4084 * @note As of the 1.7 API, @a dir is required to be a working copy
4085 * root directory, and @a recurse is required to be TRUE.
4087 * @deprecated Provided for limited backwards compatibility with the
4092 svn_client_relocate(const char *dir,
4093 const char *from_prefix,
4094 const char *to_prefix,
4095 svn_boolean_t recurse,
4096 svn_client_ctx_t *ctx,
4102 * @defgroup Revert Remove local changes in a repository.
4108 * Restore the pristine version of working copy @a paths,
4109 * effectively undoing any local mods. For each path in @a paths,
4110 * revert it if it is a file. Else if it is a directory, revert
4111 * according to @a depth:
4113 * @a paths is an array of (const char *) local WC paths.
4115 * If @a depth is #svn_depth_empty, revert just the properties on
4116 * the directory; else if #svn_depth_files, revert the properties
4117 * and any files immediately under the directory; else if
4118 * #svn_depth_immediates, revert all of the preceding plus
4119 * properties on immediate subdirectories; else if #svn_depth_infinity,
4120 * revert path and everything under it fully recursively.
4122 * @a changelists is an array of <tt>const char *</tt> changelist
4123 * names, used as a restrictive filter on items reverted; that is,
4124 * don't revert any item unless it's a member of one of those
4125 * changelists. If @a changelists is empty (or altogether @c NULL),
4126 * no changelist filtering occurs.
4128 * If @a ctx->notify_func2 is non-NULL, then for each item reverted,
4129 * call @a ctx->notify_func2 with @a ctx->notify_baton2 and the path of
4130 * the reverted item.
4132 * If an item specified for reversion is not under version control,
4133 * then do not error, just invoke @a ctx->notify_func2 with @a
4134 * ctx->notify_baton2, using notification code #svn_wc_notify_skip.
4136 * @since New in 1.5.
4139 svn_client_revert2(const apr_array_header_t *paths,
4141 const apr_array_header_t *changelists,
4142 svn_client_ctx_t *ctx,
4147 * Similar to svn_client_revert2(), but with @a changelists passed as
4148 * @c NULL, and @a depth set according to @a recurse: if @a recurse is
4149 * TRUE, @a depth is #svn_depth_infinity, else if @a recurse is
4150 * FALSE, @a depth is #svn_depth_empty.
4152 * @note Most APIs map @a recurse==FALSE to @a depth==svn_depth_files;
4153 * revert is deliberately different.
4155 * @deprecated Provided for backwards compatibility with the 1.0 API.
4159 svn_client_revert(const apr_array_header_t *paths,
4160 svn_boolean_t recursive,
4161 svn_client_ctx_t *ctx,
4168 * @defgroup Resolved Mark conflicted paths as resolved.
4174 * Similar to svn_client_resolve(), but without automatic conflict
4175 * resolution support.
4177 * @deprecated Provided for backward compatibility with the 1.4 API.
4178 * Use svn_client_resolve() with @a conflict_choice == @c
4179 * svn_wc_conflict_choose_merged instead.
4183 svn_client_resolved(const char *path,
4184 svn_boolean_t recursive,
4185 svn_client_ctx_t *ctx,
4188 /** Perform automatic conflict resolution on a working copy @a path.
4190 * If @a conflict_choice is
4192 * - #svn_wc_conflict_choose_base:
4193 * resolve the conflict with the old file contents
4195 * - #svn_wc_conflict_choose_mine_full:
4196 * use the original working contents
4198 * - #svn_wc_conflict_choose_theirs_full:
4199 * use the new contents
4201 * - #svn_wc_conflict_choose_merged:
4202 * don't change the contents at all, just remove the conflict
4203 * status, which is the pre-1.5 behavior.
4205 * - #svn_wc_conflict_choose_theirs_conflict
4208 * - #svn_wc_conflict_choose_mine_conflict
4211 * - svn_wc_conflict_choose_unspecified
4212 * invoke @a ctx->conflict_func2 with @a ctx->conflict_baton2 to obtain
4213 * a resolution decision for each conflict. This can be used to
4214 * implement interactive conflict resolution.
4216 * #svn_wc_conflict_choose_theirs_conflict and
4217 * #svn_wc_conflict_choose_mine_conflict are not legal for binary
4218 * files or properties.
4220 * If @a path is not in a state of conflict to begin with, do nothing.
4221 * If @a path's conflict state is removed and @a ctx->notify_func2 is non-NULL,
4222 * call @a ctx->notify_func2 with @a ctx->notify_baton2 and @a path.
4223 * ### with what notification parameters?
4225 * If @a depth is #svn_depth_empty, act only on @a path; if
4226 * #svn_depth_files, resolve @a path and its conflicted file
4227 * children (if any); if #svn_depth_immediates, resolve @a path and
4228 * all its immediate conflicted children (both files and directories,
4229 * if any); if #svn_depth_infinity, resolve @a path and every
4230 * conflicted file or directory anywhere beneath it.
4232 * Note that this operation will try to lock the parent directory of
4233 * @a path in order to be able to resolve tree-conflicts on @a path.
4235 * @since New in 1.5.
4238 svn_client_resolve(const char *path,
4240 svn_wc_conflict_choice_t conflict_choice,
4241 svn_client_ctx_t *ctx,
4248 * @defgroup Copy Copy paths in the working copy and repository.
4254 * A structure which describes the source of a copy operation--its path,
4255 * revision, and peg revision.
4257 * @since New in 1.5.
4259 typedef struct svn_client_copy_source_t
4261 /** The source path or URL. */
4264 /** The source operational revision. */
4265 const svn_opt_revision_t *revision;
4267 /** The source peg revision. */
4268 const svn_opt_revision_t *peg_revision;
4269 } svn_client_copy_source_t;
4271 /** Copy each source in @a sources to @a dst_path.
4273 * If multiple @a sources are given, @a dst_path must be a directory,
4274 * and @a sources will be copied as children of @a dst_path.
4276 * @a sources is an array of <tt>svn_client_copy_source_t *</tt> elements,
4277 * either all referring to local WC items or all referring to versioned
4278 * items in the repository.
4280 * If @a sources has only one item, attempt to copy it to @a dst_path. If
4281 * @a copy_as_child is TRUE and @a dst_path already exists, attempt to copy the
4282 * item as a child of @a dst_path. If @a copy_as_child is FALSE and
4283 * @a dst_path already exists, fail with #SVN_ERR_ENTRY_EXISTS if @a dst_path
4284 * is a working copy path and #SVN_ERR_FS_ALREADY_EXISTS if @a dst_path is a
4287 * If @a sources has multiple items, and @a copy_as_child is TRUE, all
4288 * @a sources are copied as children of @a dst_path. If any child of
4289 * @a dst_path already exists with the same name any item in @a sources,
4290 * fail with #SVN_ERR_ENTRY_EXISTS if @a dst_path is a working copy path and
4291 * #SVN_ERR_FS_ALREADY_EXISTS if @a dst_path is a URL.
4293 * If @a sources has multiple items, and @a copy_as_child is FALSE, fail
4294 * with #SVN_ERR_CLIENT_MULTIPLE_SOURCES_DISALLOWED.
4296 * If @a dst_path is a URL, use the authentication baton
4297 * in @a ctx and @a ctx->log_msg_func3/@a ctx->log_msg_baton3 to immediately
4298 * attempt to commit the copy action in the repository.
4300 * If @a dst_path is not a URL, then this is just a variant of
4301 * svn_client_add(), where the @a sources are scheduled for addition
4302 * as copies. No changes will happen to the repository until a commit occurs.
4303 * This scheduling can be removed with svn_client_revert2().
4305 * If @a make_parents is TRUE, create any non-existent parent directories
4306 * also. Otherwise the parent of @a dst_path must already exist.
4308 * If @a ignore_externals is set, don't process externals definitions
4309 * as part of this operation.
4311 * If non-NULL, @a revprop_table is a hash table holding additional,
4312 * custom revision properties (<tt>const char *</tt> names mapped to
4313 * <tt>svn_string_t *</tt> values) to be set on the new revision in
4314 * the event that this is a committing operation. This table cannot
4315 * contain any standard Subversion properties.
4317 * @a ctx->log_msg_func3/@a ctx->log_msg_baton3 are a callback/baton combo
4318 * that this function can use to query for a commit log message when one is
4321 * If @a ctx->notify_func2 is non-NULL, invoke it with @a ctx->notify_baton2
4322 * for each item added at the new location, passing the new, relative path of
4325 * If @a commit_callback is non-NULL, then for each successful commit, call
4326 * @a commit_callback with @a commit_baton and a #svn_commit_info_t for
4329 * @since New in 1.7.
4332 svn_client_copy6(const apr_array_header_t *sources,
4333 const char *dst_path,
4334 svn_boolean_t copy_as_child,
4335 svn_boolean_t make_parents,
4336 svn_boolean_t ignore_externals,
4337 const apr_hash_t *revprop_table,
4338 svn_commit_callback2_t commit_callback,
4340 svn_client_ctx_t *ctx,
4344 * Similar to svn_client_copy6(), but returns the commit info in
4345 * @a *commit_info_p rather than through a callback function.
4347 * @since New in 1.6.
4348 * @deprecated Provided for backward compatibility with the 1.6 API.
4352 svn_client_copy5(svn_commit_info_t **commit_info_p,
4353 const apr_array_header_t *sources,
4354 const char *dst_path,
4355 svn_boolean_t copy_as_child,
4356 svn_boolean_t make_parents,
4357 svn_boolean_t ignore_externals,
4358 const apr_hash_t *revprop_table,
4359 svn_client_ctx_t *ctx,
4363 * Similar to svn_client_copy5(), with @a ignore_externals set to @c FALSE.
4365 * @since New in 1.5.
4367 * @deprecated Provided for backward compatibility with the 1.5 API.
4371 svn_client_copy4(svn_commit_info_t **commit_info_p,
4372 const apr_array_header_t *sources,
4373 const char *dst_path,
4374 svn_boolean_t copy_as_child,
4375 svn_boolean_t make_parents,
4376 const apr_hash_t *revprop_table,
4377 svn_client_ctx_t *ctx,
4381 * Similar to svn_client_copy4(), with only one @a src_path, @a
4382 * copy_as_child set to @c FALSE, @a revprop_table passed as NULL, and
4383 * @a make_parents set to @c FALSE. Also, use @a src_revision as both
4384 * the operational and peg revision.
4386 * @since New in 1.4.
4388 * @deprecated Provided for backward compatibility with the 1.4 API.
4392 svn_client_copy3(svn_commit_info_t **commit_info_p,
4393 const char *src_path,
4394 const svn_opt_revision_t *src_revision,
4395 const char *dst_path,
4396 svn_client_ctx_t *ctx,
4401 * Similar to svn_client_copy3(), with the difference that if @a dst_path
4402 * already exists and is a directory, copy the item into that directory,
4403 * keeping its name (the last component of @a src_path).
4405 * @since New in 1.3.
4407 * @deprecated Provided for backward compatibility with the 1.3 API.
4411 svn_client_copy2(svn_commit_info_t **commit_info_p,
4412 const char *src_path,
4413 const svn_opt_revision_t *src_revision,
4414 const char *dst_path,
4415 svn_client_ctx_t *ctx,
4420 * Similar to svn_client_copy2(), but uses #svn_client_commit_info_t
4421 * for @a commit_info_p.
4423 * @deprecated Provided for backward compatibility with the 1.2 API.
4427 svn_client_copy(svn_client_commit_info_t **commit_info_p,
4428 const char *src_path,
4429 const svn_opt_revision_t *src_revision,
4430 const char *dst_path,
4431 svn_client_ctx_t *ctx,
4438 * @defgroup Move Move paths in the working copy or repository.
4444 * Move @a src_paths to @a dst_path.
4446 * @a src_paths is an array of (const char *) paths -- either all WC paths
4447 * or all URLs -- of versioned items. If multiple @a src_paths are given,
4448 * @a dst_path must be a directory and @a src_paths will be moved as
4449 * children of @a dst_path.
4451 * If @a src_paths are repository URLs:
4453 * - @a dst_path must also be a repository URL.
4455 * - The authentication baton in @a ctx and @a ctx->log_msg_func/@a
4456 * ctx->log_msg_baton are used to commit the move.
4458 * - The move operation will be immediately committed.
4460 * If @a src_paths are working copy paths:
4462 * - @a dst_path must also be a working copy path.
4464 * - @a ctx->log_msg_func3 and @a ctx->log_msg_baton3 are ignored.
4466 * - This is a scheduling operation. No changes will happen to the
4467 * repository until a commit occurs. This scheduling can be removed
4468 * with svn_client_revert2(). If one of @a src_paths is a file it is
4469 * removed from the working copy immediately. If one of @a src_path
4470 * is a directory it will remain in the working copy but all the files,
4471 * and unversioned items, it contains will be removed.
4473 * If @a src_paths has only one item, attempt to move it to @a dst_path. If
4474 * @a move_as_child is TRUE and @a dst_path already exists, attempt to move the
4475 * item as a child of @a dst_path. If @a move_as_child is FALSE and
4476 * @a dst_path already exists, fail with #SVN_ERR_ENTRY_EXISTS if @a dst_path
4477 * is a working copy path and #SVN_ERR_FS_ALREADY_EXISTS if @a dst_path is a
4480 * If @a src_paths has multiple items, and @a move_as_child is TRUE, all
4481 * @a src_paths are moved as children of @a dst_path. If any child of
4482 * @a dst_path already exists with the same name any item in @a src_paths,
4483 * fail with #SVN_ERR_ENTRY_EXISTS if @a dst_path is a working copy path and
4484 * #SVN_ERR_FS_ALREADY_EXISTS if @a dst_path is a URL.
4486 * If @a src_paths has multiple items, and @a move_as_child is FALSE, fail
4487 * with #SVN_ERR_CLIENT_MULTIPLE_SOURCES_DISALLOWED.
4489 * If @a make_parents is TRUE, create any non-existent parent directories
4490 * also. Otherwise, the parent of @a dst_path must already exist.
4492 * If @a allow_mixed_revisions is @c FALSE, #SVN_ERR_WC_MIXED_REVISIONS
4493 * will be raised if the move source is a mixed-revision subtree.
4494 * If @a allow_mixed_revisions is TRUE, a mixed-revision move source is
4495 * allowed but the move will degrade to a copy and a delete without local
4496 * move tracking. This parameter should be set to FALSE except where backwards
4497 * compatibility to svn_client_move6() is required.
4499 * If @a metadata_only is @c TRUE and moving a file in a working copy,
4500 * everything in the metadata is updated as if the node is moved, but the
4501 * actual disk move operation is not performed. This feature is useful for
4502 * clients that want to keep the working copy in sync while the actual working
4503 * copy is updated by some other task.
4505 * If non-NULL, @a revprop_table is a hash table holding additional,
4506 * custom revision properties (<tt>const char *</tt> names mapped to
4507 * <tt>svn_string_t *</tt> values) to be set on the new revision in
4508 * the event that this is a committing operation. This table cannot
4509 * contain any standard Subversion properties.
4511 * @a ctx->log_msg_func3/@a ctx->log_msg_baton3 are a callback/baton combo that
4512 * this function can use to query for a commit log message when one is needed.
4514 * If @a ctx->notify_func2 is non-NULL, then for each item moved, call
4515 * @a ctx->notify_func2 with the @a ctx->notify_baton2 twice, once to indicate
4516 * the deletion of the moved thing, and once to indicate the addition of
4517 * the new location of the thing.
4519 * ### Is this really true? What about svn_wc_notify_commit_replaced()? ###
4521 * If @a commit_callback is non-NULL, then for each successful commit, call
4522 * @a commit_callback with @a commit_baton and a #svn_commit_info_t for
4525 * @since New in 1.8.
4528 svn_client_move7(const apr_array_header_t *src_paths,
4529 const char *dst_path,
4530 svn_boolean_t move_as_child,
4531 svn_boolean_t make_parents,
4532 svn_boolean_t allow_mixed_revisions,
4533 svn_boolean_t metadata_only,
4534 const apr_hash_t *revprop_table,
4535 svn_commit_callback2_t commit_callback,
4537 svn_client_ctx_t *ctx,
4541 * Similar to svn_client_move7(), but with @a allow_mixed_revisions always
4542 * set to @c TRUE and @a metadata_only always to @c FALSE.
4544 * @since New in 1.7.
4545 * @deprecated Provided for backward compatibility with the 1.7 API.
4549 svn_client_move6(const apr_array_header_t *src_paths,
4550 const char *dst_path,
4551 svn_boolean_t move_as_child,
4552 svn_boolean_t make_parents,
4553 const apr_hash_t *revprop_table,
4554 svn_commit_callback2_t commit_callback,
4556 svn_client_ctx_t *ctx,
4560 * Similar to svn_client_move6(), but returns the commit info in
4561 * @a *commit_info_p rather than through a callback function.
4563 * A WC-to-WC move will include any modified and/or unversioned children.
4564 * @a force is ignored.
4566 * @since New in 1.5.
4567 * @deprecated Provided for backward compatibility with the 1.6 API.
4571 svn_client_move5(svn_commit_info_t **commit_info_p,
4572 const apr_array_header_t *src_paths,
4573 const char *dst_path,
4574 svn_boolean_t force,
4575 svn_boolean_t move_as_child,
4576 svn_boolean_t make_parents,
4577 const apr_hash_t *revprop_table,
4578 svn_client_ctx_t *ctx,
4582 * Similar to svn_client_move5(), with only one @a src_path, @a
4583 * move_as_child set to @c FALSE, @a revprop_table passed as NULL, and
4584 * @a make_parents set to @c FALSE.
4586 * Note: The behaviour of @a force changed in 1.5 (r860885 and r861421), when
4587 * the 'move' semantics were improved to just move the source including any
4588 * modified and/or unversioned items in it. Before that, @a force
4589 * controlled what happened to such items, but now @a force is ignored.
4591 * @since New in 1.4.
4593 * @deprecated Provided for backward compatibility with the 1.4 API.
4597 svn_client_move4(svn_commit_info_t **commit_info_p,
4598 const char *src_path,
4599 const char *dst_path,
4600 svn_boolean_t force,
4601 svn_client_ctx_t *ctx,
4605 * Similar to svn_client_move4(), with the difference that if @a dst_path
4606 * already exists and is a directory, move the item into that directory,
4607 * keeping its name (the last component of @a src_path).
4609 * @since New in 1.3.
4611 * @deprecated Provided for backward compatibility with the 1.3 API.
4615 svn_client_move3(svn_commit_info_t **commit_info_p,
4616 const char *src_path,
4617 const char *dst_path,
4618 svn_boolean_t force,
4619 svn_client_ctx_t *ctx,
4623 * Similar to svn_client_move3(), but uses #svn_client_commit_info_t
4624 * for @a commit_info_p.
4626 * @deprecated Provided for backward compatibility with the 1.2 API.
4628 * @since New in 1.2.
4632 svn_client_move2(svn_client_commit_info_t **commit_info_p,
4633 const char *src_path,
4634 const char *dst_path,
4635 svn_boolean_t force,
4636 svn_client_ctx_t *ctx,
4640 * Similar to svn_client_move2(), but an extra argument @a src_revision
4641 * must be passed. This has no effect, but must be of kind
4642 * #svn_opt_revision_unspecified or #svn_opt_revision_head,
4643 * otherwise error #SVN_ERR_UNSUPPORTED_FEATURE is returned.
4645 * @deprecated Provided for backward compatibility with the 1.1 API.
4649 svn_client_move(svn_client_commit_info_t **commit_info_p,
4650 const char *src_path,
4651 const svn_opt_revision_t *src_revision,
4652 const char *dst_path,
4653 svn_boolean_t force,
4654 svn_client_ctx_t *ctx,
4662 * Note that certain svn-controlled properties must always have their
4663 * values set and stored in UTF8 with LF line endings. When
4664 * retrieving these properties, callers must convert the values back
4665 * to native locale and native line-endings before displaying them to
4666 * the user. For help with this task, see
4667 * svn_prop_needs_translation(), svn_subst_translate_string(), and
4668 * svn_subst_detranslate_string().
4670 * @defgroup svn_client_prop_funcs Property functions
4676 * Set @a propname to @a propval on @a url. A @a propval of @c NULL will
4677 * delete the property.
4679 * Immediately attempt to commit the property change in the repository,
4680 * using the authentication baton in @a ctx and @a
4681 * ctx->log_msg_func3/@a ctx->log_msg_baton3.
4683 * If the property has changed on @a url since revision
4684 * @a base_revision_for_url (which must not be #SVN_INVALID_REVNUM), no
4685 * change will be made and an error will be returned.
4687 * If non-NULL, @a revprop_table is a hash table holding additional,
4688 * custom revision properties (<tt>const char *</tt> names mapped to
4689 * <tt>svn_string_t *</tt> values) to be set on the new revision. This
4690 * table cannot contain any standard Subversion properties.
4692 * If @a commit_callback is non-NULL, then call @a commit_callback with
4693 * @a commit_baton and a #svn_commit_info_t for the commit.
4695 * If @a propname is an svn-controlled property (i.e. prefixed with
4696 * #SVN_PROP_PREFIX), then the caller is responsible for ensuring that
4697 * the value is UTF8-encoded and uses LF line-endings.
4699 * If @a skip_checks is TRUE, do no validity checking. But if @a
4700 * skip_checks is FALSE, and @a propname is not a valid property for @a
4701 * url, return an error, either #SVN_ERR_ILLEGAL_TARGET (if the property is
4702 * not appropriate for @a url), or * #SVN_ERR_BAD_MIME_TYPE (if @a propname
4703 * is "svn:mime-type", but @a propval is not a valid mime-type).
4705 * Use @a scratch_pool for all memory allocation.
4707 * @since New in 1.7.
4710 svn_client_propset_remote(const char *propname,
4711 const svn_string_t *propval,
4713 svn_boolean_t skip_checks,
4714 svn_revnum_t base_revision_for_url,
4715 const apr_hash_t *revprop_table,
4716 svn_commit_callback2_t commit_callback,
4718 svn_client_ctx_t *ctx,
4719 apr_pool_t *scratch_pool);
4722 * Set @a propname to @a propval on each (const char *) target in @a
4723 * targets. The targets must be all working copy paths. A @a propval
4724 * of @c NULL will delete the property.
4726 * If @a depth is #svn_depth_empty, set the property on each member of
4727 * @a targets only; if #svn_depth_files, set it on @a targets and their
4728 * file children (if any); if #svn_depth_immediates, on @a targets and all
4729 * of their immediate children (both files and directories); if
4730 * #svn_depth_infinity, on @a targets and everything beneath them.
4732 * @a changelists is an array of <tt>const char *</tt> changelist
4733 * names, used as a restrictive filter on items whose properties are
4734 * set; that is, don't set properties on any item unless it's a member
4735 * of one of those changelists. If @a changelists is empty (or
4736 * altogether @c NULL), no changelist filtering occurs.
4738 * If @a propname is an svn-controlled property (i.e. prefixed with
4739 * #SVN_PROP_PREFIX), then the caller is responsible for ensuring that
4740 * the value is UTF8-encoded and uses LF line-endings.
4742 * If @a skip_checks is TRUE, do no validity checking. But if @a
4743 * skip_checks is FALSE, and @a propname is not a valid property for @a
4744 * targets, return an error, either #SVN_ERR_ILLEGAL_TARGET (if the
4745 * property is not appropriate for @a targets), or
4746 * #SVN_ERR_BAD_MIME_TYPE (if @a propname is "svn:mime-type", but @a
4747 * propval is not a valid mime-type).
4749 * If @a ctx->cancel_func is non-NULL, invoke it passing @a
4750 * ctx->cancel_baton at various places during the operation.
4752 * Use @a scratch_pool for all memory allocation.
4754 * @since New in 1.7.
4757 svn_client_propset_local(const char *propname,
4758 const svn_string_t *propval,
4759 const apr_array_header_t *targets,
4761 svn_boolean_t skip_checks,
4762 const apr_array_header_t *changelists,
4763 svn_client_ctx_t *ctx,
4764 apr_pool_t *scratch_pool);
4767 * An amalgamation of svn_client_propset_local() and
4768 * svn_client_propset_remote() that takes only a single target, and
4769 * returns the commit info in @a *commit_info_p rather than through a
4770 * callback function.
4772 * @since New in 1.5.
4773 * @deprecated Provided for backward compatibility with the 1.6 API.
4777 svn_client_propset3(svn_commit_info_t **commit_info_p,
4778 const char *propname,
4779 const svn_string_t *propval,
4782 svn_boolean_t skip_checks,
4783 svn_revnum_t base_revision_for_url,
4784 const apr_array_header_t *changelists,
4785 const apr_hash_t *revprop_table,
4786 svn_client_ctx_t *ctx,
4790 * Like svn_client_propset3(), but with @a base_revision_for_url
4791 * always #SVN_INVALID_REVNUM; @a commit_info_p always @c NULL; @a
4792 * changelists always @c NULL; @a revprop_table always @c NULL; and @a
4793 * depth set according to @a recurse: if @a recurse is TRUE, @a depth
4794 * is #svn_depth_infinity, else #svn_depth_empty.
4796 * @deprecated Provided for backward compatibility with the 1.4 API.
4800 svn_client_propset2(const char *propname,
4801 const svn_string_t *propval,
4803 svn_boolean_t recurse,
4804 svn_boolean_t skip_checks,
4805 svn_client_ctx_t *ctx,
4809 * Like svn_client_propset2(), but with @a skip_checks always FALSE and a
4810 * newly created @a ctx.
4812 * @deprecated Provided for backward compatibility with the 1.1 API.
4816 svn_client_propset(const char *propname,
4817 const svn_string_t *propval,
4819 svn_boolean_t recurse,
4822 /** Set @a propname to @a propval on revision @a revision in the repository
4823 * represented by @a URL. Use the authentication baton in @a ctx for
4824 * authentication, and @a pool for all memory allocation. Return the actual
4825 * rev affected in @a *set_rev. A @a propval of @c NULL will delete the
4828 * If @a original_propval is non-NULL, then just before setting the
4829 * new value, check that the old value matches @a original_propval;
4830 * if they do not match, return the error #SVN_ERR_RA_OUT_OF_DATE.
4831 * This is to help clients support interactive editing of revprops:
4832 * without this check, the window during which the property may change
4833 * underneath the user is as wide as the amount of time the user
4834 * spends editing the property. With this check, the window is
4835 * reduced to a small, constant amount of time right before we set the
4836 * new value. (To check that an old value is still non-existent, set
4837 * @a original_propval->data to NULL, and @a original_propval->len is
4839 * If the server advertises #SVN_RA_CAPABILITY_ATOMIC_REVPROPS, the
4840 * check of @a original_propval is done atomically.
4842 * Note: the representation of "property is not set" in @a
4843 * original_propval differs from the representation in other APIs
4844 * (such as svn_fs_change_rev_prop2() and svn_ra_change_rev_prop2()).
4846 * If @a force is TRUE, allow newlines in the author property.
4848 * If @a propname is an svn-controlled property (i.e. prefixed with
4849 * #SVN_PROP_PREFIX), then the caller is responsible for ensuring that
4850 * the value UTF8-encoded and uses LF line-endings.
4852 * Note that unlike its cousin svn_client_propset3(), this routine
4853 * doesn't affect the working copy at all; it's a pure network
4854 * operation that changes an *unversioned* property attached to a
4855 * revision. This can be used to tweak log messages, dates, authors,
4856 * and the like. Be careful: it's a lossy operation.
4858 * @a ctx->notify_func2 and @a ctx->notify_baton2 are the notification
4859 * functions and baton which are called upon successful setting of the
4862 * Also note that unless the administrator creates a
4863 * pre-revprop-change hook in the repository, this feature will fail.
4865 * @since New in 1.6.
4868 svn_client_revprop_set2(const char *propname,
4869 const svn_string_t *propval,
4870 const svn_string_t *original_propval,
4872 const svn_opt_revision_t *revision,
4873 svn_revnum_t *set_rev,
4874 svn_boolean_t force,
4875 svn_client_ctx_t *ctx,
4879 * Similar to svn_client_revprop_set2(), but with @a original_propval
4882 * @deprecated Provided for backward compatibility with the 1.5 API.
4886 svn_client_revprop_set(const char *propname,
4887 const svn_string_t *propval,
4889 const svn_opt_revision_t *revision,
4890 svn_revnum_t *set_rev,
4891 svn_boolean_t force,
4892 svn_client_ctx_t *ctx,
4896 * Set @a *props to a hash table whose keys are absolute paths or URLs
4897 * of items on which property @a propname is explicitly set, and whose
4898 * values are <tt>svn_string_t *</tt> representing the property value for
4899 * @a propname at that path.
4901 * If @a inherited_props is not @c NULL, then set @a *inherited_props to a
4902 * depth-first ordered array of #svn_prop_inherited_item_t * structures
4903 * representing the properties inherited by @a target. If @a target is a
4904 * working copy path, then properties inherited by @a target as far as the
4905 * root of the working copy are obtained from the working copy's actual
4906 * property values. Properties inherited from above the working copy root
4907 * come from the inherited properties cache. If @a target is a URL, then
4908 * the inherited properties come from the repository. If @a inherited_props
4909 * is not @c NULL and no inheritable properties are found, then set
4910 * @a *inherited_props to an empty array.
4912 * The #svn_prop_inherited_item_t->path_or_url members of the
4913 * #svn_prop_inherited_item_t * structures in @a *inherited_props are
4914 * URLs if @a target is a URL or if @a target is a working copy path but the
4915 * property represented by the structure is above the working copy root (i.e.
4916 * the inherited property is from the cache). In all other cases the
4917 * #svn_prop_inherited_item_t->path_or_url members are absolute working copy
4920 * Allocate @a *props (including keys and values) and @a *inherited_props
4921 * (including its elements) in @a result_pool, use @a scratch_pool for
4922 * temporary allocations.
4924 * @a target is a WC absolute path or a URL.
4926 * Don't store any path, not even @a target, if it does not have a
4927 * property named @a propname.
4929 * If @a revision->kind is #svn_opt_revision_unspecified, then: get
4930 * properties from the working copy if @a target is a working copy
4931 * path, or from the repository head if @a target is a URL. Else get
4932 * the properties as of @a revision. The actual node revision
4933 * selected is determined by the path as it exists in @a peg_revision.
4934 * If @a peg_revision->kind is #svn_opt_revision_unspecified, then
4935 * it defaults to #svn_opt_revision_head for URLs or
4936 * #svn_opt_revision_working for WC targets. Use the authentication
4937 * baton in @a ctx for authentication if contacting the repository.
4938 * If @a actual_revnum is not @c NULL, the actual revision number used
4939 * for the fetch is stored in @a *actual_revnum.
4941 * If @a depth is #svn_depth_empty, fetch the property from
4942 * @a target only; if #svn_depth_files, fetch from @a target and its
4943 * file children (if any); if #svn_depth_immediates, from @a target
4944 * and all of its immediate children (both files and directories); if
4945 * #svn_depth_infinity, from @a target and everything beneath it.
4947 * @a changelists is an array of <tt>const char *</tt> changelist
4948 * names, used as a restrictive filter on items whose properties are
4949 * gotten; that is, don't get @a propname on any item unless it's a member
4950 * of one of those changelists. If @a changelists is empty (or
4951 * altogether @c NULL), no changelist filtering occurs.
4953 * If error, don't touch @a *props, otherwise @a *props is a hash table
4956 * This function returns SVN_ERR_UNVERSIONED_RESOURCE when it is called on
4957 * unversioned nodes.
4959 * @since New in 1.8.
4962 svn_client_propget5(apr_hash_t **props,
4963 apr_array_header_t **inherited_props,
4964 const char *propname,
4965 const char *target, /* abspath or URL */
4966 const svn_opt_revision_t *peg_revision,
4967 const svn_opt_revision_t *revision,
4968 svn_revnum_t *actual_revnum,
4970 const apr_array_header_t *changelists,
4971 svn_client_ctx_t *ctx,
4972 apr_pool_t *result_pool,
4973 apr_pool_t *scratch_pool);
4976 * Similar to svn_client_propget5 but with @a inherited_props always
4979 * @since New in 1.7.
4980 * @deprecated Provided for backward compatibility with the 1.7 API.
4984 svn_client_propget4(apr_hash_t **props,
4985 const char *propname,
4986 const char *target, /* abspath or URL */
4987 const svn_opt_revision_t *peg_revision,
4988 const svn_opt_revision_t *revision,
4989 svn_revnum_t *actual_revnum,
4991 const apr_array_header_t *changelists,
4992 svn_client_ctx_t *ctx,
4993 apr_pool_t *result_pool,
4994 apr_pool_t *scratch_pool);
4997 * Similar to svn_client_propget4(), but with the following change to the
4998 * output hash keys: keys are `<tt>char *</tt>' paths, prefixed by
4999 * @a target, which is a working copy path or a URL.
5001 * This function returns SVN_ERR_ENTRY_NOT_FOUND where svn_client_propget4
5002 * would return SVN_ERR_UNVERSIONED_RESOURCE.
5004 * @since New in 1.5.
5005 * @deprecated Provided for backward compatibility with the 1.6 API.
5009 svn_client_propget3(apr_hash_t **props,
5010 const char *propname,
5012 const svn_opt_revision_t *peg_revision,
5013 const svn_opt_revision_t *revision,
5014 svn_revnum_t *actual_revnum,
5016 const apr_array_header_t *changelists,
5017 svn_client_ctx_t *ctx,
5021 * Similar to svn_client_propget3(), except that @a actual_revnum and
5022 * @a changelists are always @c NULL, and @a depth is set according to
5023 * @a recurse: if @a recurse is TRUE, then @a depth is
5024 * #svn_depth_infinity, else #svn_depth_empty.
5026 * @deprecated Provided for backward compatibility with the 1.4 API.
5030 svn_client_propget2(apr_hash_t **props,
5031 const char *propname,
5033 const svn_opt_revision_t *peg_revision,
5034 const svn_opt_revision_t *revision,
5035 svn_boolean_t recurse,
5036 svn_client_ctx_t *ctx,
5040 * Similar to svn_client_propget2(), except that @a peg_revision is
5041 * always the same as @a revision.
5043 * @deprecated Provided for backward compatibility with the 1.1 API.
5047 svn_client_propget(apr_hash_t **props,
5048 const char *propname,
5050 const svn_opt_revision_t *revision,
5051 svn_boolean_t recurse,
5052 svn_client_ctx_t *ctx,
5055 /** Set @a *propval to the value of @a propname on revision @a revision
5056 * in the repository represented by @a URL. Use the authentication baton
5057 * in @a ctx for authentication, and @a pool for all memory allocation.
5058 * Return the actual rev queried in @a *set_rev.
5060 * Note that unlike its cousin svn_client_propget(), this routine
5061 * doesn't affect the working copy at all; it's a pure network
5062 * operation that queries an *unversioned* property attached to a
5063 * revision. This can query log messages, dates, authors, and the
5067 svn_client_revprop_get(const char *propname,
5068 svn_string_t **propval,
5070 const svn_opt_revision_t *revision,
5071 svn_revnum_t *set_rev,
5072 svn_client_ctx_t *ctx,
5076 * Invoke @a receiver with @a receiver_baton to return the regular explicit, and
5077 * possibly the inherited, properties of @a target, a URL or working copy path.
5078 * @a receiver will be called for each path encountered.
5080 * @a target is a WC path or a URL.
5082 * If @a revision->kind is #svn_opt_revision_unspecified, then get the
5083 * explicit (and possibly the inherited) properties from the working copy,
5084 * if @a target is a working copy path, or from the repository head if
5085 * @a target is a URL. Else get the properties as of @a revision.
5086 * The actual node revision selected is determined by the path as it exists
5087 * in @a peg_revision. If @a peg_revision->kind is
5088 * #svn_opt_revision_unspecified, then it defaults to #svn_opt_revision_head
5089 * for URLs or #svn_opt_revision_working for WC targets. Use the
5090 * authentication baton cached in @a ctx for authentication if contacting
5093 * If @a depth is #svn_depth_empty, list only the properties of
5094 * @a target itself. If @a depth is #svn_depth_files, and
5095 * @a target is a directory, list the properties of @a target
5096 * and its file entries. If #svn_depth_immediates, list the properties
5097 * of its immediate file and directory entries. If #svn_depth_infinity,
5098 * list the properties of its file entries and recurse (with
5099 * #svn_depth_infinity) on directory entries. #svn_depth_unknown is
5100 * equivalent to #svn_depth_empty. All other values produce undefined
5103 * @a changelists is an array of <tt>const char *</tt> changelist
5104 * names, used as a restrictive filter on items whose properties are
5105 * listed; that is, don't list properties on any item unless it's a member
5106 * of one of those changelists. If @a changelists is empty (or
5107 * altogether @c NULL), no changelist filtering occurs.
5109 * If @a get_target_inherited_props is true, then also return any inherited
5110 * properties when @a receiver is called for @a target. If @a target is a
5111 * working copy path, then properties inherited by @a target as far as the
5112 * root of the working copy are obtained from the working copy's actual
5113 * property values. Properties inherited from above the working copy
5114 * root come from the inherited properties cache. If @a target is a URL,
5115 * then the inherited properties come from the repository.
5116 * If @a get_target_inherited_props is false, then no inherited properties
5117 * are returned to @a receiver.
5119 * If @a target is not found, return the error #SVN_ERR_ENTRY_NOT_FOUND.
5121 * @since New in 1.8.
5124 svn_client_proplist4(const char *target,
5125 const svn_opt_revision_t *peg_revision,
5126 const svn_opt_revision_t *revision,
5128 const apr_array_header_t *changelists,
5129 svn_boolean_t get_target_inherited_props,
5130 svn_proplist_receiver2_t receiver,
5131 void *receiver_baton,
5132 svn_client_ctx_t *ctx,
5133 apr_pool_t *scratch_pool);
5136 * Similar to svn_client_proplist4(), except that the @a receiver type
5137 * is a #svn_proplist_receiver_t, @a get_target_inherited_props is
5138 * always passed NULL, and there is no separate scratch pool.
5140 * @since New in 1.5.
5141 * @deprecated Provided for backward compatibility with the 1.7 API.
5145 svn_client_proplist3(const char *target,
5146 const svn_opt_revision_t *peg_revision,
5147 const svn_opt_revision_t *revision,
5149 const apr_array_header_t *changelists,
5150 svn_proplist_receiver_t receiver,
5151 void *receiver_baton,
5152 svn_client_ctx_t *ctx,
5156 * Similar to svn_client_proplist3(), except the properties are
5157 * returned as an array of #svn_client_proplist_item_t * structures
5158 * instead of by invoking the receiver function, there's no support
5159 * for @a changelists filtering, and @a recurse is used instead of a
5160 * #svn_depth_t parameter (FALSE corresponds to #svn_depth_empty,
5161 * and TRUE to #svn_depth_infinity).
5163 * @since New in 1.2.
5165 * @deprecated Provided for backward compatibility with the 1.4 API.
5169 svn_client_proplist2(apr_array_header_t **props,
5171 const svn_opt_revision_t *peg_revision,
5172 const svn_opt_revision_t *revision,
5173 svn_boolean_t recurse,
5174 svn_client_ctx_t *ctx,
5178 * Similar to svn_client_proplist2(), except that @a peg_revision is
5179 * always the same as @a revision.
5181 * @deprecated Provided for backward compatibility with the 1.1 API.
5185 svn_client_proplist(apr_array_header_t **props,
5187 const svn_opt_revision_t *revision,
5188 svn_boolean_t recurse,
5189 svn_client_ctx_t *ctx,
5192 /** Set @a *props to a hash of the revision props attached to @a revision in
5193 * the repository represented by @a URL. Use the authentication baton cached
5194 * in @a ctx for authentication, and @a pool for all memory allocation.
5195 * Return the actual rev queried in @a *set_rev.
5197 * The allocated hash maps (<tt>const char *</tt>) property names to
5198 * (#svn_string_t *) property values.
5200 * Note that unlike its cousin svn_client_proplist(), this routine
5201 * doesn't read a working copy at all; it's a pure network operation
5202 * that reads *unversioned* properties attached to a revision.
5205 svn_client_revprop_list(apr_hash_t **props,
5207 const svn_opt_revision_t *revision,
5208 svn_revnum_t *set_rev,
5209 svn_client_ctx_t *ctx,
5215 * @defgroup Export Export a tree from version control.
5221 * Export the contents of either a subversion repository or a
5222 * subversion working copy into a 'clean' directory (meaning a
5223 * directory with no administrative directories). If @a result_rev
5224 * is not @c NULL and the path being exported is a repository URL, set
5225 * @a *result_rev to the value of the revision actually exported (set
5226 * it to #SVN_INVALID_REVNUM for local exports).
5228 * @a from_path_or_url is either the path the working copy on disk, or
5229 * a URL to the repository you wish to export.
5231 * When exporting a directory, @a to_path is the path to the directory
5232 * where you wish to create the exported tree; when exporting a file, it
5233 * is the path of the file that will be created. If @a to_path is the
5234 * empty path, then the basename of the export file/directory in the repository
5235 * will be used. If @a to_path represents an existing directory, and a
5236 * file is being exported, then a file with the that basename will be
5237 * created under that directory (as with 'copy' operations).
5239 * @a peg_revision is the revision where the path is first looked up
5240 * when exporting from a repository. If @a peg_revision->kind is
5241 * #svn_opt_revision_unspecified, then it defaults to #svn_opt_revision_head
5242 * for URLs or #svn_opt_revision_working for WC targets.
5244 * @a revision is the revision that should be exported, which is only used
5245 * when exporting from a repository.
5247 * @a peg_revision and @a revision must not be @c NULL.
5249 * @a ctx->notify_func2 and @a ctx->notify_baton2 are the notification
5250 * functions and baton which are passed to svn_client_checkout() when
5251 * exporting from a repository.
5253 * @a ctx is a context used for authentication in the repository case.
5255 * @a overwrite if TRUE will cause the export to overwrite files or
5258 * If @a ignore_externals is set, don't process externals definitions
5259 * as part of this operation.
5261 * If @a ignore_keywords is set, don't expand keywords as part of this
5264 * @a native_eol allows you to override the standard eol marker on the
5265 * platform you are running on. Can be either "LF", "CR" or "CRLF" or
5266 * NULL. If NULL will use the standard eol marker. Any other value
5267 * will cause the #SVN_ERR_IO_UNKNOWN_EOL error to be returned.
5269 * If @a depth is #svn_depth_infinity, export fully recursively. Else
5270 * if it is #svn_depth_immediates, export @a from_path_or_url and its
5271 * immediate children (if any), but with subdirectories empty and at
5272 * #svn_depth_empty. Else if #svn_depth_files, export @a
5273 * from_path_or_url and its immediate file children (if any) only. If
5274 * @a depth is #svn_depth_empty, then export exactly @a
5275 * from_path_or_url and none of its children.
5277 * All allocations are done in @a pool.
5279 * @since New in 1.7.
5282 svn_client_export5(svn_revnum_t *result_rev,
5283 const char *from_path_or_url,
5284 const char *to_path,
5285 const svn_opt_revision_t *peg_revision,
5286 const svn_opt_revision_t *revision,
5287 svn_boolean_t overwrite,
5288 svn_boolean_t ignore_externals,
5289 svn_boolean_t ignore_keywords,
5291 const char *native_eol,
5292 svn_client_ctx_t *ctx,
5296 * Similar to svn_client_export5(), but with @a ignore_keywords set
5299 * @deprecated Provided for backward compatibility with the 1.6 API.
5300 * @since New in 1.5.
5304 svn_client_export4(svn_revnum_t *result_rev,
5305 const char *from_path_or_url,
5306 const char *to_path,
5307 const svn_opt_revision_t *peg_revision,
5308 const svn_opt_revision_t *revision,
5309 svn_boolean_t overwrite,
5310 svn_boolean_t ignore_externals,
5312 const char *native_eol,
5313 svn_client_ctx_t *ctx,
5318 * Similar to svn_client_export4(), but with @a depth set according to
5319 * @a recurse: if @a recurse is TRUE, set @a depth to
5320 * #svn_depth_infinity, if @a recurse is FALSE, set @a depth to
5323 * @deprecated Provided for backward compatibility with the 1.4 API.
5325 * @since New in 1.2.
5329 svn_client_export3(svn_revnum_t *result_rev,
5330 const char *from_path_or_url,
5331 const char *to_path,
5332 const svn_opt_revision_t *peg_revision,
5333 const svn_opt_revision_t *revision,
5334 svn_boolean_t overwrite,
5335 svn_boolean_t ignore_externals,
5336 svn_boolean_t recurse,
5337 const char *native_eol,
5338 svn_client_ctx_t *ctx,
5343 * Similar to svn_client_export3(), but with @a peg_revision
5344 * always set to #svn_opt_revision_unspecified, @a overwrite set to
5345 * the value of @a force, @a ignore_externals always FALSE, and
5346 * @a recurse always TRUE.
5348 * @since New in 1.1.
5349 * @deprecated Provided for backward compatibility with the 1.1 API.
5353 svn_client_export2(svn_revnum_t *result_rev,
5354 const char *from_path_or_url,
5355 const char *to_path,
5356 svn_opt_revision_t *revision,
5357 svn_boolean_t force,
5358 const char *native_eol,
5359 svn_client_ctx_t *ctx,
5364 * Similar to svn_client_export2(), but with @a native_eol always set
5367 * @deprecated Provided for backward compatibility with the 1.0 API.
5371 svn_client_export(svn_revnum_t *result_rev,
5372 const char *from_path_or_url,
5373 const char *to_path,
5374 svn_opt_revision_t *revision,
5375 svn_boolean_t force,
5376 svn_client_ctx_t *ctx,
5382 * @defgroup List List / ls
5387 /** The type of function invoked by svn_client_list3() to report the details
5388 * of each directory entry being listed.
5390 * @a baton is the baton that was passed to the caller. @a path is the
5391 * entry's path relative to @a abs_path; it is the empty path when reporting
5392 * the top node of the list operation. @a dirent contains some or all of
5393 * the directory entry's details, as determined by the caller. @a lock is
5394 * the entry's lock, if it is locked and if lock information is being
5395 * reported by the caller; otherwise @a lock is NULL. @a abs_path is the
5396 * repository path of the top node of the list operation; it is relative to
5397 * the repository root and begins with "/".
5399 * If svn_client_list3() was called with @a include_externals set to TRUE,
5400 * @a external_parent_url and @a external_target will be set.
5401 * @a external_parent_url is url of the directory which has the
5402 * externals definitions. @a external_target is the target subdirectory of
5403 * externals definitions which is relative to the parent directory that holds
5404 * the external item.
5406 * If external_parent_url and external_target are defined, the item being
5407 * listed is part of the external described by external_parent_url and
5408 * external_target. Else, the item is not part of any external.
5409 * Moreover, we will never mix items which are part of separate
5410 * externals, and will always finish listing an external before listing
5413 * @a scratch_pool may be used for temporary allocations.
5415 * @since New in 1.8.
5417 typedef svn_error_t *(*svn_client_list_func2_t)(
5420 const svn_dirent_t *dirent,
5421 const svn_lock_t *lock,
5422 const char *abs_path,
5423 const char *external_parent_url,
5424 const char *external_target,
5425 apr_pool_t *scratch_pool);
5428 * Similar to #svn_client_list_func2_t, but without any information about
5429 * externals definitions.
5431 * @deprecated Provided for backward compatibility with the 1.7 API.
5436 typedef svn_error_t *(*svn_client_list_func_t)(void *baton,
5438 const svn_dirent_t *dirent,
5439 const svn_lock_t *lock,
5440 const char *abs_path,
5444 * Report the directory entry, and possibly children, for @a
5445 * path_or_url at @a revision. The actual node revision selected is
5446 * determined by the path as it exists in @a peg_revision. If @a
5447 * peg_revision->kind is #svn_opt_revision_unspecified, then it defaults
5448 * to #svn_opt_revision_head for URLs or #svn_opt_revision_working
5451 * Report directory entries by invoking @a list_func/@a baton with @a path
5452 * relative to @a path_or_url. The dirent for @a path_or_url is reported
5453 * using an empty @a path. If @a path_or_url is a directory, also report
5454 * its children. If @a path_or_url is non-existent, return
5455 * #SVN_ERR_FS_NOT_FOUND.
5457 * If @a fetch_locks is TRUE, include locks when reporting directory entries.
5459 * If @a include_externals is TRUE, also list all external items
5460 * reached by recursion. @a depth value passed to the original list target
5461 * applies for the externals also.
5463 * Use @a pool for temporary allocations.
5465 * Use authentication baton cached in @a ctx to authenticate against the
5468 * If @a depth is #svn_depth_empty, list just @a path_or_url itself.
5469 * If @a depth is #svn_depth_files, list @a path_or_url and its file
5470 * entries. If #svn_depth_immediates, list its immediate file and
5471 * directory entries. If #svn_depth_infinity, list file entries and
5472 * recurse (with #svn_depth_infinity) on directory entries.
5474 * @a dirent_fields controls which fields in the #svn_dirent_t's are
5475 * filled in. To have them totally filled in use #SVN_DIRENT_ALL,
5476 * otherwise simply bitwise OR together the combination of @c SVN_DIRENT_
5477 * fields you care about.
5479 * @since New in 1.8.
5482 svn_client_list3(const char *path_or_url,
5483 const svn_opt_revision_t *peg_revision,
5484 const svn_opt_revision_t *revision,
5486 apr_uint32_t dirent_fields,
5487 svn_boolean_t fetch_locks,
5488 svn_boolean_t include_externals,
5489 svn_client_list_func2_t list_func,
5491 svn_client_ctx_t *ctx,
5495 /** Similar to svn_client_list3(), but with @a include_externals set
5496 * to FALSE, and using a #svn_client_list_func_t as callback.
5498 * @deprecated Provided for backwards compatibility with the 1.7 API.
5500 * @since New in 1.5.
5504 svn_client_list2(const char *path_or_url,
5505 const svn_opt_revision_t *peg_revision,
5506 const svn_opt_revision_t *revision,
5508 apr_uint32_t dirent_fields,
5509 svn_boolean_t fetch_locks,
5510 svn_client_list_func_t list_func,
5512 svn_client_ctx_t *ctx,
5516 * Similar to svn_client_list2(), but with @a recurse instead of @a depth.
5517 * If @a recurse is TRUE, pass #svn_depth_files for @a depth; else
5518 * pass #svn_depth_infinity.
5520 * @since New in 1.4.
5522 * @deprecated Provided for backward compatibility with the 1.4 API.
5526 svn_client_list(const char *path_or_url,
5527 const svn_opt_revision_t *peg_revision,
5528 const svn_opt_revision_t *revision,
5529 svn_boolean_t recurse,
5530 apr_uint32_t dirent_fields,
5531 svn_boolean_t fetch_locks,
5532 svn_client_list_func_t list_func,
5534 svn_client_ctx_t *ctx,
5538 * Same as svn_client_list(), but always passes #SVN_DIRENT_ALL for
5539 * the @a dirent_fields argument and returns all information in two
5540 * hash tables instead of invoking a callback.
5542 * Set @a *dirents to a newly allocated hash of directory entries.
5543 * The @a dirents hash maps entry names (<tt>const char *</tt>) to
5544 * #svn_dirent_t *'s.
5546 * If @a locks is not @c NULL, set @a *locks to a hash table mapping
5547 * entry names (<tt>const char *</tt>) to #svn_lock_t *'s.
5549 * @since New in 1.3.
5551 * @deprecated Provided for backward compatibility with the 1.3 API.
5552 * Use svn_client_list2() instead.
5556 svn_client_ls3(apr_hash_t **dirents,
5558 const char *path_or_url,
5559 const svn_opt_revision_t *peg_revision,
5560 const svn_opt_revision_t *revision,
5561 svn_boolean_t recurse,
5562 svn_client_ctx_t *ctx,
5566 * Same as svn_client_ls3(), but without the ability to get locks.
5568 * @since New in 1.2.
5570 * @deprecated Provided for backward compatibility with the 1.2 API.
5571 * Use svn_client_list2() instead.
5575 svn_client_ls2(apr_hash_t **dirents,
5576 const char *path_or_url,
5577 const svn_opt_revision_t *peg_revision,
5578 const svn_opt_revision_t *revision,
5579 svn_boolean_t recurse,
5580 svn_client_ctx_t *ctx,
5584 * Similar to svn_client_ls2() except that @a peg_revision is always
5585 * the same as @a revision.
5587 * @deprecated Provided for backward compatibility with the 1.1 API.
5588 * Use svn_client_list2() instead.
5592 svn_client_ls(apr_hash_t **dirents,
5593 const char *path_or_url,
5594 svn_opt_revision_t *revision,
5595 svn_boolean_t recurse,
5596 svn_client_ctx_t *ctx,
5603 * @defgroup Cat View the contents of a file in the repository.
5609 * Output the content of a file.
5611 * @param[in] out The stream to which the content will be written.
5612 * @param[in] path_or_url The path or URL of the file.
5613 * @param[in] peg_revision The peg revision.
5614 * @param[in] revision The operative revision.
5615 * @param[in] ctx The standard client context, used for possible
5617 * @param[in] pool Used for any temporary allocation.
5619 * @todo Add an expansion/translation flag?
5621 * @return A pointer to an #svn_error_t of the type (this list is not
5623 * An unspecified error if @a revision is of kind
5624 * #svn_opt_revision_previous (or some other kind that requires
5625 * a local path), because the desired revision cannot be
5627 * If no error occurred, return #SVN_NO_ERROR.
5629 * @since New in 1.2.
5631 * @see #svn_client_ctx_t <br> @ref clnt_revisions for
5632 * a discussion of operative and peg revisions.
5635 svn_client_cat2(svn_stream_t *out,
5636 const char *path_or_url,
5637 const svn_opt_revision_t *peg_revision,
5638 const svn_opt_revision_t *revision,
5639 svn_client_ctx_t *ctx,
5644 * Similar to svn_client_cat2() except that the peg revision is always
5645 * the same as @a revision.
5647 * @deprecated Provided for backward compatibility with the 1.1 API.
5651 svn_client_cat(svn_stream_t *out,
5652 const char *path_or_url,
5653 const svn_opt_revision_t *revision,
5654 svn_client_ctx_t *ctx,
5657 /** @} end group: cat */
5661 /** Changelist commands
5663 * @defgroup svn_client_changelist_funcs Client Changelist Functions
5667 /** Implementation note:
5669 * For now, changelists are implemented by scattering the
5670 * associations across multiple .svn/entries files in a working copy.
5671 * However, this client API was written so that we have the option of
5672 * changing the underlying implementation -- we may someday want to
5673 * store changelist definitions in a centralized database.
5677 * Add each path in @a paths (recursing to @a depth as necessary) to
5678 * @a changelist. If a path is already a member of another
5679 * changelist, then remove it from the other changelist and add it to
5680 * @a changelist. (For now, a path cannot belong to two changelists
5683 * @a paths is an array of (const char *) local WC paths.
5685 * @a changelists is an array of <tt>const char *</tt> changelist
5686 * names, used as a restrictive filter on items whose changelist
5687 * assignments are adjusted; that is, don't tweak the changeset of any
5688 * item unless it's currently a member of one of those changelists.
5689 * If @a changelists is empty (or altogether @c NULL), no changelist
5692 * @note This metadata is purely a client-side "bookkeeping"
5693 * convenience, and is entirely managed by the working copy.
5695 * @since New in 1.5.
5698 svn_client_add_to_changelist(const apr_array_header_t *paths,
5699 const char *changelist,
5701 const apr_array_header_t *changelists,
5702 svn_client_ctx_t *ctx,
5706 * Remove each path in @a paths (recursing to @a depth as necessary)
5707 * from changelists to which they are currently assigned.
5709 * @a paths is an array of (const char *) local WC paths.
5711 * @a changelists is an array of <tt>const char *</tt> changelist
5712 * names, used as a restrictive filter on items whose changelist
5713 * assignments are removed; that is, don't remove from a changeset any
5714 * item unless it's currently a member of one of those changelists.
5715 * If @a changelists is empty (or altogether @c NULL), all changelist
5716 * assignments in and under each path in @a paths (to @a depth) will
5719 * @note This metadata is purely a client-side "bookkeeping"
5720 * convenience, and is entirely managed by the working copy.
5722 * @since New in 1.5.
5725 svn_client_remove_from_changelists(const apr_array_header_t *paths,
5727 const apr_array_header_t *changelists,
5728 svn_client_ctx_t *ctx,
5733 * Beginning at @a path, crawl to @a depth to discover every path in
5734 * or under @a path which belongs to one of the changelists in @a
5735 * changelists (an array of <tt>const char *</tt> changelist names).
5736 * If @a changelists is @c NULL, discover paths with any changelist.
5737 * Call @a callback_func (with @a callback_baton) each time a
5738 * changelist-having path is discovered.
5740 * @a path is a local WC path.
5742 * If @a ctx->cancel_func is not @c NULL, invoke it passing @a
5743 * ctx->cancel_baton during the recursive walk.
5745 * @since New in 1.5.
5748 svn_client_get_changelists(const char *path,
5749 const apr_array_header_t *changelists,
5751 svn_changelist_receiver_t callback_func,
5752 void *callback_baton,
5753 svn_client_ctx_t *ctx,
5760 /** Locking commands
5762 * @defgroup svn_client_locking_funcs Client Locking Functions
5767 * Lock @a targets in the repository. @a targets is an array of
5768 * <tt>const char *</tt> paths - either all working copy paths or all URLs.
5769 * All targets must be in the same repository.
5771 * If a target is already locked in the repository, no lock will be
5772 * acquired unless @a steal_lock is TRUE, in which case the locks are
5773 * stolen. @a comment, if non-NULL, is an xml-escapable description
5774 * stored with each lock in the repository. Each acquired lock will
5775 * be stored in the working copy if the targets are WC paths.
5777 * For each target @a ctx->notify_func2/notify_baton2 will be used to indicate
5778 * whether it was locked. An action of #svn_wc_notify_locked
5779 * means that the path was locked. If the path was not locked because
5780 * it was out of date or there was already a lock in the repository,
5781 * the notification function will be called with
5782 * #svn_wc_notify_failed_lock, and the error passed in the notification
5785 * Use @a pool for temporary allocations.
5787 * @since New in 1.2.
5790 svn_client_lock(const apr_array_header_t *targets,
5791 const char *comment,
5792 svn_boolean_t steal_lock,
5793 svn_client_ctx_t *ctx,
5797 * Unlock @a targets in the repository. @a targets is an array of
5798 * <tt>const char *</tt> paths - either all working copy paths or all URLs.
5799 * All targets must be in the same repository.
5801 * If the targets are WC paths, and @a break_lock is FALSE, the working
5802 * copy must contain a lock for each target.
5803 * If this is not the case, or the working copy lock doesn't match the
5804 * lock token in the repository, an error will be signaled.
5806 * If the targets are URLs, the locks may be broken even if @a break_lock
5807 * is FALSE, but only if the lock owner is the same as the
5808 * authenticated user.
5810 * If @a break_lock is TRUE, the locks will be broken in the
5811 * repository. In both cases, the locks, if any, will be removed from
5812 * the working copy if the targets are WC paths.
5814 * The notification functions in @a ctx will be called for each
5815 * target. If the target was successfully unlocked,
5816 * #svn_wc_notify_unlocked will be used. Else, if the error is
5817 * directly related to unlocking the path (see
5818 * #SVN_ERR_IS_UNLOCK_ERROR), #svn_wc_notify_failed_unlock will be
5819 * used and the error will be passed in the notification structure.
5821 * Use @a pool for temporary allocations.
5823 * @since New in 1.2.
5826 svn_client_unlock(const apr_array_header_t *targets,
5827 svn_boolean_t break_lock,
5828 svn_client_ctx_t *ctx,
5834 * @defgroup Info Show repository information about a working copy.
5839 /** The size of the file is unknown.
5840 * Used as value in fields of type @c apr_size_t in #svn_info_t.
5843 * @deprecated Provided for backward compatibility with the 1.6 API.
5845 #define SVN_INFO_SIZE_UNKNOWN ((apr_size_t) -1)
5848 * A structure which describes various system-generated metadata about
5849 * a working-copy path or URL.
5851 * @note Fields may be added to the end of this structure in future
5852 * versions. Therefore, users shouldn't allocate structures of this
5853 * type, to preserve binary compatibility.
5855 * @since New in 1.2.
5856 * @deprecated Provided for backward compatibility with the 1.6 API. The new
5857 * API is #svn_client_info2_t.
5859 typedef struct svn_info_t
5861 /** Where the item lives in the repository. */
5864 /** The revision of the object. If path_or_url is a working-copy
5865 * path, then this is its current working revnum. If path_or_url
5866 * is a URL, then this is the repos revision that path_or_url lives in. */
5869 /** The node's kind. */
5870 svn_node_kind_t kind;
5872 /** The root URL of the repository. */
5873 const char *repos_root_URL;
5875 /** The repository's UUID. */
5876 const char *repos_UUID;
5878 /** The last revision in which this object changed. */
5879 svn_revnum_t last_changed_rev;
5881 /** The date of the last_changed_rev. */
5882 apr_time_t last_changed_date;
5884 /** The author of the last_changed_rev. */
5885 const char *last_changed_author;
5887 /** An exclusive lock, if present. Could be either local or remote. */
5890 /** Whether or not to ignore the next 10 wc-specific fields. */
5891 svn_boolean_t has_wc_info;
5894 * @name Working-copy path fields
5895 * These things only apply to a working-copy path.
5896 * See svn_wc_entry_t for explanations.
5899 svn_wc_schedule_t schedule;
5900 const char *copyfrom_url;
5901 svn_revnum_t copyfrom_rev;
5902 apr_time_t text_time;
5903 apr_time_t prop_time; /* will always be 0 for svn 1.4 and later */
5904 const char *checksum;
5905 const char *conflict_old;
5906 const char *conflict_new;
5907 const char *conflict_wrk;
5908 const char *prejfile;
5909 /** @since New in 1.5. */
5910 const char *changelist;
5911 /** @since New in 1.5. */
5915 * Similar to working_size64, but will be #SVN_INFO_SIZE_UNKNOWN when
5916 * its value would overflow apr_size_t (so when size >= 4 GB - 1 byte).
5918 * @deprecated Provided for backward compatibility with the 1.5 API.
5920 apr_size_t working_size;
5925 * Similar to size64, but size will be #SVN_INFO_SIZE_UNKNOWN when
5926 * its value would overflow apr_size_t (so when size >= 4 GB - 1 byte).
5928 * @deprecated Provided for backward compatibility with the 1.5 API.
5933 * The size of the file in the repository (untranslated,
5934 * e.g. without adjustment of line endings and keyword
5935 * expansion). Only applicable for file -- not directory -- URLs.
5936 * For working copy paths, size64 will be #SVN_INVALID_FILESIZE.
5937 * @since New in 1.6.
5939 svn_filesize_t size64;
5942 * The size of the file after being translated into its local
5943 * representation, or #SVN_INVALID_FILESIZE if unknown.
5944 * Not applicable for directories.
5945 * @since New in 1.6.
5946 * @name Working-copy path fields
5949 svn_filesize_t working_size64;
5952 * Info on any tree conflict of which this node is a victim. Otherwise NULL.
5953 * @since New in 1.6.
5955 svn_wc_conflict_description_t *tree_conflict;
5963 * The callback invoked by svn_client_info2(). Each invocation
5964 * describes @a path with the information present in @a info. Note
5965 * that any fields within @a info may be NULL if information is
5966 * unavailable. Use @a pool for all temporary allocation.
5968 * @since New in 1.2.
5969 * @deprecated Provided for backward compatibility with the 1.6 API. The new
5970 * API is #svn_client_info_receiver2_t.
5972 typedef svn_error_t *(*svn_info_receiver_t)(
5975 const svn_info_t *info,
5979 * Return a duplicate of @a info, allocated in @a pool. No part of the new
5980 * structure will be shared with @a info.
5982 * @since New in 1.3.
5983 * @deprecated Provided for backward compatibility with the 1.6 API. The new
5984 * API is #svn_client_info2_dup().
5988 svn_info_dup(const svn_info_t *info,
5992 * A structure which describes various system-generated metadata about
5993 * a working-copy path or URL.
5995 * @note Fields may be added to the end of this structure in future
5996 * versions. Therefore, users shouldn't allocate structures of this
5997 * type, to preserve binary compatibility.
5999 * @since New in 1.7.
6001 typedef struct svn_client_info2_t
6003 /** Where the item lives in the repository. */
6006 /** The revision of the object. If the target is a working-copy
6007 * path, then this is its current working revnum. If the target
6008 * is a URL, then this is the repos revision that it lives in. */
6011 /** The root URL of the repository. */
6012 const char *repos_root_URL;
6014 /** The repository's UUID. */
6015 const char *repos_UUID;
6017 /** The node's kind. */
6018 svn_node_kind_t kind;
6020 /** The size of the file in the repository (untranslated,
6021 * e.g. without adjustment of line endings and keyword
6022 * expansion). Only applicable for file -- not directory -- URLs.
6023 * For working copy paths, @a size will be #SVN_INVALID_FILESIZE. */
6024 svn_filesize_t size;
6026 /** The last revision in which this object changed. */
6027 svn_revnum_t last_changed_rev;
6029 /** The date of the last_changed_rev. */
6030 apr_time_t last_changed_date;
6032 /** The author of the last_changed_rev. */
6033 const char *last_changed_author;
6035 /** An exclusive lock, if present. Could be either local or remote. */
6036 const svn_lock_t *lock;
6038 /** Possible information about the working copy, NULL if not valid. */
6039 const svn_wc_info_t *wc_info;
6041 } svn_client_info2_t;
6044 * Return a duplicate of @a info, allocated in @a pool. No part of the new
6045 * structure will be shared with @a info.
6047 * @since New in 1.7.
6049 svn_client_info2_t *
6050 svn_client_info2_dup(const svn_client_info2_t *info,
6054 * The callback invoked by info retrievers. Each invocation
6055 * describes @a abspath_or_url with the information present in @a info.
6056 * Use @a scratch_pool for all temporary allocation.
6058 * @since New in 1.7.
6060 typedef svn_error_t *(*svn_client_info_receiver2_t)(
6062 const char *abspath_or_url,
6063 const svn_client_info2_t *info,
6064 apr_pool_t *scratch_pool);
6067 * Invoke @a receiver with @a receiver_baton to return information
6068 * about @a abspath_or_url in @a revision. The information returned is
6069 * system-generated metadata, not the sort of "property" metadata
6070 * created by users. See #svn_client_info2_t.
6072 * If both revision arguments are either #svn_opt_revision_unspecified
6073 * or @c NULL, then information will be pulled solely from the working copy;
6074 * no network connections will be made.
6076 * Otherwise, information will be pulled from a repository. The
6077 * actual node revision selected is determined by the @a abspath_or_url
6078 * as it exists in @a peg_revision. If @a peg_revision->kind is
6079 * #svn_opt_revision_unspecified, then it defaults to
6080 * #svn_opt_revision_head for URLs or #svn_opt_revision_working for
6083 * If @a abspath_or_url is not a local path, then if @a revision is of
6084 * kind #svn_opt_revision_previous (or some other kind that requires
6085 * a local path), an error will be returned, because the desired
6086 * revision cannot be determined.
6088 * Use the authentication baton cached in @a ctx to authenticate
6089 * against the repository.
6091 * If @a abspath_or_url is a file, just invoke @a receiver on it. If it
6092 * is a directory, then descend according to @a depth. If @a depth is
6093 * #svn_depth_empty, invoke @a receiver on @a abspath_or_url and
6094 * nothing else; if #svn_depth_files, on @a abspath_or_url and its
6095 * immediate file children; if #svn_depth_immediates, the preceding
6096 * plus on each immediate subdirectory; if #svn_depth_infinity, then
6097 * recurse fully, invoking @a receiver on @a abspath_or_url and
6098 * everything beneath it.
6100 * If @a fetch_excluded is TRUE, also also send excluded nodes in the working
6101 * copy to @a receiver, otherwise these are skipped. If @a fetch_actual_only
6102 * is TRUE also send nodes that don't exist as versioned but are still
6105 * @a changelists is an array of <tt>const char *</tt> changelist
6106 * names, used as a restrictive filter on items whose info is
6107 * reported; that is, don't report info about any item unless
6108 * it's a member of one of those changelists. If @a changelists is
6109 * empty (or altogether @c NULL), no changelist filtering occurs.
6111 * @since New in 1.7.
6114 svn_client_info3(const char *abspath_or_url,
6115 const svn_opt_revision_t *peg_revision,
6116 const svn_opt_revision_t *revision,
6118 svn_boolean_t fetch_excluded,
6119 svn_boolean_t fetch_actual_only,
6120 const apr_array_header_t *changelists,
6121 svn_client_info_receiver2_t receiver,
6122 void *receiver_baton,
6123 svn_client_ctx_t *ctx,
6124 apr_pool_t *scratch_pool);
6126 /** Similar to svn_client_info3, but uses an svn_info_receiver_t instead of
6127 * a #svn_client_info_receiver2_t, and @a path_or_url may be a relative path.
6129 * @since New in 1.5.
6130 * @deprecated Provided for backward compatibility with the 1.6 API.
6134 svn_client_info2(const char *path_or_url,
6135 const svn_opt_revision_t *peg_revision,
6136 const svn_opt_revision_t *revision,
6137 svn_info_receiver_t receiver,
6138 void *receiver_baton,
6140 const apr_array_header_t *changelists,
6141 svn_client_ctx_t *ctx,
6145 * Similar to svn_client_info2() but with @a changelists passed as @c
6146 * NULL, and @a depth set according to @a recurse: if @a recurse is
6147 * TRUE, @a depth is #svn_depth_infinity, else #svn_depth_empty.
6149 * @deprecated Provided for backward compatibility with the 1.4 API.
6153 svn_client_info(const char *path_or_url,
6154 const svn_opt_revision_t *peg_revision,
6155 const svn_opt_revision_t *revision,
6156 svn_info_receiver_t receiver,
6157 void *receiver_baton,
6158 svn_boolean_t recurse,
6159 svn_client_ctx_t *ctx,
6163 * Set @a *wcroot_abspath to the local abspath of the root of the
6164 * working copy in which @a local_abspath resides.
6166 * @since New in 1.7.
6169 svn_client_get_wc_root(const char **wcroot_abspath,
6170 const char *local_abspath,
6171 svn_client_ctx_t *ctx,
6172 apr_pool_t *result_pool,
6173 apr_pool_t *scratch_pool);
6176 * Set @a *min_revision and @a *max_revision to the lowest and highest
6177 * revision numbers found within @a local_abspath. If @a committed is
6178 * TRUE, set @a *min_revision and @a *max_revision to the lowest and
6179 * highest comitted (i.e. "last changed") revision numbers,
6180 * respectively. NULL may be passed for either of @a min_revision and
6181 * @a max_revision to indicate the caller's lack of interest in the
6182 * value. Use @a scratch_pool for temporary allocations.
6184 * @since New in 1.7.
6187 svn_client_min_max_revisions(svn_revnum_t *min_revision,
6188 svn_revnum_t *max_revision,
6189 const char *local_abspath,
6190 svn_boolean_t committed,
6191 svn_client_ctx_t *ctx,
6192 apr_pool_t *scratch_pool);
6198 * @defgroup Patch Apply a patch to the working copy
6204 * The callback invoked by svn_client_patch() before attempting to patch
6205 * the target file at @a canon_path_from_patchfile (the path as parsed from
6206 * the patch file, but in canonicalized form). The callback can set
6207 * @a *filtered to @c TRUE to prevent the file from being patched, or else
6208 * must set it to @c FALSE.
6210 * The callback is also provided with @a patch_abspath, the path of a
6211 * temporary file containing the patched result, and with @a reject_abspath,
6212 * the path to a temporary file containing the diff text of any hunks
6213 * which were rejected during patching.
6215 * Because the callback is invoked before the patching attempt is made,
6216 * there is no guarantee that the target file will actually be patched
6217 * successfully. Client implementations must pay attention to notification
6218 * feedback provided by svn_client_patch() to find out which paths were
6219 * patched successfully.
6221 * Note also that the files at @a patch_abspath and @a reject_abspath are
6222 * guaranteed to remain on disk after patching only if the
6223 * @a remove_tempfiles parameter for svn_client_patch() is @c FALSE.
6225 * The const char * parameters may be allocated in @a scratch_pool which
6226 * will be cleared after each invocation.
6228 * @since New in 1.7.
6230 typedef svn_error_t *(*svn_client_patch_func_t)(
6232 svn_boolean_t *filtered,
6233 const char *canon_path_from_patchfile,
6234 const char *patch_abspath,
6235 const char *reject_abspath,
6236 apr_pool_t *scratch_pool);
6239 * Apply a unidiff patch that's located at absolute path
6240 * @a patch_abspath to the working copy directory at @a wc_dir_abspath.
6242 * This function makes a best-effort attempt at applying the patch.
6243 * It might skip patch targets which cannot be patched (e.g. targets
6244 * that are outside of the working copy). It will also reject hunks
6245 * which cannot be applied to a target in case the hunk's context
6246 * does not match anywhere in the patch target.
6248 * If @a dry_run is TRUE, the patching process is carried out, and full
6249 * notification feedback is provided, but the working copy is not modified.
6251 * @a strip_count specifies how many leading path components should be
6252 * stripped from paths obtained from the patch. It is an error if a
6253 * negative strip count is passed.
6255 * If @a reverse is @c TRUE, apply patches in reverse, deleting lines
6256 * the patch would add and adding lines the patch would delete.
6258 * If @a ignore_whitespace is TRUE, allow patches to be applied if they
6259 * only differ from the target by whitespace.
6261 * If @a remove_tempfiles is TRUE, lifetimes of temporary files created
6262 * during patching will be managed internally. Otherwise, the caller should
6263 * take ownership of these files, the names of which can be obtained by
6264 * passing a @a patch_func callback.
6266 * If @a patch_func is non-NULL, invoke @a patch_func with @a patch_baton
6267 * for each patch target processed.
6269 * If @a ctx->notify_func2 is non-NULL, invoke @a ctx->notify_func2 with
6270 * @a ctx->notify_baton2 as patching progresses.
6272 * If @a ctx->cancel_func is non-NULL, invoke it passing @a
6273 * ctx->cancel_baton at various places during the operation.
6275 * Use @a scratch_pool for temporary allocations.
6277 * @since New in 1.7.
6280 svn_client_patch(const char *patch_abspath,
6281 const char *wc_dir_abspath,
6282 svn_boolean_t dry_run,
6284 svn_boolean_t reverse,
6285 svn_boolean_t ignore_whitespace,
6286 svn_boolean_t remove_tempfiles,
6287 svn_client_patch_func_t patch_func,
6289 svn_client_ctx_t *ctx,
6290 apr_pool_t *scratch_pool);
6294 /** @} end group: Client working copy management */
6298 * @defgroup clnt_sessions Client session related functions
6305 /* Converting paths to URLs. */
6307 /** Set @a *url to the URL for @a path_or_url allocated in result_pool.
6309 * If @a path_or_url is already a URL, set @a *url to @a path_or_url.
6311 * If @a path_or_url is a versioned item, set @a *url to @a
6312 * path_or_url's entry URL. If @a path_or_url is unversioned (has
6313 * no entry), set @a *url to NULL.
6315 * Use @a ctx->wc_ctx to retrieve the information. Use
6316 ** @a scratch_pool for temporary allocations.
6318 * @since New in 1.7.
6321 svn_client_url_from_path2(const char **url,
6322 const char *path_or_url,
6323 svn_client_ctx_t *ctx,
6324 apr_pool_t *result_pool,
6325 apr_pool_t *scratch_pool);
6327 /** Similar to svn_client_url_from_path2(), but without a context argument.
6329 * @since New in 1.5.
6330 * @deprecated Provided for backward compatibility with the 1.6 API.
6334 svn_client_url_from_path(const char **url,
6335 const char *path_or_url,
6340 /* Fetching a repository's root URL and UUID. */
6342 /** Set @a *repos_root_url and @a *repos_uuid, to the root URL and UUID of
6343 * the repository in which @a abspath_or_url is versioned. Use the
6344 * authentication baton and working copy context cached in @a ctx as
6345 * necessary. @a repos_root_url and/or @a repos_uuid may be NULL if not
6348 * This function will open a temporary RA session to the repository if
6349 * necessary to get the information.
6351 * Allocate @a *repos_root_url and @a *repos_uuid in @a result_pool.
6352 * Use @a scratch_pool for temporary allocations.
6354 * @since New in 1.8.
6357 svn_client_get_repos_root(const char **repos_root_url,
6358 const char **repos_uuid,
6359 const char *abspath_or_url,
6360 svn_client_ctx_t *ctx,
6361 apr_pool_t *result_pool,
6362 apr_pool_t *scratch_pool);
6364 /** Set @a *url to the repository root URL of the repository in which
6365 * @a path_or_url is versioned (or scheduled to be versioned),
6366 * allocated in @a pool. @a ctx is required for possible repository
6369 * @since New in 1.5.
6370 * @deprecated Provided for backward compatibility with the 1.7 API. Use
6371 * svn_client_get_repos_root() instead, with an absolute path.
6375 svn_client_root_url_from_path(const char **url,
6376 const char *path_or_url,
6377 svn_client_ctx_t *ctx,
6380 /** Get repository @a uuid for @a url.
6382 * Use a @a pool to open a temporary RA session to @a url, discover the
6383 * repository uuid, and free the session. Return the uuid in @a uuid,
6384 * allocated in @a pool. @a ctx is required for possible repository
6387 * @deprecated Provided for backward compatibility with the 1.7 API. Use
6388 * svn_client_get_repos_root() instead.
6392 svn_client_uuid_from_url(const char **uuid,
6394 svn_client_ctx_t *ctx,
6398 /** Return the repository @a uuid for working-copy @a local_abspath,
6399 * allocated in @a result_pool. Use @a ctx->wc_ctx to retrieve the
6402 * Use @a scratch_pool for temporary allocations.
6404 * @since New in 1.7.
6405 * @deprecated Provided for backward compatibility with the 1.7 API. Use
6406 * svn_client_get_repos_root() instead.
6410 svn_client_uuid_from_path2(const char **uuid,
6411 const char *local_abspath,
6412 svn_client_ctx_t *ctx,
6413 apr_pool_t *result_pool,
6414 apr_pool_t *scratch_pool);
6416 /** Similar to svn_client_uuid_from_path2(), but with a relative path and
6419 * @deprecated Provided for backward compatibility with the 1.6 API.
6423 svn_client_uuid_from_path(const char **uuid,
6425 svn_wc_adm_access_t *adm_access,
6426 svn_client_ctx_t *ctx,
6430 /* Opening RA sessions. */
6432 /** Open an RA session rooted at @a url, and return it in @a *session.
6434 * Use the authentication baton stored in @a ctx for authentication.
6435 * @a *session is allocated in @a result_pool.
6437 * If @a wri_abspath is not NULL, use the working copy identified by @a
6438 * wri_abspath to potentially avoid transferring unneeded data.
6440 * @note This function is similar to svn_ra_open4(), but the caller avoids
6441 * having to providing its own callback functions.
6442 * @since New in 1.8.
6445 svn_client_open_ra_session2(svn_ra_session_t **session,
6447 const char *wri_abspath,
6448 svn_client_ctx_t *ctx,
6449 apr_pool_t *result_pool,
6450 apr_pool_t *scratch_pool);
6452 /** Similar to svn_client_open_ra_session(), but with @ wri_abspath
6453 * always passed as NULL, and with the same pool used as both @a
6454 * result_pool and @a scratch_pool.
6456 * @since New in 1.3.
6457 * @deprecated Provided for backward compatibility with the 1.7 API.
6461 svn_client_open_ra_session(svn_ra_session_t **session,
6463 svn_client_ctx_t *ctx,
6467 /** @} end group: Client session related functions */
6473 #endif /* __cplusplus */
6475 #endif /* SVN_CLIENT_H */