3 * ====================================================================
4 * Copyright (c) 2000-2008 CollabNet. All rights reserved.
6 * This software is licensed as described in the file COPYING, which
7 * you should have received as part of this distribution. The terms
8 * are also available at http://subversion.tigris.org/license-1.html.
9 * If newer versions of this license are posted there, you may use a
10 * newer version instead, at your option.
12 * This software consists of voluntary contributions made by many
13 * individuals. For exact contribution history, see the revision
14 * history and logs, available at http://subversion.tigris.org/.
15 * ====================================================================
19 * @brief Subversion's client library
27 * Requires: The working copy library and repository access library.
28 * Provides: Broad wrappers around working copy library functionality.
29 * Used By: Client programs.
35 #include <apr_tables.h>
37 #include "svn_types.h"
39 #include "svn_string.h"
40 #include "svn_error.h"
42 #include "svn_version.h"
49 #endif /* __cplusplus */
53 ### @todo Multiple Targets
54 - Up for debate: an update on multiple targets is *not* atomic.
55 Right now, svn_client_update only takes one path. What's
56 debatable is whether this should ever change. On the one hand,
57 it's kind of losing to have the client application loop over
58 targets and call svn_client_update() on each one; each call to
59 update initializes a whole new repository session (network
60 overhead, etc.) On the other hand, it's a very simple
61 implementation, and allows for the possibility that different
62 targets may come from different repositories. */
66 * Get libsvn_client version information.
70 const svn_version_t
*svn_client_version(void);
72 /** Client supporting functions
74 * @defgroup clnt_support Client supporting subsystem
80 /*** Authentication stuff ***/
82 /** The new authentication system allows the RA layer to "pull"
83 * information as needed from libsvn_client.
85 * @deprecated Replaced by the svn_auth_* functions.
88 * @defgroup auth_fns_depr (deprecated) AuthZ client subsystem
93 /** Create and return @a *provider, an authentication provider of type
94 * svn_auth_cred_simple_t that gets information by prompting the user
95 * with @a prompt_func and @a prompt_baton. Allocate @a *provider in
98 * If both @c SVN_AUTH_PARAM_DEFAULT_USERNAME and
99 * @c SVN_AUTH_PARAM_DEFAULT_PASSWORD are defined as runtime
100 * parameters in the @c auth_baton, then @a *provider will return the
101 * default arguments when svn_auth_first_credentials() is called. If
102 * svn_auth_first_credentials() fails, then @a *provider will
103 * re-prompt @a retry_limit times (via svn_auth_next_credentials()).
105 * @deprecated Provided for backward compatibility with the 1.3 API.
107 void svn_client_get_simple_prompt_provider
108 (svn_auth_provider_object_t
**provider
,
109 svn_auth_simple_prompt_func_t prompt_func
,
115 /** Create and return @a *provider, an authentication provider of type @c
116 * svn_auth_cred_username_t that gets information by prompting the
117 * user with @a prompt_func and @a prompt_baton. Allocate @a *provider
120 * If @c SVN_AUTH_PARAM_DEFAULT_USERNAME is defined as a runtime
121 * parameter in the @c auth_baton, then @a *provider will return the
122 * default argument when svn_auth_first_credentials() is called. If
123 * svn_auth_first_credentials() fails, then @a *provider will
124 * re-prompt @a retry_limit times (via svn_auth_next_credentials()).
126 * @deprecated Provided for backward compatibility with the 1.3 API.
128 void 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 @c
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 @c
144 * SVN_AUTH_PARAM_DEFAULT_USERNAME and @c
145 * SVN_AUTH_PARAM_DEFAULT_PASSWORD).
147 * @deprecated Provided for backward compatibility with the 1.3 API.
150 svn_client_get_simple_provider(svn_auth_provider_object_t
**provider
,
154 #if (defined(WIN32) && !defined(__MINGW32__)) || defined(DOXYGEN)
156 * Create and return @a *provider, an authentication provider of type @c
157 * svn_auth_cred_simple_t that gets/sets information from the user's
158 * ~/.subversion configuration directory. Allocate @a *provider in
161 * This is like svn_client_get_simple_provider(), except that, when
162 * running on Window 2000 or newer (or any other Windows version that
163 * includes the CryptoAPI), the provider encrypts the password before
164 * storing it to disk. On earlier versions of Windows, the provider
168 * @note This function is only available on Windows.
170 * @note An administrative password reset may invalidate the account's
171 * secret key. This function will detect that situation and behave as
172 * if the password were not cached at all.
174 * @deprecated Provided for backward compatibility with the 1.3 API.
177 svn_client_get_windows_simple_provider(svn_auth_provider_object_t
**provider
,
179 #endif /* WIN32 || DOXYGEN */
181 /** Create and return @a *provider, an authentication provider of type @c
182 * svn_auth_cred_username_t that gets/sets information from a user's
183 * ~/.subversion configuration directory. Allocate @a *provider in
186 * If a default username is available, @a *provider will honor it,
187 * and return it when svn_auth_first_credentials() is called. (see
188 * @c SVN_AUTH_PARAM_DEFAULT_USERNAME).
190 * @deprecated Provided for backward compatibility with the 1.3 API.
193 svn_client_get_username_provider(svn_auth_provider_object_t
**provider
,
197 /** Create and return @a *provider, an authentication provider of type @c
198 * svn_auth_cred_ssl_server_trust_t, allocated in @a pool.
200 * @a *provider retrieves its credentials from the configuration
201 * mechanism. The returned credential is used to override SSL
202 * security on an error.
204 * @deprecated Provided for backward compatibility with the 1.3 API.
207 svn_client_get_ssl_server_trust_file_provider
208 (svn_auth_provider_object_t
**provider
,
212 /** Create and return @a *provider, an authentication provider of type @c
213 * svn_auth_cred_ssl_client_cert_t, allocated in @a pool.
215 * @a *provider retrieves its credentials from the configuration
216 * mechanism. The returned credential is used to load the appropriate
217 * client certificate for authentication when requested by a server.
219 * @deprecated Provided for backward compatibility with the 1.3 API.
222 svn_client_get_ssl_client_cert_file_provider
223 (svn_auth_provider_object_t
**provider
,
227 /** Create and return @a *provider, an authentication provider of type @c
228 * svn_auth_cred_ssl_client_cert_pw_t, allocated in @a pool.
230 * @a *provider retrieves its credentials from the configuration
231 * mechanism. The returned credential is used when a loaded client
232 * certificate is protected by a passphrase.
234 * @deprecated Provided for backward compatibility with the 1.3 API.
237 svn_client_get_ssl_client_cert_pw_file_provider
238 (svn_auth_provider_object_t
**provider
,
242 /** Create and return @a *provider, an authentication provider of type @c
243 * svn_auth_cred_ssl_server_trust_t, allocated in @a pool.
245 * @a *provider retrieves its credentials by using the @a prompt_func
246 * and @a prompt_baton. The returned credential is used to override
247 * SSL security on an error.
249 * @deprecated Provided for backward compatibility with the 1.3 API.
252 svn_client_get_ssl_server_trust_prompt_provider
253 (svn_auth_provider_object_t
**provider
,
254 svn_auth_ssl_server_trust_prompt_func_t prompt_func
,
259 /** Create and return @a *provider, an authentication provider of type @c
260 * svn_auth_cred_ssl_client_cert_t, allocated in @a pool.
262 * @a *provider retrieves its credentials by using the @a prompt_func
263 * and @a prompt_baton. The returned credential is used to load the
264 * appropriate client certificate for authentication when requested by
265 * a server. The prompt will be retried @a retry_limit times.
267 * @deprecated Provided for backward compatibility with the 1.3 API.
270 svn_client_get_ssl_client_cert_prompt_provider
271 (svn_auth_provider_object_t
**provider
,
272 svn_auth_ssl_client_cert_prompt_func_t prompt_func
,
278 /** Create and return @a *provider, an authentication provider of type @c
279 * svn_auth_cred_ssl_client_cert_pw_t, allocated in @a pool.
281 * @a *provider retrieves its credentials by using the @a prompt_func
282 * and @a prompt_baton. The returned credential is used when a loaded
283 * client certificate is protected by a passphrase. The prompt will
284 * be retried @a retry_limit times.
286 * @deprecated Provided for backward compatibility with the 1.3 API.
289 svn_client_get_ssl_client_cert_pw_prompt_provider
290 (svn_auth_provider_object_t
**provider
,
291 svn_auth_ssl_client_cert_pw_prompt_func_t prompt_func
,
301 * @defgroup clnt_commit Client commit subsystem
306 /** This is a structure which stores a filename and a hash of property
309 * @deprecated Provided for backward compatibility with the 1.4 API.
311 typedef struct svn_client_proplist_item_t
313 /** The name of the node on which these properties are set. */
314 svn_stringbuf_t
*node_name
;
316 /** A hash of (const char *) property names, and (svn_string_t *) property
318 apr_hash_t
*prop_hash
;
320 } svn_client_proplist_item_t
;
323 * The callback invoked by svn_client_proplist3(). Each invocation
324 * describes the property specified by @a item. Use @a pool for all
325 * temporary allocation.
329 typedef svn_error_t
*(*svn_proplist_receiver_t
)
332 apr_hash_t
*prop_hash
,
336 * Return a duplicate of @a item, allocated in @a pool. No part of the new
337 * structure will be shared with @a item.
341 * @deprecated Provided for backward compatibility with the 1.4 API.
343 svn_client_proplist_item_t
*
344 svn_client_proplist_item_dup(const svn_client_proplist_item_t
*item
,
347 /** Information about commits passed back to client from this module.
349 * @deprecated Provided for backward compatibility with the 1.2 API.
351 typedef struct svn_client_commit_info_t
353 /** just-committed revision. */
354 svn_revnum_t revision
;
356 /** server-side date of the commit. */
359 /** author of the commit. */
362 } svn_client_commit_info_t
;
366 * @name Commit state flags
367 * @brief State flags for use with the @c svn_client_commit_item3_t structure
368 * (see the note about the namespace for that structure, which also
369 * applies to these flags).
372 #define SVN_CLIENT_COMMIT_ITEM_ADD 0x01
373 #define SVN_CLIENT_COMMIT_ITEM_DELETE 0x02
374 #define SVN_CLIENT_COMMIT_ITEM_TEXT_MODS 0x04
375 #define SVN_CLIENT_COMMIT_ITEM_PROP_MODS 0x08
376 #define SVN_CLIENT_COMMIT_ITEM_IS_COPY 0x10
377 /** @since New in 1.2. */
378 #define SVN_CLIENT_COMMIT_ITEM_LOCK_TOKEN 0x20
381 /** The commit candidate structure. In order to avoid backwards
382 * compatibility problems clients should use
383 * svn_client_commit_item_create() to allocate and intialize this
384 * structure instead of doing so themselves.
388 typedef struct svn_client_commit_item3_t
390 /** absolute working-copy path of item */
393 /** node kind (dir, file) */
394 svn_node_kind_t kind
;
396 /** commit URL for this item */
399 /** revision of textbase */
400 svn_revnum_t revision
;
402 /** copyfrom-url or NULL if not a copied item */
403 const char *copyfrom_url
;
405 /** copyfrom-rev, valid when copyfrom_url != NULL */
406 svn_revnum_t copyfrom_rev
;
409 apr_byte_t state_flags
;
411 /** An array of @c svn_prop_t *'s, which are incoming changes from
412 * the repository to WC properties. These changes are applied
415 * When adding to this array, allocate the @c svn_prop_t and its
416 * contents in @c incoming_prop_changes->pool, so that it has the
417 * same lifetime as this data structure.
419 * See http://subversion.tigris.org/issues/show_bug.cgi?id=806 for a
420 * description of what would happen if the post-commit process
421 * didn't group these changes together with all other changes to the
424 apr_array_header_t
*incoming_prop_changes
;
426 /** An array of @c svn_prop_t *'s, which are outgoing changes to
427 * make to properties in the repository. These extra property
428 * changes are declared pre-commit, and applied to the repository as
431 * When adding to this array, allocate the @c svn_prop_t and its
432 * contents in @c outgoing_prop_changes->pool, so that it has the
433 * same lifetime as this data structure.
435 apr_array_header_t
*outgoing_prop_changes
;
436 } svn_client_commit_item3_t
;
438 /** The commit candidate structure.
440 * @deprecated Provided for backward compatibility with the 1.3 API.
442 typedef struct svn_client_commit_item2_t
444 /** absolute working-copy path of item */
447 /** node kind (dir, file) */
448 svn_node_kind_t kind
;
450 /** commit URL for this item */
453 /** revision of textbase */
454 svn_revnum_t revision
;
456 /** copyfrom-url or NULL if not a copied item */
457 const char *copyfrom_url
;
459 /** copyfrom-rev, valid when copyfrom_url != NULL */
460 svn_revnum_t copyfrom_rev
;
463 apr_byte_t state_flags
;
465 /** Analogous to the @c svn_client_commit_item3_t.incoming_prop_changes
468 apr_array_header_t
*wcprop_changes
;
469 } svn_client_commit_item2_t
;
471 /** The commit candidate structure.
473 * @deprecated Provided for backward compatibility with the 1.2 API.
475 typedef struct svn_client_commit_item_t
477 /** absolute working-copy path of item */
480 /** node kind (dir, file) */
481 svn_node_kind_t kind
;
483 /** commit URL for this item */
486 /** revision (copyfrom-rev if _IS_COPY) */
487 svn_revnum_t revision
;
490 const char *copyfrom_url
;
493 apr_byte_t state_flags
;
495 /** Analogous to the @c svn_client_commit_item3_t.incoming_prop_changes
498 apr_array_header_t
*wcprop_changes
;
500 } svn_client_commit_item_t
;
502 /** Initialize a commit item.
503 * Set @a *item to a commit item object, allocated in @a pool.
505 * In order to avoid backwards compatibility problems, this function
506 * is used to intialize and allocate the @c svn_client_commit_item3_t
507 * structure rather than doing so explicitly, as the size of this
508 * structure may change in the future.
510 * The current implementation never returns error, but callers should
511 * still check for error, for compatibility with future versions.
516 svn_client_commit_item_create(const svn_client_commit_item3_t
**item
,
520 * Return a duplicate of @a item, allocated in @a pool. No part of the new
521 * structure will be shared with @a item.
525 svn_client_commit_item3_t
*
526 svn_client_commit_item3_dup(const svn_client_commit_item3_t
*item
,
530 * Return a duplicate of @a item, allocated in @a pool. No part of the new
531 * structure will be shared with @a item.
533 * @deprecated Provided for backward compatibility with the 1.3 API.
535 svn_client_commit_item2_t
*
536 svn_client_commit_item2_dup(const svn_client_commit_item2_t
*item
,
539 /** Callback type used by commit-y operations to get a commit log message
542 * Set @a *log_msg to the log message for the commit, allocated in @a
543 * pool, or @c NULL if wish to abort the commit process. Set @a *tmp_file
544 * to the path of any temporary file which might be holding that log
545 * message, or @c NULL if no such file exists (though, if @a *log_msg is
546 * @c NULL, this value is undefined). The log message MUST be a UTF8
547 * string with LF line separators.
549 * @a commit_items is a read-only array of @c svn_client_commit_item3_t
550 * structures, which may be fully or only partially filled-in,
551 * depending on the type of commit operation.
553 * @a baton is provided along with the callback for use by the handler.
555 * All allocations should be performed in @a pool.
559 typedef svn_error_t
*(*svn_client_get_commit_log3_t
)
560 (const char **log_msg
,
561 const char **tmp_file
,
562 const apr_array_header_t
*commit_items
,
566 /** Callback type used by commit-y operations to get a commit log message
569 * Set @a *log_msg to the log message for the commit, allocated in @a
570 * pool, or @c NULL if wish to abort the commit process. Set @a *tmp_file
571 * to the path of any temporary file which might be holding that log
572 * message, or @c NULL if no such file exists (though, if @a *log_msg is
573 * @c NULL, this value is undefined). The log message MUST be a UTF8
574 * string with LF line separators.
576 * @a commit_items is a read-only array of @c svn_client_commit_item2_t
577 * structures, which may be fully or only partially filled-in,
578 * depending on the type of commit operation.
580 * @a baton is provided along with the callback for use by the handler.
582 * All allocations should be performed in @a pool.
584 * @deprecated Provided for backward compatibility with the 1.3 API.
586 typedef svn_error_t
*(*svn_client_get_commit_log2_t
)
587 (const char **log_msg
,
588 const char **tmp_file
,
589 const apr_array_header_t
*commit_items
,
593 /** Callback type used by commit-y operations to get a commit log message
596 * Set @a *log_msg to the log message for the commit, allocated in @a
597 * pool, or @c NULL if wish to abort the commit process. Set @a *tmp_file
598 * to the path of any temporary file which might be holding that log
599 * message, or @c NULL if no such file exists (though, if @a *log_msg is
600 * @c NULL, this value is undefined). The log message MUST be a UTF8
601 * string with LF line separators.
603 * @a commit_items is a read-only array of @c svn_client_commit_item_t
604 * structures, which may be fully or only partially filled-in,
605 * depending on the type of commit operation.
607 * @a baton is provided along with the callback for use by the handler.
609 * All allocations should be performed in @a pool.
611 * @deprecated Provided for backward compatibility with the 1.2 API.
613 typedef svn_error_t
*(*svn_client_get_commit_log_t
)
614 (const char **log_msg
,
615 const char **tmp_file
,
616 apr_array_header_t
*commit_items
,
625 * @defgroup clnt_blame Client blame functionality
630 /** Callback type used by svn_client_blame4() to notify the caller
631 * that line @a line_no of the blamed file was last changed in
632 * @a revision by @a author on @a date, and that the contents were
635 * If svn_client_blame4() was called with @a include_merged_revisions set to
636 * TRUE, @a merged_revision, @a merged_author, @a merged_date, and
637 * @a merged_path will be set, otherwise they will be NULL. @a merged_path
638 * will be set to the absolute repository path.
640 * All allocations should be performed in @a pool.
642 * @note If there is no blame information for this line, @a revision will be
643 * invalid and @a author and @a date will be NULL.
648 typedef svn_error_t
*(*svn_client_blame_receiver2_t
)
651 svn_revnum_t revision
,
654 svn_revnum_t merged_revision
,
655 const char *merged_author
,
656 const char *merged_date
,
657 const char *merged_path
,
662 * Similar to @c svn_client_blame_receiver2_t, but without @a merged_revision,
663 * @a merged_author, @a merged_date, or @a merged_path members.
665 * @note New in 1.4 is that the line is defined to contain only the line
666 * content (and no [partial] EOLs; which was undefined in older versions).
667 * Using this callback with svn_client_blame() or svn_client_blame2()
668 * will still give you the old behaviour.
670 * @deprecated Provided for backward compatibility with the 1.4 API.
672 typedef svn_error_t
*(*svn_client_blame_receiver_t
)
675 svn_revnum_t revision
,
687 * @defgroup clnt_diff Client diff functionality
691 /** The difference type in an svn_diff_summarize_t structure.
695 typedef enum svn_client_diff_summarize_kind_t
697 /** An item with no text modifications */
698 svn_client_diff_summarize_kind_normal
,
701 svn_client_diff_summarize_kind_added
,
703 /** An item with text modifications */
704 svn_client_diff_summarize_kind_modified
,
706 /** A deleted item */
707 svn_client_diff_summarize_kind_deleted
708 } svn_client_diff_summarize_kind_t
;
711 /** A struct that describes the diff of an item. Passed to
712 * @c svn_diff_summarize_func_t.
714 * @note Fields may be added to the end of this structure in future
715 * versions. Therefore, users shouldn't allocate structures of this
716 * type, to preserve binary compatibility.
720 typedef struct svn_client_diff_summarize_t
722 /** Path relative to the target. If the target is a file, path is
723 * the empty string. */
727 svn_client_diff_summarize_kind_t summarize_kind
;
729 /** Properties changed? */
730 svn_boolean_t prop_changed
;
733 svn_node_kind_t node_kind
;
734 } svn_client_diff_summarize_t
;
737 * Return a duplicate of @a diff, allocated in @a pool. No part of the new
738 * structure will be shared with @a diff.
742 svn_client_diff_summarize_t
*
743 svn_client_diff_summarize_dup(const svn_client_diff_summarize_t
*diff
,
747 /** A callback used in svn_client_diff_summarize2() and
748 * svn_client_diff_summarize_peg2() for reporting a @a diff summary.
750 * All allocations should be performed in @a pool.
752 * @a baton is a closure object; it should be provided by the implementation,
753 * and passed by the caller.
757 typedef svn_error_t
*(*svn_client_diff_summarize_func_t
)
758 (const svn_client_diff_summarize_t
*diff
,
770 * @defgroup clnt_ctx Client context management
775 /** A client context structure, which holds client specific callbacks,
776 * batons, serves as a cache for configuration options, and other various
777 * and sundry things. In order to avoid backwards compatibility problems
778 * clients should use svn_client_create_context() to allocate and
779 * intialize this structure instead of doing so themselves.
781 typedef struct svn_client_ctx_t
783 /** main authentication baton. */
784 svn_auth_baton_t
*auth_baton
;
786 /** notification callback function.
787 * This will be called by notify_func2() by default.
788 * @deprecated Provided for backward compatibility with the 1.1 API. */
789 svn_wc_notify_func_t notify_func
;
791 /** notification callback baton for notify_func()
792 * @deprecated Provided for backward compatibility with the 1.1 API. */
795 /** Log message callback function. NULL means that Subversion
796 * should try not attempt to fetch a log message.
797 * @deprecated Provided for backward compatibility with the 1.2 API. */
798 svn_client_get_commit_log_t log_msg_func
;
800 /** log message callback baton
801 * @deprecated Provided for backward compatibility with the 1.2 API. */
804 /** a hash mapping of <tt>const char *</tt> configuration file names to
805 * @c svn_config_t *'s. For example, the '~/.subversion/config' file's
806 * contents should have the key "config". May be left unset (or set to
807 * NULL) to use the built-in default settings and not use any configuration.
811 /** a callback to be used to see if the client wishes to cancel the running
813 svn_cancel_func_t cancel_func
;
815 /** a baton to pass to the cancellation callback. */
818 /** notification function, defaulting to a function that forwards
820 * @since New in 1.2. */
821 svn_wc_notify_func2_t notify_func2
;
823 /** notification baton for notify_func2().
824 * @since New in 1.2. */
827 /** Log message callback function. NULL means that Subversion
828 * should try log_msg_func.
829 * @since New in 1.3. */
830 svn_client_get_commit_log2_t log_msg_func2
;
832 /** callback baton for log_msg_func2
833 * @since New in 1.3. */
834 void *log_msg_baton2
;
836 /** Notification callback for network progress information.
837 * May be NULL if not used.
838 * @since New in 1.3. */
839 svn_ra_progress_notify_func_t progress_func
;
841 /** Callback baton for progress_func.
842 * @since New in 1.3. */
843 void *progress_baton
;
845 /** Log message callback function. NULL means that Subversion
846 * should try @c log_msg_func2, then @c log_msg_func.
847 * @since New in 1.5. */
848 svn_client_get_commit_log3_t log_msg_func3
;
850 /** The callback baton for @c log_msg_func3.
851 * @since New in 1.5. */
852 void *log_msg_baton3
;
855 * @since New in 1.5. */
856 apr_hash_t
*mimetypes_map
;
858 /** Table holding the extra revision properties to be set. This table
859 * cannot contain any standard Subversion properties.
860 * @since New in 1.5. */
861 apr_hash_t
*revprop_table
;
863 /** Conflict resolution callback and baton, if available.
864 * @since New in 1.5. */
865 svn_wc_conflict_resolver_func_t conflict_func
;
866 void *conflict_baton
;
868 /** Custom client name string, or @c null.
869 * @since New in 1.5. */
870 const char *client_name
;
874 /** @} end group: Client context management */
877 * @name Authentication information file names
879 * Names of files that contain authentication information.
881 * These filenames are decided by libsvn_client, since this library
882 * implements all the auth-protocols; libsvn_wc does nothing but
883 * blindly store and retrieve these files from protected areas.
885 * @defgroup clnt_auth_filenames Client authentication file names
888 #define SVN_CLIENT_AUTH_USERNAME "username"
889 #define SVN_CLIENT_AUTH_PASSWORD "password"
890 /** @} group end: Authentication information file names */
897 * @defgroup clnt_ctx Client context management
902 /** Initialize a client context.
903 * Set @a *ctx to a client context object, allocated in @a pool, that
904 * represents a particular instance of an svn client.
906 * In order to avoid backwards compatibility problems, clients must
907 * use this function to intialize and allocate the
908 * @c svn_client_ctx_t structure rather than doing so themselves, as
909 * the size of this structure may change in the future.
911 * The current implementation never returns error, but callers should
912 * still check for error, for compatibility with future versions.
915 svn_client_create_context(svn_client_ctx_t
**ctx
,
918 /** @} end group: Client context */
921 * Client working copy management functions
923 * @defgroup clnt_wc Client working copy management
929 * @defgroup clnt_wc_checkout Checkout
936 * Checkout a working copy of @a URL at @a revision, looked up at @a
937 * peg_revision, using @a path as the root directory of the newly
938 * checked out working copy, and authenticating with the
939 * authentication baton cached in @a ctx. If @a result_rev is not @c
940 * NULL, set @a *result_rev to the value of the revision actually
941 * checked out from the repository.
943 * If @a peg_revision->kind is @c svn_opt_revision_unspecified, then it
944 * defaults to @c svn_opt_revision_head.
946 * @a revision must be of kind @c svn_opt_revision_number,
947 * @c svn_opt_revision_head, or @c svn_opt_revision_date. If
948 * @a revision does not meet these requirements, return the error
949 * @c SVN_ERR_CLIENT_BAD_REVISION.
951 * If @a depth is @c svn_depth_infinity, check out fully recursively.
952 * Else if it is @c svn_depth_immediates, check out @a URL and its
953 * immediate entries (subdirectories will be present, but will be at
954 * depth @c svn_depth_empty themselves); else @c svn_depth_files,
955 * check out @a URL and its file entries, but no subdirectories; else
956 * if @c svn_depth_empty, check out @a URL as an empty directory at
957 * that depth, with no entries present.
959 * If @a depth is @c svn_depth_unknown, then behave as if for
960 * @c svn_depth_infinity, except in the case of resuming a previous
961 * checkout of @a path (i.e., updating), in which case use the depth
962 * of the existing working copy.
964 * If @a ignore_externals is set, don't process externals definitions
965 * as part of this operation.
967 * If @a ctx->notify_func2 is non-NULL, invoke @a ctx->notify_func2 with
968 * @a ctx->notify_baton2 as the checkout progresses.
970 * If @a allow_unver_obstructions is TRUE then the checkout tolerates
971 * existing unversioned items that obstruct added paths from @a URL. Only
972 * obstructions of the same type (file or dir) as the added item are
973 * tolerated. The text of obstructing files is left as-is, effectively
974 * treating it as a user modification after the checkout. Working
975 * properties of obstructing items are set equal to the base properties.
976 * If @a allow_unver_obstructions is FALSE then the checkout will abort
977 * if there are any unversioned obstructing items.
979 * If @a URL refers to a file rather than a directory, return the
980 * error @c SVN_ERR_UNSUPPORTED_FEATURE. If @a URL does not exist,
981 * return the error @c SVN_ERR_RA_ILLEGAL_URL.
983 * Use @a pool for any temporary allocation.
988 svn_client_checkout3(svn_revnum_t
*result_rev
,
991 const svn_opt_revision_t
*peg_revision
,
992 const svn_opt_revision_t
*revision
,
994 svn_boolean_t ignore_externals
,
995 svn_boolean_t allow_unver_obstructions
,
996 svn_client_ctx_t
*ctx
,
1001 * Similar to svn_client_checkout3() but with @a allow_unver_obstructions
1002 * always set to FALSE, and @a depth set according to @a recurse: if
1003 * @a recurse is TRUE, @a depth is @c svn_depth_infinity, if @a recurse
1004 * is FALSE, @a depth is @c svn_depth_files.
1006 * @deprecated Provided for backward compatibility with the 1.4 API.
1009 svn_client_checkout2(svn_revnum_t
*result_rev
,
1012 const svn_opt_revision_t
*peg_revision
,
1013 const svn_opt_revision_t
*revision
,
1014 svn_boolean_t recurse
,
1015 svn_boolean_t ignore_externals
,
1016 svn_client_ctx_t
*ctx
,
1021 * Similar to svn_client_checkout2(), but with @a peg_revision
1022 * always set to @c svn_opt_revision_unspecified and
1023 * @a ignore_externals always set to FALSE.
1025 * @deprecated Provided for backward compatibility with the 1.1 API.
1028 svn_client_checkout(svn_revnum_t
*result_rev
,
1031 const svn_opt_revision_t
*revision
,
1032 svn_boolean_t recurse
,
1033 svn_client_ctx_t
*ctx
,
1038 * @defgroup Update Bring a working copy up-to-date with a repository
1045 * Update working trees @a paths to @a revision, authenticating with the
1046 * authentication baton cached in @a ctx. @a paths is an array of const
1047 * char * paths to be updated. Unversioned paths that are direct children
1048 * of a versioned path will cause an update that attempts to add that path,
1049 * other unversioned paths are skipped. If @a result_revs is not
1050 * @c NULL an array of svn_revnum_t will be returned with each element set
1051 * to the revision to which @a revision was resolved.
1053 * @a revision must be of kind @c svn_opt_revision_number,
1054 * @c svn_opt_revision_head, or @c svn_opt_revision_date. If @a
1055 * revision does not meet these requirements, return the error
1056 * @c SVN_ERR_CLIENT_BAD_REVISION.
1058 * The paths in @a paths can be from multiple working copies from multiple
1059 * repositories, but even if they all come from the same repository there
1060 * is no guarantee that revision represented by @c svn_opt_revision_head
1061 * will remain the same as each path is updated.
1063 * If @a ignore_externals is set, don't process externals definitions
1064 * as part of this operation.
1066 * If @a depth is @c svn_depth_infinity, update fully recursively.
1067 * Else if it is @c svn_depth_immediates or @c svn_depth_files, update
1068 * each target and its file entries, but not its subdirectories. Else
1069 * if @c svn_depth_empty, update exactly each target, nonrecursively
1070 * (essentially, update the target's properties).
1072 * If @a depth is @c svn_depth_unknown, take the working depth from
1073 * @a paths and then behave as described above.
1075 * If @a depth_is_sticky is set and @a depth is not @c
1076 * svn_depth_unknown, then in addition to updating PATHS, also set
1077 * their sticky ambient depth value to @a depth.
1079 * If @a allow_unver_obstructions is TRUE then the update tolerates
1080 * existing unversioned items that obstruct added paths from @a URL. Only
1081 * obstructions of the same type (file or dir) as the added item are
1082 * tolerated. The text of obstructing files is left as-is, effectively
1083 * treating it as a user modification after the update. Working
1084 * properties of obstructing items are set equal to the base properties.
1085 * If @a allow_unver_obstructions is FALSE then the update will abort
1086 * if there are any unversioned obstructing items.
1088 * If @a ctx->notify_func2 is non-NULL, invoke @a ctx->notify_func2 with
1089 * @a ctx->notify_baton2 for each item handled by the update, and also for
1090 * files restored from text-base. If @a ctx->cancel_func is non-NULL, invoke
1091 * it passing @a ctx->cancel_baton at various places during the update.
1093 * Use @a pool for any temporary allocation.
1095 * @since New in 1.5.
1098 svn_client_update3(apr_array_header_t
**result_revs
,
1099 const apr_array_header_t
*paths
,
1100 const svn_opt_revision_t
*revision
,
1102 svn_boolean_t depth_is_sticky
,
1103 svn_boolean_t ignore_externals
,
1104 svn_boolean_t allow_unver_obstructions
,
1105 svn_client_ctx_t
*ctx
,
1109 * Similar to svn_client_update3() but with @a allow_unver_obstructions
1110 * always set to FALSE, @a depth_is_sticky to FALSE, and @a depth set
1111 * according to @a recurse: if @a recurse is TRUE, set @a depth to @c
1112 * svn_depth_infinity, if @a recurse is FALSE, set @a depth to @c
1115 * @deprecated Provided for backward compatibility with the 1.4 API.
1118 svn_client_update2(apr_array_header_t
**result_revs
,
1119 const apr_array_header_t
*paths
,
1120 const svn_opt_revision_t
*revision
,
1121 svn_boolean_t recurse
,
1122 svn_boolean_t ignore_externals
,
1123 svn_client_ctx_t
*ctx
,
1127 * Similar to svn_client_update2() except that it accepts only a single
1128 * target in @a path, returns a single revision if @a result_rev is
1129 * not NULL, and @a ignore_externals is always set to FALSE.
1131 * @deprecated Provided for backward compatibility with the 1.1 API.
1134 svn_client_update(svn_revnum_t
*result_rev
,
1136 const svn_opt_revision_t
*revision
,
1137 svn_boolean_t recurse
,
1138 svn_client_ctx_t
*ctx
,
1143 * @defgroup Switch Switch a working copy to another location.
1148 /** Switch working tree @a path to @a url\@peg_revision at @a revision,
1149 * authenticating with the authentication baton cached in @a ctx. If
1150 * @a result_rev is not @c NULL, set @a *result_rev to the value of
1151 * the revision to which the working copy was actually switched.
1153 * Summary of purpose: this is normally used to switch a working
1154 * directory over to another line of development, such as a branch or
1155 * a tag. Switching an existing working directory is more efficient
1156 * than checking out @a url from scratch.
1158 * @a revision must be of kind @c svn_opt_revision_number,
1159 * @c svn_opt_revision_head, or @c svn_opt_revision_date; otherwise,
1160 * return @c SVN_ERR_CLIENT_BAD_REVISION.
1162 * If @a depth is @c svn_depth_infinity, switch fully recursively.
1163 * Else if it is @c svn_depth_immediates, switch @a path and its file
1164 * children (if any), and switch subdirectories but do not update
1165 * them. Else if @c svn_depth_files, switch just file children,
1166 * ignoring subdirectories completely. Else if @c svn_depth_empty,
1167 * switch just @a path and touch nothing underneath it.
1169 * If @a depth_is_sticky is set and @a depth is not @c
1170 * svn_depth_unknown, then in addition to switching PATH, also set
1171 * its sticky ambient depth value to @a depth.
1173 * If @a ignore_externals is set, don't process externals definitions
1174 * as part of this operation.
1176 * If @a allow_unver_obstructions is TRUE then the switch tolerates
1177 * existing unversioned items that obstruct added paths from @a URL. Only
1178 * obstructions of the same type (file or dir) as the added item are
1179 * tolerated. The text of obstructing files is left as-is, effectively
1180 * treating it as a user modification after the switch. Working
1181 * properties of obstructing items are set equal to the base properties.
1182 * If @a allow_unver_obstructions is FALSE then the switch will abort
1183 * if there are any unversioned obstructing items.
1185 * If @a ctx->notify_func2 is non-NULL, invoke it with @a ctx->notify_baton2
1186 * on paths affected by the switch. Also invoke it for files may be restored
1187 * from the text-base because they were removed from the working copy.
1189 * Use @a pool for any temporary allocation.
1191 * @since New in 1.5.
1194 svn_client_switch2(svn_revnum_t
*result_rev
,
1197 const svn_opt_revision_t
*peg_revision
,
1198 const svn_opt_revision_t
*revision
,
1200 svn_boolean_t depth_is_sticky
,
1201 svn_boolean_t ignore_externals
,
1202 svn_boolean_t allow_unver_obstructions
,
1203 svn_client_ctx_t
*ctx
,
1208 * Similar to svn_client_switch2() but with @a allow_unver_obstructions,
1209 * @a ignore_externals, and @a depth_is_sticky always set to FALSE,
1210 * and @a depth set according to @a recurse: if @a recurse is TRUE,
1211 * set @a depth to @c svn_depth_infinity, if @a recurse is FALSE, set
1212 * @a depth to @c svn_depth_files.
1214 * @deprecated Provided for backward compatibility with the 1.4 API.
1217 svn_client_switch(svn_revnum_t
*result_rev
,
1220 const svn_opt_revision_t
*revision
,
1221 svn_boolean_t recurse
,
1222 svn_client_ctx_t
*ctx
,
1228 * @defgroup Add Begin versioning files/directories in a working copy.
1234 * Schedule a working copy @a path for addition to the repository.
1236 * If @a depth is @c svn_depth_empty, add just @a path and nothing
1237 * below it. If @c svn_depth_files, add @a path and any file
1238 * children of @a path. If @c svn_depth_immediates, add @a path, any
1239 * file children, and any immediate subdirectories (but nothing
1240 * underneath those subdirectories). If @c svn_depth_infinity, add
1241 * @a path and everything under it fully recursively.
1243 * @a path's parent must be under revision control already (unless
1244 * @a add_parents is TRUE), but @a path is not. If @a recursive is
1245 * set, then assuming @a path is a directory, all of its contents will
1246 * be scheduled for addition as well.
1248 * If @a force is not set and @a path is already under version
1249 * control, return the error @c SVN_ERR_ENTRY_EXISTS. If @a force is
1250 * set, do not error on already-versioned items. When used on a
1251 * directory in conjunction with the @a recursive flag, this has the
1252 * effect of scheduling for addition unversioned files and directories
1253 * scattered deep within a versioned tree.
1255 * If @a ctx->notify_func2 is non-NULL, then for each added item, call
1256 * @a ctx->notify_func2 with @a ctx->notify_baton2 and the path of the
1259 * If @a no_ignore is FALSE, don't add files or directories that match
1262 * If @a add_parents is TRUE, recurse up @a path's directory and look for
1263 * a versioned directory. If found, add all intermediate paths between it
1264 * and @a path. If not found, return @c SVN_ERR_CLIENT_NO_VERSIONED_PARENTS.
1267 * This is a *scheduling* operation. No changes will
1268 * happen to the repository until a commit occurs. This scheduling
1269 * can be removed with svn_client_revert2().
1271 * @since New in 1.5.
1274 svn_client_add4(const char *path
,
1276 svn_boolean_t force
,
1277 svn_boolean_t no_ignore
,
1278 svn_boolean_t add_parents
,
1279 svn_client_ctx_t
*ctx
,
1283 * Similar to svn_client_add4(), but with @a add_parents always set to
1284 * FALSE and @a depth set according to @a recursive: if TRUE, then
1285 * @a depth is @c svn_depth_infinity, if FALSE, then @c svn_depth_files.
1287 * @deprecated Provided for backward compatibility with the 1.3 API.
1290 svn_client_add3(const char *path
,
1291 svn_boolean_t recursive
,
1292 svn_boolean_t force
,
1293 svn_boolean_t no_ignore
,
1294 svn_client_ctx_t
*ctx
,
1298 * Similar to svn_client_add3(), but with @a no_ignore always set to
1301 * @deprecated Provided for backward compatibility with the 1.2 API.
1304 svn_client_add2(const char *path
,
1305 svn_boolean_t recursive
,
1306 svn_boolean_t force
,
1307 svn_client_ctx_t
*ctx
,
1311 * Similar to svn_client_add2(), but with @a force always set to FALSE.
1313 * @deprecated Provided for backward compatibility with the 1.0 API.
1316 svn_client_add(const char *path
,
1317 svn_boolean_t recursive
,
1318 svn_client_ctx_t
*ctx
,
1324 * @defgroup Mkdir Create directories in a working copy or repository.
1329 /** Create a directory, either in a repository or a working copy.
1331 * If @a paths contains URLs, use the authentication baton in @a ctx
1332 * and @a message to immediately attempt to commit the creation of the
1333 * directories in @a paths in the repository. If the commit succeeds,
1334 * allocate (in @a pool) and populate @a *commit_info_p.
1336 * Else, create the directories on disk, and attempt to schedule them
1337 * for addition (using svn_client_add(), whose docstring you should
1340 * If @a make_parents is TRUE, create any non-existent parent directories
1343 * @a ctx->log_msg_func3/@a ctx->log_msg_baton3 are a callback/baton
1344 * combo that this function can use to query for a commit log message
1345 * when one is needed.
1347 * If @a ctx->notify_func2 is non-NULL, when the directory has been created
1348 * (successfully) in the working copy, call @a ctx->notify_func2 with
1349 * @a ctx->notify_baton2 and the path of the new directory. Note that this is
1350 * only called for items added to the working copy.
1352 * @since New in 1.5.
1355 svn_client_mkdir3(svn_commit_info_t
**commit_info_p
,
1356 const apr_array_header_t
*paths
,
1357 svn_boolean_t make_parents
,
1358 svn_client_ctx_t
*ctx
,
1363 * Same as svn_client_mkdir3(), but with @a make_parents always FALSE.
1365 * @since New in 1.3.
1366 * @deprecated Provided for backward compatibility with the 1.4 API.
1369 svn_client_mkdir2(svn_commit_info_t
**commit_info_p
,
1370 const apr_array_header_t
*paths
,
1371 svn_client_ctx_t
*ctx
,
1375 * Same as svn_client_mkdir2(), but takes the @c svn_client_commit_info_t
1376 * type for @a commit_info_p.
1378 * @deprecated Provided for backward compatibility with the 1.2 API.
1381 svn_client_mkdir(svn_client_commit_info_t
**commit_info_p
,
1382 const apr_array_header_t
*paths
,
1383 svn_client_ctx_t
*ctx
,
1389 * @defgroup Delete Remove files/directories from a working copy or repository.
1394 /** Delete items from a repository or working copy.
1396 * If the paths in @a paths are URLs, use the authentication baton in
1397 * @a ctx and @a ctx->log_msg_func3/@a ctx->log_msg_baton3 to
1398 * immediately attempt to commit a deletion of the URLs from the
1399 * repository. If the commit succeeds, allocate (in @a pool) and
1400 * populate @a *commit_info_p. Every path must belong to the same
1403 * Else, schedule the working copy paths in @a paths for removal from
1404 * the repository. Each path's parent must be under revision control.
1405 * This is just a *scheduling* operation. No changes will happen to
1406 * the repository until a commit occurs. This scheduling can be
1407 * removed with svn_client_revert2(). If a path is a file it is
1408 * immediately removed from the working copy. If the path is a
1409 * directory it will remain in the working copy but all the files, and
1410 * all unversioned items, it contains will be removed. If @a force is
1411 * not set then this operation will fail if any path contains locally
1412 * modified and/or unversioned items. If @a force is set such items
1415 * If the paths are working copy paths and @a keep_local is TRUE then
1416 * the paths will not be removed from the working copy, only scheduled
1417 * for removal from the repository. Once the scheduled deletion is
1418 * committed, they will appear as unversioned paths in the working copy.
1420 * @a ctx->log_msg_func3/@a ctx->log_msg_baton3 are a callback/baton
1421 * combo that this function can use to query for a commit log message
1422 * when one is needed.
1424 * If @a ctx->notify_func2 is non-NULL, then for each item deleted, call
1425 * @a ctx->notify_func2 with @a ctx->notify_baton2 and the path of the deleted
1428 * @since New in 1.5.
1431 svn_client_delete3(svn_commit_info_t
**commit_info_p
,
1432 const apr_array_header_t
*paths
,
1433 svn_boolean_t force
,
1434 svn_boolean_t keep_local
,
1435 svn_client_ctx_t
*ctx
,
1439 * Similar to svn_client_delete3(), but with @a keep_local always set
1442 * @deprecated Provided for backward compatibility with the 1.4 API.
1445 svn_client_delete2(svn_commit_info_t
**commit_info_p
,
1446 const apr_array_header_t
*paths
,
1447 svn_boolean_t force
,
1448 svn_client_ctx_t
*ctx
,
1452 * Similar to svn_client_delete2(), but takes the @c svn_client_commit_info_t
1453 * type for @a commit_info_p.
1455 * @deprecated Provided for backward compatibility with the 1.2 API.
1458 svn_client_delete(svn_client_commit_info_t
**commit_info_p
,
1459 const apr_array_header_t
*paths
,
1460 svn_boolean_t force
,
1461 svn_client_ctx_t
*ctx
,
1468 * @defgroup Import Import files into the repository.
1473 /** Import file or directory @a path into repository directory @a url at
1474 * head, authenticating with the authentication baton cached in @a ctx,
1475 * and using @a ctx->log_msg_func3/@a ctx->log_msg_baton3 to get a log message
1476 * for the (implied) commit. Set @a *commit_info_p to the results of the
1477 * commit, allocated in @a pool. If some components of @a url do not exist
1478 * then create parent directories as necessary.
1480 * If @a path is a directory, the contents of that directory are
1481 * imported directly into the directory identified by @a url. Note that the
1482 * directory @a path itself is not imported -- that is, the basename of
1483 * @a path is not part of the import.
1485 * If @a path is a file, then the dirname of @a url is the directory
1486 * receiving the import. The basename of @a url is the filename in the
1487 * repository. In this case if @a url already exists, return error.
1489 * If @a ctx->notify_func2 is non-NULL, then call @a ctx->notify_func2 with
1490 * @a ctx->notify_baton2 as the import progresses, with any of the following
1491 * actions: @c svn_wc_notify_commit_added,
1492 * @c svn_wc_notify_commit_postfix_txdelta.
1494 * Use @a pool for any temporary allocation.
1496 * @a ctx->log_msg_func3/@a ctx->log_msg_baton3 are a callback/baton
1497 * combo that this function can use to query for a commit log message
1498 * when one is needed.
1500 * If @a depth is @c svn_depth_empty, import just @a path and nothing
1501 * below it. If @c svn_depth_files, import @a path and any file
1502 * children of @a path. If @c svn_depth_immediates, import @a path, any
1503 * file children, and any immediate subdirectories (but nothing
1504 * underneath those subdirectories). If @c svn_depth_infinity, import
1505 * @a path and everything under it fully recursively.
1507 * If @a no_ignore is @c FALSE, don't add files or directories that match
1510 * If @a ignore_unknown_node_types is @c FALSE, ignore files of which the
1511 * node type is unknown, such as device files and pipes.
1513 * @since New in 1.5.
1516 svn_client_import3(svn_commit_info_t
**commit_info_p
,
1520 svn_boolean_t no_ignore
,
1521 svn_boolean_t ignore_unknown_node_types
,
1522 svn_client_ctx_t
*ctx
,
1526 * Similar to svn_client_import3(), but with @a ignore_unknown_node_types
1527 * always set to @c FALSE, and @a depth set according to @a nonrecursive:
1528 * if TRUE, then @a depth is @c svn_depth_files, else @c svn_depth_infinity.
1530 * @since New in 1.3.
1532 * @deprecated Provided for backward compatibility with the 1.4 API
1535 svn_client_import2(svn_commit_info_t
**commit_info_p
,
1538 svn_boolean_t nonrecursive
,
1539 svn_boolean_t no_ignore
,
1540 svn_client_ctx_t
*ctx
,
1544 * Similar to svn_client_import2(), but with @a no_ignore always set
1545 * to FALSE and using the @c svn_client_commit_info_t type for
1548 * @deprecated Provided for backward compatibility with the 1.2 API.
1551 svn_client_import(svn_client_commit_info_t
**commit_info_p
,
1554 svn_boolean_t nonrecursive
,
1555 svn_client_ctx_t
*ctx
,
1561 * @defgroup Commit Commit local modifications to the repository.
1567 * Commit files or directories into repository, authenticating with
1568 * the authentication baton cached in @a ctx, and using
1569 * @a ctx->log_msg_func3/@a ctx->log_msg_baton3 to obtain the log message.
1570 * Set @a *commit_info_p to the results of the commit, allocated in @a pool.
1572 * @a targets is an array of <tt>const char *</tt> paths to commit. They
1573 * need not be canonicalized nor condensed; this function will take care of
1574 * that. If @a targets has zero elements, then do nothing and return
1575 * immediately without error.
1577 * If @a ctx->notify_func2 is non-NULL, then call @a ctx->notify_func2 with
1578 * @a ctx->notify_baton2 as the commit progresses, with any of the following
1579 * actions: @c svn_wc_notify_commit_modified, @c svn_wc_notify_commit_added,
1580 * @c svn_wc_notify_commit_deleted, @c svn_wc_notify_commit_replaced,
1581 * @c svn_wc_notify_commit_postfix_txdelta.
1583 * If @a depth is @c svn_depth_infinity, commit all changes to and
1584 * below named targets. If @a depth is @c svn_depth_empty, commit
1585 * only named targets (that is, only property changes on named
1586 * directory targets, and property and content changes for named file
1587 * targets). If @a depth is @c svn_depth_files, behave as above for
1588 * named file targets, and for named directory targets, commit
1589 * property changes on a named directory and all changes to files
1590 * directly inside that directory. If @c svn_depth_immediates, behave
1591 * as for @c svn_depth_files, and for subdirectories of any named
1592 * directory target commit as though for @c svn_depth_empty.
1594 * Unlock paths in the repository, unless @a keep_locks is TRUE.
1596 * @a changelists is an array of <tt>const char *</tt> changelist
1597 * names, used as a restrictive filter on items that are committed;
1598 * that is, don't commit anything unless it's a member of one of those
1599 * changelists. After the commit completes successfully, remove
1600 * changelist associations from the targets, unless @a
1601 * keep_changelists is set. If @a changelists is
1602 * empty (or altogether @c NULL), no changelist filtering occurs.
1604 * Use @a pool for any temporary allocations.
1606 * If no error is returned and @a (*commit_info_p)->revision is set to
1607 * @c SVN_INVALID_REVNUM, then the commit was a no-op; nothing needed to
1610 * @since New in 1.5.
1613 svn_client_commit4(svn_commit_info_t
**commit_info_p
,
1614 const apr_array_header_t
*targets
,
1616 svn_boolean_t keep_locks
,
1617 svn_boolean_t keep_changelists
,
1618 const apr_array_header_t
*changelists
,
1619 svn_client_ctx_t
*ctx
,
1623 * Similar to svn_client_commit4(), but always with NULL for
1624 * @a changelist_name, FALSE for @a keep_changelist, and @a depth
1625 * set according to @a recurse: if @a recurse is TRUE, use
1626 * @c svn_depth_infinity, else @c svn_depth_files.
1628 * @deprecated Provided for backward compatibility with the 1.4 API.
1630 * @since New in 1.3.
1633 svn_client_commit3(svn_commit_info_t
**commit_info_p
,
1634 const apr_array_header_t
*targets
,
1635 svn_boolean_t recurse
,
1636 svn_boolean_t keep_locks
,
1637 svn_client_ctx_t
*ctx
,
1641 * Similar to svn_client_commit3(), but uses @c svn_client_commit_info_t
1642 * for @a commit_info_p.
1644 * @deprecated Provided for backward compatibility with the 1.2 API.
1646 * @since New in 1.2.
1649 svn_client_commit2(svn_client_commit_info_t
**commit_info_p
,
1650 const apr_array_header_t
*targets
,
1651 svn_boolean_t recurse
,
1652 svn_boolean_t keep_locks
,
1653 svn_client_ctx_t
*ctx
,
1657 * Similar to svn_client_commit2(), but with @a keep_locks set to
1658 * TRUE and @a nonrecursive instead of @a recurse.
1660 * @deprecated Provided for backward compatibility with the 1.1 API.
1663 svn_client_commit(svn_client_commit_info_t
**commit_info_p
,
1664 const apr_array_header_t
*targets
,
1665 svn_boolean_t nonrecursive
,
1666 svn_client_ctx_t
*ctx
,
1672 * @defgroup Status Report interesting information about paths in the \
1679 * Given @a path to a working copy directory (or single file), call
1680 * @a status_func/status_baton with a set of @c svn_wc_status_t *
1681 * structures which describe the status of @a path, and its children
1682 * (recursing according to @a depth).
1684 * - If @a get_all is set, retrieve all entries; otherwise,
1685 * retrieve only "interesting" entries (local mods and/or
1688 * - If @a update is set, contact the repository and augment the
1689 * status structures with information about out-of-dateness (with
1690 * respect to @a revision). Also, if @a result_rev is not @c NULL,
1691 * set @a *result_rev to the actual revision against which the
1692 * working copy was compared (@a *result_rev is not meaningful unless
1693 * @a update is set).
1695 * If @a ignore_externals is not set, then recurse into externals
1696 * definitions (if any exist) after handling the main target. This
1697 * calls the client notification function (in @a ctx) with the @c
1698 * svn_wc_notify_status_external action before handling each externals
1699 * definition, and with @c svn_wc_notify_status_completed
1702 * @a changelists is an array of <tt>const char *</tt> changelist
1703 * names, used as a restrictive filter on items whose statuses are
1704 * reported; that is, don't report status about any item unless
1705 * it's a member of one of those changelists. If @a changelists is
1706 * empty (or altogether @c NULL), no changelist filtering occurs.
1708 * @since New in 1.5.
1711 svn_client_status3(svn_revnum_t
*result_rev
,
1713 const svn_opt_revision_t
*revision
,
1714 svn_wc_status_func2_t status_func
,
1717 svn_boolean_t get_all
,
1718 svn_boolean_t update
,
1719 svn_boolean_t no_ignore
,
1720 svn_boolean_t ignore_externals
,
1721 const apr_array_header_t
*changelists
,
1722 svn_client_ctx_t
*ctx
,
1726 * Like svn_client_status3(), except with @a changelists passed as @c
1727 * NULL, and with @a recurse instead of @a depth. If @a recurse is
1728 * TRUE, behave as if for @c svn_depth_infinity; else if @a recurse is
1729 * FALSE, behave as if for @c svn_depth_immediates.
1731 * @since New in 1.2.
1732 * @deprecated Provided for backward compatibility with the 1.4 API.
1735 svn_client_status2(svn_revnum_t
*result_rev
,
1737 const svn_opt_revision_t
*revision
,
1738 svn_wc_status_func2_t status_func
,
1740 svn_boolean_t recurse
,
1741 svn_boolean_t get_all
,
1742 svn_boolean_t update
,
1743 svn_boolean_t no_ignore
,
1744 svn_boolean_t ignore_externals
,
1745 svn_client_ctx_t
*ctx
,
1750 * Similar to svn_client_status2(), but with @a ignore_externals
1751 * always set to FALSE, taking the @c svn_wc_status_func_t type
1752 * instead of the @c svn_wc_status_func2_t type for @a status_func,
1753 * and requiring @a *revision to be non-const even though it is
1754 * treated as constant.
1756 * @deprecated Provided for backward compatibility with the 1.1 API.
1759 svn_client_status(svn_revnum_t
*result_rev
,
1761 svn_opt_revision_t
*revision
,
1762 svn_wc_status_func_t status_func
,
1764 svn_boolean_t recurse
,
1765 svn_boolean_t get_all
,
1766 svn_boolean_t update
,
1767 svn_boolean_t no_ignore
,
1768 svn_client_ctx_t
*ctx
,
1774 * @defgroup Log View information about previous revisions of an object.
1780 * Invoke @a receiver with @a receiver_baton on each log message from @a
1781 * start to @a end in turn, inclusive (but never invoke @a receiver on a
1782 * given log message more than once).
1784 * @a targets contains either a URL followed by zero or more relative
1785 * paths, or 1 working copy path, as <tt>const char *</tt>, for which log
1786 * messages are desired. @a receiver is invoked only on messages whose
1787 * revisions involved a change to some path in @a targets. @a peg_revision
1788 * indicates in which revision @a targets are valid. If @a peg_revision is
1789 * @c svn_opt_revision_unspecified, it defaults to @c svn_opt_revision_head
1790 * for URLs or @c svn_opt_revision_working for WC paths.
1792 * If @a limit is non-zero only invoke @a receiver on the first @a limit
1795 * If @a discover_changed_paths is set, then the `@a changed_paths' argument
1796 * to @a receiver will be passed on each invocation.
1798 * If @a strict_node_history is set, copy history (if any exists) will
1799 * not be traversed while harvesting revision logs for each target.
1801 * If @a include_merged_revisions is set, log information for revisions
1802 * which have been merged to @a targets will also be returned.
1804 * If @a revprops is NULL, retrieve all revprops; else, retrieve only the
1805 * revprops named in the array (i.e. retrieve none if the array is empty).
1807 * If @a start->kind or @a end->kind is @c svn_opt_revision_unspecified,
1808 * return the error @c SVN_ERR_CLIENT_BAD_REVISION.
1810 * Use @a pool for any temporary allocation.
1813 * A special case for the revision range HEAD:1, which was present
1814 * in svn_client_log(), has been removed from svn_client_log2(). Instead, it
1815 * is expected that callers will specify the range HEAD:0, to avoid a
1816 * SVN_ERR_FS_NO_SUCH_REVISION error when invoked against an empty repository
1817 * (i.e. one not containing a revision 1).
1819 * If @a ctx->notify_func2 is non-NULL, then call @a ctx->notify_func2/baton2
1820 * with a 'skip' signal on any unversioned targets.
1822 * @since New in 1.5.
1826 svn_client_log4(const apr_array_header_t
*targets
,
1827 const svn_opt_revision_t
*peg_revision
,
1828 const svn_opt_revision_t
*start
,
1829 const svn_opt_revision_t
*end
,
1831 svn_boolean_t discover_changed_paths
,
1832 svn_boolean_t strict_node_history
,
1833 svn_boolean_t include_merged_revisions
,
1834 const apr_array_header_t
*revprops
,
1835 svn_log_entry_receiver_t receiver
,
1836 void *receiver_baton
,
1837 svn_client_ctx_t
*ctx
,
1841 * Similar to svn_client_log4(), but using @c svn_log_message_receiver_t
1842 * instead of @c svn_log_entry_receiver_t. Also, @a
1843 * include_merged_revisions is set to @c FALSE and @a revprops is
1844 * svn:author, svn:date, and svn:log.
1846 * @deprecated Provided for compatibility with the 1.4 API.
1847 * @since New in 1.4.
1850 svn_client_log3(const apr_array_header_t
*targets
,
1851 const svn_opt_revision_t
*peg_revision
,
1852 const svn_opt_revision_t
*start
,
1853 const svn_opt_revision_t
*end
,
1855 svn_boolean_t discover_changed_paths
,
1856 svn_boolean_t strict_node_history
,
1857 svn_log_message_receiver_t receiver
,
1858 void *receiver_baton
,
1859 svn_client_ctx_t
*ctx
,
1864 * Similar to svn_client_log3(), but with the @c kind field of
1865 * @a peg_revision set to @c svn_opt_revision_unspecified.
1867 * @deprecated Provided for compatibility with the 1.3 API.
1868 * @since New in 1.2.
1871 svn_client_log2(const apr_array_header_t
*targets
,
1872 const svn_opt_revision_t
*start
,
1873 const svn_opt_revision_t
*end
,
1875 svn_boolean_t discover_changed_paths
,
1876 svn_boolean_t strict_node_history
,
1877 svn_log_message_receiver_t receiver
,
1878 void *receiver_baton
,
1879 svn_client_ctx_t
*ctx
,
1884 * Similar to svn_client_log2(), but with @a limit set to 0, and the
1885 * following special case:
1887 * Special case for repositories at revision 0:
1889 * If @a start->kind is @c svn_opt_revision_head, and @a end->kind is
1890 * @c svn_opt_revision_number && @a end->number is @c 1, then handle an
1891 * empty (no revisions) repository specially: instead of erroring
1892 * because requested revision 1 when the highest revision is 0, just
1893 * invoke @a receiver on revision 0, passing @c NULL for changed paths and
1894 * empty strings for the author and date. This is because that
1895 * particular combination of @a start and @a end usually indicates the
1896 * common case of log invocation -- the user wants to see all log
1897 * messages from youngest to oldest, where the oldest commit is
1898 * revision 1. That works fine, except when there are no commits in
1899 * the repository, hence this special case.
1901 * @deprecated Provided for backward compatibility with the 1.0 API.
1904 svn_client_log(const apr_array_header_t
*targets
,
1905 const svn_opt_revision_t
*start
,
1906 const svn_opt_revision_t
*end
,
1907 svn_boolean_t discover_changed_paths
,
1908 svn_boolean_t strict_node_history
,
1909 svn_log_message_receiver_t receiver
,
1910 void *receiver_baton
,
1911 svn_client_ctx_t
*ctx
,
1917 * @defgroup Blame Show modification information about lines in a file.
1923 * Invoke @a receiver with @a receiver_baton on each line-blame item
1924 * associated with revision @a end of @a path_or_url, using @a start
1925 * as the default source of all blame. @a peg_revision indicates in
1926 * which revision @a path_or_url is valid. If @a peg_revision->kind
1927 * is @c svn_opt_revision_unspecified, then it defaults to @c
1928 * svn_opt_revision_head for URLs or @c svn_opt_revision_working for
1931 * If @a start->kind or @a end->kind is @c svn_opt_revision_unspecified,
1932 * return the error @c SVN_ERR_CLIENT_BAD_REVISION. If either are @c
1933 * svn_opt_revision_working, return the error @c
1934 * SVN_ERR_UNSUPPORTED_FEATURE. If any of the revisions of @a
1935 * path_or_url have a binary mime-type, return the error @c
1936 * SVN_ERR_CLIENT_IS_BINARY_FILE, unless @a ignore_mime_type is TRUE,
1937 * in which case blame information will be generated regardless of the
1938 * MIME types of the revisions.
1940 * Use @a diff_options to determine how to compare different revisions of the
1943 * If @a include_merged_revisions is TRUE, also return data based upon
1944 * revisions which have been merged to @a path_or_url.
1946 * Use @a pool for any temporary allocation.
1948 * @since New in 1.5.
1951 svn_client_blame4(const char *path_or_url
,
1952 const svn_opt_revision_t
*peg_revision
,
1953 const svn_opt_revision_t
*start
,
1954 const svn_opt_revision_t
*end
,
1955 const svn_diff_file_options_t
*diff_options
,
1956 svn_boolean_t ignore_mime_type
,
1957 svn_boolean_t include_merged_revisions
,
1958 svn_client_blame_receiver2_t receiver
,
1959 void *receiver_baton
,
1960 svn_client_ctx_t
*ctx
,
1964 * Similar to svn_client_blame4(), but with @a include_merged_revisions set
1965 * to FALSE, and using a @c svn_client_blame_receiver2_t as the receiver.
1967 * @deprecated Provided for backwards compatibility with the 1.4 API.
1969 * @since New in 1.4.
1972 svn_client_blame3(const char *path_or_url
,
1973 const svn_opt_revision_t
*peg_revision
,
1974 const svn_opt_revision_t
*start
,
1975 const svn_opt_revision_t
*end
,
1976 const svn_diff_file_options_t
*diff_options
,
1977 svn_boolean_t ignore_mime_type
,
1978 svn_client_blame_receiver_t receiver
,
1979 void *receiver_baton
,
1980 svn_client_ctx_t
*ctx
,
1984 * Similar to svn_client_blame3(), but with @a diff_options set to
1985 * default options as returned by svn_diff_file_options_parse() and
1986 * @a ignore_mime_type set to FALSE.
1988 * @deprecated Provided for backwards compatibility with the 1.3 API.
1990 * @since New in 1.2.
1993 svn_client_blame2(const char *path_or_url
,
1994 const svn_opt_revision_t
*peg_revision
,
1995 const svn_opt_revision_t
*start
,
1996 const svn_opt_revision_t
*end
,
1997 svn_client_blame_receiver_t receiver
,
1998 void *receiver_baton
,
1999 svn_client_ctx_t
*ctx
,
2003 * Similar to svn_client_blame2() except that @a peg_revision is always
2004 * the same as @a end.
2006 * @deprecated Provided for backward compatibility with the 1.1 API.
2009 svn_client_blame(const char *path_or_url
,
2010 const svn_opt_revision_t
*start
,
2011 const svn_opt_revision_t
*end
,
2012 svn_client_blame_receiver_t receiver
,
2013 void *receiver_baton
,
2014 svn_client_ctx_t
*ctx
,
2020 * @defgroup Diff Generate differences between paths.
2026 * Produce diff output which describes the delta between
2027 * @a path1/@a revision1 and @a path2/@a revision2. Print the output
2028 * of the diff to @a outfile, and any errors to @a errfile. @a path1
2029 * and @a path2 can be either working-copy paths or URLs.
2031 * If @a relative_to_dir is not @c NULL, the @a original_path and
2032 * @a modified_path will have the @a relative_to_dir stripped from the
2033 * front of the respective paths. If @a relative_to_dir is @c NULL,
2034 * paths will not be modified. If @a relative_to_dir is not
2035 * @c NULL but @a relative_to_dir is not a parent path of the target,
2036 * an error is returned. Finally, if @a relative_to_dir is a URL, an
2037 * error will be returned.
2039 * If either @a revision1 or @a revision2 has an `unspecified' or
2040 * unrecognized `kind', return @c SVN_ERR_CLIENT_BAD_REVISION.
2042 * @a path1 and @a path2 must both represent the same node kind -- that
2043 * is, if @a path1 is a directory, @a path2 must also be, and if @a path1
2044 * is a file, @a path2 must also be.
2046 * If @a depth is @c svn_depth_infinity, diff fully recursively.
2047 * Else if it is @c svn_depth_immediates, diff the named paths and
2048 * their file children (if any), and diff properties of
2049 * subdirectories, but do not descend further into the subdirectories.
2050 * Else if @c svn_depth_files, behave as if for @c svn_depth_immediates
2051 * except don't diff properties of subdirectories. If @c
2052 * svn_depth_empty, diff exactly the named paths but nothing
2055 * Use @a ignore_ancestry to control whether or not items being
2056 * diffed will be checked for relatedness first. Unrelated items
2057 * are typically transmitted to the editor as a deletion of one thing
2058 * and the addition of another, but if this flag is TRUE, unrelated
2059 * items will be diffed as if they were related.
2061 * If @a no_diff_deleted is TRUE, then no diff output will be
2062 * generated on deleted files.
2064 * Generated headers are encoded using @a header_encoding.
2066 * Diff output will not be generated for binary files, unless @a
2067 * ignore_content_type is TRUE, in which case diffs will be shown
2068 * regardless of the content types.
2070 * @a diff_options (an array of <tt>const char *</tt>) is used to pass
2071 * additional command line options to the diff processes invoked to compare
2074 * The authentication baton cached in @a ctx is used to communicate with
2077 * @a changelists is an array of <tt>const char *</tt> changelist
2078 * names, used as a restrictive filter on items whose differences are
2079 * reported; that is, don't generate diffs about any item unless
2080 * it's a member of one of those changelists. If @a changelists is
2081 * empty (or altogether @c NULL), no changelist filtering occurs.
2083 * @note Changelist filtering only applies to diffs in which at least
2084 * one side of the diff represents working copy data.
2086 * @note @a header_encoding doesn't affect headers generated by external
2089 * @note @a relative_to_dir doesn't affect the path index generated by
2090 * external diff programs.
2092 * @since New in 1.5.
2095 svn_client_diff4(const apr_array_header_t
*diff_options
,
2097 const svn_opt_revision_t
*revision1
,
2099 const svn_opt_revision_t
*revision2
,
2100 const char *relative_to_dir
,
2102 svn_boolean_t ignore_ancestry
,
2103 svn_boolean_t no_diff_deleted
,
2104 svn_boolean_t ignore_content_type
,
2105 const char *header_encoding
,
2106 apr_file_t
*outfile
,
2107 apr_file_t
*errfile
,
2108 const apr_array_header_t
*changelists
,
2109 svn_client_ctx_t
*ctx
,
2114 * Similar to svn_client_diff4(), but with @a changelists passed as @c
2115 * NULL, and @a depth set according to @a recurse: if @a recurse is
2116 * TRUE, set @a depth to @c svn_depth_infinity, if @a recurse is
2117 * FALSE, set @a depth to @c svn_depth_empty.
2119 * @deprecated Provided for backward compatibility with the 1.4 API.
2121 * @since New in 1.3.
2124 svn_client_diff3(const apr_array_header_t
*diff_options
,
2126 const svn_opt_revision_t
*revision1
,
2128 const svn_opt_revision_t
*revision2
,
2129 svn_boolean_t recurse
,
2130 svn_boolean_t ignore_ancestry
,
2131 svn_boolean_t no_diff_deleted
,
2132 svn_boolean_t ignore_content_type
,
2133 const char *header_encoding
,
2134 apr_file_t
*outfile
,
2135 apr_file_t
*errfile
,
2136 svn_client_ctx_t
*ctx
,
2141 * Similar to svn_client_diff3(), but with @a header_encoding set to
2142 * @c APR_LOCALE_CHARSET.
2144 * @deprecated Provided for backward compatibility with the 1.2 API.
2146 * @since New in 1.2.
2149 svn_client_diff2(const apr_array_header_t
*diff_options
,
2151 const svn_opt_revision_t
*revision1
,
2153 const svn_opt_revision_t
*revision2
,
2154 svn_boolean_t recurse
,
2155 svn_boolean_t ignore_ancestry
,
2156 svn_boolean_t no_diff_deleted
,
2157 svn_boolean_t ignore_content_type
,
2158 apr_file_t
*outfile
,
2159 apr_file_t
*errfile
,
2160 svn_client_ctx_t
*ctx
,
2164 * Similar to svn_client_diff2(), but with @a ignore_content_type
2165 * always set to FALSE.
2167 * @deprecated Provided for backward compatibility with the 1.0 API.
2170 svn_client_diff(const apr_array_header_t
*diff_options
,
2172 const svn_opt_revision_t
*revision1
,
2174 const svn_opt_revision_t
*revision2
,
2175 svn_boolean_t recurse
,
2176 svn_boolean_t ignore_ancestry
,
2177 svn_boolean_t no_diff_deleted
,
2178 apr_file_t
*outfile
,
2179 apr_file_t
*errfile
,
2180 svn_client_ctx_t
*ctx
,
2184 * Produce diff output which describes the delta between the
2185 * filesystem object @a path in peg revision @a peg_revision, as it
2186 * changed between @a start_revision and @a end_revision. @a path can
2187 * be either a working-copy path or URL.
2189 * If @a peg_revision is @c svn_opt_revision_unspecified, behave
2190 * identically to svn_client_diff4(), using @a path for both of that
2191 * function's @a path1 and @a path2 argments.
2193 * All other options are handled identically to svn_client_diff4().
2195 * @since New in 1.5.
2198 svn_client_diff_peg4(const apr_array_header_t
*diff_options
,
2200 const svn_opt_revision_t
*peg_revision
,
2201 const svn_opt_revision_t
*start_revision
,
2202 const svn_opt_revision_t
*end_revision
,
2203 const char *relative_to_dir
,
2205 svn_boolean_t ignore_ancestry
,
2206 svn_boolean_t no_diff_deleted
,
2207 svn_boolean_t ignore_content_type
,
2208 const char *header_encoding
,
2209 apr_file_t
*outfile
,
2210 apr_file_t
*errfile
,
2211 const apr_array_header_t
*changelists
,
2212 svn_client_ctx_t
*ctx
,
2216 * Similar to svn_client_diff_peg4(), but with @a changelists passed
2217 * as @c NULL, and @a depth set according to @a recurse: if @a recurse
2218 * is TRUE, set @a depth to @c svn_depth_infinity, if @a recurse is
2219 * FALSE, set @a depth to @c svn_depth_files.
2221 * @deprecated Provided for backward compatibility with the 1.4 API.
2223 * @since New in 1.3.
2226 svn_client_diff_peg3(const apr_array_header_t
*diff_options
,
2228 const svn_opt_revision_t
*peg_revision
,
2229 const svn_opt_revision_t
*start_revision
,
2230 const svn_opt_revision_t
*end_revision
,
2231 svn_boolean_t recurse
,
2232 svn_boolean_t ignore_ancestry
,
2233 svn_boolean_t no_diff_deleted
,
2234 svn_boolean_t ignore_content_type
,
2235 const char *header_encoding
,
2236 apr_file_t
*outfile
,
2237 apr_file_t
*errfile
,
2238 svn_client_ctx_t
*ctx
,
2242 * Similar to svn_client_diff_peg3(), but with @a header_encoding set to
2243 * @c APR_LOCALE_CHARSET.
2245 * @deprecated Provided for backward compatibility with the 1.2 API.
2247 * @since New in 1.2.
2250 svn_client_diff_peg2(const apr_array_header_t
*diff_options
,
2252 const svn_opt_revision_t
*peg_revision
,
2253 const svn_opt_revision_t
*start_revision
,
2254 const svn_opt_revision_t
*end_revision
,
2255 svn_boolean_t recurse
,
2256 svn_boolean_t ignore_ancestry
,
2257 svn_boolean_t no_diff_deleted
,
2258 svn_boolean_t ignore_content_type
,
2259 apr_file_t
*outfile
,
2260 apr_file_t
*errfile
,
2261 svn_client_ctx_t
*ctx
,
2265 * Similar to svn_client_diff_peg2(), but with @a ignore_content_type
2266 * always set to FALSE.
2268 * @since New in 1.1.
2269 * @deprecated Provided for backward compatibility with the 1.1 API.
2272 svn_client_diff_peg(const apr_array_header_t
*diff_options
,
2274 const svn_opt_revision_t
*peg_revision
,
2275 const svn_opt_revision_t
*start_revision
,
2276 const svn_opt_revision_t
*end_revision
,
2277 svn_boolean_t recurse
,
2278 svn_boolean_t ignore_ancestry
,
2279 svn_boolean_t no_diff_deleted
,
2280 apr_file_t
*outfile
,
2281 apr_file_t
*errfile
,
2282 svn_client_ctx_t
*ctx
,
2286 * Produce a diff summary which lists the changed items between
2287 * @a path1/@a revision1 and @a path2/@a revision2 without creating text
2288 * deltas. @a path1 and @a path2 can be either working-copy paths or URLs.
2290 * The function may report false positives if @a ignore_ancestry is false,
2291 * since a file might have been modified between two revisions, but still
2292 * have the same contents.
2294 * Calls @a summarize_func with @a summarize_baton for each difference
2295 * with a @c svn_client_diff_summarize_t structure describing the difference.
2297 * See svn_client_diff4() for a description of the other parameters.
2299 * @since New in 1.5.
2302 svn_client_diff_summarize2(const char *path1
,
2303 const svn_opt_revision_t
*revision1
,
2305 const svn_opt_revision_t
*revision2
,
2307 svn_boolean_t ignore_ancestry
,
2308 const apr_array_header_t
*changelists
,
2309 svn_client_diff_summarize_func_t summarize_func
,
2310 void *summarize_baton
,
2311 svn_client_ctx_t
*ctx
,
2315 * Similar to svn_client_diff_summarize2(), but with @a changelists
2316 * passed as @c NULL, and @a depth set according to @a recurse: if @a
2317 * recurse is TRUE, set @a depth to @c svn_depth_infinity, if @a
2318 * recurse is FALSE, set @a depth to @c svn_depth_files.
2320 * @deprecated Provided for backward compatibility with the 1.4 API.
2322 * @since New in 1.4.
2325 svn_client_diff_summarize(const char *path1
,
2326 const svn_opt_revision_t
*revision1
,
2328 const svn_opt_revision_t
*revision2
,
2329 svn_boolean_t recurse
,
2330 svn_boolean_t ignore_ancestry
,
2331 svn_client_diff_summarize_func_t summarize_func
,
2332 void *summarize_baton
,
2333 svn_client_ctx_t
*ctx
,
2337 * Produce a diff summary which lists the changed items between the
2338 * filesystem object @a path in peg revision @a peg_revision, as it
2339 * changed between @a start_revision and @a end_revision. @a path can
2340 * be either a working-copy path or URL.
2342 * If @a peg_revision is @c svn_opt_revision_unspecified, behave
2343 * identically to svn_client_diff_summarize2(), using @a path for both
2344 * of that function's @a path1 and @a path2 argments.
2346 * The function may report false positives if @a ignore_ancestry is false,
2347 * as described in the documentation for svn_client_diff_summarize2().
2349 * Call @a summarize_func with @a summarize_baton for each difference
2350 * with a @c svn_client_diff_summarize_t structure describing the difference.
2352 * See svn_client_diff_peg4() for a description of the other parameters.
2354 * @since New in 1.5.
2357 svn_client_diff_summarize_peg2(const char *path
,
2358 const svn_opt_revision_t
*peg_revision
,
2359 const svn_opt_revision_t
*start_revision
,
2360 const svn_opt_revision_t
*end_revision
,
2362 svn_boolean_t ignore_ancestry
,
2363 const apr_array_header_t
*changelists
,
2364 svn_client_diff_summarize_func_t summarize_func
,
2365 void *summarize_baton
,
2366 svn_client_ctx_t
*ctx
,
2370 * Similar to svn_client_diff_summarize_peg2(), but with @a
2371 * changelists passed as @c NULL, and @a depth set according to @a
2372 * recurse: if @a recurse is TRUE, set @a depth to @c
2373 * svn_depth_infinity, if @a recurse is FALSE, set @a depth to @c
2376 * @deprecated Provided for backward compatibility with the 1.4 API.
2378 * @since New in 1.4.
2381 svn_client_diff_summarize_peg(const char *path
,
2382 const svn_opt_revision_t
*peg_revision
,
2383 const svn_opt_revision_t
*start_revision
,
2384 const svn_opt_revision_t
*end_revision
,
2385 svn_boolean_t recurse
,
2386 svn_boolean_t ignore_ancestry
,
2387 svn_client_diff_summarize_func_t summarize_func
,
2388 void *summarize_baton
,
2389 svn_client_ctx_t
*ctx
,
2395 * @defgroup Merge Merge changes between branches.
2400 /** Merge changes from @a source1/@a revision1 to @a source2/@a revision2 into
2401 * the working-copy path @a target_wcpath.
2403 * @a source1 and @a source2 are either URLs that refer to entries in the
2404 * repository, or paths to entries in the working copy.
2406 * By "merging", we mean: apply file differences using
2407 * svn_wc_merge(), and schedule additions & deletions when appropriate.
2409 * @a source1 and @a source2 must both represent the same node kind -- that
2410 * is, if @a source1 is a directory, @a source2 must also be, and if @a source1
2411 * is a file, @a source2 must also be.
2413 * If either @a revision1 or @a revision2 has an `unspecified' or
2414 * unrecognized `kind', return @c SVN_ERR_CLIENT_BAD_REVISION.
2416 * If @a depth is @c svn_depth_infinity, merge fully recursively.
2417 * Else if @c svn_depth_immediates, merge changes at most to files
2418 * that are immediate children of @a target_wcpath and to directory
2419 * properties of @a target_wcpath and its immediate subdirectory children.
2420 * Else if @c svn_depth_files, merge at most to immediate file
2421 * children of @a target_wcpath and to @a target_wcpath itself.
2422 * Else if @c svn_depth_empty, apply changes only to @a target_wcpath
2423 * (i.e., directory property changes only)
2425 * If @a depth is @c svn_depth_unknown, use the depth of @a target_wcpath.
2427 * Use @a ignore_ancestry to control whether or not items being
2428 * diffed will be checked for relatedness first. Unrelated items
2429 * are typically transmitted to the editor as a deletion of one thing
2430 * and the addition of another, but if this flag is TRUE, unrelated
2431 * items will be diffed as if they were related.
2433 * If @a force is not set and the merge involves deleting locally modified or
2434 * unversioned items the operation will fail. If @a force is set such items
2437 * @a merge_options (an array of <tt>const char *</tt>), if non-NULL,
2438 * is used to pass additional command line arguments to the merge
2439 * processes (internal or external). @see
2440 * svn_diff_file_options_parse().
2442 * If @a ctx->notify_func2 is non-NULL, then call @a ctx->notify_func2 with @a
2443 * ctx->notify_baton2 once for each merged target, passing the target's local
2446 * If @a record_only is TRUE, the merge isn't actually performed, but
2447 * the mergeinfo for the revisions which would've been merged is
2448 * recorded in the working copy (and must be subsequently committed
2449 * back to the repository).
2451 * If @a dry_run is TRUE, the merge is carried out, and full notification
2452 * feedback is provided, but the working copy is not modified.
2454 * The authentication baton cached in @a ctx is used to communicate with the
2457 * @since New in 1.5.
2460 svn_client_merge3(const char *source1
,
2461 const svn_opt_revision_t
*revision1
,
2462 const char *source2
,
2463 const svn_opt_revision_t
*revision2
,
2464 const char *target_wcpath
,
2466 svn_boolean_t ignore_ancestry
,
2467 svn_boolean_t force
,
2468 svn_boolean_t record_only
,
2469 svn_boolean_t dry_run
,
2470 const apr_array_header_t
*merge_options
,
2471 svn_client_ctx_t
*ctx
,
2475 * Similar to svn_client_merge3(), but with @a record_only set to @c
2476 * FALSE, and @a depth set according to @a recurse: if @a recurse is
2477 * TRUE, set @a depth to @c svn_depth_infinity, if @a recurse is
2478 * FALSE, set @a depth to @c svn_depth_files.
2480 * @deprecated Provided for backward compatibility with the 1.4 API.
2482 * @since New in 1.4.
2485 svn_client_merge2(const char *source1
,
2486 const svn_opt_revision_t
*revision1
,
2487 const char *source2
,
2488 const svn_opt_revision_t
*revision2
,
2489 const char *target_wcpath
,
2490 svn_boolean_t recurse
,
2491 svn_boolean_t ignore_ancestry
,
2492 svn_boolean_t force
,
2493 svn_boolean_t dry_run
,
2494 const apr_array_header_t
*merge_options
,
2495 svn_client_ctx_t
*ctx
,
2500 * Similar to svn_client_merge2(), but with @a merge_options set to NULL.
2502 * @deprecated Provided for backwards compatibility with the 1.3 API.
2505 svn_client_merge(const char *source1
,
2506 const svn_opt_revision_t
*revision1
,
2507 const char *source2
,
2508 const svn_opt_revision_t
*revision2
,
2509 const char *target_wcpath
,
2510 svn_boolean_t recurse
,
2511 svn_boolean_t ignore_ancestry
,
2512 svn_boolean_t force
,
2513 svn_boolean_t dry_run
,
2514 svn_client_ctx_t
*ctx
,
2520 * Perform a reintegration merge of @a source into @target_wc_path.
2521 * @a target_wc_path must be a single-revision, @c svn_depth_infinity,
2522 * pristine, unswitched working copy -- in other words, it must
2523 * reflect a single revision tree, the "target". The mergeinfo on @a
2524 * source must reflect that all of the target has been merged into it.
2525 * Then this behaves like a merge with svn_client_merge3() from the
2526 * target's URL to the source.
2528 * All other options are handled identically to svn_client_merge3().
2529 * The depth of the merge is always @c svn_depth_infinity.
2531 * @since New in 1.5.
2534 svn_client_merge_reintegrate(const char *source
,
2535 const svn_opt_revision_t
*peg_revision
,
2536 const char *target_wcpath
,
2537 svn_boolean_t force
,
2538 svn_boolean_t dry_run
,
2539 const apr_array_header_t
*merge_options
,
2540 svn_client_ctx_t
*ctx
,
2544 * Merge the changes between the filesystem object @a source in peg
2545 * revision @a peg_revision, as it changed between the ranges described
2546 * in @a ranges_to_merge.
2548 * @a ranges_to_merge is an array of <tt>svn_opt_revision_range_t
2549 * *</tt> ranges. These ranges may describe additive and/or
2550 * subtractive merge ranges, they may overlap fully or partially,
2551 * and/or they may partially or fully negate each other. This
2552 * rangelist is not required to be sorted. If any revision in the
2553 * list of provided ranges has an `unspecified' or unrecognized
2554 * `kind', return @c SVN_ERR_CLIENT_BAD_REVISION.
2556 * All other options are handled identically to svn_client_merge3().
2558 * @since New in 1.5.
2561 svn_client_merge_peg3(const char *source
,
2562 const apr_array_header_t
*ranges_to_merge
,
2563 const svn_opt_revision_t
*peg_revision
,
2564 const char *target_wcpath
,
2566 svn_boolean_t ignore_ancestry
,
2567 svn_boolean_t force
,
2568 svn_boolean_t record_only
,
2569 svn_boolean_t dry_run
,
2570 const apr_array_header_t
*merge_options
,
2571 svn_client_ctx_t
*ctx
,
2575 * Similar to svn_client_merge_peg3(), but with @a record_only set to
2576 * @c FALSE, and @a depth set according to @a recurse: if @a recurse
2577 * is TRUE, set @a depth to @c svn_depth_infinity, if @a recurse is
2578 * FALSE, set @a depth to @c svn_depth_files.
2580 * @deprecated Provided for backwards compatibility with the 1.3 API.
2582 * @since New in 1.4.
2585 svn_client_merge_peg2(const char *source
,
2586 const svn_opt_revision_t
*revision1
,
2587 const svn_opt_revision_t
*revision2
,
2588 const svn_opt_revision_t
*peg_revision
,
2589 const char *target_wcpath
,
2590 svn_boolean_t recurse
,
2591 svn_boolean_t ignore_ancestry
,
2592 svn_boolean_t force
,
2593 svn_boolean_t dry_run
,
2594 const apr_array_header_t
*merge_options
,
2595 svn_client_ctx_t
*ctx
,
2599 * Similar to svn_client_merge_peg2(), but with @a merge_options set to
2602 * @deprecated Provided for backwards compatibility with the 1.3 API.
2604 * @since New in 1.1.
2607 svn_client_merge_peg(const char *source
,
2608 const svn_opt_revision_t
*revision1
,
2609 const svn_opt_revision_t
*revision2
,
2610 const svn_opt_revision_t
*peg_revision
,
2611 const char *target_wcpath
,
2612 svn_boolean_t recurse
,
2613 svn_boolean_t ignore_ancestry
,
2614 svn_boolean_t force
,
2615 svn_boolean_t dry_run
,
2616 svn_client_ctx_t
*ctx
,
2620 /** Set @a suggestions to an ordered array of @c const char *
2621 * potential merge sources (expressed as full repository URLs) for @a
2622 * path_or_url at @a peg_revision. @a path_or_url is a working copy
2623 * path or repository URL. @a ctx is a context used for
2624 * authentication in the repository case. Use @a pool for all
2627 * @since New in 1.5.
2630 svn_client_suggest_merge_sources(apr_array_header_t
**suggestions
,
2631 const char *path_or_url
,
2632 const svn_opt_revision_t
*peg_revision
,
2633 svn_client_ctx_t
*ctx
,
2638 * Set @a *mergeinfo to the mergeinfo describing the ranges which have
2639 * been merged into @a path_or_url as of @a peg_revision, or @c NULL
2640 * if there is no mergeinfo.
2642 * Use @a pool for all necessary allocations.
2644 * If the server doesn't support retrieval of mergeinfo (which will
2645 * never happen for file:// URLs), return an @c
2646 * SVN_ERR_UNSUPPORTED_FEATURE error.
2648 * @since New in 1.5.
2651 svn_client_mergeinfo_get_merged(svn_mergeinfo_t
*mergeinfo
,
2652 const char *path_or_url
,
2653 const svn_opt_revision_t
*peg_revision
,
2654 svn_client_ctx_t
*ctx
,
2659 * Set @a *rangelist to a list of <tt>svn_merge_range_t *</tt>
2660 * items representing ranges of revisions which have not yet been
2661 * merged from @a merge_source_url into @a path_or_url as of @a
2662 * peg_revision, or @c NULL if all candidate revisions of @a
2663 * merge_source have already been merged.
2665 * Use @a pool for all necessary allocations.
2667 * If the server doesn't support retrieval of mergeinfo (which will
2668 * never happen for file:// URLs), return an @c
2669 * SVN_ERR_UNSUPPORTED_FEATURE error.
2671 * @since New in 1.5.
2674 svn_client_mergeinfo_get_available(apr_array_header_t
**rangelist
,
2675 const char *path_or_url
,
2676 const svn_opt_revision_t
*peg_revision
,
2677 const char *merge_source_url
,
2678 svn_client_ctx_t
*ctx
,
2686 * @defgroup Cleanup Cleanup an abnormally terminated working copy.
2691 /** Recursively cleanup a working copy directory @a dir, finishing any
2692 * incomplete operations, removing lockfiles, etc.
2694 * If @a ctx->cancel_func is non-NULL, invoke it with @a
2695 * ctx->cancel_baton at various points during the operation. If it
2696 * returns an error (typically SVN_ERR_CANCELLED), return that error
2700 svn_client_cleanup(const char *dir
,
2701 svn_client_ctx_t
*ctx
,
2708 * @defgroup Relocate Switch a working copy to a different repository.
2714 * Modify a working copy directory @a dir, changing any
2715 * repository URLs that begin with @a from to begin with @a to instead,
2716 * recursing into subdirectories if @a recurse is TRUE.
2718 * @param dir Working copy directory
2719 * @param from Original URL
2721 * @param recurse Whether to recurse
2722 * @param ctx svn_client_ctx_t
2723 * @param pool The pool from which to perform memory allocations
2726 svn_client_relocate(const char *dir
,
2729 svn_boolean_t recurse
,
2730 svn_client_ctx_t
*ctx
,
2737 * @defgroup Revert Remove local changes in a repository.
2743 * Restore the pristine version of a working copy @a paths,
2744 * effectively undoing any local mods. For each path in @a paths,
2745 * revert it if it is a file. Else if it is a directory, revert
2746 * according to @a depth:
2748 * If @a depth is @c svn_depth_empty, revert just the properties on
2749 * the directory; else if @c svn_depth_files, revert the properties
2750 * and any files immediately under the directory; else if
2751 * @c svn_depth_immediates, revert all of the preceding plus
2752 * properties on immediate subdirectories; else if @c svn_depth_infinity,
2753 * revert path and everything under it fully recursively.
2755 * @a changelists is an array of <tt>const char *</tt> changelist
2756 * names, used as a restrictive filter on items reverted; that is,
2757 * don't revert any item unless it's a member of one of those
2758 * changelists. If @a changelists is empty (or altogether @c NULL),
2759 * no changelist filtering occurs.
2761 * If @a ctx->notify_func2 is non-NULL, then for each item reverted,
2762 * call @a ctx->notify_func2 with @a ctx->notify_baton2 and the path of
2763 * the reverted item.
2765 * If an item specified for reversion is not under version control,
2766 * then do not error, just invoke @a ctx->notify_func2 with @a
2767 * ctx->notify_baton2, using notification code @c svn_wc_notify_skip.
2769 * @since New in 1.5.
2772 svn_client_revert2(const apr_array_header_t
*paths
,
2774 const apr_array_header_t
*changelists
,
2775 svn_client_ctx_t
*ctx
,
2780 * Similar to svn_client_revert2(), but with @a changelists passed as
2781 * @c NULL, and @a depth set according to @a recurse: if @a recurse is
2782 * TRUE, @a depth is @c svn_depth_infinity, else if @a recurse is
2783 * FALSE, @a depth is @c svn_depth_empty.
2785 * @note Most APIs map @a recurse==FALSE to @a depth==svn_depth_files;
2786 * revert is deliberately different.
2788 * @deprecated Provided for backwards compatibility with the 1.0 API.
2791 svn_client_revert(const apr_array_header_t
*paths
,
2792 svn_boolean_t recursive
,
2793 svn_client_ctx_t
*ctx
,
2800 * @defgroup Resolved Mark conflicted paths as resolved.
2806 * Similar to svn_client_resolved2(), but without automatic conflict
2807 * resolution support.
2809 * @deprecated Provided for backward compatibility with the 1.4 API.
2812 svn_client_resolved(const char *path
,
2813 svn_boolean_t recursive
,
2814 svn_client_ctx_t
*ctx
,
2817 /** Remove the 'conflicted' state on a working copy @a path. This will
2818 * not semantically resolve conflicts; it just allows @a path to be
2819 * committed in the future. The implementation details are opaque.
2821 * If @a depth is @c svn_depth_empty, act only on @a path; if
2822 * @c svn_depth_files, resolve @a path and its conflicted file
2823 * children (if any); if @c svn_depth_immediates, resolve @a path and
2824 * all its immediate conflicted children (both files and directories,
2825 * if any); if @c svn_depth_infinity, resolve @a path and every
2826 * conflicted file or directory anywhere beneath it.
2828 * If @a conflict_choice is @c svn_wc_conflict_choose_base, resolve the
2829 * conflict with the old file contents; if
2830 * @c svn_wc_conflict_choose_mine_full, use the original working contents;
2831 * if @c svn_wc_conflict_choose_theirs_full, the new contents; and if
2832 * @c svn_wc_conflict_choose_merged, don't change the contents at all,
2833 * just remove the conflict status, which is the pre-1.5 behavior.
2835 * (@c svn_wc_conflict_choose_theirs and @c svn_wc_conflict_choose_mine
2836 * are not yet implemented; the effect of passing one of those values
2837 * as @a conflict_choice is currently undefined, which may or may not
2838 * be an underhanded way of allowing real behaviors to be added for
2839 * them later without revving this interface.)
2841 * If @a path is not in a state of conflict to begin with, do nothing.
2842 * If @a path's conflict state is removed and @a ctx->notify_func2 is non-NULL,
2843 * call @a ctx->notify_func2 with @a ctx->notify_baton2 and @a path.
2845 * @since New in 1.5.
2848 svn_client_resolved2(const char *path
,
2850 svn_wc_conflict_choice_t conflict_choice
,
2851 svn_client_ctx_t
*ctx
,
2858 * @defgroup Copy Copy paths in the working copy and repository.
2864 * A structure which describes the source of a copy operation--its path,
2865 * revision, and peg revision.
2867 * @since New in 1.5.
2869 typedef struct svn_client_copy_source_t
2871 /** The source path or URL. */
2874 /** The source operational revision. */
2875 const svn_opt_revision_t
*revision
;
2877 /** The source peg revision. */
2878 const svn_opt_revision_t
*peg_revision
;
2879 } svn_client_copy_source_t
;
2881 /** Copy each @a src in @a sources to @a dst_path.
2883 * If multiple @a sources are given, @a dst_path must be a directory,
2884 * and @a sources will be copied as children of @a dst_path.
2886 * @a sources must be an array of elements of type
2887 * <tt>svn_client_copy_source_t *</tt>.
2889 * Each @a src in @a sources must be files or directories under version control,
2890 * or URLs of a versioned item in the repository. If @a sources has multiple
2891 * items, the @a src members must be all repository URLs or all working copy
2894 * The parent of @a dst_path must already exist.
2896 * If @a sources has only one item, attempt to copy it to @a dst_path. If
2897 * @a copy_as_child is TRUE and @a dst_path already exists, attempt to copy the
2898 * item as a child of @a dst_path. If @a copy_as_child is FALSE and
2899 * @a dst_path already exists, fail with @c SVN_ERR_ENTRY_EXISTS if @a dst_path
2900 * is a working copy path and @c SVN_ERR_FS_ALREADY_EXISTS if @a dst_path is a
2903 * If @a sources has multiple items, and @a copy_as_child is TRUE, all
2904 * @a sources are copied as children of @a dst_path. If any child of
2905 * @a dst_path already exists with the same name any item in @a sources,
2906 * fail with @c SVN_ERR_ENTRY_EXISTS if @a dst_path is a working copy path and
2907 * @c SVN_ERR_FS_ALREADY_EXISTS if @a dst_path is a URL.
2909 * If @a sources has multiple items, and @a copy_as_child is FALSE, fail
2910 * with @c SVN_ERR_CLIENT_MULTIPLE_SOURCES_DISALLOWED.
2912 * If @a dst_path is a URL, use the authentication baton
2913 * in @a ctx and @a ctx->log_msg_func3/@a ctx->log_msg_baton3 to immediately
2914 * attempt to commit the copy action in the repository. If the commit
2915 * succeeds, allocate (in @a pool) and populate @a *commit_info_p. If
2916 * @a dst_path is not a URL, and the copy succeeds, set @a
2917 * *commit_info_p to @c NULL.
2919 * If @a dst_path is not a URL, then this is just a variant of
2920 * svn_client_add(), where the @a sources are scheduled for addition
2921 * as copies. No changes will happen to the repository until a commit occurs.
2922 * This scheduling can be removed with svn_client_revert2().
2924 * If @a make_parents is TRUE, create any non-existent parent directories
2927 * @a ctx->log_msg_func3/@a ctx->log_msg_baton3 are a callback/baton combo
2928 * that this function can use to query for a commit log message when one is
2931 * If @a ctx->notify_func2 is non-NULL, invoke it with @a ctx->notify_baton2
2932 * for each item added at the new location, passing the new, relative path of
2935 * @since New in 1.5.
2938 svn_client_copy4(svn_commit_info_t
**commit_info_p
,
2939 apr_array_header_t
*sources
,
2940 const char *dst_path
,
2941 svn_boolean_t copy_as_child
,
2942 svn_boolean_t make_parents
,
2943 svn_client_ctx_t
*ctx
,
2947 * Similar to svn_client_copy4(), with only one @a src_path, @a
2948 * copy_as_child set to @c FALSE, and @a make_parents set to @c FALSE.
2949 * Also, use @a src_revision as both the operational and peg revision.
2951 * @since New in 1.4.
2953 * @deprecated Provided for backward compatibility with the 1.4 API.
2956 svn_client_copy3(svn_commit_info_t
**commit_info_p
,
2957 const char *src_path
,
2958 const svn_opt_revision_t
*src_revision
,
2959 const char *dst_path
,
2960 svn_client_ctx_t
*ctx
,
2965 * Similar to svn_client_copy3(), with the difference that if @a dst_path
2966 * already exists and is a directory, copy the item into that directory,
2967 * keeping its name (the last component of @a src_path).
2969 * @since New in 1.3.
2971 * @deprecated Provided for backward compatibility with the 1.3 API.
2974 svn_client_copy2(svn_commit_info_t
**commit_info_p
,
2975 const char *src_path
,
2976 const svn_opt_revision_t
*src_revision
,
2977 const char *dst_path
,
2978 svn_client_ctx_t
*ctx
,
2983 * Similar to svn_client_copy2(), but uses @c svn_client_commit_info_t
2984 * for @a commit_info_p.
2986 * @deprecated Provided for backward compatibility with the 1.2 API.
2989 svn_client_copy(svn_client_commit_info_t
**commit_info_p
,
2990 const char *src_path
,
2991 const svn_opt_revision_t
*src_revision
,
2992 const char *dst_path
,
2993 svn_client_ctx_t
*ctx
,
3000 * @defgroup Move Move paths in the working copy or repository.
3006 * Move @a src_paths to @a dst_path.
3008 * @a src_paths must be files or directories under version control, or
3009 * URLs of versioned items in the repository. All @a src_paths must be of
3010 * the same type. If multiple @a src_paths are given, @a dst_path must be
3011 * a directory and @a src_paths will be moved as children of @a dst_path.
3013 * If @a src_paths are repository URLs:
3015 * - @a dst_path must also be a repository URL.
3017 * - The authentication baton in @a ctx and @a ctx->log_msg_func/@a
3018 * ctx->log_msg_baton are used to commit the move.
3020 * - The move operation will be immediately committed. If the
3021 * commit succeeds, allocate (in @a pool) and populate @a *commit_info_p.
3023 * If @a src_paths are working copy paths:
3025 * - @a dst_path must also be a working copy path.
3027 * - @a ctx->log_msg_func3 and @a ctx->log_msg_baton3 are ignored.
3029 * - This is a scheduling operation. No changes will happen to the
3030 * repository until a commit occurs. This scheduling can be removed
3031 * with svn_client_revert2(). If one of @a src_paths is a file it is
3032 * removed from the working copy immediately. If one of @a src_path
3033 * is a directory it will remain in the working copy but all the files,
3034 * and unversioned items, it contains will be removed.
3036 * - If one of @a src_paths contains locally modified and/or unversioned
3037 * items and @a force is not set, the move will fail. If @a force is set
3038 * such items will be removed.
3040 * - If the move succeeds, set @a *commit_info_p to @c NULL.
3042 * The parent of @a dst_path must already exist.
3044 * If @a src_paths has only one item, attempt to move it to @a dst_path. If
3045 * @a move_as_child is TRUE and @a dst_path already exists, attempt to move the
3046 * item as a child of @a dst_path. If @a move_as_child is FALSE and
3047 * @a dst_path already exists, fail with @c SVN_ERR_ENTRY_EXISTS if @a dst_path
3048 * is a working copy path and @c SVN_ERR_FS_ALREADY_EXISTS if @a dst_path is a
3051 * If @a src_paths has multiple items, and @a move_as_child is TRUE, all
3052 * @a src_paths are moved as children of @a dst_path. If any child of
3053 * @a dst_path already exists with the same name any item in @a src_paths,
3054 * fail with @c SVN_ERR_ENTRY_EXISTS if @a dst_path is a working copy path and
3055 * @c SVN_ERR_FS_ALREADY_EXISTS if @a dst_path is a URL.
3057 * If @a src_paths has multiple items, and @a move_as_child is FALSE, fail
3058 * with @c SVN_ERR_CLIENT_MULTIPLE_SOURCES_DISALLOWED.
3060 * If @a make_parents is TRUE, create any non-existent parent directories
3063 * @a ctx->log_msg_func3/@a ctx->log_msg_baton3 are a callback/baton combo that
3064 * this function can use to query for a commit log message when one is needed.
3066 * If @a ctx->notify_func2 is non-NULL, then for each item moved, call
3067 * @a ctx->notify_func2 with the @a ctx->notify_baton2 twice, once to indicate
3068 * the deletion of the moved thing, and once to indicate the addition of
3069 * the new location of the thing.
3071 * ### Is this really true? What about svn_wc_notify_commit_replaced()? ###
3073 * @since New in 1.5.
3076 svn_client_move5(svn_commit_info_t
**commit_info_p
,
3077 apr_array_header_t
*src_paths
,
3078 const char *dst_path
,
3079 svn_boolean_t force
,
3080 svn_boolean_t move_as_child
,
3081 svn_boolean_t make_parents
,
3082 svn_client_ctx_t
*ctx
,
3086 * Similar to svn_client_move5(), with only one @a src_path, @a
3087 * move_as_child set to @c FALSE, and @a make_parents set to @c FALSE.
3089 * @since New in 1.4.
3091 * @deprecated Provided for backward compatibility with the 1.4 API.
3094 svn_client_move4(svn_commit_info_t
**commit_info_p
,
3095 const char *src_path
,
3096 const char *dst_path
,
3097 svn_boolean_t force
,
3098 svn_client_ctx_t
*ctx
,
3102 * Similar to svn_client_move4(), with the difference that if @a dst_path
3103 * already exists and is a directory, move the item into that directory,
3104 * keeping its name (the last component of @a src_path).
3106 * @since New in 1.3.
3108 * @deprecated Provided for backward compatibility with the 1.3 API.
3111 svn_client_move3(svn_commit_info_t
**commit_info_p
,
3112 const char *src_path
,
3113 const char *dst_path
,
3114 svn_boolean_t force
,
3115 svn_client_ctx_t
*ctx
,
3119 * Similar to svn_client_move3(), but uses @c svn_client_commit_info_t
3120 * for @a commit_info_p.
3122 * @deprecated Provided for backward compatibility with the 1.2 API.
3124 * @since New in 1.2.
3127 svn_client_move2(svn_client_commit_info_t
**commit_info_p
,
3128 const char *src_path
,
3129 const char *dst_path
,
3130 svn_boolean_t force
,
3131 svn_client_ctx_t
*ctx
,
3135 * Similar to svn_client_move2(), but an extra argument @a src_revision
3136 * must be passed. This has no effect, but must be of kind
3137 * @c svn_opt_revision_unspecified or @c svn_opt_revision_head,
3138 * otherwise error @c SVN_ERR_UNSUPPORTED_FEATURE is returned.
3140 * @deprecated Provided for backward compatibility with the 1.1 API.
3143 svn_client_move(svn_client_commit_info_t
**commit_info_p
,
3144 const char *src_path
,
3145 const svn_opt_revision_t
*src_revision
,
3146 const char *dst_path
,
3147 svn_boolean_t force
,
3148 svn_client_ctx_t
*ctx
,
3156 * Note that certain svn-controlled properties must always have their
3157 * values set and stored in UTF8 with LF line endings. When
3158 * retrieving these properties, callers must convert the values back
3159 * to native locale and native line-endings before displaying them to
3160 * the user. For help with this task, see
3161 * svn_prop_needs_translation(), svn_subst_translate_string(), and
3162 * svn_subst_detranslate_string().
3164 * @defgroup svn_client_prop_funcs Property functions
3170 * Set @a propname to @a propval on @a target.
3171 * A @a propval of @c NULL will delete the property.
3173 * If @a depth is @c svn_depth_empty, set the property on @a target
3174 * only; if @c svn_depth_files, set it on @a target and its file
3175 * children (if any); if @c svn_depth_immediates, on @a target and all
3176 * of its immediate children (both files and directories); if
3177 * @c svn_depth_infinity, on @a target and everything beneath it.
3179 * The @a target may only be an URL if @a base_revision_for_url is not
3180 * @c SVN_INVALID_REVNUM; in this case, the property will only be set
3181 * if it has not changed since revision @a base_revision_for_url.
3182 * @a base_revision_for_url must be @c SVN_INVALID_REVNUM if @a target
3183 * is not an URL. @a depth deeper than @c svn_depth_empty is not
3184 * supported on URLs. The authentication baton in @a ctx and @a
3185 * ctx->log_msg_func3/@a ctx->log_msg_baton3 will be used to
3186 * immediately attempt to commit the property change in the
3187 * repository. If the commit succeeds, allocate (in @a pool) and
3188 * populate @a *commit_info_p.
3190 * If @a propname is an svn-controlled property (i.e. prefixed with
3191 * @c SVN_PROP_PREFIX), then the caller is responsible for ensuring that
3192 * the value is UTF8-encoded and uses LF line-endings.
3194 * If @a skip_checks is TRUE, do no validity checking. But if @a
3195 * skip_checks is FALSE, and @a propname is not a valid property for @a
3196 * target, return an error, either @c SVN_ERR_ILLEGAL_TARGET (if the
3197 * property is not appropriate for @a target), or @c
3198 * SVN_ERR_BAD_MIME_TYPE (if @a propname is "svn:mime-type", but @a
3199 * propval is not a valid mime-type).
3201 * @a changelists is an array of <tt>const char *</tt> changelist
3202 * names, used as a restrictive filter on items whose properties are
3203 * set; that is, don't set properties on any item unless it's a member
3204 * of one of those changelists. If @a changelists is empty (or
3205 * altogether @c NULL), no changelist filtering occurs.
3207 * If @a ctx->cancel_func is non-NULL, invoke it passing @a
3208 * ctx->cancel_baton at various places during the operation.
3210 * Use @a pool for all memory allocation.
3212 * @since New in 1.5.
3215 svn_client_propset3(svn_commit_info_t
**commit_info_p
,
3216 const char *propname
,
3217 const svn_string_t
*propval
,
3220 svn_boolean_t skip_checks
,
3221 svn_revnum_t base_revision_for_url
,
3222 const apr_array_header_t
*changelists
,
3223 svn_client_ctx_t
*ctx
,
3227 * Like svn_client_propset3(), but with @a base_revision_for_url
3228 * always @c SVN_INVALID_REVNUM; @a commit_info_p always @c NULL; @a
3229 * changelists always @c NULL; and @a depth set according to @a
3230 * recurse: if @a recurse is TRUE, @a depth is @c svn_depth_infinity,
3231 * else @c svn_depth_empty.
3233 * @deprecated Provided for backward compatibility with the 1.4 API.
3236 svn_client_propset2(const char *propname
,
3237 const svn_string_t
*propval
,
3239 svn_boolean_t recurse
,
3240 svn_boolean_t skip_checks
,
3241 svn_client_ctx_t
*ctx
,
3245 * Like svn_client_propset2(), but with @a skip_checks always FALSE and a
3246 * newly created @a ctx.
3248 * @deprecated Provided for backward compatibility with the 1.1 API.
3251 svn_client_propset(const char *propname
,
3252 const svn_string_t
*propval
,
3254 svn_boolean_t recurse
,
3257 /** Set @a propname to @a propval on revision @a revision in the repository
3258 * represented by @a URL. Use the authentication baton in @a ctx for
3259 * authentication, and @a pool for all memory allocation. Return the actual
3260 * rev affected in @a *set_rev. A @a propval of @c NULL will delete the
3263 * If @a force is TRUE, allow newlines in the author property.
3265 * If @a propname is an svn-controlled property (i.e. prefixed with
3266 * @c SVN_PROP_PREFIX), then the caller is responsible for ensuring that
3267 * the value UTF8-encoded and uses LF line-endings.
3269 * Note that unlike its cousin svn_client_propset3(), this routine
3270 * doesn't affect the working copy at all; it's a pure network
3271 * operation that changes an *unversioned* property attached to a
3272 * revision. This can be used to tweak log messages, dates, authors,
3273 * and the like. Be careful: it's a lossy operation.
3275 * Also note that unless the administrator creates a
3276 * pre-revprop-change hook in the repository, this feature will fail.
3279 svn_client_revprop_set(const char *propname
,
3280 const svn_string_t
*propval
,
3282 const svn_opt_revision_t
*revision
,
3283 svn_revnum_t
*set_rev
,
3284 svn_boolean_t force
,
3285 svn_client_ctx_t
*ctx
,
3289 * Set @a *props to a hash table whose keys are `<tt>char *</tt>' paths,
3290 * prefixed by @a target (a working copy path or a URL), of items on
3291 * which property @a propname is set, and whose values are `@c svn_string_t
3292 * *' representing the property value for @a propname at that path.
3294 * Allocate @a *props, its keys, and its values in @a pool.
3296 * Don't store any path, not even @a target, if it does not have a
3297 * property named @a propname.
3299 * If @a revision->kind is @c svn_opt_revision_unspecified, then: get
3300 * properties from the working copy if @a target is a working copy
3301 * path, or from the repository head if @a target is a URL. Else get
3302 * the properties as of @a revision. The actual node revision
3303 * selected is determined by the path as it exists in @a peg_revision.
3304 * If @a peg_revision->kind is @c svn_opt_revision_unspecified, then
3305 * it defaults to @c svn_opt_revision_head for URLs or @c
3306 * svn_opt_revision_working for WC targets. Use the authentication
3307 * baton in @a ctx for authentication if contacting the repository.
3308 * If @a actual_revnum is not @c NULL, the actual revision number used
3309 * for the fetch is stored in @a *actual_revnum.
3311 * If @a depth is @c svn_depth_empty, fetch the property from
3312 * @a target only; if @c svn_depth_files, fetch from @a target and its
3313 * file children (if any); if @c svn_depth_immediates, from @a target
3314 * and all of its immediate children (both files and directories); if
3315 * @c svn_depth_infinity, from @a target and everything beneath it.
3317 * @a changelists is an array of <tt>const char *</tt> changelist
3318 * names, used as a restrictive filter on items whose properties are
3319 * set; that is, don't set properties on any item unless it's a member
3320 * of one of those changelists. If @a changelists is empty (or
3321 * altogether @c NULL), no changelist filtering occurs.
3323 * If error, don't touch @a *props, otherwise @a *props is a hash table
3326 * @since New in 1.5.
3329 svn_client_propget3(apr_hash_t
**props
,
3330 const char *propname
,
3332 const svn_opt_revision_t
*peg_revision
,
3333 const svn_opt_revision_t
*revision
,
3334 svn_revnum_t
*actual_revnum
,
3336 const apr_array_header_t
*changelists
,
3337 svn_client_ctx_t
*ctx
,
3341 * Similar to svn_client_propget3(), except that @a actual_revnum and
3342 * @a changelists are always @c NULL, and @a depth is set according to
3343 * @a recurse: if @a recurse is TRUE, then @a depth is @c
3344 * svn_depth_infinity, else @c svn_depth_empty.
3346 * @deprecated Provided for backward compatibility with the 1.2 API.
3349 svn_client_propget2(apr_hash_t
**props
,
3350 const char *propname
,
3352 const svn_opt_revision_t
*peg_revision
,
3353 const svn_opt_revision_t
*revision
,
3354 svn_boolean_t recurse
,
3355 svn_client_ctx_t
*ctx
,
3359 * Similar to svn_client_propget2(), except that @a peg_revision is
3360 * always the same as @a revision.
3362 * @deprecated Provided for backward compatibility with the 1.1 API.
3365 svn_client_propget(apr_hash_t
**props
,
3366 const char *propname
,
3368 const svn_opt_revision_t
*revision
,
3369 svn_boolean_t recurse
,
3370 svn_client_ctx_t
*ctx
,
3373 /** Set @a *propval to the value of @a propname on revision @a revision
3374 * in the repository represented by @a URL. Use the authentication baton
3375 * in @a ctx for authentication, and @a pool for all memory allocation.
3376 * Return the actual rev queried in @a *set_rev.
3378 * Note that unlike its cousin svn_client_propget(), this routine
3379 * doesn't affect the working copy at all; it's a pure network
3380 * operation that queries an *unversioned* property attached to a
3381 * revision. This can query log messages, dates, authors, and the
3385 svn_client_revprop_get(const char *propname
,
3386 svn_string_t
**propval
,
3388 const svn_opt_revision_t
*revision
,
3389 svn_revnum_t
*set_rev
,
3390 svn_client_ctx_t
*ctx
,
3394 * Invoke @a receiver with @a receiver_baton to return the regular properies
3395 * of @a target, a URL or working copy path. @a receiver will be called
3396 * for each path encountered.
3398 * If @a revision->kind is @c svn_opt_revision_unspecified, then get
3399 * properties from the working copy, if @a target is a working copy
3400 * path, or from the repository head if @a target is a URL. Else get
3401 * the properties as of @a revision. The actual node revision
3402 * selected is determined by the path as it exists in @a peg_revision.
3403 * If @a peg_revision->kind is @c svn_opt_revision_unspecified, then it
3404 * defaults to @c svn_opt_revision_head for URLs or @c
3405 * svn_opt_revision_working for WC targets. Use the authentication
3406 * baton cached in @a ctx for authentication if contacting the
3409 * If @a depth is @c svn_depth_empty, list only the properties of
3410 * @a path_or_url itself. If @a depth is @c svn_depth_files, and
3411 * @a path_or_url is a directory, list the properties of @a path_or_url
3412 * and its file entries. If @c svn_depth_immediates, list the properties
3413 * of its immediate file and directory entries. If @c svn_depth_infinity,
3414 * list the properties of its file entries and recurse (with
3415 * @c svn_depth_infinity) on directory entries. @c svn_depth_unknown is
3416 * equivalent to @c svn_depth_empty. All other values produce undefined
3419 * @a changelists is an array of <tt>const char *</tt> changelist
3420 * names, used as a restrictive filter on items whose properties are
3421 * set; that is, don't set properties on any item unless it's a member
3422 * of one of those changelists. If @a changelists is empty (or
3423 * altogether @c NULL), no changelist filtering occurs.
3425 * If @a target is not found, return the error @c SVN_ERR_ENTRY_NOT_FOUND.
3427 * @since New in 1.5.
3430 svn_client_proplist3(const char *target
,
3431 const svn_opt_revision_t
*peg_revision
,
3432 const svn_opt_revision_t
*revision
,
3434 const apr_array_header_t
*changelists
,
3435 svn_proplist_receiver_t receiver
,
3436 void *receiver_baton
,
3437 svn_client_ctx_t
*ctx
,
3441 * Similar to svn_client_proplist3(), except the properties are
3442 * returned as an array of @c svn_client_proplist_item_t * structures
3443 * instead of by invoking the receiver function, there's no support
3444 * for @a changelists filtering, and @a recurse is used instead of a
3445 * @c svn_depth_t parameter (FALSE corresponds to @c svn_depth_empty,
3446 * and TRUE to @c svn_depth_infinity).
3448 * @since New in 1.2.
3450 * @deprecated Provided for backward compatiblility with the 1.2 API.
3453 svn_client_proplist2(apr_array_header_t
**props
,
3455 const svn_opt_revision_t
*peg_revision
,
3456 const svn_opt_revision_t
*revision
,
3457 svn_boolean_t recurse
,
3458 svn_client_ctx_t
*ctx
,
3462 * Similar to svn_client_proplist2(), except that @a peg_revision is
3463 * always the same as @a revision.
3465 * @deprecated Provided for backward compatibility with the 1.1 API.
3468 svn_client_proplist(apr_array_header_t
**props
,
3470 const svn_opt_revision_t
*revision
,
3471 svn_boolean_t recurse
,
3472 svn_client_ctx_t
*ctx
,
3475 /** Set @a *props to a hash of the revision props attached to @a revision in
3476 * the repository represented by @a URL. Use the authentication baton cached
3477 * in @a ctx for authentication, and @a pool for all memory allocation.
3478 * Return the actual rev queried in @a *set_rev.
3480 * The allocated hash maps (<tt>const char *</tt>) property names to
3481 * (@c svn_string_t *) property values.
3483 * Note that unlike its cousin svn_client_proplist(), this routine
3484 * doesn't read a working copy at all; it's a pure network operation
3485 * that reads *unversioned* properties attached to a revision.
3488 svn_client_revprop_list(apr_hash_t
**props
,
3490 const svn_opt_revision_t
*revision
,
3491 svn_revnum_t
*set_rev
,
3492 svn_client_ctx_t
*ctx
,
3498 * @defgroup Export Export a tree from version control.
3504 * Export the contents of either a subversion repository or a
3505 * subversion working copy into a 'clean' directory (meaning a
3506 * directory with no administrative directories). If @a result_rev
3507 * is not @c NULL and the path being exported is a repository URL, set
3508 * @a *result_rev to the value of the revision actually exported (set
3509 * it to @c SVN_INVALID_REVNUM for local exports).
3511 * @a from is either the path the working copy on disk, or a URL to the
3512 * repository you wish to export.
3514 * @a to is the path to the directory where you wish to create the exported
3517 * @a peg_revision is the revision where the path is first looked up
3518 * when exporting from a repository. If @a peg_revision->kind is @c
3519 * svn_opt_revision_unspecified, then it defaults to @c svn_opt_revision_head
3520 * for URLs or @c svn_opt_revision_working for WC targets.
3522 * @a revision is the revision that should be exported, which is only used
3523 * when exporting from a repository.
3525 * @a ctx->notify_func2 and @a ctx->notify_baton2 are the notification
3526 * functions and baton which are passed to svn_client_checkout() when
3527 * exporting from a repository.
3529 * @a ctx is a context used for authentication in the repository case.
3531 * @a overwrite if TRUE will cause the export to overwrite files or directories.
3533 * If @a ignore_externals is set, don't process externals definitions
3534 * as part of this operation.
3536 * @a native_eol allows you to override the standard eol marker on the platform
3537 * you are running on. Can be either "LF", "CR" or "CRLF" or NULL. If NULL
3538 * will use the standard eol marker. Any other value will cause the
3539 * SVN_ERR_IO_UNKNOWN_EOL error to be returned.
3541 * If @a depth is @c svn_depth_infinity, export fully recursively.
3542 * Else if it is @c svn_depth_immediates, export @a from and its immediate
3543 * children (if any), but with subdirectories empty and at
3544 * @c svn_depth_empty. Else if @c svn_depth_files, export @a from and
3545 * its immediate file children (if any) only. If @a depth is @c
3546 * svn_depth_empty, then export exactly @a from and none of its children.
3548 * If @a recurse is TRUE, export recursively. Otherwise, export
3549 * just the directory represented by @a from and its immediate
3550 * non-directory children, but none of its child directories (if any).
3551 * Also, if @a recurse is FALSE, the export will behave as if
3552 * @a ignore_externals is TRUE.
3554 * All allocations are done in @a pool.
3556 * @since New in 1.5.
3559 svn_client_export4(svn_revnum_t
*result_rev
,
3562 const svn_opt_revision_t
*peg_revision
,
3563 const svn_opt_revision_t
*revision
,
3564 svn_boolean_t overwrite
,
3565 svn_boolean_t ignore_externals
,
3567 const char *native_eol
,
3568 svn_client_ctx_t
*ctx
,
3573 * Similar to svn_client_export4(), but with @a depth set according to
3574 * @a recurse: if @a recurse is TRUE, set @a depth to
3575 * @c svn_depth_infinity, if @a recurse is FALSE, set @a depth to
3576 * @c svn_depth_files.
3578 * @deprecated Provided for backward compatibility with the 1.4 API.
3580 * @since New in 1.2.
3583 svn_client_export3(svn_revnum_t
*result_rev
,
3586 const svn_opt_revision_t
*peg_revision
,
3587 const svn_opt_revision_t
*revision
,
3588 svn_boolean_t overwrite
,
3589 svn_boolean_t ignore_externals
,
3590 svn_boolean_t recurse
,
3591 const char *native_eol
,
3592 svn_client_ctx_t
*ctx
,
3597 * Similar to svn_client_export3(), but with @a peg_revision
3598 * always set to @c svn_opt_revision_unspecified, @a overwrite set to
3599 * the value of @a force, @a ignore_externals always FALSE, and
3600 * @a recurse always TRUE.
3602 * @since New in 1.1.
3603 * @deprecated Provided for backward compatibility with the 1.1 API.
3606 svn_client_export2(svn_revnum_t
*result_rev
,
3609 svn_opt_revision_t
*revision
,
3610 svn_boolean_t force
,
3611 const char *native_eol
,
3612 svn_client_ctx_t
*ctx
,
3617 * Similar to svn_client_export2(), but with @a native_eol always set
3620 * @deprecated Provided for backward compatibility with the 1.0 API.
3623 svn_client_export(svn_revnum_t
*result_rev
,
3626 svn_opt_revision_t
*revision
,
3627 svn_boolean_t force
,
3628 svn_client_ctx_t
*ctx
,
3634 * @defgroup List List / ls
3639 /** Invoked by svn_client_list2() for each @a path with its @a dirent and,
3640 * if @a path is locked, its @a lock. @a abs_path is the filesystem path
3641 * to which @a path is relative. @a baton is the baton passed to the
3642 * caller. @a pool may be used for temporary allocations.
3644 * @since New in 1.4.
3646 typedef svn_error_t
*(*svn_client_list_func_t
)(void *baton
,
3648 const svn_dirent_t
*dirent
,
3649 const svn_lock_t
*lock
,
3650 const char *abs_path
,
3654 * Report the directory entry, and possibly children, for @a
3655 * path_or_url at @a revision. The actual node revision selected is
3656 * determined by the path as it exists in @a peg_revision. If @a
3657 * peg_revision->kind is @c svn_opt_revision_unspecified, then it defaults
3658 * to @c svn_opt_revision_head for URLs or @c svn_opt_revision_working
3661 * Report directory entries by invoking @a list_func/@a baton with @a path
3662 * relative to @a path_or_url. The dirent for @a path_or_url is reported
3663 * using an empty @a path. If @a path_or_url is a directory, also report
3664 * its children. If @a path_or_url is non-existent, return
3665 * @c SVN_ERR_FS_NOT_FOUND.
3667 * If @a fetch_locks is TRUE, include locks when reporting directory entries.
3669 * Use @a pool for temporary allocations.
3671 * Use authentication baton cached in @a ctx to authenticate against the
3674 * If @a depth is @c svn_depth_empty, list just @a path_or_url itself.
3675 * If @a depth is @c svn_depth_files, list @a path_or_url and its file
3676 * entries. If @c svn_depth_immediates, list its immediate file and
3677 * directory entries. If @c svn_depth_infinity, list file entries and
3678 * recurse (with @c svn_depth_infinity) on directory entries.
3680 * @a dirent_fields controls which fields in the @c svn_dirent_t's are
3681 * filled in. To have them totally filled in use @c SVN_DIRENT_ALL,
3682 * otherwise simply bitwise OR together the combination of @c SVN_DIRENT_
3683 * fields you care about.
3685 * @since New in 1.5.
3688 svn_client_list2(const char *path_or_url
,
3689 const svn_opt_revision_t
*peg_revision
,
3690 const svn_opt_revision_t
*revision
,
3692 apr_uint32_t dirent_fields
,
3693 svn_boolean_t fetch_locks
,
3694 svn_client_list_func_t list_func
,
3696 svn_client_ctx_t
*ctx
,
3700 * Similar to svn_client_list2(), but with @a recurse instead of @a depth.
3701 * If @a recurse is TRUE, pass @c svn_depth_files for @a depth; else
3702 * pass @c svn_depth_infinity.
3704 * @since New in 1.4.
3706 * @deprecated Provided for backward compatibility with the 1.4 API.
3709 svn_client_list(const char *path_or_url
,
3710 const svn_opt_revision_t
*peg_revision
,
3711 const svn_opt_revision_t
*revision
,
3712 svn_boolean_t recurse
,
3713 apr_uint32_t dirent_fields
,
3714 svn_boolean_t fetch_locks
,
3715 svn_client_list_func_t list_func
,
3717 svn_client_ctx_t
*ctx
,
3721 * Same as svn_client_list(), but always passes @c SVN_DIRENT_ALL for
3722 * the @a dirent_fields argument and returns all information in two
3723 * hash tables instead of invoking a callback.
3725 * Set @a *dirents to a newly allocated hash of directory entries.
3726 * The @a dirents hash maps entry names (<tt>const char *</tt>) to
3727 * @c svn_dirent_t *'s.
3729 * If @a locks is not @c NULL, set @a *locks to a hash table mapping
3730 * entry names (<tt>const char *</tt>) to @c svn_lock_t *'s.
3732 * @since New in 1.3.
3734 * @deprecated Provided for backward compatibility with the 1.3 API.
3737 svn_client_ls3(apr_hash_t
**dirents
,
3739 const char *path_or_url
,
3740 const svn_opt_revision_t
*peg_revision
,
3741 const svn_opt_revision_t
*revision
,
3742 svn_boolean_t recurse
,
3743 svn_client_ctx_t
*ctx
,
3747 * Same as svn_client_ls3(), but without the ability to get locks.
3749 * @since New in 1.2.
3751 * @deprecated Provided for backward compatibility with the 1.2 API.
3754 svn_client_ls2(apr_hash_t
**dirents
,
3755 const char *path_or_url
,
3756 const svn_opt_revision_t
*peg_revision
,
3757 const svn_opt_revision_t
*revision
,
3758 svn_boolean_t recurse
,
3759 svn_client_ctx_t
*ctx
,
3763 * Similar to svn_client_ls2() except that @a peg_revision is always
3764 * the same as @a revision.
3766 * @deprecated Provided for backward compatibility with the 1.1 API.
3769 svn_client_ls(apr_hash_t
**dirents
,
3770 const char *path_or_url
,
3771 svn_opt_revision_t
*revision
,
3772 svn_boolean_t recurse
,
3773 svn_client_ctx_t
*ctx
,
3780 * @defgroup Cat View the contents of a file in the repository.
3786 * Output the content of file identified by @a path_or_url and @a
3787 * revision to the stream @a out. The actual node revision selected
3788 * is determined by the path as it exists in @a peg_revision. If @a
3789 * peg_revision->kind is @c svn_opt_revision_unspecified, then it defaults
3790 * to @c svn_opt_revision_head for URLs or @c svn_opt_revision_working
3793 * If @a path_or_url is not a local path, then if @a revision is of
3794 * kind @c svn_opt_revision_previous (or some other kind that requires
3795 * a local path), an error will be returned, because the desired
3796 * revision cannot be determined.
3798 * Use the authentication baton cached in @a ctx to authenticate against the
3801 * Perform all allocations from @a pool.
3803 * ### @todo Add an expansion/translation flag?
3805 * @since New in 1.2.
3808 svn_client_cat2(svn_stream_t
*out
,
3809 const char *path_or_url
,
3810 const svn_opt_revision_t
*peg_revision
,
3811 const svn_opt_revision_t
*revision
,
3812 svn_client_ctx_t
*ctx
,
3817 * Similar to svn_client_cat2() except that the peg revision is always
3818 * the same as @a revision.
3820 * @deprecated Provided for backward compatibility with the 1.1 API.
3823 svn_client_cat(svn_stream_t
*out
,
3824 const char *path_or_url
,
3825 const svn_opt_revision_t
*revision
,
3826 svn_client_ctx_t
*ctx
,
3829 /** @} end group: cat */
3833 /** Changelist commands
3835 * @defgroup svn_client_changelist_funcs Client Changelist Functions
3839 /** Implementation note:
3841 * For now, changelists are implemented by scattering the
3842 * associations across multiple .svn/entries files in a working copy.
3843 * However, this client API was written so that we have the option of
3844 * changing the underlying implementation -- we may someday want to
3845 * store changelist definitions in a centralized database.
3849 * Add each path in @a paths (recursing to @a depth as necessary) to
3850 * @a changelist. If a path is already a member of another
3851 * changelist, then remove it from the other changelist and add it to
3852 * @a changelist. (For now, a path cannot belong to two changelists
3855 * @a changelists is an array of <tt>const char *</tt> changelist
3856 * names, used as a restrictive filter on items whose changelist
3857 * assignments are adjusted; that is, don't tweak the changeset of any
3858 * item unless it's currently a member of one of those changelists.
3859 * If @a changelists is empty (or altogether @c NULL), no changelist
3862 * @note This metadata is purely a client-side "bookkeeping"
3863 * convenience, and is entirely managed by the working copy.
3865 * @since New in 1.5.
3868 svn_client_add_to_changelist(const apr_array_header_t
*paths
,
3869 const char *changelist
,
3871 const apr_array_header_t
*changelists
,
3872 svn_client_ctx_t
*ctx
,
3876 * Remove each path in @a paths (recursing to @a depth as necessary)
3877 * from changelists to which they are currently assigned.
3879 * @a changelists is an array of <tt>const char *</tt> changelist
3880 * names, used as a restrictive filter on items whose changelist
3881 * assignments are removed; that is, don't remove from a changeset any
3882 * item unless it's currently a member of one of those changelists.
3883 * If @a changelists is empty (or altogether @c NULL), all changelist
3884 * assignments in and under each path in @a paths (to @a depth) will
3887 * @note This metadata is purely a client-side "bookkeeping"
3888 * convenience, and is entirely managed by the working copy.
3890 * @since New in 1.5.
3893 svn_client_remove_from_changelists(const apr_array_header_t
*paths
,
3895 const apr_array_header_t
*changelists
,
3896 svn_client_ctx_t
*ctx
,
3900 * The callback type used by @a svn_client_get_changelist
3902 * On each invocation, @a path is a newly discovered member of the
3903 * changelist, and @a baton is a private function closure.
3905 * @since New in 1.5.
3907 typedef svn_error_t
*(*svn_changelist_receiver_t
) (void *baton
,
3909 const char *changelist
,
3913 * Beginning at @a path, crawl to @a depth to discover every path in
3914 * or under @a path which belongs to one of the changelists in @a
3915 * changelists (an array of <tt>const char *</tt> changelist names).
3916 * If @a changelists is @c null, discover paths with any changelist.
3917 * Call @a callback_func (with @a callback_baton) each time a
3918 * changelist-having path is discovered.
3920 * If @a ctx->cancel_func is not @c null, invoke it passing @a
3921 * ctx->cancel_baton during the recursive walk.
3923 * @since New in 1.5.
3926 svn_client_get_changelists(const char *path
,
3927 const apr_array_header_t
*changelists
,
3929 svn_changelist_receiver_t callback_func
,
3930 void *callback_baton
,
3931 svn_client_ctx_t
*ctx
,
3938 /** Locking commands
3940 * @defgroup svn_client_locking_funcs Client Locking Functions
3945 * Lock @a targets in the repository. @a targets is an array of
3946 * <tt>const char *</tt> paths - either all working copy paths or URLs. All
3947 * @a targets must be in the same repository.
3949 * If a target is already locked in the repository, no lock will be
3950 * acquired unless @a steal_lock is TRUE, in which case the locks are
3951 * stolen. @a comment, if non-NULL, is an xml-escapable description
3952 * stored with each lock in the repository. Each acquired lock will
3953 * be stored in the working copy if the targets are WC paths.
3955 * For each target @a ctx->notify_func2/notify_baton2 will be used to indicate
3956 * whether it was locked. An action of @c svn_wc_notify_state_locked
3957 * means that the path was locked. If the path was not locked because
3958 * it was out of date or there was already a lock in the repository,
3959 * the notification function will be called with @c
3960 * svn_wc_notify_failed_lock, and the error passed in the notification
3963 * Use @a pool for temporary allocations.
3965 * @since New in 1.2.
3968 svn_client_lock(const apr_array_header_t
*targets
,
3969 const char *comment
,
3970 svn_boolean_t steal_lock
,
3971 svn_client_ctx_t
*ctx
,
3975 * Unlock @a targets in the repository. @a targets is an array of
3976 * <tt>const char *</tt> paths - either all working copy paths or all URLs.
3977 * All @a targets must be in the same repository.
3979 * If the targets are WC paths, and @a break_lock is FALSE, the working
3980 * copy must contain a locks for each target.
3981 * If this is not the case, or the working copy lock doesn't match the
3982 * lock token in the repository, an error will be signaled.
3984 * If the targets are URLs, the locks may be broken even if @a break_lock
3985 * is FALSE, but only if the lock owner is the same as the
3986 * authenticated user.
3988 * If @a break_lock is TRUE, the locks will be broken in the
3989 * repository. In both cases, the locks, if any, will be removed from
3990 * the working copy if the targets are WC paths.
3992 * The notification functions in @a ctx will be called for each
3993 * target. If the target was successfully unlocked, @c
3994 * svn_wc_notify_unlocked will be used. Else, if the error is
3995 * directly related to unlocking the path (see @c
3996 * SVN_ERR_IS_UNLOCK_ERROR), @c svn_wc_notify_failed_unlock will be
3997 * used and the error will be passed in the notification structure.
3999 * Use @a pool for temporary allocations.
4001 * @since New in 1.2.
4004 svn_client_unlock(const apr_array_header_t
*targets
,
4005 svn_boolean_t break_lock
,
4006 svn_client_ctx_t
*ctx
,
4012 * @defgroup Info Show repository information about a working copy.
4017 /** The value of the size in the repository is unknown (because the info
4018 * was fetched for a local path, not an URL).
4022 #define SVN_INFO_SIZE_UNKNOWN ((apr_size_t) -1)
4025 * A structure which describes various system-generated metadata about
4026 * a working-copy path or URL.
4028 * @note Fields may be added to the end of this structure in future
4029 * versions. Therefore, users shouldn't allocate structures of this
4030 * type, to preserve binary compatibility.
4032 * @since New in 1.2.
4034 typedef struct svn_info_t
4036 /** Where the item lives in the repository. */
4039 /** The revision of the object. If path_or_url is a working-copy
4040 * path, then this is its current working revnum. If path_or_url
4041 * is a URL, then this is the repos revision that path_or_url lives in. */
4044 /** The node's kind. */
4045 svn_node_kind_t kind
;
4047 /** The root URL of the repository. */
4048 const char *repos_root_URL
;
4050 /** The repository's UUID. */
4051 const char *repos_UUID
;
4053 /** The last revision in which this object changed. */
4054 svn_revnum_t last_changed_rev
;
4056 /** The date of the last_changed_rev. */
4057 apr_time_t last_changed_date
;
4059 /** The author of the last_changed_rev. */
4060 const char *last_changed_author
;
4062 /** An exclusive lock, if present. Could be either local or remote. */
4065 /** Whether or not to ignore the next 10 wc-specific fields. */
4066 svn_boolean_t has_wc_info
;
4069 * @name Working-copy path fields
4070 * These things only apply to a working-copy path.
4071 * See svn_wc_entry_t for explanations.
4074 svn_wc_schedule_t schedule
;
4075 const char *copyfrom_url
;
4076 svn_revnum_t copyfrom_rev
;
4077 apr_time_t text_time
;
4078 apr_time_t prop_time
;
4079 const char *checksum
;
4080 const char *conflict_old
;
4081 const char *conflict_new
;
4082 const char *conflict_wrk
;
4083 const char *prejfile
;
4085 /* @since New in 1.5. */
4086 const char *changelist
;
4090 * The size of the file after being translated into its local
4091 * representation, or @c SVN_WC_ENTRY_WORKING_SIZE_UNKNOWN if
4092 * unknown. Not applicable for directories.
4093 * @since New in 1.5.
4095 apr_size_t working_size
;
4099 * The size of the file in the repository (untranslated,
4100 * e.g. without adjustment of line endings and keyword
4101 * expansion). Only applicable for file -- not directory -- URLs.
4102 * For working copy paths, size will be @c SVN_INFO_SIZE_UNKNOWN.
4103 * @since New in 1.5.
4111 * The callback invoked by svn_client_info2(). Each invocation
4112 * describes @a path with the information present in @a info. Note
4113 * that any fields within @a info may be NULL if information is
4114 * unavailable. Use @a pool for all temporary allocation.
4116 * @since New in 1.2.
4118 typedef svn_error_t
*(*svn_info_receiver_t
)
4121 const svn_info_t
*info
,
4125 * Return a duplicate of @a info, allocated in @a pool. No part of the new
4126 * structure will be shared with @a info.
4128 * @since New in 1.3.
4131 svn_info_dup(const svn_info_t
*info
, apr_pool_t
*pool
);
4134 * Invoke @a receiver with @a receiver_baton to return information
4135 * about @a path_or_url in @a revision. The information returned is
4136 * system-generated metadata, not the sort of "property" metadata
4137 * created by users. See @c svn_info_t.
4139 * If both revision arguments are either @c
4140 * svn_opt_revision_unspecified or NULL, then information will be
4141 * pulled solely from the working copy; no network connections will be
4144 * Otherwise, information will be pulled from a repository. The
4145 * actual node revision selected is determined by the @a path_or_url
4146 * as it exists in @a peg_revision. If @a peg_revision->kind is @c
4147 * svn_opt_revision_unspecified, then it defaults to @c
4148 * svn_opt_revision_head for URLs or @c svn_opt_revision_working for
4151 * If @a path_or_url is not a local path, then if @a revision is of
4152 * kind @c svn_opt_revision_previous (or some other kind that requires
4153 * a local path), an error will be returned, because the desired
4154 * revision cannot be determined.
4156 * Use the authentication baton cached in @a ctx to authenticate
4157 * against the repository.
4159 * If @a path_or_url is a file, just invoke @a receiver on it. If it
4160 * is a directory, then descend according to @a depth. If @a depth is
4161 * @c svn_depth_empty, invoke @a receiver on @a path_or_url and
4162 * nothing else; if @c svn_depth_files, on @a path_or_url and its
4163 * immediate file children; if @c svn_depth_immediates, the preceding
4164 * plus on each immediate subdirectory; if @c svn_depth_infinity, then
4165 * recurse fully, invoking @a receiver on @a path_or_url and
4166 * everything beneath it.
4168 * @a changelists is an array of <tt>const char *</tt> changelist
4169 * names, used as a restrictive filter on items whose info is
4170 * reported; that is, don't report info about any item unless
4171 * it's a member of one of those changelists. If @a changelists is
4172 * empty (or altogether @c NULL), no changelist filtering occurs.
4174 * @since New in 1.5.
4177 svn_client_info2(const char *path_or_url
,
4178 const svn_opt_revision_t
*peg_revision
,
4179 const svn_opt_revision_t
*revision
,
4180 svn_info_receiver_t receiver
,
4181 void *receiver_baton
,
4183 const apr_array_header_t
*changelists
,
4184 svn_client_ctx_t
*ctx
,
4188 * Similar to svn_client_info2() but with @a changelists passed as @c
4189 * NULL, and @a depth set according to @a recurse: if @a recurse is
4190 * TRUE, @a depth is @c svn_depth_infinity, else @c svn_depth_empty.
4192 * @deprecated Provided for backward compatibility with the 1.2 API.
4195 svn_client_info(const char *path_or_url
,
4196 const svn_opt_revision_t
*peg_revision
,
4197 const svn_opt_revision_t
*revision
,
4198 svn_info_receiver_t receiver
,
4199 void *receiver_baton
,
4200 svn_boolean_t recurse
,
4201 svn_client_ctx_t
*ctx
,
4206 /** @} end group: Client working copy management */
4210 * @defgroup clnt_sessions Client session related functions
4217 /* Converting paths to URLs. */
4219 /** Set @a *url to the URL for @a path_or_url.
4221 * If @a path_or_url is already a URL, set @a *url to @a path_or_url.
4223 * If @a path_or_url is a versioned item, set @a *url to @a
4224 * path_or_url's entry URL. If @a path_or_url is unversioned (has
4225 * no entry), set @a *url to NULL.
4228 svn_client_url_from_path(const char **url
,
4229 const char *path_or_url
,
4233 /** Set @a *url to the repository root URL of the repository in which
4234 * @a path_or_url is versioned (or scheduled to be versioned),
4235 * allocated in @a pool. @a ctx is required for possible repository
4238 * @since New in 1.5.
4241 svn_client_root_url_from_path(const char **url
,
4242 const char *path_or_url
,
4243 svn_client_ctx_t
*ctx
,
4248 /* Fetching repository UUIDs. */
4250 /** Get repository @a uuid for @a url.
4252 * Use a @a pool to open a temporary RA session to @a url, discover the
4253 * repository uuid, and free the session. Return the uuid in @a uuid,
4254 * allocated in @a pool. @a ctx is required for possible repository
4258 svn_client_uuid_from_url(const char **uuid
,
4260 svn_client_ctx_t
*ctx
,
4264 /** Return the repository @a uuid for working-copy @a path, allocated
4265 * in @a pool. Use @a adm_access to retrieve the uuid from @a path's
4266 * entry; if not present in the entry, then call
4267 * svn_client_uuid_from_url() to retrieve, using the entry's URL. @a
4268 * ctx is required for possible repository authentication.
4270 * @note The only reason this function falls back on
4271 * svn_client_uuid_from_url() is for compatibility purposes. Old
4272 * working copies may not have uuids in the entries file.
4275 svn_client_uuid_from_path(const char **uuid
,
4277 svn_wc_adm_access_t
*adm_access
,
4278 svn_client_ctx_t
*ctx
,
4282 /* Opening RA sessions. */
4284 /** Open an RA session rooted at @a url, and return it in @a *session.
4286 * Use the authentication baton stored in @a ctx for authentication.
4287 * @a *session is allocated in @a pool.
4289 * @since New in 1.3.
4291 * @note This function is similar to svn_ra_open2(), but the caller avoids
4292 * having to providing its own callback functions.
4295 svn_client_open_ra_session(svn_ra_session_t
**session
,
4297 svn_client_ctx_t
*ctx
,
4301 /** @} end group: Client session related functions */
4307 #endif /* __cplusplus */
4309 #endif /* SVN_CLIENT_H */