00001 /** 00002 * @copyright 00003 * ==================================================================== 00004 * Copyright (c) 2000-2008 CollabNet. All rights reserved. 00005 * 00006 * This software is licensed as described in the file COPYING, which 00007 * you should have received as part of this distribution. The terms 00008 * are also available at http://subversion.tigris.org/license-1.html. 00009 * If newer versions of this license are posted there, you may use a 00010 * newer version instead, at your option. 00011 * 00012 * This software consists of voluntary contributions made by many 00013 * individuals. For exact contribution history, see the revision 00014 * history and logs, available at http://subversion.tigris.org/. 00015 * ==================================================================== 00016 * @endcopyright 00017 * 00018 * @file svn_client.h 00019 * @brief Subversion's client library 00020 */ 00021 00022 00023 00024 /*** Includes ***/ 00025 00026 /* 00027 * Requires: The working copy library and repository access library. 00028 * Provides: Broad wrappers around working copy library functionality. 00029 * Used By: Client programs. 00030 */ 00031 00032 #ifndef SVN_CLIENT_H 00033 #define SVN_CLIENT_H 00034 00035 #include <apr_tables.h> 00036 00037 #include "svn_types.h" 00038 #include "svn_wc.h" 00039 #include "svn_string.h" 00040 #include "svn_error.h" 00041 #include "svn_opt.h" 00042 #include "svn_version.h" 00043 #include "svn_ra.h" 00044 #include "svn_diff.h" 00045 00046 00047 #ifdef __cplusplus 00048 extern "C" { 00049 #endif /* __cplusplus */ 00050 00051 00052 /** 00053 ### @todo Multiple Targets 00054 - Up for debate: an update on multiple targets is *not* atomic. 00055 Right now, svn_client_update only takes one path. What's 00056 debatable is whether this should ever change. On the one hand, 00057 it's kind of losing to have the client application loop over 00058 targets and call svn_client_update() on each one; each call to 00059 update initializes a whole new repository session (network 00060 overhead, etc.) On the other hand, it's a very simple 00061 implementation, and allows for the possibility that different 00062 targets may come from different repositories. */ 00063 00064 00065 /** 00066 * Get libsvn_client version information. 00067 * 00068 * @since New in 1.1. 00069 */ 00070 const svn_version_t *svn_client_version(void); 00071 00072 /** Client supporting functions 00073 * 00074 * @defgroup clnt_support Client supporting subsystem 00075 * 00076 * @{ 00077 */ 00078 00079 00080 /*** Authentication stuff ***/ 00081 00082 /** The new authentication system allows the RA layer to "pull" 00083 * information as needed from libsvn_client. 00084 * 00085 * @deprecated Replaced by the svn_auth_* functions. 00086 * @see auth_fns 00087 * 00088 * @defgroup auth_fns_depr (deprecated) AuthZ client subsystem 00089 * 00090 * @{ 00091 */ 00092 00093 /** Create and return @a *provider, an authentication provider of type 00094 * svn_auth_cred_simple_t that gets information by prompting the user 00095 * with @a prompt_func and @a prompt_baton. Allocate @a *provider in 00096 * @a pool. 00097 * 00098 * If both @c SVN_AUTH_PARAM_DEFAULT_USERNAME and 00099 * @c SVN_AUTH_PARAM_DEFAULT_PASSWORD are defined as runtime 00100 * parameters in the @c auth_baton, then @a *provider will return the 00101 * default arguments when svn_auth_first_credentials() is called. If 00102 * svn_auth_first_credentials() fails, then @a *provider will 00103 * re-prompt @a retry_limit times (via svn_auth_next_credentials()). 00104 * 00105 * @deprecated Provided for backward compatibility with the 1.3 API. 00106 */ 00107 void svn_client_get_simple_prompt_provider 00108 (svn_auth_provider_object_t **provider, 00109 svn_auth_simple_prompt_func_t prompt_func, 00110 void *prompt_baton, 00111 int retry_limit, 00112 apr_pool_t *pool); 00113 00114 00115 /** Create and return @a *provider, an authentication provider of type @c 00116 * svn_auth_cred_username_t that gets information by prompting the 00117 * user with @a prompt_func and @a prompt_baton. Allocate @a *provider 00118 * in @a pool. 00119 * 00120 * If @c SVN_AUTH_PARAM_DEFAULT_USERNAME is defined as a runtime 00121 * parameter in the @c auth_baton, then @a *provider will return the 00122 * default argument when svn_auth_first_credentials() is called. If 00123 * svn_auth_first_credentials() fails, then @a *provider will 00124 * re-prompt @a retry_limit times (via svn_auth_next_credentials()). 00125 * 00126 * @deprecated Provided for backward compatibility with the 1.3 API. 00127 */ 00128 void svn_client_get_username_prompt_provider 00129 (svn_auth_provider_object_t **provider, 00130 svn_auth_username_prompt_func_t prompt_func, 00131 void *prompt_baton, 00132 int retry_limit, 00133 apr_pool_t *pool); 00134 00135 00136 /** Create and return @a *provider, an authentication provider of type @c 00137 * svn_auth_cred_simple_t that gets/sets information from the user's 00138 * ~/.subversion configuration directory. Allocate @a *provider in 00139 * @a pool. 00140 * 00141 * If a default username or password is available, @a *provider will 00142 * honor them as well, and return them when 00143 * svn_auth_first_credentials() is called. (see @c 00144 * SVN_AUTH_PARAM_DEFAULT_USERNAME and @c 00145 * SVN_AUTH_PARAM_DEFAULT_PASSWORD). 00146 * 00147 * @deprecated Provided for backward compatibility with the 1.3 API. 00148 */ 00149 void 00150 svn_client_get_simple_provider(svn_auth_provider_object_t **provider, 00151 apr_pool_t *pool); 00152 00153 00154 #if (defined(WIN32) && !defined(__MINGW32__)) || defined(DOXYGEN) 00155 /** 00156 * Create and return @a *provider, an authentication provider of type @c 00157 * svn_auth_cred_simple_t that gets/sets information from the user's 00158 * ~/.subversion configuration directory. Allocate @a *provider in 00159 * @a pool. 00160 * 00161 * This is like svn_client_get_simple_provider(), except that, when 00162 * running on Window 2000 or newer (or any other Windows version that 00163 * includes the CryptoAPI), the provider encrypts the password before 00164 * storing it to disk. On earlier versions of Windows, the provider 00165 * does nothing. 00166 * 00167 * @since New in 1.2. 00168 * @note This function is only available on Windows. 00169 * 00170 * @note An administrative password reset may invalidate the account's 00171 * secret key. This function will detect that situation and behave as 00172 * if the password were not cached at all. 00173 * 00174 * @deprecated Provided for backward compatibility with the 1.3 API. 00175 */ 00176 void 00177 svn_client_get_windows_simple_provider(svn_auth_provider_object_t **provider, 00178 apr_pool_t *pool); 00179 #endif /* WIN32 || DOXYGEN */ 00180 00181 /** Create and return @a *provider, an authentication provider of type @c 00182 * svn_auth_cred_username_t that gets/sets information from a user's 00183 * ~/.subversion configuration directory. Allocate @a *provider in 00184 * @a pool. 00185 * 00186 * If a default username is available, @a *provider will honor it, 00187 * and return it when svn_auth_first_credentials() is called. (see 00188 * @c SVN_AUTH_PARAM_DEFAULT_USERNAME). 00189 * 00190 * @deprecated Provided for backward compatibility with the 1.3 API. 00191 */ 00192 void 00193 svn_client_get_username_provider(svn_auth_provider_object_t **provider, 00194 apr_pool_t *pool); 00195 00196 00197 /** Create and return @a *provider, an authentication provider of type @c 00198 * svn_auth_cred_ssl_server_trust_t, allocated in @a pool. 00199 * 00200 * @a *provider retrieves its credentials from the configuration 00201 * mechanism. The returned credential is used to override SSL 00202 * security on an error. 00203 * 00204 * @deprecated Provided for backward compatibility with the 1.3 API. 00205 */ 00206 void 00207 svn_client_get_ssl_server_trust_file_provider 00208 (svn_auth_provider_object_t **provider, 00209 apr_pool_t *pool); 00210 00211 00212 /** Create and return @a *provider, an authentication provider of type @c 00213 * svn_auth_cred_ssl_client_cert_t, allocated in @a pool. 00214 * 00215 * @a *provider retrieves its credentials from the configuration 00216 * mechanism. The returned credential is used to load the appropriate 00217 * client certificate for authentication when requested by a server. 00218 * 00219 * @deprecated Provided for backward compatibility with the 1.3 API. 00220 */ 00221 void 00222 svn_client_get_ssl_client_cert_file_provider 00223 (svn_auth_provider_object_t **provider, 00224 apr_pool_t *pool); 00225 00226 00227 /** Create and return @a *provider, an authentication provider of type @c 00228 * svn_auth_cred_ssl_client_cert_pw_t, allocated in @a pool. 00229 * 00230 * @a *provider retrieves its credentials from the configuration 00231 * mechanism. The returned credential is used when a loaded client 00232 * certificate is protected by a passphrase. 00233 * 00234 * @deprecated Provided for backward compatibility with the 1.3 API. 00235 */ 00236 void 00237 svn_client_get_ssl_client_cert_pw_file_provider 00238 (svn_auth_provider_object_t **provider, 00239 apr_pool_t *pool); 00240 00241 00242 /** Create and return @a *provider, an authentication provider of type @c 00243 * svn_auth_cred_ssl_server_trust_t, allocated in @a pool. 00244 * 00245 * @a *provider retrieves its credentials by using the @a prompt_func 00246 * and @a prompt_baton. The returned credential is used to override 00247 * SSL security on an error. 00248 * 00249 * @deprecated Provided for backward compatibility with the 1.3 API. 00250 */ 00251 void 00252 svn_client_get_ssl_server_trust_prompt_provider 00253 (svn_auth_provider_object_t **provider, 00254 svn_auth_ssl_server_trust_prompt_func_t prompt_func, 00255 void *prompt_baton, 00256 apr_pool_t *pool); 00257 00258 00259 /** Create and return @a *provider, an authentication provider of type @c 00260 * svn_auth_cred_ssl_client_cert_t, allocated in @a pool. 00261 * 00262 * @a *provider retrieves its credentials by using the @a prompt_func 00263 * and @a prompt_baton. The returned credential is used to load the 00264 * appropriate client certificate for authentication when requested by 00265 * a server. The prompt will be retried @a retry_limit times. 00266 * 00267 * @deprecated Provided for backward compatibility with the 1.3 API. 00268 */ 00269 void 00270 svn_client_get_ssl_client_cert_prompt_provider 00271 (svn_auth_provider_object_t **provider, 00272 svn_auth_ssl_client_cert_prompt_func_t prompt_func, 00273 void *prompt_baton, 00274 int retry_limit, 00275 apr_pool_t *pool); 00276 00277 00278 /** Create and return @a *provider, an authentication provider of type @c 00279 * svn_auth_cred_ssl_client_cert_pw_t, allocated in @a pool. 00280 * 00281 * @a *provider retrieves its credentials by using the @a prompt_func 00282 * and @a prompt_baton. The returned credential is used when a loaded 00283 * client certificate is protected by a passphrase. The prompt will 00284 * be retried @a retry_limit times. 00285 * 00286 * @deprecated Provided for backward compatibility with the 1.3 API. 00287 */ 00288 void 00289 svn_client_get_ssl_client_cert_pw_prompt_provider 00290 (svn_auth_provider_object_t **provider, 00291 svn_auth_ssl_client_cert_pw_prompt_func_t prompt_func, 00292 void *prompt_baton, 00293 int retry_limit, 00294 apr_pool_t *pool); 00295 00296 /** @} */ 00297 00298 /** 00299 * Commit operations 00300 * 00301 * @defgroup clnt_commit Client commit subsystem 00302 * 00303 * @{ 00304 */ 00305 00306 /** This is a structure which stores a filename and a hash of property 00307 * names and values. 00308 * 00309 * @deprecated Provided for backward compatibility with the 1.4 API. 00310 */ 00311 typedef struct svn_client_proplist_item_t 00312 { 00313 /** The name of the node on which these properties are set. */ 00314 svn_stringbuf_t *node_name; 00315 00316 /** A hash of (const char *) property names, and (svn_string_t *) property 00317 * values. */ 00318 apr_hash_t *prop_hash; 00319 00320 } svn_client_proplist_item_t; 00321 00322 /** 00323 * The callback invoked by svn_client_proplist3(). Each invocation 00324 * describes the property specified by @a item. Use @a pool for all 00325 * temporary allocation. 00326 * 00327 * @since New in 1.5. 00328 */ 00329 typedef svn_error_t *(*svn_proplist_receiver_t) 00330 (void *baton, 00331 const char *path, 00332 apr_hash_t *prop_hash, 00333 apr_pool_t *pool); 00334 00335 /** 00336 * Return a duplicate of @a item, allocated in @a pool. No part of the new 00337 * structure will be shared with @a item. 00338 * 00339 * @since New in 1.3. 00340 * 00341 * @deprecated Provided for backward compatibility with the 1.4 API. 00342 */ 00343 svn_client_proplist_item_t * 00344 svn_client_proplist_item_dup(const svn_client_proplist_item_t *item, 00345 apr_pool_t *pool); 00346 00347 /** Information about commits passed back to client from this module. 00348 * 00349 * @deprecated Provided for backward compatibility with the 1.2 API. 00350 */ 00351 typedef struct svn_client_commit_info_t 00352 { 00353 /** just-committed revision. */ 00354 svn_revnum_t revision; 00355 00356 /** server-side date of the commit. */ 00357 const char *date; 00358 00359 /** author of the commit. */ 00360 const char *author; 00361 00362 } svn_client_commit_info_t; 00363 00364 00365 /** 00366 * @name Commit state flags 00367 * @brief State flags for use with the @c svn_client_commit_item3_t structure 00368 * (see the note about the namespace for that structure, which also 00369 * applies to these flags). 00370 * @{ 00371 */ 00372 #define SVN_CLIENT_COMMIT_ITEM_ADD 0x01 00373 #define SVN_CLIENT_COMMIT_ITEM_DELETE 0x02 00374 #define SVN_CLIENT_COMMIT_ITEM_TEXT_MODS 0x04 00375 #define SVN_CLIENT_COMMIT_ITEM_PROP_MODS 0x08 00376 #define SVN_CLIENT_COMMIT_ITEM_IS_COPY 0x10 00377 /** @since New in 1.2. */ 00378 #define SVN_CLIENT_COMMIT_ITEM_LOCK_TOKEN 0x20 00379 /** @} */ 00380 00381 /** The commit candidate structure. In order to avoid backwards 00382 * compatibility problems clients should use 00383 * svn_client_commit_item_create() to allocate and intialize this 00384 * structure instead of doing so themselves. 00385 * 00386 * @since New in 1.5. 00387 */ 00388 typedef struct svn_client_commit_item3_t 00389 { 00390 /** absolute working-copy path of item */ 00391 const char *path; 00392 00393 /** node kind (dir, file) */ 00394 svn_node_kind_t kind; 00395 00396 /** commit URL for this item */ 00397 const char *url; 00398 00399 /** revision of textbase */ 00400 svn_revnum_t revision; 00401 00402 /** copyfrom-url or NULL if not a copied item */ 00403 const char *copyfrom_url; 00404 00405 /** copyfrom-rev, valid when copyfrom_url != NULL */ 00406 svn_revnum_t copyfrom_rev; 00407 00408 /** state flags */ 00409 apr_byte_t state_flags; 00410 00411 /** An array of @c svn_prop_t *'s, which are incoming changes from 00412 * the repository to WC properties. These changes are applied 00413 * post-commit. 00414 * 00415 * When adding to this array, allocate the @c svn_prop_t and its 00416 * contents in @c incoming_prop_changes->pool, so that it has the 00417 * same lifetime as this data structure. 00418 * 00419 * See http://subversion.tigris.org/issues/show_bug.cgi?id=806 for a 00420 * description of what would happen if the post-commit process 00421 * didn't group these changes together with all other changes to the 00422 * item. 00423 */ 00424 apr_array_header_t *incoming_prop_changes; 00425 00426 /** An array of @c svn_prop_t *'s, which are outgoing changes to 00427 * make to properties in the repository. These extra property 00428 * changes are declared pre-commit, and applied to the repository as 00429 * part of a commit. 00430 * 00431 * When adding to this array, allocate the @c svn_prop_t and its 00432 * contents in @c outgoing_prop_changes->pool, so that it has the 00433 * same lifetime as this data structure. 00434 */ 00435 apr_array_header_t *outgoing_prop_changes; 00436 } svn_client_commit_item3_t; 00437 00438 /** The commit candidate structure. 00439 * 00440 * @deprecated Provided for backward compatibility with the 1.3 API. 00441 */ 00442 typedef struct svn_client_commit_item2_t 00443 { 00444 /** absolute working-copy path of item */ 00445 const char *path; 00446 00447 /** node kind (dir, file) */ 00448 svn_node_kind_t kind; 00449 00450 /** commit URL for this item */ 00451 const char *url; 00452 00453 /** revision of textbase */ 00454 svn_revnum_t revision; 00455 00456 /** copyfrom-url or NULL if not a copied item */ 00457 const char *copyfrom_url; 00458 00459 /** copyfrom-rev, valid when copyfrom_url != NULL */ 00460 svn_revnum_t copyfrom_rev; 00461 00462 /** state flags */ 00463 apr_byte_t state_flags; 00464 00465 /** Analogous to the @c svn_client_commit_item3_t.incoming_prop_changes 00466 * field. 00467 */ 00468 apr_array_header_t *wcprop_changes; 00469 } svn_client_commit_item2_t; 00470 00471 /** The commit candidate structure. 00472 * 00473 * @deprecated Provided for backward compatibility with the 1.2 API. 00474 */ 00475 typedef struct svn_client_commit_item_t 00476 { 00477 /** absolute working-copy path of item */ 00478 const char *path; 00479 00480 /** node kind (dir, file) */ 00481 svn_node_kind_t kind; 00482 00483 /** commit URL for this item */ 00484 const char *url; 00485 00486 /** revision (copyfrom-rev if _IS_COPY) */ 00487 svn_revnum_t revision; 00488 00489 /** copyfrom-url */ 00490 const char *copyfrom_url; 00491 00492 /** state flags */ 00493 apr_byte_t state_flags; 00494 00495 /** Analogous to the @c svn_client_commit_item3_t.incoming_prop_changes 00496 * field. 00497 */ 00498 apr_array_header_t *wcprop_changes; 00499 00500 } svn_client_commit_item_t; 00501 00502 /** Initialize a commit item. 00503 * Set @a *item to a commit item object, allocated in @a pool. 00504 * 00505 * In order to avoid backwards compatibility problems, this function 00506 * is used to intialize and allocate the @c svn_client_commit_item3_t 00507 * structure rather than doing so explicitly, as the size of this 00508 * structure may change in the future. 00509 * 00510 * The current implementation never returns error, but callers should 00511 * still check for error, for compatibility with future versions. 00512 * 00513 * @since New in 1.5. 00514 */ 00515 svn_error_t * 00516 svn_client_commit_item_create(const svn_client_commit_item3_t **item, 00517 apr_pool_t *pool); 00518 00519 /** 00520 * Return a duplicate of @a item, allocated in @a pool. No part of the new 00521 * structure will be shared with @a item. 00522 * 00523 * @since New in 1.5. 00524 */ 00525 svn_client_commit_item3_t * 00526 svn_client_commit_item3_dup(const svn_client_commit_item3_t *item, 00527 apr_pool_t *pool); 00528 00529 /** 00530 * Return a duplicate of @a item, allocated in @a pool. No part of the new 00531 * structure will be shared with @a item. 00532 * 00533 * @deprecated Provided for backward compatibility with the 1.3 API. 00534 */ 00535 svn_client_commit_item2_t * 00536 svn_client_commit_item2_dup(const svn_client_commit_item2_t *item, 00537 apr_pool_t *pool); 00538 00539 /** Callback type used by commit-y operations to get a commit log message 00540 * from the caller. 00541 * 00542 * Set @a *log_msg to the log message for the commit, allocated in @a 00543 * pool, or @c NULL if wish to abort the commit process. Set @a *tmp_file 00544 * to the path of any temporary file which might be holding that log 00545 * message, or @c NULL if no such file exists (though, if @a *log_msg is 00546 * @c NULL, this value is undefined). The log message MUST be a UTF8 00547 * string with LF line separators. 00548 * 00549 * @a commit_items is a read-only array of @c svn_client_commit_item3_t 00550 * structures, which may be fully or only partially filled-in, 00551 * depending on the type of commit operation. 00552 * 00553 * @a baton is provided along with the callback for use by the handler. 00554 * 00555 * All allocations should be performed in @a pool. 00556 * 00557 * @since New in 1.5. 00558 */ 00559 typedef svn_error_t *(*svn_client_get_commit_log3_t) 00560 (const char **log_msg, 00561 const char **tmp_file, 00562 const apr_array_header_t *commit_items, 00563 void *baton, 00564 apr_pool_t *pool); 00565 00566 /** Callback type used by commit-y operations to get a commit log message 00567 * from the caller. 00568 * 00569 * Set @a *log_msg to the log message for the commit, allocated in @a 00570 * pool, or @c NULL if wish to abort the commit process. Set @a *tmp_file 00571 * to the path of any temporary file which might be holding that log 00572 * message, or @c NULL if no such file exists (though, if @a *log_msg is 00573 * @c NULL, this value is undefined). The log message MUST be a UTF8 00574 * string with LF line separators. 00575 * 00576 * @a commit_items is a read-only array of @c svn_client_commit_item2_t 00577 * structures, which may be fully or only partially filled-in, 00578 * depending on the type of commit operation. 00579 * 00580 * @a baton is provided along with the callback for use by the handler. 00581 * 00582 * All allocations should be performed in @a pool. 00583 * 00584 * @deprecated Provided for backward compatibility with the 1.3 API. 00585 */ 00586 typedef svn_error_t *(*svn_client_get_commit_log2_t) 00587 (const char **log_msg, 00588 const char **tmp_file, 00589 const apr_array_header_t *commit_items, 00590 void *baton, 00591 apr_pool_t *pool); 00592 00593 /** Callback type used by commit-y operations to get a commit log message 00594 * from the caller. 00595 * 00596 * Set @a *log_msg to the log message for the commit, allocated in @a 00597 * pool, or @c NULL if wish to abort the commit process. Set @a *tmp_file 00598 * to the path of any temporary file which might be holding that log 00599 * message, or @c NULL if no such file exists (though, if @a *log_msg is 00600 * @c NULL, this value is undefined). The log message MUST be a UTF8 00601 * string with LF line separators. 00602 * 00603 * @a commit_items is a read-only array of @c svn_client_commit_item_t 00604 * structures, which may be fully or only partially filled-in, 00605 * depending on the type of commit operation. 00606 * 00607 * @a baton is provided along with the callback for use by the handler. 00608 * 00609 * All allocations should be performed in @a pool. 00610 * 00611 * @deprecated Provided for backward compatibility with the 1.2 API. 00612 */ 00613 typedef svn_error_t *(*svn_client_get_commit_log_t) 00614 (const char **log_msg, 00615 const char **tmp_file, 00616 apr_array_header_t *commit_items, 00617 void *baton, 00618 apr_pool_t *pool); 00619 00620 /** @} */ 00621 00622 /** 00623 * Client blame 00624 * 00625 * @defgroup clnt_blame Client blame functionality 00626 * 00627 * @{ 00628 */ 00629 00630 /** Callback type used by svn_client_blame4() to notify the caller 00631 * that line @a line_no of the blamed file was last changed in 00632 * @a revision by @a author on @a date, and that the contents were 00633 * @a line. 00634 * 00635 * If svn_client_blame4() was called with @a include_merged_revisions set to 00636 * TRUE, @a merged_revision, @a merged_author, @a merged_date, and 00637 * @a merged_path will be set, otherwise they will be NULL. @a merged_path 00638 * will be set to the absolute repository path. 00639 * 00640 * All allocations should be performed in @a pool. 00641 * 00642 * @note If there is no blame information for this line, @a revision will be 00643 * invalid and @a author and @a date will be NULL. 00644 * 00645 * 00646 * @since New in 1.5. 00647 */ 00648 typedef svn_error_t *(*svn_client_blame_receiver2_t) 00649 (void *baton, 00650 apr_int64_t line_no, 00651 svn_revnum_t revision, 00652 const char *author, 00653 const char *date, 00654 svn_revnum_t merged_revision, 00655 const char *merged_author, 00656 const char *merged_date, 00657 const char *merged_path, 00658 const char *line, 00659 apr_pool_t *pool); 00660 00661 /** 00662 * Similar to @c svn_client_blame_receiver2_t, but without @a merged_revision, 00663 * @a merged_author, @a merged_date, or @a merged_path members. 00664 * 00665 * @note New in 1.4 is that the line is defined to contain only the line 00666 * content (and no [partial] EOLs; which was undefined in older versions). 00667 * Using this callback with svn_client_blame() or svn_client_blame2() 00668 * will still give you the old behaviour. 00669 * 00670 * @deprecated Provided for backward compatibility with the 1.4 API. 00671 */ 00672 typedef svn_error_t *(*svn_client_blame_receiver_t) 00673 (void *baton, 00674 apr_int64_t line_no, 00675 svn_revnum_t revision, 00676 const char *author, 00677 const char *date, 00678 const char *line, 00679 apr_pool_t *pool); 00680 00681 00682 /** @} */ 00683 00684 /** 00685 * Client diff 00686 * 00687 * @defgroup clnt_diff Client diff functionality 00688 * 00689 * @{ 00690 */ 00691 /** The difference type in an svn_diff_summarize_t structure. 00692 * 00693 * @since New in 1.4. 00694 */ 00695 typedef enum svn_client_diff_summarize_kind_t 00696 { 00697 /** An item with no text modifications */ 00698 svn_client_diff_summarize_kind_normal, 00699 00700 /** An added item */ 00701 svn_client_diff_summarize_kind_added, 00702 00703 /** An item with text modifications */ 00704 svn_client_diff_summarize_kind_modified, 00705 00706 /** A deleted item */ 00707 svn_client_diff_summarize_kind_deleted 00708 } svn_client_diff_summarize_kind_t; 00709 00710 00711 /** A struct that describes the diff of an item. Passed to 00712 * @c svn_diff_summarize_func_t. 00713 * 00714 * @note Fields may be added to the end of this structure in future 00715 * versions. Therefore, users shouldn't allocate structures of this 00716 * type, to preserve binary compatibility. 00717 * 00718 * @since New in 1.4. 00719 */ 00720 typedef struct svn_client_diff_summarize_t 00721 { 00722 /** Path relative to the target. If the target is a file, path is 00723 * the empty string. */ 00724 const char *path; 00725 00726 /** Change kind */ 00727 svn_client_diff_summarize_kind_t summarize_kind; 00728 00729 /** Properties changed? */ 00730 svn_boolean_t prop_changed; 00731 00732 /** File or dir */ 00733 svn_node_kind_t node_kind; 00734 } svn_client_diff_summarize_t; 00735 00736 /** 00737 * Return a duplicate of @a diff, allocated in @a pool. No part of the new 00738 * structure will be shared with @a diff. 00739 * 00740 * @since New in 1.4. 00741 */ 00742 svn_client_diff_summarize_t * 00743 svn_client_diff_summarize_dup(const svn_client_diff_summarize_t *diff, 00744 apr_pool_t *pool); 00745 00746 00747 /** A callback used in svn_client_diff_summarize2() and 00748 * svn_client_diff_summarize_peg2() for reporting a @a diff summary. 00749 * 00750 * All allocations should be performed in @a pool. 00751 * 00752 * @a baton is a closure object; it should be provided by the implementation, 00753 * and passed by the caller. 00754 * 00755 * @since New in 1.4. 00756 */ 00757 typedef svn_error_t *(*svn_client_diff_summarize_func_t) 00758 (const svn_client_diff_summarize_t *diff, 00759 void *baton, 00760 apr_pool_t *pool); 00761 00762 00763 00764 /** @} */ 00765 00766 00767 /** 00768 * Client context 00769 * 00770 * @defgroup clnt_ctx Client context management 00771 * 00772 * @{ 00773 */ 00774 00775 /** A client context structure, which holds client specific callbacks, 00776 * batons, serves as a cache for configuration options, and other various 00777 * and sundry things. In order to avoid backwards compatibility problems 00778 * clients should use svn_client_create_context() to allocate and 00779 * intialize this structure instead of doing so themselves. 00780 */ 00781 typedef struct svn_client_ctx_t 00782 { 00783 /** main authentication baton. */ 00784 svn_auth_baton_t *auth_baton; 00785 00786 /** notification callback function. 00787 * This will be called by notify_func2() by default. 00788 * @deprecated Provided for backward compatibility with the 1.1 API. */ 00789 svn_wc_notify_func_t notify_func; 00790 00791 /** notification callback baton for notify_func() 00792 * @deprecated Provided for backward compatibility with the 1.1 API. */ 00793 void *notify_baton; 00794 00795 /** Log message callback function. NULL means that Subversion 00796 * should try not attempt to fetch a log message. 00797 * @deprecated Provided for backward compatibility with the 1.2 API. */ 00798 svn_client_get_commit_log_t log_msg_func; 00799 00800 /** log message callback baton 00801 * @deprecated Provided for backward compatibility with the 1.2 API. */ 00802 void *log_msg_baton; 00803 00804 /** a hash mapping of <tt>const char *</tt> configuration file names to 00805 * @c svn_config_t *'s. For example, the '~/.subversion/config' file's 00806 * contents should have the key "config". May be left unset (or set to 00807 * NULL) to use the built-in default settings and not use any configuration. 00808 */ 00809 apr_hash_t *config; 00810 00811 /** a callback to be used to see if the client wishes to cancel the running 00812 * operation. */ 00813 svn_cancel_func_t cancel_func; 00814 00815 /** a baton to pass to the cancellation callback. */ 00816 void *cancel_baton; 00817 00818 /** notification function, defaulting to a function that forwards 00819 * to notify_func(). 00820 * @since New in 1.2. */ 00821 svn_wc_notify_func2_t notify_func2; 00822 00823 /** notification baton for notify_func2(). 00824 * @since New in 1.2. */ 00825 void *notify_baton2; 00826 00827 /** Log message callback function. NULL means that Subversion 00828 * should try log_msg_func. 00829 * @since New in 1.3. */ 00830 svn_client_get_commit_log2_t log_msg_func2; 00831 00832 /** callback baton for log_msg_func2 00833 * @since New in 1.3. */ 00834 void *log_msg_baton2; 00835 00836 /** Notification callback for network progress information. 00837 * May be NULL if not used. 00838 * @since New in 1.3. */ 00839 svn_ra_progress_notify_func_t progress_func; 00840 00841 /** Callback baton for progress_func. 00842 * @since New in 1.3. */ 00843 void *progress_baton; 00844 00845 /** Log message callback function. NULL means that Subversion 00846 * should try @c log_msg_func2, then @c log_msg_func. 00847 * @since New in 1.5. */ 00848 svn_client_get_commit_log3_t log_msg_func3; 00849 00850 /** The callback baton for @c log_msg_func3. 00851 * @since New in 1.5. */ 00852 void *log_msg_baton3; 00853 00854 /** MIME types map. 00855 * @since New in 1.5. */ 00856 apr_hash_t *mimetypes_map; 00857 00858 /** Conflict resolution callback and baton, if available. 00859 * @since New in 1.5. */ 00860 svn_wc_conflict_resolver_func_t conflict_func; 00861 void *conflict_baton; 00862 00863 /** Custom client name string, or @c null. 00864 * @since New in 1.5. */ 00865 const char *client_name; 00866 00867 } svn_client_ctx_t; 00868 00869 /** @} end group: Client context management */ 00870 00871 /** 00872 * @name Authentication information file names 00873 * 00874 * Names of files that contain authentication information. 00875 * 00876 * These filenames are decided by libsvn_client, since this library 00877 * implements all the auth-protocols; libsvn_wc does nothing but 00878 * blindly store and retrieve these files from protected areas. 00879 * 00880 * @defgroup clnt_auth_filenames Client authentication file names 00881 * @{ 00882 */ 00883 #define SVN_CLIENT_AUTH_USERNAME "username" 00884 #define SVN_CLIENT_AUTH_PASSWORD "password" 00885 /** @} group end: Authentication information file names */ 00886 00887 /** @} */ 00888 00889 /** 00890 * Client context 00891 * 00892 * @defgroup clnt_ctx Client context management 00893 * 00894 * @{ 00895 */ 00896 00897 /** Initialize a client context. 00898 * Set @a *ctx to a client context object, allocated in @a pool, that 00899 * represents a particular instance of an svn client. 00900 * 00901 * In order to avoid backwards compatibility problems, clients must 00902 * use this function to intialize and allocate the 00903 * @c svn_client_ctx_t structure rather than doing so themselves, as 00904 * the size of this structure may change in the future. 00905 * 00906 * The current implementation never returns error, but callers should 00907 * still check for error, for compatibility with future versions. 00908 */ 00909 svn_error_t * 00910 svn_client_create_context(svn_client_ctx_t **ctx, 00911 apr_pool_t *pool); 00912 00913 /** @} end group: Client context */ 00914 00915 /** 00916 * Client working copy management functions 00917 * 00918 * @defgroup clnt_wc Client working copy management 00919 * 00920 * @{ 00921 */ 00922 00923 /** 00924 * @defgroup clnt_wc_checkout Checkout 00925 * 00926 * @{ 00927 */ 00928 00929 00930 /** 00931 * Checkout a working copy of @a URL at @a revision, looked up at @a 00932 * peg_revision, using @a path as the root directory of the newly 00933 * checked out working copy, and authenticating with the 00934 * authentication baton cached in @a ctx. If @a result_rev is not @c 00935 * NULL, set @a *result_rev to the value of the revision actually 00936 * checked out from the repository. 00937 * 00938 * If @a peg_revision->kind is @c svn_opt_revision_unspecified, then it 00939 * defaults to @c svn_opt_revision_head. 00940 * 00941 * @a revision must be of kind @c svn_opt_revision_number, 00942 * @c svn_opt_revision_head, or @c svn_opt_revision_date. If 00943 * @a revision does not meet these requirements, return the error 00944 * @c SVN_ERR_CLIENT_BAD_REVISION. 00945 * 00946 * If @a depth is @c svn_depth_infinity, check out fully recursively. 00947 * Else if it is @c svn_depth_immediates, check out @a URL and its 00948 * immediate entries (subdirectories will be present, but will be at 00949 * depth @c svn_depth_empty themselves); else @c svn_depth_files, 00950 * check out @a URL and its file entries, but no subdirectories; else 00951 * if @c svn_depth_empty, check out @a URL as an empty directory at 00952 * that depth, with no entries present. 00953 * 00954 * If @a depth is @c svn_depth_unknown, then behave as if for 00955 * @c svn_depth_infinity, except in the case of resuming a previous 00956 * checkout of @a path (i.e., updating), in which case use the depth 00957 * of the existing working copy. 00958 * 00959 * If @a ignore_externals is set, don't process externals definitions 00960 * as part of this operation. 00961 * 00962 * If @a ctx->notify_func2 is non-NULL, invoke @a ctx->notify_func2 with 00963 * @a ctx->notify_baton2 as the checkout progresses. 00964 * 00965 * If @a allow_unver_obstructions is TRUE then the checkout tolerates 00966 * existing unversioned items that obstruct added paths from @a URL. Only 00967 * obstructions of the same type (file or dir) as the added item are 00968 * tolerated. The text of obstructing files is left as-is, effectively 00969 * treating it as a user modification after the checkout. Working 00970 * properties of obstructing items are set equal to the base properties. 00971 * If @a allow_unver_obstructions is FALSE then the checkout will abort 00972 * if there are any unversioned obstructing items. 00973 * 00974 * If @a URL refers to a file rather than a directory, return the 00975 * error @c SVN_ERR_UNSUPPORTED_FEATURE. If @a URL does not exist, 00976 * return the error @c SVN_ERR_RA_ILLEGAL_URL. 00977 * 00978 * Use @a pool for any temporary allocation. 00979 * 00980 * @since New in 1.5. 00981 */ 00982 svn_error_t * 00983 svn_client_checkout3(svn_revnum_t *result_rev, 00984 const char *URL, 00985 const char *path, 00986 const svn_opt_revision_t *peg_revision, 00987 const svn_opt_revision_t *revision, 00988 svn_depth_t depth, 00989 svn_boolean_t ignore_externals, 00990 svn_boolean_t allow_unver_obstructions, 00991 svn_client_ctx_t *ctx, 00992 apr_pool_t *pool); 00993 00994 00995 /** 00996 * Similar to svn_client_checkout3() but with @a allow_unver_obstructions 00997 * always set to FALSE, and @a depth set according to @a recurse: if 00998 * @a recurse is TRUE, @a depth is @c svn_depth_infinity, if @a recurse 00999 * is FALSE, @a depth is @c svn_depth_files. 01000 * 01001 * @deprecated Provided for backward compatibility with the 1.4 API. 01002 */ 01003 svn_error_t * 01004 svn_client_checkout2(svn_revnum_t *result_rev, 01005 const char *URL, 01006 const char *path, 01007 const svn_opt_revision_t *peg_revision, 01008 const svn_opt_revision_t *revision, 01009 svn_boolean_t recurse, 01010 svn_boolean_t ignore_externals, 01011 svn_client_ctx_t *ctx, 01012 apr_pool_t *pool); 01013 01014 01015 /** 01016 * Similar to svn_client_checkout2(), but with @a peg_revision 01017 * always set to @c svn_opt_revision_unspecified and 01018 * @a ignore_externals always set to FALSE. 01019 * 01020 * @deprecated Provided for backward compatibility with the 1.1 API. 01021 */ 01022 svn_error_t * 01023 svn_client_checkout(svn_revnum_t *result_rev, 01024 const char *URL, 01025 const char *path, 01026 const svn_opt_revision_t *revision, 01027 svn_boolean_t recurse, 01028 svn_client_ctx_t *ctx, 01029 apr_pool_t *pool); 01030 /** @} */ 01031 01032 /** 01033 * @defgroup Update Bring a working copy up-to-date with a repository 01034 * 01035 * @{ 01036 * 01037 */ 01038 01039 /** 01040 * Update working trees @a paths to @a revision, authenticating with the 01041 * authentication baton cached in @a ctx. @a paths is an array of const 01042 * char * paths to be updated. Unversioned paths that are direct children 01043 * of a versioned path will cause an update that attempts to add that path, 01044 * other unversioned paths are skipped. If @a result_revs is not 01045 * @c NULL an array of svn_revnum_t will be returned with each element set 01046 * to the revision to which @a revision was resolved. 01047 * 01048 * @a revision must be of kind @c svn_opt_revision_number, 01049 * @c svn_opt_revision_head, or @c svn_opt_revision_date. If @a 01050 * revision does not meet these requirements, return the error 01051 * @c SVN_ERR_CLIENT_BAD_REVISION. 01052 * 01053 * The paths in @a paths can be from multiple working copies from multiple 01054 * repositories, but even if they all come from the same repository there 01055 * is no guarantee that revision represented by @c svn_opt_revision_head 01056 * will remain the same as each path is updated. 01057 * 01058 * If @a ignore_externals is set, don't process externals definitions 01059 * as part of this operation. 01060 * 01061 * If @a depth is @c svn_depth_infinity, update fully recursively. 01062 * Else if it is @c svn_depth_immediates or @c svn_depth_files, update 01063 * each target and its file entries, but not its subdirectories. Else 01064 * if @c svn_depth_empty, update exactly each target, nonrecursively 01065 * (essentially, update the target's properties). 01066 * 01067 * If @a depth is @c svn_depth_unknown, take the working depth from 01068 * @a paths and then behave as described above. 01069 * 01070 * If @a depth_is_sticky is set and @a depth is not @c 01071 * svn_depth_unknown, then in addition to updating PATHS, also set 01072 * their sticky ambient depth value to @a depth. 01073 * 01074 * If @a allow_unver_obstructions is TRUE then the update tolerates 01075 * existing unversioned items that obstruct added paths from @a URL. Only 01076 * obstructions of the same type (file or dir) as the added item are 01077 * tolerated. The text of obstructing files is left as-is, effectively 01078 * treating it as a user modification after the update. Working 01079 * properties of obstructing items are set equal to the base properties. 01080 * If @a allow_unver_obstructions is FALSE then the update will abort 01081 * if there are any unversioned obstructing items. 01082 * 01083 * If @a ctx->notify_func2 is non-NULL, invoke @a ctx->notify_func2 with 01084 * @a ctx->notify_baton2 for each item handled by the update, and also for 01085 * files restored from text-base. If @a ctx->cancel_func is non-NULL, invoke 01086 * it passing @a ctx->cancel_baton at various places during the update. 01087 * 01088 * Use @a pool for any temporary allocation. 01089 * 01090 * @since New in 1.5. 01091 */ 01092 svn_error_t * 01093 svn_client_update3(apr_array_header_t **result_revs, 01094 const apr_array_header_t *paths, 01095 const svn_opt_revision_t *revision, 01096 svn_depth_t depth, 01097 svn_boolean_t depth_is_sticky, 01098 svn_boolean_t ignore_externals, 01099 svn_boolean_t allow_unver_obstructions, 01100 svn_client_ctx_t *ctx, 01101 apr_pool_t *pool); 01102 01103 /** 01104 * Similar to svn_client_update3() but with @a allow_unver_obstructions 01105 * always set to FALSE, @a depth_is_sticky to FALSE, and @a depth set 01106 * according to @a recurse: if @a recurse is TRUE, set @a depth to @c 01107 * svn_depth_infinity, if @a recurse is FALSE, set @a depth to @c 01108 * svn_depth_files. 01109 * 01110 * @deprecated Provided for backward compatibility with the 1.4 API. 01111 */ 01112 svn_error_t * 01113 svn_client_update2(apr_array_header_t **result_revs, 01114 const apr_array_header_t *paths, 01115 const svn_opt_revision_t *revision, 01116 svn_boolean_t recurse, 01117 svn_boolean_t ignore_externals, 01118 svn_client_ctx_t *ctx, 01119 apr_pool_t *pool); 01120 01121 /** 01122 * Similar to svn_client_update2() except that it accepts only a single 01123 * target in @a path, returns a single revision if @a result_rev is 01124 * not NULL, and @a ignore_externals is always set to FALSE. 01125 * 01126 * @deprecated Provided for backward compatibility with the 1.1 API. 01127 */ 01128 svn_error_t * 01129 svn_client_update(svn_revnum_t *result_rev, 01130 const char *path, 01131 const svn_opt_revision_t *revision, 01132 svn_boolean_t recurse, 01133 svn_client_ctx_t *ctx, 01134 apr_pool_t *pool); 01135 /** @} */ 01136 01137 /** 01138 * @defgroup Switch Switch a working copy to another location. 01139 * 01140 * @{ 01141 */ 01142 01143 /** Switch working tree @a path to @a url\@peg_revision at @a revision, 01144 * authenticating with the authentication baton cached in @a ctx. If 01145 * @a result_rev is not @c NULL, set @a *result_rev to the value of 01146 * the revision to which the working copy was actually switched. 01147 * 01148 * Summary of purpose: this is normally used to switch a working 01149 * directory over to another line of development, such as a branch or 01150 * a tag. Switching an existing working directory is more efficient 01151 * than checking out @a url from scratch. 01152 * 01153 * @a revision must be of kind @c svn_opt_revision_number, 01154 * @c svn_opt_revision_head, or @c svn_opt_revision_date; otherwise, 01155 * return @c SVN_ERR_CLIENT_BAD_REVISION. 01156 * 01157 * If @a depth is @c svn_depth_infinity, switch fully recursively. 01158 * Else if it is @c svn_depth_immediates, switch @a path and its file 01159 * children (if any), and switch subdirectories but do not update 01160 * them. Else if @c svn_depth_files, switch just file children, 01161 * ignoring subdirectories completely. Else if @c svn_depth_empty, 01162 * switch just @a path and touch nothing underneath it. 01163 * 01164 * If @a depth_is_sticky is set and @a depth is not @c 01165 * svn_depth_unknown, then in addition to switching PATH, also set 01166 * its sticky ambient depth value to @a depth. 01167 * 01168 * If @a ignore_externals is set, don't process externals definitions 01169 * as part of this operation. 01170 * 01171 * If @a allow_unver_obstructions is TRUE then the switch tolerates 01172 * existing unversioned items that obstruct added paths from @a URL. Only 01173 * obstructions of the same type (file or dir) as the added item are 01174 * tolerated. The text of obstructing files is left as-is, effectively 01175 * treating it as a user modification after the switch. Working 01176 * properties of obstructing items are set equal to the base properties. 01177 * If @a allow_unver_obstructions is FALSE then the switch will abort 01178 * if there are any unversioned obstructing items. 01179 * 01180 * If @a ctx->notify_func2 is non-NULL, invoke it with @a ctx->notify_baton2 01181 * on paths affected by the switch. Also invoke it for files may be restored 01182 * from the text-base because they were removed from the working copy. 01183 * 01184 * Use @a pool for any temporary allocation. 01185 * 01186 * @since New in 1.5. 01187 */ 01188 svn_error_t * 01189 svn_client_switch2(svn_revnum_t *result_rev, 01190 const char *path, 01191 const char *url, 01192 const svn_opt_revision_t *peg_revision, 01193 const svn_opt_revision_t *revision, 01194 svn_depth_t depth, 01195 svn_boolean_t depth_is_sticky, 01196 svn_boolean_t ignore_externals, 01197 svn_boolean_t allow_unver_obstructions, 01198 svn_client_ctx_t *ctx, 01199 apr_pool_t *pool); 01200 01201 01202 /** 01203 * Similar to svn_client_switch2() but with @a allow_unver_obstructions, 01204 * @a ignore_externals, and @a depth_is_sticky always set to FALSE, 01205 * and @a depth set according to @a recurse: if @a recurse is TRUE, 01206 * set @a depth to @c svn_depth_infinity, if @a recurse is FALSE, set 01207 * @a depth to @c svn_depth_files. 01208 * 01209 * @deprecated Provided for backward compatibility with the 1.4 API. 01210 */ 01211 svn_error_t * 01212 svn_client_switch(svn_revnum_t *result_rev, 01213 const char *path, 01214 const char *url, 01215 const svn_opt_revision_t *revision, 01216 svn_boolean_t recurse, 01217 svn_client_ctx_t *ctx, 01218 apr_pool_t *pool); 01219 01220 /** @} */ 01221 01222 /** 01223 * @defgroup Add Begin versioning files/directories in a working copy. 01224 * 01225 * @{ 01226 */ 01227 01228 /** 01229 * Schedule a working copy @a path for addition to the repository. 01230 * 01231 * If @a depth is @c svn_depth_empty, add just @a path and nothing 01232 * below it. If @c svn_depth_files, add @a path and any file 01233 * children of @a path. If @c svn_depth_immediates, add @a path, any 01234 * file children, and any immediate subdirectories (but nothing 01235 * underneath those subdirectories). If @c svn_depth_infinity, add 01236 * @a path and everything under it fully recursively. 01237 * 01238 * @a path's parent must be under revision control already (unless 01239 * @a add_parents is TRUE), but @a path is not. If @a recursive is 01240 * set, then assuming @a path is a directory, all of its contents will 01241 * be scheduled for addition as well. 01242 * 01243 * If @a force is not set and @a path is already under version 01244 * control, return the error @c SVN_ERR_ENTRY_EXISTS. If @a force is 01245 * set, do not error on already-versioned items. When used on a 01246 * directory in conjunction with the @a recursive flag, this has the 01247 * effect of scheduling for addition unversioned files and directories 01248 * scattered deep within a versioned tree. 01249 * 01250 * If @a ctx->notify_func2 is non-NULL, then for each added item, call 01251 * @a ctx->notify_func2 with @a ctx->notify_baton2 and the path of the 01252 * added item. 01253 * 01254 * If @a no_ignore is FALSE, don't add files or directories that match 01255 * ignore patterns. 01256 * 01257 * If @a add_parents is TRUE, recurse up @a path's directory and look for 01258 * a versioned directory. If found, add all intermediate paths between it 01259 * and @a path. If not found, return @c SVN_ERR_CLIENT_NO_VERSIONED_PARENTS. 01260 * 01261 * @par Important: 01262 * This is a *scheduling* operation. No changes will 01263 * happen to the repository until a commit occurs. This scheduling 01264 * can be removed with svn_client_revert2(). 01265 * 01266 * @since New in 1.5. 01267 */ 01268 svn_error_t * 01269 svn_client_add4(const char *path, 01270 svn_depth_t depth, 01271 svn_boolean_t force, 01272 svn_boolean_t no_ignore, 01273 svn_boolean_t add_parents, 01274 svn_client_ctx_t *ctx, 01275 apr_pool_t *pool); 01276 01277 /** 01278 * Similar to svn_client_add4(), but with @a add_parents always set to 01279 * FALSE and @a depth set according to @a recursive: if TRUE, then 01280 * @a depth is @c svn_depth_infinity, if FALSE, then @c svn_depth_empty. 01281 * 01282 * @deprecated Provided for backward compatibility with the 1.3 API. 01283 */ 01284 svn_error_t * 01285 svn_client_add3(const char *path, 01286 svn_boolean_t recursive, 01287 svn_boolean_t force, 01288 svn_boolean_t no_ignore, 01289 svn_client_ctx_t *ctx, 01290 apr_pool_t *pool); 01291 01292 /** 01293 * Similar to svn_client_add3(), but with @a no_ignore always set to 01294 * FALSE. 01295 * 01296 * @deprecated Provided for backward compatibility with the 1.2 API. 01297 */ 01298 svn_error_t * 01299 svn_client_add2(const char *path, 01300 svn_boolean_t recursive, 01301 svn_boolean_t force, 01302 svn_client_ctx_t *ctx, 01303 apr_pool_t *pool); 01304 01305 /** 01306 * Similar to svn_client_add2(), but with @a force always set to FALSE. 01307 * 01308 * @deprecated Provided for backward compatibility with the 1.0 API. 01309 */ 01310 svn_error_t * 01311 svn_client_add(const char *path, 01312 svn_boolean_t recursive, 01313 svn_client_ctx_t *ctx, 01314 apr_pool_t *pool); 01315 01316 /** @} */ 01317 01318 /** 01319 * @defgroup Mkdir Create directories in a working copy or repository. 01320 * 01321 * @{ 01322 */ 01323 01324 /** Create a directory, either in a repository or a working copy. 01325 * 01326 * If @a paths contains URLs, use the authentication baton in @a ctx 01327 * and @a message to immediately attempt to commit the creation of the 01328 * directories in @a paths in the repository. If the commit succeeds, 01329 * allocate (in @a pool) and populate @a *commit_info_p. 01330 * 01331 * Else, create the directories on disk, and attempt to schedule them 01332 * for addition (using svn_client_add(), whose docstring you should 01333 * read). 01334 * 01335 * If @a make_parents is TRUE, create any non-existent parent directories 01336 * also. 01337 * 01338 * If non-NULL, @a revprop_table is a hash table holding additional, 01339 * custom revision properties (<tt>const char *</tt> names mapped to 01340 * <tt>svn_string_t *</tt> values) to be set on the new revision in 01341 * the event that this is a committing operation. This table cannot 01342 * contain any standard Subversion properties. 01343 * 01344 * @a ctx->log_msg_func3/@a ctx->log_msg_baton3 are a callback/baton 01345 * combo that this function can use to query for a commit log message 01346 * when one is needed. 01347 * 01348 * If @a ctx->notify_func2 is non-NULL, when the directory has been created 01349 * (successfully) in the working copy, call @a ctx->notify_func2 with 01350 * @a ctx->notify_baton2 and the path of the new directory. Note that this is 01351 * only called for items added to the working copy. 01352 * 01353 * @since New in 1.5. 01354 */ 01355 svn_error_t * 01356 svn_client_mkdir3(svn_commit_info_t **commit_info_p, 01357 const apr_array_header_t *paths, 01358 svn_boolean_t make_parents, 01359 const apr_hash_t *revprop_table, 01360 svn_client_ctx_t *ctx, 01361 apr_pool_t *pool); 01362 01363 01364 /** 01365 * Same as svn_client_mkdir3(), but with @a make_parents always FALSE, 01366 * and @a revprop_table always NULL. 01367 * 01368 * @since New in 1.3. 01369 * @deprecated Provided for backward compatibility with the 1.4 API. 01370 */ 01371 svn_error_t * 01372 svn_client_mkdir2(svn_commit_info_t **commit_info_p, 01373 const apr_array_header_t *paths, 01374 svn_client_ctx_t *ctx, 01375 apr_pool_t *pool); 01376 01377 /** 01378 * Same as svn_client_mkdir2(), but takes the @c svn_client_commit_info_t 01379 * type for @a commit_info_p. 01380 * 01381 * @deprecated Provided for backward compatibility with the 1.2 API. 01382 */ 01383 svn_error_t * 01384 svn_client_mkdir(svn_client_commit_info_t **commit_info_p, 01385 const apr_array_header_t *paths, 01386 svn_client_ctx_t *ctx, 01387 apr_pool_t *pool); 01388 01389 /** @} */ 01390 01391 /** 01392 * @defgroup Delete Remove files/directories from a working copy or repository. 01393 * 01394 * @{ 01395 */ 01396 01397 /** Delete items from a repository or working copy. 01398 * 01399 * If the paths in @a paths are URLs, use the authentication baton in 01400 * @a ctx and @a ctx->log_msg_func3/@a ctx->log_msg_baton3 to 01401 * immediately attempt to commit a deletion of the URLs from the 01402 * repository. If the commit succeeds, allocate (in @a pool) and 01403 * populate @a *commit_info_p. Every path must belong to the same 01404 * repository. 01405 * 01406 * Else, schedule the working copy paths in @a paths for removal from 01407 * the repository. Each path's parent must be under revision control. 01408 * This is just a *scheduling* operation. No changes will happen to 01409 * the repository until a commit occurs. This scheduling can be 01410 * removed with svn_client_revert2(). If a path is a file it is 01411 * immediately removed from the working copy. If the path is a 01412 * directory it will remain in the working copy but all the files, and 01413 * all unversioned items, it contains will be removed. If @a force is 01414 * not set then this operation will fail if any path contains locally 01415 * modified and/or unversioned items. If @a force is set such items 01416 * will be deleted. 01417 * 01418 * If the paths are working copy paths and @a keep_local is TRUE then 01419 * the paths will not be removed from the working copy, only scheduled 01420 * for removal from the repository. Once the scheduled deletion is 01421 * committed, they will appear as unversioned paths in the working copy. 01422 * 01423 * If non-NULL, @a revprop_table is a hash table holding additional, 01424 * custom revision properties (<tt>const char *</tt> names mapped to 01425 * <tt>svn_string_t *</tt> values) to be set on the new revision in 01426 * the event that this is a committing operation. This table cannot 01427 * contain any standard Subversion properties. 01428 * 01429 * @a ctx->log_msg_func3/@a ctx->log_msg_baton3 are a callback/baton 01430 * combo that this function can use to query for a commit log message 01431 * when one is needed. 01432 * 01433 * If @a ctx->notify_func2 is non-NULL, then for each item deleted, call 01434 * @a ctx->notify_func2 with @a ctx->notify_baton2 and the path of the deleted 01435 * item. 01436 * 01437 * @since New in 1.5. 01438 */ 01439 svn_error_t * 01440 svn_client_delete3(svn_commit_info_t **commit_info_p, 01441 const apr_array_header_t *paths, 01442 svn_boolean_t force, 01443 svn_boolean_t keep_local, 01444 const apr_hash_t *revprop_table, 01445 svn_client_ctx_t *ctx, 01446 apr_pool_t *pool); 01447 01448 /** 01449 * Similar to svn_client_delete3(), but with @a keep_local always set 01450 * to FALSE, and @a revprop_table passed as NULL. 01451 * 01452 * @deprecated Provided for backward compatibility with the 1.4 API. 01453 */ 01454 svn_error_t * 01455 svn_client_delete2(svn_commit_info_t **commit_info_p, 01456 const apr_array_header_t *paths, 01457 svn_boolean_t force, 01458 svn_client_ctx_t *ctx, 01459 apr_pool_t *pool); 01460 01461 /** 01462 * Similar to svn_client_delete2(), but takes the @c svn_client_commit_info_t 01463 * type for @a commit_info_p. 01464 * 01465 * @deprecated Provided for backward compatibility with the 1.2 API. 01466 */ 01467 svn_error_t * 01468 svn_client_delete(svn_client_commit_info_t **commit_info_p, 01469 const apr_array_header_t *paths, 01470 svn_boolean_t force, 01471 svn_client_ctx_t *ctx, 01472 apr_pool_t *pool); 01473 01474 01475 /** @} */ 01476 01477 /** 01478 * @defgroup Import Import files into the repository. 01479 * 01480 * @{ 01481 */ 01482 01483 /** Import file or directory @a path into repository directory @a url at 01484 * head, authenticating with the authentication baton cached in @a ctx, 01485 * and using @a ctx->log_msg_func3/@a ctx->log_msg_baton3 to get a log message 01486 * for the (implied) commit. Set @a *commit_info_p to the results of the 01487 * commit, allocated in @a pool. If some components of @a url do not exist 01488 * then create parent directories as necessary. 01489 * 01490 * If @a path is a directory, the contents of that directory are 01491 * imported directly into the directory identified by @a url. Note that the 01492 * directory @a path itself is not imported -- that is, the basename of 01493 * @a path is not part of the import. 01494 * 01495 * If @a path is a file, then the dirname of @a url is the directory 01496 * receiving the import. The basename of @a url is the filename in the 01497 * repository. In this case if @a url already exists, return error. 01498 * 01499 * If @a ctx->notify_func2 is non-NULL, then call @a ctx->notify_func2 with 01500 * @a ctx->notify_baton2 as the import progresses, with any of the following 01501 * actions: @c svn_wc_notify_commit_added, 01502 * @c svn_wc_notify_commit_postfix_txdelta. 01503 * 01504 * Use @a pool for any temporary allocation. 01505 * 01506 * If non-NULL, @a revprop_table is a hash table holding additional, 01507 * custom revision properties (<tt>const char *</tt> names mapped to 01508 * <tt>svn_string_t *</tt> values) to be set on the new revision. 01509 * This table cannot contain any standard Subversion properties. 01510 * 01511 * @a ctx->log_msg_func3/@a ctx->log_msg_baton3 are a callback/baton 01512 * combo that this function can use to query for a commit log message 01513 * when one is needed. 01514 * 01515 * If @a depth is @c svn_depth_empty, import just @a path and nothing 01516 * below it. If @c svn_depth_files, import @a path and any file 01517 * children of @a path. If @c svn_depth_immediates, import @a path, any 01518 * file children, and any immediate subdirectories (but nothing 01519 * underneath those subdirectories). If @c svn_depth_infinity, import 01520 * @a path and everything under it fully recursively. 01521 * 01522 * If @a no_ignore is @c FALSE, don't add files or directories that match 01523 * ignore patterns. 01524 * 01525 * If @a ignore_unknown_node_types is @c FALSE, ignore files of which the 01526 * node type is unknown, such as device files and pipes. 01527 * 01528 * @since New in 1.5. 01529 */ 01530 svn_error_t * 01531 svn_client_import3(svn_commit_info_t **commit_info_p, 01532 const char *path, 01533 const char *url, 01534 svn_depth_t depth, 01535 svn_boolean_t no_ignore, 01536 svn_boolean_t ignore_unknown_node_types, 01537 const apr_hash_t *revprop_table, 01538 svn_client_ctx_t *ctx, 01539 apr_pool_t *pool); 01540 01541 /** 01542 * Similar to svn_client_import3(), but with @a ignore_unknown_node_types 01543 * always set to @c FALSE, @a revprop_table passed as NULL, and @a 01544 * depth set according to @a nonrecursive: if TRUE, then @a depth is 01545 * @c svn_depth_files, else @c svn_depth_infinity. 01546 * 01547 * @since New in 1.3. 01548 * 01549 * @deprecated Provided for backward compatibility with the 1.4 API 01550 */ 01551 svn_error_t * 01552 svn_client_import2(svn_commit_info_t **commit_info_p, 01553 const char *path, 01554 const char *url, 01555 svn_boolean_t nonrecursive, 01556 svn_boolean_t no_ignore, 01557 svn_client_ctx_t *ctx, 01558 apr_pool_t *pool); 01559 01560 /** 01561 * Similar to svn_client_import2(), but with @a no_ignore always set 01562 * to FALSE and using the @c svn_client_commit_info_t type for 01563 * @a commit_info_p. 01564 * 01565 * @deprecated Provided for backward compatibility with the 1.2 API. 01566 */ 01567 svn_error_t * 01568 svn_client_import(svn_client_commit_info_t **commit_info_p, 01569 const char *path, 01570 const char *url, 01571 svn_boolean_t nonrecursive, 01572 svn_client_ctx_t *ctx, 01573 apr_pool_t *pool); 01574 01575 /** @} */ 01576 01577 /** 01578 * @defgroup Commit Commit local modifications to the repository. 01579 * 01580 * @{ 01581 */ 01582 01583 /** 01584 * Commit files or directories into repository, authenticating with 01585 * the authentication baton cached in @a ctx, and using 01586 * @a ctx->log_msg_func3/@a ctx->log_msg_baton3 to obtain the log message. 01587 * Set @a *commit_info_p to the results of the commit, allocated in @a pool. 01588 * 01589 * @a targets is an array of <tt>const char *</tt> paths to commit. They 01590 * need not be canonicalized nor condensed; this function will take care of 01591 * that. If @a targets has zero elements, then do nothing and return 01592 * immediately without error. 01593 * 01594 * If non-NULL, @a revprop_table is a hash table holding additional, 01595 * custom revision properties (<tt>const char *</tt> names mapped to 01596 * <tt>svn_string_t *</tt> values) to be set on the new revision. 01597 * This table cannot contain any standard Subversion properties. 01598 * 01599 * If @a ctx->notify_func2 is non-NULL, then call @a ctx->notify_func2 with 01600 * @a ctx->notify_baton2 as the commit progresses, with any of the following 01601 * actions: @c svn_wc_notify_commit_modified, @c svn_wc_notify_commit_added, 01602 * @c svn_wc_notify_commit_deleted, @c svn_wc_notify_commit_replaced, 01603 * @c svn_wc_notify_commit_postfix_txdelta. 01604 * 01605 * If @a depth is @c svn_depth_infinity, commit all changes to and 01606 * below named targets. If @a depth is @c svn_depth_empty, commit 01607 * only named targets (that is, only property changes on named 01608 * directory targets, and property and content changes for named file 01609 * targets). If @a depth is @c svn_depth_files, behave as above for 01610 * named file targets, and for named directory targets, commit 01611 * property changes on a named directory and all changes to files 01612 * directly inside that directory. If @c svn_depth_immediates, behave 01613 * as for @c svn_depth_files, and for subdirectories of any named 01614 * directory target commit as though for @c svn_depth_empty. 01615 * 01616 * Unlock paths in the repository, unless @a keep_locks is TRUE. 01617 * 01618 * @a changelists is an array of <tt>const char *</tt> changelist 01619 * names, used as a restrictive filter on items that are committed; 01620 * that is, don't commit anything unless it's a member of one of those 01621 * changelists. After the commit completes successfully, remove 01622 * changelist associations from the targets, unless @a 01623 * keep_changelists is set. If @a changelists is 01624 * empty (or altogether @c NULL), no changelist filtering occurs. 01625 * 01626 * Use @a pool for any temporary allocations. 01627 * 01628 * If no error is returned and @a (*commit_info_p)->revision is set to 01629 * @c SVN_INVALID_REVNUM, then the commit was a no-op; nothing needed to 01630 * be committed. 01631 * 01632 * @since New in 1.5. 01633 */ 01634 svn_error_t * 01635 svn_client_commit4(svn_commit_info_t **commit_info_p, 01636 const apr_array_header_t *targets, 01637 svn_depth_t depth, 01638 svn_boolean_t keep_locks, 01639 svn_boolean_t keep_changelists, 01640 const apr_array_header_t *changelists, 01641 const apr_hash_t *revprop_table, 01642 svn_client_ctx_t *ctx, 01643 apr_pool_t *pool); 01644 01645 /** 01646 * Similar to svn_client_commit4(), but always with NULL for 01647 * @a changelist_name, FALSE for @a keep_changelist, NULL for @a 01648 * revprop_table, and @a depth set according to @a recurse: if @a 01649 * recurse is TRUE, use @c svn_depth_infinity, else @c 01650 * svn_depth_files. 01651 * 01652 * @deprecated Provided for backward compatibility with the 1.4 API. 01653 * 01654 * @since New in 1.3. 01655 */ 01656 svn_error_t * 01657 svn_client_commit3(svn_commit_info_t **commit_info_p, 01658 const apr_array_header_t *targets, 01659 svn_boolean_t recurse, 01660 svn_boolean_t keep_locks, 01661 svn_client_ctx_t *ctx, 01662 apr_pool_t *pool); 01663 01664 /** 01665 * Similar to svn_client_commit3(), but uses @c svn_client_commit_info_t 01666 * for @a commit_info_p. 01667 * 01668 * @deprecated Provided for backward compatibility with the 1.2 API. 01669 * 01670 * @since New in 1.2. 01671 */ 01672 svn_error_t * 01673 svn_client_commit2(svn_client_commit_info_t **commit_info_p, 01674 const apr_array_header_t *targets, 01675 svn_boolean_t recurse, 01676 svn_boolean_t keep_locks, 01677 svn_client_ctx_t *ctx, 01678 apr_pool_t *pool); 01679 01680 /** 01681 * Similar to svn_client_commit2(), but with @a keep_locks set to 01682 * TRUE and @a nonrecursive instead of @a recurse. 01683 * 01684 * @deprecated Provided for backward compatibility with the 1.1 API. 01685 */ 01686 svn_error_t * 01687 svn_client_commit(svn_client_commit_info_t **commit_info_p, 01688 const apr_array_header_t *targets, 01689 svn_boolean_t nonrecursive, 01690 svn_client_ctx_t *ctx, 01691 apr_pool_t *pool); 01692 01693 /** @} */ 01694 01695 /** 01696 * @defgroup Status Report interesting information about paths in the \ 01697 * working copy. 01698 * 01699 * @{ 01700 */ 01701 01702 /** 01703 * Given @a path to a working copy directory (or single file), call 01704 * @a status_func/status_baton with a set of @c svn_wc_status_t * 01705 * structures which describe the status of @a path, and its children 01706 * (recursing according to @a depth). 01707 * 01708 * - If @a get_all is set, retrieve all entries; otherwise, 01709 * retrieve only "interesting" entries (local mods and/or 01710 * out of date). 01711 * 01712 * - If @a update is set, contact the repository and augment the 01713 * status structures with information about out-of-dateness (with 01714 * respect to @a revision). Also, if @a result_rev is not @c NULL, 01715 * set @a *result_rev to the actual revision against which the 01716 * working copy was compared (@a *result_rev is not meaningful unless 01717 * @a update is set). 01718 * 01719 * If @a ignore_externals is not set, then recurse into externals 01720 * definitions (if any exist) after handling the main target. This 01721 * calls the client notification function (in @a ctx) with the @c 01722 * svn_wc_notify_status_external action before handling each externals 01723 * definition, and with @c svn_wc_notify_status_completed 01724 * after each. 01725 * 01726 * @a changelists is an array of <tt>const char *</tt> changelist 01727 * names, used as a restrictive filter on items whose statuses are 01728 * reported; that is, don't report status about any item unless 01729 * it's a member of one of those changelists. If @a changelists is 01730 * empty (or altogether @c NULL), no changelist filtering occurs. 01731 * 01732 * @since New in 1.5. 01733 */ 01734 svn_error_t * 01735 svn_client_status3(svn_revnum_t *result_rev, 01736 const char *path, 01737 const svn_opt_revision_t *revision, 01738 svn_wc_status_func2_t status_func, 01739 void *status_baton, 01740 svn_depth_t depth, 01741 svn_boolean_t get_all, 01742 svn_boolean_t update, 01743 svn_boolean_t no_ignore, 01744 svn_boolean_t ignore_externals, 01745 const apr_array_header_t *changelists, 01746 svn_client_ctx_t *ctx, 01747 apr_pool_t *pool); 01748 01749 /** 01750 * Like svn_client_status3(), except with @a changelists passed as @c 01751 * NULL, and with @a recurse instead of @a depth. If @a recurse is 01752 * TRUE, behave as if for @c svn_depth_infinity; else if @a recurse is 01753 * FALSE, behave as if for @c svn_depth_immediates. 01754 * 01755 * @since New in 1.2. 01756 * @deprecated Provided for backward compatibility with the 1.4 API. 01757 */ 01758 svn_error_t * 01759 svn_client_status2(svn_revnum_t *result_rev, 01760 const char *path, 01761 const svn_opt_revision_t *revision, 01762 svn_wc_status_func2_t status_func, 01763 void *status_baton, 01764 svn_boolean_t recurse, 01765 svn_boolean_t get_all, 01766 svn_boolean_t update, 01767 svn_boolean_t no_ignore, 01768 svn_boolean_t ignore_externals, 01769 svn_client_ctx_t *ctx, 01770 apr_pool_t *pool); 01771 01772 01773 /** 01774 * Similar to svn_client_status2(), but with @a ignore_externals 01775 * always set to FALSE, taking the @c svn_wc_status_func_t type 01776 * instead of the @c svn_wc_status_func2_t type for @a status_func, 01777 * and requiring @a *revision to be non-const even though it is 01778 * treated as constant. 01779 * 01780 * @deprecated Provided for backward compatibility with the 1.1 API. 01781 */ 01782 svn_error_t * 01783 svn_client_status(svn_revnum_t *result_rev, 01784 const char *path, 01785 svn_opt_revision_t *revision, 01786 svn_wc_status_func_t status_func, 01787 void *status_baton, 01788 svn_boolean_t recurse, 01789 svn_boolean_t get_all, 01790 svn_boolean_t update, 01791 svn_boolean_t no_ignore, 01792 svn_client_ctx_t *ctx, 01793 apr_pool_t *pool); 01794 01795 /** @} */ 01796 01797 /** 01798 * @defgroup Log View information about previous revisions of an object. 01799 * 01800 * @{ 01801 */ 01802 01803 /** 01804 * Invoke @a receiver with @a receiver_baton on each log message from @a 01805 * start to @a end in turn, inclusive (but never invoke @a receiver on a 01806 * given log message more than once). 01807 * 01808 * @a targets contains either a URL followed by zero or more relative 01809 * paths, or 1 working copy path, as <tt>const char *</tt>, for which log 01810 * messages are desired. @a receiver is invoked only on messages whose 01811 * revisions involved a change to some path in @a targets. @a peg_revision 01812 * indicates in which revision @a targets are valid. If @a peg_revision is 01813 * @c svn_opt_revision_unspecified, it defaults to @c svn_opt_revision_head 01814 * for URLs or @c svn_opt_revision_working for WC paths. 01815 * 01816 * If @a limit is non-zero only invoke @a receiver on the first @a limit 01817 * logs. 01818 * 01819 * If @a discover_changed_paths is set, then the `@a changed_paths' argument 01820 * to @a receiver will be passed on each invocation. 01821 * 01822 * If @a strict_node_history is set, copy history (if any exists) will 01823 * not be traversed while harvesting revision logs for each target. 01824 * 01825 * If @a include_merged_revisions is set, log information for revisions 01826 * which have been merged to @a targets will also be returned. 01827 * 01828 * If @a revprops is NULL, retrieve all revprops; else, retrieve only the 01829 * revprops named in the array (i.e. retrieve none if the array is empty). 01830 * 01831 * If @a start->kind or @a end->kind is @c svn_opt_revision_unspecified, 01832 * return the error @c SVN_ERR_CLIENT_BAD_REVISION. 01833 * 01834 * Use @a pool for any temporary allocation. 01835 * 01836 * @par Important: 01837 * A special case for the revision range HEAD:1, which was present 01838 * in svn_client_log(), has been removed from svn_client_log2(). Instead, it 01839 * is expected that callers will specify the range HEAD:0, to avoid a 01840 * SVN_ERR_FS_NO_SUCH_REVISION error when invoked against an empty repository 01841 * (i.e. one not containing a revision 1). 01842 * 01843 * If @a ctx->notify_func2 is non-NULL, then call @a ctx->notify_func2/baton2 01844 * with a 'skip' signal on any unversioned targets. 01845 * 01846 * @since New in 1.5. 01847 */ 01848 01849 svn_error_t * 01850 svn_client_log4(const apr_array_header_t *targets, 01851 const svn_opt_revision_t *peg_revision, 01852 const svn_opt_revision_t *start, 01853 const svn_opt_revision_t *end, 01854 int limit, 01855 svn_boolean_t discover_changed_paths, 01856 svn_boolean_t strict_node_history, 01857 svn_boolean_t include_merged_revisions, 01858 const apr_array_header_t *revprops, 01859 svn_log_entry_receiver_t receiver, 01860 void *receiver_baton, 01861 svn_client_ctx_t *ctx, 01862 apr_pool_t *pool); 01863 01864 /** 01865 * Similar to svn_client_log4(), but using @c svn_log_message_receiver_t 01866 * instead of @c svn_log_entry_receiver_t. Also, @a 01867 * include_merged_revisions is set to @c FALSE and @a revprops is 01868 * svn:author, svn:date, and svn:log. 01869 * 01870 * @deprecated Provided for compatibility with the 1.4 API. 01871 * @since New in 1.4. 01872 */ 01873 svn_error_t * 01874 svn_client_log3(const apr_array_header_t *targets, 01875 const svn_opt_revision_t *peg_revision, 01876 const svn_opt_revision_t *start, 01877 const svn_opt_revision_t *end, 01878 int limit, 01879 svn_boolean_t discover_changed_paths, 01880 svn_boolean_t strict_node_history, 01881 svn_log_message_receiver_t receiver, 01882 void *receiver_baton, 01883 svn_client_ctx_t *ctx, 01884 apr_pool_t *pool); 01885 01886 01887 /** 01888 * Similar to svn_client_log3(), but with the @c kind field of 01889 * @a peg_revision set to @c svn_opt_revision_unspecified. 01890 * 01891 * @deprecated Provided for compatibility with the 1.3 API. 01892 * @since New in 1.2. 01893 */ 01894 svn_error_t * 01895 svn_client_log2(const apr_array_header_t *targets, 01896 const svn_opt_revision_t *start, 01897 const svn_opt_revision_t *end, 01898 int limit, 01899 svn_boolean_t discover_changed_paths, 01900 svn_boolean_t strict_node_history, 01901 svn_log_message_receiver_t receiver, 01902 void *receiver_baton, 01903 svn_client_ctx_t *ctx, 01904 apr_pool_t *pool); 01905 01906 01907 /** 01908 * Similar to svn_client_log2(), but with @a limit set to 0, and the 01909 * following special case: 01910 * 01911 * Special case for repositories at revision 0: 01912 * 01913 * If @a start->kind is @c svn_opt_revision_head, and @a end->kind is 01914 * @c svn_opt_revision_number && @a end->number is @c 1, then handle an 01915 * empty (no revisions) repository specially: instead of erroring 01916 * because requested revision 1 when the highest revision is 0, just 01917 * invoke @a receiver on revision 0, passing @c NULL for changed paths and 01918 * empty strings for the author and date. This is because that 01919 * particular combination of @a start and @a end usually indicates the 01920 * common case of log invocation -- the user wants to see all log 01921 * messages from youngest to oldest, where the oldest commit is 01922 * revision 1. That works fine, except when there are no commits in 01923 * the repository, hence this special case. 01924 * 01925 * @deprecated Provided for backward compatibility with the 1.0 API. 01926 */ 01927 svn_error_t * 01928 svn_client_log(const apr_array_header_t *targets, 01929 const svn_opt_revision_t *start, 01930 const svn_opt_revision_t *end, 01931 svn_boolean_t discover_changed_paths, 01932 svn_boolean_t strict_node_history, 01933 svn_log_message_receiver_t receiver, 01934 void *receiver_baton, 01935 svn_client_ctx_t *ctx, 01936 apr_pool_t *pool); 01937 01938 /** @} */ 01939 01940 /** 01941 * @defgroup Blame Show modification information about lines in a file. 01942 * 01943 * @{ 01944 */ 01945 01946 /** 01947 * Invoke @a receiver with @a receiver_baton on each line-blame item 01948 * associated with revision @a end of @a path_or_url, using @a start 01949 * as the default source of all blame. @a peg_revision indicates in 01950 * which revision @a path_or_url is valid. If @a peg_revision->kind 01951 * is @c svn_opt_revision_unspecified, then it defaults to @c 01952 * svn_opt_revision_head for URLs or @c svn_opt_revision_working for 01953 * WC targets. 01954 * 01955 * If @a start->kind or @a end->kind is @c svn_opt_revision_unspecified, 01956 * return the error @c SVN_ERR_CLIENT_BAD_REVISION. If either are @c 01957 * svn_opt_revision_working, return the error @c 01958 * SVN_ERR_UNSUPPORTED_FEATURE. If any of the revisions of @a 01959 * path_or_url have a binary mime-type, return the error @c 01960 * SVN_ERR_CLIENT_IS_BINARY_FILE, unless @a ignore_mime_type is TRUE, 01961 * in which case blame information will be generated regardless of the 01962 * MIME types of the revisions. 01963 * 01964 * Use @a diff_options to determine how to compare different revisions of the 01965 * target. 01966 * 01967 * If @a include_merged_revisions is TRUE, also return data based upon 01968 * revisions which have been merged to @a path_or_url. 01969 * 01970 * Use @a pool for any temporary allocation. 01971 * 01972 * @since New in 1.5. 01973 */ 01974 svn_error_t * 01975 svn_client_blame4(const char *path_or_url, 01976 const svn_opt_revision_t *peg_revision, 01977 const svn_opt_revision_t *start, 01978 const svn_opt_revision_t *end, 01979 const svn_diff_file_options_t *diff_options, 01980 svn_boolean_t ignore_mime_type, 01981 svn_boolean_t include_merged_revisions, 01982 svn_client_blame_receiver2_t receiver, 01983 void *receiver_baton, 01984 svn_client_ctx_t *ctx, 01985 apr_pool_t *pool); 01986 01987 /** 01988 * Similar to svn_client_blame4(), but with @a include_merged_revisions set 01989 * to FALSE, and using a @c svn_client_blame_receiver2_t as the receiver. 01990 * 01991 * @deprecated Provided for backwards compatibility with the 1.4 API. 01992 * 01993 * @since New in 1.4. 01994 */ 01995 svn_error_t * 01996 svn_client_blame3(const char *path_or_url, 01997 const svn_opt_revision_t *peg_revision, 01998 const svn_opt_revision_t *start, 01999 const svn_opt_revision_t *end, 02000 const svn_diff_file_options_t *diff_options, 02001 svn_boolean_t ignore_mime_type, 02002 svn_client_blame_receiver_t receiver, 02003 void *receiver_baton, 02004 svn_client_ctx_t *ctx, 02005 apr_pool_t *pool); 02006 02007 /** 02008 * Similar to svn_client_blame3(), but with @a diff_options set to 02009 * default options as returned by svn_diff_file_options_parse() and 02010 * @a ignore_mime_type set to FALSE. 02011 * 02012 * @deprecated Provided for backwards compatibility with the 1.3 API. 02013 * 02014 * @since New in 1.2. 02015 */ 02016 svn_error_t * 02017 svn_client_blame2(const char *path_or_url, 02018 const svn_opt_revision_t *peg_revision, 02019 const svn_opt_revision_t *start, 02020 const svn_opt_revision_t *end, 02021 svn_client_blame_receiver_t receiver, 02022 void *receiver_baton, 02023 svn_client_ctx_t *ctx, 02024 apr_pool_t *pool); 02025 02026 /** 02027 * Similar to svn_client_blame2() except that @a peg_revision is always 02028 * the same as @a end. 02029 * 02030 * @deprecated Provided for backward compatibility with the 1.1 API. 02031 */ 02032 svn_error_t * 02033 svn_client_blame(const char *path_or_url, 02034 const svn_opt_revision_t *start, 02035 const svn_opt_revision_t *end, 02036 svn_client_blame_receiver_t receiver, 02037 void *receiver_baton, 02038 svn_client_ctx_t *ctx, 02039 apr_pool_t *pool); 02040 02041 /** @} */ 02042 02043 /** 02044 * @defgroup Diff Generate differences between paths. 02045 * 02046 * @{ 02047 */ 02048 02049 /** 02050 * Produce diff output which describes the delta between 02051 * @a path1/@a revision1 and @a path2/@a revision2. Print the output 02052 * of the diff to @a outfile, and any errors to @a errfile. @a path1 02053 * and @a path2 can be either working-copy paths or URLs. 02054 * 02055 * If @a relative_to_dir is not @c NULL, the @a original_path and 02056 * @a modified_path will have the @a relative_to_dir stripped from the 02057 * front of the respective paths. If @a relative_to_dir is @c NULL, 02058 * paths will not be modified. If @a relative_to_dir is not 02059 * @c NULL but @a relative_to_dir is not a parent path of the target, 02060 * an error is returned. Finally, if @a relative_to_dir is a URL, an 02061 * error will be returned. 02062 * 02063 * If either @a revision1 or @a revision2 has an `unspecified' or 02064 * unrecognized `kind', return @c SVN_ERR_CLIENT_BAD_REVISION. 02065 * 02066 * @a path1 and @a path2 must both represent the same node kind -- that 02067 * is, if @a path1 is a directory, @a path2 must also be, and if @a path1 02068 * is a file, @a path2 must also be. 02069 * 02070 * If @a depth is @c svn_depth_infinity, diff fully recursively. 02071 * Else if it is @c svn_depth_immediates, diff the named paths and 02072 * their file children (if any), and diff properties of 02073 * subdirectories, but do not descend further into the subdirectories. 02074 * Else if @c svn_depth_files, behave as if for @c svn_depth_immediates 02075 * except don't diff properties of subdirectories. If @c 02076 * svn_depth_empty, diff exactly the named paths but nothing 02077 * underneath them. 02078 * 02079 * Use @a ignore_ancestry to control whether or not items being 02080 * diffed will be checked for relatedness first. Unrelated items 02081 * are typically transmitted to the editor as a deletion of one thing 02082 * and the addition of another, but if this flag is TRUE, unrelated 02083 * items will be diffed as if they were related. 02084 * 02085 * If @a no_diff_deleted is TRUE, then no diff output will be 02086 * generated on deleted files. 02087 * 02088 * Generated headers are encoded using @a header_encoding. 02089 * 02090 * Diff output will not be generated for binary files, unless @a 02091 * ignore_content_type is TRUE, in which case diffs will be shown 02092 * regardless of the content types. 02093 * 02094 * @a diff_options (an array of <tt>const char *</tt>) is used to pass 02095 * additional command line options to the diff processes invoked to compare 02096 * files. 02097 * 02098 * The authentication baton cached in @a ctx is used to communicate with 02099 * the repository. 02100 * 02101 * @a changelists is an array of <tt>const char *</tt> changelist 02102 * names, used as a restrictive filter on items whose differences are 02103 * reported; that is, don't generate diffs about any item unless 02104 * it's a member of one of those changelists. If @a changelists is 02105 * empty (or altogether @c NULL), no changelist filtering occurs. 02106 * 02107 * @note Changelist filtering only applies to diffs in which at least 02108 * one side of the diff represents working copy data. 02109 * 02110 * @note @a header_encoding doesn't affect headers generated by external 02111 * diff programs. 02112 * 02113 * @note @a relative_to_dir doesn't affect the path index generated by 02114 * external diff programs. 02115 * 02116 * @since New in 1.5. 02117 */ 02118 svn_error_t * 02119 svn_client_diff4(const apr_array_header_t *diff_options, 02120 const char *path1, 02121 const svn_opt_revision_t *revision1, 02122 const char *path2, 02123 const svn_opt_revision_t *revision2, 02124 const char *relative_to_dir, 02125 svn_depth_t depth, 02126 svn_boolean_t ignore_ancestry, 02127 svn_boolean_t no_diff_deleted, 02128 svn_boolean_t ignore_content_type, 02129 const char *header_encoding, 02130 apr_file_t *outfile, 02131 apr_file_t *errfile, 02132 const apr_array_header_t *changelists, 02133 svn_client_ctx_t *ctx, 02134 apr_pool_t *pool); 02135 02136 02137 /** 02138 * Similar to svn_client_diff4(), but with @a changelists passed as @c 02139 * NULL, and @a depth set according to @a recurse: if @a recurse is 02140 * TRUE, set @a depth to @c svn_depth_infinity, if @a recurse is 02141 * FALSE, set @a depth to @c svn_depth_empty. 02142 * 02143 * @deprecated Provided for backward compatibility with the 1.4 API. 02144 * 02145 * @since New in 1.3. 02146 */ 02147 svn_error_t * 02148 svn_client_diff3(const apr_array_header_t *diff_options, 02149 const char *path1, 02150 const svn_opt_revision_t *revision1, 02151 const char *path2, 02152 const svn_opt_revision_t *revision2, 02153 svn_boolean_t recurse, 02154 svn_boolean_t ignore_ancestry, 02155 svn_boolean_t no_diff_deleted, 02156 svn_boolean_t ignore_content_type, 02157 const char *header_encoding, 02158 apr_file_t *outfile, 02159 apr_file_t *errfile, 02160 svn_client_ctx_t *ctx, 02161 apr_pool_t *pool); 02162 02163 02164 /** 02165 * Similar to svn_client_diff3(), but with @a header_encoding set to 02166 * @c APR_LOCALE_CHARSET. 02167 * 02168 * @deprecated Provided for backward compatibility with the 1.2 API. 02169 * 02170 * @since New in 1.2. 02171 */ 02172 svn_error_t * 02173 svn_client_diff2(const apr_array_header_t *diff_options, 02174 const char *path1, 02175 const svn_opt_revision_t *revision1, 02176 const char *path2, 02177 const svn_opt_revision_t *revision2, 02178 svn_boolean_t recurse, 02179 svn_boolean_t ignore_ancestry, 02180 svn_boolean_t no_diff_deleted, 02181 svn_boolean_t ignore_content_type, 02182 apr_file_t *outfile, 02183 apr_file_t *errfile, 02184 svn_client_ctx_t *ctx, 02185 apr_pool_t *pool); 02186 02187 /** 02188 * Similar to svn_client_diff2(), but with @a ignore_content_type 02189 * always set to FALSE. 02190 * 02191 * @deprecated Provided for backward compatibility with the 1.0 API. 02192 */ 02193 svn_error_t * 02194 svn_client_diff(const apr_array_header_t *diff_options, 02195 const char *path1, 02196 const svn_opt_revision_t *revision1, 02197 const char *path2, 02198 const svn_opt_revision_t *revision2, 02199 svn_boolean_t recurse, 02200 svn_boolean_t ignore_ancestry, 02201 svn_boolean_t no_diff_deleted, 02202 apr_file_t *outfile, 02203 apr_file_t *errfile, 02204 svn_client_ctx_t *ctx, 02205 apr_pool_t *pool); 02206 02207 /** 02208 * Produce diff output which describes the delta between the 02209 * filesystem object @a path in peg revision @a peg_revision, as it 02210 * changed between @a start_revision and @a end_revision. @a path can 02211 * be either a working-copy path or URL. 02212 * 02213 * If @a peg_revision is @c svn_opt_revision_unspecified, behave 02214 * identically to svn_client_diff4(), using @a path for both of that 02215 * function's @a path1 and @a path2 argments. 02216 * 02217 * All other options are handled identically to svn_client_diff4(). 02218 * 02219 * @since New in 1.5. 02220 */ 02221 svn_error_t * 02222 svn_client_diff_peg4(const apr_array_header_t *diff_options, 02223 const char *path, 02224 const svn_opt_revision_t *peg_revision, 02225 const svn_opt_revision_t *start_revision, 02226 const svn_opt_revision_t *end_revision, 02227 const char *relative_to_dir, 02228 svn_depth_t depth, 02229 svn_boolean_t ignore_ancestry, 02230 svn_boolean_t no_diff_deleted, 02231 svn_boolean_t ignore_content_type, 02232 const char *header_encoding, 02233 apr_file_t *outfile, 02234 apr_file_t *errfile, 02235 const apr_array_header_t *changelists, 02236 svn_client_ctx_t *ctx, 02237 apr_pool_t *pool); 02238 02239 /** 02240 * Similar to svn_client_diff_peg4(), but with @a changelists passed 02241 * as @c NULL, and @a depth set according to @a recurse: if @a recurse 02242 * is TRUE, set @a depth to @c svn_depth_infinity, if @a recurse is 02243 * FALSE, set @a depth to @c svn_depth_files. 02244 * 02245 * @deprecated Provided for backward compatibility with the 1.4 API. 02246 * 02247 * @since New in 1.3. 02248 */ 02249 svn_error_t * 02250 svn_client_diff_peg3(const apr_array_header_t *diff_options, 02251 const char *path, 02252 const svn_opt_revision_t *peg_revision, 02253 const svn_opt_revision_t *start_revision, 02254 const svn_opt_revision_t *end_revision, 02255 svn_boolean_t recurse, 02256 svn_boolean_t ignore_ancestry, 02257 svn_boolean_t no_diff_deleted, 02258 svn_boolean_t ignore_content_type, 02259 const char *header_encoding, 02260 apr_file_t *outfile, 02261 apr_file_t *errfile, 02262 svn_client_ctx_t *ctx, 02263 apr_pool_t *pool); 02264 02265 /** 02266 * Similar to svn_client_diff_peg3(), but with @a header_encoding set to 02267 * @c APR_LOCALE_CHARSET. 02268 * 02269 * @deprecated Provided for backward compatibility with the 1.2 API. 02270 * 02271 * @since New in 1.2. 02272 */ 02273 svn_error_t * 02274 svn_client_diff_peg2(const apr_array_header_t *diff_options, 02275 const char *path, 02276 const svn_opt_revision_t *peg_revision, 02277 const svn_opt_revision_t *start_revision, 02278 const svn_opt_revision_t *end_revision, 02279 svn_boolean_t recurse, 02280 svn_boolean_t ignore_ancestry, 02281 svn_boolean_t no_diff_deleted, 02282 svn_boolean_t ignore_content_type, 02283 apr_file_t *outfile, 02284 apr_file_t *errfile, 02285 svn_client_ctx_t *ctx, 02286 apr_pool_t *pool); 02287 02288 /** 02289 * Similar to svn_client_diff_peg2(), but with @a ignore_content_type 02290 * always set to FALSE. 02291 * 02292 * @since New in 1.1. 02293 * @deprecated Provided for backward compatibility with the 1.1 API. 02294 */ 02295 svn_error_t * 02296 svn_client_diff_peg(const apr_array_header_t *diff_options, 02297 const char *path, 02298 const svn_opt_revision_t *peg_revision, 02299 const svn_opt_revision_t *start_revision, 02300 const svn_opt_revision_t *end_revision, 02301 svn_boolean_t recurse, 02302 svn_boolean_t ignore_ancestry, 02303 svn_boolean_t no_diff_deleted, 02304 apr_file_t *outfile, 02305 apr_file_t *errfile, 02306 svn_client_ctx_t *ctx, 02307 apr_pool_t *pool); 02308 02309 /** 02310 * Produce a diff summary which lists the changed items between 02311 * @a path1/@a revision1 and @a path2/@a revision2 without creating text 02312 * deltas. @a path1 and @a path2 can be either working-copy paths or URLs. 02313 * 02314 * The function may report false positives if @a ignore_ancestry is false, 02315 * since a file might have been modified between two revisions, but still 02316 * have the same contents. 02317 * 02318 * Calls @a summarize_func with @a summarize_baton for each difference 02319 * with a @c svn_client_diff_summarize_t structure describing the difference. 02320 * 02321 * See svn_client_diff4() for a description of the other parameters. 02322 * 02323 * @since New in 1.5. 02324 */ 02325 svn_error_t * 02326 svn_client_diff_summarize2(const char *path1, 02327 const svn_opt_revision_t *revision1, 02328 const char *path2, 02329 const svn_opt_revision_t *revision2, 02330 svn_depth_t depth, 02331 svn_boolean_t ignore_ancestry, 02332 const apr_array_header_t *changelists, 02333 svn_client_diff_summarize_func_t summarize_func, 02334 void *summarize_baton, 02335 svn_client_ctx_t *ctx, 02336 apr_pool_t *pool); 02337 02338 /** 02339 * Similar to svn_client_diff_summarize2(), but with @a changelists 02340 * passed as @c NULL, and @a depth set according to @a recurse: if @a 02341 * recurse is TRUE, set @a depth to @c svn_depth_infinity, if @a 02342 * recurse is FALSE, set @a depth to @c svn_depth_files. 02343 * 02344 * @deprecated Provided for backward compatibility with the 1.4 API. 02345 * 02346 * @since New in 1.4. 02347 */ 02348 svn_error_t * 02349 svn_client_diff_summarize(const char *path1, 02350 const svn_opt_revision_t *revision1, 02351 const char *path2, 02352 const svn_opt_revision_t *revision2, 02353 svn_boolean_t recurse, 02354 svn_boolean_t ignore_ancestry, 02355 svn_client_diff_summarize_func_t summarize_func, 02356 void *summarize_baton, 02357 svn_client_ctx_t *ctx, 02358 apr_pool_t *pool); 02359 02360 /** 02361 * Produce a diff summary which lists the changed items between the 02362 * filesystem object @a path in peg revision @a peg_revision, as it 02363 * changed between @a start_revision and @a end_revision. @a path can 02364 * be either a working-copy path or URL. 02365 * 02366 * If @a peg_revision is @c svn_opt_revision_unspecified, behave 02367 * identically to svn_client_diff_summarize2(), using @a path for both 02368 * of that function's @a path1 and @a path2 argments. 02369 * 02370 * The function may report false positives if @a ignore_ancestry is false, 02371 * as described in the documentation for svn_client_diff_summarize2(). 02372 * 02373 * Call @a summarize_func with @a summarize_baton for each difference 02374 * with a @c svn_client_diff_summarize_t structure describing the difference. 02375 * 02376 * See svn_client_diff_peg4() for a description of the other parameters. 02377 * 02378 * @since New in 1.5. 02379 */ 02380 svn_error_t * 02381 svn_client_diff_summarize_peg2(const char *path, 02382 const svn_opt_revision_t *peg_revision, 02383 const svn_opt_revision_t *start_revision, 02384 const svn_opt_revision_t *end_revision, 02385 svn_depth_t depth, 02386 svn_boolean_t ignore_ancestry, 02387 const apr_array_header_t *changelists, 02388 svn_client_diff_summarize_func_t summarize_func, 02389 void *summarize_baton, 02390 svn_client_ctx_t *ctx, 02391 apr_pool_t *pool); 02392 02393 /** 02394 * Similar to svn_client_diff_summarize_peg2(), but with @a 02395 * changelists passed as @c NULL, and @a depth set according to @a 02396 * recurse: if @a recurse is TRUE, set @a depth to @c 02397 * svn_depth_infinity, if @a recurse is FALSE, set @a depth to @c 02398 * svn_depth_files. 02399 * 02400 * @deprecated Provided for backward compatibility with the 1.4 API. 02401 * 02402 * @since New in 1.4. 02403 */ 02404 svn_error_t * 02405 svn_client_diff_summarize_peg(const char *path, 02406 const svn_opt_revision_t *peg_revision, 02407 const svn_opt_revision_t *start_revision, 02408 const svn_opt_revision_t *end_revision, 02409 svn_boolean_t recurse, 02410 svn_boolean_t ignore_ancestry, 02411 svn_client_diff_summarize_func_t summarize_func, 02412 void *summarize_baton, 02413 svn_client_ctx_t *ctx, 02414 apr_pool_t *pool); 02415 02416 /** @} */ 02417 02418 /** 02419 * @defgroup Merge Merge changes between branches. 02420 * 02421 * @{ 02422 */ 02423 02424 /** Merge changes from @a source1/@a revision1 to @a source2/@a revision2 into 02425 * the working-copy path @a target_wcpath. 02426 * 02427 * @a source1 and @a source2 are either URLs that refer to entries in the 02428 * repository, or paths to entries in the working copy. 02429 * 02430 * By "merging", we mean: apply file differences using 02431 * svn_wc_merge(), and schedule additions & deletions when appropriate. 02432 * 02433 * @a source1 and @a source2 must both represent the same node kind -- that 02434 * is, if @a source1 is a directory, @a source2 must also be, and if @a source1 02435 * is a file, @a source2 must also be. 02436 * 02437 * If either @a revision1 or @a revision2 has an `unspecified' or 02438 * unrecognized `kind', return @c SVN_ERR_CLIENT_BAD_REVISION. 02439 * 02440 * If @a depth is @c svn_depth_infinity, merge fully recursively. 02441 * Else if @c svn_depth_immediates, merge changes at most to files 02442 * that are immediate children of @a target_wcpath and to directory 02443 * properties of @a target_wcpath and its immediate subdirectory children. 02444 * Else if @c svn_depth_files, merge at most to immediate file 02445 * children of @a target_wcpath and to @a target_wcpath itself. 02446 * Else if @c svn_depth_empty, apply changes only to @a target_wcpath 02447 * (i.e., directory property changes only) 02448 * 02449 * If @a depth is @c svn_depth_unknown, use the depth of @a target_wcpath. 02450 * 02451 * Use @a ignore_ancestry to control whether or not items being 02452 * diffed will be checked for relatedness first. Unrelated items 02453 * are typically transmitted to the editor as a deletion of one thing 02454 * and the addition of another, but if this flag is TRUE, unrelated 02455 * items will be diffed as if they were related. 02456 * 02457 * If @a force is not set and the merge involves deleting locally modified or 02458 * unversioned items the operation will fail. If @a force is set such items 02459 * will be deleted. 02460 * 02461 * @a merge_options (an array of <tt>const char *</tt>), if non-NULL, 02462 * is used to pass additional command line arguments to the merge 02463 * processes (internal or external). @see 02464 * svn_diff_file_options_parse(). 02465 * 02466 * If @a ctx->notify_func2 is non-NULL, then call @a ctx->notify_func2 with @a 02467 * ctx->notify_baton2 once for each merged target, passing the target's local 02468 * path. 02469 * 02470 * If @a record_only is TRUE, the merge isn't actually performed, but 02471 * the mergeinfo for the revisions which would've been merged is 02472 * recorded in the working copy (and must be subsequently committed 02473 * back to the repository). 02474 * 02475 * If @a dry_run is TRUE, the merge is carried out, and full notification 02476 * feedback is provided, but the working copy is not modified. 02477 * 02478 * The authentication baton cached in @a ctx is used to communicate with the 02479 * repository. 02480 * 02481 * @since New in 1.5. 02482 */ 02483 svn_error_t * 02484 svn_client_merge3(const char *source1, 02485 const svn_opt_revision_t *revision1, 02486 const char *source2, 02487 const svn_opt_revision_t *revision2, 02488 const char *target_wcpath, 02489 svn_depth_t depth, 02490 svn_boolean_t ignore_ancestry, 02491 svn_boolean_t force, 02492 svn_boolean_t record_only, 02493 svn_boolean_t dry_run, 02494 const apr_array_header_t *merge_options, 02495 svn_client_ctx_t *ctx, 02496 apr_pool_t *pool); 02497 02498 /** 02499 * Similar to svn_client_merge3(), but with @a record_only set to @c 02500 * FALSE, and @a depth set according to @a recurse: if @a recurse is 02501 * TRUE, set @a depth to @c svn_depth_infinity, if @a recurse is 02502 * FALSE, set @a depth to @c svn_depth_files. 02503 * 02504 * @deprecated Provided for backward compatibility with the 1.4 API. 02505 * 02506 * @since New in 1.4. 02507 */ 02508 svn_error_t * 02509 svn_client_merge2(const char *source1, 02510 const svn_opt_revision_t *revision1, 02511 const char *source2, 02512 const svn_opt_revision_t *revision2, 02513 const char *target_wcpath, 02514 svn_boolean_t recurse, 02515 svn_boolean_t ignore_ancestry, 02516 svn_boolean_t force, 02517 svn_boolean_t dry_run, 02518 const apr_array_header_t *merge_options, 02519 svn_client_ctx_t *ctx, 02520 apr_pool_t *pool); 02521 02522 02523 /** 02524 * Similar to svn_client_merge2(), but with @a merge_options set to NULL. 02525 * 02526 * @deprecated Provided for backwards compatibility with the 1.3 API. 02527 */ 02528 svn_error_t * 02529 svn_client_merge(const char *source1, 02530 const svn_opt_revision_t *revision1, 02531 const char *source2, 02532 const svn_opt_revision_t *revision2, 02533 const char *target_wcpath, 02534 svn_boolean_t recurse, 02535 svn_boolean_t ignore_ancestry, 02536 svn_boolean_t force, 02537 svn_boolean_t dry_run, 02538 svn_client_ctx_t *ctx, 02539 apr_pool_t *pool); 02540 02541 02542 02543 /** 02544 * Perform a reintegration merge of @a source at @a peg_revision 02545 * into @target_wc_path. 02546 * @a target_wc_path must be a single-revision, @c svn_depth_infinity, 02547 * pristine, unswitched working copy -- in other words, it must 02548 * reflect a single revision tree, the "target". The mergeinfo on @a 02549 * source must reflect that all of the target has been merged into it. 02550 * Then this behaves like a merge with svn_client_merge3() from the 02551 * target's URL to the source. 02552 * 02553 * All other options are handled identically to svn_client_merge3(). 02554 * The depth of the merge is always @c svn_depth_infinity. 02555 * 02556 * @since New in 1.5. 02557 */ 02558 svn_error_t * 02559 svn_client_merge_reintegrate(const char *source, 02560 const svn_opt_revision_t *peg_revision, 02561 const char *target_wcpath, 02562 svn_boolean_t dry_run, 02563 const apr_array_header_t *merge_options, 02564 svn_client_ctx_t *ctx, 02565 apr_pool_t *pool); 02566 02567 /** 02568 * Merge the changes between the filesystem object @a source in peg 02569 * revision @a peg_revision, as it changed between the ranges described 02570 * in @a ranges_to_merge. 02571 * 02572 * @a ranges_to_merge is an array of <tt>svn_opt_revision_range_t 02573 * *</tt> ranges. These ranges may describe additive and/or 02574 * subtractive merge ranges, they may overlap fully or partially, 02575 * and/or they may partially or fully negate each other. This 02576 * rangelist is not required to be sorted. If any revision in the 02577 * list of provided ranges has an `unspecified' or unrecognized 02578 * `kind', return @c SVN_ERR_CLIENT_BAD_REVISION. 02579 * 02580 * All other options are handled identically to svn_client_merge3(). 02581 * 02582 * @since New in 1.5. 02583 */ 02584 svn_error_t * 02585 svn_client_merge_peg3(const char *source, 02586 const apr_array_header_t *ranges_to_merge, 02587 const svn_opt_revision_t *peg_revision, 02588 const char *target_wcpath, 02589 svn_depth_t depth, 02590 svn_boolean_t ignore_ancestry, 02591 svn_boolean_t force, 02592 svn_boolean_t record_only, 02593 svn_boolean_t dry_run, 02594 const apr_array_header_t *merge_options, 02595 svn_client_ctx_t *ctx, 02596 apr_pool_t *pool); 02597 02598 /** 02599 * Similar to svn_client_merge_peg3(), but with @a record_only set to 02600 * @c FALSE, and @a depth set according to @a recurse: if @a recurse 02601 * is TRUE, set @a depth to @c svn_depth_infinity, if @a recurse is 02602 * FALSE, set @a depth to @c svn_depth_files. 02603 * 02604 * @deprecated Provided for backwards compatibility with the 1.3 API. 02605 * 02606 * @since New in 1.4. 02607 */ 02608 svn_error_t * 02609 svn_client_merge_peg2(const char *source, 02610 const svn_opt_revision_t *revision1, 02611 const svn_opt_revision_t *revision2, 02612 const svn_opt_revision_t *peg_revision, 02613 const char *target_wcpath, 02614 svn_boolean_t recurse, 02615 svn_boolean_t ignore_ancestry, 02616 svn_boolean_t force, 02617 svn_boolean_t dry_run, 02618 const apr_array_header_t *merge_options, 02619 svn_client_ctx_t *ctx, 02620 apr_pool_t *pool); 02621 02622 /** 02623 * Similar to svn_client_merge_peg2(), but with @a merge_options set to 02624 * NULL. 02625 * 02626 * @deprecated Provided for backwards compatibility with the 1.3 API. 02627 * 02628 * @since New in 1.1. 02629 */ 02630 svn_error_t * 02631 svn_client_merge_peg(const char *source, 02632 const svn_opt_revision_t *revision1, 02633 const svn_opt_revision_t *revision2, 02634 const svn_opt_revision_t *peg_revision, 02635 const char *target_wcpath, 02636 svn_boolean_t recurse, 02637 svn_boolean_t ignore_ancestry, 02638 svn_boolean_t force, 02639 svn_boolean_t dry_run, 02640 svn_client_ctx_t *ctx, 02641 apr_pool_t *pool); 02642 02643 02644 /** Set @a suggestions to an ordered array of @c const char * 02645 * potential merge sources (expressed as full repository URLs) for @a 02646 * path_or_url at @a peg_revision. @a path_or_url is a working copy 02647 * path or repository URL. @a ctx is a context used for 02648 * authentication in the repository case. Use @a pool for all 02649 * allocations. 02650 * 02651 * @since New in 1.5. 02652 */ 02653 svn_error_t * 02654 svn_client_suggest_merge_sources(apr_array_header_t **suggestions, 02655 const char *path_or_url, 02656 const svn_opt_revision_t *peg_revision, 02657 svn_client_ctx_t *ctx, 02658 apr_pool_t *pool); 02659 02660 02661 /** 02662 * Set @a *mergeinfo to a hash mapping <tt>const char *</tt> merge 02663 * source URLs to <tt>apr_array_header_t *</tt> rangelists (arrays of 02664 * <tt>svn_merge_range_t *</tt> ranges) describing the ranges which 02665 * have been merged into @a path_or_url as of @a peg_revision, or @c 02666 * NULL if there is no mergeinfo. 02667 * 02668 * Use @a pool for all necessary allocations. 02669 * 02670 * If the server doesn't support retrieval of mergeinfo (which will 02671 * never happen for file:// URLs), return an @c 02672 * SVN_ERR_UNSUPPORTED_FEATURE error. 02673 * 02674 * @note Unlike most APIs which deal with mergeinfo, this one returns 02675 * data where the keys of the hash are absolute repository URLs rather 02676 * than repository filesystem paths. 02677 * 02678 * @since New in 1.5. 02679 */ 02680 svn_error_t * 02681 svn_client_mergeinfo_get_merged(apr_hash_t **mergeinfo, 02682 const char *path_or_url, 02683 const svn_opt_revision_t *peg_revision, 02684 svn_client_ctx_t *ctx, 02685 apr_pool_t *pool); 02686 02687 02688 /** 02689 * Drive log entry callbacks @a receiver / @a receiver_baton with the 02690 * revisions merged from @a merge_source_path_or_url (as of @a 02691 * src_peg_revision) into @a path_or_url (as of @a peg_revision). @a 02692 * ctx is a context used for authentication. 02693 * 02694 * @a discover_changed_paths and @a revprops are the same as for 02695 * svn_client_log4(). Use @a pool for all necessary allocations. 02696 * 02697 * If the server doesn't support retrieval of mergeinfo, return an @c 02698 * SVN_ERR_UNSUPPORTED_FEATURE error. 02699 * 02700 * @since New in 1.5. 02701 */ 02702 svn_error_t * 02703 svn_client_mergeinfo_log_merged(const char *path_or_url, 02704 const svn_opt_revision_t *peg_revision, 02705 const char *merge_source_path_or_url, 02706 const svn_opt_revision_t *src_peg_revision, 02707 svn_log_entry_receiver_t receiver, 02708 void *receiver_baton, 02709 svn_boolean_t discover_changed_paths, 02710 const apr_array_header_t *revprops, 02711 svn_client_ctx_t *ctx, 02712 apr_pool_t *pool); 02713 02714 /** 02715 * Drive log entry callbacks @a receiver / @a receiver_baton with the 02716 * revisions eligible for merge from @a merge_source_path_or_url (as 02717 * of @a src_peg_revision) into @a path_or_url (as of @a 02718 * peg_revision). @a ctx is a context used for authentication. 02719 * 02720 * @a discover_changed_paths and @a revprops are the same as for 02721 * svn_client_log4(). Use @a pool for all necessary allocations. 02722 * 02723 * If the server doesn't support retrieval of mergeinfo, return an @c 02724 * SVN_ERR_UNSUPPORTED_FEATURE error. 02725 * 02726 * @since New in 1.5. 02727 */ 02728 svn_error_t * 02729 svn_client_mergeinfo_log_eligible(const char *path_or_url, 02730 const svn_opt_revision_t *peg_revision, 02731 const char *merge_source_path_or_url, 02732 const svn_opt_revision_t *src_peg_revision, 02733 svn_log_entry_receiver_t receiver, 02734 void *receiver_baton, 02735 svn_boolean_t discover_changed_paths, 02736 const apr_array_header_t *revprops, 02737 svn_client_ctx_t *ctx, 02738 apr_pool_t *pool); 02739 02740 /** @} */ 02741 02742 /** 02743 * @defgroup Cleanup Cleanup an abnormally terminated working copy. 02744 * 02745 * @{ 02746 */ 02747 02748 /** Recursively cleanup a working copy directory @a dir, finishing any 02749 * incomplete operations, removing lockfiles, etc. 02750 * 02751 * If @a ctx->cancel_func is non-NULL, invoke it with @a 02752 * ctx->cancel_baton at various points during the operation. If it 02753 * returns an error (typically SVN_ERR_CANCELLED), return that error 02754 * immediately. 02755 */ 02756 svn_error_t * 02757 svn_client_cleanup(const char *dir, 02758 svn_client_ctx_t *ctx, 02759 apr_pool_t *pool); 02760 02761 02762 /** @} */ 02763 02764 /** 02765 * @defgroup Relocate Switch a working copy to a different repository. 02766 * 02767 * @{ 02768 */ 02769 02770 /** 02771 * Modify a working copy directory @a dir, changing any 02772 * repository URLs that begin with @a from to begin with @a to instead, 02773 * recursing into subdirectories if @a recurse is TRUE. 02774 * 02775 * @param dir Working copy directory 02776 * @param from Original URL 02777 * @param to New URL 02778 * @param recurse Whether to recurse 02779 * @param ctx svn_client_ctx_t 02780 * @param pool The pool from which to perform memory allocations 02781 */ 02782 svn_error_t * 02783 svn_client_relocate(const char *dir, 02784 const char *from, 02785 const char *to, 02786 svn_boolean_t recurse, 02787 svn_client_ctx_t *ctx, 02788 apr_pool_t *pool); 02789 02790 02791 /** @} */ 02792 02793 /** 02794 * @defgroup Revert Remove local changes in a repository. 02795 * 02796 * @{ 02797 */ 02798 02799 /** 02800 * Restore the pristine version of a working copy @a paths, 02801 * effectively undoing any local mods. For each path in @a paths, 02802 * revert it if it is a file. Else if it is a directory, revert 02803 * according to @a depth: 02804 * 02805 * If @a depth is @c svn_depth_empty, revert just the properties on 02806 * the directory; else if @c svn_depth_files, revert the properties 02807 * and any files immediately under the directory; else if 02808 * @c svn_depth_immediates, revert all of the preceding plus 02809 * properties on immediate subdirectories; else if @c svn_depth_infinity, 02810 * revert path and everything under it fully recursively. 02811 * 02812 * @a changelists is an array of <tt>const char *</tt> changelist 02813 * names, used as a restrictive filter on items reverted; that is, 02814 * don't revert any item unless it's a member of one of those 02815 * changelists. If @a changelists is empty (or altogether @c NULL), 02816 * no changelist filtering occurs. 02817 * 02818 * If @a ctx->notify_func2 is non-NULL, then for each item reverted, 02819 * call @a ctx->notify_func2 with @a ctx->notify_baton2 and the path of 02820 * the reverted item. 02821 * 02822 * If an item specified for reversion is not under version control, 02823 * then do not error, just invoke @a ctx->notify_func2 with @a 02824 * ctx->notify_baton2, using notification code @c svn_wc_notify_skip. 02825 * 02826 * @since New in 1.5. 02827 */ 02828 svn_error_t * 02829 svn_client_revert2(const apr_array_header_t *paths, 02830 svn_depth_t depth, 02831 const apr_array_header_t *changelists, 02832 svn_client_ctx_t *ctx, 02833 apr_pool_t *pool); 02834 02835 02836 /** 02837 * Similar to svn_client_revert2(), but with @a changelists passed as 02838 * @c NULL, and @a depth set according to @a recurse: if @a recurse is 02839 * TRUE, @a depth is @c svn_depth_infinity, else if @a recurse is 02840 * FALSE, @a depth is @c svn_depth_empty. 02841 * 02842 * @note Most APIs map @a recurse==FALSE to @a depth==svn_depth_files; 02843 * revert is deliberately different. 02844 * 02845 * @deprecated Provided for backwards compatibility with the 1.0 API. 02846 */ 02847 svn_error_t * 02848 svn_client_revert(const apr_array_header_t *paths, 02849 svn_boolean_t recursive, 02850 svn_client_ctx_t *ctx, 02851 apr_pool_t *pool); 02852 02853 02854 /** @} */ 02855 02856 /** 02857 * @defgroup Resolved Mark conflicted paths as resolved. 02858 * 02859 * @{ 02860 */ 02861 02862 /** 02863 * Similar to svn_client_resolve(), but without automatic conflict 02864 * resolution support. 02865 * 02866 * @deprecated Provided for backward compatibility with the 1.4 API. 02867 */ 02868 svn_error_t * 02869 svn_client_resolved(const char *path, 02870 svn_boolean_t recursive, 02871 svn_client_ctx_t *ctx, 02872 apr_pool_t *pool); 02873 02874 /** Perform automatic conflict resolution on a working copy @a path. 02875 * 02876 * If @a depth is @c svn_depth_empty, act only on @a path; if 02877 * @c svn_depth_files, resolve @a path and its conflicted file 02878 * children (if any); if @c svn_depth_immediates, resolve @a path and 02879 * all its immediate conflicted children (both files and directories, 02880 * if any); if @c svn_depth_infinity, resolve @a path and every 02881 * conflicted file or directory anywhere beneath it. 02882 * 02883 * If @a conflict_choice is @c svn_wc_conflict_choose_base, resolve the 02884 * conflict with the old file contents; if 02885 * @c svn_wc_conflict_choose_mine_full, use the original working contents; 02886 * if @c svn_wc_conflict_choose_theirs_full, the new contents; and if 02887 * @c svn_wc_conflict_choose_merged, don't change the contents at all, 02888 * just remove the conflict status, which is the pre-1.5 behavior. 02889 * 02890 * (@c svn_wc_conflict_choose_theirs_conflict and 02891 * @c svn_wc_conflict_choose_mine_conflict are not yet implemented; 02892 * the effect of passing one of those values as @a conflict_choice is 02893 * currently undefined, which may or may not be an underhanded way of 02894 * allowing real behaviors to be added for them later without revving 02895 * this interface.) 02896 * 02897 * If @a path is not in a state of conflict to begin with, do nothing. 02898 * If @a path's conflict state is removed and @a ctx->notify_func2 is non-NULL, 02899 * call @a ctx->notify_func2 with @a ctx->notify_baton2 and @a path. 02900 * 02901 * @since New in 1.5. 02902 */ 02903 svn_error_t * 02904 svn_client_resolve(const char *path, 02905 svn_depth_t depth, 02906 svn_wc_conflict_choice_t conflict_choice, 02907 svn_client_ctx_t *ctx, 02908 apr_pool_t *pool); 02909 02910 02911 /** @} */ 02912 02913 /** 02914 * @defgroup Copy Copy paths in the working copy and repository. 02915 * 02916 * @{ 02917 */ 02918 02919 /** 02920 * A structure which describes the source of a copy operation--its path, 02921 * revision, and peg revision. 02922 * 02923 * @since New in 1.5. 02924 */ 02925 typedef struct svn_client_copy_source_t 02926 { 02927 /** The source path or URL. */ 02928 const char *path; 02929 02930 /** The source operational revision. */ 02931 const svn_opt_revision_t *revision; 02932 02933 /** The source peg revision. */ 02934 const svn_opt_revision_t *peg_revision; 02935 } svn_client_copy_source_t; 02936 02937 /** Copy each @a src in @a sources to @a dst_path. 02938 * 02939 * If multiple @a sources are given, @a dst_path must be a directory, 02940 * and @a sources will be copied as children of @a dst_path. 02941 * 02942 * @a sources must be an array of elements of type 02943 * <tt>svn_client_copy_source_t *</tt>. 02944 * 02945 * Each @a src in @a sources must be files or directories under version control, 02946 * or URLs of a versioned item in the repository. If @a sources has multiple 02947 * items, the @a src members must be all repository URLs or all working copy 02948 * paths. 02949 * 02950 * The parent of @a dst_path must already exist. 02951 * 02952 * If @a sources has only one item, attempt to copy it to @a dst_path. If 02953 * @a copy_as_child is TRUE and @a dst_path already exists, attempt to copy the 02954 * item as a child of @a dst_path. If @a copy_as_child is FALSE and 02955 * @a dst_path already exists, fail with @c SVN_ERR_ENTRY_EXISTS if @a dst_path 02956 * is a working copy path and @c SVN_ERR_FS_ALREADY_EXISTS if @a dst_path is a 02957 * URL. 02958 * 02959 * If @a sources has multiple items, and @a copy_as_child is TRUE, all 02960 * @a sources are copied as children of @a dst_path. If any child of 02961 * @a dst_path already exists with the same name any item in @a sources, 02962 * fail with @c SVN_ERR_ENTRY_EXISTS if @a dst_path is a working copy path and 02963 * @c SVN_ERR_FS_ALREADY_EXISTS if @a dst_path is a URL. 02964 * 02965 * If @a sources has multiple items, and @a copy_as_child is FALSE, fail 02966 * with @c SVN_ERR_CLIENT_MULTIPLE_SOURCES_DISALLOWED. 02967 * 02968 * If @a dst_path is a URL, use the authentication baton 02969 * in @a ctx and @a ctx->log_msg_func3/@a ctx->log_msg_baton3 to immediately 02970 * attempt to commit the copy action in the repository. If the commit 02971 * succeeds, allocate (in @a pool) and populate @a *commit_info_p. If 02972 * @a dst_path is not a URL, and the copy succeeds, set @a 02973 * *commit_info_p to @c NULL. 02974 * 02975 * If @a dst_path is not a URL, then this is just a variant of 02976 * svn_client_add(), where the @a sources are scheduled for addition 02977 * as copies. No changes will happen to the repository until a commit occurs. 02978 * This scheduling can be removed with svn_client_revert2(). 02979 * 02980 * If @a make_parents is TRUE, create any non-existent parent directories 02981 * also. 02982 * 02983 * If non-NULL, @a revprop_table is a hash table holding additional, 02984 * custom revision properties (<tt>const char *</tt> names mapped to 02985 * <tt>svn_string_t *</tt> values) to be set on the new revision in 02986 * the event that this is a committing operation. This table cannot 02987 * contain any standard Subversion properties. 02988 * 02989 * @a ctx->log_msg_func3/@a ctx->log_msg_baton3 are a callback/baton combo 02990 * that this function can use to query for a commit log message when one is 02991 * needed. 02992 * 02993 * If @a ctx->notify_func2 is non-NULL, invoke it with @a ctx->notify_baton2 02994 * for each item added at the new location, passing the new, relative path of 02995 * the added item. 02996 * 02997 * @since New in 1.5. 02998 */ 02999 svn_error_t * 03000 svn_client_copy4(svn_commit_info_t **commit_info_p, 03001 apr_array_header_t *sources, 03002 const char *dst_path, 03003 svn_boolean_t copy_as_child, 03004 svn_boolean_t make_parents, 03005 const apr_hash_t *revprop_table, 03006 svn_client_ctx_t *ctx, 03007 apr_pool_t *pool); 03008 03009 /** 03010 * Similar to svn_client_copy4(), with only one @a src_path, @a 03011 * copy_as_child set to @c FALSE, @a revprop_table passed as NULL, and 03012 * @a make_parents set to @c FALSE. Also, use @a src_revision as both 03013 * the operational and peg revision. 03014 * 03015 * @since New in 1.4. 03016 * 03017 * @deprecated Provided for backward compatibility with the 1.4 API. 03018 */ 03019 svn_error_t * 03020 svn_client_copy3(svn_commit_info_t **commit_info_p, 03021 const char *src_path, 03022 const svn_opt_revision_t *src_revision, 03023 const char *dst_path, 03024 svn_client_ctx_t *ctx, 03025 apr_pool_t *pool); 03026 03027 03028 /** 03029 * Similar to svn_client_copy3(), with the difference that if @a dst_path 03030 * already exists and is a directory, copy the item into that directory, 03031 * keeping its name (the last component of @a src_path). 03032 * 03033 * @since New in 1.3. 03034 * 03035 * @deprecated Provided for backward compatibility with the 1.3 API. 03036 */ 03037 svn_error_t * 03038 svn_client_copy2(svn_commit_info_t **commit_info_p, 03039 const char *src_path, 03040 const svn_opt_revision_t *src_revision, 03041 const char *dst_path, 03042 svn_client_ctx_t *ctx, 03043 apr_pool_t *pool); 03044 03045 03046 /** 03047 * Similar to svn_client_copy2(), but uses @c svn_client_commit_info_t 03048 * for @a commit_info_p. 03049 * 03050 * @deprecated Provided for backward compatibility with the 1.2 API. 03051 */ 03052 svn_error_t * 03053 svn_client_copy(svn_client_commit_info_t **commit_info_p, 03054 const char *src_path, 03055 const svn_opt_revision_t *src_revision, 03056 const char *dst_path, 03057 svn_client_ctx_t *ctx, 03058 apr_pool_t *pool); 03059 03060 03061 /** @} */ 03062 03063 /** 03064 * @defgroup Move Move paths in the working copy or repository. 03065 * 03066 * @{ 03067 */ 03068 03069 /** 03070 * Move @a src_paths to @a dst_path. 03071 * 03072 * @a src_paths must be files or directories under version control, or 03073 * URLs of versioned items in the repository. All @a src_paths must be of 03074 * the same type. If multiple @a src_paths are given, @a dst_path must be 03075 * a directory and @a src_paths will be moved as children of @a dst_path. 03076 * 03077 * If @a src_paths are repository URLs: 03078 * 03079 * - @a dst_path must also be a repository URL. 03080 * 03081 * - The authentication baton in @a ctx and @a ctx->log_msg_func/@a 03082 * ctx->log_msg_baton are used to commit the move. 03083 * 03084 * - The move operation will be immediately committed. If the 03085 * commit succeeds, allocate (in @a pool) and populate @a *commit_info_p. 03086 * 03087 * If @a src_paths are working copy paths: 03088 * 03089 * - @a dst_path must also be a working copy path. 03090 * 03091 * - @a ctx->log_msg_func3 and @a ctx->log_msg_baton3 are ignored. 03092 * 03093 * - This is a scheduling operation. No changes will happen to the 03094 * repository until a commit occurs. This scheduling can be removed 03095 * with svn_client_revert2(). If one of @a src_paths is a file it is 03096 * removed from the working copy immediately. If one of @a src_path 03097 * is a directory it will remain in the working copy but all the files, 03098 * and unversioned items, it contains will be removed. 03099 * 03100 * - If one of @a src_paths contains locally modified and/or unversioned 03101 * items and @a force is not set, the move will fail. If @a force is set 03102 * such items will be removed. 03103 * 03104 * - If the move succeeds, set @a *commit_info_p to @c NULL. 03105 * 03106 * The parent of @a dst_path must already exist. 03107 * 03108 * If @a src_paths has only one item, attempt to move it to @a dst_path. If 03109 * @a move_as_child is TRUE and @a dst_path already exists, attempt to move the 03110 * item as a child of @a dst_path. If @a move_as_child is FALSE and 03111 * @a dst_path already exists, fail with @c SVN_ERR_ENTRY_EXISTS if @a dst_path 03112 * is a working copy path and @c SVN_ERR_FS_ALREADY_EXISTS if @a dst_path is a 03113 * URL. 03114 * 03115 * If @a src_paths has multiple items, and @a move_as_child is TRUE, all 03116 * @a src_paths are moved as children of @a dst_path. If any child of 03117 * @a dst_path already exists with the same name any item in @a src_paths, 03118 * fail with @c SVN_ERR_ENTRY_EXISTS if @a dst_path is a working copy path and 03119 * @c SVN_ERR_FS_ALREADY_EXISTS if @a dst_path is a URL. 03120 * 03121 * If @a src_paths has multiple items, and @a move_as_child is FALSE, fail 03122 * with @c SVN_ERR_CLIENT_MULTIPLE_SOURCES_DISALLOWED. 03123 * 03124 * If @a make_parents is TRUE, create any non-existent parent directories 03125 * also. 03126 * 03127 * If non-NULL, @a revprop_table is a hash table holding additional, 03128 * custom revision properties (<tt>const char *</tt> names mapped to 03129 * <tt>svn_string_t *</tt> values) to be set on the new revision in 03130 * the event that this is a committing operation. This table cannot 03131 * contain any standard Subversion properties. 03132 * 03133 * @a ctx->log_msg_func3/@a ctx->log_msg_baton3 are a callback/baton combo that 03134 * this function can use to query for a commit log message when one is needed. 03135 * 03136 * If @a ctx->notify_func2 is non-NULL, then for each item moved, call 03137 * @a ctx->notify_func2 with the @a ctx->notify_baton2 twice, once to indicate 03138 * the deletion of the moved thing, and once to indicate the addition of 03139 * the new location of the thing. 03140 * 03141 * ### Is this really true? What about svn_wc_notify_commit_replaced()? ### 03142 * 03143 * @since New in 1.5. 03144 */ 03145 svn_error_t * 03146 svn_client_move5(svn_commit_info_t **commit_info_p, 03147 apr_array_header_t *src_paths, 03148 const char *dst_path, 03149 svn_boolean_t force, 03150 svn_boolean_t move_as_child, 03151 svn_boolean_t make_parents, 03152 const apr_hash_t *revprop_table, 03153 svn_client_ctx_t *ctx, 03154 apr_pool_t *pool); 03155 03156 /** 03157 * Similar to svn_client_move5(), with only one @a src_path, @a 03158 * move_as_child set to @c FALSE, @a revprop_table passed as NULL, and 03159 * @a make_parents set to @c FALSE. 03160 * 03161 * @since New in 1.4. 03162 * 03163 * @deprecated Provided for backward compatibility with the 1.4 API. 03164 */ 03165 svn_error_t * 03166 svn_client_move4(svn_commit_info_t **commit_info_p, 03167 const char *src_path, 03168 const char *dst_path, 03169 svn_boolean_t force, 03170 svn_client_ctx_t *ctx, 03171 apr_pool_t *pool); 03172 03173 /** 03174 * Similar to svn_client_move4(), with the difference that if @a dst_path 03175 * already exists and is a directory, move the item into that directory, 03176 * keeping its name (the last component of @a src_path). 03177 * 03178 * @since New in 1.3. 03179 * 03180 * @deprecated Provided for backward compatibility with the 1.3 API. 03181 */ 03182 svn_error_t * 03183 svn_client_move3(svn_commit_info_t **commit_info_p, 03184 const char *src_path, 03185 const char *dst_path, 03186 svn_boolean_t force, 03187 svn_client_ctx_t *ctx, 03188 apr_pool_t *pool); 03189 03190 /** 03191 * Similar to svn_client_move3(), but uses @c svn_client_commit_info_t 03192 * for @a commit_info_p. 03193 * 03194 * @deprecated Provided for backward compatibility with the 1.2 API. 03195 * 03196 * @since New in 1.2. 03197 */ 03198 svn_error_t * 03199 svn_client_move2(svn_client_commit_info_t **commit_info_p, 03200 const char *src_path, 03201 const char *dst_path, 03202 svn_boolean_t force, 03203 svn_client_ctx_t *ctx, 03204 apr_pool_t *pool); 03205 03206 /** 03207 * Similar to svn_client_move2(), but an extra argument @a src_revision 03208 * must be passed. This has no effect, but must be of kind 03209 * @c svn_opt_revision_unspecified or @c svn_opt_revision_head, 03210 * otherwise error @c SVN_ERR_UNSUPPORTED_FEATURE is returned. 03211 * 03212 * @deprecated Provided for backward compatibility with the 1.1 API. 03213 */ 03214 svn_error_t * 03215 svn_client_move(svn_client_commit_info_t **commit_info_p, 03216 const char *src_path, 03217 const svn_opt_revision_t *src_revision, 03218 const char *dst_path, 03219 svn_boolean_t force, 03220 svn_client_ctx_t *ctx, 03221 apr_pool_t *pool); 03222 03223 /** @} */ 03224 03225 03226 /** Properties 03227 * 03228 * Note that certain svn-controlled properties must always have their 03229 * values set and stored in UTF8 with LF line endings. When 03230 * retrieving these properties, callers must convert the values back 03231 * to native locale and native line-endings before displaying them to 03232 * the user. For help with this task, see 03233 * svn_prop_needs_translation(), svn_subst_translate_string(), and 03234 * svn_subst_detranslate_string(). 03235 * 03236 * @defgroup svn_client_prop_funcs Property functions 03237 * @{ 03238 */ 03239 03240 03241 /** 03242 * Set @a propname to @a propval on @a target. 03243 * A @a propval of @c NULL will delete the property. 03244 * 03245 * If @a depth is @c svn_depth_empty, set the property on @a target 03246 * only; if @c svn_depth_files, set it on @a target and its file 03247 * children (if any); if @c svn_depth_immediates, on @a target and all 03248 * of its immediate children (both files and directories); if 03249 * @c svn_depth_infinity, on @a target and everything beneath it. 03250 * 03251 * The @a target may only be an URL if @a base_revision_for_url is not 03252 * @c SVN_INVALID_REVNUM; in this case, the property will only be set 03253 * if it has not changed since revision @a base_revision_for_url. 03254 * @a base_revision_for_url must be @c SVN_INVALID_REVNUM if @a target 03255 * is not an URL. @a depth deeper than @c svn_depth_empty is not 03256 * supported on URLs. The authentication baton in @a ctx and @a 03257 * ctx->log_msg_func3/@a ctx->log_msg_baton3 will be used to 03258 * immediately attempt to commit the property change in the 03259 * repository. If the commit succeeds, allocate (in @a pool) and 03260 * populate @a *commit_info_p. 03261 * 03262 * If @a propname is an svn-controlled property (i.e. prefixed with 03263 * @c SVN_PROP_PREFIX), then the caller is responsible for ensuring that 03264 * the value is UTF8-encoded and uses LF line-endings. 03265 * 03266 * If @a skip_checks is TRUE, do no validity checking. But if @a 03267 * skip_checks is FALSE, and @a propname is not a valid property for @a 03268 * target, return an error, either @c SVN_ERR_ILLEGAL_TARGET (if the 03269 * property is not appropriate for @a target), or @c 03270 * SVN_ERR_BAD_MIME_TYPE (if @a propname is "svn:mime-type", but @a 03271 * propval is not a valid mime-type). 03272 * 03273 * @a changelists is an array of <tt>const char *</tt> changelist 03274 * names, used as a restrictive filter on items whose properties are 03275 * set; that is, don't set properties on any item unless it's a member 03276 * of one of those changelists. If @a changelists is empty (or 03277 * altogether @c NULL), no changelist filtering occurs. 03278 * 03279 * If non-NULL, @a revprop_table is a hash table holding additional, 03280 * custom revision properties (<tt>const char *</tt> names mapped to 03281 * <tt>svn_string_t *</tt> values) to be set on the new revision in 03282 * the event that this is a committing operation. This table cannot 03283 * contain any standard Subversion properties. 03284 * 03285 * If @a ctx->cancel_func is non-NULL, invoke it passing @a 03286 * ctx->cancel_baton at various places during the operation. 03287 * 03288 * Use @a pool for all memory allocation. 03289 * 03290 * @since New in 1.5. 03291 */ 03292 svn_error_t * 03293 svn_client_propset3(svn_commit_info_t **commit_info_p, 03294 const char *propname, 03295 const svn_string_t *propval, 03296 const char *target, 03297 svn_depth_t depth, 03298 svn_boolean_t skip_checks, 03299 svn_revnum_t base_revision_for_url, 03300 const apr_array_header_t *changelists, 03301 const apr_hash_t *revprop_table, 03302 svn_client_ctx_t *ctx, 03303 apr_pool_t *pool); 03304 03305 /** 03306 * Like svn_client_propset3(), but with @a base_revision_for_url 03307 * always @c SVN_INVALID_REVNUM; @a commit_info_p always @c NULL; @a 03308 * changelists always @c NULL; @a revprop_table always @c NULL; and @a 03309 * depth set according to @a recurse: if @a recurse is TRUE, @a depth 03310 * is @c svn_depth_infinity, else @c svn_depth_empty. 03311 * 03312 * @deprecated Provided for backward compatibility with the 1.4 API. 03313 */ 03314 svn_error_t * 03315 svn_client_propset2(const char *propname, 03316 const svn_string_t *propval, 03317 const char *target, 03318 svn_boolean_t recurse, 03319 svn_boolean_t skip_checks, 03320 svn_client_ctx_t *ctx, 03321 apr_pool_t *pool); 03322 03323 /** 03324 * Like svn_client_propset2(), but with @a skip_checks always FALSE and a 03325 * newly created @a ctx. 03326 * 03327 * @deprecated Provided for backward compatibility with the 1.1 API. 03328 */ 03329 svn_error_t * 03330 svn_client_propset(const char *propname, 03331 const svn_string_t *propval, 03332 const char *target, 03333 svn_boolean_t recurse, 03334 apr_pool_t *pool); 03335 03336 /** Set @a propname to @a propval on revision @a revision in the repository 03337 * represented by @a URL. Use the authentication baton in @a ctx for 03338 * authentication, and @a pool for all memory allocation. Return the actual 03339 * rev affected in @a *set_rev. A @a propval of @c NULL will delete the 03340 * property. 03341 * 03342 * If @a force is TRUE, allow newlines in the author property. 03343 * 03344 * If @a propname is an svn-controlled property (i.e. prefixed with 03345 * @c SVN_PROP_PREFIX), then the caller is responsible for ensuring that 03346 * the value UTF8-encoded and uses LF line-endings. 03347 * 03348 * Note that unlike its cousin svn_client_propset3(), this routine 03349 * doesn't affect the working copy at all; it's a pure network 03350 * operation that changes an *unversioned* property attached to a 03351 * revision. This can be used to tweak log messages, dates, authors, 03352 * and the like. Be careful: it's a lossy operation. 03353 * 03354 * Also note that unless the administrator creates a 03355 * pre-revprop-change hook in the repository, this feature will fail. 03356 */ 03357 svn_error_t * 03358 svn_client_revprop_set(const char *propname, 03359 const svn_string_t *propval, 03360 const char *URL, 03361 const svn_opt_revision_t *revision, 03362 svn_revnum_t *set_rev, 03363 svn_boolean_t force, 03364 svn_client_ctx_t *ctx, 03365 apr_pool_t *pool); 03366 03367 /** 03368 * Set @a *props to a hash table whose keys are `<tt>char *</tt>' paths, 03369 * prefixed by @a target (a working copy path or a URL), of items on 03370 * which property @a propname is set, and whose values are `@c svn_string_t 03371 * *' representing the property value for @a propname at that path. 03372 * 03373 * Allocate @a *props, its keys, and its values in @a pool. 03374 * 03375 * Don't store any path, not even @a target, if it does not have a 03376 * property named @a propname. 03377 * 03378 * If @a revision->kind is @c svn_opt_revision_unspecified, then: get 03379 * properties from the working copy if @a target is a working copy 03380 * path, or from the repository head if @a target is a URL. Else get 03381 * the properties as of @a revision. The actual node revision 03382 * selected is determined by the path as it exists in @a peg_revision. 03383 * If @a peg_revision->kind is @c svn_opt_revision_unspecified, then 03384 * it defaults to @c svn_opt_revision_head for URLs or @c 03385 * svn_opt_revision_working for WC targets. Use the authentication 03386 * baton in @a ctx for authentication if contacting the repository. 03387 * If @a actual_revnum is not @c NULL, the actual revision number used 03388 * for the fetch is stored in @a *actual_revnum. 03389 * 03390 * If @a depth is @c svn_depth_empty, fetch the property from 03391 * @a target only; if @c svn_depth_files, fetch from @a target and its 03392 * file children (if any); if @c svn_depth_immediates, from @a target 03393 * and all of its immediate children (both files and directories); if 03394 * @c svn_depth_infinity, from @a target and everything beneath it. 03395 * 03396 * @a changelists is an array of <tt>const char *</tt> changelist 03397 * names, used as a restrictive filter on items whose properties are 03398 * set; that is, don't set properties on any item unless it's a member 03399 * of one of those changelists. If @a changelists is empty (or 03400 * altogether @c NULL), no changelist filtering occurs. 03401 * 03402 * If error, don't touch @a *props, otherwise @a *props is a hash table 03403 * even if empty. 03404 * 03405 * @since New in 1.5. 03406 */ 03407 svn_error_t * 03408 svn_client_propget3(apr_hash_t **props, 03409 const char *propname, 03410 const char *target, 03411 const svn_opt_revision_t *peg_revision, 03412 const svn_opt_revision_t *revision, 03413 svn_revnum_t *actual_revnum, 03414 svn_depth_t depth, 03415 const apr_array_header_t *changelists, 03416 svn_client_ctx_t *ctx, 03417 apr_pool_t *pool); 03418 03419 /** 03420 * Similar to svn_client_propget3(), except that @a actual_revnum and 03421 * @a changelists are always @c NULL, and @a depth is set according to 03422 * @a recurse: if @a recurse is TRUE, then @a depth is @c 03423 * svn_depth_infinity, else @c svn_depth_empty. 03424 * 03425 * @deprecated Provided for backward compatibility with the 1.2 API. 03426 */ 03427 svn_error_t * 03428 svn_client_propget2(apr_hash_t **props, 03429 const char *propname, 03430 const char *target, 03431 const svn_opt_revision_t *peg_revision, 03432 const svn_opt_revision_t *revision, 03433 svn_boolean_t recurse, 03434 svn_client_ctx_t *ctx, 03435 apr_pool_t *pool); 03436 03437 /** 03438 * Similar to svn_client_propget2(), except that @a peg_revision is 03439 * always the same as @a revision. 03440 * 03441 * @deprecated Provided for backward compatibility with the 1.1 API. 03442 */ 03443 svn_error_t * 03444 svn_client_propget(apr_hash_t **props, 03445 const char *propname, 03446 const char *target, 03447 const svn_opt_revision_t *revision, 03448 svn_boolean_t recurse, 03449 svn_client_ctx_t *ctx, 03450 apr_pool_t *pool); 03451 03452 /** Set @a *propval to the value of @a propname on revision @a revision 03453 * in the repository represented by @a URL. Use the authentication baton 03454 * in @a ctx for authentication, and @a pool for all memory allocation. 03455 * Return the actual rev queried in @a *set_rev. 03456 * 03457 * Note that unlike its cousin svn_client_propget(), this routine 03458 * doesn't affect the working copy at all; it's a pure network 03459 * operation that queries an *unversioned* property attached to a 03460 * revision. This can query log messages, dates, authors, and the 03461 * like. 03462 */ 03463 svn_error_t * 03464 svn_client_revprop_get(const char *propname, 03465 svn_string_t **propval, 03466 const char *URL, 03467 const svn_opt_revision_t *revision, 03468 svn_revnum_t *set_rev, 03469 svn_client_ctx_t *ctx, 03470 apr_pool_t *pool); 03471 03472 /** 03473 * Invoke @a receiver with @a receiver_baton to return the regular properies 03474 * of @a target, a URL or working copy path. @a receiver will be called 03475 * for each path encountered. 03476 * 03477 * If @a revision->kind is @c svn_opt_revision_unspecified, then get 03478 * properties from the working copy, if @a target is a working copy 03479 * path, or from the repository head if @a target is a URL. Else get 03480 * the properties as of @a revision. The actual node revision 03481 * selected is determined by the path as it exists in @a peg_revision. 03482 * If @a peg_revision->kind is @c svn_opt_revision_unspecified, then it 03483 * defaults to @c svn_opt_revision_head for URLs or @c 03484 * svn_opt_revision_working for WC targets. Use the authentication 03485 * baton cached in @a ctx for authentication if contacting the 03486 * repository. 03487 * 03488 * If @a depth is @c svn_depth_empty, list only the properties of 03489 * @a path_or_url itself. If @a depth is @c svn_depth_files, and 03490 * @a path_or_url is a directory, list the properties of @a path_or_url 03491 * and its file entries. If @c svn_depth_immediates, list the properties 03492 * of its immediate file and directory entries. If @c svn_depth_infinity, 03493 * list the properties of its file entries and recurse (with 03494 * @c svn_depth_infinity) on directory entries. @c svn_depth_unknown is 03495 * equivalent to @c svn_depth_empty. All other values produce undefined 03496 * results. 03497 * 03498 * @a changelists is an array of <tt>const char *</tt> changelist 03499 * names, used as a restrictive filter on items whose properties are 03500 * set; that is, don't set properties on any item unless it's a member 03501 * of one of those changelists. If @a changelists is empty (or 03502 * altogether @c NULL), no changelist filtering occurs. 03503 * 03504 * If @a target is not found, return the error @c SVN_ERR_ENTRY_NOT_FOUND. 03505 * 03506 * @since New in 1.5. 03507 */ 03508 svn_error_t * 03509 svn_client_proplist3(const char *target, 03510 const svn_opt_revision_t *peg_revision, 03511 const svn_opt_revision_t *revision, 03512 svn_depth_t depth, 03513 const apr_array_header_t *changelists, 03514 svn_proplist_receiver_t receiver, 03515 void *receiver_baton, 03516 svn_client_ctx_t *ctx, 03517 apr_pool_t *pool); 03518 03519 /** 03520 * Similar to svn_client_proplist3(), except the properties are 03521 * returned as an array of @c svn_client_proplist_item_t * structures 03522 * instead of by invoking the receiver function, there's no support 03523 * for @a changelists filtering, and @a recurse is used instead of a 03524 * @c svn_depth_t parameter (FALSE corresponds to @c svn_depth_empty, 03525 * and TRUE to @c svn_depth_infinity). 03526 * 03527 * @since New in 1.2. 03528 * 03529 * @deprecated Provided for backward compatiblility with the 1.2 API. 03530 */ 03531 svn_error_t * 03532 svn_client_proplist2(apr_array_header_t **props, 03533 const char *target, 03534 const svn_opt_revision_t *peg_revision, 03535 const svn_opt_revision_t *revision, 03536 svn_boolean_t recurse, 03537 svn_client_ctx_t *ctx, 03538 apr_pool_t *pool); 03539 03540 /** 03541 * Similar to svn_client_proplist2(), except that @a peg_revision is 03542 * always the same as @a revision. 03543 * 03544 * @deprecated Provided for backward compatibility with the 1.1 API. 03545 */ 03546 svn_error_t * 03547 svn_client_proplist(apr_array_header_t **props, 03548 const char *target, 03549 const svn_opt_revision_t *revision, 03550 svn_boolean_t recurse, 03551 svn_client_ctx_t *ctx, 03552 apr_pool_t *pool); 03553 03554 /** Set @a *props to a hash of the revision props attached to @a revision in 03555 * the repository represented by @a URL. Use the authentication baton cached 03556 * in @a ctx for authentication, and @a pool for all memory allocation. 03557 * Return the actual rev queried in @a *set_rev. 03558 * 03559 * The allocated hash maps (<tt>const char *</tt>) property names to 03560 * (@c svn_string_t *) property values. 03561 * 03562 * Note that unlike its cousin svn_client_proplist(), this routine 03563 * doesn't read a working copy at all; it's a pure network operation 03564 * that reads *unversioned* properties attached to a revision. 03565 */ 03566 svn_error_t * 03567 svn_client_revprop_list(apr_hash_t **props, 03568 const char *URL, 03569 const svn_opt_revision_t *revision, 03570 svn_revnum_t *set_rev, 03571 svn_client_ctx_t *ctx, 03572 apr_pool_t *pool); 03573 /** @} */ 03574 03575 03576 /** 03577 * @defgroup Export Export a tree from version control. 03578 * 03579 * @{ 03580 */ 03581 03582 /** 03583 * Export the contents of either a subversion repository or a 03584 * subversion working copy into a 'clean' directory (meaning a 03585 * directory with no administrative directories). If @a result_rev 03586 * is not @c NULL and the path being exported is a repository URL, set 03587 * @a *result_rev to the value of the revision actually exported (set 03588 * it to @c SVN_INVALID_REVNUM for local exports). 03589 * 03590 * @a from is either the path the working copy on disk, or a URL to the 03591 * repository you wish to export. 03592 * 03593 * @a to is the path to the directory where you wish to create the exported 03594 * tree. 03595 * 03596 * @a peg_revision is the revision where the path is first looked up 03597 * when exporting from a repository. If @a peg_revision->kind is @c 03598 * svn_opt_revision_unspecified, then it defaults to @c svn_opt_revision_head 03599 * for URLs or @c svn_opt_revision_working for WC targets. 03600 * 03601 * @a revision is the revision that should be exported, which is only used 03602 * when exporting from a repository. 03603 * 03604 * @a ctx->notify_func2 and @a ctx->notify_baton2 are the notification 03605 * functions and baton which are passed to svn_client_checkout() when 03606 * exporting from a repository. 03607 * 03608 * @a ctx is a context used for authentication in the repository case. 03609 * 03610 * @a overwrite if TRUE will cause the export to overwrite files or directories. 03611 * 03612 * If @a ignore_externals is set, don't process externals definitions 03613 * as part of this operation. 03614 * 03615 * @a native_eol allows you to override the standard eol marker on the platform 03616 * you are running on. Can be either "LF", "CR" or "CRLF" or NULL. If NULL 03617 * will use the standard eol marker. Any other value will cause the 03618 * SVN_ERR_IO_UNKNOWN_EOL error to be returned. 03619 * 03620 * If @a depth is @c svn_depth_infinity, export fully recursively. 03621 * Else if it is @c svn_depth_immediates, export @a from and its immediate 03622 * children (if any), but with subdirectories empty and at 03623 * @c svn_depth_empty. Else if @c svn_depth_files, export @a from and 03624 * its immediate file children (if any) only. If @a depth is @c 03625 * svn_depth_empty, then export exactly @a from and none of its children. 03626 * 03627 * If @a recurse is TRUE, export recursively. Otherwise, export 03628 * just the directory represented by @a from and its immediate 03629 * non-directory children, but none of its child directories (if any). 03630 * Also, if @a recurse is FALSE, the export will behave as if 03631 * @a ignore_externals is TRUE. 03632 * 03633 * All allocations are done in @a pool. 03634 * 03635 * @since New in 1.5. 03636 */ 03637 svn_error_t * 03638 svn_client_export4(svn_revnum_t *result_rev, 03639 const char *from, 03640 const char *to, 03641 const svn_opt_revision_t *peg_revision, 03642 const svn_opt_revision_t *revision, 03643 svn_boolean_t overwrite, 03644 svn_boolean_t ignore_externals, 03645 svn_depth_t depth, 03646 const char *native_eol, 03647 svn_client_ctx_t *ctx, 03648 apr_pool_t *pool); 03649 03650 03651 /** 03652 * Similar to svn_client_export4(), but with @a depth set according to 03653 * @a recurse: if @a recurse is TRUE, set @a depth to 03654 * @c svn_depth_infinity, if @a recurse is FALSE, set @a depth to 03655 * @c svn_depth_files. 03656 * 03657 * @deprecated Provided for backward compatibility with the 1.4 API. 03658 * 03659 * @since New in 1.2. 03660 */ 03661 svn_error_t * 03662 svn_client_export3(svn_revnum_t *result_rev, 03663 const char *from, 03664 const char *to, 03665 const svn_opt_revision_t *peg_revision, 03666 const svn_opt_revision_t *revision, 03667 svn_boolean_t overwrite, 03668 svn_boolean_t ignore_externals, 03669 svn_boolean_t recurse, 03670 const char *native_eol, 03671 svn_client_ctx_t *ctx, 03672 apr_pool_t *pool); 03673 03674 03675 /** 03676 * Similar to svn_client_export3(), but with @a peg_revision 03677 * always set to @c svn_opt_revision_unspecified, @a overwrite set to 03678 * the value of @a force, @a ignore_externals always FALSE, and 03679 * @a recurse always TRUE. 03680 * 03681 * @since New in 1.1. 03682 * @deprecated Provided for backward compatibility with the 1.1 API. 03683 */ 03684 svn_error_t * 03685 svn_client_export2(svn_revnum_t *result_rev, 03686 const char *from, 03687 const char *to, 03688 svn_opt_revision_t *revision, 03689 svn_boolean_t force, 03690 const char *native_eol, 03691 svn_client_ctx_t *ctx, 03692 apr_pool_t *pool); 03693 03694 03695 /** 03696 * Similar to svn_client_export2(), but with @a native_eol always set 03697 * to NULL. 03698 * 03699 * @deprecated Provided for backward compatibility with the 1.0 API. 03700 */ 03701 svn_error_t * 03702 svn_client_export(svn_revnum_t *result_rev, 03703 const char *from, 03704 const char *to, 03705 svn_opt_revision_t *revision, 03706 svn_boolean_t force, 03707 svn_client_ctx_t *ctx, 03708 apr_pool_t *pool); 03709 03710 /** @} */ 03711 03712 /** 03713 * @defgroup List List / ls 03714 * 03715 * @{ 03716 */ 03717 03718 /** Invoked by svn_client_list2() for each @a path with its @a dirent and, 03719 * if @a path is locked, its @a lock. @a abs_path is the filesystem path 03720 * to which @a path is relative. @a baton is the baton passed to the 03721 * caller. @a pool may be used for temporary allocations. 03722 * 03723 * @since New in 1.4. 03724 */ 03725 typedef svn_error_t *(*svn_client_list_func_t)(void *baton, 03726 const char *path, 03727 const svn_dirent_t *dirent, 03728 const svn_lock_t *lock, 03729 const char *abs_path, 03730 apr_pool_t *pool); 03731 03732 /** 03733 * Report the directory entry, and possibly children, for @a 03734 * path_or_url at @a revision. The actual node revision selected is 03735 * determined by the path as it exists in @a peg_revision. If @a 03736 * peg_revision->kind is @c svn_opt_revision_unspecified, then it defaults 03737 * to @c svn_opt_revision_head for URLs or @c svn_opt_revision_working 03738 * for WC targets. 03739 * 03740 * Report directory entries by invoking @a list_func/@a baton with @a path 03741 * relative to @a path_or_url. The dirent for @a path_or_url is reported 03742 * using an empty @a path. If @a path_or_url is a directory, also report 03743 * its children. If @a path_or_url is non-existent, return 03744 * @c SVN_ERR_FS_NOT_FOUND. 03745 * 03746 * If @a fetch_locks is TRUE, include locks when reporting directory entries. 03747 * 03748 * Use @a pool for temporary allocations. 03749 * 03750 * Use authentication baton cached in @a ctx to authenticate against the 03751 * repository. 03752 * 03753 * If @a depth is @c svn_depth_empty, list just @a path_or_url itself. 03754 * If @a depth is @c svn_depth_files, list @a path_or_url and its file 03755 * entries. If @c svn_depth_immediates, list its immediate file and 03756 * directory entries. If @c svn_depth_infinity, list file entries and 03757 * recurse (with @c svn_depth_infinity) on directory entries. 03758 * 03759 * @a dirent_fields controls which fields in the @c svn_dirent_t's are 03760 * filled in. To have them totally filled in use @c SVN_DIRENT_ALL, 03761 * otherwise simply bitwise OR together the combination of @c SVN_DIRENT_ 03762 * fields you care about. 03763 * 03764 * @since New in 1.5. 03765 */ 03766 svn_error_t * 03767 svn_client_list2(const char *path_or_url, 03768 const svn_opt_revision_t *peg_revision, 03769 const svn_opt_revision_t *revision, 03770 svn_depth_t depth, 03771 apr_uint32_t dirent_fields, 03772 svn_boolean_t fetch_locks, 03773 svn_client_list_func_t list_func, 03774 void *baton, 03775 svn_client_ctx_t *ctx, 03776 apr_pool_t *pool); 03777 03778 /** 03779 * Similar to svn_client_list2(), but with @a recurse instead of @a depth. 03780 * If @a recurse is TRUE, pass @c svn_depth_files for @a depth; else 03781 * pass @c svn_depth_infinity. 03782 * 03783 * @since New in 1.4. 03784 * 03785 * @deprecated Provided for backward compatibility with the 1.4 API. 03786 */ 03787 svn_error_t * 03788 svn_client_list(const char *path_or_url, 03789 const svn_opt_revision_t *peg_revision, 03790 const svn_opt_revision_t *revision, 03791 svn_boolean_t recurse, 03792 apr_uint32_t dirent_fields, 03793 svn_boolean_t fetch_locks, 03794 svn_client_list_func_t list_func, 03795 void *baton, 03796 svn_client_ctx_t *ctx, 03797 apr_pool_t *pool); 03798 03799 /** 03800 * Same as svn_client_list(), but always passes @c SVN_DIRENT_ALL for 03801 * the @a dirent_fields argument and returns all information in two 03802 * hash tables instead of invoking a callback. 03803 * 03804 * Set @a *dirents to a newly allocated hash of directory entries. 03805 * The @a dirents hash maps entry names (<tt>const char *</tt>) to 03806 * @c svn_dirent_t *'s. 03807 * 03808 * If @a locks is not @c NULL, set @a *locks to a hash table mapping 03809 * entry names (<tt>const char *</tt>) to @c svn_lock_t *'s. 03810 * 03811 * @since New in 1.3. 03812 * 03813 * @deprecated Provided for backward compatibility with the 1.3 API. 03814 */ 03815 svn_error_t * 03816 svn_client_ls3(apr_hash_t **dirents, 03817 apr_hash_t **locks, 03818 const char *path_or_url, 03819 const svn_opt_revision_t *peg_revision, 03820 const svn_opt_revision_t *revision, 03821 svn_boolean_t recurse, 03822 svn_client_ctx_t *ctx, 03823 apr_pool_t *pool); 03824 03825 /** 03826 * Same as svn_client_ls3(), but without the ability to get locks. 03827 * 03828 * @since New in 1.2. 03829 * 03830 * @deprecated Provided for backward compatibility with the 1.2 API. 03831 */ 03832 svn_error_t * 03833 svn_client_ls2(apr_hash_t **dirents, 03834 const char *path_or_url, 03835 const svn_opt_revision_t *peg_revision, 03836 const svn_opt_revision_t *revision, 03837 svn_boolean_t recurse, 03838 svn_client_ctx_t *ctx, 03839 apr_pool_t *pool); 03840 03841 /** 03842 * Similar to svn_client_ls2() except that @a peg_revision is always 03843 * the same as @a revision. 03844 * 03845 * @deprecated Provided for backward compatibility with the 1.1 API. 03846 */ 03847 svn_error_t * 03848 svn_client_ls(apr_hash_t **dirents, 03849 const char *path_or_url, 03850 svn_opt_revision_t *revision, 03851 svn_boolean_t recurse, 03852 svn_client_ctx_t *ctx, 03853 apr_pool_t *pool); 03854 03855 03856 /** @} */ 03857 03858 /** 03859 * @defgroup Cat View the contents of a file in the repository. 03860 * 03861 * @{ 03862 */ 03863 03864 /** 03865 * Output the content of file identified by @a path_or_url and @a 03866 * revision to the stream @a out. The actual node revision selected 03867 * is determined by the path as it exists in @a peg_revision. If @a 03868 * peg_revision->kind is @c svn_opt_revision_unspecified, then it defaults 03869 * to @c svn_opt_revision_head for URLs or @c svn_opt_revision_working 03870 * for WC targets. 03871 * 03872 * If @a path_or_url is not a local path, then if @a revision is of 03873 * kind @c svn_opt_revision_previous (or some other kind that requires 03874 * a local path), an error will be returned, because the desired 03875 * revision cannot be determined. 03876 * 03877 * Use the authentication baton cached in @a ctx to authenticate against the 03878 * repository. 03879 * 03880 * Perform all allocations from @a pool. 03881 * 03882 * ### @todo Add an expansion/translation flag? 03883 * 03884 * @since New in 1.2. 03885 */ 03886 svn_error_t * 03887 svn_client_cat2(svn_stream_t *out, 03888 const char *path_or_url, 03889 const svn_opt_revision_t *peg_revision, 03890 const svn_opt_revision_t *revision, 03891 svn_client_ctx_t *ctx, 03892 apr_pool_t *pool); 03893 03894 03895 /** 03896 * Similar to svn_client_cat2() except that the peg revision is always 03897 * the same as @a revision. 03898 * 03899 * @deprecated Provided for backward compatibility with the 1.1 API. 03900 */ 03901 svn_error_t * 03902 svn_client_cat(svn_stream_t *out, 03903 const char *path_or_url, 03904 const svn_opt_revision_t *revision, 03905 svn_client_ctx_t *ctx, 03906 apr_pool_t *pool); 03907 03908 /** @} end group: cat */ 03909 03910 03911 03912 /** Changelist commands 03913 * 03914 * @defgroup svn_client_changelist_funcs Client Changelist Functions 03915 * @{ 03916 */ 03917 03918 /** Implementation note: 03919 * 03920 * For now, changelists are implemented by scattering the 03921 * associations across multiple .svn/entries files in a working copy. 03922 * However, this client API was written so that we have the option of 03923 * changing the underlying implementation -- we may someday want to 03924 * store changelist definitions in a centralized database. 03925 */ 03926 03927 /** 03928 * Add each path in @a paths (recursing to @a depth as necessary) to 03929 * @a changelist. If a path is already a member of another 03930 * changelist, then remove it from the other changelist and add it to 03931 * @a changelist. (For now, a path cannot belong to two changelists 03932 * at once.) 03933 * 03934 * @a changelists is an array of <tt>const char *</tt> changelist 03935 * names, used as a restrictive filter on items whose changelist 03936 * assignments are adjusted; that is, don't tweak the changeset of any 03937 * item unless it's currently a member of one of those changelists. 03938 * If @a changelists is empty (or altogether @c NULL), no changelist 03939 * filtering occurs. 03940 * 03941 * @note This metadata is purely a client-side "bookkeeping" 03942 * convenience, and is entirely managed by the working copy. 03943 * 03944 * @since New in 1.5. 03945 */ 03946 svn_error_t * 03947 svn_client_add_to_changelist(const apr_array_header_t *paths, 03948 const char *changelist, 03949 svn_depth_t depth, 03950 const apr_array_header_t *changelists, 03951 svn_client_ctx_t *ctx, 03952 apr_pool_t *pool); 03953 03954 /** 03955 * Remove each path in @a paths (recursing to @a depth as necessary) 03956 * from changelists to which they are currently assigned. 03957 * 03958 * @a changelists is an array of <tt>const char *</tt> changelist 03959 * names, used as a restrictive filter on items whose changelist 03960 * assignments are removed; that is, don't remove from a changeset any 03961 * item unless it's currently a member of one of those changelists. 03962 * If @a changelists is empty (or altogether @c NULL), all changelist 03963 * assignments in and under each path in @a paths (to @a depth) will 03964 * be removed. 03965 * 03966 * @note This metadata is purely a client-side "bookkeeping" 03967 * convenience, and is entirely managed by the working copy. 03968 * 03969 * @since New in 1.5. 03970 */ 03971 svn_error_t * 03972 svn_client_remove_from_changelists(const apr_array_header_t *paths, 03973 svn_depth_t depth, 03974 const apr_array_header_t *changelists, 03975 svn_client_ctx_t *ctx, 03976 apr_pool_t *pool); 03977 03978 /** 03979 * The callback type used by @a svn_client_get_changelist 03980 * 03981 * On each invocation, @a path is a newly discovered member of the 03982 * changelist, and @a baton is a private function closure. 03983 * 03984 * @since New in 1.5. 03985 */ 03986 typedef svn_error_t *(*svn_changelist_receiver_t) (void *baton, 03987 const char *path, 03988 const char *changelist, 03989 apr_pool_t *pool); 03990 03991 /** 03992 * Beginning at @a path, crawl to @a depth to discover every path in 03993 * or under @a path which belongs to one of the changelists in @a 03994 * changelists (an array of <tt>const char *</tt> changelist names). 03995 * If @a changelists is @c null, discover paths with any changelist. 03996 * Call @a callback_func (with @a callback_baton) each time a 03997 * changelist-having path is discovered. 03998 * 03999 * If @a ctx->cancel_func is not @c null, invoke it passing @a 04000 * ctx->cancel_baton during the recursive walk. 04001 * 04002 * @since New in 1.5. 04003 */ 04004 svn_error_t * 04005 svn_client_get_changelists(const char *path, 04006 const apr_array_header_t *changelists, 04007 svn_depth_t depth, 04008 svn_changelist_receiver_t callback_func, 04009 void *callback_baton, 04010 svn_client_ctx_t *ctx, 04011 apr_pool_t *pool); 04012 04013 /** @} */ 04014 04015 04016 04017 /** Locking commands 04018 * 04019 * @defgroup svn_client_locking_funcs Client Locking Functions 04020 * @{ 04021 */ 04022 04023 /** 04024 * Lock @a targets in the repository. @a targets is an array of 04025 * <tt>const char *</tt> paths - either all working copy paths or URLs. All 04026 * @a targets must be in the same repository. 04027 * 04028 * If a target is already locked in the repository, no lock will be 04029 * acquired unless @a steal_lock is TRUE, in which case the locks are 04030 * stolen. @a comment, if non-NULL, is an xml-escapable description 04031 * stored with each lock in the repository. Each acquired lock will 04032 * be stored in the working copy if the targets are WC paths. 04033 * 04034 * For each target @a ctx->notify_func2/notify_baton2 will be used to indicate 04035 * whether it was locked. An action of @c svn_wc_notify_state_locked 04036 * means that the path was locked. If the path was not locked because 04037 * it was out of date or there was already a lock in the repository, 04038 * the notification function will be called with @c 04039 * svn_wc_notify_failed_lock, and the error passed in the notification 04040 * structure. 04041 * 04042 * Use @a pool for temporary allocations. 04043 * 04044 * @since New in 1.2. 04045 */ 04046 svn_error_t * 04047 svn_client_lock(const apr_array_header_t *targets, 04048 const char *comment, 04049 svn_boolean_t steal_lock, 04050 svn_client_ctx_t *ctx, 04051 apr_pool_t *pool); 04052 04053 /** 04054 * Unlock @a targets in the repository. @a targets is an array of 04055 * <tt>const char *</tt> paths - either all working copy paths or all URLs. 04056 * All @a targets must be in the same repository. 04057 * 04058 * If the targets are WC paths, and @a break_lock is FALSE, the working 04059 * copy must contain a locks for each target. 04060 * If this is not the case, or the working copy lock doesn't match the 04061 * lock token in the repository, an error will be signaled. 04062 * 04063 * If the targets are URLs, the locks may be broken even if @a break_lock 04064 * is FALSE, but only if the lock owner is the same as the 04065 * authenticated user. 04066 * 04067 * If @a break_lock is TRUE, the locks will be broken in the 04068 * repository. In both cases, the locks, if any, will be removed from 04069 * the working copy if the targets are WC paths. 04070 * 04071 * The notification functions in @a ctx will be called for each 04072 * target. If the target was successfully unlocked, @c 04073 * svn_wc_notify_unlocked will be used. Else, if the error is 04074 * directly related to unlocking the path (see @c 04075 * SVN_ERR_IS_UNLOCK_ERROR), @c svn_wc_notify_failed_unlock will be 04076 * used and the error will be passed in the notification structure. 04077 04078 * Use @a pool for temporary allocations. 04079 * 04080 * @since New in 1.2. 04081 */ 04082 svn_error_t * 04083 svn_client_unlock(const apr_array_header_t *targets, 04084 svn_boolean_t break_lock, 04085 svn_client_ctx_t *ctx, 04086 apr_pool_t *pool); 04087 04088 /** @} */ 04089 04090 /** 04091 * @defgroup Info Show repository information about a working copy. 04092 * 04093 * @{ 04094 */ 04095 04096 /** The size of the file is unknown. 04097 * 04098 * @since New in 1.5 04099 */ 04100 #define SVN_INFO_SIZE_UNKNOWN ((apr_size_t) -1) 04101 04102 /** 04103 * A structure which describes various system-generated metadata about 04104 * a working-copy path or URL. 04105 * 04106 * @note Fields may be added to the end of this structure in future 04107 * versions. Therefore, users shouldn't allocate structures of this 04108 * type, to preserve binary compatibility. 04109 * 04110 * @since New in 1.2. 04111 */ 04112 typedef struct svn_info_t 04113 { 04114 /** Where the item lives in the repository. */ 04115 const char *URL; 04116 04117 /** The revision of the object. If path_or_url is a working-copy 04118 * path, then this is its current working revnum. If path_or_url 04119 * is a URL, then this is the repos revision that path_or_url lives in. */ 04120 svn_revnum_t rev; 04121 04122 /** The node's kind. */ 04123 svn_node_kind_t kind; 04124 04125 /** The root URL of the repository. */ 04126 const char *repos_root_URL; 04127 04128 /** The repository's UUID. */ 04129 const char *repos_UUID; 04130 04131 /** The last revision in which this object changed. */ 04132 svn_revnum_t last_changed_rev; 04133 04134 /** The date of the last_changed_rev. */ 04135 apr_time_t last_changed_date; 04136 04137 /** The author of the last_changed_rev. */ 04138 const char *last_changed_author; 04139 04140 /** An exclusive lock, if present. Could be either local or remote. */ 04141 svn_lock_t *lock; 04142 04143 /** Whether or not to ignore the next 10 wc-specific fields. */ 04144 svn_boolean_t has_wc_info; 04145 04146 /** 04147 * @name Working-copy path fields 04148 * These things only apply to a working-copy path. 04149 * See svn_wc_entry_t for explanations. 04150 * @{ 04151 */ 04152 svn_wc_schedule_t schedule; 04153 const char *copyfrom_url; 04154 svn_revnum_t copyfrom_rev; 04155 apr_time_t text_time; 04156 apr_time_t prop_time; 04157 const char *checksum; 04158 const char *conflict_old; 04159 const char *conflict_new; 04160 const char *conflict_wrk; 04161 const char *prejfile; 04162 /** @since New in 1.5. */ 04163 const char *changelist; 04164 /** @since New in 1.5. */ 04165 svn_depth_t depth; 04166 04167 /** 04168 * The size of the file after being translated into its local 04169 * representation, or @c SVN_INFO_SIZE_UNKNOWN if 04170 * unknown. Not applicable for directories. 04171 * @since New in 1.5. 04172 */ 04173 apr_size_t working_size; 04174 /** @} */ 04175 04176 /** 04177 * The size of the file in the repository (untranslated, 04178 * e.g. without adjustment of line endings and keyword 04179 * expansion). Only applicable for file -- not directory -- URLs. 04180 * For working copy paths, size will be @c SVN_INFO_SIZE_UNKNOWN. 04181 * @since New in 1.5. 04182 */ 04183 apr_size_t size; 04184 04185 } svn_info_t; 04186 04187 04188 /** 04189 * The callback invoked by svn_client_info2(). Each invocation 04190 * describes @a path with the information present in @a info. Note 04191 * that any fields within @a info may be NULL if information is 04192 * unavailable. Use @a pool for all temporary allocation. 04193 * 04194 * @since New in 1.2. 04195 */ 04196 typedef svn_error_t *(*svn_info_receiver_t) 04197 (void *baton, 04198 const char *path, 04199 const svn_info_t *info, 04200 apr_pool_t *pool); 04201 04202 /** 04203 * Return a duplicate of @a info, allocated in @a pool. No part of the new 04204 * structure will be shared with @a info. 04205 * 04206 * @since New in 1.3. 04207 */ 04208 svn_info_t * 04209 svn_info_dup(const svn_info_t *info, apr_pool_t *pool); 04210 04211 /** 04212 * Invoke @a receiver with @a receiver_baton to return information 04213 * about @a path_or_url in @a revision. The information returned is 04214 * system-generated metadata, not the sort of "property" metadata 04215 * created by users. See @c svn_info_t. 04216 * 04217 * If both revision arguments are either @c 04218 * svn_opt_revision_unspecified or NULL, then information will be 04219 * pulled solely from the working copy; no network connections will be 04220 * made. 04221 * 04222 * Otherwise, information will be pulled from a repository. The 04223 * actual node revision selected is determined by the @a path_or_url 04224 * as it exists in @a peg_revision. If @a peg_revision->kind is @c 04225 * svn_opt_revision_unspecified, then it defaults to @c 04226 * svn_opt_revision_head for URLs or @c svn_opt_revision_working for 04227 * WC targets. 04228 * 04229 * If @a path_or_url is not a local path, then if @a revision is of 04230 * kind @c svn_opt_revision_previous (or some other kind that requires 04231 * a local path), an error will be returned, because the desired 04232 * revision cannot be determined. 04233 * 04234 * Use the authentication baton cached in @a ctx to authenticate 04235 * against the repository. 04236 * 04237 * If @a path_or_url is a file, just invoke @a receiver on it. If it 04238 * is a directory, then descend according to @a depth. If @a depth is 04239 * @c svn_depth_empty, invoke @a receiver on @a path_or_url and 04240 * nothing else; if @c svn_depth_files, on @a path_or_url and its 04241 * immediate file children; if @c svn_depth_immediates, the preceding 04242 * plus on each immediate subdirectory; if @c svn_depth_infinity, then 04243 * recurse fully, invoking @a receiver on @a path_or_url and 04244 * everything beneath it. 04245 * 04246 * @a changelists is an array of <tt>const char *</tt> changelist 04247 * names, used as a restrictive filter on items whose info is 04248 * reported; that is, don't report info about any item unless 04249 * it's a member of one of those changelists. If @a changelists is 04250 * empty (or altogether @c NULL), no changelist filtering occurs. 04251 * 04252 * @since New in 1.5. 04253 */ 04254 svn_error_t * 04255 svn_client_info2(const char *path_or_url, 04256 const svn_opt_revision_t *peg_revision, 04257 const svn_opt_revision_t *revision, 04258 svn_info_receiver_t receiver, 04259 void *receiver_baton, 04260 svn_depth_t depth, 04261 const apr_array_header_t *changelists, 04262 svn_client_ctx_t *ctx, 04263 apr_pool_t *pool); 04264 04265 /** 04266 * Similar to svn_client_info2() but with @a changelists passed as @c 04267 * NULL, and @a depth set according to @a recurse: if @a recurse is 04268 * TRUE, @a depth is @c svn_depth_infinity, else @c svn_depth_empty. 04269 * 04270 * @deprecated Provided for backward compatibility with the 1.2 API. 04271 */ 04272 svn_error_t * 04273 svn_client_info(const char *path_or_url, 04274 const svn_opt_revision_t *peg_revision, 04275 const svn_opt_revision_t *revision, 04276 svn_info_receiver_t receiver, 04277 void *receiver_baton, 04278 svn_boolean_t recurse, 04279 svn_client_ctx_t *ctx, 04280 apr_pool_t *pool); 04281 04282 /** @} */ 04283 04284 /** @} end group: Client working copy management */ 04285 04286 /** 04287 * 04288 * @defgroup clnt_sessions Client session related functions 04289 * 04290 * @{ 04291 * 04292 */ 04293 04294 04295 /* Converting paths to URLs. */ 04296 04297 /** Set @a *url to the URL for @a path_or_url. 04298 * 04299 * If @a path_or_url is already a URL, set @a *url to @a path_or_url. 04300 * 04301 * If @a path_or_url is a versioned item, set @a *url to @a 04302 * path_or_url's entry URL. If @a path_or_url is unversioned (has 04303 * no entry), set @a *url to NULL. 04304 */ 04305 svn_error_t * 04306 svn_client_url_from_path(const char **url, 04307 const char *path_or_url, 04308 apr_pool_t *pool); 04309 04310 04311 /** Set @a *url to the repository root URL of the repository in which 04312 * @a path_or_url is versioned (or scheduled to be versioned), 04313 * allocated in @a pool. @a ctx is required for possible repository 04314 * authentication. 04315 * 04316 * @since New in 1.5. 04317 */ 04318 svn_error_t * 04319 svn_client_root_url_from_path(const char **url, 04320 const char *path_or_url, 04321 svn_client_ctx_t *ctx, 04322 apr_pool_t *pool); 04323 04324 04325 04326 /* Fetching repository UUIDs. */ 04327 04328 /** Get repository @a uuid for @a url. 04329 * 04330 * Use a @a pool to open a temporary RA session to @a url, discover the 04331 * repository uuid, and free the session. Return the uuid in @a uuid, 04332 * allocated in @a pool. @a ctx is required for possible repository 04333 * authentication. 04334 */ 04335 svn_error_t * 04336 svn_client_uuid_from_url(const char **uuid, 04337 const char *url, 04338 svn_client_ctx_t *ctx, 04339 apr_pool_t *pool); 04340 04341 04342 /** Return the repository @a uuid for working-copy @a path, allocated 04343 * in @a pool. Use @a adm_access to retrieve the uuid from @a path's 04344 * entry; if not present in the entry, then call 04345 * svn_client_uuid_from_url() to retrieve, using the entry's URL. @a 04346 * ctx is required for possible repository authentication. 04347 * 04348 * @note The only reason this function falls back on 04349 * svn_client_uuid_from_url() is for compatibility purposes. Old 04350 * working copies may not have uuids in the entries file. 04351 */ 04352 svn_error_t * 04353 svn_client_uuid_from_path(const char **uuid, 04354 const char *path, 04355 svn_wc_adm_access_t *adm_access, 04356 svn_client_ctx_t *ctx, 04357 apr_pool_t *pool); 04358 04359 04360 /* Opening RA sessions. */ 04361 04362 /** Open an RA session rooted at @a url, and return it in @a *session. 04363 * 04364 * Use the authentication baton stored in @a ctx for authentication. 04365 * @a *session is allocated in @a pool. 04366 * 04367 * @since New in 1.3. 04368 * 04369 * @note This function is similar to svn_ra_open3(), but the caller avoids 04370 * having to providing its own callback functions. 04371 */ 04372 svn_error_t * 04373 svn_client_open_ra_session(svn_ra_session_t **session, 04374 const char *url, 04375 svn_client_ctx_t *ctx, 04376 apr_pool_t *pool); 04377 04378 04379 /** @} end group: Client session related functions */ 04380 04381 /** @} */ 04382 04383 #ifdef __cplusplus 04384 } 04385 #endif /* __cplusplus */ 04386 04387 #endif /* SVN_CLIENT_H */