00001 /** 00002 * @copyright 00003 * ==================================================================== 00004 * Licensed to the Apache Software Foundation (ASF) under one 00005 * or more contributor license agreements. See the NOTICE file 00006 * distributed with this work for additional information 00007 * regarding copyright ownership. The ASF licenses this file 00008 * to you under the Apache License, Version 2.0 (the 00009 * "License"); you may not use this file except in compliance 00010 * with the License. You may obtain a copy of the License at 00011 * 00012 * http://www.apache.org/licenses/LICENSE-2.0 00013 * 00014 * Unless required by applicable law or agreed to in writing, 00015 * software distributed under the License is distributed on an 00016 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 00017 * KIND, either express or implied. See the License for the 00018 * specific language governing permissions and limitations 00019 * under the License. 00020 * ==================================================================== 00021 * @endcopyright 00022 * 00023 * @file svn_client.h 00024 * @brief Subversion's client library 00025 * 00026 * Requires: The working copy library and repository access library. 00027 * Provides: Broad wrappers around working copy library functionality. 00028 * Used By: Client programs. 00029 */ 00030 00031 #ifndef SVN_CLIENT_H 00032 #define SVN_CLIENT_H 00033 00034 #include <apr.h> 00035 #include <apr_pools.h> 00036 #include <apr_hash.h> 00037 #include <apr_tables.h> 00038 #include <apr_getopt.h> 00039 #include <apr_file_io.h> 00040 #include <apr_time.h> 00041 00042 #include "svn_types.h" 00043 #include "svn_string.h" 00044 #include "svn_wc.h" 00045 #include "svn_opt.h" 00046 #include "svn_ra.h" 00047 #include "svn_diff.h" 00048 #include "svn_auth.h" 00049 00050 #ifdef __cplusplus 00051 extern "C" { 00052 #endif /* __cplusplus */ 00053 00054 00055 00056 /** 00057 * Get libsvn_client version information. 00058 * 00059 * @since New in 1.1. 00060 */ 00061 const svn_version_t * 00062 svn_client_version(void); 00063 00064 /** Client supporting functions 00065 * 00066 * @defgroup clnt_support Client supporting subsystem 00067 * 00068 * @{ 00069 */ 00070 00071 00072 /*** Authentication stuff ***/ 00073 00074 /** The new authentication system allows the RA layer to "pull" 00075 * information as needed from libsvn_client. 00076 * 00077 * @deprecated Replaced by the svn_auth_* functions. 00078 * @see auth_fns 00079 * 00080 * @defgroup auth_fns_depr (deprecated) AuthZ client subsystem 00081 * 00082 * @{ 00083 */ 00084 00085 /** Create and return @a *provider, an authentication provider of type 00086 * svn_auth_cred_simple_t that gets information by prompting the user 00087 * with @a prompt_func and @a prompt_baton. Allocate @a *provider in 00088 * @a pool. 00089 * 00090 * If both #SVN_AUTH_PARAM_DEFAULT_USERNAME and 00091 * #SVN_AUTH_PARAM_DEFAULT_PASSWORD are defined as runtime 00092 * parameters in the @c auth_baton, then @a *provider will return the 00093 * default arguments when svn_auth_first_credentials() is called. If 00094 * svn_auth_first_credentials() fails, then @a *provider will 00095 * re-prompt @a retry_limit times (via svn_auth_next_credentials()). 00096 * For infinite retries, set @a retry_limit to value less than 0. 00097 * 00098 * @deprecated Provided for backward compatibility with the 1.3 API. 00099 * Use svn_auth_get_simple_prompt_provider() instead. 00100 */ 00101 SVN_DEPRECATED 00102 void 00103 svn_client_get_simple_prompt_provider( 00104 svn_auth_provider_object_t **provider, 00105 svn_auth_simple_prompt_func_t prompt_func, 00106 void *prompt_baton, 00107 int retry_limit, 00108 apr_pool_t *pool); 00109 00110 00111 /** Create and return @a *provider, an authentication provider of type 00112 * #svn_auth_cred_username_t that gets information by prompting the 00113 * user with @a prompt_func and @a prompt_baton. Allocate @a *provider 00114 * in @a pool. 00115 * 00116 * If #SVN_AUTH_PARAM_DEFAULT_USERNAME is defined as a runtime 00117 * parameter in the @c auth_baton, then @a *provider will return the 00118 * default argument when svn_auth_first_credentials() is called. If 00119 * svn_auth_first_credentials() fails, then @a *provider will 00120 * re-prompt @a retry_limit times (via svn_auth_next_credentials()). 00121 * For infinite retries, set @a retry_limit to value less than 0. 00122 * 00123 * @deprecated Provided for backward compatibility with the 1.3 API. 00124 * Use svn_auth_get_username_prompt_provider() instead. 00125 */ 00126 SVN_DEPRECATED 00127 void 00128 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 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 00144 * #SVN_AUTH_PARAM_DEFAULT_USERNAME and #SVN_AUTH_PARAM_DEFAULT_PASSWORD). 00145 * 00146 * @deprecated Provided for backward compatibility with the 1.3 API. 00147 * Use svn_auth_get_simple_provider2() instead. 00148 */ 00149 SVN_DEPRECATED 00150 void 00151 svn_client_get_simple_provider(svn_auth_provider_object_t **provider, 00152 apr_pool_t *pool); 00153 00154 00155 #if (defined(WIN32) && !defined(__MINGW32__)) || defined(DOXYGEN) || defined(CTYPESGEN) || defined(SWIG) 00156 /** 00157 * Create and return @a *provider, an authentication provider of type 00158 * #svn_auth_cred_simple_t that gets/sets information from the user's 00159 * ~/.subversion configuration directory. Allocate @a *provider in 00160 * @a pool. 00161 * 00162 * This is like svn_client_get_simple_provider(), except that, when 00163 * running on Window 2000 or newer (or any other Windows version that 00164 * includes the CryptoAPI), the provider encrypts the password before 00165 * storing it to disk. On earlier versions of Windows, the provider 00166 * does nothing. 00167 * 00168 * @since New in 1.2. 00169 * @note This function is only available on Windows. 00170 * 00171 * @note An administrative password reset may invalidate the account's 00172 * secret key. This function will detect that situation and behave as 00173 * if the password were not cached at all. 00174 * 00175 * @deprecated Provided for backward compatibility with the 1.3 API. 00176 * Use svn_auth_get_windows_simple_provider() instead. 00177 */ 00178 SVN_DEPRECATED 00179 void 00180 svn_client_get_windows_simple_provider(svn_auth_provider_object_t **provider, 00181 apr_pool_t *pool); 00182 #endif /* WIN32 && !__MINGW32__ || DOXYGEN || CTYPESGEN || SWIG */ 00183 00184 /** Create and return @a *provider, an authentication provider of type 00185 * #svn_auth_cred_username_t that gets/sets information from a user's 00186 * ~/.subversion configuration directory. Allocate @a *provider in 00187 * @a pool. 00188 * 00189 * If a default username is available, @a *provider will honor it, 00190 * and return it when svn_auth_first_credentials() is called. (see 00191 * #SVN_AUTH_PARAM_DEFAULT_USERNAME). 00192 * 00193 * @deprecated Provided for backward compatibility with the 1.3 API. 00194 * Use svn_auth_get_username_provider() instead. 00195 */ 00196 SVN_DEPRECATED 00197 void 00198 svn_client_get_username_provider(svn_auth_provider_object_t **provider, 00199 apr_pool_t *pool); 00200 00201 00202 /** Create and return @a *provider, an authentication provider of type 00203 * #svn_auth_cred_ssl_server_trust_t, allocated in @a pool. 00204 * 00205 * @a *provider retrieves its credentials from the configuration 00206 * mechanism. The returned credential is used to override SSL 00207 * security on an error. 00208 * 00209 * @deprecated Provided for backward compatibility with the 1.3 API. 00210 * Use svn_auth_get_ssl_server_trust_file_provider() instead. 00211 */ 00212 SVN_DEPRECATED 00213 void 00214 svn_client_get_ssl_server_trust_file_provider( 00215 svn_auth_provider_object_t **provider, 00216 apr_pool_t *pool); 00217 00218 00219 /** Create and return @a *provider, an authentication provider of type 00220 * #svn_auth_cred_ssl_client_cert_t, allocated in @a pool. 00221 * 00222 * @a *provider retrieves its credentials from the configuration 00223 * mechanism. The returned credential is used to load the appropriate 00224 * client certificate for authentication when requested by a server. 00225 * 00226 * @deprecated Provided for backward compatibility with the 1.3 API. 00227 * Use svn_auth_get_ssl_client_cert_file_provider() instead. 00228 */ 00229 SVN_DEPRECATED 00230 void 00231 svn_client_get_ssl_client_cert_file_provider( 00232 svn_auth_provider_object_t **provider, 00233 apr_pool_t *pool); 00234 00235 00236 /** Create and return @a *provider, an authentication provider of type 00237 * #svn_auth_cred_ssl_client_cert_pw_t, allocated in @a pool. 00238 * 00239 * @a *provider retrieves its credentials from the configuration 00240 * mechanism. The returned credential is used when a loaded client 00241 * certificate is protected by a passphrase. 00242 * 00243 * @deprecated Provided for backward compatibility with the 1.3 API. 00244 * Use svn_auth_get_ssl_client_cert_pw_file_provider2() instead. 00245 */ 00246 SVN_DEPRECATED 00247 void 00248 svn_client_get_ssl_client_cert_pw_file_provider( 00249 svn_auth_provider_object_t **provider, 00250 apr_pool_t *pool); 00251 00252 00253 /** Create and return @a *provider, an authentication provider of type 00254 * #svn_auth_cred_ssl_server_trust_t, allocated in @a pool. 00255 * 00256 * @a *provider retrieves its credentials by using the @a prompt_func 00257 * and @a prompt_baton. The returned credential is used to override 00258 * SSL security on an error. 00259 * 00260 * @deprecated Provided for backward compatibility with the 1.3 API. 00261 * Use svn_auth_get_ssl_server_trust_prompt_provider() instead. 00262 */ 00263 SVN_DEPRECATED 00264 void 00265 svn_client_get_ssl_server_trust_prompt_provider( 00266 svn_auth_provider_object_t **provider, 00267 svn_auth_ssl_server_trust_prompt_func_t prompt_func, 00268 void *prompt_baton, 00269 apr_pool_t *pool); 00270 00271 00272 /** Create and return @a *provider, an authentication provider of type 00273 * #svn_auth_cred_ssl_client_cert_t, allocated in @a pool. 00274 * 00275 * @a *provider retrieves its credentials by using the @a prompt_func 00276 * and @a prompt_baton. The returned credential is used to load the 00277 * appropriate client certificate for authentication when requested by 00278 * a server. The prompt will be retried @a retry_limit times. 00279 * For infinite retries, set @a retry_limit to value less than 0. 00280 * 00281 * @deprecated Provided for backward compatibility with the 1.3 API. 00282 * Use svn_auth_get_ssl_client_cert_prompt_provider() instead. 00283 */ 00284 SVN_DEPRECATED 00285 void 00286 svn_client_get_ssl_client_cert_prompt_provider( 00287 svn_auth_provider_object_t **provider, 00288 svn_auth_ssl_client_cert_prompt_func_t prompt_func, 00289 void *prompt_baton, 00290 int retry_limit, 00291 apr_pool_t *pool); 00292 00293 00294 /** Create and return @a *provider, an authentication provider of type 00295 * #svn_auth_cred_ssl_client_cert_pw_t, allocated in @a pool. 00296 * 00297 * @a *provider retrieves its credentials by using the @a prompt_func 00298 * and @a prompt_baton. The returned credential is used when a loaded 00299 * client certificate is protected by a passphrase. The prompt will 00300 * be retried @a retry_limit times. For infinite retries, set @a retry_limit 00301 * to value less than 0. 00302 * 00303 * @deprecated Provided for backward compatibility with the 1.3 API. 00304 * Use svn_auth_get_ssl_client_cert_pw_prompt_provider() instead. 00305 */ 00306 SVN_DEPRECATED 00307 void 00308 svn_client_get_ssl_client_cert_pw_prompt_provider( 00309 svn_auth_provider_object_t **provider, 00310 svn_auth_ssl_client_cert_pw_prompt_func_t prompt_func, 00311 void *prompt_baton, 00312 int retry_limit, 00313 apr_pool_t *pool); 00314 00315 /** @} */ 00316 00317 /** 00318 * Revisions and Peg Revisions 00319 * 00320 * @defgroup clnt_revisions Revisions and Peg Revisions 00321 * 00322 * A brief word on operative and peg revisions. 00323 * 00324 * If the kind of the peg revision is #svn_opt_revision_unspecified, then it 00325 * defaults to #svn_opt_revision_head for URLs and #svn_opt_revision_working 00326 * for local paths. 00327 * 00328 * For deeper insight, please see the 00329 * <a href="http://svnbook.red-bean.com/nightly/en/svn.advanced.pegrevs.html"> 00330 * Peg and Operative Revisions</a> section of the Subversion Book. 00331 */ 00332 00333 /** 00334 * Commit operations 00335 * 00336 * @defgroup clnt_commit Client commit subsystem 00337 * 00338 * @{ 00339 */ 00340 00341 /** This is a structure which stores a filename and a hash of property 00342 * names and values. 00343 * 00344 * @deprecated Provided for backward compatibility with the 1.4 API. 00345 */ 00346 typedef struct svn_client_proplist_item_t 00347 { 00348 /** The name of the node on which these properties are set. */ 00349 svn_stringbuf_t *node_name; 00350 00351 /** A hash of (const char *) property names, and (svn_string_t *) property 00352 * values. */ 00353 apr_hash_t *prop_hash; 00354 00355 } svn_client_proplist_item_t; 00356 00357 /** 00358 * The callback invoked by svn_client_proplist4(). Each invocation 00359 * provides the regular and/or inherited properties of @a path, which is 00360 * either a working copy path or a URL. If @a prop_hash is not @c NULL, then 00361 * it maps explicit <tt>const char *</tt> property names to 00362 * <tt>svn_string_t *</tt> explicit property values. If @a inherited_props 00363 * is not @c NULL, then it is a depth-first ordered array of 00364 * #svn_prop_inherited_item_t * structures representing the 00365 * properties inherited by @a path. Use @a scratch_pool for all temporary 00366 * allocations. 00367 * 00368 * The #svn_prop_inherited_item_t->path_or_url members of the 00369 * #svn_prop_inherited_item_t * structures in @a inherited_props are 00370 * URLs if @a path is a URL or if @a path is a working copy path but the 00371 * property represented by the structure is above the working copy root (i.e. 00372 * the inherited property is from the cache). In all other cases the 00373 * #svn_prop_inherited_item_t->path_or_url members are absolute working copy 00374 * paths. 00375 * 00376 * @since New in 1.8. 00377 */ 00378 typedef svn_error_t *(*svn_proplist_receiver2_t)( 00379 void *baton, 00380 const char *path, 00381 apr_hash_t *prop_hash, 00382 apr_array_header_t *inherited_props, 00383 apr_pool_t *scratch_pool); 00384 00385 /** 00386 * Similar to #svn_proplist_receiver2_t, but doesn't return inherited 00387 * properties. 00388 * 00389 * @deprecated Provided for backward compatibility with the 1.7 API. 00390 * 00391 * @since New in 1.5. 00392 */ 00393 typedef svn_error_t *(*svn_proplist_receiver_t)( 00394 void *baton, 00395 const char *path, 00396 apr_hash_t *prop_hash, 00397 apr_pool_t *pool); 00398 00399 /** 00400 * Return a duplicate of @a item, allocated in @a pool. No part of the new 00401 * structure will be shared with @a item. 00402 * 00403 * @since New in 1.3. 00404 * 00405 * @deprecated Provided for backward compatibility with the 1.4 API. 00406 */ 00407 SVN_DEPRECATED 00408 svn_client_proplist_item_t * 00409 svn_client_proplist_item_dup(const svn_client_proplist_item_t *item, 00410 apr_pool_t *pool); 00411 00412 /** Information about commits passed back to client from this module. 00413 * 00414 * @deprecated Provided for backward compatibility with the 1.2 API. 00415 */ 00416 typedef struct svn_client_commit_info_t 00417 { 00418 /** just-committed revision. */ 00419 svn_revnum_t revision; 00420 00421 /** server-side date of the commit. */ 00422 const char *date; 00423 00424 /** author of the commit. */ 00425 const char *author; 00426 00427 } svn_client_commit_info_t; 00428 00429 00430 /** 00431 * @name Commit state flags 00432 * @brief State flags for use with the #svn_client_commit_item3_t structure 00433 * (see the note about the namespace for that structure, which also 00434 * applies to these flags). 00435 * @{ 00436 */ 00437 #define SVN_CLIENT_COMMIT_ITEM_ADD 0x01 00438 #define SVN_CLIENT_COMMIT_ITEM_DELETE 0x02 00439 #define SVN_CLIENT_COMMIT_ITEM_TEXT_MODS 0x04 00440 #define SVN_CLIENT_COMMIT_ITEM_PROP_MODS 0x08 00441 #define SVN_CLIENT_COMMIT_ITEM_IS_COPY 0x10 00442 /** One of the flags for a commit item. The node has a lock token that 00443 * should be released after a successful commit and, if the node is also 00444 * modified, transferred to the server as part of the commit process. 00445 * 00446 * @since New in 1.2. */ 00447 #define SVN_CLIENT_COMMIT_ITEM_LOCK_TOKEN 0x20 00448 /** One of the flags for a commit item. The node is the 'moved here' 00449 * side of a local move. This is used to check and enforce that the 00450 * other side of the move is also included in the commit. 00451 * 00452 * @since New in 1.8. */ 00453 #define SVN_CLIENT_COMMIT_ITEM_MOVED_HERE 0x40 00454 /** @} */ 00455 00456 /** The commit candidate structure. 00457 * 00458 * In order to avoid backwards compatibility problems clients should use 00459 * svn_client_commit_item3_create() to allocate and initialize this 00460 * structure instead of doing so themselves. 00461 * 00462 * @since New in 1.5. 00463 */ 00464 typedef struct svn_client_commit_item3_t 00465 { 00466 /* IMPORTANT: If you extend this structure, add new fields to the end. */ 00467 00468 /** absolute working-copy path of item. Always set during normal commits 00469 * (and copies from a working copy) to the repository. Can only be NULL 00470 * when stub commit items are created for operations that only involve 00471 * direct repository operations. During WC->REPOS copy operations, this 00472 * path is the WC source path of the operation. */ 00473 const char *path; 00474 00475 /** node kind (dir, file) */ 00476 svn_node_kind_t kind; 00477 00478 /** commit URL for this item. Points to the repository location of PATH 00479 * during commits, or to the final URL of the item when copying from the 00480 * working copy to the repository. */ 00481 const char *url; 00482 00483 /** revision of textbase */ 00484 svn_revnum_t revision; 00485 00486 /** copyfrom-url or NULL if not a copied item */ 00487 const char *copyfrom_url; 00488 00489 /** copyfrom-rev, valid when copyfrom_url != NULL */ 00490 svn_revnum_t copyfrom_rev; 00491 00492 /** state flags */ 00493 apr_byte_t state_flags; 00494 00495 /** An array of #svn_prop_t *'s, which are incoming changes from 00496 * the repository to WC properties. These changes are applied 00497 * post-commit. 00498 * 00499 * When adding to this array, allocate the #svn_prop_t and its 00500 * contents in @c incoming_prop_changes->pool, so that it has the 00501 * same lifetime as this data structure. 00502 * 00503 * See http://subversion.tigris.org/issues/show_bug.cgi?id=806 for a 00504 * description of what would happen if the post-commit process 00505 * didn't group these changes together with all other changes to the 00506 * item. 00507 */ 00508 apr_array_header_t *incoming_prop_changes; 00509 00510 /** An array of #svn_prop_t *'s, which are outgoing changes to 00511 * make to properties in the repository. These extra property 00512 * changes are declared pre-commit, and applied to the repository as 00513 * part of a commit. 00514 * 00515 * When adding to this array, allocate the #svn_prop_t and its 00516 * contents in @c outgoing_prop_changes->pool, so that it has the 00517 * same lifetime as this data structure. 00518 */ 00519 apr_array_header_t *outgoing_prop_changes; 00520 00521 /** 00522 * When processing the commit this contains the relative path for 00523 * the commit session. #NULL until the commit item is preprocessed. 00524 * @since New in 1.7. 00525 */ 00526 const char *session_relpath; 00527 00528 /** 00529 * When committing a move, this contains the absolute path where 00530 * the node was directly moved from. (If an ancestor at the original 00531 * location was moved then it points to where the node itself was 00532 * moved from; not the original location.) 00533 * @since New in 1.8. 00534 */ 00535 const char *moved_from_abspath; 00536 00537 } svn_client_commit_item3_t; 00538 00539 /** The commit candidate structure. 00540 * 00541 * @deprecated Provided for backward compatibility with the 1.4 API. 00542 */ 00543 typedef struct svn_client_commit_item2_t 00544 { 00545 /** absolute working-copy path of item */ 00546 const char *path; 00547 00548 /** node kind (dir, file) */ 00549 svn_node_kind_t kind; 00550 00551 /** commit URL for this item */ 00552 const char *url; 00553 00554 /** revision of textbase */ 00555 svn_revnum_t revision; 00556 00557 /** copyfrom-url or NULL if not a copied item */ 00558 const char *copyfrom_url; 00559 00560 /** copyfrom-rev, valid when copyfrom_url != NULL */ 00561 svn_revnum_t copyfrom_rev; 00562 00563 /** state flags */ 00564 apr_byte_t state_flags; 00565 00566 /** Analogous to the #svn_client_commit_item3_t.incoming_prop_changes 00567 * field. 00568 */ 00569 apr_array_header_t *wcprop_changes; 00570 } svn_client_commit_item2_t; 00571 00572 /** The commit candidate structure. 00573 * 00574 * @deprecated Provided for backward compatibility with the 1.2 API. 00575 */ 00576 typedef struct svn_client_commit_item_t 00577 { 00578 /** absolute working-copy path of item */ 00579 const char *path; 00580 00581 /** node kind (dir, file) */ 00582 svn_node_kind_t kind; 00583 00584 /** commit URL for this item */ 00585 const char *url; 00586 00587 /** revision (copyfrom-rev if _IS_COPY) */ 00588 svn_revnum_t revision; 00589 00590 /** copyfrom-url */ 00591 const char *copyfrom_url; 00592 00593 /** state flags */ 00594 apr_byte_t state_flags; 00595 00596 /** Analogous to the #svn_client_commit_item3_t.incoming_prop_changes 00597 * field. 00598 */ 00599 apr_array_header_t *wcprop_changes; 00600 00601 } svn_client_commit_item_t; 00602 00603 /** Return a new commit item object, allocated in @a pool. 00604 * 00605 * In order to avoid backwards compatibility problems, this function 00606 * is used to initialize and allocate the #svn_client_commit_item3_t 00607 * structure rather than doing so explicitly, as the size of this 00608 * structure may change in the future. 00609 * 00610 * @since New in 1.6. 00611 */ 00612 svn_client_commit_item3_t * 00613 svn_client_commit_item3_create(apr_pool_t *pool); 00614 00615 /** Like svn_client_commit_item3_create() but with a stupid "const" 00616 * qualifier on the returned structure, and it returns an error that 00617 * will never happen. 00618 * 00619 * @deprecated Provided for backward compatibility with the 1.5 API. 00620 */ 00621 SVN_DEPRECATED 00622 svn_error_t * 00623 svn_client_commit_item_create(const svn_client_commit_item3_t **item, 00624 apr_pool_t *pool); 00625 00626 /** 00627 * Return a duplicate of @a item, allocated in @a pool. No part of the 00628 * new structure will be shared with @a item, except for the adm_access 00629 * member. 00630 * 00631 * @since New in 1.5. 00632 */ 00633 svn_client_commit_item3_t * 00634 svn_client_commit_item3_dup(const svn_client_commit_item3_t *item, 00635 apr_pool_t *pool); 00636 00637 /** 00638 * Return a duplicate of @a item, allocated in @a pool. No part of the new 00639 * structure will be shared with @a item. 00640 * 00641 * @deprecated Provided for backward compatibility with the 1.4 API. 00642 */ 00643 SVN_DEPRECATED 00644 svn_client_commit_item2_t * 00645 svn_client_commit_item2_dup(const svn_client_commit_item2_t *item, 00646 apr_pool_t *pool); 00647 00648 /** Callback type used by commit-y operations to get a commit log message 00649 * from the caller. 00650 * 00651 * Set @a *log_msg to the log message for the commit, allocated in @a 00652 * pool, or @c NULL if wish to abort the commit process. Set @a *tmp_file 00653 * to the path of any temporary file which might be holding that log 00654 * message, or @c NULL if no such file exists (though, if @a *log_msg is 00655 * @c NULL, this value is undefined). The log message MUST be a UTF8 00656 * string with LF line separators. 00657 * 00658 * @a commit_items is a read-only array of #svn_client_commit_item3_t 00659 * structures, which may be fully or only partially filled-in, 00660 * depending on the type of commit operation. 00661 * 00662 * @a baton is provided along with the callback for use by the handler. 00663 * 00664 * All allocations should be performed in @a pool. 00665 * 00666 * @since New in 1.5. 00667 */ 00668 typedef svn_error_t *(*svn_client_get_commit_log3_t)( 00669 const char **log_msg, 00670 const char **tmp_file, 00671 const apr_array_header_t *commit_items, 00672 void *baton, 00673 apr_pool_t *pool); 00674 00675 /** Callback type used by commit-y operations to get a commit log message 00676 * from the caller. 00677 * 00678 * Set @a *log_msg to the log message for the commit, allocated in @a 00679 * pool, or @c NULL if wish to abort the commit process. Set @a *tmp_file 00680 * to the path of any temporary file which might be holding that log 00681 * message, or @c NULL if no such file exists (though, if @a *log_msg is 00682 * @c NULL, this value is undefined). The log message MUST be a UTF8 00683 * string with LF line separators. 00684 * 00685 * @a commit_items is a read-only array of #svn_client_commit_item2_t 00686 * structures, which may be fully or only partially filled-in, 00687 * depending on the type of commit operation. 00688 * 00689 * @a baton is provided along with the callback for use by the handler. 00690 * 00691 * All allocations should be performed in @a pool. 00692 * 00693 * @deprecated Provided for backward compatibility with the 1.3 API. 00694 */ 00695 typedef svn_error_t *(*svn_client_get_commit_log2_t)( 00696 const char **log_msg, 00697 const char **tmp_file, 00698 const apr_array_header_t *commit_items, 00699 void *baton, 00700 apr_pool_t *pool); 00701 00702 /** Callback type used by commit-y operations to get a commit log message 00703 * from the caller. 00704 * 00705 * Set @a *log_msg to the log message for the commit, allocated in @a 00706 * pool, or @c NULL if wish to abort the commit process. Set @a *tmp_file 00707 * to the path of any temporary file which might be holding that log 00708 * message, or @c NULL if no such file exists (though, if @a *log_msg is 00709 * @c NULL, this value is undefined). The log message MUST be a UTF8 00710 * string with LF line separators. 00711 * 00712 * @a commit_items is a read-only array of #svn_client_commit_item_t 00713 * structures, which may be fully or only partially filled-in, 00714 * depending on the type of commit operation. 00715 * 00716 * @a baton is provided along with the callback for use by the handler. 00717 * 00718 * All allocations should be performed in @a pool. 00719 * 00720 * @deprecated Provided for backward compatibility with the 1.2 API. 00721 */ 00722 typedef svn_error_t *(*svn_client_get_commit_log_t)( 00723 const char **log_msg, 00724 const char **tmp_file, 00725 apr_array_header_t *commit_items, 00726 void *baton, 00727 apr_pool_t *pool); 00728 00729 /** @} */ 00730 00731 /** 00732 * Client blame 00733 * 00734 * @defgroup clnt_blame Client blame functionality 00735 * 00736 * @{ 00737 */ 00738 00739 /** Callback type used by svn_client_blame5() to notify the caller 00740 * that line @a line_no of the blamed file was last changed in @a revision 00741 * which has the revision properties @a rev_props, and that the contents were 00742 * @a line. 00743 * 00744 * @a start_revnum and @a end_revnum contain the start and end revision 00745 * number of the entire blame operation, as determined from the repository 00746 * inside svn_client_blame5(). This can be useful for the blame receiver 00747 * to format the blame output. 00748 * 00749 * If svn_client_blame5() was called with @a include_merged_revisions set to 00750 * TRUE, @a merged_revision, @a merged_rev_props and @a merged_path will be 00751 * set, otherwise they will be NULL. @a merged_path will be set to the 00752 * absolute repository path. 00753 * 00754 * All allocations should be performed in @a pool. 00755 * 00756 * @note If there is no blame information for this line, @a revision will be 00757 * invalid and @a rev_props will be NULL. In this case @a local_change 00758 * will be true if the reason there is no blame information is that the line 00759 * was modified locally. In all other cases @a local_change will be false. 00760 * 00761 * @since New in 1.7. 00762 */ 00763 typedef svn_error_t *(*svn_client_blame_receiver3_t)( 00764 void *baton, 00765 svn_revnum_t start_revnum, 00766 svn_revnum_t end_revnum, 00767 apr_int64_t line_no, 00768 svn_revnum_t revision, 00769 apr_hash_t *rev_props, 00770 svn_revnum_t merged_revision, 00771 apr_hash_t *merged_rev_props, 00772 const char *merged_path, 00773 const char *line, 00774 svn_boolean_t local_change, 00775 apr_pool_t *pool); 00776 00777 /** 00778 * Similar to #svn_client_blame_receiver3_t, but with separate author and 00779 * date revision properties instead of all revision properties, and without 00780 * information about local changes. 00781 * 00782 * @deprecated Provided for backward compatibility with the 1.6 API. 00783 * 00784 * @since New in 1.5. 00785 */ 00786 typedef svn_error_t *(*svn_client_blame_receiver2_t)( 00787 void *baton, 00788 apr_int64_t line_no, 00789 svn_revnum_t revision, 00790 const char *author, 00791 const char *date, 00792 svn_revnum_t merged_revision, 00793 const char *merged_author, 00794 const char *merged_date, 00795 const char *merged_path, 00796 const char *line, 00797 apr_pool_t *pool); 00798 00799 /** 00800 * Similar to #svn_client_blame_receiver2_t, but without @a merged_revision, 00801 * @a merged_author, @a merged_date, or @a merged_path members. 00802 * 00803 * @note New in 1.4 is that the line is defined to contain only the line 00804 * content (and no [partial] EOLs; which was undefined in older versions). 00805 * Using this callback with svn_client_blame() or svn_client_blame2() 00806 * will still give you the old behaviour. 00807 * 00808 * @deprecated Provided for backward compatibility with the 1.4 API. 00809 */ 00810 typedef svn_error_t *(*svn_client_blame_receiver_t)( 00811 void *baton, 00812 apr_int64_t line_no, 00813 svn_revnum_t revision, 00814 const char *author, 00815 const char *date, 00816 const char *line, 00817 apr_pool_t *pool); 00818 00819 00820 /** @} */ 00821 00822 /** 00823 * Client diff 00824 * 00825 * @defgroup clnt_diff Client diff functionality 00826 * 00827 * @{ 00828 */ 00829 /** The difference type in an svn_diff_summarize_t structure. 00830 * 00831 * @since New in 1.4. 00832 */ 00833 typedef enum svn_client_diff_summarize_kind_t 00834 { 00835 /** An item with no text modifications */ 00836 svn_client_diff_summarize_kind_normal, 00837 00838 /** An added item */ 00839 svn_client_diff_summarize_kind_added, 00840 00841 /** An item with text modifications */ 00842 svn_client_diff_summarize_kind_modified, 00843 00844 /** A deleted item */ 00845 svn_client_diff_summarize_kind_deleted 00846 } svn_client_diff_summarize_kind_t; 00847 00848 00849 /** A struct that describes the diff of an item. Passed to 00850 * #svn_client_diff_summarize_func_t. 00851 * 00852 * @note Fields may be added to the end of this structure in future 00853 * versions. Therefore, users shouldn't allocate structures of this 00854 * type, to preserve binary compatibility. 00855 * 00856 * @since New in 1.4. 00857 */ 00858 typedef struct svn_client_diff_summarize_t 00859 { 00860 /** Path relative to the target. If the target is a file, path is 00861 * the empty string. */ 00862 const char *path; 00863 00864 /** Change kind */ 00865 svn_client_diff_summarize_kind_t summarize_kind; 00866 00867 /** Properties changed? For consistency with 'svn status' output, 00868 * this should be false if summarize_kind is _added or _deleted. */ 00869 svn_boolean_t prop_changed; 00870 00871 /** File or dir */ 00872 svn_node_kind_t node_kind; 00873 } svn_client_diff_summarize_t; 00874 00875 /** 00876 * Return a duplicate of @a diff, allocated in @a pool. No part of the new 00877 * structure will be shared with @a diff. 00878 * 00879 * @since New in 1.4. 00880 */ 00881 svn_client_diff_summarize_t * 00882 svn_client_diff_summarize_dup(const svn_client_diff_summarize_t *diff, 00883 apr_pool_t *pool); 00884 00885 00886 /** A callback used in svn_client_diff_summarize2() and 00887 * svn_client_diff_summarize_peg2() for reporting a @a diff summary. 00888 * 00889 * All allocations should be performed in @a pool. 00890 * 00891 * @a baton is a closure object; it should be provided by the implementation, 00892 * and passed by the caller. 00893 * 00894 * @since New in 1.4. 00895 */ 00896 typedef svn_error_t *(*svn_client_diff_summarize_func_t)( 00897 const svn_client_diff_summarize_t *diff, 00898 void *baton, 00899 apr_pool_t *pool); 00900 00901 00902 00903 /** @} */ 00904 00905 00906 /** 00907 * Client context 00908 * 00909 * @defgroup clnt_ctx Client context management 00910 * 00911 * @{ 00912 */ 00913 00914 /** A client context structure, which holds client specific callbacks, 00915 * batons, serves as a cache for configuration options, and other various 00916 * and sundry things. In order to avoid backwards compatibility problems 00917 * clients should use svn_client_create_context() to allocate and 00918 * initialize this structure instead of doing so themselves. 00919 */ 00920 typedef struct svn_client_ctx_t 00921 { 00922 /** main authentication baton. */ 00923 svn_auth_baton_t *auth_baton; 00924 00925 /** notification callback function. 00926 * This will be called by notify_func2() by default. 00927 * @deprecated Provided for backward compatibility with the 1.1 API. 00928 * Use @c notify_func2 instead. */ 00929 svn_wc_notify_func_t notify_func; 00930 00931 /** notification callback baton for notify_func() 00932 * @deprecated Provided for backward compatibility with the 1.1 API. 00933 * Use @c notify_baton2 instead */ 00934 void *notify_baton; 00935 00936 /** Log message callback function. NULL means that Subversion 00937 * should try not attempt to fetch a log message. 00938 * @deprecated Provided for backward compatibility with the 1.2 API. 00939 * Use @c log_msg_func2 instead. */ 00940 svn_client_get_commit_log_t log_msg_func; 00941 00942 /** log message callback baton 00943 * @deprecated Provided for backward compatibility with the 1.2 API. 00944 * Use @c log_msg_baton2 instead. */ 00945 void *log_msg_baton; 00946 00947 /** a hash mapping of <tt>const char *</tt> configuration file names to 00948 * #svn_config_t *'s. For example, the '~/.subversion/config' file's 00949 * contents should have the key "config". May be left unset (or set to 00950 * NULL) to use the built-in default settings and not use any configuration. 00951 */ 00952 apr_hash_t *config; 00953 00954 /** a callback to be used to see if the client wishes to cancel the running 00955 * operation. */ 00956 svn_cancel_func_t cancel_func; 00957 00958 /** a baton to pass to the cancellation callback. */ 00959 void *cancel_baton; 00960 00961 /** notification function, defaulting to a function that forwards 00962 * to notify_func(). If @c NULL, it will not be invoked. 00963 * @since New in 1.2. */ 00964 svn_wc_notify_func2_t notify_func2; 00965 00966 /** notification baton for notify_func2(). 00967 * @since New in 1.2. */ 00968 void *notify_baton2; 00969 00970 /** Log message callback function. NULL means that Subversion 00971 * should try log_msg_func. 00972 * @since New in 1.3. */ 00973 svn_client_get_commit_log2_t log_msg_func2; 00974 00975 /** callback baton for log_msg_func2 00976 * @since New in 1.3. */ 00977 void *log_msg_baton2; 00978 00979 /** Notification callback for network progress information. 00980 * May be NULL if not used. 00981 * @since New in 1.3. */ 00982 svn_ra_progress_notify_func_t progress_func; 00983 00984 /** Callback baton for progress_func. 00985 * @since New in 1.3. */ 00986 void *progress_baton; 00987 00988 /** Log message callback function. NULL means that Subversion 00989 * should try @c log_msg_func2, then @c log_msg_func. 00990 * @since New in 1.5. */ 00991 svn_client_get_commit_log3_t log_msg_func3; 00992 00993 /** The callback baton for @c log_msg_func3. 00994 * @since New in 1.5. */ 00995 void *log_msg_baton3; 00996 00997 /** MIME types map. 00998 * @since New in 1.5. */ 00999 apr_hash_t *mimetypes_map; 01000 01001 /** Conflict resolution callback and baton, if available. 01002 * @since New in 1.5. */ 01003 svn_wc_conflict_resolver_func_t conflict_func; 01004 void *conflict_baton; 01005 01006 /** Custom client name string, or @c NULL. 01007 * @since New in 1.5. */ 01008 const char *client_name; 01009 01010 /** Conflict resolution callback and baton, if available. NULL means that 01011 * subversion should try @c conflict_func. 01012 * @since New in 1.7. */ 01013 svn_wc_conflict_resolver_func2_t conflict_func2; 01014 void *conflict_baton2; 01015 01016 /** A working copy context for the client operation to use. 01017 * This is initialized by svn_client_create_context() and should never 01018 * be @c NULL. 01019 * 01020 * @since New in 1.7. */ 01021 svn_wc_context_t *wc_ctx; 01022 01023 /** Check-tunnel callback 01024 * 01025 * If not @c NULL, and open_tunnel_func is also not @c NULL, this 01026 * callback will be invoked to check if open_tunnel_func should be 01027 * used to create a specific tunnel, or if the default tunnel 01028 * implementation (either built-in or configured in the client 01029 * configuration file) should be used instead. 01030 * @since New in 1.9. 01031 */ 01032 svn_ra_check_tunnel_func_t check_tunnel_func; 01033 01034 /** Open-tunnel callback 01035 * 01036 * If not @c NULL, this callback will be invoked to create a tunnel 01037 * for a ra_svn connection that needs one, overriding any tunnel 01038 * definitions in the client config file. This callback is used only 01039 * for ra_svn and ignored by the other RA modules. 01040 * @since New in 1.9. 01041 */ 01042 svn_ra_open_tunnel_func_t open_tunnel_func; 01043 01044 /** The baton used with check_tunnel_func and open_tunnel_func. 01045 * @since New in 1.9. 01046 */ 01047 void *tunnel_baton; 01048 } svn_client_ctx_t; 01049 01050 /** Initialize a client context. 01051 * Set @a *ctx to a client context object, allocated in @a pool, that 01052 * represents a particular instance of an svn client. @a cfg_hash is used 01053 * to initialise the config member of the returned context object and should 01054 * remain valid for the lifetime of the object. @a cfg_hash may be @c NULL, 01055 * in which case it is ignored. 01056 * 01057 * In order to avoid backwards compatibility problems, clients must 01058 * use this function to initialize and allocate the 01059 * #svn_client_ctx_t structure rather than doing so themselves, as 01060 * the size of this structure may change in the future. 01061 * 01062 * The current implementation never returns error, but callers should 01063 * still check for error, for compatibility with future versions. 01064 * 01065 * @since New in 1.8. 01066 */ 01067 svn_error_t * 01068 svn_client_create_context2(svn_client_ctx_t **ctx, 01069 apr_hash_t *cfg_hash, 01070 apr_pool_t *pool); 01071 01072 01073 /** Similar to svn_client_create_context2 but passes a NULL @a cfg_hash. 01074 * 01075 * @deprecated Provided for backward compatibility with the 1.7 API. 01076 */ 01077 SVN_DEPRECATED 01078 svn_error_t * 01079 svn_client_create_context(svn_client_ctx_t **ctx, 01080 apr_pool_t *pool); 01081 01082 /** @} end group: Client context management */ 01083 01084 /** 01085 * @deprecated Provided for backward compatibility. This constant was never 01086 * used in released versions. 01087 */ 01088 #define SVN_CLIENT_AUTH_USERNAME "username" 01089 /** 01090 * @deprecated Provided for backward compatibility. This constant was never 01091 * used in released versions. 01092 */ 01093 #define SVN_CLIENT_AUTH_PASSWORD "password" 01094 01095 /** Client argument processing 01096 * 01097 * @defgroup clnt_cmdline Client command-line processing 01098 * 01099 * @{ 01100 */ 01101 01102 /** 01103 * Pull remaining target arguments from @a os into @a *targets_p, 01104 * converting them to UTF-8, followed by targets from @a known_targets 01105 * (which might come from, for example, the "--targets" command line option). 01106 * 01107 * Process each target in one of the following ways. For a repository- 01108 * relative URL: resolve to a full URL, contacting the repository if 01109 * necessary to do so, and then treat as a full URL. For a URL: do some 01110 * IRI-to-URI encoding and some auto-escaping, and canonicalize. For a 01111 * local path: canonicalize case and path separators. 01112 * 01113 * If @a keep_last_origpath_on_truepath_collision is TRUE, and there are 01114 * exactly two targets which both case-canonicalize to the same path, the last 01115 * target will be returned in the original non-case-canonicalized form. 01116 * 01117 * Allocate @a *targets_p and its elements in @a pool. 01118 * 01119 * @a ctx is required for possible repository authentication. 01120 * 01121 * If a path has the same name as a Subversion working copy 01122 * administrative directory, return #SVN_ERR_RESERVED_FILENAME_SPECIFIED; 01123 * if multiple reserved paths are encountered, return a chain of 01124 * errors, all of which are #SVN_ERR_RESERVED_FILENAME_SPECIFIED. Do 01125 * not return this type of error in a chain with any other type of 01126 * error, and if this is the only type of error encountered, complete 01127 * the operation before returning the error(s). 01128 * 01129 * Return an error if a target is just a peg specifier with no path, such as 01130 * "@abc". Before v1.6.5 (r878062) this form was interpreted as a literal path; 01131 * it is now ambiguous. The form "@abc@" should now be used to refer to the 01132 * literal path "@abc" with no peg revision, or the form ".@abc" to refer to 01133 * the empty path with peg revision "abc". 01134 * 01135 * @since New in 1.7 01136 */ 01137 svn_error_t * 01138 svn_client_args_to_target_array2(apr_array_header_t **targets_p, 01139 apr_getopt_t *os, 01140 const apr_array_header_t *known_targets, 01141 svn_client_ctx_t *ctx, 01142 svn_boolean_t keep_last_origpath_on_truepath_collision, 01143 apr_pool_t *pool); 01144 01145 /** 01146 * Similar to svn_client_args_to_target_array2() but with 01147 * @a keep_last_origpath_on_truepath_collision always set to FALSE. 01148 * 01149 * @since Since 1.6.5, this returns an error if a path contains a peg 01150 * specifier with no path before it, such as "@abc". 01151 * 01152 * @deprecated Provided for backward compatibility with the 1.6 API. 01153 */ 01154 SVN_DEPRECATED 01155 svn_error_t * 01156 svn_client_args_to_target_array(apr_array_header_t **targets_p, 01157 apr_getopt_t *os, 01158 const apr_array_header_t *known_targets, 01159 svn_client_ctx_t *ctx, 01160 apr_pool_t *pool); 01161 01162 /** @} group end: Client command-line processing */ 01163 01164 /** @} */ 01165 01166 /** 01167 * Client working copy management functions 01168 * 01169 * @defgroup clnt_wc Client working copy management 01170 * 01171 * @{ 01172 */ 01173 01174 /** 01175 * @defgroup clnt_wc_checkout Checkout 01176 * 01177 * @{ 01178 */ 01179 01180 01181 /** 01182 * Checkout a working copy from a repository. 01183 * 01184 * @param[out] result_rev If non-NULL, the value of the revision checked 01185 * out from the repository. 01186 * @param[in] URL The repository URL of the checkout source. 01187 * @param[in] path The root of the new working copy. 01188 * @param[in] peg_revision The peg revision. 01189 * @param[in] revision The operative revision. 01190 * @param[in] depth The depth of the operation. If #svn_depth_unknown, 01191 * then behave as if for #svn_depth_infinity, except in the case 01192 * of resuming a previous checkout of @a path (i.e., updating), 01193 * in which case use the depth of the existing working copy. 01194 * @param[in] ignore_externals If @c TRUE, don't process externals 01195 * definitions as part of this operation. 01196 * @param[in] allow_unver_obstructions If @c TRUE, then tolerate existing 01197 * unversioned items that obstruct incoming paths. Only 01198 * obstructions of the same type (file or dir) as the added 01199 * item are tolerated. The text of obstructing files is left 01200 * as-is, effectively treating it as a user modification after 01201 * the checkout. Working properties of obstructing items are 01202 * set equal to the base properties. <br> 01203 * If @c FALSE, then abort if there are any unversioned 01204 * obstructing items. 01205 * @param[in] ctx The standard client context, used for authentication and 01206 * notification. 01207 * @param[in] pool Used for any temporary allocation. 01208 * 01209 * @return A pointer to an #svn_error_t of the type (this list is not 01210 * exhaustive): <br> 01211 * #SVN_ERR_UNSUPPORTED_FEATURE if @a URL refers to a file rather 01212 * than a directory; <br> 01213 * #SVN_ERR_RA_ILLEGAL_URL if @a URL does not exist; <br> 01214 * #SVN_ERR_CLIENT_BAD_REVISION if @a revision is not one of 01215 * #svn_opt_revision_number, #svn_opt_revision_head, or 01216 * #svn_opt_revision_date. <br> 01217 * If no error occurred, return #SVN_NO_ERROR. 01218 * 01219 * @since New in 1.5. 01220 * 01221 * @see #svn_depth_t <br> #svn_client_ctx_t <br> @ref clnt_revisions for 01222 * a discussion of operative and peg revisions. 01223 */ 01224 svn_error_t * 01225 svn_client_checkout3(svn_revnum_t *result_rev, 01226 const char *URL, 01227 const char *path, 01228 const svn_opt_revision_t *peg_revision, 01229 const svn_opt_revision_t *revision, 01230 svn_depth_t depth, 01231 svn_boolean_t ignore_externals, 01232 svn_boolean_t allow_unver_obstructions, 01233 svn_client_ctx_t *ctx, 01234 apr_pool_t *pool); 01235 01236 01237 /** 01238 * Similar to svn_client_checkout3() but with @a allow_unver_obstructions 01239 * always set to FALSE, and @a depth set according to @a recurse: if 01240 * @a recurse is TRUE, @a depth is #svn_depth_infinity, if @a recurse 01241 * is FALSE, @a depth is #svn_depth_files. 01242 * 01243 * @deprecated Provided for backward compatibility with the 1.4 API. 01244 */ 01245 SVN_DEPRECATED 01246 svn_error_t * 01247 svn_client_checkout2(svn_revnum_t *result_rev, 01248 const char *URL, 01249 const char *path, 01250 const svn_opt_revision_t *peg_revision, 01251 const svn_opt_revision_t *revision, 01252 svn_boolean_t recurse, 01253 svn_boolean_t ignore_externals, 01254 svn_client_ctx_t *ctx, 01255 apr_pool_t *pool); 01256 01257 01258 /** 01259 * Similar to svn_client_checkout2(), but with @a peg_revision 01260 * always set to #svn_opt_revision_unspecified and 01261 * @a ignore_externals always set to FALSE. 01262 * 01263 * @deprecated Provided for backward compatibility with the 1.1 API. 01264 */ 01265 SVN_DEPRECATED 01266 svn_error_t * 01267 svn_client_checkout(svn_revnum_t *result_rev, 01268 const char *URL, 01269 const char *path, 01270 const svn_opt_revision_t *revision, 01271 svn_boolean_t recurse, 01272 svn_client_ctx_t *ctx, 01273 apr_pool_t *pool); 01274 /** @} */ 01275 01276 /** 01277 * @defgroup Update Bring a working copy up-to-date with a repository 01278 * 01279 * @{ 01280 * 01281 */ 01282 01283 /** 01284 * Update working trees @a paths to @a revision, authenticating with the 01285 * authentication baton cached in @a ctx. @a paths is an array of const 01286 * char * paths to be updated. Unversioned paths that are direct children 01287 * of a versioned path will cause an update that attempts to add that path; 01288 * other unversioned paths are skipped. If @a result_revs is not NULL, 01289 * @a *result_revs will be set to an array of svn_revnum_t with each 01290 * element set to the revision to which @a revision was resolved for the 01291 * corresponding element of @a paths. 01292 * 01293 * @a revision must be of kind #svn_opt_revision_number, 01294 * #svn_opt_revision_head, or #svn_opt_revision_date. If @a 01295 * revision does not meet these requirements, return the error 01296 * #SVN_ERR_CLIENT_BAD_REVISION. 01297 * 01298 * The paths in @a paths can be from multiple working copies from multiple 01299 * repositories, but even if they all come from the same repository there 01300 * is no guarantee that revision represented by #svn_opt_revision_head 01301 * will remain the same as each path is updated. 01302 * 01303 * If @a ignore_externals is set, don't process externals definitions 01304 * as part of this operation. 01305 * 01306 * If @a depth is #svn_depth_infinity, update fully recursively. 01307 * Else if it is #svn_depth_immediates or #svn_depth_files, update 01308 * each target and its file entries, but not its subdirectories. Else 01309 * if #svn_depth_empty, update exactly each target, nonrecursively 01310 * (essentially, update the target's properties). 01311 * 01312 * If @a depth is #svn_depth_unknown, take the working depth from 01313 * @a paths and then behave as described above. 01314 * 01315 * If @a depth_is_sticky is set and @a depth is not 01316 * #svn_depth_unknown, then in addition to updating PATHS, also set 01317 * their sticky ambient depth value to @a depth. 01318 * 01319 * If @a allow_unver_obstructions is TRUE then the update tolerates 01320 * existing unversioned items that obstruct added paths. Only 01321 * obstructions of the same type (file or dir) as the added item are 01322 * tolerated. The text of obstructing files is left as-is, effectively 01323 * treating it as a user modification after the update. Working 01324 * properties of obstructing items are set equal to the base properties. 01325 * If @a allow_unver_obstructions is FALSE then the update will abort 01326 * if there are any unversioned obstructing items. 01327 * 01328 * If @a adds_as_modification is TRUE, a local addition at the same path 01329 * as an incoming addition of the same node kind results in a normal node 01330 * with a possible local modification, instead of a tree conflict. 01331 * 01332 * If @a make_parents is TRUE, create any non-existent parent 01333 * directories also by checking them out at depth=empty. 01334 * 01335 * If @a ctx->notify_func2 is non-NULL, invoke @a ctx->notify_func2 with 01336 * @a ctx->notify_baton2 for each item handled by the update, and also for 01337 * files restored from text-base. If @a ctx->cancel_func is non-NULL, invoke 01338 * it passing @a ctx->cancel_baton at various places during the update. 01339 * 01340 * Use @a pool for any temporary allocation. 01341 * 01342 * @todo Multiple Targets 01343 * - Up for debate: an update on multiple targets is *not* atomic. 01344 * Right now, svn_client_update only takes one path. What's 01345 * debatable is whether this should ever change. On the one hand, 01346 * it's kind of losing to have the client application loop over 01347 * targets and call svn_client_update() on each one; each call to 01348 * update initializes a whole new repository session (network 01349 * overhead, etc.) On the other hand, it's a very simple 01350 * implementation, and allows for the possibility that different 01351 * targets may come from different repositories. 01352 * 01353 * @since New in 1.7. 01354 */ 01355 svn_error_t * 01356 svn_client_update4(apr_array_header_t **result_revs, 01357 const apr_array_header_t *paths, 01358 const svn_opt_revision_t *revision, 01359 svn_depth_t depth, 01360 svn_boolean_t depth_is_sticky, 01361 svn_boolean_t ignore_externals, 01362 svn_boolean_t allow_unver_obstructions, 01363 svn_boolean_t adds_as_modification, 01364 svn_boolean_t make_parents, 01365 svn_client_ctx_t *ctx, 01366 apr_pool_t *pool); 01367 01368 /** 01369 * Similar to svn_client_update4() but with @a make_parents always set 01370 * to FALSE and @a adds_as_modification set to TRUE. 01371 * 01372 * @deprecated Provided for backward compatibility with the 1.6 API. 01373 * @since New in 1.5. 01374 */ 01375 SVN_DEPRECATED 01376 svn_error_t * 01377 svn_client_update3(apr_array_header_t **result_revs, 01378 const apr_array_header_t *paths, 01379 const svn_opt_revision_t *revision, 01380 svn_depth_t depth, 01381 svn_boolean_t depth_is_sticky, 01382 svn_boolean_t ignore_externals, 01383 svn_boolean_t allow_unver_obstructions, 01384 svn_client_ctx_t *ctx, 01385 apr_pool_t *pool); 01386 01387 /** 01388 * Similar to svn_client_update3() but with @a allow_unver_obstructions 01389 * always set to FALSE, @a depth_is_sticky to FALSE, and @a depth set 01390 * according to @a recurse: if @a recurse is TRUE, set @a depth to 01391 * #svn_depth_infinity, if @a recurse is FALSE, set @a depth to 01392 * #svn_depth_files. 01393 * 01394 * @deprecated Provided for backward compatibility with the 1.4 API. 01395 */ 01396 SVN_DEPRECATED 01397 svn_error_t * 01398 svn_client_update2(apr_array_header_t **result_revs, 01399 const apr_array_header_t *paths, 01400 const svn_opt_revision_t *revision, 01401 svn_boolean_t recurse, 01402 svn_boolean_t ignore_externals, 01403 svn_client_ctx_t *ctx, 01404 apr_pool_t *pool); 01405 01406 /** 01407 * Similar to svn_client_update2() except that it accepts only a single 01408 * target in @a path, returns a single revision if @a result_rev is 01409 * not NULL, and @a ignore_externals is always set to FALSE. 01410 * 01411 * @deprecated Provided for backward compatibility with the 1.1 API. 01412 */ 01413 SVN_DEPRECATED 01414 svn_error_t * 01415 svn_client_update(svn_revnum_t *result_rev, 01416 const char *path, 01417 const svn_opt_revision_t *revision, 01418 svn_boolean_t recurse, 01419 svn_client_ctx_t *ctx, 01420 apr_pool_t *pool); 01421 /** @} */ 01422 01423 /** 01424 * @defgroup Switch Switch a working copy to another location. 01425 * 01426 * @{ 01427 */ 01428 01429 /** 01430 * Switch an existing working copy directory to a different repository 01431 * location. 01432 * 01433 * This is normally used to switch a working copy directory over to another 01434 * line of development, such as a branch or a tag. Switching an existing 01435 * working copy directory is more efficient than checking out @a url from 01436 * scratch. 01437 * 01438 * @param[out] result_rev If non-NULL, the value of the revision to which 01439 * the working copy was actually switched. 01440 * @param[in] path The directory to be switched. This need not be the 01441 * root of a working copy. 01442 * @param[in] url The repository URL to switch to. 01443 * @param[in] peg_revision The peg revision. 01444 * @param[in] revision The operative revision. 01445 * @param[in] depth The depth of the operation. If #svn_depth_infinity, 01446 * switch fully recursively. Else if #svn_depth_immediates, 01447 * switch @a path and its file children (if any), and 01448 * switch subdirectories but do not update them. Else if 01449 * #svn_depth_files, switch just file children, ignoring 01450 * subdirectories completely. Else if #svn_depth_empty, 01451 * switch just @a path and touch nothing underneath it. 01452 * @param[in] depth_is_sticky If @c TRUE, and @a depth is not 01453 * #svn_depth_unknown, then in addition to switching @a path, also 01454 * set its sticky ambient depth value to @a depth. 01455 * @param[in] ignore_externals If @c TRUE, don't process externals 01456 * definitions as part of this operation. 01457 * @param[in] allow_unver_obstructions If @c TRUE, then tolerate existing 01458 * unversioned items that obstruct incoming paths. Only 01459 * obstructions of the same type (file or dir) as the added 01460 * item are tolerated. The text of obstructing files is left 01461 * as-is, effectively treating it as a user modification after 01462 * the checkout. Working properties of obstructing items are 01463 * set equal to the base properties. <br> 01464 * If @c FALSE, then abort if there are any unversioned 01465 * obstructing items. 01466 * @param[in] ignore_ancestry If @c FALSE, then verify that the file 01467 * or directory at @a path shares some common version control 01468 * ancestry with the switch URL location (represented by the 01469 * combination of @a url, @a peg_revision, and @a revision), 01470 * and returning #SVN_ERR_CLIENT_UNRELATED_RESOURCES if they 01471 * do not. If @c TRUE, no such sanity checks are performed. 01472 * 01473 * @param[in] ctx The standard client context, used for authentication and 01474 * notification. The notifier is invoked for paths affected by 01475 * the switch, and also for files which may be restored from the 01476 * pristine store after being previously removed from the working 01477 * copy. 01478 * @param[in] pool Used for any temporary allocation. 01479 * 01480 * @return A pointer to an #svn_error_t of the type (this list is not 01481 * exhaustive): <br> 01482 * #SVN_ERR_CLIENT_BAD_REVISION if @a revision is not one of 01483 * #svn_opt_revision_number, #svn_opt_revision_head, or 01484 * #svn_opt_revision_date. <br> 01485 * If no error occurred, return #SVN_NO_ERROR. 01486 * 01487 * @since New in 1.7. 01488 * 01489 * @see #svn_depth_t <br> #svn_client_ctx_t <br> @ref clnt_revisions for 01490 * a discussion of operative and peg revisions. 01491 */ 01492 svn_error_t * 01493 svn_client_switch3(svn_revnum_t *result_rev, 01494 const char *path, 01495 const char *url, 01496 const svn_opt_revision_t *peg_revision, 01497 const svn_opt_revision_t *revision, 01498 svn_depth_t depth, 01499 svn_boolean_t depth_is_sticky, 01500 svn_boolean_t ignore_externals, 01501 svn_boolean_t allow_unver_obstructions, 01502 svn_boolean_t ignore_ancestry, 01503 svn_client_ctx_t *ctx, 01504 apr_pool_t *pool); 01505 01506 01507 /** 01508 * Similar to svn_client_switch3() but with @a ignore_ancestry always 01509 * set to TRUE. 01510 * 01511 * @since New in 1.5. 01512 * @deprecated Provided for backward compatibility with the 1.4 API. 01513 */ 01514 SVN_DEPRECATED 01515 svn_error_t * 01516 svn_client_switch2(svn_revnum_t *result_rev, 01517 const char *path, 01518 const char *url, 01519 const svn_opt_revision_t *peg_revision, 01520 const svn_opt_revision_t *revision, 01521 svn_depth_t depth, 01522 svn_boolean_t depth_is_sticky, 01523 svn_boolean_t ignore_externals, 01524 svn_boolean_t allow_unver_obstructions, 01525 svn_client_ctx_t *ctx, 01526 apr_pool_t *pool); 01527 01528 01529 /** 01530 * Similar to svn_client_switch2() but with @a allow_unver_obstructions, 01531 * @a ignore_externals, and @a depth_is_sticky always set to FALSE, 01532 * and @a depth set according to @a recurse: if @a recurse is TRUE, 01533 * set @a depth to #svn_depth_infinity, if @a recurse is FALSE, set 01534 * @a depth to #svn_depth_files. 01535 * 01536 * @deprecated Provided for backward compatibility with the 1.4 API. 01537 */ 01538 SVN_DEPRECATED 01539 svn_error_t * 01540 svn_client_switch(svn_revnum_t *result_rev, 01541 const char *path, 01542 const char *url, 01543 const svn_opt_revision_t *revision, 01544 svn_boolean_t recurse, 01545 svn_client_ctx_t *ctx, 01546 apr_pool_t *pool); 01547 01548 /** @} */ 01549 01550 /** 01551 * @defgroup Add Begin versioning files/directories in a working copy. 01552 * 01553 * @{ 01554 */ 01555 01556 /** 01557 * Schedule a working copy @a path for addition to the repository. 01558 * 01559 * If @a depth is #svn_depth_empty, add just @a path and nothing 01560 * below it. If #svn_depth_files, add @a path and any file 01561 * children of @a path. If #svn_depth_immediates, add @a path, any 01562 * file children, and any immediate subdirectories (but nothing 01563 * underneath those subdirectories). If #svn_depth_infinity, add 01564 * @a path and everything under it fully recursively. 01565 * 01566 * @a path's parent must be under revision control already (unless 01567 * @a add_parents is TRUE), but @a path is not. 01568 * 01569 * If @a force is not set and @a path is already under version 01570 * control, return the error #SVN_ERR_ENTRY_EXISTS. If @a force is 01571 * set, do not error on already-versioned items. When used on a 01572 * directory in conjunction with a @a depth value greater than 01573 * #svn_depth_empty, this has the effect of scheduling for addition 01574 * any unversioned files and directories scattered within even a 01575 * versioned tree (up to @a depth). 01576 * 01577 * If @a ctx->notify_func2 is non-NULL, then for each added item, call 01578 * @a ctx->notify_func2 with @a ctx->notify_baton2 and the path of the 01579 * added item. 01580 * 01581 * If @a no_ignore is FALSE, don't add any file or directory (or recurse 01582 * into any directory) that is unversioned and found by recursion (as 01583 * opposed to being the explicit target @a path) and whose name matches the 01584 * svn:ignore property on its parent directory or the global-ignores list in 01585 * @a ctx->config. If @a no_ignore is TRUE, do include such files and 01586 * directories. (Note that an svn:ignore property can influence this 01587 * behaviour only when recursing into an already versioned directory with @a 01588 * force.) 01589 * 01590 * If @a no_autoprops is TRUE, don't set any autoprops on added files. If 01591 * @a no_autoprops is FALSE then all added files have autprops set as per 01592 * the auto-props list in @a ctx->config and the value of any 01593 * @c SVN_PROP_INHERITABLE_AUTO_PROPS properties inherited by the nearest 01594 * parents of @a path which are already under version control. 01595 * 01596 * If @a add_parents is TRUE, recurse up @a path's directory and look for 01597 * a versioned directory. If found, add all intermediate paths between it 01598 * and @a path. If not found, return #SVN_ERR_CLIENT_NO_VERSIONED_PARENT. 01599 * 01600 * @a scratch_pool is used for temporary allocations only. 01601 * 01602 * @par Important: 01603 * This is a *scheduling* operation. No changes will 01604 * happen to the repository until a commit occurs. This scheduling 01605 * can be removed with svn_client_revert2(). 01606 * 01607 * @since New in 1.8. 01608 */ 01609 svn_error_t * 01610 svn_client_add5(const char *path, 01611 svn_depth_t depth, 01612 svn_boolean_t force, 01613 svn_boolean_t no_ignore, 01614 svn_boolean_t no_autoprops, 01615 svn_boolean_t add_parents, 01616 svn_client_ctx_t *ctx, 01617 apr_pool_t *scratch_pool); 01618 01619 /** 01620 * Similar to svn_client_add5(), but with @a no_autoprops always set to 01621 * FALSE. 01622 * 01623 * @deprecated Provided for backward compatibility with the 1.7 API. 01624 */ 01625 SVN_DEPRECATED 01626 svn_error_t * 01627 svn_client_add4(const char *path, 01628 svn_depth_t depth, 01629 svn_boolean_t force, 01630 svn_boolean_t no_ignore, 01631 svn_boolean_t add_parents, 01632 svn_client_ctx_t *ctx, 01633 apr_pool_t *pool); 01634 01635 /** 01636 * Similar to svn_client_add4(), but with @a add_parents always set to 01637 * FALSE and @a depth set according to @a recursive: if TRUE, then 01638 * @a depth is #svn_depth_infinity, if FALSE, then #svn_depth_empty. 01639 * 01640 * @deprecated Provided for backward compatibility with the 1.4 API. 01641 */ 01642 SVN_DEPRECATED 01643 svn_error_t * 01644 svn_client_add3(const char *path, 01645 svn_boolean_t recursive, 01646 svn_boolean_t force, 01647 svn_boolean_t no_ignore, 01648 svn_client_ctx_t *ctx, 01649 apr_pool_t *pool); 01650 01651 /** 01652 * Similar to svn_client_add3(), but with @a no_ignore always set to 01653 * FALSE. 01654 * 01655 * @deprecated Provided for backward compatibility with the 1.2 API. 01656 */ 01657 SVN_DEPRECATED 01658 svn_error_t * 01659 svn_client_add2(const char *path, 01660 svn_boolean_t recursive, 01661 svn_boolean_t force, 01662 svn_client_ctx_t *ctx, 01663 apr_pool_t *pool); 01664 01665 /** 01666 * Similar to svn_client_add2(), but with @a force always set to FALSE. 01667 * 01668 * @deprecated Provided for backward compatibility with the 1.0 API. 01669 */ 01670 SVN_DEPRECATED 01671 svn_error_t * 01672 svn_client_add(const char *path, 01673 svn_boolean_t recursive, 01674 svn_client_ctx_t *ctx, 01675 apr_pool_t *pool); 01676 01677 /** @} */ 01678 01679 /** 01680 * @defgroup Mkdir Create directories in a working copy or repository. 01681 * 01682 * @{ 01683 */ 01684 01685 /** Create a directory, either in a repository or a working copy. 01686 * 01687 * @a paths is an array of (const char *) paths, either all local WC paths 01688 * or all URLs. 01689 * 01690 * If @a paths contains URLs, use the authentication baton in @a ctx 01691 * and @a message to immediately attempt to commit the creation of the 01692 * directories in @a paths in the repository. 01693 * 01694 * Else, create the directories on disk, and attempt to schedule them 01695 * for addition (using svn_client_add(), whose docstring you should 01696 * read). 01697 * 01698 * If @a make_parents is TRUE, create any non-existent parent directories 01699 * also. 01700 * 01701 * If non-NULL, @a revprop_table is a hash table holding additional, 01702 * custom revision properties (<tt>const char *</tt> names mapped to 01703 * <tt>svn_string_t *</tt> values) to be set on the new revision in 01704 * the event that this is a committing operation. This table cannot 01705 * contain any standard Subversion properties. 01706 * 01707 * @a ctx->log_msg_func3/@a ctx->log_msg_baton3 are a callback/baton 01708 * combo that this function can use to query for a commit log message 01709 * when one is needed. 01710 * 01711 * If @a ctx->notify_func2 is non-NULL, when the directory has been created 01712 * (successfully) in the working copy, call @a ctx->notify_func2 with 01713 * @a ctx->notify_baton2 and the path of the new directory. Note that this is 01714 * only called for items added to the working copy. 01715 * 01716 * If @a commit_callback is non-NULL, then for each successful commit, call 01717 * @a commit_callback with @a commit_baton and a #svn_commit_info_t for 01718 * the commit. 01719 * 01720 * @since New in 1.7. 01721 */ 01722 svn_error_t * 01723 svn_client_mkdir4(const apr_array_header_t *paths, 01724 svn_boolean_t make_parents, 01725 const apr_hash_t *revprop_table, 01726 svn_commit_callback2_t commit_callback, 01727 void *commit_baton, 01728 svn_client_ctx_t *ctx, 01729 apr_pool_t *pool); 01730 01731 /** 01732 * Similar to svn_client_mkdir4(), but returns the commit info in 01733 * @a *commit_info_p rather than through a callback function. 01734 * 01735 * @since New in 1.5. 01736 * @deprecated Provided for backward compatibility with the 1.6 API. 01737 */ 01738 SVN_DEPRECATED 01739 svn_error_t * 01740 svn_client_mkdir3(svn_commit_info_t **commit_info_p, 01741 const apr_array_header_t *paths, 01742 svn_boolean_t make_parents, 01743 const apr_hash_t *revprop_table, 01744 svn_client_ctx_t *ctx, 01745 apr_pool_t *pool); 01746 01747 01748 /** 01749 * Same as svn_client_mkdir3(), but with @a make_parents always FALSE, 01750 * and @a revprop_table always NULL. 01751 * 01752 * @since New in 1.3. 01753 * @deprecated Provided for backward compatibility with the 1.4 API. 01754 */ 01755 SVN_DEPRECATED 01756 svn_error_t * 01757 svn_client_mkdir2(svn_commit_info_t **commit_info_p, 01758 const apr_array_header_t *paths, 01759 svn_client_ctx_t *ctx, 01760 apr_pool_t *pool); 01761 01762 /** 01763 * Same as svn_client_mkdir2(), but takes the #svn_client_commit_info_t 01764 * type for @a commit_info_p. 01765 * 01766 * @deprecated Provided for backward compatibility with the 1.2 API. 01767 */ 01768 SVN_DEPRECATED 01769 svn_error_t * 01770 svn_client_mkdir(svn_client_commit_info_t **commit_info_p, 01771 const apr_array_header_t *paths, 01772 svn_client_ctx_t *ctx, 01773 apr_pool_t *pool); 01774 01775 /** @} */ 01776 01777 /** 01778 * @defgroup Delete Remove files/directories from a working copy or repository. 01779 * 01780 * @{ 01781 */ 01782 01783 /** Delete items from a repository or working copy. 01784 * 01785 * @a paths is an array of (const char *) paths, either all local WC paths 01786 * or all URLs. 01787 * 01788 * If the paths in @a paths are URLs, use the authentication baton in 01789 * @a ctx and @a ctx->log_msg_func3/@a ctx->log_msg_baton3 to 01790 * immediately attempt to commit a deletion of the URLs from the 01791 * repository. Every path must belong to the same repository. 01792 * 01793 * Else, schedule the working copy paths in @a paths for removal from 01794 * the repository. Each path's parent must be under revision control. 01795 * This is just a *scheduling* operation. No changes will happen to 01796 * the repository until a commit occurs. This scheduling can be 01797 * removed with svn_client_revert2(). If a path is a file it is 01798 * immediately removed from the working copy. If the path is a 01799 * directory it will remain in the working copy but all the files, and 01800 * all unversioned items, it contains will be removed. If @a force is 01801 * not set then this operation will fail if any path contains locally 01802 * modified and/or unversioned items. If @a force is set such items 01803 * will be deleted. 01804 * 01805 * If the paths are working copy paths and @a keep_local is TRUE then 01806 * the paths will not be removed from the working copy, only scheduled 01807 * for removal from the repository. Once the scheduled deletion is 01808 * committed, they will appear as unversioned paths in the working copy. 01809 * 01810 * If non-NULL, @a revprop_table is a hash table holding additional, 01811 * custom revision properties (<tt>const char *</tt> names mapped to 01812 * <tt>svn_string_t *</tt> values) to be set on the new revision in 01813 * the event that this is a committing operation. This table cannot 01814 * contain any standard Subversion properties. 01815 * 01816 * @a ctx->log_msg_func3/@a ctx->log_msg_baton3 are a callback/baton 01817 * combo that this function can use to query for a commit log message 01818 * when one is needed. 01819 * 01820 * If @a ctx->notify_func2 is non-NULL, then for each item deleted, call 01821 * @a ctx->notify_func2 with @a ctx->notify_baton2 and the path of the deleted 01822 * item. 01823 * 01824 * If @a commit_callback is non-NULL, then for each successful commit, call 01825 * @a commit_callback with @a commit_baton and a #svn_commit_info_t for 01826 * the commit. 01827 * 01828 * @since New in 1.7. 01829 */ 01830 svn_error_t * 01831 svn_client_delete4(const apr_array_header_t *paths, 01832 svn_boolean_t force, 01833 svn_boolean_t keep_local, 01834 const apr_hash_t *revprop_table, 01835 svn_commit_callback2_t commit_callback, 01836 void *commit_baton, 01837 svn_client_ctx_t *ctx, 01838 apr_pool_t *pool); 01839 01840 /** 01841 * Similar to svn_client_delete4(), but returns the commit info in 01842 * @a *commit_info_p rather than through a callback function. 01843 * 01844 * @since New in 1.5. 01845 * @deprecated Provided for backward compatibility with the 1.6 API. 01846 */ 01847 SVN_DEPRECATED 01848 svn_error_t * 01849 svn_client_delete3(svn_commit_info_t **commit_info_p, 01850 const apr_array_header_t *paths, 01851 svn_boolean_t force, 01852 svn_boolean_t keep_local, 01853 const apr_hash_t *revprop_table, 01854 svn_client_ctx_t *ctx, 01855 apr_pool_t *pool); 01856 01857 /** 01858 * Similar to svn_client_delete3(), but with @a keep_local always set 01859 * to FALSE, and @a revprop_table passed as NULL. 01860 * 01861 * @deprecated Provided for backward compatibility with the 1.4 API. 01862 */ 01863 SVN_DEPRECATED 01864 svn_error_t * 01865 svn_client_delete2(svn_commit_info_t **commit_info_p, 01866 const apr_array_header_t *paths, 01867 svn_boolean_t force, 01868 svn_client_ctx_t *ctx, 01869 apr_pool_t *pool); 01870 01871 /** 01872 * Similar to svn_client_delete2(), but takes the #svn_client_commit_info_t 01873 * type for @a commit_info_p. 01874 * 01875 * @deprecated Provided for backward compatibility with the 1.2 API. 01876 */ 01877 SVN_DEPRECATED 01878 svn_error_t * 01879 svn_client_delete(svn_client_commit_info_t **commit_info_p, 01880 const apr_array_header_t *paths, 01881 svn_boolean_t force, 01882 svn_client_ctx_t *ctx, 01883 apr_pool_t *pool); 01884 01885 01886 /** @} */ 01887 01888 /** 01889 * @defgroup Import Import files into the repository. 01890 * 01891 * @{ 01892 */ 01893 01894 /** 01895 * The callback invoked by svn_client_import5() before adding a node to the 01896 * list of nodes to be imported. 01897 * 01898 * @a baton is the value passed to @a svn_client_import5 as filter_baton. 01899 * 01900 * The callback receives the @a local_abspath for each node and the @a dirent 01901 * for it when walking the directory tree. Only the kind of node, including 01902 * special status is available in @a dirent. 01903 * 01904 * Implementations can set @a *filtered to TRUE, to make the import 01905 * process omit the node and (if the node is a directory) all its 01906 * descendants. 01907 * 01908 * @a scratch_pool can be used for temporary allocations. 01909 * 01910 * @since New in 1.8. 01911 */ 01912 typedef svn_error_t *(*svn_client_import_filter_func_t)( 01913 void *baton, 01914 svn_boolean_t *filtered, 01915 const char *local_abspath, 01916 const svn_io_dirent2_t *dirent, 01917 apr_pool_t *scratch_pool); 01918 01919 /** Import file or directory @a path into repository directory @a url at 01920 * head, authenticating with the authentication baton cached in @a ctx, 01921 * and using @a ctx->log_msg_func3/@a ctx->log_msg_baton3 to get a log message 01922 * for the (implied) commit. If some components of @a url do not exist 01923 * then create parent directories as necessary. 01924 * 01925 * This function reads an unversioned tree from disk and skips any ".svn" 01926 * directories. Even if a file or directory being imported is part of an 01927 * existing WC, this function sees it as unversioned and does not notice any 01928 * existing Subversion properties in it. 01929 * 01930 * If @a path is a directory, the contents of that directory are 01931 * imported directly into the directory identified by @a url. Note that the 01932 * directory @a path itself is not imported -- that is, the basename of 01933 * @a path is not part of the import. 01934 * 01935 * If @a path is a file, then the dirname of @a url is the directory 01936 * receiving the import. The basename of @a url is the filename in the 01937 * repository. In this case if @a url already exists, return error. 01938 * 01939 * If @a ctx->notify_func2 is non-NULL, then call @a ctx->notify_func2 with 01940 * @a ctx->notify_baton2 as the import progresses, with any of the following 01941 * actions: #svn_wc_notify_commit_added, 01942 * #svn_wc_notify_commit_postfix_txdelta. 01943 * 01944 * Use @a scratch_pool for any temporary allocation. 01945 * 01946 * If non-NULL, @a revprop_table is a hash table holding additional, 01947 * custom revision properties (<tt>const char *</tt> names mapped to 01948 * <tt>svn_string_t *</tt> values) to be set on the new revision. 01949 * This table cannot contain any standard Subversion properties. 01950 * 01951 * @a ctx->log_msg_func3/@a ctx->log_msg_baton3 are a callback/baton 01952 * combo that this function can use to query for a commit log message 01953 * when one is needed. 01954 * 01955 * If @a depth is #svn_depth_empty, import just @a path and nothing 01956 * below it. If #svn_depth_files, import @a path and any file 01957 * children of @a path. If #svn_depth_immediates, import @a path, any 01958 * file children, and any immediate subdirectories (but nothing 01959 * underneath those subdirectories). If #svn_depth_infinity, import 01960 * @a path and everything under it fully recursively. 01961 * 01962 * If @a no_ignore is @c FALSE, don't import any file or directory (or 01963 * recurse into any directory) that is found by recursion (as opposed to 01964 * being the explicit target @a path) and whose name matches the 01965 * global-ignores list in @a ctx->config. If @a no_ignore is @c TRUE, do 01966 * include such files and directories. (Note that svn:ignore properties are 01967 * not involved, as auto-props cannot set properties on directories and even 01968 * if the target is part of a WC the import ignores any existing 01969 * properties.) 01970 * 01971 * If @a no_autoprops is TRUE, don't set any autoprops on imported files. If 01972 * @a no_autoprops is FALSE then all imported files have autprops set as per 01973 * the auto-props list in @a ctx->config and the value of any 01974 * @c SVN_PROP_INHERITABLE_AUTO_PROPS properties inherited by and explicitly set 01975 * on @a url if @a url is already under versioned control, or the nearest parents 01976 * of @a path which are already under version control if not. 01977 * 01978 * If @a ignore_unknown_node_types is @c FALSE, ignore files of which the 01979 * node type is unknown, such as device files and pipes. 01980 * 01981 * If @a filter_callback is non-NULL, call it for each node that isn't ignored 01982 * for other reasons with @a filter_baton, to allow third party to ignore 01983 * specific nodes during importing. 01984 * 01985 * If @a commit_callback is non-NULL, then for each successful commit, call 01986 * @a commit_callback with @a commit_baton and a #svn_commit_info_t for 01987 * the commit. 01988 * 01989 * @since New in 1.8. 01990 */ 01991 svn_error_t * 01992 svn_client_import5(const char *path, 01993 const char *url, 01994 svn_depth_t depth, 01995 svn_boolean_t no_ignore, 01996 svn_boolean_t no_autoprops, 01997 svn_boolean_t ignore_unknown_node_types, 01998 const apr_hash_t *revprop_table, 01999 svn_client_import_filter_func_t filter_callback, 02000 void *filter_baton, 02001 svn_commit_callback2_t commit_callback, 02002 void *commit_baton, 02003 svn_client_ctx_t *ctx, 02004 apr_pool_t *scratch_pool); 02005 02006 /** 02007 * Similar to svn_client_import5(), but without support for an optional 02008 * @a filter_callback and @a no_autoprops always set to FALSE. 02009 * 02010 * @since New in 1.7. 02011 * @deprecated Provided for backward compatibility with the 1.7 API. 02012 */ 02013 SVN_DEPRECATED 02014 svn_error_t * 02015 svn_client_import4(const char *path, 02016 const char *url, 02017 svn_depth_t depth, 02018 svn_boolean_t no_ignore, 02019 svn_boolean_t ignore_unknown_node_types, 02020 const apr_hash_t *revprop_table, 02021 svn_commit_callback2_t commit_callback, 02022 void *commit_baton, 02023 svn_client_ctx_t *ctx, 02024 apr_pool_t *pool); 02025 02026 /** 02027 * Similar to svn_client_import4(), but returns the commit info in 02028 * @a *commit_info_p rather than through a callback function. 02029 * 02030 * @since New in 1.5. 02031 * @deprecated Provided for backward compatibility with the 1.6 API. 02032 */ 02033 SVN_DEPRECATED 02034 svn_error_t * 02035 svn_client_import3(svn_commit_info_t **commit_info_p, 02036 const char *path, 02037 const char *url, 02038 svn_depth_t depth, 02039 svn_boolean_t no_ignore, 02040 svn_boolean_t ignore_unknown_node_types, 02041 const apr_hash_t *revprop_table, 02042 svn_client_ctx_t *ctx, 02043 apr_pool_t *pool); 02044 02045 /** 02046 * Similar to svn_client_import3(), but with @a ignore_unknown_node_types 02047 * always set to @c FALSE, @a revprop_table passed as NULL, and @a 02048 * depth set according to @a nonrecursive: if TRUE, then @a depth is 02049 * #svn_depth_files, else #svn_depth_infinity. 02050 * 02051 * @since New in 1.3. 02052 * 02053 * @deprecated Provided for backward compatibility with the 1.4 API 02054 */ 02055 SVN_DEPRECATED 02056 svn_error_t * 02057 svn_client_import2(svn_commit_info_t **commit_info_p, 02058 const char *path, 02059 const char *url, 02060 svn_boolean_t nonrecursive, 02061 svn_boolean_t no_ignore, 02062 svn_client_ctx_t *ctx, 02063 apr_pool_t *pool); 02064 02065 /** 02066 * Similar to svn_client_import2(), but with @a no_ignore always set 02067 * to FALSE and using the #svn_client_commit_info_t type for 02068 * @a commit_info_p. 02069 * 02070 * @deprecated Provided for backward compatibility with the 1.2 API. 02071 */ 02072 SVN_DEPRECATED 02073 svn_error_t * 02074 svn_client_import(svn_client_commit_info_t **commit_info_p, 02075 const char *path, 02076 const char *url, 02077 svn_boolean_t nonrecursive, 02078 svn_client_ctx_t *ctx, 02079 apr_pool_t *pool); 02080 02081 /** @} */ 02082 02083 /** 02084 * @defgroup Commit Commit local modifications to the repository. 02085 * 02086 * @{ 02087 */ 02088 02089 /** 02090 * Commit files or directories into repository, authenticating with 02091 * the authentication baton cached in @a ctx, and using 02092 * @a ctx->log_msg_func3/@a ctx->log_msg_baton3 to obtain the log message. 02093 * Set @a *commit_info_p to the results of the commit, allocated in @a pool. 02094 * 02095 * @a targets is an array of <tt>const char *</tt> paths to commit. They 02096 * need not be canonicalized nor condensed; this function will take care of 02097 * that. If @a targets has zero elements, then do nothing and return 02098 * immediately without error. 02099 * 02100 * If non-NULL, @a revprop_table is a hash table holding additional, 02101 * custom revision properties (<tt>const char *</tt> names mapped to 02102 * <tt>svn_string_t *</tt> values) to be set on the new revision. 02103 * This table cannot contain any standard Subversion properties. 02104 * 02105 * If @a ctx->notify_func2 is non-NULL, then call @a ctx->notify_func2 with 02106 * @a ctx->notify_baton2 as the commit progresses, with any of the following 02107 * actions: #svn_wc_notify_commit_modified, #svn_wc_notify_commit_added, 02108 * #svn_wc_notify_commit_deleted, #svn_wc_notify_commit_replaced, 02109 * #svn_wc_notify_commit_copied, #svn_wc_notify_commit_copied_replaced, 02110 * #svn_wc_notify_commit_postfix_txdelta. 02111 * 02112 * If @a depth is #svn_depth_infinity, commit all changes to and 02113 * below named targets. If @a depth is #svn_depth_empty, commit 02114 * only named targets (that is, only property changes on named 02115 * directory targets, and property and content changes for named file 02116 * targets). If @a depth is #svn_depth_files, behave as above for 02117 * named file targets, and for named directory targets, commit 02118 * property changes on a named directory and all changes to files 02119 * directly inside that directory. If #svn_depth_immediates, behave 02120 * as for #svn_depth_files, and for subdirectories of any named 02121 * directory target commit as though for #svn_depth_empty. 02122 * 02123 * Unlock paths in the repository, unless @a keep_locks is TRUE. 02124 * 02125 * @a changelists is an array of <tt>const char *</tt> changelist 02126 * names, used as a restrictive filter on items that are committed; 02127 * that is, don't commit anything unless it's a member of one of those 02128 * changelists. After the commit completes successfully, remove 02129 * changelist associations from the targets, unless @a 02130 * keep_changelists is set. If @a changelists is 02131 * empty (or altogether @c NULL), no changelist filtering occurs. 02132 * 02133 * If @a commit_as_operations is set to FALSE, when a copy is committed 02134 * all changes below the copy are always committed at the same time 02135 * (independent of the value of @a depth). If @a commit_as_operations is 02136 * #TRUE, changes to descendants are only committed if they are itself 02137 * included via @a depth and targets. 02138 * 02139 * If @a include_file_externals and/or @a include_dir_externals are #TRUE, 02140 * also commit all file and/or dir externals (respectively) that are reached 02141 * by recursion, except for those externals which: 02142 * - have a fixed revision, or 02143 * - come from a different repository root URL (dir externals). 02144 * These flags affect only recursion; externals that directly appear in @a 02145 * targets are always included in the commit. 02146 * 02147 * ### TODO: currently, file externals hidden inside an unversioned dir are 02148 * skipped deliberately, because we can't commit those yet. 02149 * See STMT_SELECT_COMMITTABLE_EXTERNALS_BELOW. 02150 * 02151 * ### TODO: With @c depth_immediates, this function acts as if 02152 * @a include_dir_externals was passed #FALSE, but caller expects 02153 * immediate child dir externals to be included @c depth_empty. 02154 * 02155 * When @a commit_as_operations is #TRUE it is possible to delete a node and 02156 * all its descendants by selecting just the root of the deletion. If it is 02157 * set to #FALSE this will raise an error. 02158 * 02159 * If @a commit_callback is non-NULL, then for each successful commit, call 02160 * @a commit_callback with @a commit_baton and a #svn_commit_info_t for 02161 * the commit. 02162 * 02163 * @note #svn_depth_unknown and #svn_depth_exclude must not be passed 02164 * for @a depth. 02165 * 02166 * Use @a pool for any temporary allocations. 02167 * 02168 * @since New in 1.8. 02169 */ 02170 svn_error_t * 02171 svn_client_commit6(const apr_array_header_t *targets, 02172 svn_depth_t depth, 02173 svn_boolean_t keep_locks, 02174 svn_boolean_t keep_changelists, 02175 svn_boolean_t commit_as_operations, 02176 svn_boolean_t include_file_externals, 02177 svn_boolean_t include_dir_externals, 02178 const apr_array_header_t *changelists, 02179 const apr_hash_t *revprop_table, 02180 svn_commit_callback2_t commit_callback, 02181 void *commit_baton, 02182 svn_client_ctx_t *ctx, 02183 apr_pool_t *pool); 02184 02185 /** 02186 * Similar to svn_client_commit6(), but passes @a include_file_externals as 02187 * FALSE and @a include_dir_externals as FALSE. 02188 * 02189 * @since New in 1.7. 02190 * @deprecated Provided for backward compatibility with the 1.7 API. 02191 */ 02192 SVN_DEPRECATED 02193 svn_error_t * 02194 svn_client_commit5(const apr_array_header_t *targets, 02195 svn_depth_t depth, 02196 svn_boolean_t keep_locks, 02197 svn_boolean_t keep_changelists, 02198 svn_boolean_t commit_as_operations, 02199 const apr_array_header_t *changelists, 02200 const apr_hash_t *revprop_table, 02201 svn_commit_callback2_t commit_callback, 02202 void *commit_baton, 02203 svn_client_ctx_t *ctx, 02204 apr_pool_t *pool); 02205 02206 /** 02207 * Similar to svn_client_commit5(), but returns the commit info in 02208 * @a *commit_info_p rather than through a callback function. Does not use 02209 * #svn_wc_notify_commit_copied or #svn_wc_notify_commit_copied_replaced 02210 * (preferring #svn_wc_notify_commit_added and 02211 * #svn_wc_notify_commit_replaced, respectively, instead). 02212 * 02213 * Also, if no error is returned and @a (*commit_info_p)->revision is set to 02214 * #SVN_INVALID_REVNUM, then the commit was a no-op; nothing needed to 02215 * be committed. 02216 * 02217 * Sets @a commit_as_operations to FALSE to match Subversion 1.6's behavior. 02218 * 02219 * @since New in 1.5. 02220 * @deprecated Provided for backward compatibility with the 1.6 API. 02221 */ 02222 SVN_DEPRECATED 02223 svn_error_t * 02224 svn_client_commit4(svn_commit_info_t **commit_info_p, 02225 const apr_array_header_t *targets, 02226 svn_depth_t depth, 02227 svn_boolean_t keep_locks, 02228 svn_boolean_t keep_changelists, 02229 const apr_array_header_t *changelists, 02230 const apr_hash_t *revprop_table, 02231 svn_client_ctx_t *ctx, 02232 apr_pool_t *pool); 02233 02234 /** 02235 * Similar to svn_client_commit4(), but always with NULL for 02236 * @a changelist_name, FALSE for @a keep_changelist, NULL for @a 02237 * revprop_table, and @a depth set according to @a recurse: if @a 02238 * recurse is TRUE, use #svn_depth_infinity, else #svn_depth_empty. 02239 * 02240 * @deprecated Provided for backward compatibility with the 1.4 API. 02241 * 02242 * @since New in 1.3. 02243 */ 02244 SVN_DEPRECATED 02245 svn_error_t * 02246 svn_client_commit3(svn_commit_info_t **commit_info_p, 02247 const apr_array_header_t *targets, 02248 svn_boolean_t recurse, 02249 svn_boolean_t keep_locks, 02250 svn_client_ctx_t *ctx, 02251 apr_pool_t *pool); 02252 02253 /** 02254 * Similar to svn_client_commit3(), but uses #svn_client_commit_info_t 02255 * for @a commit_info_p. 02256 * 02257 * @deprecated Provided for backward compatibility with the 1.2 API. 02258 * 02259 * @since New in 1.2. 02260 */ 02261 SVN_DEPRECATED 02262 svn_error_t * 02263 svn_client_commit2(svn_client_commit_info_t **commit_info_p, 02264 const apr_array_header_t *targets, 02265 svn_boolean_t recurse, 02266 svn_boolean_t keep_locks, 02267 svn_client_ctx_t *ctx, 02268 apr_pool_t *pool); 02269 02270 /** 02271 * Similar to svn_client_commit2(), but with @a keep_locks set to 02272 * TRUE and @a nonrecursive instead of @a recurse. 02273 * 02274 * @deprecated Provided for backward compatibility with the 1.1 API. 02275 */ 02276 SVN_DEPRECATED 02277 svn_error_t * 02278 svn_client_commit(svn_client_commit_info_t **commit_info_p, 02279 const apr_array_header_t *targets, 02280 svn_boolean_t nonrecursive, 02281 svn_client_ctx_t *ctx, 02282 apr_pool_t *pool); 02283 02284 /** @} */ 02285 02286 /** 02287 * @defgroup Status Report interesting information about paths in the \ 02288 * working copy. 02289 * 02290 * @{ 02291 */ 02292 02293 /** 02294 * Structure for holding the "status" of a working copy item. 02295 * 02296 * @note Fields may be added to the end of this structure in future 02297 * versions. Therefore, to preserve binary compatibility, users 02298 * should not directly allocate structures of this type. 02299 * 02300 * @since New in 1.7. 02301 */ 02302 typedef struct svn_client_status_t 02303 { 02304 /** The kind of node as recorded in the working copy */ 02305 svn_node_kind_t kind; 02306 02307 /** The absolute path to the node */ 02308 const char *local_abspath; 02309 02310 /** The actual size of the working file on disk, or SVN_INVALID_FILESIZE 02311 * if unknown (or if the item isn't a file at all). */ 02312 svn_filesize_t filesize; 02313 02314 /** If the path is under version control, versioned is TRUE, otherwise 02315 * FALSE. */ 02316 svn_boolean_t versioned; 02317 02318 /** Set to TRUE if the node is the victim of some kind of conflict. */ 02319 svn_boolean_t conflicted; 02320 02321 /** The status of the node, based on the restructuring changes and if the 02322 * node has no restructuring changes the text and prop status. */ 02323 enum svn_wc_status_kind node_status; 02324 02325 /** The status of the text of the node, not including restructuring changes. 02326 * Valid values are: svn_wc_status_none, svn_wc_status_normal, 02327 * svn_wc_status_modified and svn_wc_status_conflicted. */ 02328 enum svn_wc_status_kind text_status; 02329 02330 /** The status of the node's properties. 02331 * Valid values are: svn_wc_status_none, svn_wc_status_normal, 02332 * svn_wc_status_modified and svn_wc_status_conflicted. */ 02333 enum svn_wc_status_kind prop_status; 02334 02335 /** A node can be 'locked' if a working copy update is in progress or 02336 * was interrupted. */ 02337 svn_boolean_t wc_is_locked; 02338 02339 /** A file or directory can be 'copied' if it's scheduled for 02340 * addition-with-history (or part of a subtree that is scheduled as such.). 02341 */ 02342 svn_boolean_t copied; 02343 02344 /** The URL of the repository root. */ 02345 const char *repos_root_url; 02346 02347 /** The UUID of the repository */ 02348 const char *repos_uuid; 02349 02350 /** The in-repository path relative to the repository root. */ 02351 const char *repos_relpath; 02352 02353 /** Base revision. */ 02354 svn_revnum_t revision; 02355 02356 /** Last revision this was changed */ 02357 svn_revnum_t changed_rev; 02358 02359 /** Date of last commit. */ 02360 apr_time_t changed_date; 02361 02362 /** Last commit author of this item */ 02363 const char *changed_author; 02364 02365 /** A file or directory can be 'switched' if the switch command has been 02366 * used. If this is TRUE, then file_external will be FALSE. 02367 */ 02368 svn_boolean_t switched; 02369 02370 /** If the item is a file that was added to the working copy with an 02371 * svn:externals; if file_external is TRUE, then switched is always 02372 * FALSE. 02373 */ 02374 svn_boolean_t file_external; 02375 02376 /** The locally present lock. (Values of path, token, owner, comment and 02377 * are available if a lock is present) */ 02378 const svn_lock_t *lock; 02379 02380 /** Which changelist this item is part of, or NULL if not part of any. */ 02381 const char *changelist; 02382 02383 /** The depth of the node as recorded in the working copy 02384 * (#svn_depth_unknown for files or when no depth is recorded) */ 02385 svn_depth_t depth; 02386 02387 /** 02388 * @defgroup svn_wc_status_ood WC out-of-date info from the repository 02389 * @{ 02390 * 02391 * When the working copy item is out-of-date compared to the 02392 * repository, the following fields represent the state of the 02393 * youngest revision of the item in the repository. If the working 02394 * copy is not out of date, the fields are initialized as described 02395 * below. 02396 */ 02397 02398 /** Set to the node kind of the youngest commit, or #svn_node_none 02399 * if not out of date. */ 02400 svn_node_kind_t ood_kind; 02401 02402 /** The status of the node, based on the text status if the node has no 02403 * restructuring changes */ 02404 enum svn_wc_status_kind repos_node_status; 02405 02406 /** The node's text status in the repository. */ 02407 enum svn_wc_status_kind repos_text_status; 02408 02409 /** The node's property status in the repository. */ 02410 enum svn_wc_status_kind repos_prop_status; 02411 02412 /** The node's lock in the repository, if any. */ 02413 const svn_lock_t *repos_lock; 02414 02415 /** Set to the youngest committed revision, or #SVN_INVALID_REVNUM 02416 * if not out of date. */ 02417 svn_revnum_t ood_changed_rev; 02418 02419 /** Set to the most recent commit date, or @c 0 if not out of date. */ 02420 apr_time_t ood_changed_date; 02421 02422 /** Set to the user name of the youngest commit, or @c NULL if not 02423 * out of date or non-existent. Because a non-existent @c 02424 * svn:author property has the same behavior as an out-of-date 02425 * working copy, examine @c ood_changed_rev to determine whether 02426 * the working copy is out of date. */ 02427 const char *ood_changed_author; 02428 02429 /** @} */ 02430 02431 /** Reserved for libsvn_client's internal use; this value is only to be used 02432 * for libsvn_client backwards compatibility wrappers. This value may be NULL 02433 * or to other data in future versions. */ 02434 const void *backwards_compatibility_baton; 02435 02436 /** Set to the local absolute path that this node was moved from, if this 02437 * file or directory has been moved here locally and is the root of that 02438 * move. Otherwise set to NULL. 02439 * 02440 * This will be NULL for moved-here nodes that are just part of a subtree 02441 * that was moved along (and are not themselves a root of a different move 02442 * operation). 02443 * 02444 * @since New in 1.8. */ 02445 const char *moved_from_abspath; 02446 02447 /** Set to the local absolute path that this node was moved to, if this file 02448 * or directory has been moved away locally and corresponds to the root 02449 * of the destination side of the move. Otherwise set to NULL. 02450 * 02451 * Note: Saying just "root" here could be misleading. For example: 02452 * svn mv A AA; 02453 * svn mv AA/B BB; 02454 * creates a situation where A/B is moved-to BB, but one could argue that 02455 * the move source's root actually was AA/B. Note that, as far as the 02456 * working copy is concerned, above case is exactly identical to: 02457 * svn mv A/B BB; 02458 * svn mv A AA; 02459 * In both situations, @a moved_to_abspath would be set for nodes A (moved 02460 * to AA) and A/B (moved to BB), only. 02461 * 02462 * This will be NULL for moved-away nodes that were just part of a subtree 02463 * that was moved along (and are not themselves a root of a different move 02464 * operation). 02465 * 02466 * @since New in 1.8. */ 02467 const char *moved_to_abspath; 02468 02469 /* NOTE! Please update svn_client_status_dup() when adding new fields here. */ 02470 } svn_client_status_t; 02471 02472 /** 02473 * Return a duplicate of @a status, allocated in @a result_pool. No part of the new 02474 * structure will be shared with @a status. 02475 * 02476 * @since New in 1.7. 02477 */ 02478 svn_client_status_t * 02479 svn_client_status_dup(const svn_client_status_t *status, 02480 apr_pool_t *result_pool); 02481 02482 /** 02483 * A callback for reporting a @a status about @a path (which may be an 02484 * absolute or relative path). 02485 * 02486 * @a baton is a closure object; it should be provided by the 02487 * implementation, and passed by the caller. 02488 * 02489 * @a scratch_pool will be cleared between invocations to the callback. 02490 * 02491 * @since New in 1.7. 02492 */ 02493 typedef svn_error_t *(*svn_client_status_func_t)( 02494 void *baton, 02495 const char *path, 02496 const svn_client_status_t *status, 02497 apr_pool_t *scratch_pool); 02498 02499 /** 02500 * Given @a path to a working copy directory (or single file), call 02501 * @a status_func/status_baton with a set of #svn_wc_status_t * 02502 * structures which describe the status of @a path, and its children 02503 * (recursing according to @a depth). 02504 * 02505 * - If @a get_all is set, retrieve all entries; otherwise, 02506 * retrieve only "interesting" entries (local mods and/or 02507 * out of date). 02508 * 02509 * - If @a check_out_of_date is set, contact the repository and 02510 * augment the status structures with information about 02511 * out-of-dateness (with respect to @a revision). Also, if @a 02512 * result_rev is not @c NULL, set @a *result_rev to the actual 02513 * revision against which the working copy was compared (@a 02514 * *result_rev is not meaningful unless @a check_out_of_date is 02515 * set). 02516 * 02517 * - If @a check_working_copy is not set, do not scan the working 02518 * copy for local modifications. This parameter will be ignored 02519 * unless @a check_out_of_date is set. When set, the status 02520 * report will not contain any information about local changes in 02521 * the working copy; this includes local deletions and 02522 * replacements. 02523 * 02524 * If @a no_ignore is @c FALSE, don't report any file or directory (or 02525 * recurse into any directory) that is found by recursion (as opposed to 02526 * being the explicit target @a path) and whose name matches the 02527 * svn:ignore property on its parent directory or the global-ignores 02528 * list in @a ctx->config. If @a no_ignore is @c TRUE, report each such 02529 * file or directory with the status code #svn_wc_status_ignored. 02530 * 02531 * If @a ignore_externals is not set, then recurse into externals 02532 * definitions (if any exist) after handling the main target. This 02533 * calls the client notification function (in @a ctx) with the 02534 * #svn_wc_notify_status_external action before handling each externals 02535 * definition, and with #svn_wc_notify_status_completed 02536 * after each. 02537 * 02538 * If @a depth_as_sticky is set and @a depth is not 02539 * #svn_depth_unknown, then the status is calculated as if depth_is_sticky 02540 * was passed to an equivalent update command. 02541 * 02542 * @a changelists is an array of <tt>const char *</tt> changelist 02543 * names, used as a restrictive filter on items whose statuses are 02544 * reported; that is, don't report status about any item unless 02545 * it's a member of one of those changelists. If @a changelists is 02546 * empty (or altogether @c NULL), no changelist filtering occurs. 02547 * 02548 * If @a path is an absolute path then the @c path parameter passed in each 02549 * call to @a status_func will be an absolute path. 02550 * 02551 * All temporary allocations are performed in @a scratch_pool. 02552 * 02553 * @since New in 1.9. 02554 */ 02555 svn_error_t * 02556 svn_client_status6(svn_revnum_t *result_rev, 02557 svn_client_ctx_t *ctx, 02558 const char *path, 02559 const svn_opt_revision_t *revision, 02560 svn_depth_t depth, 02561 svn_boolean_t get_all, 02562 svn_boolean_t check_out_of_date, 02563 svn_boolean_t check_working_copy, 02564 svn_boolean_t no_ignore, 02565 svn_boolean_t ignore_externals, 02566 svn_boolean_t depth_as_sticky, 02567 const apr_array_header_t *changelists, 02568 svn_client_status_func_t status_func, 02569 void *status_baton, 02570 apr_pool_t *scratch_pool); 02571 02572 02573 /** 02574 * Same as svn_client_status6(), but with @a check_out_of_date set to 02575 * @a update and @a check_working_copy set to @c TRUE. 02576 * 02577 * @since New in 1.7. 02578 * @deprecated Provided for backward compatibility with the 1.8 API. 02579 */ 02580 SVN_DEPRECATED 02581 svn_error_t * 02582 svn_client_status5(svn_revnum_t *result_rev, 02583 svn_client_ctx_t *ctx, 02584 const char *path, 02585 const svn_opt_revision_t *revision, 02586 svn_depth_t depth, 02587 svn_boolean_t get_all, 02588 svn_boolean_t update, 02589 svn_boolean_t no_ignore, 02590 svn_boolean_t ignore_externals, 02591 svn_boolean_t depth_as_sticky, 02592 const apr_array_header_t *changelists, 02593 svn_client_status_func_t status_func, 02594 void *status_baton, 02595 apr_pool_t *scratch_pool); 02596 02597 /** 02598 * Same as svn_client_status5(), but using #svn_wc_status_func3_t 02599 * instead of #svn_client_status_func_t and depth_as_sticky set to TRUE. 02600 * 02601 * @since New in 1.6. 02602 * @deprecated Provided for backward compatibility with the 1.6 API. 02603 */ 02604 SVN_DEPRECATED 02605 svn_error_t * 02606 svn_client_status4(svn_revnum_t *result_rev, 02607 const char *path, 02608 const svn_opt_revision_t *revision, 02609 svn_wc_status_func3_t status_func, 02610 void *status_baton, 02611 svn_depth_t depth, 02612 svn_boolean_t get_all, 02613 svn_boolean_t update, 02614 svn_boolean_t no_ignore, 02615 svn_boolean_t ignore_externals, 02616 const apr_array_header_t *changelists, 02617 svn_client_ctx_t *ctx, 02618 apr_pool_t *pool); 02619 02620 /** 02621 * Same as svn_client_status4(), but using an #svn_wc_status_func2_t 02622 * instead of an #svn_wc_status_func3_t. 02623 * 02624 * @since New in 1.5. 02625 * @deprecated Provided for backward compatibility with the 1.5 API. 02626 */ 02627 SVN_DEPRECATED 02628 svn_error_t * 02629 svn_client_status3(svn_revnum_t *result_rev, 02630 const char *path, 02631 const svn_opt_revision_t *revision, 02632 svn_wc_status_func2_t status_func, 02633 void *status_baton, 02634 svn_depth_t depth, 02635 svn_boolean_t get_all, 02636 svn_boolean_t update, 02637 svn_boolean_t no_ignore, 02638 svn_boolean_t ignore_externals, 02639 const apr_array_header_t *changelists, 02640 svn_client_ctx_t *ctx, 02641 apr_pool_t *pool); 02642 02643 /** 02644 * Like svn_client_status3(), except with @a changelists passed as @c 02645 * NULL, and with @a recurse instead of @a depth. If @a recurse is 02646 * TRUE, behave as if for #svn_depth_infinity; else if @a recurse is 02647 * FALSE, behave as if for #svn_depth_immediates. 02648 * 02649 * @since New in 1.2. 02650 * @deprecated Provided for backward compatibility with the 1.4 API. 02651 */ 02652 SVN_DEPRECATED 02653 svn_error_t * 02654 svn_client_status2(svn_revnum_t *result_rev, 02655 const char *path, 02656 const svn_opt_revision_t *revision, 02657 svn_wc_status_func2_t status_func, 02658 void *status_baton, 02659 svn_boolean_t recurse, 02660 svn_boolean_t get_all, 02661 svn_boolean_t update, 02662 svn_boolean_t no_ignore, 02663 svn_boolean_t ignore_externals, 02664 svn_client_ctx_t *ctx, 02665 apr_pool_t *pool); 02666 02667 02668 /** 02669 * Similar to svn_client_status2(), but with @a ignore_externals 02670 * always set to FALSE, taking the #svn_wc_status_func_t type 02671 * instead of the #svn_wc_status_func2_t type for @a status_func, 02672 * and requiring @a *revision to be non-const even though it is 02673 * treated as constant. 02674 * 02675 * @deprecated Provided for backward compatibility with the 1.1 API. 02676 */ 02677 SVN_DEPRECATED 02678 svn_error_t * 02679 svn_client_status(svn_revnum_t *result_rev, 02680 const char *path, 02681 svn_opt_revision_t *revision, 02682 svn_wc_status_func_t status_func, 02683 void *status_baton, 02684 svn_boolean_t recurse, 02685 svn_boolean_t get_all, 02686 svn_boolean_t update, 02687 svn_boolean_t no_ignore, 02688 svn_client_ctx_t *ctx, 02689 apr_pool_t *pool); 02690 02691 /** @} */ 02692 02693 /** 02694 * @defgroup Log View information about previous revisions of an object. 02695 * 02696 * @{ 02697 */ 02698 02699 /** 02700 * Invoke @a receiver with @a receiver_baton on each log message from 02701 * each (#svn_opt_revision_range_t *) range in @a revision_ranges in turn, 02702 * inclusive (but never invoke @a receiver on a given log message more 02703 * than once). 02704 * 02705 * @a targets contains either a URL followed by zero or more relative 02706 * paths, or 1 working copy path, as <tt>const char *</tt>, for which log 02707 * messages are desired. @a receiver is invoked only on messages whose 02708 * revisions involved a change to some path in @a targets. @a peg_revision 02709 * indicates in which revision @a targets are valid. If @a peg_revision is 02710 * #svn_opt_revision_unspecified, it defaults to #svn_opt_revision_head 02711 * for URLs or #svn_opt_revision_working for WC paths. 02712 * 02713 * If @a limit is greater than zero only invoke @a receiver on the first 02714 * @a limit logs. 02715 * 02716 * If @a discover_changed_paths is set, then the @c changed_paths and @c 02717 * changed_paths2 fields in the @c log_entry argument to @a receiver will be 02718 * populated on each invocation. @note The @c text_modified and @c 02719 * props_modified fields of the changed paths structure may have the value 02720 * #svn_tristate_unknown if the repository does not report that information. 02721 * 02722 * If @a strict_node_history is set, copy history (if any exists) will 02723 * not be traversed while harvesting revision logs for each target. 02724 * 02725 * If @a include_merged_revisions is set, log information for revisions 02726 * which have been merged to @a targets will also be returned. 02727 * 02728 * If @a revprops is NULL, retrieve all revision properties; else, retrieve 02729 * only the revision properties named by the (const char *) array elements 02730 * (i.e. retrieve none if the array is empty). 02731 * 02732 * Use @a pool for any temporary allocation. 02733 * 02734 * If @a ctx->notify_func2 is non-NULL, then call @a ctx->notify_func2/baton2 02735 * with a 'skip' signal on any unversioned targets. 02736 * 02737 * @since New in 1.6. 02738 */ 02739 svn_error_t * 02740 svn_client_log5(const apr_array_header_t *targets, 02741 const svn_opt_revision_t *peg_revision, 02742 const apr_array_header_t *revision_ranges, 02743 int limit, 02744 svn_boolean_t discover_changed_paths, 02745 svn_boolean_t strict_node_history, 02746 svn_boolean_t include_merged_revisions, 02747 const apr_array_header_t *revprops, 02748 svn_log_entry_receiver_t receiver, 02749 void *receiver_baton, 02750 svn_client_ctx_t *ctx, 02751 apr_pool_t *pool); 02752 02753 /** 02754 * Similar to svn_client_log5(), but takes explicit start and end parameters 02755 * instead of an array of revision ranges. 02756 * 02757 * @deprecated Provided for compatibility with the 1.5 API. 02758 * @since New in 1.5. 02759 */ 02760 SVN_DEPRECATED 02761 svn_error_t * 02762 svn_client_log4(const apr_array_header_t *targets, 02763 const svn_opt_revision_t *peg_revision, 02764 const svn_opt_revision_t *start, 02765 const svn_opt_revision_t *end, 02766 int limit, 02767 svn_boolean_t discover_changed_paths, 02768 svn_boolean_t strict_node_history, 02769 svn_boolean_t include_merged_revisions, 02770 const apr_array_header_t *revprops, 02771 svn_log_entry_receiver_t receiver, 02772 void *receiver_baton, 02773 svn_client_ctx_t *ctx, 02774 apr_pool_t *pool); 02775 02776 /** 02777 * Similar to svn_client_log4(), but using #svn_log_message_receiver_t 02778 * instead of #svn_log_entry_receiver_t. Also, @a 02779 * include_merged_revisions is set to @c FALSE and @a revprops is 02780 * svn:author, svn:date, and svn:log. 02781 * 02782 * @deprecated Provided for compatibility with the 1.4 API. 02783 * @since New in 1.4. 02784 */ 02785 SVN_DEPRECATED 02786 svn_error_t * 02787 svn_client_log3(const apr_array_header_t *targets, 02788 const svn_opt_revision_t *peg_revision, 02789 const svn_opt_revision_t *start, 02790 const svn_opt_revision_t *end, 02791 int limit, 02792 svn_boolean_t discover_changed_paths, 02793 svn_boolean_t strict_node_history, 02794 svn_log_message_receiver_t receiver, 02795 void *receiver_baton, 02796 svn_client_ctx_t *ctx, 02797 apr_pool_t *pool); 02798 02799 02800 /** 02801 * Similar to svn_client_log3(), but with the @c kind field of 02802 * @a peg_revision set to #svn_opt_revision_unspecified. 02803 * 02804 * @par Important: 02805 * A special case for the revision range HEAD:1, which was present 02806 * in svn_client_log(), has been removed from svn_client_log2(). Instead, it 02807 * is expected that callers will specify the range HEAD:0, to avoid a 02808 * #SVN_ERR_FS_NO_SUCH_REVISION error when invoked against an empty repository 02809 * (i.e. one not containing a revision 1). 02810 * 02811 * @deprecated Provided for compatibility with the 1.3 API. 02812 * @since New in 1.2. 02813 */ 02814 SVN_DEPRECATED 02815 svn_error_t * 02816 svn_client_log2(const apr_array_header_t *targets, 02817 const svn_opt_revision_t *start, 02818 const svn_opt_revision_t *end, 02819 int limit, 02820 svn_boolean_t discover_changed_paths, 02821 svn_boolean_t strict_node_history, 02822 svn_log_message_receiver_t receiver, 02823 void *receiver_baton, 02824 svn_client_ctx_t *ctx, 02825 apr_pool_t *pool); 02826 02827 02828 /** 02829 * Similar to svn_client_log2(), but with @a limit set to 0, and the 02830 * following special case: 02831 * 02832 * Special case for repositories at revision 0: 02833 * 02834 * If @a start->kind is #svn_opt_revision_head, and @a end->kind is 02835 * #svn_opt_revision_number && @a end->number is @c 1, then handle an 02836 * empty (no revisions) repository specially: instead of erroring 02837 * because requested revision 1 when the highest revision is 0, just 02838 * invoke @a receiver on revision 0, passing @c NULL for changed paths and 02839 * empty strings for the author and date. This is because that 02840 * particular combination of @a start and @a end usually indicates the 02841 * common case of log invocation -- the user wants to see all log 02842 * messages from youngest to oldest, where the oldest commit is 02843 * revision 1. That works fine, except when there are no commits in 02844 * the repository, hence this special case. 02845 * 02846 * @deprecated Provided for backward compatibility with the 1.1 API. 02847 */ 02848 SVN_DEPRECATED 02849 svn_error_t * 02850 svn_client_log(const apr_array_header_t *targets, 02851 const svn_opt_revision_t *start, 02852 const svn_opt_revision_t *end, 02853 svn_boolean_t discover_changed_paths, 02854 svn_boolean_t strict_node_history, 02855 svn_log_message_receiver_t receiver, 02856 void *receiver_baton, 02857 svn_client_ctx_t *ctx, 02858 apr_pool_t *pool); 02859 02860 /** @} */ 02861 02862 /** 02863 * @defgroup Blame Show modification information about lines in a file. 02864 * 02865 * @{ 02866 */ 02867 02868 /** 02869 * Invoke @a receiver with @a receiver_baton on each line-blame item 02870 * associated with revision @a end of @a path_or_url, using @a start 02871 * as the default source of all blame. @a peg_revision indicates in 02872 * which revision @a path_or_url is valid. If @a peg_revision->kind 02873 * is #svn_opt_revision_unspecified, then it defaults to 02874 * #svn_opt_revision_head for URLs or #svn_opt_revision_working for 02875 * WC targets. 02876 * 02877 * If @a start->kind or @a end->kind is #svn_opt_revision_unspecified, 02878 * return the error #SVN_ERR_CLIENT_BAD_REVISION. If either are 02879 * #svn_opt_revision_working, return the error 02880 * #SVN_ERR_UNSUPPORTED_FEATURE. If any of the revisions of @a 02881 * path_or_url have a binary mime-type, return the error 02882 * #SVN_ERR_CLIENT_IS_BINARY_FILE, unless @a ignore_mime_type is TRUE, 02883 * in which case blame information will be generated regardless of the 02884 * MIME types of the revisions. 02885 * 02886 * @a start may resolve to a revision number greater (younger) than @a end 02887 * only if the server is 1.8.0 or greater (supports 02888 * #SVN_RA_CAPABILITY_GET_FILE_REVS_REVERSE) and the client is 1.9.0 or 02889 * newer. 02890 * 02891 * Use @a diff_options to determine how to compare different revisions of the 02892 * target. 02893 * 02894 * If @a include_merged_revisions is TRUE, also return data based upon 02895 * revisions which have been merged to @a path_or_url. 02896 * 02897 * Use @a pool for any temporary allocation. 02898 * 02899 * @since New in 1.7. 02900 */ 02901 svn_error_t * 02902 svn_client_blame5(const char *path_or_url, 02903 const svn_opt_revision_t *peg_revision, 02904 const svn_opt_revision_t *start, 02905 const svn_opt_revision_t *end, 02906 const svn_diff_file_options_t *diff_options, 02907 svn_boolean_t ignore_mime_type, 02908 svn_boolean_t include_merged_revisions, 02909 svn_client_blame_receiver3_t receiver, 02910 void *receiver_baton, 02911 svn_client_ctx_t *ctx, 02912 apr_pool_t *pool); 02913 02914 02915 /** 02916 * Similar to svn_client_blame5(), but with #svn_client_blame_receiver3_t 02917 * as the receiver. 02918 * 02919 * @deprecated Provided for backwards compatibility with the 1.6 API. 02920 * 02921 * @since New in 1.5. 02922 */ 02923 SVN_DEPRECATED 02924 svn_error_t * 02925 svn_client_blame4(const char *path_or_url, 02926 const svn_opt_revision_t *peg_revision, 02927 const svn_opt_revision_t *start, 02928 const svn_opt_revision_t *end, 02929 const svn_diff_file_options_t *diff_options, 02930 svn_boolean_t ignore_mime_type, 02931 svn_boolean_t include_merged_revisions, 02932 svn_client_blame_receiver2_t receiver, 02933 void *receiver_baton, 02934 svn_client_ctx_t *ctx, 02935 apr_pool_t *pool); 02936 02937 /** 02938 * Similar to svn_client_blame4(), but with @a include_merged_revisions set 02939 * to FALSE, and using a #svn_client_blame_receiver2_t as the receiver. 02940 * 02941 * @deprecated Provided for backwards compatibility with the 1.4 API. 02942 * 02943 * @since New in 1.4. 02944 */ 02945 SVN_DEPRECATED 02946 svn_error_t * 02947 svn_client_blame3(const char *path_or_url, 02948 const svn_opt_revision_t *peg_revision, 02949 const svn_opt_revision_t *start, 02950 const svn_opt_revision_t *end, 02951 const svn_diff_file_options_t *diff_options, 02952 svn_boolean_t ignore_mime_type, 02953 svn_client_blame_receiver_t receiver, 02954 void *receiver_baton, 02955 svn_client_ctx_t *ctx, 02956 apr_pool_t *pool); 02957 02958 /** 02959 * Similar to svn_client_blame3(), but with @a diff_options set to 02960 * default options as returned by svn_diff_file_options_parse() and 02961 * @a ignore_mime_type set to FALSE. 02962 * 02963 * @deprecated Provided for backwards compatibility with the 1.3 API. 02964 * 02965 * @since New in 1.2. 02966 */ 02967 SVN_DEPRECATED 02968 svn_error_t * 02969 svn_client_blame2(const char *path_or_url, 02970 const svn_opt_revision_t *peg_revision, 02971 const svn_opt_revision_t *start, 02972 const svn_opt_revision_t *end, 02973 svn_client_blame_receiver_t receiver, 02974 void *receiver_baton, 02975 svn_client_ctx_t *ctx, 02976 apr_pool_t *pool); 02977 02978 /** 02979 * Similar to svn_client_blame2() except that @a peg_revision is always 02980 * the same as @a end. 02981 * 02982 * @deprecated Provided for backward compatibility with the 1.1 API. 02983 */ 02984 SVN_DEPRECATED 02985 svn_error_t * 02986 svn_client_blame(const char *path_or_url, 02987 const svn_opt_revision_t *start, 02988 const svn_opt_revision_t *end, 02989 svn_client_blame_receiver_t receiver, 02990 void *receiver_baton, 02991 svn_client_ctx_t *ctx, 02992 apr_pool_t *pool); 02993 02994 /** @} */ 02995 02996 /** 02997 * @defgroup Diff Generate differences between paths. 02998 * 02999 * @{ 03000 */ 03001 03002 /** 03003 * Produce diff output which describes the delta between 03004 * @a path_or_url1/@a revision1 and @a path_or_url2/@a revision2. Print 03005 * the output of the diff to @a outstream, and any errors to @a 03006 * errstream. @a path_or_url1 and @a path_or_url2 can be either 03007 * working-copy paths or URLs. 03008 * 03009 * If @a relative_to_dir is not @c NULL, the original path and 03010 * modified path will have the @a relative_to_dir stripped from the 03011 * front of the respective paths. If @a relative_to_dir is @c NULL, 03012 * paths will not be modified. If @a relative_to_dir is not 03013 * @c NULL but @a relative_to_dir is not a parent path of the target, 03014 * an error is returned. Finally, if @a relative_to_dir is a URL, an 03015 * error will be returned. 03016 * 03017 * If either @a revision1 or @a revision2 has an `unspecified' or 03018 * unrecognized `kind', return #SVN_ERR_CLIENT_BAD_REVISION. 03019 * 03020 * @a path_or_url1 and @a path_or_url2 must both represent the same node 03021 * kind -- that is, if @a path_or_url1 is a directory, @a path_or_url2 03022 * must also be, and if @a path_or_url1 is a file, @a path_or_url2 must 03023 * also be. 03024 * 03025 * If @a depth is #svn_depth_infinity, diff fully recursively. 03026 * Else if it is #svn_depth_immediates, diff the named paths and 03027 * their file children (if any), and diff properties of 03028 * subdirectories, but do not descend further into the subdirectories. 03029 * Else if #svn_depth_files, behave as if for #svn_depth_immediates 03030 * except don't diff properties of subdirectories. If 03031 * #svn_depth_empty, diff exactly the named paths but nothing 03032 * underneath them. 03033 * 03034 * Use @a ignore_ancestry to control whether or not items being 03035 * diffed will be checked for relatedness first. Unrelated items 03036 * are typically transmitted to the editor as a deletion of one thing 03037 * and the addition of another, but if this flag is TRUE, unrelated 03038 * items will be diffed as if they were related. 03039 * 03040 * If @a no_diff_added is TRUE, then no diff output will be generated 03041 * on added files. 03042 * 03043 * If @a no_diff_deleted is TRUE, then no diff output will be 03044 * generated on deleted files. 03045 * 03046 * If @a show_copies_as_adds is TRUE, then copied files will not be diffed 03047 * against their copyfrom source, and will appear in the diff output 03048 * in their entirety, as if they were newly added. 03049 * ### BUGS: For a repos-repos diff, this is ignored. Instead, a file is 03050 * diffed against its copyfrom source iff the file is the diff target 03051 * and not if some parent directory is the diff target. For a repos-WC 03052 * diff, this is ignored if the file is the diff target. 03053 * 03054 * If @a use_git_diff_format is TRUE, then the git's extended diff format 03055 * will be used. 03056 * ### Do we need to say more about the format? A reference perhaps? 03057 * 03058 * If @a ignore_properties is TRUE, do not show property differences. 03059 * If @a properties_only is TRUE, show only property changes. 03060 * The above two options are mutually exclusive. It is an error to set 03061 * both to TRUE. 03062 * 03063 * Generated headers are encoded using @a header_encoding. 03064 * 03065 * Diff output will not be generated for binary files, unless @a 03066 * ignore_content_type is TRUE, in which case diffs will be shown 03067 * regardless of the content types. 03068 * 03069 * @a diff_options (an array of <tt>const char *</tt>) is used to pass 03070 * additional command line options to the diff processes invoked to compare 03071 * files. @a diff_options is allowed to be @c NULL, in which case a value 03072 * for this option might still be obtained from the Subversion configuration 03073 * file via client context @a ctx. 03074 * 03075 * The authentication baton cached in @a ctx is used to communicate with 03076 * the repository. 03077 * 03078 * @a changelists is an array of <tt>const char *</tt> changelist 03079 * names, used as a restrictive filter on items whose differences are 03080 * reported; that is, don't generate diffs about any item unless 03081 * it's a member of one of those changelists. If @a changelists is 03082 * empty (or altogether @c NULL), no changelist filtering occurs. 03083 * 03084 * @note Changelist filtering only applies to diffs in which at least 03085 * one side of the diff represents working copy data. 03086 * 03087 * @note @a header_encoding doesn't affect headers generated by external 03088 * diff programs. 03089 * 03090 * @note @a relative_to_dir doesn't affect the path index generated by 03091 * external diff programs. 03092 * 03093 * @since New in 1.8. 03094 */ 03095 svn_error_t * 03096 svn_client_diff6(const apr_array_header_t *diff_options, 03097 const char *path_or_url1, 03098 const svn_opt_revision_t *revision1, 03099 const char *path_or_url2, 03100 const svn_opt_revision_t *revision2, 03101 const char *relative_to_dir, 03102 svn_depth_t depth, 03103 svn_boolean_t ignore_ancestry, 03104 svn_boolean_t no_diff_added, 03105 svn_boolean_t no_diff_deleted, 03106 svn_boolean_t show_copies_as_adds, 03107 svn_boolean_t ignore_content_type, 03108 svn_boolean_t ignore_properties, 03109 svn_boolean_t properties_only, 03110 svn_boolean_t use_git_diff_format, 03111 const char *header_encoding, 03112 svn_stream_t *outstream, 03113 svn_stream_t *errstream, 03114 const apr_array_header_t *changelists, 03115 svn_client_ctx_t *ctx, 03116 apr_pool_t *pool); 03117 03118 /** Similar to svn_client_diff6(), but with @a outfile and @a errfile, 03119 * instead of @a outstream and @a errstream, and with @a 03120 * no_diff_added, @a ignore_properties, and @a properties_only always 03121 * passed as @c FALSE (which means that additions and property changes 03122 * are always transmitted). 03123 * 03124 * @deprecated Provided for backward compatibility with the 1.7 API. 03125 * @since New in 1.7. 03126 */ 03127 SVN_DEPRECATED 03128 svn_error_t * 03129 svn_client_diff5(const apr_array_header_t *diff_options, 03130 const char *path1, 03131 const svn_opt_revision_t *revision1, 03132 const char *path2, 03133 const svn_opt_revision_t *revision2, 03134 const char *relative_to_dir, 03135 svn_depth_t depth, 03136 svn_boolean_t ignore_ancestry, 03137 svn_boolean_t no_diff_deleted, 03138 svn_boolean_t show_copies_as_adds, 03139 svn_boolean_t ignore_content_type, 03140 svn_boolean_t use_git_diff_format, 03141 const char *header_encoding, 03142 apr_file_t *outfile, 03143 apr_file_t *errfile, 03144 const apr_array_header_t *changelists, 03145 svn_client_ctx_t *ctx, 03146 apr_pool_t *pool); 03147 03148 /** 03149 * Similar to svn_client_diff5(), but with @a show_copies_as_adds set to 03150 * @c FALSE and @a use_git_diff_format set to @c FALSE. 03151 * 03152 * @deprecated Provided for backward compatibility with the 1.6 API. 03153 * @since New in 1.5. 03154 */ 03155 SVN_DEPRECATED 03156 svn_error_t * 03157 svn_client_diff4(const apr_array_header_t *diff_options, 03158 const char *path1, 03159 const svn_opt_revision_t *revision1, 03160 const char *path2, 03161 const svn_opt_revision_t *revision2, 03162 const char *relative_to_dir, 03163 svn_depth_t depth, 03164 svn_boolean_t ignore_ancestry, 03165 svn_boolean_t no_diff_deleted, 03166 svn_boolean_t ignore_content_type, 03167 const char *header_encoding, 03168 apr_file_t *outfile, 03169 apr_file_t *errfile, 03170 const apr_array_header_t *changelists, 03171 svn_client_ctx_t *ctx, 03172 apr_pool_t *pool); 03173 03174 /** 03175 * Similar to svn_client_diff4(), but with @a changelists passed as @c 03176 * NULL, and @a depth set according to @a recurse: if @a recurse is 03177 * TRUE, set @a depth to #svn_depth_infinity, if @a recurse is 03178 * FALSE, set @a depth to #svn_depth_empty. 03179 * 03180 * @deprecated Provided for backward compatibility with the 1.4 API. 03181 * @since New in 1.3. 03182 */ 03183 SVN_DEPRECATED 03184 svn_error_t * 03185 svn_client_diff3(const apr_array_header_t *diff_options, 03186 const char *path1, 03187 const svn_opt_revision_t *revision1, 03188 const char *path2, 03189 const svn_opt_revision_t *revision2, 03190 svn_boolean_t recurse, 03191 svn_boolean_t ignore_ancestry, 03192 svn_boolean_t no_diff_deleted, 03193 svn_boolean_t ignore_content_type, 03194 const char *header_encoding, 03195 apr_file_t *outfile, 03196 apr_file_t *errfile, 03197 svn_client_ctx_t *ctx, 03198 apr_pool_t *pool); 03199 03200 03201 /** 03202 * Similar to svn_client_diff3(), but with @a header_encoding set to 03203 * @c APR_LOCALE_CHARSET. 03204 * 03205 * @deprecated Provided for backward compatibility with the 1.2 API. 03206 * @since New in 1.2. 03207 */ 03208 SVN_DEPRECATED 03209 svn_error_t * 03210 svn_client_diff2(const apr_array_header_t *diff_options, 03211 const char *path1, 03212 const svn_opt_revision_t *revision1, 03213 const char *path2, 03214 const svn_opt_revision_t *revision2, 03215 svn_boolean_t recurse, 03216 svn_boolean_t ignore_ancestry, 03217 svn_boolean_t no_diff_deleted, 03218 svn_boolean_t ignore_content_type, 03219 apr_file_t *outfile, 03220 apr_file_t *errfile, 03221 svn_client_ctx_t *ctx, 03222 apr_pool_t *pool); 03223 03224 /** 03225 * Similar to svn_client_diff2(), but with @a ignore_content_type 03226 * always set to FALSE. 03227 * 03228 * @deprecated Provided for backward compatibility with the 1.1 API. 03229 */ 03230 SVN_DEPRECATED 03231 svn_error_t * 03232 svn_client_diff(const apr_array_header_t *diff_options, 03233 const char *path1, 03234 const svn_opt_revision_t *revision1, 03235 const char *path2, 03236 const svn_opt_revision_t *revision2, 03237 svn_boolean_t recurse, 03238 svn_boolean_t ignore_ancestry, 03239 svn_boolean_t no_diff_deleted, 03240 apr_file_t *outfile, 03241 apr_file_t *errfile, 03242 svn_client_ctx_t *ctx, 03243 apr_pool_t *pool); 03244 03245 /** 03246 * Produce diff output which describes the delta between the filesystem 03247 * object @a path_or_url in peg revision @a peg_revision, as it changed 03248 * between @a start_revision and @a end_revision. @a path_or_url can 03249 * be either a working-copy path or URL. 03250 * 03251 * If @a peg_revision is #svn_opt_revision_unspecified, behave 03252 * identically to svn_client_diff6(), using @a path_or_url for both of that 03253 * function's @a path_or_url1 and @a path_or_url2 arguments. 03254 * 03255 * All other options are handled identically to svn_client_diff6(). 03256 * 03257 * @since New in 1.8. 03258 */ 03259 svn_error_t * 03260 svn_client_diff_peg6(const apr_array_header_t *diff_options, 03261 const char *path_or_url, 03262 const svn_opt_revision_t *peg_revision, 03263 const svn_opt_revision_t *start_revision, 03264 const svn_opt_revision_t *end_revision, 03265 const char *relative_to_dir, 03266 svn_depth_t depth, 03267 svn_boolean_t ignore_ancestry, 03268 svn_boolean_t no_diff_added, 03269 svn_boolean_t no_diff_deleted, 03270 svn_boolean_t show_copies_as_adds, 03271 svn_boolean_t ignore_content_type, 03272 svn_boolean_t ignore_properties, 03273 svn_boolean_t properties_only, 03274 svn_boolean_t use_git_diff_format, 03275 const char *header_encoding, 03276 svn_stream_t *outstream, 03277 svn_stream_t *errstream, 03278 const apr_array_header_t *changelists, 03279 svn_client_ctx_t *ctx, 03280 apr_pool_t *pool); 03281 03282 /** Similar to svn_client_diff6_peg6(), but with @a outfile and @a errfile, 03283 * instead of @a outstream and @a errstream, and with @a 03284 * no_diff_added, @a ignore_properties, and @a properties_only always 03285 * passed as @c FALSE (which means that additions and property changes 03286 * are always transmitted). 03287 * 03288 * @deprecated Provided for backward compatibility with the 1.7 API. 03289 * @since New in 1.7. 03290 */ 03291 SVN_DEPRECATED 03292 svn_error_t * 03293 svn_client_diff_peg5(const apr_array_header_t *diff_options, 03294 const char *path, 03295 const svn_opt_revision_t *peg_revision, 03296 const svn_opt_revision_t *start_revision, 03297 const svn_opt_revision_t *end_revision, 03298 const char *relative_to_dir, 03299 svn_depth_t depth, 03300 svn_boolean_t ignore_ancestry, 03301 svn_boolean_t no_diff_deleted, 03302 svn_boolean_t show_copies_as_adds, 03303 svn_boolean_t ignore_content_type, 03304 svn_boolean_t use_git_diff_format, 03305 const char *header_encoding, 03306 apr_file_t *outfile, 03307 apr_file_t *errfile, 03308 const apr_array_header_t *changelists, 03309 svn_client_ctx_t *ctx, 03310 apr_pool_t *pool); 03311 03312 /** 03313 * Similar to svn_client_diff_peg5(), but with @a show_copies_as_adds set to 03314 * @c FALSE and @a use_git_diff_format set to @c FALSE. 03315 * 03316 * @since New in 1.5. 03317 * @deprecated Provided for backward compatibility with the 1.6 API. 03318 */ 03319 SVN_DEPRECATED 03320 svn_error_t * 03321 svn_client_diff_peg4(const apr_array_header_t *diff_options, 03322 const char *path, 03323 const svn_opt_revision_t *peg_revision, 03324 const svn_opt_revision_t *start_revision, 03325 const svn_opt_revision_t *end_revision, 03326 const char *relative_to_dir, 03327 svn_depth_t depth, 03328 svn_boolean_t ignore_ancestry, 03329 svn_boolean_t no_diff_deleted, 03330 svn_boolean_t ignore_content_type, 03331 const char *header_encoding, 03332 apr_file_t *outfile, 03333 apr_file_t *errfile, 03334 const apr_array_header_t *changelists, 03335 svn_client_ctx_t *ctx, 03336 apr_pool_t *pool); 03337 03338 /** 03339 * Similar to svn_client_diff_peg4(), but with @a changelists passed 03340 * as @c NULL, and @a depth set according to @a recurse: if @a recurse 03341 * is TRUE, set @a depth to #svn_depth_infinity, if @a recurse is 03342 * FALSE, set @a depth to #svn_depth_files. 03343 * 03344 * @deprecated Provided for backward compatibility with the 1.4 API. 03345 * @since New in 1.3. 03346 */ 03347 SVN_DEPRECATED 03348 svn_error_t * 03349 svn_client_diff_peg3(const apr_array_header_t *diff_options, 03350 const char *path, 03351 const svn_opt_revision_t *peg_revision, 03352 const svn_opt_revision_t *start_revision, 03353 const svn_opt_revision_t *end_revision, 03354 svn_boolean_t recurse, 03355 svn_boolean_t ignore_ancestry, 03356 svn_boolean_t no_diff_deleted, 03357 svn_boolean_t ignore_content_type, 03358 const char *header_encoding, 03359 apr_file_t *outfile, 03360 apr_file_t *errfile, 03361 svn_client_ctx_t *ctx, 03362 apr_pool_t *pool); 03363 03364 /** 03365 * Similar to svn_client_diff_peg3(), but with @a header_encoding set to 03366 * @c APR_LOCALE_CHARSET. 03367 * 03368 * @deprecated Provided for backward compatibility with the 1.2 API. 03369 * @since New in 1.2. 03370 */ 03371 SVN_DEPRECATED 03372 svn_error_t * 03373 svn_client_diff_peg2(const apr_array_header_t *diff_options, 03374 const char *path, 03375 const svn_opt_revision_t *peg_revision, 03376 const svn_opt_revision_t *start_revision, 03377 const svn_opt_revision_t *end_revision, 03378 svn_boolean_t recurse, 03379 svn_boolean_t ignore_ancestry, 03380 svn_boolean_t no_diff_deleted, 03381 svn_boolean_t ignore_content_type, 03382 apr_file_t *outfile, 03383 apr_file_t *errfile, 03384 svn_client_ctx_t *ctx, 03385 apr_pool_t *pool); 03386 03387 /** 03388 * Similar to svn_client_diff_peg2(), but with @a ignore_content_type 03389 * always set to FALSE. 03390 * 03391 * @since New in 1.1. 03392 * @deprecated Provided for backward compatibility with the 1.1 API. 03393 */ 03394 SVN_DEPRECATED 03395 svn_error_t * 03396 svn_client_diff_peg(const apr_array_header_t *diff_options, 03397 const char *path, 03398 const svn_opt_revision_t *peg_revision, 03399 const svn_opt_revision_t *start_revision, 03400 const svn_opt_revision_t *end_revision, 03401 svn_boolean_t recurse, 03402 svn_boolean_t ignore_ancestry, 03403 svn_boolean_t no_diff_deleted, 03404 apr_file_t *outfile, 03405 apr_file_t *errfile, 03406 svn_client_ctx_t *ctx, 03407 apr_pool_t *pool); 03408 03409 /** 03410 * Produce a diff summary which lists the changed items between 03411 * @a path_or_url1/@a revision1 and @a path_or_url2/@a revision2 without 03412 * creating text deltas. @a path_or_url1 and @a path_or_url2 can be 03413 * either working-copy paths or URLs. 03414 * 03415 * The function may report false positives if @a ignore_ancestry is false, 03416 * since a file might have been modified between two revisions, but still 03417 * have the same contents. 03418 * 03419 * Calls @a summarize_func with @a summarize_baton for each difference 03420 * with a #svn_client_diff_summarize_t structure describing the difference. 03421 * 03422 * See svn_client_diff6() for a description of the other parameters. 03423 * 03424 * @since New in 1.5. 03425 */ 03426 svn_error_t * 03427 svn_client_diff_summarize2(const char *path_or_url1, 03428 const svn_opt_revision_t *revision1, 03429 const char *path_or_url2, 03430 const svn_opt_revision_t *revision2, 03431 svn_depth_t depth, 03432 svn_boolean_t ignore_ancestry, 03433 const apr_array_header_t *changelists, 03434 svn_client_diff_summarize_func_t summarize_func, 03435 void *summarize_baton, 03436 svn_client_ctx_t *ctx, 03437 apr_pool_t *pool); 03438 03439 /** 03440 * Similar to svn_client_diff_summarize2(), but with @a changelists 03441 * passed as @c NULL, and @a depth set according to @a recurse: if @a 03442 * recurse is TRUE, set @a depth to #svn_depth_infinity, if @a 03443 * recurse is FALSE, set @a depth to #svn_depth_files. 03444 * 03445 * @deprecated Provided for backward compatibility with the 1.4 API. 03446 * 03447 * @since New in 1.4. 03448 */ 03449 SVN_DEPRECATED 03450 svn_error_t * 03451 svn_client_diff_summarize(const char *path1, 03452 const svn_opt_revision_t *revision1, 03453 const char *path2, 03454 const svn_opt_revision_t *revision2, 03455 svn_boolean_t recurse, 03456 svn_boolean_t ignore_ancestry, 03457 svn_client_diff_summarize_func_t summarize_func, 03458 void *summarize_baton, 03459 svn_client_ctx_t *ctx, 03460 apr_pool_t *pool); 03461 03462 /** 03463 * Produce a diff summary which lists the changed items between the 03464 * filesystem object @a path_or_url in peg revision @a peg_revision, as it 03465 * changed between @a start_revision and @a end_revision. @a path_or_url can 03466 * be either a working-copy path or URL. 03467 * 03468 * If @a peg_revision is #svn_opt_revision_unspecified, behave 03469 * identically to svn_client_diff_summarize2(), using @a path_or_url for 03470 * both of that function's @a path_or_url1 and @a path_or_url2 arguments. 03471 * 03472 * The function may report false positives if @a ignore_ancestry is false, 03473 * as described in the documentation for svn_client_diff_summarize2(). 03474 * 03475 * Call @a summarize_func with @a summarize_baton for each difference 03476 * with a #svn_client_diff_summarize_t structure describing the difference. 03477 * 03478 * See svn_client_diff_peg5() for a description of the other parameters. 03479 * 03480 * @since New in 1.5. 03481 */ 03482 svn_error_t * 03483 svn_client_diff_summarize_peg2(const char *path_or_url, 03484 const svn_opt_revision_t *peg_revision, 03485 const svn_opt_revision_t *start_revision, 03486 const svn_opt_revision_t *end_revision, 03487 svn_depth_t depth, 03488 svn_boolean_t ignore_ancestry, 03489 const apr_array_header_t *changelists, 03490 svn_client_diff_summarize_func_t summarize_func, 03491 void *summarize_baton, 03492 svn_client_ctx_t *ctx, 03493 apr_pool_t *pool); 03494 03495 /** 03496 * Similar to svn_client_diff_summarize_peg2(), but with @a 03497 * changelists passed as @c NULL, and @a depth set according to @a 03498 * recurse: if @a recurse is TRUE, set @a depth to 03499 * #svn_depth_infinity, if @a recurse is FALSE, set @a depth to 03500 * #svn_depth_files. 03501 * 03502 * @deprecated Provided for backward compatibility with the 1.4 API. 03503 * 03504 * @since New in 1.4. 03505 */ 03506 SVN_DEPRECATED 03507 svn_error_t * 03508 svn_client_diff_summarize_peg(const char *path, 03509 const svn_opt_revision_t *peg_revision, 03510 const svn_opt_revision_t *start_revision, 03511 const svn_opt_revision_t *end_revision, 03512 svn_boolean_t recurse, 03513 svn_boolean_t ignore_ancestry, 03514 svn_client_diff_summarize_func_t summarize_func, 03515 void *summarize_baton, 03516 svn_client_ctx_t *ctx, 03517 apr_pool_t *pool); 03518 03519 /** @} */ 03520 03521 /** 03522 * @defgroup Merge Merge changes between branches. 03523 * 03524 * @{ 03525 */ 03526 03527 /** Get information about the state of merging between two branches. 03528 * 03529 * The source is specified by @a source_path_or_url at @a source_revision. 03530 * The target is specified by @a target_path_or_url at @a target_revision, 03531 * which refers to either a WC or a repository location. 03532 * 03533 * Set @a *needs_reintegration to true if an automatic merge from source 03534 * to target would be a reintegration merge: that is, if the last automatic 03535 * merge was in the opposite direction; or to false otherwise. 03536 * 03537 * Set @a *yca_url, @a *yca_rev, @a *base_url, @a *base_rev, @a *right_url, 03538 * @a *right_rev, @a *target_url, @a *target_rev to the repository locations 03539 * of, respectively: the youngest common ancestor of the branches, the base 03540 * chosen for 3-way merge, the right-hand side of the source diff, and the 03541 * target. 03542 * 03543 * Set @a repos_root_url to the URL of the repository root. This is a 03544 * common prefix of all four URL outputs. 03545 * 03546 * Allocate the results in @a result_pool. Any of the output pointers may 03547 * be NULL if not wanted. 03548 * 03549 * @since New in 1.8. 03550 */ 03551 svn_error_t * 03552 svn_client_get_merging_summary(svn_boolean_t *needs_reintegration, 03553 const char **yca_url, svn_revnum_t *yca_rev, 03554 const char **base_url, svn_revnum_t *base_rev, 03555 const char **right_url, svn_revnum_t *right_rev, 03556 const char **target_url, svn_revnum_t *target_rev, 03557 const char **repos_root_url, 03558 const char *source_path_or_url, 03559 const svn_opt_revision_t *source_revision, 03560 const char *target_path_or_url, 03561 const svn_opt_revision_t *target_revision, 03562 svn_client_ctx_t *ctx, 03563 apr_pool_t *result_pool, 03564 apr_pool_t *scratch_pool); 03565 03566 03567 /** Merge changes from @a source1/@a revision1 to @a source2/@a revision2 into 03568 * the working-copy path @a target_wcpath. 03569 * 03570 * @a source1 and @a source2 are either URLs that refer to entries in the 03571 * repository, or paths to entries in the working copy. 03572 * 03573 * By "merging", we mean: apply file differences using 03574 * svn_wc_merge(), and schedule additions & deletions when appropriate. 03575 * 03576 * @a source1 and @a source2 must both represent the same node kind -- that 03577 * is, if @a source1 is a directory, @a source2 must also be, and if @a source1 03578 * is a file, @a source2 must also be. 03579 * 03580 * If either @a revision1 or @a revision2 has an `unspecified' or 03581 * unrecognized `kind', return #SVN_ERR_CLIENT_BAD_REVISION. 03582 * 03583 * If @a depth is #svn_depth_infinity, merge fully recursively. 03584 * Else if #svn_depth_immediates, merge changes at most to files 03585 * that are immediate children of @a target_wcpath and to directory 03586 * properties of @a target_wcpath and its immediate subdirectory children. 03587 * Else if #svn_depth_files, merge at most to immediate file 03588 * children of @a target_wcpath and to @a target_wcpath itself. 03589 * Else if #svn_depth_empty, apply changes only to @a target_wcpath 03590 * (i.e., directory property changes only) 03591 * 03592 * If @a depth is #svn_depth_unknown, use the depth of @a target_wcpath. 03593 * 03594 * If @a ignore_mergeinfo is true, disable merge tracking, by treating the 03595 * two sources as unrelated even if they actually have a common ancestor. 03596 * 03597 * If @a diff_ignore_ancestry is true, diff unrelated nodes as if related: 03598 * that is, diff the 'left' and 'right' versions of a node as if they were 03599 * related (if they are the same kind) even if they are not related. 03600 * Otherwise, diff unrelated items as a deletion of one thing and the 03601 * addition of another. 03602 * 03603 * If @a force_delete is false and the merge involves deleting a file whose 03604 * content differs from the source-left version, or a locally modified 03605 * directory, or an unversioned item, then the operation will fail. If 03606 * @a force_delete is true then all such items will be deleted. 03607 * 03608 * @a merge_options (an array of <tt>const char *</tt>), if non-NULL, 03609 * is used to pass additional command line arguments to the merge 03610 * processes (internal or external). @see 03611 * svn_diff_file_options_parse(). 03612 * 03613 * If @a ctx->notify_func2 is non-NULL, then call @a ctx->notify_func2 with @a 03614 * ctx->notify_baton2 once for each merged target, passing the target's local 03615 * path. 03616 * 03617 * If @a record_only is TRUE, the merge is performed, but is limited only to 03618 * mergeinfo property changes on existing paths in @a target_wcpath. 03619 * 03620 * If @a dry_run is TRUE, the merge is carried out, and full notification 03621 * feedback is provided, but the working copy is not modified. 03622 * 03623 * If allow_mixed_rev is @c FALSE, and @a merge_target is a mixed-revision 03624 * working copy, raise @c SVN_ERR_CLIENT_MERGE_UPDATE_REQUIRED. 03625 * Because users rarely intend to merge into mixed-revision working copies, 03626 * it is recommended to set this parameter to FALSE by default unless the 03627 * user has explicitly requested a merge into a mixed-revision working copy. 03628 * 03629 * The authentication baton cached in @a ctx is used to communicate with the 03630 * repository. 03631 * 03632 * @since New in 1.8. 03633 */ 03634 svn_error_t * 03635 svn_client_merge5(const char *source1, 03636 const svn_opt_revision_t *revision1, 03637 const char *source2, 03638 const svn_opt_revision_t *revision2, 03639 const char *target_wcpath, 03640 svn_depth_t depth, 03641 svn_boolean_t ignore_mergeinfo, 03642 svn_boolean_t diff_ignore_ancestry, 03643 svn_boolean_t force_delete, 03644 svn_boolean_t record_only, 03645 svn_boolean_t dry_run, 03646 svn_boolean_t allow_mixed_rev, 03647 const apr_array_header_t *merge_options, 03648 svn_client_ctx_t *ctx, 03649 apr_pool_t *pool); 03650 03651 /** 03652 * Similar to svn_client_merge5(), but the single @a ignore_ancestry 03653 * parameter maps to both @c ignore_mergeinfo and @c diff_ignore_ancestry. 03654 * 03655 * @deprecated Provided for backward compatibility with the 1.7 API. 03656 * @since New in 1.7. 03657 */ 03658 SVN_DEPRECATED 03659 svn_error_t * 03660 svn_client_merge4(const char *source1, 03661 const svn_opt_revision_t *revision1, 03662 const char *source2, 03663 const svn_opt_revision_t *revision2, 03664 const char *target_wcpath, 03665 svn_depth_t depth, 03666 svn_boolean_t ignore_ancestry, 03667 svn_boolean_t force_delete, 03668 svn_boolean_t record_only, 03669 svn_boolean_t dry_run, 03670 svn_boolean_t allow_mixed_rev, 03671 const apr_array_header_t *merge_options, 03672 svn_client_ctx_t *ctx, 03673 apr_pool_t *pool); 03674 03675 /** 03676 * Similar to svn_client_merge4(), but with @a allow_mixed_rev set to 03677 * @c TRUE. The @a force parameter maps to the @c force_delete parameter 03678 * of svn_client_merge4(). 03679 * 03680 * @deprecated Provided for backward compatibility with the 1.6 API. 03681 * 03682 * @since New in 1.5. 03683 */ 03684 SVN_DEPRECATED 03685 svn_error_t * 03686 svn_client_merge3(const char *source1, 03687 const svn_opt_revision_t *revision1, 03688 const char *source2, 03689 const svn_opt_revision_t *revision2, 03690 const char *target_wcpath, 03691 svn_depth_t depth, 03692 svn_boolean_t ignore_ancestry, 03693 svn_boolean_t force, 03694 svn_boolean_t record_only, 03695 svn_boolean_t dry_run, 03696 const apr_array_header_t *merge_options, 03697 svn_client_ctx_t *ctx, 03698 apr_pool_t *pool); 03699 03700 /** 03701 * Similar to svn_client_merge3(), but with @a record_only set to @c 03702 * FALSE, and @a depth set according to @a recurse: if @a recurse is 03703 * TRUE, set @a depth to #svn_depth_infinity, if @a recurse is 03704 * FALSE, set @a depth to #svn_depth_files. 03705 * 03706 * @deprecated Provided for backward compatibility with the 1.4 API. 03707 * 03708 * @since New in 1.4. 03709 */ 03710 SVN_DEPRECATED 03711 svn_error_t * 03712 svn_client_merge2(const char *source1, 03713 const svn_opt_revision_t *revision1, 03714 const char *source2, 03715 const svn_opt_revision_t *revision2, 03716 const char *target_wcpath, 03717 svn_boolean_t recurse, 03718 svn_boolean_t ignore_ancestry, 03719 svn_boolean_t force, 03720 svn_boolean_t dry_run, 03721 const apr_array_header_t *merge_options, 03722 svn_client_ctx_t *ctx, 03723 apr_pool_t *pool); 03724 03725 03726 /** 03727 * Similar to svn_client_merge2(), but with @a merge_options set to NULL. 03728 * 03729 * @deprecated Provided for backwards compatibility with the 1.3 API. 03730 */ 03731 SVN_DEPRECATED 03732 svn_error_t * 03733 svn_client_merge(const char *source1, 03734 const svn_opt_revision_t *revision1, 03735 const char *source2, 03736 const svn_opt_revision_t *revision2, 03737 const char *target_wcpath, 03738 svn_boolean_t recurse, 03739 svn_boolean_t ignore_ancestry, 03740 svn_boolean_t force, 03741 svn_boolean_t dry_run, 03742 svn_client_ctx_t *ctx, 03743 apr_pool_t *pool); 03744 03745 03746 /** 03747 * Perform a reintegration merge of @a source_path_or_url at @a source_peg_revision 03748 * into @a target_wcpath. 03749 * @a target_wcpath must be a single-revision, #svn_depth_infinity, 03750 * pristine, unswitched working copy -- in other words, it must 03751 * reflect a single revision tree, the "target". The mergeinfo on @a 03752 * source_path_or_url must reflect that all of the target has been merged into it. 03753 * Then this behaves like a merge with svn_client_merge5() from the 03754 * target's URL to the source. 03755 * 03756 * All other options are handled identically to svn_client_merge5(). 03757 * The depth of the merge is always #svn_depth_infinity. 03758 * 03759 * @since New in 1.5. 03760 * @deprecated Provided for backwards compatibility with the 1.7 API. 03761 */ 03762 SVN_DEPRECATED 03763 svn_error_t * 03764 svn_client_merge_reintegrate(const char *source_path_or_url, 03765 const svn_opt_revision_t *source_peg_revision, 03766 const char *target_wcpath, 03767 svn_boolean_t dry_run, 03768 const apr_array_header_t *merge_options, 03769 svn_client_ctx_t *ctx, 03770 apr_pool_t *pool); 03771 03772 /** 03773 * Merge changes from the source branch identified by 03774 * @a source_path_or_url in peg revision @a source_peg_revision, 03775 * into the target branch working copy at @a target_wcpath. 03776 * 03777 * If @a ranges_to_merge is NULL then perform an automatic merge of 03778 * all the eligible changes up to @a source_peg_revision. If the merge 03779 * required is a reintegrate merge, then return an error if the WC has 03780 * mixed revisions, local modifications and/or switched subtrees; if 03781 * the merge is determined to be of the non-reintegrate kind, then 03782 * return an error if @a allow_mixed_rev is false and the WC contains 03783 * mixed revisions. 03784 * 03785 * If @a ranges_to_merge is not NULL then merge the changes specified 03786 * by the revision ranges in @a ranges_to_merge, or, when honouring 03787 * mergeinfo, only the eligible parts of those revision ranges. 03788 * @a ranges_to_merge is an array of <tt>svn_opt_revision_range_t 03789 * *</tt> ranges. These ranges may describe additive and/or 03790 * subtractive merge ranges, they may overlap fully or partially, 03791 * and/or they may partially or fully negate each other. This 03792 * rangelist is not required to be sorted. If any revision in the 03793 * list of provided ranges has an `unspecified' or unrecognized 03794 * `kind', return #SVN_ERR_CLIENT_BAD_REVISION. 03795 * 03796 * If @a ranges_to_merge is an empty array, then do nothing. 03797 * 03798 * All other options are handled identically to svn_client_merge5(). 03799 * 03800 * @since New in 1.8. 03801 */ 03802 svn_error_t * 03803 svn_client_merge_peg5(const char *source_path_or_url, 03804 const apr_array_header_t *ranges_to_merge, 03805 const svn_opt_revision_t *source_peg_revision, 03806 const char *target_wcpath, 03807 svn_depth_t depth, 03808 svn_boolean_t ignore_mergeinfo, 03809 svn_boolean_t diff_ignore_ancestry, 03810 svn_boolean_t force_delete, 03811 svn_boolean_t record_only, 03812 svn_boolean_t dry_run, 03813 svn_boolean_t allow_mixed_rev, 03814 const apr_array_header_t *merge_options, 03815 svn_client_ctx_t *ctx, 03816 apr_pool_t *pool); 03817 03818 /** 03819 * Similar to svn_client_merge_peg5(), but automatic merge is not available 03820 * (@a ranges_to_merge must not be NULL), and the single @a ignore_ancestry 03821 * parameter maps to both @c ignore_mergeinfo and @c diff_ignore_ancestry. 03822 * 03823 * @deprecated Provided for backward compatibility with the 1.7 API. 03824 * @since New in 1.7. 03825 */ 03826 SVN_DEPRECATED 03827 svn_error_t * 03828 svn_client_merge_peg4(const char *source_path_or_url, 03829 const apr_array_header_t *ranges_to_merge, 03830 const svn_opt_revision_t *source_peg_revision, 03831 const char *target_wcpath, 03832 svn_depth_t depth, 03833 svn_boolean_t ignore_ancestry, 03834 svn_boolean_t force_delete, 03835 svn_boolean_t record_only, 03836 svn_boolean_t dry_run, 03837 svn_boolean_t allow_mixed_rev, 03838 const apr_array_header_t *merge_options, 03839 svn_client_ctx_t *ctx, 03840 apr_pool_t *pool); 03841 03842 /** 03843 * Similar to svn_client_merge_peg4(), but with @a allow_mixed_rev set to 03844 * @c TRUE. The @a force parameter maps to the @c force_delete parameter 03845 * of svn_client_merge_peg4(). 03846 * 03847 * @deprecated Provided for backward compatibility with the 1.6 API. 03848 * 03849 * @since New in 1.5. 03850 */ 03851 SVN_DEPRECATED 03852 svn_error_t * 03853 svn_client_merge_peg3(const char *source, 03854 const apr_array_header_t *ranges_to_merge, 03855 const svn_opt_revision_t *peg_revision, 03856 const char *target_wcpath, 03857 svn_depth_t depth, 03858 svn_boolean_t ignore_ancestry, 03859 svn_boolean_t force, 03860 svn_boolean_t record_only, 03861 svn_boolean_t dry_run, 03862 const apr_array_header_t *merge_options, 03863 svn_client_ctx_t *ctx, 03864 apr_pool_t *pool); 03865 03866 /** 03867 * Similar to svn_client_merge_peg3(), but with @a record_only set to 03868 * @c FALSE, and @a depth set according to @a recurse: if @a recurse 03869 * is TRUE, set @a depth to #svn_depth_infinity, if @a recurse is 03870 * FALSE, set @a depth to #svn_depth_files. 03871 * 03872 * @deprecated Provided for backwards compatibility with the 1.4 API. 03873 * 03874 * @since New in 1.4. 03875 */ 03876 SVN_DEPRECATED 03877 svn_error_t * 03878 svn_client_merge_peg2(const char *source, 03879 const svn_opt_revision_t *revision1, 03880 const svn_opt_revision_t *revision2, 03881 const svn_opt_revision_t *peg_revision, 03882 const char *target_wcpath, 03883 svn_boolean_t recurse, 03884 svn_boolean_t ignore_ancestry, 03885 svn_boolean_t force, 03886 svn_boolean_t dry_run, 03887 const apr_array_header_t *merge_options, 03888 svn_client_ctx_t *ctx, 03889 apr_pool_t *pool); 03890 03891 /** 03892 * Similar to svn_client_merge_peg2(), but with @a merge_options set to 03893 * NULL. 03894 * 03895 * @deprecated Provided for backwards compatibility with the 1.3 API. 03896 * 03897 * @since New in 1.1. 03898 */ 03899 SVN_DEPRECATED 03900 svn_error_t * 03901 svn_client_merge_peg(const char *source, 03902 const svn_opt_revision_t *revision1, 03903 const svn_opt_revision_t *revision2, 03904 const svn_opt_revision_t *peg_revision, 03905 const char *target_wcpath, 03906 svn_boolean_t recurse, 03907 svn_boolean_t ignore_ancestry, 03908 svn_boolean_t force, 03909 svn_boolean_t dry_run, 03910 svn_client_ctx_t *ctx, 03911 apr_pool_t *pool); 03912 03913 03914 /** Set @a suggestions to an ordered array of @c const char * 03915 * potential merge sources (expressed as full repository URLs) for @a 03916 * path_or_url at @a peg_revision. @a path_or_url is a working copy 03917 * path or repository URL. @a ctx is a context used for 03918 * authentication in the repository case. Use @a pool for all 03919 * allocations. 03920 * 03921 * @since New in 1.5. 03922 */ 03923 svn_error_t * 03924 svn_client_suggest_merge_sources(apr_array_header_t **suggestions, 03925 const char *path_or_url, 03926 const svn_opt_revision_t *peg_revision, 03927 svn_client_ctx_t *ctx, 03928 apr_pool_t *pool); 03929 03930 03931 /** 03932 * Get the mergeinfo for a single target node (ignoring any subtrees). 03933 * 03934 * Set @a *mergeinfo to a hash mapping <tt>const char *</tt> merge source 03935 * URLs to <tt>svn_rangelist_t *</tt> rangelists describing the ranges which 03936 * have been merged into @a path_or_url as of @a peg_revision, per 03937 * @a path_or_url's explicit mergeinfo or inherited mergeinfo if no 03938 * explicit mergeinfo if found. If no explicit or inherited mergeinfo 03939 * is found, then set @a *mergeinfo to NULL. 03940 * 03941 * Use @a pool for all necessary allocations. 03942 * 03943 * If the server doesn't support retrieval of mergeinfo (which will 03944 * never happen for file:// URLs), return an 03945 * #SVN_ERR_UNSUPPORTED_FEATURE error. 03946 * 03947 * @note Unlike most APIs which deal with mergeinfo, this one returns 03948 * data where the keys of the hash are absolute repository URLs rather 03949 * than repository filesystem paths. 03950 * 03951 * @since New in 1.5. 03952 */ 03953 svn_error_t * 03954 svn_client_mergeinfo_get_merged(apr_hash_t **mergeinfo, 03955 const char *path_or_url, 03956 const svn_opt_revision_t *peg_revision, 03957 svn_client_ctx_t *ctx, 03958 apr_pool_t *pool); 03959 03960 03961 /** 03962 * Describe the revisions that either have or have not been merged from 03963 * one source branch (or subtree) into another. 03964 * 03965 * If @a finding_merged is TRUE, then drive log entry callbacks 03966 * @a receiver / @a receiver_baton with the revisions merged from 03967 * @a source_path_or_url (as of @a source_peg_revision) into 03968 * @a target_path_or_url (as of @a target_peg_revision). If @a 03969 * finding_merged is FALSE then find the revisions eligible for merging. 03970 * 03971 * If both @a source_start_revision and @a source_end_revision are 03972 * unspecified (that is, of kind @c svn_opt_revision_unspecified), 03973 * @a receiver will be called the requested revisions from 0 to 03974 * @a source_peg_revision and in that order (that is, oldest to 03975 * youngest). Otherwise, both @a source_start_revision and 03976 * @a source_end_revision must be specified, which has two effects: 03977 * 03978 * - @a receiver will be called only with revisions which fall 03979 * within range of @a source_start_revision to 03980 * @a source_end_revision, inclusive, and 03981 * 03982 * - those revisions will be ordered in the same "direction" as the 03983 * walk from @a source_start_revision to @a source_end_revision. 03984 * (If @a source_start_revision is the younger of the two, @a 03985 * receiver will be called with revisions in youngest-to-oldest 03986 * order; otherwise, the reverse occurs.) 03987 * 03988 * If @a depth is #svn_depth_empty consider only the explicit or 03989 * inherited mergeinfo on @a target_path_or_url when calculating merged 03990 * revisions from @a source_path_or_url. If @a depth is #svn_depth_infinity 03991 * then also consider the explicit subtree mergeinfo under @a 03992 * target_path_or_url. 03993 * If a depth other than #svn_depth_empty or #svn_depth_infinity is 03994 * requested then return a #SVN_ERR_UNSUPPORTED_FEATURE error. 03995 * 03996 * In addition to the behavior of @a discover_changed_paths described in 03997 * svn_client_log5(), if set to TRUE it enables detection of sub-tree 03998 * merges that are complete but can't be detected as complete without 03999 * access to the changed paths. Sub-tree merges detected as complete will 04000 * be included if @a finding_merged is TRUE or filtered if @a finding_merged 04001 * is FALSE. 04002 * 04003 * @a revprops is the same as for svn_client_log5(). Use @a scratch_pool for 04004 * all temporary allocations. 04005 * 04006 * @a ctx is a context used for authentication. 04007 * 04008 * If the server doesn't support retrieval of mergeinfo, return an 04009 * #SVN_ERR_UNSUPPORTED_FEATURE error. 04010 * 04011 * @since New in 1.8. 04012 */ 04013 svn_error_t * 04014 svn_client_mergeinfo_log2(svn_boolean_t finding_merged, 04015 const char *target_path_or_url, 04016 const svn_opt_revision_t *target_peg_revision, 04017 const char *source_path_or_url, 04018 const svn_opt_revision_t *source_peg_revision, 04019 const svn_opt_revision_t *source_start_revision, 04020 const svn_opt_revision_t *source_end_revision, 04021 svn_log_entry_receiver_t receiver, 04022 void *receiver_baton, 04023 svn_boolean_t discover_changed_paths, 04024 svn_depth_t depth, 04025 const apr_array_header_t *revprops, 04026 svn_client_ctx_t *ctx, 04027 apr_pool_t *scratch_pool); 04028 04029 /** 04030 * Similar to svn_client_mergeinfo_log2(), but with @a source_start_revision 04031 * and @a source_end_revision always of kind @c svn_opt_revision_unspecified; 04032 * 04033 * @deprecated Provided for backwards compatibility with the 1.7 API. 04034 * @since New in 1.7. 04035 */ 04036 SVN_DEPRECATED 04037 svn_error_t * 04038 svn_client_mergeinfo_log(svn_boolean_t finding_merged, 04039 const char *target_path_or_url, 04040 const svn_opt_revision_t *target_peg_revision, 04041 const char *source_path_or_url, 04042 const svn_opt_revision_t *source_peg_revision, 04043 svn_log_entry_receiver_t receiver, 04044 void *receiver_baton, 04045 svn_boolean_t discover_changed_paths, 04046 svn_depth_t depth, 04047 const apr_array_header_t *revprops, 04048 svn_client_ctx_t *ctx, 04049 apr_pool_t *scratch_pool); 04050 04051 /** 04052 * Similar to svn_client_mergeinfo_log(), but finds only merged revisions 04053 * and always operates at @a depth #svn_depth_empty. 04054 * 04055 * @deprecated Provided for backwards compatibility with the 1.6 API. Use 04056 * svn_client_mergeinfo_log() instead. 04057 * @since New in 1.5. 04058 */ 04059 SVN_DEPRECATED 04060 svn_error_t * 04061 svn_client_mergeinfo_log_merged(const char *path_or_url, 04062 const svn_opt_revision_t *peg_revision, 04063 const char *merge_source_path_or_url, 04064 const svn_opt_revision_t *src_peg_revision, 04065 svn_log_entry_receiver_t receiver, 04066 void *receiver_baton, 04067 svn_boolean_t discover_changed_paths, 04068 const apr_array_header_t *revprops, 04069 svn_client_ctx_t *ctx, 04070 apr_pool_t *pool); 04071 04072 /** 04073 * Similar to svn_client_mergeinfo_log(), but finds only eligible revisions 04074 * and always operates at @a depth #svn_depth_empty. 04075 * 04076 * @deprecated Provided for backwards compatibility with the 1.6 API. Use 04077 * svn_client_mergeinfo_log() instead. 04078 * @since New in 1.5. 04079 */ 04080 SVN_DEPRECATED 04081 svn_error_t * 04082 svn_client_mergeinfo_log_eligible(const char *path_or_url, 04083 const svn_opt_revision_t *peg_revision, 04084 const char *merge_source_path_or_url, 04085 const svn_opt_revision_t *src_peg_revision, 04086 svn_log_entry_receiver_t receiver, 04087 void *receiver_baton, 04088 svn_boolean_t discover_changed_paths, 04089 const apr_array_header_t *revprops, 04090 svn_client_ctx_t *ctx, 04091 apr_pool_t *pool); 04092 04093 /** @} */ 04094 04095 /** 04096 * @defgroup Cleanup Cleanup an abnormally terminated working copy. 04097 * 04098 * @{ 04099 */ 04100 04101 /** Recursively vacuum a working copy directory @a dir, removing unnecessary 04102 * data. 04103 * 04104 * If @a include_externals is @c TRUE, recurse into externals and vacuum them 04105 * as well. 04106 * 04107 * If @a remove_unversioned_items is @c TRUE, remove unversioned items 04108 * in @a dir after successful working copy cleanup. 04109 * If @a remove_ignored_items is @c TRUE, remove ignored unversioned items 04110 * in @a dir after successful working copy cleanup. 04111 * 04112 * If @a fix_recorded_timestamps is @c TRUE, this function fixes recorded 04113 * timestamps for unmodified files in the working copy, reducing comparision 04114 * time on future checks. 04115 * 04116 * If @a vacuum_pristines is @c TRUE, and @a dir_abspath points to the working 04117 * copy root unreferenced files in the pristine store are removed. 04118 * 04119 * When asked to remove unversioned or ignored items, and the working copy 04120 * is already locked, return #SVN_ERR_WC_LOCKED. This prevents accidental 04121 * working copy corruption in case users run the cleanup operation to 04122 * remove unversioned items while another client is performing some other 04123 * operation on the working copy. 04124 * 04125 * If @a ctx->cancel_func is non-NULL, invoke it with @a 04126 * ctx->cancel_baton at various points during the operation. If it 04127 * returns an error (typically #SVN_ERR_CANCELLED), return that error 04128 * immediately. 04129 * 04130 * Use @a scratch_pool for any temporary allocations. 04131 * 04132 * @since New in 1.9. 04133 */ 04134 svn_error_t * 04135 svn_client_vacuum(const char *dir_abspath, 04136 svn_boolean_t remove_unversioned_items, 04137 svn_boolean_t remove_ignored_items, 04138 svn_boolean_t fix_recorded_timestamps, 04139 svn_boolean_t vacuum_pristines, 04140 svn_boolean_t include_externals, 04141 svn_client_ctx_t *ctx, 04142 apr_pool_t *scratch_pool); 04143 04144 04145 /** Recursively cleanup a working copy directory @a dir_abspath, finishing any 04146 * incomplete operations, removing lockfiles, etc. 04147 * 04148 * If @a break_locks is @c TRUE, existing working copy locks at or below @a 04149 * dir_abspath are broken, otherwise a normal write lock is obtained. 04150 * 04151 * If @a fix_recorded_timestamps is @c TRUE, this function fixes recorded 04152 * timestamps for unmodified files in the working copy, reducing comparision 04153 * time on future checks. 04154 * 04155 * If @a clear_dav_cache is @c TRUE, the caching of DAV information for older 04156 * mod_dav served repositories is cleared. This clearing invalidates some 04157 * cached information used for pre-HTTPv2 repositories. 04158 * 04159 * If @a vacuum_pristines is @c TRUE, and @a dir_abspath points to the working 04160 * copy root unreferenced files in the pristine store are removed. 04161 * 04162 * If @a include_externals is @c TRUE, recurse into externals and clean 04163 * them up as well. 04164 * 04165 * If @a ctx->cancel_func is non-NULL, invoke it with @a 04166 * ctx->cancel_baton at various points during the operation. If it 04167 * returns an error (typically #SVN_ERR_CANCELLED), return that error 04168 * immediately. 04169 * 04170 * Use @a scratch_pool for any temporary allocations. 04171 * 04172 * @since New in 1.9. 04173 */ 04174 svn_error_t * 04175 svn_client_cleanup2(const char *dir_abspath, 04176 svn_boolean_t break_locks, 04177 svn_boolean_t fix_recorded_timestamps, 04178 svn_boolean_t clear_dav_cache, 04179 svn_boolean_t vacuum_pristines, 04180 svn_boolean_t include_externals, 04181 svn_client_ctx_t *ctx, 04182 apr_pool_t *scratch_pool); 04183 04184 /** Like svn_client_cleanup2(), but no support for not breaking locks and 04185 * cleaning up externals and using a potentially non absolute path. 04186 * 04187 * @deprecated Provided for limited backwards compatibility with the 1.8 API. 04188 */ 04189 SVN_DEPRECATED 04190 svn_error_t * 04191 svn_client_cleanup(const char *dir, 04192 svn_client_ctx_t *ctx, 04193 apr_pool_t *scratch_pool); 04194 04195 04196 /** @} */ 04197 04198 /** 04199 * @defgroup Upgrade Upgrade a working copy. 04200 * 04201 * @{ 04202 */ 04203 04204 /** Recursively upgrade a working copy from any older format to the current 04205 * WC metadata storage format. @a wcroot_dir is the path to the WC root. 04206 * 04207 * Use @a scratch_pool for any temporary allocations. 04208 * 04209 * @since New in 1.7. 04210 */ 04211 svn_error_t * 04212 svn_client_upgrade(const char *wcroot_dir, 04213 svn_client_ctx_t *ctx, 04214 apr_pool_t *scratch_pool); 04215 04216 04217 /** @} */ 04218 04219 /** 04220 * @defgroup Relocate Switch a working copy to a different repository. 04221 * 04222 * @{ 04223 */ 04224 04225 /** 04226 * Recursively modify a working copy rooted at @a wcroot_dir, changing 04227 * any repository URLs that begin with @a from_prefix to begin with @a 04228 * to_prefix instead. 04229 * 04230 * @param wcroot_dir Working copy root directory 04231 * @param from_prefix Original URL 04232 * @param to_prefix New URL 04233 * @param ignore_externals If not set, recurse into external working 04234 * copies after relocating the primary working copy 04235 * @param ctx svn_client_ctx_t 04236 * @param pool The pool from which to perform memory allocations 04237 * 04238 * @since New in 1.7 04239 */ 04240 svn_error_t * 04241 svn_client_relocate2(const char *wcroot_dir, 04242 const char *from_prefix, 04243 const char *to_prefix, 04244 svn_boolean_t ignore_externals, 04245 svn_client_ctx_t *ctx, 04246 apr_pool_t *pool); 04247 04248 /** 04249 * Similar to svn_client_relocate2(), but with @a ignore_externals 04250 * always TRUE. 04251 * 04252 * @note As of the 1.7 API, @a dir is required to be a working copy 04253 * root directory, and @a recurse is required to be TRUE. 04254 * 04255 * @deprecated Provided for limited backwards compatibility with the 04256 * 1.6 API. 04257 */ 04258 SVN_DEPRECATED 04259 svn_error_t * 04260 svn_client_relocate(const char *dir, 04261 const char *from_prefix, 04262 const char *to_prefix, 04263 svn_boolean_t recurse, 04264 svn_client_ctx_t *ctx, 04265 apr_pool_t *pool); 04266 04267 /** @} */ 04268 04269 /** 04270 * @defgroup Revert Remove local changes in a repository. 04271 * 04272 * @{ 04273 */ 04274 04275 /** 04276 * Restore the pristine version of working copy @a paths, 04277 * effectively undoing any local mods. For each path in @a paths, 04278 * revert it if it is a file. Else if it is a directory, revert 04279 * according to @a depth: 04280 * 04281 * @a paths is an array of (const char *) local WC paths. 04282 * 04283 * If @a depth is #svn_depth_empty, revert just the properties on 04284 * the directory; else if #svn_depth_files, revert the properties 04285 * and any files immediately under the directory; else if 04286 * #svn_depth_immediates, revert all of the preceding plus 04287 * properties on immediate subdirectories; else if #svn_depth_infinity, 04288 * revert path and everything under it fully recursively. 04289 * 04290 * @a changelists is an array of <tt>const char *</tt> changelist 04291 * names, used as a restrictive filter on items reverted; that is, 04292 * don't revert any item unless it's a member of one of those 04293 * changelists. If @a changelists is empty (or altogether @c NULL), 04294 * no changelist filtering occurs. 04295 * 04296 * If @a clear_changelists is TRUE, then changelist information for the 04297 * paths is cleared while reverting. 04298 * 04299 * If @a metadata_only is TRUE, the files and directories aren't changed 04300 * by the operation. If there are conflict marker files attached to the 04301 * targets these are removed. 04302 * 04303 * If @a ctx->notify_func2 is non-NULL, then for each item reverted, 04304 * call @a ctx->notify_func2 with @a ctx->notify_baton2 and the path of 04305 * the reverted item. 04306 * 04307 * If an item specified for reversion is not under version control, 04308 * then do not error, just invoke @a ctx->notify_func2 with @a 04309 * ctx->notify_baton2, using notification code #svn_wc_notify_skip. 04310 * 04311 * @since New in 1.9. 04312 */ 04313 svn_error_t * 04314 svn_client_revert3(const apr_array_header_t *paths, 04315 svn_depth_t depth, 04316 const apr_array_header_t *changelists, 04317 svn_boolean_t clear_changelists, 04318 svn_boolean_t metadata_only, 04319 svn_client_ctx_t *ctx, 04320 apr_pool_t *pool); 04321 04322 /** Similar to svn_client_revert2, but with @a clear_changelists set to 04323 * FALSE and @a metadata_only set to FALSE. 04324 * 04325 * @since New in 1.5. 04326 * @deprecated Provided for backwards compatibility with the 1.8 API. 04327 */ 04328 SVN_DEPRECATED 04329 svn_error_t * 04330 svn_client_revert2(const apr_array_header_t *paths, 04331 svn_depth_t depth, 04332 const apr_array_header_t *changelists, 04333 svn_client_ctx_t *ctx, 04334 apr_pool_t *pool); 04335 04336 04337 /** 04338 * Similar to svn_client_revert2(), but with @a changelists passed as 04339 * @c NULL, and @a depth set according to @a recurse: if @a recurse is 04340 * TRUE, @a depth is #svn_depth_infinity, else if @a recurse is 04341 * FALSE, @a depth is #svn_depth_empty. 04342 * 04343 * @note Most APIs map @a recurse==FALSE to @a depth==svn_depth_files; 04344 * revert is deliberately different. 04345 * 04346 * @deprecated Provided for backwards compatibility with the 1.4 API. 04347 */ 04348 SVN_DEPRECATED 04349 svn_error_t * 04350 svn_client_revert(const apr_array_header_t *paths, 04351 svn_boolean_t recursive, 04352 svn_client_ctx_t *ctx, 04353 apr_pool_t *pool); 04354 04355 04356 /** @} */ 04357 04358 /** 04359 * @defgroup Resolved Mark conflicted paths as resolved. 04360 * 04361 * @{ 04362 */ 04363 04364 /** 04365 * Similar to svn_client_resolve(), but without automatic conflict 04366 * resolution support. 04367 * 04368 * @deprecated Provided for backward compatibility with the 1.4 API. 04369 * Use svn_client_resolve() with @a conflict_choice == @c 04370 * svn_wc_conflict_choose_merged instead. 04371 */ 04372 SVN_DEPRECATED 04373 svn_error_t * 04374 svn_client_resolved(const char *path, 04375 svn_boolean_t recursive, 04376 svn_client_ctx_t *ctx, 04377 apr_pool_t *pool); 04378 04379 /** Perform automatic conflict resolution on a working copy @a path. 04380 * 04381 * If @a conflict_choice is 04382 * 04383 * - #svn_wc_conflict_choose_base: 04384 * resolve the conflict with the old file contents 04385 * 04386 * - #svn_wc_conflict_choose_mine_full: 04387 * use the original working contents 04388 * 04389 * - #svn_wc_conflict_choose_theirs_full: 04390 * use the new contents 04391 * 04392 * - #svn_wc_conflict_choose_merged: 04393 * don't change the contents at all, just remove the conflict 04394 * status, which is the pre-1.5 behavior. 04395 * 04396 * - #svn_wc_conflict_choose_theirs_conflict 04397 * ###... 04398 * 04399 * - #svn_wc_conflict_choose_mine_conflict 04400 * ###... 04401 * 04402 * - svn_wc_conflict_choose_unspecified 04403 * invoke @a ctx->conflict_func2 with @a ctx->conflict_baton2 to obtain 04404 * a resolution decision for each conflict. This can be used to 04405 * implement interactive conflict resolution. 04406 * 04407 * #svn_wc_conflict_choose_theirs_conflict and 04408 * #svn_wc_conflict_choose_mine_conflict are not legal for binary 04409 * files or properties. 04410 * 04411 * If @a path is not in a state of conflict to begin with, do nothing. 04412 * If @a path's conflict state is removed and @a ctx->notify_func2 is non-NULL, 04413 * call @a ctx->notify_func2 with @a ctx->notify_baton2 and @a path. 04414 * ### with what notification parameters? 04415 * 04416 * If @a depth is #svn_depth_empty, act only on @a path; if 04417 * #svn_depth_files, resolve @a path and its conflicted file 04418 * children (if any); if #svn_depth_immediates, resolve @a path and 04419 * all its immediate conflicted children (both files and directories, 04420 * if any); if #svn_depth_infinity, resolve @a path and every 04421 * conflicted file or directory anywhere beneath it. 04422 * 04423 * Note that this operation will try to lock the parent directory of 04424 * @a path in order to be able to resolve tree-conflicts on @a path. 04425 * 04426 * @since New in 1.5. 04427 */ 04428 svn_error_t * 04429 svn_client_resolve(const char *path, 04430 svn_depth_t depth, 04431 svn_wc_conflict_choice_t conflict_choice, 04432 svn_client_ctx_t *ctx, 04433 apr_pool_t *pool); 04434 04435 04436 /** @} */ 04437 04438 /** 04439 * @defgroup Copy Copy paths in the working copy and repository. 04440 * 04441 * @{ 04442 */ 04443 04444 /** 04445 * A structure which describes the source of a copy operation--its path, 04446 * revision, and peg revision. 04447 * 04448 * @since New in 1.5. 04449 */ 04450 typedef struct svn_client_copy_source_t 04451 { 04452 /** The source path or URL. */ 04453 const char *path; 04454 04455 /** The source operational revision. */ 04456 const svn_opt_revision_t *revision; 04457 04458 /** The source peg revision. */ 04459 const svn_opt_revision_t *peg_revision; 04460 } svn_client_copy_source_t; 04461 04462 /** Copy each source in @a sources to @a dst_path. 04463 * 04464 * If multiple @a sources are given, @a dst_path must be a directory, 04465 * and @a sources will be copied as children of @a dst_path. 04466 * 04467 * @a sources is an array of <tt>svn_client_copy_source_t *</tt> elements, 04468 * either all referring to local WC items or all referring to versioned 04469 * items in the repository. 04470 * 04471 * If @a sources has only one item, attempt to copy it to @a dst_path. If 04472 * @a copy_as_child is TRUE and @a dst_path already exists, attempt to copy the 04473 * item as a child of @a dst_path. If @a copy_as_child is FALSE and 04474 * @a dst_path already exists, fail with #SVN_ERR_ENTRY_EXISTS if @a dst_path 04475 * is a working copy path and #SVN_ERR_FS_ALREADY_EXISTS if @a dst_path is a 04476 * URL. 04477 * 04478 * If @a sources has multiple items, and @a copy_as_child is TRUE, all 04479 * @a sources are copied as children of @a dst_path. If any child of 04480 * @a dst_path already exists with the same name any item in @a sources, 04481 * fail with #SVN_ERR_ENTRY_EXISTS if @a dst_path is a working copy path and 04482 * #SVN_ERR_FS_ALREADY_EXISTS if @a dst_path is a URL. 04483 * 04484 * If @a sources has multiple items, and @a copy_as_child is FALSE, fail 04485 * with #SVN_ERR_CLIENT_MULTIPLE_SOURCES_DISALLOWED. 04486 * 04487 * If @a dst_path is a URL, use the authentication baton 04488 * in @a ctx and @a ctx->log_msg_func3/@a ctx->log_msg_baton3 to immediately 04489 * attempt to commit the copy action in the repository. 04490 * 04491 * If @a dst_path is not a URL, then this is just a variant of 04492 * svn_client_add(), where the @a sources are scheduled for addition 04493 * as copies. No changes will happen to the repository until a commit occurs. 04494 * This scheduling can be removed with svn_client_revert2(). 04495 * 04496 * If @a make_parents is TRUE, create any non-existent parent directories 04497 * also. Otherwise the parent of @a dst_path must already exist. 04498 * 04499 * If @a ignore_externals is set, don't process externals definitions 04500 * as part of this operation. 04501 * 04502 * If @a metadata_only is @c TRUE and copying a file in a working copy, 04503 * everything in the metadata is updated as if the node is moved, but the 04504 * actual disk copy operation is not performed. This feature is useful for 04505 * clients that want to keep the working copy in sync while the actual working 04506 * copy is updated by some other task. 04507 * 04508 * If @a pin_externals is set, pin URLs in copied externals definitions 04509 * to their current revision unless they were already pinned to a 04510 * particular revision. A pinned external uses a URL which points at a 04511 * fixed revision, rather than the HEAD revision. Externals in the copy 04512 * destination are pinned to either a working copy base revision or the 04513 * HEAD revision of a repository (as of the time the copy operation is 04514 * performed), depending on the type of the copy source: 04515 <pre> 04516 copy source: working copy (WC) REPOS 04517 ------------+------------------------+---------------------------+ 04518 copy WC | external's WC BASE rev | external's repos HEAD rev | 04519 dest: |------------------------+---------------------------+ 04520 REPOS | external's WC BASE rev | external's repos HEAD rev | 04521 ------------+------------------------+---------------------------+ 04522 </pre> 04523 * If the copy source is a working copy, then all externals must be checked 04524 * out, be at a single-revision, contain no local modifications, and contain 04525 * no switched subtrees. Else, #SVN_ERR_WC_PATH_UNEXPECTED_STATUS is returned. 04526 * 04527 * If non-NULL, @a externals_to_pin restricts pinning to a subset of externals. 04528 * It is a hash table keyed by either a local absolute path or a URL at which 04529 * an svn:externals property is set. The hash table contains apr_array_header_t* 04530 * elements as returned by svn_wc_parse_externals_description3(). These arrays 04531 * contain elements of type svn_wc_external_item2_t*, each of which corresponds 04532 * to a single line of an svn:externals definition. Externals corresponding to 04533 * these items will be pinned, other externals will not be pinned. 04534 * If @a externals_to_pin is @c NULL then all externals are pinned. 04535 * If @a pin_externals is @c FALSE then @a externals_to_pin is ignored. 04536 * 04537 * If non-NULL, @a revprop_table is a hash table holding additional, 04538 * custom revision properties (<tt>const char *</tt> names mapped to 04539 * <tt>svn_string_t *</tt> values) to be set on the new revision in 04540 * the event that this is a committing operation. This table cannot 04541 * contain any standard Subversion properties. 04542 * 04543 * @a ctx->log_msg_func3/@a ctx->log_msg_baton3 are a callback/baton combo 04544 * that this function can use to query for a commit log message when one is 04545 * needed. 04546 * 04547 * If @a ctx->notify_func2 is non-NULL, invoke it with @a ctx->notify_baton2 04548 * for each item added at the new location, passing the new, relative path of 04549 * the added item. 04550 * 04551 * If @a commit_callback is non-NULL, then for each successful commit, call 04552 * @a commit_callback with @a commit_baton and a #svn_commit_info_t for 04553 * the commit. 04554 * 04555 * @since New in 1.9. 04556 */ 04557 svn_error_t * 04558 svn_client_copy7(const apr_array_header_t *sources, 04559 const char *dst_path, 04560 svn_boolean_t copy_as_child, 04561 svn_boolean_t make_parents, 04562 svn_boolean_t ignore_externals, 04563 svn_boolean_t metadata_only, 04564 svn_boolean_t pin_externals, 04565 const apr_hash_t *externals_to_pin, 04566 const apr_hash_t *revprop_table, 04567 svn_commit_callback2_t commit_callback, 04568 void *commit_baton, 04569 svn_client_ctx_t *ctx, 04570 apr_pool_t *pool); 04571 04572 /** 04573 * Similar to svn_client_copy7(), but doesn't support meta_data_only 04574 * and cannot pin externals. 04575 * 04576 * 04577 * @since New in 1.7. 04578 * @deprecated Provided for backward compatibility with the 1.8 API. 04579 */ 04580 SVN_DEPRECATED 04581 svn_error_t * 04582 svn_client_copy6(const apr_array_header_t *sources, 04583 const char *dst_path, 04584 svn_boolean_t copy_as_child, 04585 svn_boolean_t make_parents, 04586 svn_boolean_t ignore_externals, 04587 const apr_hash_t *revprop_table, 04588 svn_commit_callback2_t commit_callback, 04589 void *commit_baton, 04590 svn_client_ctx_t *ctx, 04591 apr_pool_t *pool); 04592 04593 /** 04594 * Similar to svn_client_copy6(), but returns the commit info in 04595 * @a *commit_info_p rather than through a callback function. 04596 * 04597 * @since New in 1.6. 04598 * @deprecated Provided for backward compatibility with the 1.6 API. 04599 */ 04600 SVN_DEPRECATED 04601 svn_error_t * 04602 svn_client_copy5(svn_commit_info_t **commit_info_p, 04603 const apr_array_header_t *sources, 04604 const char *dst_path, 04605 svn_boolean_t copy_as_child, 04606 svn_boolean_t make_parents, 04607 svn_boolean_t ignore_externals, 04608 const apr_hash_t *revprop_table, 04609 svn_client_ctx_t *ctx, 04610 apr_pool_t *pool); 04611 04612 /** 04613 * Similar to svn_client_copy5(), with @a ignore_externals set to @c FALSE. 04614 * 04615 * @since New in 1.5. 04616 * 04617 * @deprecated Provided for backward compatibility with the 1.5 API. 04618 */ 04619 SVN_DEPRECATED 04620 svn_error_t * 04621 svn_client_copy4(svn_commit_info_t **commit_info_p, 04622 const apr_array_header_t *sources, 04623 const char *dst_path, 04624 svn_boolean_t copy_as_child, 04625 svn_boolean_t make_parents, 04626 const apr_hash_t *revprop_table, 04627 svn_client_ctx_t *ctx, 04628 apr_pool_t *pool); 04629 04630 /** 04631 * Similar to svn_client_copy4(), with only one @a src_path, @a 04632 * copy_as_child set to @c FALSE, @a revprop_table passed as NULL, and 04633 * @a make_parents set to @c FALSE. Also, use @a src_revision as both 04634 * the operational and peg revision. 04635 * 04636 * @since New in 1.4. 04637 * 04638 * @deprecated Provided for backward compatibility with the 1.4 API. 04639 */ 04640 SVN_DEPRECATED 04641 svn_error_t * 04642 svn_client_copy3(svn_commit_info_t **commit_info_p, 04643 const char *src_path, 04644 const svn_opt_revision_t *src_revision, 04645 const char *dst_path, 04646 svn_client_ctx_t *ctx, 04647 apr_pool_t *pool); 04648 04649 04650 /** 04651 * Similar to svn_client_copy3(), with the difference that if @a dst_path 04652 * already exists and is a directory, copy the item into that directory, 04653 * keeping its name (the last component of @a src_path). 04654 * 04655 * @since New in 1.3. 04656 * 04657 * @deprecated Provided for backward compatibility with the 1.3 API. 04658 */ 04659 SVN_DEPRECATED 04660 svn_error_t * 04661 svn_client_copy2(svn_commit_info_t **commit_info_p, 04662 const char *src_path, 04663 const svn_opt_revision_t *src_revision, 04664 const char *dst_path, 04665 svn_client_ctx_t *ctx, 04666 apr_pool_t *pool); 04667 04668 04669 /** 04670 * Similar to svn_client_copy2(), but uses #svn_client_commit_info_t 04671 * for @a commit_info_p. 04672 * 04673 * @deprecated Provided for backward compatibility with the 1.2 API. 04674 */ 04675 SVN_DEPRECATED 04676 svn_error_t * 04677 svn_client_copy(svn_client_commit_info_t **commit_info_p, 04678 const char *src_path, 04679 const svn_opt_revision_t *src_revision, 04680 const char *dst_path, 04681 svn_client_ctx_t *ctx, 04682 apr_pool_t *pool); 04683 04684 04685 /** @} */ 04686 04687 /** 04688 * @defgroup Move Move paths in the working copy or repository. 04689 * 04690 * @{ 04691 */ 04692 04693 /** 04694 * Move @a src_paths to @a dst_path. 04695 * 04696 * @a src_paths is an array of (const char *) paths -- either all WC paths 04697 * or all URLs -- of versioned items. If multiple @a src_paths are given, 04698 * @a dst_path must be a directory and @a src_paths will be moved as 04699 * children of @a dst_path. 04700 * 04701 * If @a src_paths are repository URLs: 04702 * 04703 * - @a dst_path must also be a repository URL. 04704 * 04705 * - The authentication baton in @a ctx and @a ctx->log_msg_func/@a 04706 * ctx->log_msg_baton are used to commit the move. 04707 * 04708 * - The move operation will be immediately committed. 04709 * 04710 * If @a src_paths are working copy paths: 04711 * 04712 * - @a dst_path must also be a working copy path. 04713 * 04714 * - @a ctx->log_msg_func3 and @a ctx->log_msg_baton3 are ignored. 04715 * 04716 * - This is a scheduling operation. No changes will happen to the 04717 * repository until a commit occurs. This scheduling can be removed 04718 * with svn_client_revert2(). If one of @a src_paths is a file it is 04719 * removed from the working copy immediately. If one of @a src_path 04720 * is a directory it will remain in the working copy but all the files, 04721 * and unversioned items, it contains will be removed. 04722 * 04723 * If @a src_paths has only one item, attempt to move it to @a dst_path. If 04724 * @a move_as_child is TRUE and @a dst_path already exists, attempt to move the 04725 * item as a child of @a dst_path. If @a move_as_child is FALSE and 04726 * @a dst_path already exists, fail with #SVN_ERR_ENTRY_EXISTS if @a dst_path 04727 * is a working copy path and #SVN_ERR_FS_ALREADY_EXISTS if @a dst_path is a 04728 * URL. 04729 * 04730 * If @a src_paths has multiple items, and @a move_as_child is TRUE, all 04731 * @a src_paths are moved as children of @a dst_path. If any child of 04732 * @a dst_path already exists with the same name any item in @a src_paths, 04733 * fail with #SVN_ERR_ENTRY_EXISTS if @a dst_path is a working copy path and 04734 * #SVN_ERR_FS_ALREADY_EXISTS if @a dst_path is a URL. 04735 * 04736 * If @a src_paths has multiple items, and @a move_as_child is FALSE, fail 04737 * with #SVN_ERR_CLIENT_MULTIPLE_SOURCES_DISALLOWED. 04738 * 04739 * If @a make_parents is TRUE, create any non-existent parent directories 04740 * also. Otherwise, the parent of @a dst_path must already exist. 04741 * 04742 * If @a allow_mixed_revisions is @c FALSE, #SVN_ERR_WC_MIXED_REVISIONS 04743 * will be raised if the move source is a mixed-revision subtree. 04744 * If @a allow_mixed_revisions is TRUE, a mixed-revision move source is 04745 * allowed but the move will degrade to a copy and a delete without local 04746 * move tracking. This parameter should be set to FALSE except where backwards 04747 * compatibility to svn_client_move6() is required. 04748 * 04749 * If @a metadata_only is @c TRUE and moving a file in a working copy, 04750 * everything in the metadata is updated as if the node is moved, but the 04751 * actual disk move operation is not performed. This feature is useful for 04752 * clients that want to keep the working copy in sync while the actual working 04753 * copy is updated by some other task. 04754 * 04755 * If non-NULL, @a revprop_table is a hash table holding additional, 04756 * custom revision properties (<tt>const char *</tt> names mapped to 04757 * <tt>svn_string_t *</tt> values) to be set on the new revision in 04758 * the event that this is a committing operation. This table cannot 04759 * contain any standard Subversion properties. 04760 * 04761 * @a ctx->log_msg_func3/@a ctx->log_msg_baton3 are a callback/baton combo that 04762 * this function can use to query for a commit log message when one is needed. 04763 * 04764 * If @a ctx->notify_func2 is non-NULL, then for each item moved, call 04765 * @a ctx->notify_func2 with the @a ctx->notify_baton2 twice, once to indicate 04766 * the deletion of the moved thing, and once to indicate the addition of 04767 * the new location of the thing. 04768 * 04769 * ### Is this really true? What about svn_wc_notify_commit_replaced()? ### 04770 * 04771 * If @a commit_callback is non-NULL, then for each successful commit, call 04772 * @a commit_callback with @a commit_baton and a #svn_commit_info_t for 04773 * the commit. 04774 * 04775 * @since New in 1.8. 04776 */ 04777 svn_error_t * 04778 svn_client_move7(const apr_array_header_t *src_paths, 04779 const char *dst_path, 04780 svn_boolean_t move_as_child, 04781 svn_boolean_t make_parents, 04782 svn_boolean_t allow_mixed_revisions, 04783 svn_boolean_t metadata_only, 04784 const apr_hash_t *revprop_table, 04785 svn_commit_callback2_t commit_callback, 04786 void *commit_baton, 04787 svn_client_ctx_t *ctx, 04788 apr_pool_t *pool); 04789 04790 /** 04791 * Similar to svn_client_move7(), but with @a allow_mixed_revisions always 04792 * set to @c TRUE and @a metadata_only always to @c FALSE. 04793 * 04794 * @since New in 1.7. 04795 * @deprecated Provided for backward compatibility with the 1.7 API. 04796 */ 04797 SVN_DEPRECATED 04798 svn_error_t * 04799 svn_client_move6(const apr_array_header_t *src_paths, 04800 const char *dst_path, 04801 svn_boolean_t move_as_child, 04802 svn_boolean_t make_parents, 04803 const apr_hash_t *revprop_table, 04804 svn_commit_callback2_t commit_callback, 04805 void *commit_baton, 04806 svn_client_ctx_t *ctx, 04807 apr_pool_t *pool); 04808 04809 /** 04810 * Similar to svn_client_move6(), but returns the commit info in 04811 * @a *commit_info_p rather than through a callback function. 04812 * 04813 * A WC-to-WC move will include any modified and/or unversioned children. 04814 * @a force is ignored. 04815 * 04816 * @since New in 1.5. 04817 * @deprecated Provided for backward compatibility with the 1.6 API. 04818 */ 04819 SVN_DEPRECATED 04820 svn_error_t * 04821 svn_client_move5(svn_commit_info_t **commit_info_p, 04822 const apr_array_header_t *src_paths, 04823 const char *dst_path, 04824 svn_boolean_t force, 04825 svn_boolean_t move_as_child, 04826 svn_boolean_t make_parents, 04827 const apr_hash_t *revprop_table, 04828 svn_client_ctx_t *ctx, 04829 apr_pool_t *pool); 04830 04831 /** 04832 * Similar to svn_client_move5(), with only one @a src_path, @a 04833 * move_as_child set to @c FALSE, @a revprop_table passed as NULL, and 04834 * @a make_parents set to @c FALSE. 04835 * 04836 * Note: The behaviour of @a force changed in 1.5 (r860885 and r861421), when 04837 * the 'move' semantics were improved to just move the source including any 04838 * modified and/or unversioned items in it. Before that, @a force 04839 * controlled what happened to such items, but now @a force is ignored. 04840 * 04841 * @since New in 1.4. 04842 * 04843 * @deprecated Provided for backward compatibility with the 1.4 API. 04844 */ 04845 SVN_DEPRECATED 04846 svn_error_t * 04847 svn_client_move4(svn_commit_info_t **commit_info_p, 04848 const char *src_path, 04849 const char *dst_path, 04850 svn_boolean_t force, 04851 svn_client_ctx_t *ctx, 04852 apr_pool_t *pool); 04853 04854 /** 04855 * Similar to svn_client_move4(), with the difference that if @a dst_path 04856 * already exists and is a directory, move the item into that directory, 04857 * keeping its name (the last component of @a src_path). 04858 * 04859 * @since New in 1.3. 04860 * 04861 * @deprecated Provided for backward compatibility with the 1.3 API. 04862 */ 04863 SVN_DEPRECATED 04864 svn_error_t * 04865 svn_client_move3(svn_commit_info_t **commit_info_p, 04866 const char *src_path, 04867 const char *dst_path, 04868 svn_boolean_t force, 04869 svn_client_ctx_t *ctx, 04870 apr_pool_t *pool); 04871 04872 /** 04873 * Similar to svn_client_move3(), but uses #svn_client_commit_info_t 04874 * for @a commit_info_p. 04875 * 04876 * @deprecated Provided for backward compatibility with the 1.2 API. 04877 * 04878 * @since New in 1.2. 04879 */ 04880 SVN_DEPRECATED 04881 svn_error_t * 04882 svn_client_move2(svn_client_commit_info_t **commit_info_p, 04883 const char *src_path, 04884 const char *dst_path, 04885 svn_boolean_t force, 04886 svn_client_ctx_t *ctx, 04887 apr_pool_t *pool); 04888 04889 /** 04890 * Similar to svn_client_move2(), but an extra argument @a src_revision 04891 * must be passed. This has no effect, but must be of kind 04892 * #svn_opt_revision_unspecified or #svn_opt_revision_head, 04893 * otherwise error #SVN_ERR_UNSUPPORTED_FEATURE is returned. 04894 * 04895 * @deprecated Provided for backward compatibility with the 1.1 API. 04896 */ 04897 SVN_DEPRECATED 04898 svn_error_t * 04899 svn_client_move(svn_client_commit_info_t **commit_info_p, 04900 const char *src_path, 04901 const svn_opt_revision_t *src_revision, 04902 const char *dst_path, 04903 svn_boolean_t force, 04904 svn_client_ctx_t *ctx, 04905 apr_pool_t *pool); 04906 04907 /** @} */ 04908 04909 04910 /** Properties 04911 * 04912 * Note that certain svn-controlled properties must always have their 04913 * values set and stored in UTF8 with LF line endings. When 04914 * retrieving these properties, callers must convert the values back 04915 * to native locale and native line-endings before displaying them to 04916 * the user. For help with this task, see 04917 * svn_prop_needs_translation(), svn_subst_translate_string(), and 04918 * svn_subst_detranslate_string(). 04919 * 04920 * @defgroup svn_client_prop_funcs Property functions 04921 * @{ 04922 */ 04923 04924 04925 /** 04926 * Set @a propname to @a propval on @a url. A @a propval of @c NULL will 04927 * delete the property. 04928 * 04929 * Immediately attempt to commit the property change in the repository, 04930 * using the authentication baton in @a ctx and @a 04931 * ctx->log_msg_func3/@a ctx->log_msg_baton3. 04932 * 04933 * If the property has changed on @a url since revision 04934 * @a base_revision_for_url (which must not be #SVN_INVALID_REVNUM), no 04935 * change will be made and an error will be returned. 04936 * 04937 * If non-NULL, @a revprop_table is a hash table holding additional, 04938 * custom revision properties (<tt>const char *</tt> names mapped to 04939 * <tt>svn_string_t *</tt> values) to be set on the new revision. This 04940 * table cannot contain any standard Subversion properties. 04941 * 04942 * If @a commit_callback is non-NULL, then call @a commit_callback with 04943 * @a commit_baton and a #svn_commit_info_t for the commit. 04944 * 04945 * If @a propname is an svn-controlled property (i.e. prefixed with 04946 * #SVN_PROP_PREFIX), then the caller is responsible for ensuring that 04947 * the value is UTF8-encoded and uses LF line-endings. 04948 * 04949 * If @a skip_checks is TRUE, do no validity checking. But if @a 04950 * skip_checks is FALSE, and @a propname is not a valid property for @a 04951 * url, return an error, either #SVN_ERR_ILLEGAL_TARGET (if the property is 04952 * not appropriate for @a url), or * #SVN_ERR_BAD_MIME_TYPE (if @a propname 04953 * is "svn:mime-type", but @a propval is not a valid mime-type). 04954 * 04955 * Use @a scratch_pool for all memory allocation. 04956 * 04957 * @since New in 1.7. 04958 */ 04959 svn_error_t * 04960 svn_client_propset_remote(const char *propname, 04961 const svn_string_t *propval, 04962 const char *url, 04963 svn_boolean_t skip_checks, 04964 svn_revnum_t base_revision_for_url, 04965 const apr_hash_t *revprop_table, 04966 svn_commit_callback2_t commit_callback, 04967 void *commit_baton, 04968 svn_client_ctx_t *ctx, 04969 apr_pool_t *scratch_pool); 04970 04971 /** 04972 * Set @a propname to @a propval on each (const char *) target in @a 04973 * targets. The targets must be all working copy paths. A @a propval 04974 * of @c NULL will delete the property. 04975 * 04976 * If @a depth is #svn_depth_empty, set the property on each member of 04977 * @a targets only; if #svn_depth_files, set it on @a targets and their 04978 * file children (if any); if #svn_depth_immediates, on @a targets and all 04979 * of their immediate children (both files and directories); if 04980 * #svn_depth_infinity, on @a targets and everything beneath them. 04981 * 04982 * @a changelists is an array of <tt>const char *</tt> changelist 04983 * names, used as a restrictive filter on items whose properties are 04984 * set; that is, don't set properties on any item unless it's a member 04985 * of one of those changelists. If @a changelists is empty (or 04986 * altogether @c NULL), no changelist filtering occurs. 04987 * 04988 * If @a propname is an svn-controlled property (i.e. prefixed with 04989 * #SVN_PROP_PREFIX), then the caller is responsible for ensuring that 04990 * the value is UTF8-encoded and uses LF line-endings. 04991 * 04992 * If @a skip_checks is TRUE, do no validity checking. But if @a 04993 * skip_checks is FALSE, and @a propname is not a valid property for @a 04994 * targets, return an error, either #SVN_ERR_ILLEGAL_TARGET (if the 04995 * property is not appropriate for @a targets), or 04996 * #SVN_ERR_BAD_MIME_TYPE (if @a propname is "svn:mime-type", but @a 04997 * propval is not a valid mime-type). 04998 * 04999 * If @a ctx->cancel_func is non-NULL, invoke it passing @a 05000 * ctx->cancel_baton at various places during the operation. 05001 * 05002 * Use @a scratch_pool for all memory allocation. 05003 * 05004 * @since New in 1.7. 05005 */ 05006 svn_error_t * 05007 svn_client_propset_local(const char *propname, 05008 const svn_string_t *propval, 05009 const apr_array_header_t *targets, 05010 svn_depth_t depth, 05011 svn_boolean_t skip_checks, 05012 const apr_array_header_t *changelists, 05013 svn_client_ctx_t *ctx, 05014 apr_pool_t *scratch_pool); 05015 05016 /** 05017 * An amalgamation of svn_client_propset_local() and 05018 * svn_client_propset_remote() that takes only a single target, and 05019 * returns the commit info in @a *commit_info_p rather than through a 05020 * callback function. 05021 * 05022 * @since New in 1.5. 05023 * @deprecated Provided for backward compatibility with the 1.6 API. 05024 */ 05025 SVN_DEPRECATED 05026 svn_error_t * 05027 svn_client_propset3(svn_commit_info_t **commit_info_p, 05028 const char *propname, 05029 const svn_string_t *propval, 05030 const char *target, 05031 svn_depth_t depth, 05032 svn_boolean_t skip_checks, 05033 svn_revnum_t base_revision_for_url, 05034 const apr_array_header_t *changelists, 05035 const apr_hash_t *revprop_table, 05036 svn_client_ctx_t *ctx, 05037 apr_pool_t *pool); 05038 05039 /** 05040 * Like svn_client_propset3(), but with @a base_revision_for_url 05041 * always #SVN_INVALID_REVNUM; @a commit_info_p always @c NULL; @a 05042 * changelists always @c NULL; @a revprop_table always @c NULL; and @a 05043 * depth set according to @a recurse: if @a recurse is TRUE, @a depth 05044 * is #svn_depth_infinity, else #svn_depth_empty. 05045 * 05046 * @deprecated Provided for backward compatibility with the 1.4 API. 05047 */ 05048 SVN_DEPRECATED 05049 svn_error_t * 05050 svn_client_propset2(const char *propname, 05051 const svn_string_t *propval, 05052 const char *target, 05053 svn_boolean_t recurse, 05054 svn_boolean_t skip_checks, 05055 svn_client_ctx_t *ctx, 05056 apr_pool_t *pool); 05057 05058 /** 05059 * Like svn_client_propset2(), but with @a skip_checks always FALSE and a 05060 * newly created @a ctx. 05061 * 05062 * @deprecated Provided for backward compatibility with the 1.1 API. 05063 */ 05064 SVN_DEPRECATED 05065 svn_error_t * 05066 svn_client_propset(const char *propname, 05067 const svn_string_t *propval, 05068 const char *target, 05069 svn_boolean_t recurse, 05070 apr_pool_t *pool); 05071 05072 /** Set @a propname to @a propval on revision @a revision in the repository 05073 * represented by @a URL. Use the authentication baton in @a ctx for 05074 * authentication, and @a pool for all memory allocation. Return the actual 05075 * rev affected in @a *set_rev. A @a propval of @c NULL will delete the 05076 * property. 05077 * 05078 * If @a original_propval is non-NULL, then just before setting the 05079 * new value, check that the old value matches @a original_propval; 05080 * if they do not match, return the error #SVN_ERR_RA_OUT_OF_DATE. 05081 * This is to help clients support interactive editing of revprops: 05082 * without this check, the window during which the property may change 05083 * underneath the user is as wide as the amount of time the user 05084 * spends editing the property. With this check, the window is 05085 * reduced to a small, constant amount of time right before we set the 05086 * new value. (To check that an old value is still non-existent, set 05087 * @a original_propval->data to NULL, and @a original_propval->len is 05088 * ignored.) 05089 * If the server advertises #SVN_RA_CAPABILITY_ATOMIC_REVPROPS, the 05090 * check of @a original_propval is done atomically. 05091 * 05092 * Note: the representation of "property is not set" in @a 05093 * original_propval differs from the representation in other APIs 05094 * (such as svn_fs_change_rev_prop2() and svn_ra_change_rev_prop2()). 05095 * 05096 * If @a force is TRUE, allow newlines in the author property. 05097 * 05098 * If @a propname is an svn-controlled property (i.e. prefixed with 05099 * #SVN_PROP_PREFIX), then the caller is responsible for ensuring that 05100 * the value UTF8-encoded and uses LF line-endings. 05101 * 05102 * Note that unlike its cousin svn_client_propset3(), this routine 05103 * doesn't affect the working copy at all; it's a pure network 05104 * operation that changes an *unversioned* property attached to a 05105 * revision. This can be used to tweak log messages, dates, authors, 05106 * and the like. Be careful: it's a lossy operation. 05107 05108 * @a ctx->notify_func2 and @a ctx->notify_baton2 are the notification 05109 * functions and baton which are called upon successful setting of the 05110 * property. 05111 * 05112 * Also note that unless the administrator creates a 05113 * pre-revprop-change hook in the repository, this feature will fail. 05114 * 05115 * @since New in 1.6. 05116 */ 05117 svn_error_t * 05118 svn_client_revprop_set2(const char *propname, 05119 const svn_string_t *propval, 05120 const svn_string_t *original_propval, 05121 const char *URL, 05122 const svn_opt_revision_t *revision, 05123 svn_revnum_t *set_rev, 05124 svn_boolean_t force, 05125 svn_client_ctx_t *ctx, 05126 apr_pool_t *pool); 05127 05128 /** 05129 * Similar to svn_client_revprop_set2(), but with @a original_propval 05130 * always @c NULL. 05131 * 05132 * @deprecated Provided for backward compatibility with the 1.5 API. 05133 */ 05134 SVN_DEPRECATED 05135 svn_error_t * 05136 svn_client_revprop_set(const char *propname, 05137 const svn_string_t *propval, 05138 const char *URL, 05139 const svn_opt_revision_t *revision, 05140 svn_revnum_t *set_rev, 05141 svn_boolean_t force, 05142 svn_client_ctx_t *ctx, 05143 apr_pool_t *pool); 05144 05145 /** 05146 * Set @a *props to a hash table whose keys are absolute paths or URLs 05147 * of items on which property @a propname is explicitly set, and whose 05148 * values are <tt>svn_string_t *</tt> representing the property value for 05149 * @a propname at that path. 05150 * 05151 * If @a inherited_props is not @c NULL, then set @a *inherited_props to a 05152 * depth-first ordered array of #svn_prop_inherited_item_t * structures 05153 * representing the properties inherited by @a target. If @a target is a 05154 * working copy path, then properties inherited by @a target as far as the 05155 * root of the working copy are obtained from the working copy's actual 05156 * property values. Properties inherited from above the working copy root 05157 * come from the inherited properties cache. If @a target is a URL, then 05158 * the inherited properties come from the repository. If @a inherited_props 05159 * is not @c NULL and no inheritable properties are found, then set 05160 * @a *inherited_props to an empty array. 05161 * 05162 * The #svn_prop_inherited_item_t->path_or_url members of the 05163 * #svn_prop_inherited_item_t * structures in @a *inherited_props are 05164 * URLs if @a target is a URL or if @a target is a working copy path but the 05165 * property represented by the structure is above the working copy root (i.e. 05166 * the inherited property is from the cache). In all other cases the 05167 * #svn_prop_inherited_item_t->path_or_url members are absolute working copy 05168 * paths. 05169 * 05170 * Allocate @a *props (including keys and values) and @a *inherited_props 05171 * (including its elements) in @a result_pool, use @a scratch_pool for 05172 * temporary allocations. 05173 * 05174 * @a target is a WC absolute path or a URL. 05175 * 05176 * Don't store any path, not even @a target, if it does not have a 05177 * property named @a propname. 05178 * 05179 * If @a revision->kind is #svn_opt_revision_unspecified, then: get 05180 * properties from the working copy if @a target is a working copy 05181 * path, or from the repository head if @a target is a URL. Else get 05182 * the properties as of @a revision. The actual node revision 05183 * selected is determined by the path as it exists in @a peg_revision. 05184 * If @a peg_revision->kind is #svn_opt_revision_unspecified, then 05185 * it defaults to #svn_opt_revision_head for URLs or 05186 * #svn_opt_revision_working for WC targets. Use the authentication 05187 * baton in @a ctx for authentication if contacting the repository. 05188 * If @a actual_revnum is not @c NULL, the actual revision number used 05189 * for the fetch is stored in @a *actual_revnum. 05190 * 05191 * If @a depth is #svn_depth_empty, fetch the property from 05192 * @a target only; if #svn_depth_files, fetch from @a target and its 05193 * file children (if any); if #svn_depth_immediates, from @a target 05194 * and all of its immediate children (both files and directories); if 05195 * #svn_depth_infinity, from @a target and everything beneath it. 05196 * 05197 * @a changelists is an array of <tt>const char *</tt> changelist 05198 * names, used as a restrictive filter on items whose properties are 05199 * gotten; that is, don't get @a propname on any item unless it's a member 05200 * of one of those changelists. If @a changelists is empty (or 05201 * altogether @c NULL), no changelist filtering occurs. 05202 * 05203 * If error, don't touch @a *props, otherwise @a *props is a hash table 05204 * even if empty. 05205 * 05206 * This function returns SVN_ERR_UNVERSIONED_RESOURCE when it is called on 05207 * unversioned nodes. 05208 * 05209 * @since New in 1.8. 05210 */ 05211 svn_error_t * 05212 svn_client_propget5(apr_hash_t **props, 05213 apr_array_header_t **inherited_props, 05214 const char *propname, 05215 const char *target, /* abspath or URL */ 05216 const svn_opt_revision_t *peg_revision, 05217 const svn_opt_revision_t *revision, 05218 svn_revnum_t *actual_revnum, 05219 svn_depth_t depth, 05220 const apr_array_header_t *changelists, 05221 svn_client_ctx_t *ctx, 05222 apr_pool_t *result_pool, 05223 apr_pool_t *scratch_pool); 05224 05225 /** 05226 * Similar to svn_client_propget5 but with @a inherited_props always 05227 * passed as NULL. 05228 * 05229 * @since New in 1.7. 05230 * @deprecated Provided for backward compatibility with the 1.7 API. 05231 */ 05232 SVN_DEPRECATED 05233 svn_error_t * 05234 svn_client_propget4(apr_hash_t **props, 05235 const char *propname, 05236 const char *target, /* abspath or URL */ 05237 const svn_opt_revision_t *peg_revision, 05238 const svn_opt_revision_t *revision, 05239 svn_revnum_t *actual_revnum, 05240 svn_depth_t depth, 05241 const apr_array_header_t *changelists, 05242 svn_client_ctx_t *ctx, 05243 apr_pool_t *result_pool, 05244 apr_pool_t *scratch_pool); 05245 05246 /** 05247 * Similar to svn_client_propget4(), but with the following change to the 05248 * output hash keys: keys are `<tt>char *</tt>' paths, prefixed by 05249 * @a target, which is a working copy path or a URL. 05250 * 05251 * This function returns SVN_ERR_ENTRY_NOT_FOUND where svn_client_propget4 05252 * would return SVN_ERR_UNVERSIONED_RESOURCE. 05253 * 05254 * @since New in 1.5. 05255 * @deprecated Provided for backward compatibility with the 1.6 API. 05256 */ 05257 SVN_DEPRECATED 05258 svn_error_t * 05259 svn_client_propget3(apr_hash_t **props, 05260 const char *propname, 05261 const char *target, 05262 const svn_opt_revision_t *peg_revision, 05263 const svn_opt_revision_t *revision, 05264 svn_revnum_t *actual_revnum, 05265 svn_depth_t depth, 05266 const apr_array_header_t *changelists, 05267 svn_client_ctx_t *ctx, 05268 apr_pool_t *pool); 05269 05270 /** 05271 * Similar to svn_client_propget3(), except that @a actual_revnum and 05272 * @a changelists are always @c NULL, and @a depth is set according to 05273 * @a recurse: if @a recurse is TRUE, then @a depth is 05274 * #svn_depth_infinity, else #svn_depth_empty. 05275 * 05276 * @deprecated Provided for backward compatibility with the 1.4 API. 05277 */ 05278 SVN_DEPRECATED 05279 svn_error_t * 05280 svn_client_propget2(apr_hash_t **props, 05281 const char *propname, 05282 const char *target, 05283 const svn_opt_revision_t *peg_revision, 05284 const svn_opt_revision_t *revision, 05285 svn_boolean_t recurse, 05286 svn_client_ctx_t *ctx, 05287 apr_pool_t *pool); 05288 05289 /** 05290 * Similar to svn_client_propget2(), except that @a peg_revision is 05291 * always the same as @a revision. 05292 * 05293 * @deprecated Provided for backward compatibility with the 1.1 API. 05294 */ 05295 SVN_DEPRECATED 05296 svn_error_t * 05297 svn_client_propget(apr_hash_t **props, 05298 const char *propname, 05299 const char *target, 05300 const svn_opt_revision_t *revision, 05301 svn_boolean_t recurse, 05302 svn_client_ctx_t *ctx, 05303 apr_pool_t *pool); 05304 05305 /** Set @a *propval to the value of @a propname on revision @a revision 05306 * in the repository represented by @a URL. Use the authentication baton 05307 * in @a ctx for authentication, and @a pool for all memory allocation. 05308 * Return the actual rev queried in @a *set_rev. 05309 * 05310 * If @a propname does not exist on @a revision, set @a *propval to @c NULL. 05311 * 05312 * Note that unlike its cousin svn_client_propget(), this routine 05313 * doesn't affect the working copy at all; it's a pure network 05314 * operation that queries an *unversioned* property attached to a 05315 * revision. This can query log messages, dates, authors, and the 05316 * like. 05317 */ 05318 svn_error_t * 05319 svn_client_revprop_get(const char *propname, 05320 svn_string_t **propval, 05321 const char *URL, 05322 const svn_opt_revision_t *revision, 05323 svn_revnum_t *set_rev, 05324 svn_client_ctx_t *ctx, 05325 apr_pool_t *pool); 05326 05327 /** 05328 * Invoke @a receiver with @a receiver_baton to return the regular explicit, and 05329 * possibly the inherited, properties of @a target, a URL or working copy path. 05330 * @a receiver will be called for each path encountered. 05331 * 05332 * @a target is a WC path or a URL. 05333 * 05334 * If @a revision->kind is #svn_opt_revision_unspecified, then get the 05335 * explicit (and possibly the inherited) properties from the working copy, 05336 * if @a target is a working copy path, or from the repository head if 05337 * @a target is a URL. Else get the properties as of @a revision. 05338 * The actual node revision selected is determined by the path as it exists 05339 * in @a peg_revision. If @a peg_revision->kind is 05340 * #svn_opt_revision_unspecified, then it defaults to #svn_opt_revision_head 05341 * for URLs or #svn_opt_revision_working for WC targets. Use the 05342 * authentication baton cached in @a ctx for authentication if contacting 05343 * the repository. 05344 * 05345 * If @a depth is #svn_depth_empty, list only the properties of 05346 * @a target itself. If @a depth is #svn_depth_files, and 05347 * @a target is a directory, list the properties of @a target 05348 * and its file entries. If #svn_depth_immediates, list the properties 05349 * of its immediate file and directory entries. If #svn_depth_infinity, 05350 * list the properties of its file entries and recurse (with 05351 * #svn_depth_infinity) on directory entries. #svn_depth_unknown is 05352 * equivalent to #svn_depth_empty. All other values produce undefined 05353 * results. 05354 * 05355 * @a changelists is an array of <tt>const char *</tt> changelist 05356 * names, used as a restrictive filter on items whose properties are 05357 * listed; that is, don't list properties on any item unless it's a member 05358 * of one of those changelists. If @a changelists is empty (or 05359 * altogether @c NULL), no changelist filtering occurs. 05360 * 05361 * If @a get_target_inherited_props is true, then also return any inherited 05362 * properties when @a receiver is called for @a target. If @a target is a 05363 * working copy path, then properties inherited by @a target as far as the 05364 * root of the working copy are obtained from the working copy's actual 05365 * property values. Properties inherited from above the working copy 05366 * root come from the inherited properties cache. If @a target is a URL, 05367 * then the inherited properties come from the repository. 05368 * If @a get_target_inherited_props is false, then no inherited properties 05369 * are returned to @a receiver. 05370 * 05371 * If @a target is not found, return the error #SVN_ERR_ENTRY_NOT_FOUND. 05372 * 05373 * @since New in 1.8. 05374 */ 05375 svn_error_t * 05376 svn_client_proplist4(const char *target, 05377 const svn_opt_revision_t *peg_revision, 05378 const svn_opt_revision_t *revision, 05379 svn_depth_t depth, 05380 const apr_array_header_t *changelists, 05381 svn_boolean_t get_target_inherited_props, 05382 svn_proplist_receiver2_t receiver, 05383 void *receiver_baton, 05384 svn_client_ctx_t *ctx, 05385 apr_pool_t *scratch_pool); 05386 05387 /** 05388 * Similar to svn_client_proplist4(), except that the @a receiver type 05389 * is a #svn_proplist_receiver_t, @a get_target_inherited_props is 05390 * always passed NULL, and there is no separate scratch pool. 05391 * 05392 * @since New in 1.5. 05393 * @deprecated Provided for backward compatibility with the 1.7 API. 05394 */ 05395 SVN_DEPRECATED 05396 svn_error_t * 05397 svn_client_proplist3(const char *target, 05398 const svn_opt_revision_t *peg_revision, 05399 const svn_opt_revision_t *revision, 05400 svn_depth_t depth, 05401 const apr_array_header_t *changelists, 05402 svn_proplist_receiver_t receiver, 05403 void *receiver_baton, 05404 svn_client_ctx_t *ctx, 05405 apr_pool_t *pool); 05406 05407 /** 05408 * Similar to svn_client_proplist3(), except the properties are 05409 * returned as an array of #svn_client_proplist_item_t * structures 05410 * instead of by invoking the receiver function, there's no support 05411 * for @a changelists filtering, and @a recurse is used instead of a 05412 * #svn_depth_t parameter (FALSE corresponds to #svn_depth_empty, 05413 * and TRUE to #svn_depth_infinity). 05414 * 05415 * @since New in 1.2. 05416 * 05417 * @deprecated Provided for backward compatibility with the 1.4 API. 05418 */ 05419 SVN_DEPRECATED 05420 svn_error_t * 05421 svn_client_proplist2(apr_array_header_t **props, 05422 const char *target, 05423 const svn_opt_revision_t *peg_revision, 05424 const svn_opt_revision_t *revision, 05425 svn_boolean_t recurse, 05426 svn_client_ctx_t *ctx, 05427 apr_pool_t *pool); 05428 05429 /** 05430 * Similar to svn_client_proplist2(), except that @a peg_revision is 05431 * always the same as @a revision. 05432 * 05433 * @deprecated Provided for backward compatibility with the 1.1 API. 05434 */ 05435 SVN_DEPRECATED 05436 svn_error_t * 05437 svn_client_proplist(apr_array_header_t **props, 05438 const char *target, 05439 const svn_opt_revision_t *revision, 05440 svn_boolean_t recurse, 05441 svn_client_ctx_t *ctx, 05442 apr_pool_t *pool); 05443 05444 /** Set @a *props to a hash of the revision props attached to @a revision in 05445 * the repository represented by @a URL. Use the authentication baton cached 05446 * in @a ctx for authentication, and @a pool for all memory allocation. 05447 * Return the actual rev queried in @a *set_rev. 05448 * 05449 * The allocated hash maps (<tt>const char *</tt>) property names to 05450 * (#svn_string_t *) property values. 05451 * 05452 * Note that unlike its cousin svn_client_proplist(), this routine 05453 * doesn't read a working copy at all; it's a pure network operation 05454 * that reads *unversioned* properties attached to a revision. 05455 */ 05456 svn_error_t * 05457 svn_client_revprop_list(apr_hash_t **props, 05458 const char *URL, 05459 const svn_opt_revision_t *revision, 05460 svn_revnum_t *set_rev, 05461 svn_client_ctx_t *ctx, 05462 apr_pool_t *pool); 05463 /** @} */ 05464 05465 05466 /** 05467 * @defgroup Export Export a tree from version control. 05468 * 05469 * @{ 05470 */ 05471 05472 /** 05473 * Export the contents of either a subversion repository or a 05474 * subversion working copy into a 'clean' directory (meaning a 05475 * directory with no administrative directories). If @a result_rev 05476 * is not @c NULL and the path being exported is a repository URL, set 05477 * @a *result_rev to the value of the revision actually exported (set 05478 * it to #SVN_INVALID_REVNUM for local exports). 05479 * 05480 * @a from_path_or_url is either the path the working copy on disk, or 05481 * a URL to the repository you wish to export. 05482 * 05483 * When exporting a directory, @a to_path is the path to the directory 05484 * where you wish to create the exported tree; when exporting a file, it 05485 * is the path of the file that will be created. If @a to_path is the 05486 * empty path, then the basename of the export file/directory in the repository 05487 * will be used. If @a to_path represents an existing directory, and a 05488 * file is being exported, then a file with the that basename will be 05489 * created under that directory (as with 'copy' operations). 05490 * 05491 * @a peg_revision is the revision where the path is first looked up 05492 * when exporting from a repository. If @a peg_revision->kind is 05493 * #svn_opt_revision_unspecified, then it defaults to #svn_opt_revision_head 05494 * for URLs or #svn_opt_revision_working for WC targets. 05495 * 05496 * @a revision is the revision that should be exported, which is only used 05497 * when exporting from a repository. 05498 * 05499 * @a peg_revision and @a revision must not be @c NULL. 05500 * 05501 * @a ctx->notify_func2 and @a ctx->notify_baton2 are the notification 05502 * functions and baton which are passed to svn_client_checkout() when 05503 * exporting from a repository. 05504 * 05505 * @a ctx is a context used for authentication in the repository case. 05506 * 05507 * @a overwrite if TRUE will cause the export to overwrite files or 05508 * directories. 05509 * 05510 * If @a ignore_externals is set, don't process externals definitions 05511 * as part of this operation. 05512 * 05513 * If @a ignore_keywords is set, don't expand keywords as part of this 05514 * operation. 05515 * 05516 * @a native_eol allows you to override the standard eol marker on the 05517 * platform you are running on. Can be either "LF", "CR" or "CRLF" or 05518 * NULL. If NULL will use the standard eol marker. Any other value 05519 * will cause the #SVN_ERR_IO_UNKNOWN_EOL error to be returned. 05520 * 05521 * If @a depth is #svn_depth_infinity, export fully recursively. Else 05522 * if it is #svn_depth_immediates, export @a from_path_or_url and its 05523 * immediate children (if any), but with subdirectories empty and at 05524 * #svn_depth_empty. Else if #svn_depth_files, export @a 05525 * from_path_or_url and its immediate file children (if any) only. If 05526 * @a depth is #svn_depth_empty, then export exactly @a 05527 * from_path_or_url and none of its children. 05528 * 05529 * All allocations are done in @a pool. 05530 * 05531 * @since New in 1.7. 05532 */ 05533 svn_error_t * 05534 svn_client_export5(svn_revnum_t *result_rev, 05535 const char *from_path_or_url, 05536 const char *to_path, 05537 const svn_opt_revision_t *peg_revision, 05538 const svn_opt_revision_t *revision, 05539 svn_boolean_t overwrite, 05540 svn_boolean_t ignore_externals, 05541 svn_boolean_t ignore_keywords, 05542 svn_depth_t depth, 05543 const char *native_eol, 05544 svn_client_ctx_t *ctx, 05545 apr_pool_t *pool); 05546 05547 /** 05548 * Similar to svn_client_export5(), but with @a ignore_keywords set 05549 * to FALSE. 05550 * 05551 * @deprecated Provided for backward compatibility with the 1.6 API. 05552 * @since New in 1.5. 05553 */ 05554 SVN_DEPRECATED 05555 svn_error_t * 05556 svn_client_export4(svn_revnum_t *result_rev, 05557 const char *from_path_or_url, 05558 const char *to_path, 05559 const svn_opt_revision_t *peg_revision, 05560 const svn_opt_revision_t *revision, 05561 svn_boolean_t overwrite, 05562 svn_boolean_t ignore_externals, 05563 svn_depth_t depth, 05564 const char *native_eol, 05565 svn_client_ctx_t *ctx, 05566 apr_pool_t *pool); 05567 05568 05569 /** 05570 * Similar to svn_client_export4(), but with @a depth set according to 05571 * @a recurse: if @a recurse is TRUE, set @a depth to 05572 * #svn_depth_infinity, if @a recurse is FALSE, set @a depth to 05573 * #svn_depth_files. 05574 * 05575 * @deprecated Provided for backward compatibility with the 1.4 API. 05576 * 05577 * @since New in 1.2. 05578 */ 05579 SVN_DEPRECATED 05580 svn_error_t * 05581 svn_client_export3(svn_revnum_t *result_rev, 05582 const char *from_path_or_url, 05583 const char *to_path, 05584 const svn_opt_revision_t *peg_revision, 05585 const svn_opt_revision_t *revision, 05586 svn_boolean_t overwrite, 05587 svn_boolean_t ignore_externals, 05588 svn_boolean_t recurse, 05589 const char *native_eol, 05590 svn_client_ctx_t *ctx, 05591 apr_pool_t *pool); 05592 05593 05594 /** 05595 * Similar to svn_client_export3(), but with @a peg_revision 05596 * always set to #svn_opt_revision_unspecified, @a overwrite set to 05597 * the value of @a force, @a ignore_externals always FALSE, and 05598 * @a recurse always TRUE. 05599 * 05600 * @since New in 1.1. 05601 * @deprecated Provided for backward compatibility with the 1.1 API. 05602 */ 05603 SVN_DEPRECATED 05604 svn_error_t * 05605 svn_client_export2(svn_revnum_t *result_rev, 05606 const char *from_path_or_url, 05607 const char *to_path, 05608 svn_opt_revision_t *revision, 05609 svn_boolean_t force, 05610 const char *native_eol, 05611 svn_client_ctx_t *ctx, 05612 apr_pool_t *pool); 05613 05614 05615 /** 05616 * Similar to svn_client_export2(), but with @a native_eol always set 05617 * to NULL. 05618 * 05619 * @deprecated Provided for backward compatibility with the 1.0 API. 05620 */ 05621 SVN_DEPRECATED 05622 svn_error_t * 05623 svn_client_export(svn_revnum_t *result_rev, 05624 const char *from_path_or_url, 05625 const char *to_path, 05626 svn_opt_revision_t *revision, 05627 svn_boolean_t force, 05628 svn_client_ctx_t *ctx, 05629 apr_pool_t *pool); 05630 05631 /** @} */ 05632 05633 /** 05634 * @defgroup List List / ls 05635 * 05636 * @{ 05637 */ 05638 05639 /** The type of function invoked by svn_client_list3() to report the details 05640 * of each directory entry being listed. 05641 * 05642 * @a baton is the baton that was passed to the caller. @a path is the 05643 * entry's path relative to @a abs_path; it is the empty path when reporting 05644 * the top node of the list operation. @a dirent contains some or all of 05645 * the directory entry's details, as determined by the caller. @a lock is 05646 * the entry's lock, if it is locked and if lock information is being 05647 * reported by the caller; otherwise @a lock is NULL. @a abs_path is the 05648 * repository path of the top node of the list operation; it is relative to 05649 * the repository root and begins with "/". 05650 * 05651 * If svn_client_list3() was called with @a include_externals set to TRUE, 05652 * @a external_parent_url and @a external_target will be set. 05653 * @a external_parent_url is url of the directory which has the 05654 * externals definitions. @a external_target is the target subdirectory of 05655 * externals definitions which is relative to the parent directory that holds 05656 * the external item. 05657 * 05658 * If external_parent_url and external_target are defined, the item being 05659 * listed is part of the external described by external_parent_url and 05660 * external_target. Else, the item is not part of any external. 05661 * Moreover, we will never mix items which are part of separate 05662 * externals, and will always finish listing an external before listing 05663 * the next one. 05664 * 05665 * @a scratch_pool may be used for temporary allocations. 05666 * 05667 * @since New in 1.8. 05668 */ 05669 typedef svn_error_t *(*svn_client_list_func2_t)( 05670 void *baton, 05671 const char *path, 05672 const svn_dirent_t *dirent, 05673 const svn_lock_t *lock, 05674 const char *abs_path, 05675 const char *external_parent_url, 05676 const char *external_target, 05677 apr_pool_t *scratch_pool); 05678 05679 /** 05680 * Similar to #svn_client_list_func2_t, but without any information about 05681 * externals definitions. 05682 * 05683 * @deprecated Provided for backward compatibility with the 1.7 API. 05684 * 05685 * @since New in 1.4 05686 * 05687 * */ 05688 typedef svn_error_t *(*svn_client_list_func_t)(void *baton, 05689 const char *path, 05690 const svn_dirent_t *dirent, 05691 const svn_lock_t *lock, 05692 const char *abs_path, 05693 apr_pool_t *pool); 05694 05695 /** 05696 * Report the directory entry, and possibly children, for @a 05697 * path_or_url at @a revision. The actual node revision selected is 05698 * determined by the path as it exists in @a peg_revision. If @a 05699 * peg_revision->kind is #svn_opt_revision_unspecified, then it defaults 05700 * to #svn_opt_revision_head for URLs or #svn_opt_revision_working 05701 * for WC targets. 05702 * 05703 * Report directory entries by invoking @a list_func/@a baton with @a path 05704 * relative to @a path_or_url. The dirent for @a path_or_url is reported 05705 * using an empty @a path. If @a path_or_url is a directory, also report 05706 * its children. If @a path_or_url is non-existent, return 05707 * #SVN_ERR_FS_NOT_FOUND. 05708 * 05709 * If @a fetch_locks is TRUE, include locks when reporting directory entries. 05710 * 05711 * If @a include_externals is TRUE, also list all external items 05712 * reached by recursion. @a depth value passed to the original list target 05713 * applies for the externals also. 05714 * 05715 * Use @a pool for temporary allocations. 05716 * 05717 * Use authentication baton cached in @a ctx to authenticate against the 05718 * repository. 05719 * 05720 * If @a depth is #svn_depth_empty, list just @a path_or_url itself. 05721 * If @a depth is #svn_depth_files, list @a path_or_url and its file 05722 * entries. If #svn_depth_immediates, list its immediate file and 05723 * directory entries. If #svn_depth_infinity, list file entries and 05724 * recurse (with #svn_depth_infinity) on directory entries. 05725 * 05726 * @a dirent_fields controls which fields in the #svn_dirent_t's are 05727 * filled in. To have them totally filled in use #SVN_DIRENT_ALL, 05728 * otherwise simply bitwise OR together the combination of @c SVN_DIRENT_ 05729 * fields you care about. 05730 * 05731 * @since New in 1.8. 05732 */ 05733 svn_error_t * 05734 svn_client_list3(const char *path_or_url, 05735 const svn_opt_revision_t *peg_revision, 05736 const svn_opt_revision_t *revision, 05737 svn_depth_t depth, 05738 apr_uint32_t dirent_fields, 05739 svn_boolean_t fetch_locks, 05740 svn_boolean_t include_externals, 05741 svn_client_list_func2_t list_func, 05742 void *baton, 05743 svn_client_ctx_t *ctx, 05744 apr_pool_t *pool); 05745 05746 05747 /** Similar to svn_client_list3(), but with @a include_externals set 05748 * to FALSE, and using a #svn_client_list_func_t as callback. 05749 * 05750 * @deprecated Provided for backwards compatibility with the 1.7 API. 05751 * 05752 * @since New in 1.5. 05753 */ 05754 SVN_DEPRECATED 05755 svn_error_t * 05756 svn_client_list2(const char *path_or_url, 05757 const svn_opt_revision_t *peg_revision, 05758 const svn_opt_revision_t *revision, 05759 svn_depth_t depth, 05760 apr_uint32_t dirent_fields, 05761 svn_boolean_t fetch_locks, 05762 svn_client_list_func_t list_func, 05763 void *baton, 05764 svn_client_ctx_t *ctx, 05765 apr_pool_t *pool); 05766 05767 /** 05768 * Similar to svn_client_list2(), but with @a recurse instead of @a depth. 05769 * If @a recurse is TRUE, pass #svn_depth_files for @a depth; else 05770 * pass #svn_depth_infinity. 05771 * 05772 * @since New in 1.4. 05773 * 05774 * @deprecated Provided for backward compatibility with the 1.4 API. 05775 */ 05776 SVN_DEPRECATED 05777 svn_error_t * 05778 svn_client_list(const char *path_or_url, 05779 const svn_opt_revision_t *peg_revision, 05780 const svn_opt_revision_t *revision, 05781 svn_boolean_t recurse, 05782 apr_uint32_t dirent_fields, 05783 svn_boolean_t fetch_locks, 05784 svn_client_list_func_t list_func, 05785 void *baton, 05786 svn_client_ctx_t *ctx, 05787 apr_pool_t *pool); 05788 05789 /** 05790 * Same as svn_client_list(), but always passes #SVN_DIRENT_ALL for 05791 * the @a dirent_fields argument and returns all information in two 05792 * hash tables instead of invoking a callback. 05793 * 05794 * Set @a *dirents to a newly allocated hash of directory entries. 05795 * The @a dirents hash maps entry names (<tt>const char *</tt>) to 05796 * #svn_dirent_t *'s. 05797 * 05798 * If @a locks is not @c NULL, set @a *locks to a hash table mapping 05799 * entry names (<tt>const char *</tt>) to #svn_lock_t *'s. 05800 * 05801 * @since New in 1.3. 05802 * 05803 * @deprecated Provided for backward compatibility with the 1.3 API. 05804 * Use svn_client_list2() instead. 05805 */ 05806 SVN_DEPRECATED 05807 svn_error_t * 05808 svn_client_ls3(apr_hash_t **dirents, 05809 apr_hash_t **locks, 05810 const char *path_or_url, 05811 const svn_opt_revision_t *peg_revision, 05812 const svn_opt_revision_t *revision, 05813 svn_boolean_t recurse, 05814 svn_client_ctx_t *ctx, 05815 apr_pool_t *pool); 05816 05817 /** 05818 * Same as svn_client_ls3(), but without the ability to get locks. 05819 * 05820 * @since New in 1.2. 05821 * 05822 * @deprecated Provided for backward compatibility with the 1.2 API. 05823 * Use svn_client_list2() instead. 05824 */ 05825 SVN_DEPRECATED 05826 svn_error_t * 05827 svn_client_ls2(apr_hash_t **dirents, 05828 const char *path_or_url, 05829 const svn_opt_revision_t *peg_revision, 05830 const svn_opt_revision_t *revision, 05831 svn_boolean_t recurse, 05832 svn_client_ctx_t *ctx, 05833 apr_pool_t *pool); 05834 05835 /** 05836 * Similar to svn_client_ls2() except that @a peg_revision is always 05837 * the same as @a revision. 05838 * 05839 * @deprecated Provided for backward compatibility with the 1.1 API. 05840 * Use svn_client_list2() instead. 05841 */ 05842 SVN_DEPRECATED 05843 svn_error_t * 05844 svn_client_ls(apr_hash_t **dirents, 05845 const char *path_or_url, 05846 svn_opt_revision_t *revision, 05847 svn_boolean_t recurse, 05848 svn_client_ctx_t *ctx, 05849 apr_pool_t *pool); 05850 05851 05852 /** @} */ 05853 05854 /** 05855 * @defgroup Cat View the contents of a file in the repository. 05856 * 05857 * @{ 05858 */ 05859 05860 /** 05861 * Output the content of a file. 05862 * 05863 * @param[out] props Optional output argument to obtain properties. 05864 * @param[in] out The stream to which the content will be written. 05865 * @param[in] path_or_url The path or URL of the file. 05866 * @param[in] peg_revision The peg revision. 05867 * @param[in] revision The operative revision. 05868 * @param[in] expand_keywords When true, keywords (when set) are expanded. 05869 * @param[in] ctx The standard client context, used for possible 05870 * authentication. 05871 * 05872 * @return A pointer to an #svn_error_t of the type (this list is not 05873 * exhaustive): <br> 05874 * An unspecified error if @a revision is of kind 05875 * #svn_opt_revision_previous (or some other kind that requires 05876 * a local path), because the desired revision cannot be 05877 * determined. <br> 05878 * If no error occurred, return #SVN_NO_ERROR. 05879 * 05880 * If @a *props is not NULL it is set to a hash of all the file's 05881 * non-inherited properties. If it is NULL, the properties are only 05882 * used for determining how and if the file should be translated. 05883 * 05884 * @see #svn_client_ctx_t <br> @ref clnt_revisions for 05885 * a discussion of operative and peg revisions. 05886 * 05887 * @since New in 1.9. 05888 */ 05889 svn_error_t * 05890 svn_client_cat3(apr_hash_t **props, 05891 svn_stream_t *out, 05892 const char *path_or_url, 05893 const svn_opt_revision_t *peg_revision, 05894 const svn_opt_revision_t *revision, 05895 svn_boolean_t expand_keywords, 05896 svn_client_ctx_t *ctx, 05897 apr_pool_t *result_pool, 05898 apr_pool_t *scratch_pool); 05899 05900 /** 05901 * Similar to svn_client_cat3() except without the option of directly 05902 * reading the properties, and with @a expand_keywords always TRUE. 05903 * 05904 * @since New in 1.2. 05905 * @deprecated Provided for backward compatibility with the 1.8 API. 05906 */ 05907 SVN_DEPRECATED 05908 svn_error_t * 05909 svn_client_cat2(svn_stream_t *out, 05910 const char *path_or_url, 05911 const svn_opt_revision_t *peg_revision, 05912 const svn_opt_revision_t *revision, 05913 svn_client_ctx_t *ctx, 05914 apr_pool_t *pool); 05915 05916 05917 /** 05918 * Similar to svn_client_cat2() except that the peg revision is always 05919 * the same as @a revision. 05920 * 05921 * @deprecated Provided for backward compatibility with the 1.1 API. 05922 */ 05923 SVN_DEPRECATED 05924 svn_error_t * 05925 svn_client_cat(svn_stream_t *out, 05926 const char *path_or_url, 05927 const svn_opt_revision_t *revision, 05928 svn_client_ctx_t *ctx, 05929 apr_pool_t *pool); 05930 05931 /** @} end group: cat */ 05932 05933 05934 05935 /** Changelist commands 05936 * 05937 * @defgroup svn_client_changelist_funcs Client Changelist Functions 05938 * @{ 05939 */ 05940 05941 /** Implementation note: 05942 * 05943 * For now, changelists are implemented by scattering the 05944 * associations across multiple .svn/entries files in a working copy. 05945 * However, this client API was written so that we have the option of 05946 * changing the underlying implementation -- we may someday want to 05947 * store changelist definitions in a centralized database. 05948 */ 05949 05950 /** 05951 * Add each path in @a paths (recursing to @a depth as necessary) to 05952 * @a changelist. If a path is already a member of another 05953 * changelist, then remove it from the other changelist and add it to 05954 * @a changelist. (For now, a path cannot belong to two changelists 05955 * at once.) 05956 * 05957 * @a paths is an array of (const char *) local WC paths. 05958 * 05959 * @a changelists is an array of <tt>const char *</tt> changelist 05960 * names, used as a restrictive filter on items whose changelist 05961 * assignments are adjusted; that is, don't tweak the changeset of any 05962 * item unless it's currently a member of one of those changelists. 05963 * If @a changelists is empty (or altogether @c NULL), no changelist 05964 * filtering occurs. 05965 * 05966 * @note This metadata is purely a client-side "bookkeeping" 05967 * convenience, and is entirely managed by the working copy. 05968 * 05969 * @since New in 1.5. 05970 */ 05971 svn_error_t * 05972 svn_client_add_to_changelist(const apr_array_header_t *paths, 05973 const char *changelist, 05974 svn_depth_t depth, 05975 const apr_array_header_t *changelists, 05976 svn_client_ctx_t *ctx, 05977 apr_pool_t *pool); 05978 05979 /** 05980 * Remove each path in @a paths (recursing to @a depth as necessary) 05981 * from changelists to which they are currently assigned. 05982 * 05983 * @a paths is an array of (const char *) local WC paths. 05984 * 05985 * @a changelists is an array of <tt>const char *</tt> changelist 05986 * names, used as a restrictive filter on items whose changelist 05987 * assignments are removed; that is, don't remove from a changeset any 05988 * item unless it's currently a member of one of those changelists. 05989 * If @a changelists is empty (or altogether @c NULL), all changelist 05990 * assignments in and under each path in @a paths (to @a depth) will 05991 * be removed. 05992 * 05993 * @note This metadata is purely a client-side "bookkeeping" 05994 * convenience, and is entirely managed by the working copy. 05995 * 05996 * @since New in 1.5. 05997 */ 05998 svn_error_t * 05999 svn_client_remove_from_changelists(const apr_array_header_t *paths, 06000 svn_depth_t depth, 06001 const apr_array_header_t *changelists, 06002 svn_client_ctx_t *ctx, 06003 apr_pool_t *pool); 06004 06005 06006 /** 06007 * Beginning at @a path, crawl to @a depth to discover every path in 06008 * or under @a path which belongs to one of the changelists in @a 06009 * changelists (an array of <tt>const char *</tt> changelist names). 06010 * If @a changelists is @c NULL, discover paths with any changelist. 06011 * Call @a callback_func (with @a callback_baton) each time a 06012 * changelist-having path is discovered. 06013 * 06014 * @a path is a local WC path. 06015 * 06016 * If @a ctx->cancel_func is not @c NULL, invoke it passing @a 06017 * ctx->cancel_baton during the recursive walk. 06018 * 06019 * @since New in 1.5. 06020 */ 06021 svn_error_t * 06022 svn_client_get_changelists(const char *path, 06023 const apr_array_header_t *changelists, 06024 svn_depth_t depth, 06025 svn_changelist_receiver_t callback_func, 06026 void *callback_baton, 06027 svn_client_ctx_t *ctx, 06028 apr_pool_t *pool); 06029 06030 /** @} */ 06031 06032 06033 06034 /** Locking commands 06035 * 06036 * @defgroup svn_client_locking_funcs Client Locking Functions 06037 * @{ 06038 */ 06039 06040 /** 06041 * Lock @a targets in the repository. @a targets is an array of 06042 * <tt>const char *</tt> paths - either all working copy paths or all URLs. 06043 * All targets must be in the same repository. 06044 * 06045 * If a target is already locked in the repository, no lock will be 06046 * acquired unless @a steal_lock is TRUE, in which case the locks are 06047 * stolen. @a comment, if non-NULL, is an xml-escapable description 06048 * stored with each lock in the repository. Each acquired lock will 06049 * be stored in the working copy if the targets are WC paths. 06050 * 06051 * For each target @a ctx->notify_func2/notify_baton2 will be used to indicate 06052 * whether it was locked. An action of #svn_wc_notify_locked 06053 * means that the path was locked. If the path was not locked because 06054 * it was out of date or there was already a lock in the repository, 06055 * the notification function will be called with 06056 * #svn_wc_notify_failed_lock, and the error passed in the notification 06057 * structure. 06058 * 06059 * Use @a pool for temporary allocations. 06060 * 06061 * @since New in 1.2. 06062 */ 06063 svn_error_t * 06064 svn_client_lock(const apr_array_header_t *targets, 06065 const char *comment, 06066 svn_boolean_t steal_lock, 06067 svn_client_ctx_t *ctx, 06068 apr_pool_t *pool); 06069 06070 /** 06071 * Unlock @a targets in the repository. @a targets is an array of 06072 * <tt>const char *</tt> paths - either all working copy paths or all URLs. 06073 * All targets must be in the same repository. 06074 * 06075 * If the targets are WC paths, and @a break_lock is FALSE, the working 06076 * copy must contain a lock for each target. 06077 * If this is not the case, or the working copy lock doesn't match the 06078 * lock token in the repository, an error will be signaled. 06079 * 06080 * If the targets are URLs, the locks may be broken even if @a break_lock 06081 * is FALSE, but only if the lock owner is the same as the 06082 * authenticated user. 06083 * 06084 * If @a break_lock is TRUE, the locks will be broken in the 06085 * repository. In both cases, the locks, if any, will be removed from 06086 * the working copy if the targets are WC paths. 06087 * 06088 * The notification functions in @a ctx will be called for each 06089 * target. If the target was successfully unlocked, 06090 * #svn_wc_notify_unlocked will be used. Else, if the error is 06091 * directly related to unlocking the path (see 06092 * #SVN_ERR_IS_UNLOCK_ERROR), #svn_wc_notify_failed_unlock will be 06093 * used and the error will be passed in the notification structure. 06094 06095 * Use @a pool for temporary allocations. 06096 * 06097 * @since New in 1.2. 06098 */ 06099 svn_error_t * 06100 svn_client_unlock(const apr_array_header_t *targets, 06101 svn_boolean_t break_lock, 06102 svn_client_ctx_t *ctx, 06103 apr_pool_t *pool); 06104 06105 /** @} */ 06106 06107 /** 06108 * @defgroup Info Show repository information about a working copy. 06109 * 06110 * @{ 06111 */ 06112 06113 /** The size of the file is unknown. 06114 * Used as value in fields of type @c apr_size_t in #svn_info_t. 06115 * 06116 * @since New in 1.5 06117 * @deprecated Provided for backward compatibility with the 1.6 API. 06118 */ 06119 #define SVN_INFO_SIZE_UNKNOWN ((apr_size_t) -1) 06120 06121 /** 06122 * A structure which describes various system-generated metadata about 06123 * a working-copy path or URL. 06124 * 06125 * @note Fields may be added to the end of this structure in future 06126 * versions. Therefore, users shouldn't allocate structures of this 06127 * type, to preserve binary compatibility. 06128 * 06129 * @since New in 1.2. 06130 * @deprecated Provided for backward compatibility with the 1.6 API. The new 06131 * API is #svn_client_info2_t. 06132 */ 06133 typedef struct svn_info_t 06134 { 06135 /** Where the item lives in the repository. */ 06136 const char *URL; 06137 06138 /** The revision of the object. If path_or_url is a working-copy 06139 * path, then this is its current working revnum. If path_or_url 06140 * is a URL, then this is the repos revision that path_or_url lives in. */ 06141 svn_revnum_t rev; 06142 06143 /** The node's kind. */ 06144 svn_node_kind_t kind; 06145 06146 /** The root URL of the repository. */ 06147 const char *repos_root_URL; 06148 06149 /** The repository's UUID. */ 06150 const char *repos_UUID; 06151 06152 /** The last revision in which this object changed. */ 06153 svn_revnum_t last_changed_rev; 06154 06155 /** The date of the last_changed_rev. */ 06156 apr_time_t last_changed_date; 06157 06158 /** The author of the last_changed_rev. */ 06159 const char *last_changed_author; 06160 06161 /** An exclusive lock, if present. Could be either local or remote. */ 06162 svn_lock_t *lock; 06163 06164 /** Whether or not to ignore the next 10 wc-specific fields. */ 06165 svn_boolean_t has_wc_info; 06166 06167 /** 06168 * @name Working-copy path fields 06169 * These things only apply to a working-copy path. 06170 * See svn_wc_entry_t for explanations. 06171 * @{ 06172 */ 06173 svn_wc_schedule_t schedule; 06174 const char *copyfrom_url; 06175 svn_revnum_t copyfrom_rev; 06176 apr_time_t text_time; 06177 apr_time_t prop_time; /* will always be 0 for svn 1.4 and later */ 06178 const char *checksum; 06179 const char *conflict_old; 06180 const char *conflict_new; 06181 const char *conflict_wrk; 06182 const char *prejfile; 06183 /** @since New in 1.5. */ 06184 const char *changelist; 06185 /** @since New in 1.5. */ 06186 svn_depth_t depth; 06187 06188 /** 06189 * Similar to working_size64, but will be #SVN_INFO_SIZE_UNKNOWN when 06190 * its value would overflow apr_size_t (so when size >= 4 GB - 1 byte). 06191 * 06192 * @deprecated Provided for backward compatibility with the 1.5 API. 06193 */ 06194 apr_size_t working_size; 06195 06196 /** @} */ 06197 06198 /** 06199 * Similar to size64, but size will be #SVN_INFO_SIZE_UNKNOWN when 06200 * its value would overflow apr_size_t (so when size >= 4 GB - 1 byte). 06201 * 06202 * @deprecated Provided for backward compatibility with the 1.5 API. 06203 */ 06204 apr_size_t size; 06205 06206 /** 06207 * The size of the file in the repository (untranslated, 06208 * e.g. without adjustment of line endings and keyword 06209 * expansion). Only applicable for file -- not directory -- URLs. 06210 * For working copy paths, size64 will be #SVN_INVALID_FILESIZE. 06211 * @since New in 1.6. 06212 */ 06213 svn_filesize_t size64; 06214 06215 /** 06216 * The size of the file after being translated into its local 06217 * representation, or #SVN_INVALID_FILESIZE if unknown. 06218 * Not applicable for directories. 06219 * @since New in 1.6. 06220 * @name Working-copy path fields 06221 * @{ 06222 */ 06223 svn_filesize_t working_size64; 06224 06225 /** 06226 * Info on any tree conflict of which this node is a victim. Otherwise NULL. 06227 * @since New in 1.6. 06228 */ 06229 svn_wc_conflict_description_t *tree_conflict; 06230 06231 /** @} */ 06232 06233 } svn_info_t; 06234 06235 06236 /** 06237 * The callback invoked by svn_client_info2(). Each invocation 06238 * describes @a path with the information present in @a info. Note 06239 * that any fields within @a info may be NULL if information is 06240 * unavailable. Use @a pool for all temporary allocation. 06241 * 06242 * @since New in 1.2. 06243 * @deprecated Provided for backward compatibility with the 1.6 API. The new 06244 * API is #svn_client_info_receiver2_t. 06245 */ 06246 typedef svn_error_t *(*svn_info_receiver_t)( 06247 void *baton, 06248 const char *path, 06249 const svn_info_t *info, 06250 apr_pool_t *pool); 06251 06252 /** 06253 * Return a duplicate of @a info, allocated in @a pool. No part of the new 06254 * structure will be shared with @a info. 06255 * 06256 * @since New in 1.3. 06257 * @deprecated Provided for backward compatibility with the 1.6 API. The new 06258 * API is #svn_client_info2_dup(). 06259 */ 06260 SVN_DEPRECATED 06261 svn_info_t * 06262 svn_info_dup(const svn_info_t *info, 06263 apr_pool_t *pool); 06264 06265 /** 06266 * A structure which describes various system-generated metadata about 06267 * a working-copy path or URL. 06268 * 06269 * @note Fields may be added to the end of this structure in future 06270 * versions. Therefore, users shouldn't allocate structures of this 06271 * type, to preserve binary compatibility. 06272 * 06273 * @since New in 1.7. 06274 */ 06275 typedef struct svn_client_info2_t 06276 { 06277 /** Where the item lives in the repository. */ 06278 const char *URL; 06279 06280 /** The revision of the object. If the target is a working-copy 06281 * path, then this is its current working revnum. If the target 06282 * is a URL, then this is the repos revision that it lives in. */ 06283 svn_revnum_t rev; 06284 06285 /** The root URL of the repository. */ 06286 const char *repos_root_URL; 06287 06288 /** The repository's UUID. */ 06289 const char *repos_UUID; 06290 06291 /** The node's kind. */ 06292 svn_node_kind_t kind; 06293 06294 /** The size of the file in the repository (untranslated, 06295 * e.g. without adjustment of line endings and keyword 06296 * expansion). Only applicable for file -- not directory -- URLs. 06297 * For working copy paths, @a size will be #SVN_INVALID_FILESIZE. */ 06298 svn_filesize_t size; 06299 06300 /** The last revision in which this object changed. */ 06301 svn_revnum_t last_changed_rev; 06302 06303 /** The date of the last_changed_rev. */ 06304 apr_time_t last_changed_date; 06305 06306 /** The author of the last_changed_rev. */ 06307 const char *last_changed_author; 06308 06309 /** An exclusive lock, if present. Could be either local or remote. */ 06310 const svn_lock_t *lock; 06311 06312 /** Possible information about the working copy, NULL if not valid. */ 06313 const svn_wc_info_t *wc_info; 06314 06315 } svn_client_info2_t; 06316 06317 /** 06318 * Return a duplicate of @a info, allocated in @a pool. No part of the new 06319 * structure will be shared with @a info. 06320 * 06321 * @since New in 1.7. 06322 */ 06323 svn_client_info2_t * 06324 svn_client_info2_dup(const svn_client_info2_t *info, 06325 apr_pool_t *pool); 06326 06327 /** 06328 * The callback invoked by info retrievers. Each invocation 06329 * describes @a abspath_or_url with the information present in @a info. 06330 * Use @a scratch_pool for all temporary allocation. 06331 * 06332 * @since New in 1.7. 06333 */ 06334 typedef svn_error_t *(*svn_client_info_receiver2_t)( 06335 void *baton, 06336 const char *abspath_or_url, 06337 const svn_client_info2_t *info, 06338 apr_pool_t *scratch_pool); 06339 06340 /** 06341 * Invoke @a receiver with @a receiver_baton to return information 06342 * about @a abspath_or_url in @a revision. The information returned is 06343 * system-generated metadata, not the sort of "property" metadata 06344 * created by users. See #svn_client_info2_t. 06345 * 06346 * If both revision arguments are either #svn_opt_revision_unspecified 06347 * or @c NULL, then information will be pulled solely from the working copy; 06348 * no network connections will be made. 06349 * 06350 * Otherwise, information will be pulled from a repository. The 06351 * actual node revision selected is determined by the @a abspath_or_url 06352 * as it exists in @a peg_revision. If @a peg_revision->kind is 06353 * #svn_opt_revision_unspecified, then it defaults to 06354 * #svn_opt_revision_head for URLs or #svn_opt_revision_working for 06355 * WC targets. 06356 * 06357 * If @a abspath_or_url is not a local path, then if @a revision is of 06358 * kind #svn_opt_revision_previous (or some other kind that requires 06359 * a local path), an error will be returned, because the desired 06360 * revision cannot be determined. 06361 * 06362 * Use the authentication baton cached in @a ctx to authenticate 06363 * against the repository. 06364 * 06365 * If @a abspath_or_url is a file, just invoke @a receiver on it. If it 06366 * is a directory, then descend according to @a depth. If @a depth is 06367 * #svn_depth_empty, invoke @a receiver on @a abspath_or_url and 06368 * nothing else; if #svn_depth_files, on @a abspath_or_url and its 06369 * immediate file children; if #svn_depth_immediates, the preceding 06370 * plus on each immediate subdirectory; if #svn_depth_infinity, then 06371 * recurse fully, invoking @a receiver on @a abspath_or_url and 06372 * everything beneath it. 06373 * 06374 * If @a fetch_excluded is TRUE, also also send excluded nodes in the working 06375 * copy to @a receiver, otherwise these are skipped. If @a fetch_actual_only 06376 * is TRUE also send nodes that don't exist as versioned but are still 06377 * tree conflicted. 06378 * 06379 * If @a include_externals is @c TRUE, recurse into externals and report about 06380 * them as well. 06381 * 06382 * @a changelists is an array of <tt>const char *</tt> changelist 06383 * names, used as a restrictive filter on items whose info is 06384 * reported; that is, don't report info about any item unless 06385 * it's a member of one of those changelists. If @a changelists is 06386 * empty (or altogether @c NULL), no changelist filtering occurs. 06387 * 06388 * @since New in 1.9. 06389 */ 06390 svn_error_t * 06391 svn_client_info4(const char *abspath_or_url, 06392 const svn_opt_revision_t *peg_revision, 06393 const svn_opt_revision_t *revision, 06394 svn_depth_t depth, 06395 svn_boolean_t fetch_excluded, 06396 svn_boolean_t fetch_actual_only, 06397 svn_boolean_t include_externals, 06398 const apr_array_header_t *changelists, 06399 svn_client_info_receiver2_t receiver, 06400 void *receiver_baton, 06401 svn_client_ctx_t *ctx, 06402 apr_pool_t *scratch_pool); 06403 06404 06405 /** Similar to svn_client_info4, but doesn't support walking externals. 06406 * 06407 * @since New in 1.7. 06408 * @deprecated Provided for backward compatibility with the 1.8 API. 06409 */ 06410 SVN_DEPRECATED 06411 svn_error_t * 06412 svn_client_info3(const char *abspath_or_url, 06413 const svn_opt_revision_t *peg_revision, 06414 const svn_opt_revision_t *revision, 06415 svn_depth_t depth, 06416 svn_boolean_t fetch_excluded, 06417 svn_boolean_t fetch_actual_only, 06418 const apr_array_header_t *changelists, 06419 svn_client_info_receiver2_t receiver, 06420 void *receiver_baton, 06421 svn_client_ctx_t *ctx, 06422 apr_pool_t *scratch_pool); 06423 06424 /** Similar to svn_client_info3, but uses an svn_info_receiver_t instead of 06425 * a #svn_client_info_receiver2_t, and @a path_or_url may be a relative path. 06426 * 06427 * @since New in 1.5. 06428 * @deprecated Provided for backward compatibility with the 1.6 API. 06429 */ 06430 SVN_DEPRECATED 06431 svn_error_t * 06432 svn_client_info2(const char *path_or_url, 06433 const svn_opt_revision_t *peg_revision, 06434 const svn_opt_revision_t *revision, 06435 svn_info_receiver_t receiver, 06436 void *receiver_baton, 06437 svn_depth_t depth, 06438 const apr_array_header_t *changelists, 06439 svn_client_ctx_t *ctx, 06440 apr_pool_t *pool); 06441 06442 /** 06443 * Similar to svn_client_info2() but with @a changelists passed as @c 06444 * NULL, and @a depth set according to @a recurse: if @a recurse is 06445 * TRUE, @a depth is #svn_depth_infinity, else #svn_depth_empty. 06446 * 06447 * @deprecated Provided for backward compatibility with the 1.4 API. 06448 */ 06449 SVN_DEPRECATED 06450 svn_error_t * 06451 svn_client_info(const char *path_or_url, 06452 const svn_opt_revision_t *peg_revision, 06453 const svn_opt_revision_t *revision, 06454 svn_info_receiver_t receiver, 06455 void *receiver_baton, 06456 svn_boolean_t recurse, 06457 svn_client_ctx_t *ctx, 06458 apr_pool_t *pool); 06459 06460 /** 06461 * Set @a *wcroot_abspath to the local abspath of the root of the 06462 * working copy in which @a local_abspath resides. 06463 * 06464 * @since New in 1.7. 06465 */ 06466 svn_error_t * 06467 svn_client_get_wc_root(const char **wcroot_abspath, 06468 const char *local_abspath, 06469 svn_client_ctx_t *ctx, 06470 apr_pool_t *result_pool, 06471 apr_pool_t *scratch_pool); 06472 06473 /** 06474 * Set @a *min_revision and @a *max_revision to the lowest and highest 06475 * revision numbers found within @a local_abspath. If @a committed is 06476 * TRUE, set @a *min_revision and @a *max_revision to the lowest and 06477 * highest comitted (i.e. "last changed") revision numbers, 06478 * respectively. NULL may be passed for either of @a min_revision and 06479 * @a max_revision to indicate the caller's lack of interest in the 06480 * value. Use @a scratch_pool for temporary allocations. 06481 * 06482 * @since New in 1.7. 06483 */ 06484 svn_error_t * 06485 svn_client_min_max_revisions(svn_revnum_t *min_revision, 06486 svn_revnum_t *max_revision, 06487 const char *local_abspath, 06488 svn_boolean_t committed, 06489 svn_client_ctx_t *ctx, 06490 apr_pool_t *scratch_pool); 06491 06492 /** @} */ 06493 06494 06495 /** 06496 * @defgroup Patch Apply a patch to the working copy 06497 * 06498 * @{ 06499 */ 06500 06501 /** 06502 * The callback invoked by svn_client_patch() before attempting to patch 06503 * the target file at @a canon_path_from_patchfile (the path as parsed from 06504 * the patch file, but in canonicalized form). The callback can set 06505 * @a *filtered to @c TRUE to prevent the file from being patched, or else 06506 * must set it to @c FALSE. 06507 * 06508 * The callback is also provided with @a patch_abspath, the path of a 06509 * temporary file containing the patched result, and with @a reject_abspath, 06510 * the path to a temporary file containing the diff text of any hunks 06511 * which were rejected during patching. 06512 * 06513 * Because the callback is invoked before the patching attempt is made, 06514 * there is no guarantee that the target file will actually be patched 06515 * successfully. Client implementations must pay attention to notification 06516 * feedback provided by svn_client_patch() to find out which paths were 06517 * patched successfully. 06518 * 06519 * Note also that the files at @a patch_abspath and @a reject_abspath are 06520 * guaranteed to remain on disk after patching only if the 06521 * @a remove_tempfiles parameter for svn_client_patch() is @c FALSE. 06522 * 06523 * The const char * parameters may be allocated in @a scratch_pool which 06524 * will be cleared after each invocation. 06525 * 06526 * @since New in 1.7. 06527 */ 06528 typedef svn_error_t *(*svn_client_patch_func_t)( 06529 void *baton, 06530 svn_boolean_t *filtered, 06531 const char *canon_path_from_patchfile, 06532 const char *patch_abspath, 06533 const char *reject_abspath, 06534 apr_pool_t *scratch_pool); 06535 06536 /** 06537 * Apply a unidiff patch that's located at absolute path 06538 * @a patch_abspath to the working copy directory at @a wc_dir_abspath. 06539 * 06540 * This function makes a best-effort attempt at applying the patch. 06541 * It might skip patch targets which cannot be patched (e.g. targets 06542 * that are outside of the working copy). It will also reject hunks 06543 * which cannot be applied to a target in case the hunk's context 06544 * does not match anywhere in the patch target. 06545 * 06546 * If @a dry_run is TRUE, the patching process is carried out, and full 06547 * notification feedback is provided, but the working copy is not modified. 06548 * 06549 * @a strip_count specifies how many leading path components should be 06550 * stripped from paths obtained from the patch. It is an error if a 06551 * negative strip count is passed. 06552 * 06553 * If @a reverse is @c TRUE, apply patches in reverse, deleting lines 06554 * the patch would add and adding lines the patch would delete. 06555 * 06556 * If @a ignore_whitespace is TRUE, allow patches to be applied if they 06557 * only differ from the target by whitespace. 06558 * 06559 * If @a remove_tempfiles is TRUE, lifetimes of temporary files created 06560 * during patching will be managed internally. Otherwise, the caller should 06561 * take ownership of these files, the names of which can be obtained by 06562 * passing a @a patch_func callback. 06563 * 06564 * If @a patch_func is non-NULL, invoke @a patch_func with @a patch_baton 06565 * for each patch target processed. 06566 * 06567 * If @a ctx->notify_func2 is non-NULL, invoke @a ctx->notify_func2 with 06568 * @a ctx->notify_baton2 as patching progresses. 06569 * 06570 * If @a ctx->cancel_func is non-NULL, invoke it passing @a 06571 * ctx->cancel_baton at various places during the operation. 06572 * 06573 * Use @a scratch_pool for temporary allocations. 06574 * 06575 * @since New in 1.7. 06576 */ 06577 svn_error_t * 06578 svn_client_patch(const char *patch_abspath, 06579 const char *wc_dir_abspath, 06580 svn_boolean_t dry_run, 06581 int strip_count, 06582 svn_boolean_t reverse, 06583 svn_boolean_t ignore_whitespace, 06584 svn_boolean_t remove_tempfiles, 06585 svn_client_patch_func_t patch_func, 06586 void *patch_baton, 06587 svn_client_ctx_t *ctx, 06588 apr_pool_t *scratch_pool); 06589 06590 /** @} */ 06591 06592 /** @} end group: Client working copy management */ 06593 06594 /** 06595 * 06596 * @defgroup clnt_sessions Client session related functions 06597 * 06598 * @{ 06599 * 06600 */ 06601 06602 06603 /* Converting paths to URLs. */ 06604 06605 /** Set @a *url to the URL for @a path_or_url allocated in result_pool. 06606 * 06607 * If @a path_or_url is already a URL, set @a *url to @a path_or_url. 06608 * 06609 * If @a path_or_url is a versioned item, set @a *url to @a 06610 * path_or_url's entry URL. If @a path_or_url is unversioned (has 06611 * no entry), set @a *url to NULL. 06612 * 06613 * Use @a ctx->wc_ctx to retrieve the information. Use 06614 ** @a scratch_pool for temporary allocations. 06615 * 06616 * @since New in 1.7. 06617 */ 06618 svn_error_t * 06619 svn_client_url_from_path2(const char **url, 06620 const char *path_or_url, 06621 svn_client_ctx_t *ctx, 06622 apr_pool_t *result_pool, 06623 apr_pool_t *scratch_pool); 06624 06625 /** Similar to svn_client_url_from_path2(), but without a context argument. 06626 * 06627 * @since New in 1.5. 06628 * @deprecated Provided for backward compatibility with the 1.6 API. 06629 */ 06630 SVN_DEPRECATED 06631 svn_error_t * 06632 svn_client_url_from_path(const char **url, 06633 const char *path_or_url, 06634 apr_pool_t *pool); 06635 06636 06637 06638 /* Fetching a repository's root URL and UUID. */ 06639 06640 /** Set @a *repos_root_url and @a *repos_uuid, to the root URL and UUID of 06641 * the repository in which @a abspath_or_url is versioned. Use the 06642 * authentication baton and working copy context cached in @a ctx as 06643 * necessary. @a repos_root_url and/or @a repos_uuid may be NULL if not 06644 * wanted. 06645 * 06646 * This function will open a temporary RA session to the repository if 06647 * necessary to get the information. 06648 * 06649 * Allocate @a *repos_root_url and @a *repos_uuid in @a result_pool. 06650 * Use @a scratch_pool for temporary allocations. 06651 * 06652 * @since New in 1.8. 06653 */ 06654 svn_error_t * 06655 svn_client_get_repos_root(const char **repos_root_url, 06656 const char **repos_uuid, 06657 const char *abspath_or_url, 06658 svn_client_ctx_t *ctx, 06659 apr_pool_t *result_pool, 06660 apr_pool_t *scratch_pool); 06661 06662 /** Set @a *url to the repository root URL of the repository in which 06663 * @a path_or_url is versioned (or scheduled to be versioned), 06664 * allocated in @a pool. @a ctx is required for possible repository 06665 * authentication. 06666 * 06667 * @since New in 1.5. 06668 * @deprecated Provided for backward compatibility with the 1.7 API. Use 06669 * svn_client_get_repos_root() instead, with an absolute path. 06670 */ 06671 SVN_DEPRECATED 06672 svn_error_t * 06673 svn_client_root_url_from_path(const char **url, 06674 const char *path_or_url, 06675 svn_client_ctx_t *ctx, 06676 apr_pool_t *pool); 06677 06678 /** Get repository @a uuid for @a url. 06679 * 06680 * Use a @a pool to open a temporary RA session to @a url, discover the 06681 * repository uuid, and free the session. Return the uuid in @a uuid, 06682 * allocated in @a pool. @a ctx is required for possible repository 06683 * authentication. 06684 * 06685 * @deprecated Provided for backward compatibility with the 1.7 API. Use 06686 * svn_client_get_repos_root() instead. 06687 */ 06688 SVN_DEPRECATED 06689 svn_error_t * 06690 svn_client_uuid_from_url(const char **uuid, 06691 const char *url, 06692 svn_client_ctx_t *ctx, 06693 apr_pool_t *pool); 06694 06695 06696 /** Return the repository @a uuid for working-copy @a local_abspath, 06697 * allocated in @a result_pool. Use @a ctx->wc_ctx to retrieve the 06698 * information. 06699 * 06700 * Use @a scratch_pool for temporary allocations. 06701 * 06702 * @since New in 1.7. 06703 * @deprecated Provided for backward compatibility with the 1.7 API. Use 06704 * svn_client_get_repos_root() instead. 06705 */ 06706 SVN_DEPRECATED 06707 svn_error_t * 06708 svn_client_uuid_from_path2(const char **uuid, 06709 const char *local_abspath, 06710 svn_client_ctx_t *ctx, 06711 apr_pool_t *result_pool, 06712 apr_pool_t *scratch_pool); 06713 06714 /** Similar to svn_client_uuid_from_path2(), but with a relative path and 06715 * an access baton. 06716 * 06717 * @deprecated Provided for backward compatibility with the 1.6 API. 06718 */ 06719 SVN_DEPRECATED 06720 svn_error_t * 06721 svn_client_uuid_from_path(const char **uuid, 06722 const char *path, 06723 svn_wc_adm_access_t *adm_access, 06724 svn_client_ctx_t *ctx, 06725 apr_pool_t *pool); 06726 06727 06728 /* Opening RA sessions. */ 06729 06730 /** Open an RA session rooted at @a url, and return it in @a *session. 06731 * 06732 * Use the authentication baton stored in @a ctx for authentication. 06733 * @a *session is allocated in @a result_pool. 06734 * 06735 * If @a wri_abspath is not NULL, use the working copy identified by @a 06736 * wri_abspath to potentially avoid transferring unneeded data. 06737 * 06738 * @note This function is similar to svn_ra_open4(), but the caller avoids 06739 * having to providing its own callback functions. 06740 * @since New in 1.8. 06741 */ 06742 svn_error_t * 06743 svn_client_open_ra_session2(svn_ra_session_t **session, 06744 const char *url, 06745 const char *wri_abspath, 06746 svn_client_ctx_t *ctx, 06747 apr_pool_t *result_pool, 06748 apr_pool_t *scratch_pool); 06749 06750 /** Similar to svn_client_open_ra_session2(), but with @ wri_abspath 06751 * always passed as NULL, and with the same pool used as both @a 06752 * result_pool and @a scratch_pool. 06753 * 06754 * @since New in 1.3. 06755 * @deprecated Provided for backward compatibility with the 1.7 API. 06756 */ 06757 SVN_DEPRECATED 06758 svn_error_t * 06759 svn_client_open_ra_session(svn_ra_session_t **session, 06760 const char *url, 06761 svn_client_ctx_t *ctx, 06762 apr_pool_t *pool); 06763 06764 06765 /** @} end group: Client session related functions */ 06766 06767 /** @} */ 06768 06769 #ifdef __cplusplus 06770 } 06771 #endif /* __cplusplus */ 06772 06773 #endif /* SVN_CLIENT_H */
1.6.1