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 https://issues.apache.org/jira/browse/SVN-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 /** Callback for svn_client__layout_list() 01551 * 01552 * @warning EXPERIMENTAL. 01553 */ 01554 typedef svn_error_t * (*svn_client__layout_func_t)( 01555 void *layout_baton, 01556 const char *local_abspath, 01557 const char *repos_root_url, 01558 svn_boolean_t not_present, 01559 svn_boolean_t url_changed, 01560 const char *url, 01561 svn_boolean_t revision_changed, 01562 svn_revnum_t revision, 01563 svn_boolean_t depth_changed, 01564 svn_depth_t depth, 01565 apr_pool_t *scratch_pool); 01566 01567 /** 01568 * Describe the layout of the working copy below @a local_abspath to 01569 * the callback @a layout. 01570 * 01571 * @warning EXPERIMENTAL. 01572 */ 01573 SVN_EXPERIMENTAL 01574 svn_error_t * 01575 svn_client__layout_list(const char *local_abspath, 01576 svn_client__layout_func_t layout, 01577 void *layout_baton, 01578 svn_client_ctx_t *ctx, 01579 apr_pool_t *scratch_pool); 01580 01581 01582 /** 01583 * @defgroup Add Begin versioning files/directories in a working copy. 01584 * 01585 * @{ 01586 */ 01587 01588 /** 01589 * Schedule a working copy @a path for addition to the repository. 01590 * 01591 * If @a depth is #svn_depth_empty, add just @a path and nothing 01592 * below it. If #svn_depth_files, add @a path and any file 01593 * children of @a path. If #svn_depth_immediates, add @a path, any 01594 * file children, and any immediate subdirectories (but nothing 01595 * underneath those subdirectories). If #svn_depth_infinity, add 01596 * @a path and everything under it fully recursively. 01597 * 01598 * @a path's parent must be under revision control already (unless 01599 * @a add_parents is TRUE), but @a path is not. 01600 * 01601 * If @a force is not set and @a path is already under version 01602 * control, return the error #SVN_ERR_ENTRY_EXISTS. If @a force is 01603 * set, do not error on already-versioned items. When used on a 01604 * directory in conjunction with a @a depth value greater than 01605 * #svn_depth_empty, this has the effect of scheduling for addition 01606 * any unversioned files and directories scattered within even a 01607 * versioned tree (up to @a depth). 01608 * 01609 * If @a ctx->notify_func2 is non-NULL, then for each added item, call 01610 * @a ctx->notify_func2 with @a ctx->notify_baton2 and the path of the 01611 * added item. 01612 * 01613 * If @a no_ignore is FALSE, don't add any file or directory (or recurse 01614 * into any directory) that is unversioned and found by recursion (as 01615 * opposed to being the explicit target @a path) and whose name matches the 01616 * svn:ignore property on its parent directory or the global-ignores list in 01617 * @a ctx->config. If @a no_ignore is TRUE, do include such files and 01618 * directories. (Note that an svn:ignore property can influence this 01619 * behaviour only when recursing into an already versioned directory with @a 01620 * force.) 01621 * 01622 * If @a no_autoprops is TRUE, don't set any autoprops on added files. If 01623 * @a no_autoprops is FALSE then all added files have autprops set as per 01624 * the auto-props list in @a ctx->config and the value of any 01625 * @c SVN_PROP_INHERITABLE_AUTO_PROPS properties inherited by the nearest 01626 * parents of @a path which are already under version control. 01627 * 01628 * If @a add_parents is TRUE, recurse up @a path's directory and look for 01629 * a versioned directory. If found, add all intermediate paths between it 01630 * and @a path. If not found, return #SVN_ERR_CLIENT_NO_VERSIONED_PARENT. 01631 * 01632 * @a scratch_pool is used for temporary allocations only. 01633 * 01634 * @par Important: 01635 * This is a *scheduling* operation. No changes will 01636 * happen to the repository until a commit occurs. This scheduling 01637 * can be removed with svn_client_revert2(). 01638 * 01639 * @since New in 1.8. 01640 */ 01641 svn_error_t * 01642 svn_client_add5(const char *path, 01643 svn_depth_t depth, 01644 svn_boolean_t force, 01645 svn_boolean_t no_ignore, 01646 svn_boolean_t no_autoprops, 01647 svn_boolean_t add_parents, 01648 svn_client_ctx_t *ctx, 01649 apr_pool_t *scratch_pool); 01650 01651 /** 01652 * Similar to svn_client_add5(), but with @a no_autoprops always set to 01653 * FALSE. 01654 * 01655 * @deprecated Provided for backward compatibility with the 1.7 API. 01656 */ 01657 SVN_DEPRECATED 01658 svn_error_t * 01659 svn_client_add4(const char *path, 01660 svn_depth_t depth, 01661 svn_boolean_t force, 01662 svn_boolean_t no_ignore, 01663 svn_boolean_t add_parents, 01664 svn_client_ctx_t *ctx, 01665 apr_pool_t *pool); 01666 01667 /** 01668 * Similar to svn_client_add4(), but with @a add_parents always set to 01669 * FALSE and @a depth set according to @a recursive: if TRUE, then 01670 * @a depth is #svn_depth_infinity, if FALSE, then #svn_depth_empty. 01671 * 01672 * @deprecated Provided for backward compatibility with the 1.4 API. 01673 */ 01674 SVN_DEPRECATED 01675 svn_error_t * 01676 svn_client_add3(const char *path, 01677 svn_boolean_t recursive, 01678 svn_boolean_t force, 01679 svn_boolean_t no_ignore, 01680 svn_client_ctx_t *ctx, 01681 apr_pool_t *pool); 01682 01683 /** 01684 * Similar to svn_client_add3(), but with @a no_ignore always set to 01685 * FALSE. 01686 * 01687 * @deprecated Provided for backward compatibility with the 1.2 API. 01688 */ 01689 SVN_DEPRECATED 01690 svn_error_t * 01691 svn_client_add2(const char *path, 01692 svn_boolean_t recursive, 01693 svn_boolean_t force, 01694 svn_client_ctx_t *ctx, 01695 apr_pool_t *pool); 01696 01697 /** 01698 * Similar to svn_client_add2(), but with @a force always set to FALSE. 01699 * 01700 * @deprecated Provided for backward compatibility with the 1.0 API. 01701 */ 01702 SVN_DEPRECATED 01703 svn_error_t * 01704 svn_client_add(const char *path, 01705 svn_boolean_t recursive, 01706 svn_client_ctx_t *ctx, 01707 apr_pool_t *pool); 01708 01709 /** @} */ 01710 01711 /** 01712 * @defgroup Mkdir Create directories in a working copy or repository. 01713 * 01714 * @{ 01715 */ 01716 01717 /** Create a directory, either in a repository or a working copy. 01718 * 01719 * @a paths is an array of (const char *) paths, either all local WC paths 01720 * or all URLs. 01721 * 01722 * If @a paths contains URLs, use the authentication baton in @a ctx 01723 * and @a message to immediately attempt to commit the creation of the 01724 * directories in @a paths in the repository. 01725 * 01726 * Else, create the directories on disk, and attempt to schedule them 01727 * for addition (using svn_client_add(), whose docstring you should 01728 * read). 01729 * 01730 * If @a make_parents is TRUE, create any non-existent parent directories 01731 * also. 01732 * 01733 * If non-NULL, @a revprop_table is a hash table holding additional, 01734 * custom revision properties (<tt>const char *</tt> names mapped to 01735 * <tt>svn_string_t *</tt> values) to be set on the new revision in 01736 * the event that this is a committing operation. This table cannot 01737 * contain any standard Subversion properties. 01738 * 01739 * @a ctx->log_msg_func3/@a ctx->log_msg_baton3 are a callback/baton 01740 * combo that this function can use to query for a commit log message 01741 * when one is needed. 01742 * 01743 * If @a ctx->notify_func2 is non-NULL, when the directory has been created 01744 * (successfully) in the working copy, call @a ctx->notify_func2 with 01745 * @a ctx->notify_baton2 and the path of the new directory. Note that this is 01746 * only called for items added to the working copy. 01747 * 01748 * If @a commit_callback is non-NULL, then for each successful commit, call 01749 * @a commit_callback with @a commit_baton and a #svn_commit_info_t for 01750 * the commit. 01751 * 01752 * @since New in 1.7. 01753 */ 01754 svn_error_t * 01755 svn_client_mkdir4(const apr_array_header_t *paths, 01756 svn_boolean_t make_parents, 01757 const apr_hash_t *revprop_table, 01758 svn_commit_callback2_t commit_callback, 01759 void *commit_baton, 01760 svn_client_ctx_t *ctx, 01761 apr_pool_t *pool); 01762 01763 /** 01764 * Similar to svn_client_mkdir4(), but returns the commit info in 01765 * @a *commit_info_p rather than through a callback function. 01766 * 01767 * @since New in 1.5. 01768 * @deprecated Provided for backward compatibility with the 1.6 API. 01769 */ 01770 SVN_DEPRECATED 01771 svn_error_t * 01772 svn_client_mkdir3(svn_commit_info_t **commit_info_p, 01773 const apr_array_header_t *paths, 01774 svn_boolean_t make_parents, 01775 const apr_hash_t *revprop_table, 01776 svn_client_ctx_t *ctx, 01777 apr_pool_t *pool); 01778 01779 01780 /** 01781 * Same as svn_client_mkdir3(), but with @a make_parents always FALSE, 01782 * and @a revprop_table always NULL. 01783 * 01784 * @since New in 1.3. 01785 * @deprecated Provided for backward compatibility with the 1.4 API. 01786 */ 01787 SVN_DEPRECATED 01788 svn_error_t * 01789 svn_client_mkdir2(svn_commit_info_t **commit_info_p, 01790 const apr_array_header_t *paths, 01791 svn_client_ctx_t *ctx, 01792 apr_pool_t *pool); 01793 01794 /** 01795 * Same as svn_client_mkdir2(), but takes the #svn_client_commit_info_t 01796 * type for @a commit_info_p. 01797 * 01798 * @deprecated Provided for backward compatibility with the 1.2 API. 01799 */ 01800 SVN_DEPRECATED 01801 svn_error_t * 01802 svn_client_mkdir(svn_client_commit_info_t **commit_info_p, 01803 const apr_array_header_t *paths, 01804 svn_client_ctx_t *ctx, 01805 apr_pool_t *pool); 01806 01807 /** @} */ 01808 01809 /** 01810 * @defgroup Delete Remove files/directories from a working copy or repository. 01811 * 01812 * @{ 01813 */ 01814 01815 /** Delete items from a repository or working copy. 01816 * 01817 * @a paths is an array of (const char *) paths, either all local WC paths 01818 * or all URLs. 01819 * 01820 * If the paths in @a paths are URLs, use the authentication baton in 01821 * @a ctx and @a ctx->log_msg_func3/@a ctx->log_msg_baton3 to 01822 * immediately attempt to commit a deletion of the URLs from the 01823 * repository. Every path must belong to the same repository. 01824 * 01825 * Else, schedule the working copy paths in @a paths for removal from 01826 * the repository. Each path's parent must be under revision control. 01827 * This is just a *scheduling* operation. No changes will happen to 01828 * the repository until a commit occurs. This scheduling can be 01829 * removed with svn_client_revert2(). If a path is a file it is 01830 * immediately removed from the working copy. If the path is a 01831 * directory it will remain in the working copy but all the files, and 01832 * all unversioned items, it contains will be removed. If @a force is 01833 * not set then this operation will fail if any path contains locally 01834 * modified and/or unversioned items. If @a force is set such items 01835 * will be deleted. 01836 * 01837 * If the paths are working copy paths and @a keep_local is TRUE then 01838 * the paths will not be removed from the working copy, only scheduled 01839 * for removal from the repository. Once the scheduled deletion is 01840 * committed, they will appear as unversioned paths in the working copy. 01841 * 01842 * If non-NULL, @a revprop_table is a hash table holding additional, 01843 * custom revision properties (<tt>const char *</tt> names mapped to 01844 * <tt>svn_string_t *</tt> values) to be set on the new revision in 01845 * the event that this is a committing operation. This table cannot 01846 * contain any standard Subversion properties. 01847 * 01848 * @a ctx->log_msg_func3/@a ctx->log_msg_baton3 are a callback/baton 01849 * combo that this function can use to query for a commit log message 01850 * when one is needed. 01851 * 01852 * If @a ctx->notify_func2 is non-NULL, then for each item deleted, call 01853 * @a ctx->notify_func2 with @a ctx->notify_baton2 and the path of the deleted 01854 * item. 01855 * 01856 * If @a commit_callback is non-NULL, then for each successful commit, call 01857 * @a commit_callback with @a commit_baton and a #svn_commit_info_t for 01858 * the commit. 01859 * 01860 * @since New in 1.7. 01861 */ 01862 svn_error_t * 01863 svn_client_delete4(const apr_array_header_t *paths, 01864 svn_boolean_t force, 01865 svn_boolean_t keep_local, 01866 const apr_hash_t *revprop_table, 01867 svn_commit_callback2_t commit_callback, 01868 void *commit_baton, 01869 svn_client_ctx_t *ctx, 01870 apr_pool_t *pool); 01871 01872 /** 01873 * Similar to svn_client_delete4(), but returns the commit info in 01874 * @a *commit_info_p rather than through a callback function. 01875 * 01876 * @since New in 1.5. 01877 * @deprecated Provided for backward compatibility with the 1.6 API. 01878 */ 01879 SVN_DEPRECATED 01880 svn_error_t * 01881 svn_client_delete3(svn_commit_info_t **commit_info_p, 01882 const apr_array_header_t *paths, 01883 svn_boolean_t force, 01884 svn_boolean_t keep_local, 01885 const apr_hash_t *revprop_table, 01886 svn_client_ctx_t *ctx, 01887 apr_pool_t *pool); 01888 01889 /** 01890 * Similar to svn_client_delete3(), but with @a keep_local always set 01891 * to FALSE, and @a revprop_table passed as NULL. 01892 * 01893 * @deprecated Provided for backward compatibility with the 1.4 API. 01894 */ 01895 SVN_DEPRECATED 01896 svn_error_t * 01897 svn_client_delete2(svn_commit_info_t **commit_info_p, 01898 const apr_array_header_t *paths, 01899 svn_boolean_t force, 01900 svn_client_ctx_t *ctx, 01901 apr_pool_t *pool); 01902 01903 /** 01904 * Similar to svn_client_delete2(), but takes the #svn_client_commit_info_t 01905 * type for @a commit_info_p. 01906 * 01907 * @deprecated Provided for backward compatibility with the 1.2 API. 01908 */ 01909 SVN_DEPRECATED 01910 svn_error_t * 01911 svn_client_delete(svn_client_commit_info_t **commit_info_p, 01912 const apr_array_header_t *paths, 01913 svn_boolean_t force, 01914 svn_client_ctx_t *ctx, 01915 apr_pool_t *pool); 01916 01917 01918 /** @} */ 01919 01920 /** 01921 * @defgroup Import Import files into the repository. 01922 * 01923 * @{ 01924 */ 01925 01926 /** 01927 * The callback invoked by svn_client_import5() before adding a node to the 01928 * list of nodes to be imported. 01929 * 01930 * @a baton is the value passed to @a svn_client_import5 as filter_baton. 01931 * 01932 * The callback receives the @a local_abspath for each node and the @a dirent 01933 * for it when walking the directory tree. Only the kind of node, including 01934 * special status is available in @a dirent. 01935 * 01936 * Implementations can set @a *filtered to TRUE, to make the import 01937 * process omit the node and (if the node is a directory) all its 01938 * descendants. 01939 * 01940 * @a scratch_pool can be used for temporary allocations. 01941 * 01942 * @since New in 1.8. 01943 */ 01944 typedef svn_error_t *(*svn_client_import_filter_func_t)( 01945 void *baton, 01946 svn_boolean_t *filtered, 01947 const char *local_abspath, 01948 const svn_io_dirent2_t *dirent, 01949 apr_pool_t *scratch_pool); 01950 01951 /** Import file or directory @a path into repository directory @a url at 01952 * head, authenticating with the authentication baton cached in @a ctx, 01953 * and using @a ctx->log_msg_func3/@a ctx->log_msg_baton3 to get a log message 01954 * for the (implied) commit. If some components of @a url do not exist 01955 * then create parent directories as necessary. 01956 * 01957 * This function reads an unversioned tree from disk and skips any ".svn" 01958 * directories. Even if a file or directory being imported is part of an 01959 * existing WC, this function sees it as unversioned and does not notice any 01960 * existing Subversion properties in it. 01961 * 01962 * If @a path is a directory, the contents of that directory are 01963 * imported directly into the directory identified by @a url. Note that the 01964 * directory @a path itself is not imported -- that is, the basename of 01965 * @a path is not part of the import. 01966 * 01967 * If @a path is a file, then the dirname of @a url is the directory 01968 * receiving the import. The basename of @a url is the filename in the 01969 * repository. In this case if @a url already exists, return error. 01970 * 01971 * If @a ctx->notify_func2 is non-NULL, then call @a ctx->notify_func2 with 01972 * @a ctx->notify_baton2 as the import progresses, with any of the following 01973 * actions: #svn_wc_notify_commit_added, 01974 * #svn_wc_notify_commit_postfix_txdelta. 01975 * 01976 * Use @a scratch_pool for any temporary allocation. 01977 * 01978 * If non-NULL, @a revprop_table is a hash table holding additional, 01979 * custom revision properties (<tt>const char *</tt> names mapped to 01980 * <tt>svn_string_t *</tt> values) to be set on the new revision. 01981 * This table cannot contain any standard Subversion properties. 01982 * 01983 * @a ctx->log_msg_func3/@a ctx->log_msg_baton3 are a callback/baton 01984 * combo that this function can use to query for a commit log message 01985 * when one is needed. 01986 * 01987 * If @a depth is #svn_depth_empty, import just @a path and nothing 01988 * below it. If #svn_depth_files, import @a path and any file 01989 * children of @a path. If #svn_depth_immediates, import @a path, any 01990 * file children, and any immediate subdirectories (but nothing 01991 * underneath those subdirectories). If #svn_depth_infinity, import 01992 * @a path and everything under it fully recursively. 01993 * 01994 * If @a no_ignore is @c FALSE, don't import any file or directory (or 01995 * recurse into any directory) that is found by recursion (as opposed to 01996 * being the explicit target @a path) and whose name matches the 01997 * global-ignores list in @a ctx->config. If @a no_ignore is @c TRUE, do 01998 * include such files and directories. (Note that svn:ignore properties are 01999 * not involved, as auto-props cannot set properties on directories and even 02000 * if the target is part of a WC the import ignores any existing 02001 * properties.) 02002 * 02003 * If @a no_autoprops is TRUE, don't set any autoprops on imported files. If 02004 * @a no_autoprops is FALSE then all imported files have autprops set as per 02005 * the auto-props list in @a ctx->config and the value of any 02006 * @c SVN_PROP_INHERITABLE_AUTO_PROPS properties inherited by and explicitly set 02007 * on @a url if @a url is already under versioned control, or the nearest parents 02008 * of @a path which are already under version control if not. 02009 * 02010 * If @a ignore_unknown_node_types is @c TRUE, ignore files of which the 02011 * node type is unknown, such as device files and pipes. 02012 * 02013 * If @a filter_callback is non-NULL, call it for each node that isn't ignored 02014 * for other reasons with @a filter_baton, to allow third party to ignore 02015 * specific nodes during importing. 02016 * 02017 * If @a commit_callback is non-NULL, then for each successful commit, call 02018 * @a commit_callback with @a commit_baton and a #svn_commit_info_t for 02019 * the commit. 02020 * 02021 * @since New in 1.8. 02022 */ 02023 svn_error_t * 02024 svn_client_import5(const char *path, 02025 const char *url, 02026 svn_depth_t depth, 02027 svn_boolean_t no_ignore, 02028 svn_boolean_t no_autoprops, 02029 svn_boolean_t ignore_unknown_node_types, 02030 const apr_hash_t *revprop_table, 02031 svn_client_import_filter_func_t filter_callback, 02032 void *filter_baton, 02033 svn_commit_callback2_t commit_callback, 02034 void *commit_baton, 02035 svn_client_ctx_t *ctx, 02036 apr_pool_t *scratch_pool); 02037 02038 /** 02039 * Similar to svn_client_import5(), but without support for an optional 02040 * @a filter_callback and @a no_autoprops always set to FALSE. 02041 * 02042 * @since New in 1.7. 02043 * @deprecated Provided for backward compatibility with the 1.7 API. 02044 */ 02045 SVN_DEPRECATED 02046 svn_error_t * 02047 svn_client_import4(const char *path, 02048 const char *url, 02049 svn_depth_t depth, 02050 svn_boolean_t no_ignore, 02051 svn_boolean_t ignore_unknown_node_types, 02052 const apr_hash_t *revprop_table, 02053 svn_commit_callback2_t commit_callback, 02054 void *commit_baton, 02055 svn_client_ctx_t *ctx, 02056 apr_pool_t *pool); 02057 02058 /** 02059 * Similar to svn_client_import4(), but returns the commit info in 02060 * @a *commit_info_p rather than through a callback function. 02061 * 02062 * @since New in 1.5. 02063 * @deprecated Provided for backward compatibility with the 1.6 API. 02064 */ 02065 SVN_DEPRECATED 02066 svn_error_t * 02067 svn_client_import3(svn_commit_info_t **commit_info_p, 02068 const char *path, 02069 const char *url, 02070 svn_depth_t depth, 02071 svn_boolean_t no_ignore, 02072 svn_boolean_t ignore_unknown_node_types, 02073 const apr_hash_t *revprop_table, 02074 svn_client_ctx_t *ctx, 02075 apr_pool_t *pool); 02076 02077 /** 02078 * Similar to svn_client_import3(), but with @a ignore_unknown_node_types 02079 * always set to @c FALSE, @a revprop_table passed as NULL, and @a 02080 * depth set according to @a nonrecursive: if TRUE, then @a depth is 02081 * #svn_depth_files, else #svn_depth_infinity. 02082 * 02083 * @since New in 1.3. 02084 * 02085 * @deprecated Provided for backward compatibility with the 1.4 API 02086 */ 02087 SVN_DEPRECATED 02088 svn_error_t * 02089 svn_client_import2(svn_commit_info_t **commit_info_p, 02090 const char *path, 02091 const char *url, 02092 svn_boolean_t nonrecursive, 02093 svn_boolean_t no_ignore, 02094 svn_client_ctx_t *ctx, 02095 apr_pool_t *pool); 02096 02097 /** 02098 * Similar to svn_client_import2(), but with @a no_ignore always set 02099 * to FALSE and using the #svn_client_commit_info_t type for 02100 * @a commit_info_p. 02101 * 02102 * @deprecated Provided for backward compatibility with the 1.2 API. 02103 */ 02104 SVN_DEPRECATED 02105 svn_error_t * 02106 svn_client_import(svn_client_commit_info_t **commit_info_p, 02107 const char *path, 02108 const char *url, 02109 svn_boolean_t nonrecursive, 02110 svn_client_ctx_t *ctx, 02111 apr_pool_t *pool); 02112 02113 /** @} */ 02114 02115 /** 02116 * @defgroup Commit Commit local modifications to the repository. 02117 * 02118 * @{ 02119 */ 02120 02121 /** 02122 * Commit files or directories into repository, authenticating with 02123 * the authentication baton cached in @a ctx, and using 02124 * @a ctx->log_msg_func3/@a ctx->log_msg_baton3 to obtain the log message. 02125 * Set @a *commit_info_p to the results of the commit, allocated in @a pool. 02126 * 02127 * @a targets is an array of <tt>const char *</tt> paths to commit. They 02128 * need not be canonicalized nor condensed; this function will take care of 02129 * that. If @a targets has zero elements, then do nothing and return 02130 * immediately without error. 02131 * 02132 * If non-NULL, @a revprop_table is a hash table holding additional, 02133 * custom revision properties (<tt>const char *</tt> names mapped to 02134 * <tt>svn_string_t *</tt> values) to be set on the new revision. 02135 * This table cannot contain any standard Subversion properties. 02136 * 02137 * If @a ctx->notify_func2 is non-NULL, then call @a ctx->notify_func2 with 02138 * @a ctx->notify_baton2 as the commit progresses, with any of the following 02139 * actions: #svn_wc_notify_commit_modified, #svn_wc_notify_commit_added, 02140 * #svn_wc_notify_commit_deleted, #svn_wc_notify_commit_replaced, 02141 * #svn_wc_notify_commit_copied, #svn_wc_notify_commit_copied_replaced, 02142 * #svn_wc_notify_commit_postfix_txdelta. 02143 * 02144 * If @a depth is #svn_depth_infinity, commit all changes to and 02145 * below named targets. If @a depth is #svn_depth_empty, commit 02146 * only named targets (that is, only property changes on named 02147 * directory targets, and property and content changes for named file 02148 * targets). If @a depth is #svn_depth_files, behave as above for 02149 * named file targets, and for named directory targets, commit 02150 * property changes on a named directory and all changes to files 02151 * directly inside that directory. If #svn_depth_immediates, behave 02152 * as for #svn_depth_files, and for subdirectories of any named 02153 * directory target commit as though for #svn_depth_empty. 02154 * 02155 * Unlock paths in the repository, unless @a keep_locks is TRUE. 02156 * 02157 * @a changelists is an array of <tt>const char *</tt> changelist 02158 * names, used as a restrictive filter on items that are committed; 02159 * that is, don't commit anything unless it's a member of one of those 02160 * changelists. After the commit completes successfully, remove 02161 * changelist associations from the targets, unless @a 02162 * keep_changelists is set. If @a changelists is 02163 * empty (or altogether @c NULL), no changelist filtering occurs. 02164 * 02165 * If @a commit_as_operations is set to FALSE, when a copy is committed 02166 * all changes below the copy are always committed at the same time 02167 * (independent of the value of @a depth). If @a commit_as_operations is 02168 * #TRUE, changes to descendants are only committed if they are itself 02169 * included via @a depth and targets. 02170 * 02171 * If @a include_file_externals and/or @a include_dir_externals are #TRUE, 02172 * also commit all file and/or dir externals (respectively) that are reached 02173 * by recursion, except for those externals which: 02174 * - have a fixed revision, or 02175 * - come from a different repository root URL (dir externals). 02176 * These flags affect only recursion; externals that directly appear in @a 02177 * targets are always included in the commit. 02178 * 02179 * ### TODO: currently, file externals hidden inside an unversioned dir are 02180 * skipped deliberately, because we can't commit those yet. 02181 * See STMT_SELECT_COMMITTABLE_EXTERNALS_BELOW. 02182 * 02183 * ### TODO: With @c depth_immediates, this function acts as if 02184 * @a include_dir_externals was passed #FALSE, but caller expects 02185 * immediate child dir externals to be included @c depth_empty. 02186 * 02187 * When @a commit_as_operations is #TRUE it is possible to delete a node and 02188 * all its descendants by selecting just the root of the deletion. If it is 02189 * set to #FALSE this will raise an error. 02190 * 02191 * If @a commit_callback is non-NULL, then for each successful commit, call 02192 * @a commit_callback with @a commit_baton and a #svn_commit_info_t for 02193 * the commit. 02194 * 02195 * @note #svn_depth_unknown and #svn_depth_exclude must not be passed 02196 * for @a depth. 02197 * 02198 * Use @a pool for any temporary allocations. 02199 * 02200 * @since New in 1.8. 02201 */ 02202 svn_error_t * 02203 svn_client_commit6(const apr_array_header_t *targets, 02204 svn_depth_t depth, 02205 svn_boolean_t keep_locks, 02206 svn_boolean_t keep_changelists, 02207 svn_boolean_t commit_as_operations, 02208 svn_boolean_t include_file_externals, 02209 svn_boolean_t include_dir_externals, 02210 const apr_array_header_t *changelists, 02211 const apr_hash_t *revprop_table, 02212 svn_commit_callback2_t commit_callback, 02213 void *commit_baton, 02214 svn_client_ctx_t *ctx, 02215 apr_pool_t *pool); 02216 02217 /** 02218 * Similar to svn_client_commit6(), but passes @a include_file_externals as 02219 * FALSE and @a include_dir_externals as FALSE. 02220 * 02221 * @since New in 1.7. 02222 * @deprecated Provided for backward compatibility with the 1.7 API. 02223 */ 02224 SVN_DEPRECATED 02225 svn_error_t * 02226 svn_client_commit5(const apr_array_header_t *targets, 02227 svn_depth_t depth, 02228 svn_boolean_t keep_locks, 02229 svn_boolean_t keep_changelists, 02230 svn_boolean_t commit_as_operations, 02231 const apr_array_header_t *changelists, 02232 const apr_hash_t *revprop_table, 02233 svn_commit_callback2_t commit_callback, 02234 void *commit_baton, 02235 svn_client_ctx_t *ctx, 02236 apr_pool_t *pool); 02237 02238 /** 02239 * Similar to svn_client_commit5(), but returns the commit info in 02240 * @a *commit_info_p rather than through a callback function. Does not use 02241 * #svn_wc_notify_commit_copied or #svn_wc_notify_commit_copied_replaced 02242 * (preferring #svn_wc_notify_commit_added and 02243 * #svn_wc_notify_commit_replaced, respectively, instead). 02244 * 02245 * Also, if no error is returned and @a (*commit_info_p)->revision is set to 02246 * #SVN_INVALID_REVNUM, then the commit was a no-op; nothing needed to 02247 * be committed. 02248 * 02249 * Sets @a commit_as_operations to FALSE to match Subversion 1.6's behavior. 02250 * 02251 * @since New in 1.5. 02252 * @deprecated Provided for backward compatibility with the 1.6 API. 02253 */ 02254 SVN_DEPRECATED 02255 svn_error_t * 02256 svn_client_commit4(svn_commit_info_t **commit_info_p, 02257 const apr_array_header_t *targets, 02258 svn_depth_t depth, 02259 svn_boolean_t keep_locks, 02260 svn_boolean_t keep_changelists, 02261 const apr_array_header_t *changelists, 02262 const apr_hash_t *revprop_table, 02263 svn_client_ctx_t *ctx, 02264 apr_pool_t *pool); 02265 02266 /** 02267 * Similar to svn_client_commit4(), but always with NULL for 02268 * @a changelist_name, FALSE for @a keep_changelist, NULL for @a 02269 * revprop_table, and @a depth set according to @a recurse: if @a 02270 * recurse is TRUE, use #svn_depth_infinity, else #svn_depth_empty. 02271 * 02272 * @deprecated Provided for backward compatibility with the 1.4 API. 02273 * 02274 * @since New in 1.3. 02275 */ 02276 SVN_DEPRECATED 02277 svn_error_t * 02278 svn_client_commit3(svn_commit_info_t **commit_info_p, 02279 const apr_array_header_t *targets, 02280 svn_boolean_t recurse, 02281 svn_boolean_t keep_locks, 02282 svn_client_ctx_t *ctx, 02283 apr_pool_t *pool); 02284 02285 /** 02286 * Similar to svn_client_commit3(), but uses #svn_client_commit_info_t 02287 * for @a commit_info_p. 02288 * 02289 * @deprecated Provided for backward compatibility with the 1.2 API. 02290 * 02291 * @since New in 1.2. 02292 */ 02293 SVN_DEPRECATED 02294 svn_error_t * 02295 svn_client_commit2(svn_client_commit_info_t **commit_info_p, 02296 const apr_array_header_t *targets, 02297 svn_boolean_t recurse, 02298 svn_boolean_t keep_locks, 02299 svn_client_ctx_t *ctx, 02300 apr_pool_t *pool); 02301 02302 /** 02303 * Similar to svn_client_commit2(), but with @a keep_locks set to 02304 * TRUE and @a nonrecursive instead of @a recurse. 02305 * 02306 * @deprecated Provided for backward compatibility with the 1.1 API. 02307 */ 02308 SVN_DEPRECATED 02309 svn_error_t * 02310 svn_client_commit(svn_client_commit_info_t **commit_info_p, 02311 const apr_array_header_t *targets, 02312 svn_boolean_t nonrecursive, 02313 svn_client_ctx_t *ctx, 02314 apr_pool_t *pool); 02315 02316 /** @} */ 02317 02318 /** 02319 * @defgroup Status Report interesting information about paths in the \ 02320 * working copy. 02321 * 02322 * @{ 02323 */ 02324 02325 /** 02326 * Structure for holding the "status" of a working copy item. 02327 * 02328 * @note Fields may be added to the end of this structure in future 02329 * versions. Therefore, to preserve binary compatibility, users 02330 * should not directly allocate structures of this type. 02331 * 02332 * @since New in 1.7. 02333 */ 02334 typedef struct svn_client_status_t 02335 { 02336 /** The kind of node as recorded in the working copy */ 02337 svn_node_kind_t kind; 02338 02339 /** The absolute path to the node */ 02340 const char *local_abspath; 02341 02342 /** The actual size of the working file on disk, or SVN_INVALID_FILESIZE 02343 * if unknown (or if the item isn't a file at all). */ 02344 svn_filesize_t filesize; 02345 02346 /** If the path is under version control, versioned is TRUE, otherwise 02347 * FALSE. */ 02348 svn_boolean_t versioned; 02349 02350 /** Set to TRUE if the node is the victim of some kind of conflict. */ 02351 svn_boolean_t conflicted; 02352 02353 /** The status of the node, based on the restructuring changes and if the 02354 * node has no restructuring changes the text and prop status. */ 02355 enum svn_wc_status_kind node_status; 02356 02357 /** The status of the text of the node, not including restructuring changes. 02358 * Valid values are: svn_wc_status_none, svn_wc_status_normal, 02359 * svn_wc_status_modified and svn_wc_status_conflicted. */ 02360 enum svn_wc_status_kind text_status; 02361 02362 /** The status of the node's properties. 02363 * Valid values are: svn_wc_status_none, svn_wc_status_normal, 02364 * svn_wc_status_modified and svn_wc_status_conflicted. */ 02365 enum svn_wc_status_kind prop_status; 02366 02367 /** A node can be 'locked' if a working copy update is in progress or 02368 * was interrupted. */ 02369 svn_boolean_t wc_is_locked; 02370 02371 /** A file or directory can be 'copied' if it's scheduled for 02372 * addition-with-history (or part of a subtree that is scheduled as such.). 02373 */ 02374 svn_boolean_t copied; 02375 02376 /** The URL of the repository root. */ 02377 const char *repos_root_url; 02378 02379 /** The UUID of the repository */ 02380 const char *repos_uuid; 02381 02382 /** The in-repository path relative to the repository root. */ 02383 const char *repos_relpath; 02384 02385 /** Base revision. */ 02386 svn_revnum_t revision; 02387 02388 /** Last revision this was changed */ 02389 svn_revnum_t changed_rev; 02390 02391 /** Date of last commit. */ 02392 apr_time_t changed_date; 02393 02394 /** Last commit author of this item */ 02395 const char *changed_author; 02396 02397 /** A file or directory can be 'switched' if the switch command has been 02398 * used. If this is TRUE, then file_external will be FALSE. 02399 */ 02400 svn_boolean_t switched; 02401 02402 /** If the item is a file that was added to the working copy with an 02403 * svn:externals; if file_external is TRUE, then switched is always 02404 * FALSE. 02405 */ 02406 svn_boolean_t file_external; 02407 02408 /** The locally present lock. (Values of path, token, owner, comment and 02409 * are available if a lock is present) */ 02410 const svn_lock_t *lock; 02411 02412 /** Which changelist this item is part of, or NULL if not part of any. */ 02413 const char *changelist; 02414 02415 /** The depth of the node as recorded in the working copy 02416 * (#svn_depth_unknown for files or when no depth is recorded) */ 02417 svn_depth_t depth; 02418 02419 /** 02420 * @defgroup svn_wc_status_ood WC out-of-date info from the repository 02421 * @{ 02422 * 02423 * When the working copy item is out-of-date compared to the 02424 * repository, the following fields represent the state of the 02425 * youngest revision of the item in the repository. If the working 02426 * copy is not out of date, the fields are initialized as described 02427 * below. 02428 */ 02429 02430 /** Set to the node kind of the youngest commit, or #svn_node_none 02431 * if not out of date. */ 02432 svn_node_kind_t ood_kind; 02433 02434 /** The status of the node, based on the text status if the node has no 02435 * restructuring changes */ 02436 enum svn_wc_status_kind repos_node_status; 02437 02438 /** The node's text status in the repository. */ 02439 enum svn_wc_status_kind repos_text_status; 02440 02441 /** The node's property status in the repository. */ 02442 enum svn_wc_status_kind repos_prop_status; 02443 02444 /** The node's lock in the repository, if any. */ 02445 const svn_lock_t *repos_lock; 02446 02447 /** Set to the youngest committed revision, or #SVN_INVALID_REVNUM 02448 * if not out of date. */ 02449 svn_revnum_t ood_changed_rev; 02450 02451 /** Set to the most recent commit date, or @c 0 if not out of date. */ 02452 apr_time_t ood_changed_date; 02453 02454 /** Set to the user name of the youngest commit, or @c NULL if not 02455 * out of date or non-existent. Because a non-existent @c 02456 * svn:author property has the same behavior as an out-of-date 02457 * working copy, examine @c ood_changed_rev to determine whether 02458 * the working copy is out of date. */ 02459 const char *ood_changed_author; 02460 02461 /** @} */ 02462 02463 /** Reserved for libsvn_client's internal use; this value is only to be used 02464 * for libsvn_client backwards compatibility wrappers. This value may be NULL 02465 * or to other data in future versions. */ 02466 const void *backwards_compatibility_baton; 02467 02468 /** Set to the local absolute path that this node was moved from, if this 02469 * file or directory has been moved here locally and is the root of that 02470 * move. Otherwise set to NULL. 02471 * 02472 * This will be NULL for moved-here nodes that are just part of a subtree 02473 * that was moved along (and are not themselves a root of a different move 02474 * operation). 02475 * 02476 * @since New in 1.8. */ 02477 const char *moved_from_abspath; 02478 02479 /** Set to the local absolute path that this node was moved to, if this file 02480 * or directory has been moved away locally and corresponds to the root 02481 * of the destination side of the move. Otherwise set to NULL. 02482 * 02483 * Note: Saying just "root" here could be misleading. For example: 02484 * svn mv A AA; 02485 * svn mv AA/B BB; 02486 * creates a situation where A/B is moved-to BB, but one could argue that 02487 * the move source's root actually was AA/B. Note that, as far as the 02488 * working copy is concerned, above case is exactly identical to: 02489 * svn mv A/B BB; 02490 * svn mv A AA; 02491 * In both situations, @a moved_to_abspath would be set for nodes A (moved 02492 * to AA) and A/B (moved to BB), only. 02493 * 02494 * This will be NULL for moved-away nodes that were just part of a subtree 02495 * that was moved along (and are not themselves a root of a different move 02496 * operation). 02497 * 02498 * @since New in 1.8. */ 02499 const char *moved_to_abspath; 02500 02501 /* NOTE! Please update svn_client_status_dup() when adding new fields here. */ 02502 } svn_client_status_t; 02503 02504 /** 02505 * Return a duplicate of @a status, allocated in @a result_pool. No part of the new 02506 * structure will be shared with @a status. 02507 * 02508 * @since New in 1.7. 02509 */ 02510 svn_client_status_t * 02511 svn_client_status_dup(const svn_client_status_t *status, 02512 apr_pool_t *result_pool); 02513 02514 /** 02515 * A callback for reporting a @a status about @a path (which may be an 02516 * absolute or relative path). 02517 * 02518 * @a baton is a closure object; it should be provided by the 02519 * implementation, and passed by the caller. 02520 * 02521 * @a scratch_pool will be cleared between invocations to the callback. 02522 * 02523 * @since New in 1.7. 02524 */ 02525 typedef svn_error_t *(*svn_client_status_func_t)( 02526 void *baton, 02527 const char *path, 02528 const svn_client_status_t *status, 02529 apr_pool_t *scratch_pool); 02530 02531 /** 02532 * Given @a path to a working copy directory (or single file), call 02533 * @a status_func/status_baton with a set of #svn_wc_status_t * 02534 * structures which describe the status of @a path, and its children 02535 * (recursing according to @a depth). 02536 * 02537 * - If @a get_all is set, retrieve all entries; otherwise, 02538 * retrieve only "interesting" entries (local mods and/or 02539 * out of date). 02540 * 02541 * - If @a check_out_of_date is set, contact the repository and 02542 * augment the status structures with information about 02543 * out-of-dateness (with respect to @a revision). Also, if @a 02544 * result_rev is not @c NULL, set @a *result_rev to the actual 02545 * revision against which the working copy was compared (@a 02546 * *result_rev is not meaningful unless @a check_out_of_date is 02547 * set). 02548 * 02549 * - If @a check_working_copy is not set, do not scan the working 02550 * copy for local modifications. This parameter will be ignored 02551 * unless @a check_out_of_date is set. When set, the status 02552 * report will not contain any information about local changes in 02553 * the working copy; this includes local deletions and 02554 * replacements. 02555 * 02556 * If @a no_ignore is @c FALSE, don't report any file or directory (or 02557 * recurse into any directory) that is found by recursion (as opposed to 02558 * being the explicit target @a path) and whose name matches the 02559 * svn:ignore property on its parent directory or the global-ignores 02560 * list in @a ctx->config. If @a no_ignore is @c TRUE, report each such 02561 * file or directory with the status code #svn_wc_status_ignored. 02562 * 02563 * If @a ignore_externals is not set, then recurse into externals 02564 * definitions (if any exist) after handling the main target. This 02565 * calls the client notification function (in @a ctx) with the 02566 * #svn_wc_notify_status_external action before handling each externals 02567 * definition, and with #svn_wc_notify_status_completed 02568 * after each. 02569 * 02570 * If @a depth_as_sticky is set and @a depth is not 02571 * #svn_depth_unknown, then the status is calculated as if depth_is_sticky 02572 * was passed to an equivalent update command. 02573 * 02574 * @a changelists is an array of <tt>const char *</tt> changelist 02575 * names, used as a restrictive filter on items whose statuses are 02576 * reported; that is, don't report status about any item unless 02577 * it's a member of one of those changelists. If @a changelists is 02578 * empty (or altogether @c NULL), no changelist filtering occurs. 02579 * 02580 * If @a path is an absolute path then the @c path parameter passed in each 02581 * call to @a status_func will be an absolute path. 02582 * 02583 * All temporary allocations are performed in @a scratch_pool. 02584 * 02585 * @since New in 1.9. 02586 */ 02587 svn_error_t * 02588 svn_client_status6(svn_revnum_t *result_rev, 02589 svn_client_ctx_t *ctx, 02590 const char *path, 02591 const svn_opt_revision_t *revision, 02592 svn_depth_t depth, 02593 svn_boolean_t get_all, 02594 svn_boolean_t check_out_of_date, 02595 svn_boolean_t check_working_copy, 02596 svn_boolean_t no_ignore, 02597 svn_boolean_t ignore_externals, 02598 svn_boolean_t depth_as_sticky, 02599 const apr_array_header_t *changelists, 02600 svn_client_status_func_t status_func, 02601 void *status_baton, 02602 apr_pool_t *scratch_pool); 02603 02604 02605 /** 02606 * Same as svn_client_status6(), but with @a check_out_of_date set to 02607 * @a update and @a check_working_copy set to @c TRUE. 02608 * 02609 * @since New in 1.7. 02610 * @deprecated Provided for backward compatibility with the 1.8 API. 02611 */ 02612 SVN_DEPRECATED 02613 svn_error_t * 02614 svn_client_status5(svn_revnum_t *result_rev, 02615 svn_client_ctx_t *ctx, 02616 const char *path, 02617 const svn_opt_revision_t *revision, 02618 svn_depth_t depth, 02619 svn_boolean_t get_all, 02620 svn_boolean_t update, 02621 svn_boolean_t no_ignore, 02622 svn_boolean_t ignore_externals, 02623 svn_boolean_t depth_as_sticky, 02624 const apr_array_header_t *changelists, 02625 svn_client_status_func_t status_func, 02626 void *status_baton, 02627 apr_pool_t *scratch_pool); 02628 02629 /** 02630 * Same as svn_client_status5(), but using #svn_wc_status_func3_t 02631 * instead of #svn_client_status_func_t and depth_as_sticky set to TRUE. 02632 * 02633 * @since New in 1.6. 02634 * @deprecated Provided for backward compatibility with the 1.6 API. 02635 */ 02636 SVN_DEPRECATED 02637 svn_error_t * 02638 svn_client_status4(svn_revnum_t *result_rev, 02639 const char *path, 02640 const svn_opt_revision_t *revision, 02641 svn_wc_status_func3_t status_func, 02642 void *status_baton, 02643 svn_depth_t depth, 02644 svn_boolean_t get_all, 02645 svn_boolean_t update, 02646 svn_boolean_t no_ignore, 02647 svn_boolean_t ignore_externals, 02648 const apr_array_header_t *changelists, 02649 svn_client_ctx_t *ctx, 02650 apr_pool_t *pool); 02651 02652 /** 02653 * Same as svn_client_status4(), but using an #svn_wc_status_func2_t 02654 * instead of an #svn_wc_status_func3_t. 02655 * 02656 * @since New in 1.5. 02657 * @deprecated Provided for backward compatibility with the 1.5 API. 02658 */ 02659 SVN_DEPRECATED 02660 svn_error_t * 02661 svn_client_status3(svn_revnum_t *result_rev, 02662 const char *path, 02663 const svn_opt_revision_t *revision, 02664 svn_wc_status_func2_t status_func, 02665 void *status_baton, 02666 svn_depth_t depth, 02667 svn_boolean_t get_all, 02668 svn_boolean_t update, 02669 svn_boolean_t no_ignore, 02670 svn_boolean_t ignore_externals, 02671 const apr_array_header_t *changelists, 02672 svn_client_ctx_t *ctx, 02673 apr_pool_t *pool); 02674 02675 /** 02676 * Like svn_client_status3(), except with @a changelists passed as @c 02677 * NULL, and with @a recurse instead of @a depth. If @a recurse is 02678 * TRUE, behave as if for #svn_depth_infinity; else if @a recurse is 02679 * FALSE, behave as if for #svn_depth_immediates. 02680 * 02681 * @since New in 1.2. 02682 * @deprecated Provided for backward compatibility with the 1.4 API. 02683 */ 02684 SVN_DEPRECATED 02685 svn_error_t * 02686 svn_client_status2(svn_revnum_t *result_rev, 02687 const char *path, 02688 const svn_opt_revision_t *revision, 02689 svn_wc_status_func2_t status_func, 02690 void *status_baton, 02691 svn_boolean_t recurse, 02692 svn_boolean_t get_all, 02693 svn_boolean_t update, 02694 svn_boolean_t no_ignore, 02695 svn_boolean_t ignore_externals, 02696 svn_client_ctx_t *ctx, 02697 apr_pool_t *pool); 02698 02699 02700 /** 02701 * Similar to svn_client_status2(), but with @a ignore_externals 02702 * always set to FALSE, taking the #svn_wc_status_func_t type 02703 * instead of the #svn_wc_status_func2_t type for @a status_func, 02704 * and requiring @a *revision to be non-const even though it is 02705 * treated as constant. 02706 * 02707 * @deprecated Provided for backward compatibility with the 1.1 API. 02708 */ 02709 SVN_DEPRECATED 02710 svn_error_t * 02711 svn_client_status(svn_revnum_t *result_rev, 02712 const char *path, 02713 svn_opt_revision_t *revision, 02714 svn_wc_status_func_t status_func, 02715 void *status_baton, 02716 svn_boolean_t recurse, 02717 svn_boolean_t get_all, 02718 svn_boolean_t update, 02719 svn_boolean_t no_ignore, 02720 svn_client_ctx_t *ctx, 02721 apr_pool_t *pool); 02722 02723 /** @} */ 02724 02725 /** 02726 * @defgroup Log View information about previous revisions of an object. 02727 * 02728 * @{ 02729 */ 02730 02731 /** 02732 * Invoke @a receiver with @a receiver_baton on each log message from 02733 * each (#svn_opt_revision_range_t *) range in @a revision_ranges in turn, 02734 * inclusive (but never invoke @a receiver on a given log message more 02735 * than once). 02736 * 02737 * @a targets contains either a URL followed by zero or more relative 02738 * paths, or 1 working copy path, as <tt>const char *</tt>, for which log 02739 * messages are desired. @a receiver is invoked only on messages whose 02740 * revisions involved a change to some path in @a targets. @a peg_revision 02741 * indicates in which revision @a targets are valid. If @a peg_revision is 02742 * #svn_opt_revision_unspecified, it defaults to #svn_opt_revision_head 02743 * for URLs or #svn_opt_revision_working for WC paths. 02744 * 02745 * If @a limit is greater than zero only invoke @a receiver on the first 02746 * @a limit logs. 02747 * 02748 * If @a discover_changed_paths is set, then the @c changed_paths and @c 02749 * changed_paths2 fields in the @c log_entry argument to @a receiver will be 02750 * populated on each invocation. @note The @c text_modified and @c 02751 * props_modified fields of the changed paths structure may have the value 02752 * #svn_tristate_unknown if the repository does not report that information. 02753 * 02754 * If @a strict_node_history is set, copy history (if any exists) will 02755 * not be traversed while harvesting revision logs for each target. 02756 * 02757 * If @a include_merged_revisions is set, log information for revisions 02758 * which have been merged to @a targets will also be returned. 02759 * 02760 * If @a revprops is NULL, retrieve all revision properties; else, retrieve 02761 * only the revision properties named by the (const char *) array elements 02762 * (i.e. retrieve none if the array is empty). 02763 * 02764 * Use @a pool for any temporary allocation. 02765 * 02766 * If @a ctx->notify_func2 is non-NULL, then call @a ctx->notify_func2/baton2 02767 * with a 'skip' signal on any unversioned targets. 02768 * 02769 * @since New in 1.6. 02770 */ 02771 svn_error_t * 02772 svn_client_log5(const apr_array_header_t *targets, 02773 const svn_opt_revision_t *peg_revision, 02774 const apr_array_header_t *revision_ranges, 02775 int limit, 02776 svn_boolean_t discover_changed_paths, 02777 svn_boolean_t strict_node_history, 02778 svn_boolean_t include_merged_revisions, 02779 const apr_array_header_t *revprops, 02780 svn_log_entry_receiver_t receiver, 02781 void *receiver_baton, 02782 svn_client_ctx_t *ctx, 02783 apr_pool_t *pool); 02784 02785 /** 02786 * Similar to svn_client_log5(), but takes explicit start and end parameters 02787 * instead of an array of revision ranges. 02788 * 02789 * @deprecated Provided for compatibility with the 1.5 API. 02790 * @since New in 1.5. 02791 */ 02792 SVN_DEPRECATED 02793 svn_error_t * 02794 svn_client_log4(const apr_array_header_t *targets, 02795 const svn_opt_revision_t *peg_revision, 02796 const svn_opt_revision_t *start, 02797 const svn_opt_revision_t *end, 02798 int limit, 02799 svn_boolean_t discover_changed_paths, 02800 svn_boolean_t strict_node_history, 02801 svn_boolean_t include_merged_revisions, 02802 const apr_array_header_t *revprops, 02803 svn_log_entry_receiver_t receiver, 02804 void *receiver_baton, 02805 svn_client_ctx_t *ctx, 02806 apr_pool_t *pool); 02807 02808 /** 02809 * Similar to svn_client_log4(), but using #svn_log_message_receiver_t 02810 * instead of #svn_log_entry_receiver_t. Also, @a 02811 * include_merged_revisions is set to @c FALSE and @a revprops is 02812 * svn:author, svn:date, and svn:log. 02813 * 02814 * @deprecated Provided for compatibility with the 1.4 API. 02815 * @since New in 1.4. 02816 */ 02817 SVN_DEPRECATED 02818 svn_error_t * 02819 svn_client_log3(const apr_array_header_t *targets, 02820 const svn_opt_revision_t *peg_revision, 02821 const svn_opt_revision_t *start, 02822 const svn_opt_revision_t *end, 02823 int limit, 02824 svn_boolean_t discover_changed_paths, 02825 svn_boolean_t strict_node_history, 02826 svn_log_message_receiver_t receiver, 02827 void *receiver_baton, 02828 svn_client_ctx_t *ctx, 02829 apr_pool_t *pool); 02830 02831 02832 /** 02833 * Similar to svn_client_log3(), but with the @c kind field of 02834 * @a peg_revision set to #svn_opt_revision_unspecified. 02835 * 02836 * @par Important: 02837 * A special case for the revision range HEAD:1, which was present 02838 * in svn_client_log(), has been removed from svn_client_log2(). Instead, it 02839 * is expected that callers will specify the range HEAD:0, to avoid a 02840 * #SVN_ERR_FS_NO_SUCH_REVISION error when invoked against an empty repository 02841 * (i.e. one not containing a revision 1). 02842 * 02843 * @deprecated Provided for compatibility with the 1.3 API. 02844 * @since New in 1.2. 02845 */ 02846 SVN_DEPRECATED 02847 svn_error_t * 02848 svn_client_log2(const apr_array_header_t *targets, 02849 const svn_opt_revision_t *start, 02850 const svn_opt_revision_t *end, 02851 int limit, 02852 svn_boolean_t discover_changed_paths, 02853 svn_boolean_t strict_node_history, 02854 svn_log_message_receiver_t receiver, 02855 void *receiver_baton, 02856 svn_client_ctx_t *ctx, 02857 apr_pool_t *pool); 02858 02859 02860 /** 02861 * Similar to svn_client_log2(), but with @a limit set to 0, and the 02862 * following special case: 02863 * 02864 * Special case for repositories at revision 0: 02865 * 02866 * If @a start->kind is #svn_opt_revision_head, and @a end->kind is 02867 * #svn_opt_revision_number && @a end->number is @c 1, then handle an 02868 * empty (no revisions) repository specially: instead of erroring 02869 * because requested revision 1 when the highest revision is 0, just 02870 * invoke @a receiver on revision 0, passing @c NULL for changed paths and 02871 * empty strings for the author and date. This is because that 02872 * particular combination of @a start and @a end usually indicates the 02873 * common case of log invocation -- the user wants to see all log 02874 * messages from youngest to oldest, where the oldest commit is 02875 * revision 1. That works fine, except when there are no commits in 02876 * the repository, hence this special case. 02877 * 02878 * @deprecated Provided for backward compatibility with the 1.1 API. 02879 */ 02880 SVN_DEPRECATED 02881 svn_error_t * 02882 svn_client_log(const apr_array_header_t *targets, 02883 const svn_opt_revision_t *start, 02884 const svn_opt_revision_t *end, 02885 svn_boolean_t discover_changed_paths, 02886 svn_boolean_t strict_node_history, 02887 svn_log_message_receiver_t receiver, 02888 void *receiver_baton, 02889 svn_client_ctx_t *ctx, 02890 apr_pool_t *pool); 02891 02892 /** @} */ 02893 02894 /** 02895 * @defgroup Blame Show modification information about lines in a file. 02896 * 02897 * @{ 02898 */ 02899 02900 /** 02901 * Invoke @a receiver with @a receiver_baton on each line-blame item 02902 * associated with revision @a end of @a path_or_url, using @a start 02903 * as the default source of all blame. @a peg_revision indicates in 02904 * which revision @a path_or_url is valid. If @a peg_revision->kind 02905 * is #svn_opt_revision_unspecified, then it defaults to 02906 * #svn_opt_revision_head for URLs or #svn_opt_revision_working for 02907 * WC targets. 02908 * 02909 * If @a start->kind or @a end->kind is #svn_opt_revision_unspecified, 02910 * return the error #SVN_ERR_CLIENT_BAD_REVISION. If either are 02911 * #svn_opt_revision_working, return the error 02912 * #SVN_ERR_UNSUPPORTED_FEATURE. If any of the revisions of @a 02913 * path_or_url have a binary mime-type, return the error 02914 * #SVN_ERR_CLIENT_IS_BINARY_FILE, unless @a ignore_mime_type is TRUE, 02915 * in which case blame information will be generated regardless of the 02916 * MIME types of the revisions. 02917 * 02918 * @a start may resolve to a revision number greater (younger) than @a end 02919 * only if the server is 1.8.0 or greater (supports 02920 * #SVN_RA_CAPABILITY_GET_FILE_REVS_REVERSE) and the client is 1.9.0 or 02921 * newer. 02922 * 02923 * Use @a diff_options to determine how to compare different revisions of the 02924 * target. 02925 * 02926 * If @a include_merged_revisions is TRUE, also return data based upon 02927 * revisions which have been merged to @a path_or_url. 02928 * 02929 * Use @a pool for any temporary allocation. 02930 * 02931 * @since New in 1.7. 02932 */ 02933 svn_error_t * 02934 svn_client_blame5(const char *path_or_url, 02935 const svn_opt_revision_t *peg_revision, 02936 const svn_opt_revision_t *start, 02937 const svn_opt_revision_t *end, 02938 const svn_diff_file_options_t *diff_options, 02939 svn_boolean_t ignore_mime_type, 02940 svn_boolean_t include_merged_revisions, 02941 svn_client_blame_receiver3_t receiver, 02942 void *receiver_baton, 02943 svn_client_ctx_t *ctx, 02944 apr_pool_t *pool); 02945 02946 02947 /** 02948 * Similar to svn_client_blame5(), but with #svn_client_blame_receiver3_t 02949 * as the receiver. 02950 * 02951 * @deprecated Provided for backwards compatibility with the 1.6 API. 02952 * 02953 * @since New in 1.5. 02954 */ 02955 SVN_DEPRECATED 02956 svn_error_t * 02957 svn_client_blame4(const char *path_or_url, 02958 const svn_opt_revision_t *peg_revision, 02959 const svn_opt_revision_t *start, 02960 const svn_opt_revision_t *end, 02961 const svn_diff_file_options_t *diff_options, 02962 svn_boolean_t ignore_mime_type, 02963 svn_boolean_t include_merged_revisions, 02964 svn_client_blame_receiver2_t receiver, 02965 void *receiver_baton, 02966 svn_client_ctx_t *ctx, 02967 apr_pool_t *pool); 02968 02969 /** 02970 * Similar to svn_client_blame4(), but with @a include_merged_revisions set 02971 * to FALSE, and using a #svn_client_blame_receiver2_t as the receiver. 02972 * 02973 * @deprecated Provided for backwards compatibility with the 1.4 API. 02974 * 02975 * @since New in 1.4. 02976 */ 02977 SVN_DEPRECATED 02978 svn_error_t * 02979 svn_client_blame3(const char *path_or_url, 02980 const svn_opt_revision_t *peg_revision, 02981 const svn_opt_revision_t *start, 02982 const svn_opt_revision_t *end, 02983 const svn_diff_file_options_t *diff_options, 02984 svn_boolean_t ignore_mime_type, 02985 svn_client_blame_receiver_t receiver, 02986 void *receiver_baton, 02987 svn_client_ctx_t *ctx, 02988 apr_pool_t *pool); 02989 02990 /** 02991 * Similar to svn_client_blame3(), but with @a diff_options set to 02992 * default options as returned by svn_diff_file_options_parse() and 02993 * @a ignore_mime_type set to FALSE. 02994 * 02995 * @deprecated Provided for backwards compatibility with the 1.3 API. 02996 * 02997 * @since New in 1.2. 02998 */ 02999 SVN_DEPRECATED 03000 svn_error_t * 03001 svn_client_blame2(const char *path_or_url, 03002 const svn_opt_revision_t *peg_revision, 03003 const svn_opt_revision_t *start, 03004 const svn_opt_revision_t *end, 03005 svn_client_blame_receiver_t receiver, 03006 void *receiver_baton, 03007 svn_client_ctx_t *ctx, 03008 apr_pool_t *pool); 03009 03010 /** 03011 * Similar to svn_client_blame2() except that @a peg_revision is always 03012 * the same as @a end. 03013 * 03014 * @deprecated Provided for backward compatibility with the 1.1 API. 03015 */ 03016 SVN_DEPRECATED 03017 svn_error_t * 03018 svn_client_blame(const char *path_or_url, 03019 const svn_opt_revision_t *start, 03020 const svn_opt_revision_t *end, 03021 svn_client_blame_receiver_t receiver, 03022 void *receiver_baton, 03023 svn_client_ctx_t *ctx, 03024 apr_pool_t *pool); 03025 03026 /** @} */ 03027 03028 /** 03029 * @defgroup Diff Generate differences between paths. 03030 * 03031 * @{ 03032 */ 03033 03034 /** 03035 * Produce diff output which describes the delta between 03036 * @a path_or_url1/@a revision1 and @a path_or_url2/@a revision2. Print 03037 * the output of the diff to @a outstream, and any errors to @a 03038 * errstream. @a path_or_url1 and @a path_or_url2 can be either 03039 * working-copy paths or URLs. 03040 * 03041 * If @a relative_to_dir is not @c NULL, the original path and 03042 * modified path will have the @a relative_to_dir stripped from the 03043 * front of the respective paths. If @a relative_to_dir is @c NULL, 03044 * paths will not be modified. If @a relative_to_dir is not 03045 * @c NULL but @a relative_to_dir is not a parent path of the target, 03046 * an error is returned. Finally, if @a relative_to_dir is a URL, an 03047 * error will be returned. 03048 * 03049 * If either @a revision1 or @a revision2 has an `unspecified' or 03050 * unrecognized `kind', return #SVN_ERR_CLIENT_BAD_REVISION. 03051 * 03052 * @a path_or_url1 and @a path_or_url2 must both represent the same node 03053 * kind -- that is, if @a path_or_url1 is a directory, @a path_or_url2 03054 * must also be, and if @a path_or_url1 is a file, @a path_or_url2 must 03055 * also be. 03056 * 03057 * If @a depth is #svn_depth_infinity, diff fully recursively. 03058 * Else if it is #svn_depth_immediates, diff the named paths and 03059 * their file children (if any), and diff properties of 03060 * subdirectories, but do not descend further into the subdirectories. 03061 * Else if #svn_depth_files, behave as if for #svn_depth_immediates 03062 * except don't diff properties of subdirectories. If 03063 * #svn_depth_empty, diff exactly the named paths but nothing 03064 * underneath them. 03065 * 03066 * Use @a ignore_ancestry to control whether or not items being 03067 * diffed will be checked for relatedness first. Unrelated items 03068 * are typically transmitted to the editor as a deletion of one thing 03069 * and the addition of another, but if this flag is TRUE, unrelated 03070 * items will be diffed as if they were related. 03071 * 03072 * If @a no_diff_added is TRUE, then no diff output will be generated 03073 * on added files. 03074 * 03075 * If @a no_diff_deleted is TRUE, then no diff output will be 03076 * generated on deleted files. 03077 * 03078 * If @a show_copies_as_adds is TRUE, then copied files will not be diffed 03079 * against their copyfrom source, and will appear in the diff output 03080 * in their entirety, as if they were newly added. 03081 * ### BUGS: For a repos-repos diff, this is ignored. Instead, a file is 03082 * diffed against its copyfrom source iff the file is the diff target 03083 * and not if some parent directory is the diff target. For a repos-WC 03084 * diff, this is ignored if the file is the diff target. 03085 * 03086 * If @a use_git_diff_format is TRUE, then the git's extended diff format 03087 * will be used. 03088 * ### Do we need to say more about the format? A reference perhaps? 03089 * 03090 * If @a ignore_properties is TRUE, do not show property differences. 03091 * If @a properties_only is TRUE, show only property changes. 03092 * The above two options are mutually exclusive. It is an error to set 03093 * both to TRUE. 03094 * 03095 * If @a pretty_print_mergeinfo is true, then describe 'svn:mergeinfo' 03096 * property changes in a human-readable form that says what changes were 03097 * merged or reverse merged; otherwise (or if the mergeinfo property values 03098 * don't parse correctly) display them just like any other property. 03099 * 03100 * Generated headers are encoded using @a header_encoding. 03101 * 03102 * If either side has an svn:mime-type property that indicates 'binary' 03103 * content, then if @a ignore_content_type is set, attempt to produce the 03104 * diff in the usual way, otherwise produce a 'GIT binary diff' in git mode 03105 * or print a warning message in non-git mode. 03106 * 03107 * @a diff_options (an array of <tt>const char *</tt>) is used to pass 03108 * additional command line options to the diff processes invoked to compare 03109 * files. @a diff_options is allowed to be @c NULL, in which case a value 03110 * for this option might still be obtained from the Subversion configuration 03111 * file via client context @a ctx. 03112 * 03113 * The authentication baton cached in @a ctx is used to communicate with 03114 * the repository. 03115 * 03116 * @a changelists is an array of <tt>const char *</tt> changelist 03117 * names, used as a restrictive filter on items whose differences are 03118 * reported; that is, don't generate diffs about any item unless 03119 * it's a member of one of those changelists. If @a changelists is 03120 * empty (or altogether @c NULL), no changelist filtering occurs. 03121 * 03122 * @note Changelist filtering only applies to diffs in which at least 03123 * one side of the diff represents working copy data. 03124 * 03125 * @note @a header_encoding doesn't affect headers generated by external 03126 * diff programs. 03127 * 03128 * @note @a relative_to_dir doesn't affect the path index generated by 03129 * external diff programs. 03130 * 03131 * @since New in 1.11. 03132 */ 03133 svn_error_t * 03134 svn_client_diff7(const apr_array_header_t *diff_options, 03135 const char *path_or_url1, 03136 const svn_opt_revision_t *revision1, 03137 const char *path_or_url2, 03138 const svn_opt_revision_t *revision2, 03139 const char *relative_to_dir, 03140 svn_depth_t depth, 03141 svn_boolean_t ignore_ancestry, 03142 svn_boolean_t no_diff_added, 03143 svn_boolean_t no_diff_deleted, 03144 svn_boolean_t show_copies_as_adds, 03145 svn_boolean_t ignore_content_type, 03146 svn_boolean_t ignore_properties, 03147 svn_boolean_t properties_only, 03148 svn_boolean_t use_git_diff_format, 03149 svn_boolean_t pretty_print_mergeinfo, 03150 const char *header_encoding, 03151 svn_stream_t *outstream, 03152 svn_stream_t *errstream, 03153 const apr_array_header_t *changelists, 03154 svn_client_ctx_t *ctx, 03155 apr_pool_t *pool); 03156 03157 /** Similar to svn_client_diff7(), but with @a pretty_print_mergeinfo 03158 * always passed as @c TRUE. 03159 * 03160 * @deprecated Provided for backward compatibility with the 1.10 API. 03161 * @since New in 1.8. 03162 */ 03163 SVN_DEPRECATED 03164 svn_error_t * 03165 svn_client_diff6(const apr_array_header_t *diff_options, 03166 const char *path_or_url1, 03167 const svn_opt_revision_t *revision1, 03168 const char *path_or_url2, 03169 const svn_opt_revision_t *revision2, 03170 const char *relative_to_dir, 03171 svn_depth_t depth, 03172 svn_boolean_t ignore_ancestry, 03173 svn_boolean_t no_diff_added, 03174 svn_boolean_t no_diff_deleted, 03175 svn_boolean_t show_copies_as_adds, 03176 svn_boolean_t ignore_content_type, 03177 svn_boolean_t ignore_properties, 03178 svn_boolean_t properties_only, 03179 svn_boolean_t use_git_diff_format, 03180 const char *header_encoding, 03181 svn_stream_t *outstream, 03182 svn_stream_t *errstream, 03183 const apr_array_header_t *changelists, 03184 svn_client_ctx_t *ctx, 03185 apr_pool_t *pool); 03186 03187 /** Similar to svn_client_diff6(), but with @a outfile and @a errfile, 03188 * instead of @a outstream and @a errstream, and with @a 03189 * no_diff_added, @a ignore_properties, and @a properties_only always 03190 * passed as @c FALSE (which means that additions and property changes 03191 * are always transmitted). 03192 * 03193 * @deprecated Provided for backward compatibility with the 1.7 API. 03194 * @since New in 1.7. 03195 */ 03196 SVN_DEPRECATED 03197 svn_error_t * 03198 svn_client_diff5(const apr_array_header_t *diff_options, 03199 const char *path1, 03200 const svn_opt_revision_t *revision1, 03201 const char *path2, 03202 const svn_opt_revision_t *revision2, 03203 const char *relative_to_dir, 03204 svn_depth_t depth, 03205 svn_boolean_t ignore_ancestry, 03206 svn_boolean_t no_diff_deleted, 03207 svn_boolean_t show_copies_as_adds, 03208 svn_boolean_t ignore_content_type, 03209 svn_boolean_t use_git_diff_format, 03210 const char *header_encoding, 03211 apr_file_t *outfile, 03212 apr_file_t *errfile, 03213 const apr_array_header_t *changelists, 03214 svn_client_ctx_t *ctx, 03215 apr_pool_t *pool); 03216 03217 /** 03218 * Similar to svn_client_diff5(), but with @a show_copies_as_adds set to 03219 * @c FALSE and @a use_git_diff_format set to @c FALSE. 03220 * 03221 * @deprecated Provided for backward compatibility with the 1.6 API. 03222 * @since New in 1.5. 03223 */ 03224 SVN_DEPRECATED 03225 svn_error_t * 03226 svn_client_diff4(const apr_array_header_t *diff_options, 03227 const char *path1, 03228 const svn_opt_revision_t *revision1, 03229 const char *path2, 03230 const svn_opt_revision_t *revision2, 03231 const char *relative_to_dir, 03232 svn_depth_t depth, 03233 svn_boolean_t ignore_ancestry, 03234 svn_boolean_t no_diff_deleted, 03235 svn_boolean_t ignore_content_type, 03236 const char *header_encoding, 03237 apr_file_t *outfile, 03238 apr_file_t *errfile, 03239 const apr_array_header_t *changelists, 03240 svn_client_ctx_t *ctx, 03241 apr_pool_t *pool); 03242 03243 /** 03244 * Similar to svn_client_diff4(), but with @a changelists passed as @c 03245 * NULL, and @a depth set according to @a recurse: if @a recurse is 03246 * TRUE, set @a depth to #svn_depth_infinity, if @a recurse is 03247 * FALSE, set @a depth to #svn_depth_empty. 03248 * 03249 * @deprecated Provided for backward compatibility with the 1.4 API. 03250 * @since New in 1.3. 03251 */ 03252 SVN_DEPRECATED 03253 svn_error_t * 03254 svn_client_diff3(const apr_array_header_t *diff_options, 03255 const char *path1, 03256 const svn_opt_revision_t *revision1, 03257 const char *path2, 03258 const svn_opt_revision_t *revision2, 03259 svn_boolean_t recurse, 03260 svn_boolean_t ignore_ancestry, 03261 svn_boolean_t no_diff_deleted, 03262 svn_boolean_t ignore_content_type, 03263 const char *header_encoding, 03264 apr_file_t *outfile, 03265 apr_file_t *errfile, 03266 svn_client_ctx_t *ctx, 03267 apr_pool_t *pool); 03268 03269 03270 /** 03271 * Similar to svn_client_diff3(), but with @a header_encoding set to 03272 * @c APR_LOCALE_CHARSET. 03273 * 03274 * @deprecated Provided for backward compatibility with the 1.2 API. 03275 * @since New in 1.2. 03276 */ 03277 SVN_DEPRECATED 03278 svn_error_t * 03279 svn_client_diff2(const apr_array_header_t *diff_options, 03280 const char *path1, 03281 const svn_opt_revision_t *revision1, 03282 const char *path2, 03283 const svn_opt_revision_t *revision2, 03284 svn_boolean_t recurse, 03285 svn_boolean_t ignore_ancestry, 03286 svn_boolean_t no_diff_deleted, 03287 svn_boolean_t ignore_content_type, 03288 apr_file_t *outfile, 03289 apr_file_t *errfile, 03290 svn_client_ctx_t *ctx, 03291 apr_pool_t *pool); 03292 03293 /** 03294 * Similar to svn_client_diff2(), but with @a ignore_content_type 03295 * always set to FALSE. 03296 * 03297 * @deprecated Provided for backward compatibility with the 1.1 API. 03298 */ 03299 SVN_DEPRECATED 03300 svn_error_t * 03301 svn_client_diff(const apr_array_header_t *diff_options, 03302 const char *path1, 03303 const svn_opt_revision_t *revision1, 03304 const char *path2, 03305 const svn_opt_revision_t *revision2, 03306 svn_boolean_t recurse, 03307 svn_boolean_t ignore_ancestry, 03308 svn_boolean_t no_diff_deleted, 03309 apr_file_t *outfile, 03310 apr_file_t *errfile, 03311 svn_client_ctx_t *ctx, 03312 apr_pool_t *pool); 03313 03314 /** 03315 * Produce diff output which describes the delta between the filesystem 03316 * object @a path_or_url in peg revision @a peg_revision, as it changed 03317 * between @a start_revision and @a end_revision. @a path_or_url can 03318 * be either a working-copy path or URL. 03319 * 03320 * If @a peg_revision is #svn_opt_revision_unspecified, behave 03321 * identically to svn_client_diff7(), using @a path_or_url for both of that 03322 * function's @a path_or_url1 and @a path_or_url2 arguments. 03323 * 03324 * All other options are handled identically to svn_client_diff7(). 03325 * 03326 * @since New in 1.8. 03327 */ 03328 svn_error_t * 03329 svn_client_diff_peg7(const apr_array_header_t *diff_options, 03330 const char *path_or_url, 03331 const svn_opt_revision_t *peg_revision, 03332 const svn_opt_revision_t *start_revision, 03333 const svn_opt_revision_t *end_revision, 03334 const char *relative_to_dir, 03335 svn_depth_t depth, 03336 svn_boolean_t ignore_ancestry, 03337 svn_boolean_t no_diff_added, 03338 svn_boolean_t no_diff_deleted, 03339 svn_boolean_t show_copies_as_adds, 03340 svn_boolean_t ignore_content_type, 03341 svn_boolean_t ignore_properties, 03342 svn_boolean_t properties_only, 03343 svn_boolean_t use_git_diff_format, 03344 svn_boolean_t pretty_print_mergeinfo, 03345 const char *header_encoding, 03346 svn_stream_t *outstream, 03347 svn_stream_t *errstream, 03348 const apr_array_header_t *changelists, 03349 svn_client_ctx_t *ctx, 03350 apr_pool_t *pool); 03351 03352 /** Similar to svn_client_diff_peg7(), but with @a pretty_print_mergeinfo 03353 * always passed as @c TRUE. 03354 * 03355 * @deprecated Provided for backward compatibility with the 1.7 API. 03356 * @since New in 1.7. 03357 */ 03358 SVN_DEPRECATED 03359 svn_error_t * 03360 svn_client_diff_peg6(const apr_array_header_t *diff_options, 03361 const char *path_or_url, 03362 const svn_opt_revision_t *peg_revision, 03363 const svn_opt_revision_t *start_revision, 03364 const svn_opt_revision_t *end_revision, 03365 const char *relative_to_dir, 03366 svn_depth_t depth, 03367 svn_boolean_t ignore_ancestry, 03368 svn_boolean_t no_diff_added, 03369 svn_boolean_t no_diff_deleted, 03370 svn_boolean_t show_copies_as_adds, 03371 svn_boolean_t ignore_content_type, 03372 svn_boolean_t ignore_properties, 03373 svn_boolean_t properties_only, 03374 svn_boolean_t use_git_diff_format, 03375 const char *header_encoding, 03376 svn_stream_t *outstream, 03377 svn_stream_t *errstream, 03378 const apr_array_header_t *changelists, 03379 svn_client_ctx_t *ctx, 03380 apr_pool_t *pool); 03381 03382 /** Similar to svn_client_diff6_peg6(), but with @a outfile and @a errfile, 03383 * instead of @a outstream and @a errstream, and with @a 03384 * no_diff_added, @a ignore_properties, and @a properties_only always 03385 * passed as @c FALSE (which means that additions and property changes 03386 * are always transmitted). 03387 * 03388 * @deprecated Provided for backward compatibility with the 1.7 API. 03389 * @since New in 1.7. 03390 */ 03391 SVN_DEPRECATED 03392 svn_error_t * 03393 svn_client_diff_peg5(const apr_array_header_t *diff_options, 03394 const char *path, 03395 const svn_opt_revision_t *peg_revision, 03396 const svn_opt_revision_t *start_revision, 03397 const svn_opt_revision_t *end_revision, 03398 const char *relative_to_dir, 03399 svn_depth_t depth, 03400 svn_boolean_t ignore_ancestry, 03401 svn_boolean_t no_diff_deleted, 03402 svn_boolean_t show_copies_as_adds, 03403 svn_boolean_t ignore_content_type, 03404 svn_boolean_t use_git_diff_format, 03405 const char *header_encoding, 03406 apr_file_t *outfile, 03407 apr_file_t *errfile, 03408 const apr_array_header_t *changelists, 03409 svn_client_ctx_t *ctx, 03410 apr_pool_t *pool); 03411 03412 /** 03413 * Similar to svn_client_diff_peg5(), but with @a show_copies_as_adds set to 03414 * @c FALSE and @a use_git_diff_format set to @c FALSE. 03415 * 03416 * @since New in 1.5. 03417 * @deprecated Provided for backward compatibility with the 1.6 API. 03418 */ 03419 SVN_DEPRECATED 03420 svn_error_t * 03421 svn_client_diff_peg4(const apr_array_header_t *diff_options, 03422 const char *path, 03423 const svn_opt_revision_t *peg_revision, 03424 const svn_opt_revision_t *start_revision, 03425 const svn_opt_revision_t *end_revision, 03426 const char *relative_to_dir, 03427 svn_depth_t depth, 03428 svn_boolean_t ignore_ancestry, 03429 svn_boolean_t no_diff_deleted, 03430 svn_boolean_t ignore_content_type, 03431 const char *header_encoding, 03432 apr_file_t *outfile, 03433 apr_file_t *errfile, 03434 const apr_array_header_t *changelists, 03435 svn_client_ctx_t *ctx, 03436 apr_pool_t *pool); 03437 03438 /** 03439 * Similar to svn_client_diff_peg4(), but with @a changelists passed 03440 * as @c NULL, and @a depth set according to @a recurse: if @a recurse 03441 * is TRUE, set @a depth to #svn_depth_infinity, if @a recurse is 03442 * FALSE, set @a depth to #svn_depth_files. 03443 * 03444 * @deprecated Provided for backward compatibility with the 1.4 API. 03445 * @since New in 1.3. 03446 */ 03447 SVN_DEPRECATED 03448 svn_error_t * 03449 svn_client_diff_peg3(const apr_array_header_t *diff_options, 03450 const char *path, 03451 const svn_opt_revision_t *peg_revision, 03452 const svn_opt_revision_t *start_revision, 03453 const svn_opt_revision_t *end_revision, 03454 svn_boolean_t recurse, 03455 svn_boolean_t ignore_ancestry, 03456 svn_boolean_t no_diff_deleted, 03457 svn_boolean_t ignore_content_type, 03458 const char *header_encoding, 03459 apr_file_t *outfile, 03460 apr_file_t *errfile, 03461 svn_client_ctx_t *ctx, 03462 apr_pool_t *pool); 03463 03464 /** 03465 * Similar to svn_client_diff_peg3(), but with @a header_encoding set to 03466 * @c APR_LOCALE_CHARSET. 03467 * 03468 * @deprecated Provided for backward compatibility with the 1.2 API. 03469 * @since New in 1.2. 03470 */ 03471 SVN_DEPRECATED 03472 svn_error_t * 03473 svn_client_diff_peg2(const apr_array_header_t *diff_options, 03474 const char *path, 03475 const svn_opt_revision_t *peg_revision, 03476 const svn_opt_revision_t *start_revision, 03477 const svn_opt_revision_t *end_revision, 03478 svn_boolean_t recurse, 03479 svn_boolean_t ignore_ancestry, 03480 svn_boolean_t no_diff_deleted, 03481 svn_boolean_t ignore_content_type, 03482 apr_file_t *outfile, 03483 apr_file_t *errfile, 03484 svn_client_ctx_t *ctx, 03485 apr_pool_t *pool); 03486 03487 /** 03488 * Similar to svn_client_diff_peg2(), but with @a ignore_content_type 03489 * always set to FALSE. 03490 * 03491 * @since New in 1.1. 03492 * @deprecated Provided for backward compatibility with the 1.1 API. 03493 */ 03494 SVN_DEPRECATED 03495 svn_error_t * 03496 svn_client_diff_peg(const apr_array_header_t *diff_options, 03497 const char *path, 03498 const svn_opt_revision_t *peg_revision, 03499 const svn_opt_revision_t *start_revision, 03500 const svn_opt_revision_t *end_revision, 03501 svn_boolean_t recurse, 03502 svn_boolean_t ignore_ancestry, 03503 svn_boolean_t no_diff_deleted, 03504 apr_file_t *outfile, 03505 apr_file_t *errfile, 03506 svn_client_ctx_t *ctx, 03507 apr_pool_t *pool); 03508 03509 /** 03510 * Produce a diff summary which lists the changed items between 03511 * @a path_or_url1/@a revision1 and @a path_or_url2/@a revision2 without 03512 * creating text deltas. @a path_or_url1 and @a path_or_url2 can be 03513 * either working-copy paths or URLs. 03514 * 03515 * The function may report false positives if @a ignore_ancestry is false, 03516 * since a file might have been modified between two revisions, but still 03517 * have the same contents. 03518 * 03519 * Calls @a summarize_func with @a summarize_baton for each difference 03520 * with a #svn_client_diff_summarize_t structure describing the difference. 03521 * 03522 * See svn_client_diff7() for a description of the other parameters. 03523 * 03524 * @since New in 1.5. 03525 */ 03526 svn_error_t * 03527 svn_client_diff_summarize2(const char *path_or_url1, 03528 const svn_opt_revision_t *revision1, 03529 const char *path_or_url2, 03530 const svn_opt_revision_t *revision2, 03531 svn_depth_t depth, 03532 svn_boolean_t ignore_ancestry, 03533 const apr_array_header_t *changelists, 03534 svn_client_diff_summarize_func_t summarize_func, 03535 void *summarize_baton, 03536 svn_client_ctx_t *ctx, 03537 apr_pool_t *pool); 03538 03539 /** 03540 * Similar to svn_client_diff_summarize2(), but with @a changelists 03541 * passed as @c NULL, and @a depth set according to @a recurse: if @a 03542 * recurse is TRUE, set @a depth to #svn_depth_infinity, if @a 03543 * recurse is FALSE, set @a depth to #svn_depth_files. 03544 * 03545 * @deprecated Provided for backward compatibility with the 1.4 API. 03546 * 03547 * @since New in 1.4. 03548 */ 03549 SVN_DEPRECATED 03550 svn_error_t * 03551 svn_client_diff_summarize(const char *path1, 03552 const svn_opt_revision_t *revision1, 03553 const char *path2, 03554 const svn_opt_revision_t *revision2, 03555 svn_boolean_t recurse, 03556 svn_boolean_t ignore_ancestry, 03557 svn_client_diff_summarize_func_t summarize_func, 03558 void *summarize_baton, 03559 svn_client_ctx_t *ctx, 03560 apr_pool_t *pool); 03561 03562 /** 03563 * Produce a diff summary which lists the changed items between the 03564 * filesystem object @a path_or_url in peg revision @a peg_revision, as it 03565 * changed between @a start_revision and @a end_revision. @a path_or_url can 03566 * be either a working-copy path or URL. 03567 * 03568 * If @a peg_revision is #svn_opt_revision_unspecified, behave 03569 * identically to svn_client_diff_summarize2(), using @a path_or_url for 03570 * both of that function's @a path_or_url1 and @a path_or_url2 arguments. 03571 * 03572 * The function may report false positives if @a ignore_ancestry is false, 03573 * as described in the documentation for svn_client_diff_summarize2(). 03574 * 03575 * Call @a summarize_func with @a summarize_baton for each difference 03576 * with a #svn_client_diff_summarize_t structure describing the difference. 03577 * 03578 * See svn_client_diff_peg5() for a description of the other parameters. 03579 * 03580 * @since New in 1.5. 03581 */ 03582 svn_error_t * 03583 svn_client_diff_summarize_peg2(const char *path_or_url, 03584 const svn_opt_revision_t *peg_revision, 03585 const svn_opt_revision_t *start_revision, 03586 const svn_opt_revision_t *end_revision, 03587 svn_depth_t depth, 03588 svn_boolean_t ignore_ancestry, 03589 const apr_array_header_t *changelists, 03590 svn_client_diff_summarize_func_t summarize_func, 03591 void *summarize_baton, 03592 svn_client_ctx_t *ctx, 03593 apr_pool_t *pool); 03594 03595 /** 03596 * Similar to svn_client_diff_summarize_peg2(), but with @a 03597 * changelists passed as @c NULL, and @a depth set according to @a 03598 * recurse: if @a recurse is TRUE, set @a depth to 03599 * #svn_depth_infinity, if @a recurse is FALSE, set @a depth to 03600 * #svn_depth_files. 03601 * 03602 * @deprecated Provided for backward compatibility with the 1.4 API. 03603 * 03604 * @since New in 1.4. 03605 */ 03606 SVN_DEPRECATED 03607 svn_error_t * 03608 svn_client_diff_summarize_peg(const char *path, 03609 const svn_opt_revision_t *peg_revision, 03610 const svn_opt_revision_t *start_revision, 03611 const svn_opt_revision_t *end_revision, 03612 svn_boolean_t recurse, 03613 svn_boolean_t ignore_ancestry, 03614 svn_client_diff_summarize_func_t summarize_func, 03615 void *summarize_baton, 03616 svn_client_ctx_t *ctx, 03617 apr_pool_t *pool); 03618 03619 /** @} */ 03620 03621 /** 03622 * @defgroup Merge Merge changes between branches. 03623 * 03624 * @{ 03625 */ 03626 03627 /** Get information about the state of merging between two branches. 03628 * 03629 * The source is specified by @a source_path_or_url at @a source_revision. 03630 * The target is specified by @a target_path_or_url at @a target_revision, 03631 * which refers to either a WC or a repository location. 03632 * 03633 * Set @a *needs_reintegration to true if an automatic merge from source 03634 * to target would be a reintegration merge: that is, if the last automatic 03635 * merge was in the opposite direction; or to false otherwise. 03636 * 03637 * Set @a *yca_url, @a *yca_rev, @a *base_url, @a *base_rev, @a *right_url, 03638 * @a *right_rev, @a *target_url, @a *target_rev to the repository locations 03639 * of, respectively: the youngest common ancestor of the branches, the base 03640 * chosen for 3-way merge, the right-hand side of the source diff, and the 03641 * target. 03642 * 03643 * Set @a repos_root_url to the URL of the repository root. This is a 03644 * common prefix of all four URL outputs. 03645 * 03646 * Allocate the results in @a result_pool. Any of the output pointers may 03647 * be NULL if not wanted. 03648 * 03649 * @since New in 1.8. 03650 */ 03651 svn_error_t * 03652 svn_client_get_merging_summary(svn_boolean_t *needs_reintegration, 03653 const char **yca_url, svn_revnum_t *yca_rev, 03654 const char **base_url, svn_revnum_t *base_rev, 03655 const char **right_url, svn_revnum_t *right_rev, 03656 const char **target_url, svn_revnum_t *target_rev, 03657 const char **repos_root_url, 03658 const char *source_path_or_url, 03659 const svn_opt_revision_t *source_revision, 03660 const char *target_path_or_url, 03661 const svn_opt_revision_t *target_revision, 03662 svn_client_ctx_t *ctx, 03663 apr_pool_t *result_pool, 03664 apr_pool_t *scratch_pool); 03665 03666 03667 /** Merge changes from @a source1/@a revision1 to @a source2/@a revision2 into 03668 * the working-copy path @a target_wcpath. 03669 * 03670 * @a source1 and @a source2 are either URLs that refer to entries in the 03671 * repository, or paths to entries in the working copy. 03672 * 03673 * By "merging", we mean: apply file differences using 03674 * svn_wc_merge(), and schedule additions & deletions when appropriate. 03675 * 03676 * @a source1 and @a source2 must both represent the same node kind -- that 03677 * is, if @a source1 is a directory, @a source2 must also be, and if @a source1 03678 * is a file, @a source2 must also be. 03679 * 03680 * If either @a revision1 or @a revision2 has an `unspecified' or 03681 * unrecognized `kind', return #SVN_ERR_CLIENT_BAD_REVISION. 03682 * 03683 * If @a depth is #svn_depth_infinity, merge fully recursively. 03684 * Else if #svn_depth_immediates, merge changes at most to files 03685 * that are immediate children of @a target_wcpath and to directory 03686 * properties of @a target_wcpath and its immediate subdirectory children. 03687 * Else if #svn_depth_files, merge at most to immediate file 03688 * children of @a target_wcpath and to @a target_wcpath itself. 03689 * Else if #svn_depth_empty, apply changes only to @a target_wcpath 03690 * (i.e., directory property changes only) 03691 * 03692 * If @a depth is #svn_depth_unknown, use the depth of @a target_wcpath. 03693 * 03694 * If @a ignore_mergeinfo is true, disable merge tracking, by treating the 03695 * two sources as unrelated even if they actually have a common ancestor. 03696 * 03697 * If @a diff_ignore_ancestry is true, diff unrelated nodes as if related: 03698 * that is, diff the 'left' and 'right' versions of a node as if they were 03699 * related (if they are the same kind) even if they are not related. 03700 * Otherwise, diff unrelated items as a deletion of one thing and the 03701 * addition of another. 03702 * 03703 * If @a force_delete is false and the merge involves deleting a file whose 03704 * content differs from the source-left version, or a locally modified 03705 * directory, or an unversioned item, then the operation will fail. If 03706 * @a force_delete is true then all such items will be deleted. 03707 * 03708 * @a merge_options (an array of <tt>const char *</tt>), if non-NULL, 03709 * is used to pass additional command line arguments to the merge 03710 * processes (internal or external). @see 03711 * svn_diff_file_options_parse(). 03712 * 03713 * If @a ctx->notify_func2 is non-NULL, then call @a ctx->notify_func2 with @a 03714 * ctx->notify_baton2 once for each merged target, passing the target's local 03715 * path. 03716 * 03717 * If @a record_only is TRUE, the merge is performed, but is limited only to 03718 * mergeinfo property changes on existing paths in @a target_wcpath. 03719 * 03720 * If @a dry_run is TRUE, the merge is carried out, and full notification 03721 * feedback is provided, but the working copy is not modified. 03722 * 03723 * If allow_mixed_rev is @c FALSE, and @a merge_target is a mixed-revision 03724 * working copy, raise @c SVN_ERR_CLIENT_MERGE_UPDATE_REQUIRED. 03725 * Because users rarely intend to merge into mixed-revision working copies, 03726 * it is recommended to set this parameter to FALSE by default unless the 03727 * user has explicitly requested a merge into a mixed-revision working copy. 03728 * 03729 * The authentication baton cached in @a ctx is used to communicate with the 03730 * repository. 03731 * 03732 * @since New in 1.8. 03733 */ 03734 svn_error_t * 03735 svn_client_merge5(const char *source1, 03736 const svn_opt_revision_t *revision1, 03737 const char *source2, 03738 const svn_opt_revision_t *revision2, 03739 const char *target_wcpath, 03740 svn_depth_t depth, 03741 svn_boolean_t ignore_mergeinfo, 03742 svn_boolean_t diff_ignore_ancestry, 03743 svn_boolean_t force_delete, 03744 svn_boolean_t record_only, 03745 svn_boolean_t dry_run, 03746 svn_boolean_t allow_mixed_rev, 03747 const apr_array_header_t *merge_options, 03748 svn_client_ctx_t *ctx, 03749 apr_pool_t *pool); 03750 03751 /** 03752 * Similar to svn_client_merge5(), but the single @a ignore_ancestry 03753 * parameter maps to both @c ignore_mergeinfo and @c diff_ignore_ancestry. 03754 * 03755 * @deprecated Provided for backward compatibility with the 1.7 API. 03756 * @since New in 1.7. 03757 */ 03758 SVN_DEPRECATED 03759 svn_error_t * 03760 svn_client_merge4(const char *source1, 03761 const svn_opt_revision_t *revision1, 03762 const char *source2, 03763 const svn_opt_revision_t *revision2, 03764 const char *target_wcpath, 03765 svn_depth_t depth, 03766 svn_boolean_t ignore_ancestry, 03767 svn_boolean_t force_delete, 03768 svn_boolean_t record_only, 03769 svn_boolean_t dry_run, 03770 svn_boolean_t allow_mixed_rev, 03771 const apr_array_header_t *merge_options, 03772 svn_client_ctx_t *ctx, 03773 apr_pool_t *pool); 03774 03775 /** 03776 * Similar to svn_client_merge4(), but with @a allow_mixed_rev set to 03777 * @c TRUE. The @a force parameter maps to the @c force_delete parameter 03778 * of svn_client_merge4(). 03779 * 03780 * @deprecated Provided for backward compatibility with the 1.6 API. 03781 * 03782 * @since New in 1.5. 03783 */ 03784 SVN_DEPRECATED 03785 svn_error_t * 03786 svn_client_merge3(const char *source1, 03787 const svn_opt_revision_t *revision1, 03788 const char *source2, 03789 const svn_opt_revision_t *revision2, 03790 const char *target_wcpath, 03791 svn_depth_t depth, 03792 svn_boolean_t ignore_ancestry, 03793 svn_boolean_t force, 03794 svn_boolean_t record_only, 03795 svn_boolean_t dry_run, 03796 const apr_array_header_t *merge_options, 03797 svn_client_ctx_t *ctx, 03798 apr_pool_t *pool); 03799 03800 /** 03801 * Similar to svn_client_merge3(), but with @a record_only set to @c 03802 * FALSE, and @a depth set according to @a recurse: if @a recurse is 03803 * TRUE, set @a depth to #svn_depth_infinity, if @a recurse is 03804 * FALSE, set @a depth to #svn_depth_files. 03805 * 03806 * @deprecated Provided for backward compatibility with the 1.4 API. 03807 * 03808 * @since New in 1.4. 03809 */ 03810 SVN_DEPRECATED 03811 svn_error_t * 03812 svn_client_merge2(const char *source1, 03813 const svn_opt_revision_t *revision1, 03814 const char *source2, 03815 const svn_opt_revision_t *revision2, 03816 const char *target_wcpath, 03817 svn_boolean_t recurse, 03818 svn_boolean_t ignore_ancestry, 03819 svn_boolean_t force, 03820 svn_boolean_t dry_run, 03821 const apr_array_header_t *merge_options, 03822 svn_client_ctx_t *ctx, 03823 apr_pool_t *pool); 03824 03825 03826 /** 03827 * Similar to svn_client_merge2(), but with @a merge_options set to NULL. 03828 * 03829 * @deprecated Provided for backwards compatibility with the 1.3 API. 03830 */ 03831 SVN_DEPRECATED 03832 svn_error_t * 03833 svn_client_merge(const char *source1, 03834 const svn_opt_revision_t *revision1, 03835 const char *source2, 03836 const svn_opt_revision_t *revision2, 03837 const char *target_wcpath, 03838 svn_boolean_t recurse, 03839 svn_boolean_t ignore_ancestry, 03840 svn_boolean_t force, 03841 svn_boolean_t dry_run, 03842 svn_client_ctx_t *ctx, 03843 apr_pool_t *pool); 03844 03845 03846 /** 03847 * Perform a reintegration merge of @a source_path_or_url at @a source_peg_revision 03848 * into @a target_wcpath. 03849 * @a target_wcpath must be a single-revision, #svn_depth_infinity, 03850 * pristine, unswitched working copy -- in other words, it must 03851 * reflect a single revision tree, the "target". The mergeinfo on @a 03852 * source_path_or_url must reflect that all of the target has been merged into it. 03853 * Then this behaves like a merge with svn_client_merge5() from the 03854 * target's URL to the source. 03855 * 03856 * All other options are handled identically to svn_client_merge5(). 03857 * The depth of the merge is always #svn_depth_infinity. 03858 * 03859 * @since New in 1.5. 03860 * @deprecated Provided for backwards compatibility with the 1.7 API. 03861 */ 03862 SVN_DEPRECATED 03863 svn_error_t * 03864 svn_client_merge_reintegrate(const char *source_path_or_url, 03865 const svn_opt_revision_t *source_peg_revision, 03866 const char *target_wcpath, 03867 svn_boolean_t dry_run, 03868 const apr_array_header_t *merge_options, 03869 svn_client_ctx_t *ctx, 03870 apr_pool_t *pool); 03871 03872 /** 03873 * Merge changes from the source branch identified by 03874 * @a source_path_or_url in peg revision @a source_peg_revision, 03875 * into the target branch working copy at @a target_wcpath. 03876 * 03877 * If @a ranges_to_merge is NULL then perform an automatic merge of 03878 * all the eligible changes up to @a source_peg_revision. If the merge 03879 * required is a reintegrate merge, then return an error if the WC has 03880 * mixed revisions, local modifications and/or switched subtrees; if 03881 * the merge is determined to be of the non-reintegrate kind, then 03882 * return an error if @a allow_mixed_rev is false and the WC contains 03883 * mixed revisions. 03884 * 03885 * If @a ranges_to_merge is not NULL then merge the changes specified 03886 * by the revision ranges in @a ranges_to_merge, or, when honouring 03887 * mergeinfo, only the eligible parts of those revision ranges. 03888 * @a ranges_to_merge is an array of <tt>svn_opt_revision_range_t 03889 * *</tt> ranges. These ranges may describe additive and/or 03890 * subtractive merge ranges, they may overlap fully or partially, 03891 * and/or they may partially or fully negate each other. This 03892 * rangelist is not required to be sorted. If any revision in the 03893 * list of provided ranges has an `unspecified' or unrecognized 03894 * `kind', return #SVN_ERR_CLIENT_BAD_REVISION. 03895 * 03896 * If @a ranges_to_merge is an empty array, then do nothing. 03897 * 03898 * All other options are handled identically to svn_client_merge5(). 03899 * 03900 * @since New in 1.8. 03901 */ 03902 svn_error_t * 03903 svn_client_merge_peg5(const char *source_path_or_url, 03904 const apr_array_header_t *ranges_to_merge, 03905 const svn_opt_revision_t *source_peg_revision, 03906 const char *target_wcpath, 03907 svn_depth_t depth, 03908 svn_boolean_t ignore_mergeinfo, 03909 svn_boolean_t diff_ignore_ancestry, 03910 svn_boolean_t force_delete, 03911 svn_boolean_t record_only, 03912 svn_boolean_t dry_run, 03913 svn_boolean_t allow_mixed_rev, 03914 const apr_array_header_t *merge_options, 03915 svn_client_ctx_t *ctx, 03916 apr_pool_t *pool); 03917 03918 /** 03919 * Similar to svn_client_merge_peg5(), but automatic merge is not available 03920 * (@a ranges_to_merge must not be NULL), and the single @a ignore_ancestry 03921 * parameter maps to both @c ignore_mergeinfo and @c diff_ignore_ancestry. 03922 * 03923 * @deprecated Provided for backward compatibility with the 1.7 API. 03924 * @since New in 1.7. 03925 */ 03926 SVN_DEPRECATED 03927 svn_error_t * 03928 svn_client_merge_peg4(const char *source_path_or_url, 03929 const apr_array_header_t *ranges_to_merge, 03930 const svn_opt_revision_t *source_peg_revision, 03931 const char *target_wcpath, 03932 svn_depth_t depth, 03933 svn_boolean_t ignore_ancestry, 03934 svn_boolean_t force_delete, 03935 svn_boolean_t record_only, 03936 svn_boolean_t dry_run, 03937 svn_boolean_t allow_mixed_rev, 03938 const apr_array_header_t *merge_options, 03939 svn_client_ctx_t *ctx, 03940 apr_pool_t *pool); 03941 03942 /** 03943 * Similar to svn_client_merge_peg4(), but with @a allow_mixed_rev set to 03944 * @c TRUE. The @a force parameter maps to the @c force_delete parameter 03945 * of svn_client_merge_peg4(). 03946 * 03947 * @deprecated Provided for backward compatibility with the 1.6 API. 03948 * 03949 * @since New in 1.5. 03950 */ 03951 SVN_DEPRECATED 03952 svn_error_t * 03953 svn_client_merge_peg3(const char *source, 03954 const apr_array_header_t *ranges_to_merge, 03955 const svn_opt_revision_t *peg_revision, 03956 const char *target_wcpath, 03957 svn_depth_t depth, 03958 svn_boolean_t ignore_ancestry, 03959 svn_boolean_t force, 03960 svn_boolean_t record_only, 03961 svn_boolean_t dry_run, 03962 const apr_array_header_t *merge_options, 03963 svn_client_ctx_t *ctx, 03964 apr_pool_t *pool); 03965 03966 /** 03967 * Similar to svn_client_merge_peg3(), but with @a record_only set to 03968 * @c FALSE, and @a depth set according to @a recurse: if @a recurse 03969 * is TRUE, set @a depth to #svn_depth_infinity, if @a recurse is 03970 * FALSE, set @a depth to #svn_depth_files. 03971 * 03972 * @deprecated Provided for backwards compatibility with the 1.4 API. 03973 * 03974 * @since New in 1.4. 03975 */ 03976 SVN_DEPRECATED 03977 svn_error_t * 03978 svn_client_merge_peg2(const char *source, 03979 const svn_opt_revision_t *revision1, 03980 const svn_opt_revision_t *revision2, 03981 const svn_opt_revision_t *peg_revision, 03982 const char *target_wcpath, 03983 svn_boolean_t recurse, 03984 svn_boolean_t ignore_ancestry, 03985 svn_boolean_t force, 03986 svn_boolean_t dry_run, 03987 const apr_array_header_t *merge_options, 03988 svn_client_ctx_t *ctx, 03989 apr_pool_t *pool); 03990 03991 /** 03992 * Similar to svn_client_merge_peg2(), but with @a merge_options set to 03993 * NULL. 03994 * 03995 * @deprecated Provided for backwards compatibility with the 1.3 API. 03996 * 03997 * @since New in 1.1. 03998 */ 03999 SVN_DEPRECATED 04000 svn_error_t * 04001 svn_client_merge_peg(const char *source, 04002 const svn_opt_revision_t *revision1, 04003 const svn_opt_revision_t *revision2, 04004 const svn_opt_revision_t *peg_revision, 04005 const char *target_wcpath, 04006 svn_boolean_t recurse, 04007 svn_boolean_t ignore_ancestry, 04008 svn_boolean_t force, 04009 svn_boolean_t dry_run, 04010 svn_client_ctx_t *ctx, 04011 apr_pool_t *pool); 04012 04013 04014 /** Set @a suggestions to an ordered array of @c const char * 04015 * potential merge sources (expressed as full repository URLs) for @a 04016 * path_or_url at @a peg_revision. @a path_or_url is a working copy 04017 * path or repository URL. @a ctx is a context used for 04018 * authentication in the repository case. Use @a pool for all 04019 * allocations. 04020 * 04021 * @since New in 1.5. 04022 */ 04023 svn_error_t * 04024 svn_client_suggest_merge_sources(apr_array_header_t **suggestions, 04025 const char *path_or_url, 04026 const svn_opt_revision_t *peg_revision, 04027 svn_client_ctx_t *ctx, 04028 apr_pool_t *pool); 04029 04030 04031 /** 04032 * Get the mergeinfo for a single target node (ignoring any subtrees). 04033 * 04034 * Set @a *mergeinfo to a hash mapping <tt>const char *</tt> merge source 04035 * URLs to <tt>svn_rangelist_t *</tt> rangelists describing the ranges which 04036 * have been merged into @a path_or_url as of @a peg_revision, per 04037 * @a path_or_url's explicit mergeinfo or inherited mergeinfo if no 04038 * explicit mergeinfo if found. If no explicit or inherited mergeinfo 04039 * is found, then set @a *mergeinfo to NULL. 04040 * 04041 * Use @a pool for all necessary allocations. 04042 * 04043 * If the server doesn't support retrieval of mergeinfo (which will 04044 * never happen for file:// URLs), return an 04045 * #SVN_ERR_UNSUPPORTED_FEATURE error. 04046 * 04047 * @note Unlike most APIs which deal with mergeinfo, this one returns 04048 * data where the keys of the hash are absolute repository URLs rather 04049 * than repository filesystem paths. 04050 * 04051 * @since New in 1.5. 04052 */ 04053 svn_error_t * 04054 svn_client_mergeinfo_get_merged(apr_hash_t **mergeinfo, 04055 const char *path_or_url, 04056 const svn_opt_revision_t *peg_revision, 04057 svn_client_ctx_t *ctx, 04058 apr_pool_t *pool); 04059 04060 04061 /** 04062 * Describe the revisions that either have or have not been merged from 04063 * one source branch (or subtree) into another. 04064 * 04065 * If @a finding_merged is TRUE, then drive log entry callbacks 04066 * @a receiver / @a receiver_baton with the revisions merged from 04067 * @a source_path_or_url (as of @a source_peg_revision) into 04068 * @a target_path_or_url (as of @a target_peg_revision). If @a 04069 * finding_merged is FALSE then find the revisions eligible for merging. 04070 * 04071 * If both @a source_start_revision and @a source_end_revision are 04072 * unspecified (that is, of kind @c svn_opt_revision_unspecified), 04073 * @a receiver will be called the requested revisions from 0 to 04074 * @a source_peg_revision and in that order (that is, oldest to 04075 * youngest). Otherwise, both @a source_start_revision and 04076 * @a source_end_revision must be specified, which has two effects: 04077 * 04078 * - @a receiver will be called only with revisions which fall 04079 * within range of @a source_start_revision to 04080 * @a source_end_revision, inclusive, and 04081 * 04082 * - those revisions will be ordered in the same "direction" as the 04083 * walk from @a source_start_revision to @a source_end_revision. 04084 * (If @a source_start_revision is the younger of the two, @a 04085 * receiver will be called with revisions in youngest-to-oldest 04086 * order; otherwise, the reverse occurs.) 04087 * 04088 * If @a depth is #svn_depth_empty consider only the explicit or 04089 * inherited mergeinfo on @a target_path_or_url when calculating merged 04090 * revisions from @a source_path_or_url. If @a depth is #svn_depth_infinity 04091 * then also consider the explicit subtree mergeinfo under @a 04092 * target_path_or_url. 04093 * If a depth other than #svn_depth_empty or #svn_depth_infinity is 04094 * requested then return a #SVN_ERR_UNSUPPORTED_FEATURE error. 04095 * 04096 * In addition to the behavior of @a discover_changed_paths described in 04097 * svn_client_log5(), if set to TRUE it enables detection of sub-tree 04098 * merges that are complete but can't be detected as complete without 04099 * access to the changed paths. Sub-tree merges detected as complete will 04100 * be included if @a finding_merged is TRUE or filtered if @a finding_merged 04101 * is FALSE. 04102 * 04103 * @a revprops is the same as for svn_client_log5(). Use @a scratch_pool for 04104 * all temporary allocations. 04105 * 04106 * @a ctx is a context used for authentication. 04107 * 04108 * If the server doesn't support retrieval of mergeinfo, return an 04109 * #SVN_ERR_UNSUPPORTED_FEATURE error. 04110 * 04111 * @since New in 1.8. 04112 */ 04113 svn_error_t * 04114 svn_client_mergeinfo_log2(svn_boolean_t finding_merged, 04115 const char *target_path_or_url, 04116 const svn_opt_revision_t *target_peg_revision, 04117 const char *source_path_or_url, 04118 const svn_opt_revision_t *source_peg_revision, 04119 const svn_opt_revision_t *source_start_revision, 04120 const svn_opt_revision_t *source_end_revision, 04121 svn_log_entry_receiver_t receiver, 04122 void *receiver_baton, 04123 svn_boolean_t discover_changed_paths, 04124 svn_depth_t depth, 04125 const apr_array_header_t *revprops, 04126 svn_client_ctx_t *ctx, 04127 apr_pool_t *scratch_pool); 04128 04129 /** 04130 * Similar to svn_client_mergeinfo_log2(), but with @a source_start_revision 04131 * and @a source_end_revision always of kind @c svn_opt_revision_unspecified; 04132 * 04133 * @deprecated Provided for backwards compatibility with the 1.7 API. 04134 * @since New in 1.7. 04135 */ 04136 SVN_DEPRECATED 04137 svn_error_t * 04138 svn_client_mergeinfo_log(svn_boolean_t finding_merged, 04139 const char *target_path_or_url, 04140 const svn_opt_revision_t *target_peg_revision, 04141 const char *source_path_or_url, 04142 const svn_opt_revision_t *source_peg_revision, 04143 svn_log_entry_receiver_t receiver, 04144 void *receiver_baton, 04145 svn_boolean_t discover_changed_paths, 04146 svn_depth_t depth, 04147 const apr_array_header_t *revprops, 04148 svn_client_ctx_t *ctx, 04149 apr_pool_t *scratch_pool); 04150 04151 /** 04152 * Similar to svn_client_mergeinfo_log(), but finds only merged revisions 04153 * and always operates at @a depth #svn_depth_empty. 04154 * 04155 * @deprecated Provided for backwards compatibility with the 1.6 API. Use 04156 * svn_client_mergeinfo_log() instead. 04157 * @since New in 1.5. 04158 */ 04159 SVN_DEPRECATED 04160 svn_error_t * 04161 svn_client_mergeinfo_log_merged(const char *path_or_url, 04162 const svn_opt_revision_t *peg_revision, 04163 const char *merge_source_path_or_url, 04164 const svn_opt_revision_t *src_peg_revision, 04165 svn_log_entry_receiver_t receiver, 04166 void *receiver_baton, 04167 svn_boolean_t discover_changed_paths, 04168 const apr_array_header_t *revprops, 04169 svn_client_ctx_t *ctx, 04170 apr_pool_t *pool); 04171 04172 /** 04173 * Similar to svn_client_mergeinfo_log(), but finds only eligible revisions 04174 * and always operates at @a depth #svn_depth_empty. 04175 * 04176 * @deprecated Provided for backwards compatibility with the 1.6 API. Use 04177 * svn_client_mergeinfo_log() instead. 04178 * @since New in 1.5. 04179 */ 04180 SVN_DEPRECATED 04181 svn_error_t * 04182 svn_client_mergeinfo_log_eligible(const char *path_or_url, 04183 const svn_opt_revision_t *peg_revision, 04184 const char *merge_source_path_or_url, 04185 const svn_opt_revision_t *src_peg_revision, 04186 svn_log_entry_receiver_t receiver, 04187 void *receiver_baton, 04188 svn_boolean_t discover_changed_paths, 04189 const apr_array_header_t *revprops, 04190 svn_client_ctx_t *ctx, 04191 apr_pool_t *pool); 04192 04193 /** @} */ 04194 04195 /** 04196 * @defgroup Cleanup Cleanup an abnormally terminated working copy. 04197 * 04198 * @{ 04199 */ 04200 04201 /** Recursively vacuum a working copy directory @a dir_abspath, 04202 * removing unnecessary data. 04203 * 04204 * If @a include_externals is @c TRUE, recurse into externals and vacuum them 04205 * as well. 04206 * 04207 * If @a remove_unversioned_items is @c TRUE, remove unversioned items 04208 * in @a dir_abspath after successful working copy cleanup. 04209 * If @a remove_ignored_items is @c TRUE, remove ignored unversioned items 04210 * in @a dir_abspath after successful working copy cleanup. 04211 * 04212 * If @a fix_recorded_timestamps is @c TRUE, this function fixes recorded 04213 * timestamps for unmodified files in the working copy, reducing comparision 04214 * time on future checks. 04215 * 04216 * If @a vacuum_pristines is @c TRUE, and @a dir_abspath points to the working 04217 * copy root unreferenced files in the pristine store are removed. 04218 * 04219 * When asked to remove unversioned or ignored items, and the working copy 04220 * is already locked, return #SVN_ERR_WC_LOCKED. This prevents accidental 04221 * working copy corruption in case users run the cleanup operation to 04222 * remove unversioned items while another client is performing some other 04223 * operation on the working copy. 04224 * 04225 * If @a ctx->cancel_func is non-NULL, invoke it with @a 04226 * ctx->cancel_baton at various points during the operation. If it 04227 * returns an error (typically #SVN_ERR_CANCELLED), return that error 04228 * immediately. 04229 * 04230 * Use @a scratch_pool for any temporary allocations. 04231 * 04232 * @since New in 1.9. 04233 */ 04234 svn_error_t * 04235 svn_client_vacuum(const char *dir_abspath, 04236 svn_boolean_t remove_unversioned_items, 04237 svn_boolean_t remove_ignored_items, 04238 svn_boolean_t fix_recorded_timestamps, 04239 svn_boolean_t vacuum_pristines, 04240 svn_boolean_t include_externals, 04241 svn_client_ctx_t *ctx, 04242 apr_pool_t *scratch_pool); 04243 04244 04245 /** Recursively cleanup a working copy directory @a dir_abspath, finishing any 04246 * incomplete operations, removing lockfiles, etc. 04247 * 04248 * If @a break_locks is @c TRUE, existing working copy locks at or below @a 04249 * dir_abspath are broken, otherwise a normal write lock is obtained. 04250 * 04251 * If @a fix_recorded_timestamps is @c TRUE, this function fixes recorded 04252 * timestamps for unmodified files in the working copy, reducing comparision 04253 * time on future checks. 04254 * 04255 * If @a clear_dav_cache is @c TRUE, the caching of DAV information for older 04256 * mod_dav served repositories is cleared. This clearing invalidates some 04257 * cached information used for pre-HTTPv2 repositories. 04258 * 04259 * If @a vacuum_pristines is @c TRUE, and @a dir_abspath points to the working 04260 * copy root unreferenced files in the pristine store are removed. 04261 * 04262 * If @a include_externals is @c TRUE, recurse into externals and clean 04263 * them up as well. 04264 * 04265 * If @a ctx->cancel_func is non-NULL, invoke it with @a 04266 * ctx->cancel_baton at various points during the operation. If it 04267 * returns an error (typically #SVN_ERR_CANCELLED), return that error 04268 * immediately. 04269 * 04270 * Use @a scratch_pool for any temporary allocations. 04271 * 04272 * @since New in 1.9. 04273 */ 04274 svn_error_t * 04275 svn_client_cleanup2(const char *dir_abspath, 04276 svn_boolean_t break_locks, 04277 svn_boolean_t fix_recorded_timestamps, 04278 svn_boolean_t clear_dav_cache, 04279 svn_boolean_t vacuum_pristines, 04280 svn_boolean_t include_externals, 04281 svn_client_ctx_t *ctx, 04282 apr_pool_t *scratch_pool); 04283 04284 /** Like svn_client_cleanup2(), but no support for not breaking locks and 04285 * cleaning up externals and using a potentially non absolute path. 04286 * 04287 * @deprecated Provided for limited backwards compatibility with the 1.8 API. 04288 */ 04289 SVN_DEPRECATED 04290 svn_error_t * 04291 svn_client_cleanup(const char *dir, 04292 svn_client_ctx_t *ctx, 04293 apr_pool_t *scratch_pool); 04294 04295 04296 /** @} */ 04297 04298 /** 04299 * @defgroup Upgrade Upgrade a working copy. 04300 * 04301 * @{ 04302 */ 04303 04304 /** Recursively upgrade a working copy from any older format to the current 04305 * WC metadata storage format. @a wcroot_dir is the path to the WC root. 04306 * 04307 * Use @a scratch_pool for any temporary allocations. 04308 * 04309 * @since New in 1.7. 04310 */ 04311 svn_error_t * 04312 svn_client_upgrade(const char *wcroot_dir, 04313 svn_client_ctx_t *ctx, 04314 apr_pool_t *scratch_pool); 04315 04316 04317 /** @} */ 04318 04319 /** 04320 * @defgroup Relocate Switch a working copy to a different repository. 04321 * 04322 * @{ 04323 */ 04324 04325 /** 04326 * Recursively modify a working copy rooted at @a wcroot_dir, changing 04327 * any repository URLs that begin with @a from_prefix to begin with @a 04328 * to_prefix instead. 04329 * 04330 * @param wcroot_dir Working copy root directory 04331 * @param from_prefix Original URL 04332 * @param to_prefix New URL 04333 * @param ignore_externals If not set, recurse into external working 04334 * copies after relocating the primary working copy 04335 * @param ctx svn_client_ctx_t 04336 * @param pool The pool from which to perform memory allocations 04337 * 04338 * @since New in 1.7 04339 */ 04340 svn_error_t * 04341 svn_client_relocate2(const char *wcroot_dir, 04342 const char *from_prefix, 04343 const char *to_prefix, 04344 svn_boolean_t ignore_externals, 04345 svn_client_ctx_t *ctx, 04346 apr_pool_t *pool); 04347 04348 /** 04349 * Similar to svn_client_relocate2(), but with @a ignore_externals 04350 * always TRUE. 04351 * 04352 * @note As of the 1.7 API, @a dir is required to be a working copy 04353 * root directory, and @a recurse is required to be TRUE. 04354 * 04355 * @deprecated Provided for limited backwards compatibility with the 04356 * 1.6 API. 04357 */ 04358 SVN_DEPRECATED 04359 svn_error_t * 04360 svn_client_relocate(const char *dir, 04361 const char *from_prefix, 04362 const char *to_prefix, 04363 svn_boolean_t recurse, 04364 svn_client_ctx_t *ctx, 04365 apr_pool_t *pool); 04366 04367 /** @} */ 04368 04369 /** 04370 * @defgroup Revert Remove local changes in a repository. 04371 * 04372 * @{ 04373 */ 04374 04375 /** 04376 * Restore the pristine version of working copy @a paths, 04377 * effectively undoing any local mods. This means returning each 04378 * path's versioned status to 'unmodified' and changing its on-disk 04379 * state to match that. 04380 * 04381 * If an item was in a state of conflict, reverting also marks the 04382 * conflict as resolved. If there are conflict marker files attached 04383 * to the item, these are removed. 04384 * 04385 * @a paths is an array of (const char *) local WC paths. 04386 * 04387 * For each path in @a paths, revert it if it is a file. Else if it is 04388 * a directory, revert according to @a depth: 04389 * If @a depth is #svn_depth_empty, revert just 04390 * the directory; else if #svn_depth_files, revert the directory 04391 * and any files immediately under the directory; else if 04392 * #svn_depth_immediates, revert all of the preceding plus 04393 * immediate subdirectories; else if #svn_depth_infinity, 04394 * revert path and everything under it fully recursively. 04395 * 04396 * @a changelists is an array of <tt>const char *</tt> changelist 04397 * names, used as a restrictive filter on items reverted; that is, 04398 * don't revert any item unless it's a member of one of those 04399 * changelists. If @a changelists is empty (or altogether @c NULL), 04400 * no changelist filtering occurs. 04401 * 04402 * If @a clear_changelists is TRUE, then changelist information for the 04403 * paths is cleared while reverting. 04404 * 04405 * The @a metadata_only and @a added_keep_local options control the 04406 * extent of reverting. If @a metadata_only is TRUE, the working copy 04407 * files are untouched, but if there are conflict marker files attached 04408 * to these files these markers are removed. Otherwise, if 04409 * @a added_keep_local is TRUE, then all items are reverted except an 04410 * item that was scheduled as plain 'add' (not a copy) will not be 04411 * removed from the working copy. Otherwise, all items are reverted and 04412 * their on-disk state changed to match. 04413 * 04414 * If @a ctx->notify_func2 is non-NULL, then for each item reverted, 04415 * call @a ctx->notify_func2 with @a ctx->notify_baton2 and the path of 04416 * the reverted item. 04417 * 04418 * If an item specified for reversion is not under version control, 04419 * then do not error, just invoke @a ctx->notify_func2 with @a 04420 * ctx->notify_baton2, using notification code #svn_wc_notify_skip. 04421 * 04422 * @warning The 'revert' command intentionally and permanently loses 04423 * local modifications. 04424 * 04425 * @since New in 1.11. 04426 */ 04427 svn_error_t * 04428 svn_client_revert4(const apr_array_header_t *paths, 04429 svn_depth_t depth, 04430 const apr_array_header_t *changelists, 04431 svn_boolean_t clear_changelists, 04432 svn_boolean_t metadata_only, 04433 svn_boolean_t added_keep_local, 04434 svn_client_ctx_t *ctx, 04435 apr_pool_t *scratch_pool); 04436 04437 /** Similar to svn_client_revert4(), but with @a added_keep_local set to 04438 * TRUE. 04439 * 04440 * @since New in 1.9. 04441 * @deprecated Provided for backwards compatibility with the 1.10 API. 04442 */ 04443 SVN_DEPRECATED 04444 svn_error_t * 04445 svn_client_revert3(const apr_array_header_t *paths, 04446 svn_depth_t depth, 04447 const apr_array_header_t *changelists, 04448 svn_boolean_t clear_changelists, 04449 svn_boolean_t metadata_only, 04450 svn_client_ctx_t *ctx, 04451 apr_pool_t *pool); 04452 04453 /** Similar to svn_client_revert2, but with @a clear_changelists set to 04454 * FALSE and @a metadata_only set to FALSE. 04455 * 04456 * @since New in 1.5. 04457 * @deprecated Provided for backwards compatibility with the 1.8 API. 04458 */ 04459 SVN_DEPRECATED 04460 svn_error_t * 04461 svn_client_revert2(const apr_array_header_t *paths, 04462 svn_depth_t depth, 04463 const apr_array_header_t *changelists, 04464 svn_client_ctx_t *ctx, 04465 apr_pool_t *pool); 04466 04467 04468 /** 04469 * Similar to svn_client_revert2(), but with @a changelists passed as 04470 * @c NULL, and @a depth set according to @a recurse: if @a recurse is 04471 * TRUE, @a depth is #svn_depth_infinity, else if @a recurse is 04472 * FALSE, @a depth is #svn_depth_empty. 04473 * 04474 * @note Most APIs map @a recurse==FALSE to @a depth==svn_depth_files; 04475 * revert is deliberately different. 04476 * 04477 * @deprecated Provided for backwards compatibility with the 1.4 API. 04478 */ 04479 SVN_DEPRECATED 04480 svn_error_t * 04481 svn_client_revert(const apr_array_header_t *paths, 04482 svn_boolean_t recursive, 04483 svn_client_ctx_t *ctx, 04484 apr_pool_t *pool); 04485 04486 04487 /** @} */ 04488 04489 /** 04490 * @defgroup Conflicts Dealing with conflicted paths. 04491 * 04492 * @{ 04493 */ 04494 04495 /** 04496 * An opaque type which represents a conflicted node in the working copy. 04497 * 04498 * @since New in 1.10. 04499 */ 04500 typedef struct svn_client_conflict_t svn_client_conflict_t; 04501 04502 /** 04503 * An opaque type which represents a resolution option for a conflict. 04504 * 04505 * @since New in 1.10. 04506 */ 04507 typedef struct svn_client_conflict_option_t svn_client_conflict_option_t; 04508 04509 /** 04510 * A public enumeration of conflict option IDs. 04511 * 04512 * @since New in 1.10, unless noted otherwise. 04513 */ 04514 typedef enum svn_client_conflict_option_id_t { 04515 04516 /* Options for text and property conflicts. 04517 * These values intentionally mirror svn_wc_conflict_choice_t. */ 04518 svn_client_conflict_option_undefined = -1, /* for private use only */ 04519 svn_client_conflict_option_postpone = 0, 04520 svn_client_conflict_option_base_text, 04521 svn_client_conflict_option_incoming_text, /* "theirs-full" */ 04522 svn_client_conflict_option_working_text, /* "mine-full" */ 04523 svn_client_conflict_option_incoming_text_where_conflicted, 04524 svn_client_conflict_option_working_text_where_conflicted, 04525 svn_client_conflict_option_merged_text, 04526 svn_client_conflict_option_unspecified, 04527 /* Values derived from svn_wc_conflict_choice_t end here. */ 04528 04529 /* Tree conflict resolution options start here. */ 04530 04531 /* Accept current working copy state. */ 04532 svn_client_conflict_option_accept_current_wc_state, 04533 04534 /* Options for local move vs incoming edit on update. */ 04535 svn_client_conflict_option_update_move_destination, 04536 04537 /* Options for local delete/replace vs incoming edit on update. */ 04538 svn_client_conflict_option_update_any_moved_away_children, 04539 04540 /* Options for incoming add vs local add or obstruction. */ 04541 svn_client_conflict_option_incoming_add_ignore, 04542 04543 /* Options for incoming file add vs local file add or obstruction. */ 04544 svn_client_conflict_option_incoming_added_file_text_merge, 04545 svn_client_conflict_option_incoming_added_file_replace_and_merge, 04546 04547 /* Options for incoming dir add vs local dir add or obstruction. */ 04548 svn_client_conflict_option_incoming_added_dir_merge, 04549 svn_client_conflict_option_incoming_added_dir_replace, 04550 svn_client_conflict_option_incoming_added_dir_replace_and_merge, 04551 04552 /* Options for incoming delete vs any */ 04553 svn_client_conflict_option_incoming_delete_ignore, 04554 svn_client_conflict_option_incoming_delete_accept, 04555 04556 /* Options for incoming move vs local edit */ 04557 svn_client_conflict_option_incoming_move_file_text_merge, 04558 svn_client_conflict_option_incoming_move_dir_merge, 04559 04560 /* Options for local move vs incoming edit on merge. */ 04561 svn_client_conflict_option_local_move_file_text_merge, 04562 svn_client_conflict_option_local_move_dir_merge, /**< @since New in 1.11. */ 04563 04564 /* Options for local missing vs incoming edit on merge. */ 04565 svn_client_conflict_option_sibling_move_file_text_merge, /**< @since New in 1.11. */ 04566 svn_client_conflict_option_sibling_move_dir_merge, /**< @since New in 1.11. */ 04567 04568 } svn_client_conflict_option_id_t; 04569 04570 /** 04571 * Set a merged property value on @a option to @a merged_propval. 04572 * 04573 * Setting the merged value is required before resolving the property 04574 * conflict using an option with ID svn_client_conflict_option_merged_text. 04575 * 04576 * The contents of @a merged_propval are not copied, so the storage it 04577 * points to needs to remain valid until svn_client_conflict_prop_resolve() 04578 * has been called with @a option. 04579 * 04580 * @since New in 1.10. 04581 */ 04582 void 04583 svn_client_conflict_option_set_merged_propval( 04584 svn_client_conflict_option_t *option, 04585 const svn_string_t *merged_propval); 04586 04587 /** 04588 * Get a list of possible repository paths which can be applied to @a option. 04589 * 04590 * In some situations, there can be multiple possible destinations for a move. 04591 * One such situation is where a file was copied and moved in the same revision: 04592 * svn cp a b; svn mv a c; svn commit 04593 * When this move is merged elsewhere, both b and c will appear as valid move 04594 * destinations to the conflict resolver. To resolve such ambiguity, the client 04595 * may call this function to obtain a list of possible destinations the user 04596 * may choose from. 04597 * 04598 * @a *possible_moved_to_repos_relpaths is set to NULL if the @a option does 04599 * not support multiple move targets. API users may assume that only one option 04600 * among those which can be applied to a conflict supports move targets. 04601 * 04602 * The array is allocated in @a result_pool and will have "const char *" 04603 * elements pointing to strings also allocated in @a result_pool. 04604 * All paths are relpaths, and relative to the repository root. 04605 * 04606 * @see svn_client_conflict_option_set_moved_to_repos_relpath2() 04607 * @since New in 1.11. 04608 */ 04609 svn_error_t * 04610 svn_client_conflict_option_get_moved_to_repos_relpath_candidates2( 04611 apr_array_header_t **possible_moved_to_repos_relpaths, 04612 svn_client_conflict_option_t *option, 04613 apr_pool_t *result_pool, 04614 apr_pool_t *scratch_pool); 04615 04616 /** 04617 * Get a list of possible repository paths which can be applied to the 04618 * svn_client_conflict_option_incoming_move_file_text_merge, or the 04619 * svn_client_conflict_option_incoming_move_dir_merge resolution @a option. 04620 * 04621 * In SVN 1.10, if a different option is passed in, this function will 04622 * raise an assertion failure. Otherwise this function behaves just like 04623 * svn_client_conflict_option_get_moved_to_repos_relpath_candidates2(). 04624 * 04625 * @since New in 1.10. 04626 * @deprecated use svn_client_conflict_option_get_moved_to_repos_relpath_candidates2() 04627 */ 04628 svn_error_t * 04629 svn_client_conflict_option_get_moved_to_repos_relpath_candidates( 04630 apr_array_header_t **possible_moved_to_repos_relpaths, 04631 svn_client_conflict_option_t *option, 04632 apr_pool_t *result_pool, 04633 apr_pool_t *scratch_pool); 04634 04635 /** 04636 * Set the preferred moved target repository path. If @a option is not 04637 * applicable to a moved target repository path, do nothing. 04638 * 04639 * @a preferred_move_target_idx must be a valid index into the list returned 04640 * by svn_client_conflict_option_get_moved_to_repos_relpath_candidates(). 04641 * 04642 * This function can be called multiple times. 04643 * It affects the output of svn_client_conflict_tree_get_description() and 04644 * svn_client_conflict_option_get_description(). Call these functions again 04645 * to get updated descriptions containing the newly selected move target. 04646 * 04647 * @since New in 1.11. 04648 */ 04649 svn_error_t * 04650 svn_client_conflict_option_set_moved_to_repos_relpath2( 04651 svn_client_conflict_option_t *option, 04652 int preferred_move_target_idx, 04653 svn_client_ctx_t *ctx, 04654 apr_pool_t *scratch_pool); 04655 04656 /** 04657 * Like svn_client_conflict_option_set_moved_to_repos_relpath2(), except 04658 * that in SVN 1.10 it raises an assertion failure if an option other 04659 * than svn_client_conflict_option_incoming_move_file_text_merge or 04660 * svn_client_conflict_option_incoming_move_dir_merge is passed. 04661 * 04662 * @since New in 1.10. 04663 * @deprecated use svn_client_conflict_option_set_moved_to_repos_relpath2() 04664 */ 04665 svn_error_t * 04666 svn_client_conflict_option_set_moved_to_repos_relpath( 04667 svn_client_conflict_option_t *option, 04668 int preferred_move_target_idx, 04669 svn_client_ctx_t *ctx, 04670 apr_pool_t *scratch_pool); 04671 04672 /** 04673 * Get a list of possible moved-to abspaths in the working copy which can be 04674 * applied to @a option. 04675 * 04676 * All working copy paths in the returned list correspond to one repository 04677 * path which is be one of the possible destinations of a move operation. 04678 * More than one repository-side move target candidate may exist; call 04679 * svn_client_conflict_option_get_moved_to_repos_relpath_candidates() before 04680 * calling this function to let the user select a repository path first. 04681 * Otherwise, one of the repository-side paths will be selected internally. 04682 * 04683 * @a *possible_moved_to_abspaths is set to NULL if the @a option does not 04684 * support multiple move targets. API users may assume that only one option 04685 * among those which can be applied to a conflict supports move targets. 04686 * 04687 * If no possible moved-to paths can be found, return an empty array. 04688 * This doesn't mean that no move happened in the repository. It is possible 04689 * that the move destination is outside the scope of the current working copy, 04690 * for example, in which case the conflict must be resolved in some other way. 04691 * 04692 * @see svn_client_conflict_option_set_moved_to_abspath2() 04693 * @since New in 1.11. 04694 */ 04695 svn_error_t * 04696 svn_client_conflict_option_get_moved_to_abspath_candidates2( 04697 apr_array_header_t **possible_moved_to_abspaths, 04698 svn_client_conflict_option_t *option, 04699 apr_pool_t *result_pool, 04700 apr_pool_t *scratch_pool); 04701 04702 /** 04703 * Get a list of possible moved-to abspaths in the working copy which can be 04704 * svn_client_conflict_option_incoming_move_file_text_merge, or the 04705 * svn_client_conflict_option_incoming_move_dir_merge resolution @a option. 04706 * 04707 * In SVN 1.10, if a different option is passed in, this function will 04708 * raise an assertion failure. Otherwise this function behaves just like 04709 * svn_client_conflict_option_get_moved_to_abspath_candidates2(). 04710 * 04711 * @since New in 1.10. 04712 * @deprecated use svn_client_conflict_option_get_moved_to_abspath_candidates2() 04713 */ 04714 svn_error_t * 04715 svn_client_conflict_option_get_moved_to_abspath_candidates( 04716 apr_array_header_t **possible_moved_to_abspaths, 04717 svn_client_conflict_option_t *option, 04718 apr_pool_t *result_pool, 04719 apr_pool_t *scratch_pool); 04720 04721 /** 04722 * Set the preferred moved target working copy path. If @a option is not 04723 * applicable to a moved target working copy path, do nothing. 04724 * 04725 * @a preferred_move_target_idx must be a valid index into the list 04726 * returned by svn_client_conflict_option_get_moved_to_abspath_candidates2(). 04727 * 04728 * This function can be called multiple times. 04729 * It affects the output of svn_client_conflict_tree_get_description() and 04730 * svn_client_conflict_option_get_description(). Call these functions again 04731 * to get updated descriptions containing the newly selected move target. 04732 * 04733 * @since New in 1.11. 04734 */ 04735 svn_error_t * 04736 svn_client_conflict_option_set_moved_to_abspath2( 04737 svn_client_conflict_option_t *option, 04738 int preferred_move_target_idx, 04739 svn_client_ctx_t *ctx, 04740 apr_pool_t *scratch_pool); 04741 04742 /** 04743 * Like svn_client_conflict_option_set_moved_to_abspath2(), except that 04744 * in SVN 1.10 this function raises an assertion failure if an option 04745 * other than svn_client_conflict_option_incoming_move_file_text_merge or 04746 * svn_client_conflict_option_incoming_move_dir_merge is passed. 04747 * 04748 * @since New in 1.10. 04749 * @deprecated use svn_client_conflict_option_set_moved_to_abspath2() 04750 */ 04751 svn_error_t * 04752 svn_client_conflict_option_set_moved_to_abspath( 04753 svn_client_conflict_option_t *option, 04754 int preferred_move_target_idx, 04755 svn_client_ctx_t *ctx, 04756 apr_pool_t *scratch_pool); 04757 04758 /** 04759 * Given an @a option_id, try to find the corresponding option in @a options, 04760 * which is an array of svn_client_conflict_option_t * elements. 04761 * 04762 * Return NULL if no corresponding option can be be found. 04763 * 04764 * @since New in 1.10. 04765 */ 04766 svn_client_conflict_option_t * 04767 svn_client_conflict_option_find_by_id( 04768 apr_array_header_t *options, 04769 svn_client_conflict_option_id_t option_id); 04770 04771 /** 04772 * Return a conflict for the conflicted path @a local_abspath. 04773 * 04774 * @since New in 1.10. 04775 */ 04776 svn_error_t * 04777 svn_client_conflict_get(svn_client_conflict_t **conflict, 04778 const char *local_abspath, 04779 svn_client_ctx_t *ctx, 04780 apr_pool_t *result_pool, 04781 apr_pool_t *scratch_pool); 04782 04783 /** 04784 * Callback for svn_client_conflict_conflict_walk(); 04785 * 04786 * The lifetime of @a conflict is limited. Its allocation in 04787 * memory will not persist beyond this callback's execution. 04788 * 04789 * @since New in 1.10. 04790 */ 04791 typedef svn_error_t *(*svn_client_conflict_walk_func_t)( 04792 void *baton, 04793 svn_client_conflict_t *conflict, 04794 apr_pool_t *scratch_pool); 04795 04796 /** 04797 * Walk all conflicts within the specified @a depth of @a local_abspath. 04798 * Pass each conflict found during the walk to the @a conflict_walk_func 04799 * callback, along with @a conflict_walk_func_baton. 04800 * Use cancellation and notification support provided by client context @a ctx. 04801 * 04802 * This callback may choose to resolve the conflict. If the act of resolving 04803 * a conflict creates new conflicts within the walked working copy (as might 04804 * be the case for some tree conflicts), the callback will be invoked for each 04805 * such new conflict as well. 04806 * 04807 * @since New in 1.10. 04808 */ 04809 svn_error_t * 04810 svn_client_conflict_walk(const char *local_abspath, 04811 svn_depth_t depth, 04812 svn_client_conflict_walk_func_t conflict_walk_func, 04813 void *conflict_walk_func_baton, 04814 svn_client_ctx_t *ctx, 04815 apr_pool_t *scratch_pool); 04816 04817 /** 04818 * Indicate the types of conflicts present on the working copy node 04819 * described by @a conflict. Any output argument may be @c NULL if 04820 * the caller is not interested in the status of a particular type. 04821 * 04822 * The returned @a *props_conflicted array is allocated in @a result_pool. 04823 * It contains the names of conflicted properties. If no property conflict 04824 * exists, the array will contain no elements. 04825 * 04826 * @since New in 1.10. 04827 */ 04828 svn_error_t * 04829 svn_client_conflict_get_conflicted(svn_boolean_t *text_conflicted, 04830 apr_array_header_t **props_conflicted, 04831 svn_boolean_t *tree_conflicted, 04832 svn_client_conflict_t *conflict, 04833 apr_pool_t *result_pool, 04834 apr_pool_t *scratch_pool); 04835 04836 /** 04837 * Return a textual human-readable description of the property conflict 04838 * described by @a conflict, allocated in @a result_pool. The description 04839 * is encoded in UTF-8 and may contain multiple lines separated by 04840 * @c APR_EOL_STR. The last line is not terminated by a newline. 04841 * 04842 * Additionally, the description may be localized to the language used 04843 * by the current locale. 04844 * 04845 * @since New in 1.10. 04846 */ 04847 svn_error_t * 04848 svn_client_conflict_prop_get_description(const char **description, 04849 svn_client_conflict_t *conflict, 04850 apr_pool_t *result_pool, 04851 apr_pool_t *scratch_pool); 04852 04853 /** 04854 * Return a textual human-readable description of the tree conflict 04855 * described by @a conflict, allocated in @a result_pool. The description 04856 * is encoded in UTF-8 and may contain multiple lines separated by 04857 * @c APR_EOL_STR. The last line is not terminated by a newline. 04858 * 04859 * Additionally, the description may be localized to the language used 04860 * by the current locale. 04861 * 04862 * While client implementors are free to enhance descriptions by adding 04863 * additional information to the text, or break up very long lines for 04864 * formatting purposes, there is no syntax defined for descriptions, and 04865 * implementors should not rely on any particular parts of descriptions 04866 * to remain stable over time, apart from what is stated below. 04867 * Descriptions may or may not form complete sentences. They may contain 04868 * paths relative to the repository root; such paths always start with "^/", 04869 * and end with either a peg revision (e.g. "@100") or a colon followed by 04870 * a range of revisions (as in svn:mergeinfo, e.g. ":100-200"). 04871 * Paths may appear on a line of their own to avoid overlong lines. 04872 * Any revision numbers mentioned elsewhere in the description are 04873 * prefixed with the letter 'r' (e.g. "r99"). 04874 * 04875 * The description has two parts: One part describes the "incoming change" 04876 * applied by an update, merge, or switch operation. The other part 04877 * describes the "local change" which occurred in the working copy or 04878 * perhaps in the history of a merge target branch. 04879 * Both parts are provided independently to allow for some flexibility 04880 * when displaying the description. As a convention, displaying the 04881 * "incoming change" first and the "local change" second is recommended. 04882 * 04883 * By default, the description is based only on information available in 04884 * the working copy. If svn_client_conflict_tree_get_details() was already 04885 * called for @a conflict, the description might also contain useful 04886 * information obtained from the repository and provide for a much better 04887 * user experience. 04888 * 04889 * @since New in 1.10. 04890 */ 04891 svn_error_t * 04892 svn_client_conflict_tree_get_description( 04893 const char **incoming_change_description, 04894 const char **local_change_description, 04895 svn_client_conflict_t *conflict, 04896 svn_client_ctx_t *ctx, 04897 apr_pool_t *result_pool, 04898 apr_pool_t *scratch_pool); 04899 04900 /** 04901 * Set @a *options to an array of pointers to svn_client_conflict_option_t 04902 * objects applicable to text conflicts described by @a conflict. 04903 * 04904 * @since New in 1.10. 04905 */ 04906 svn_error_t * 04907 svn_client_conflict_text_get_resolution_options(apr_array_header_t **options, 04908 svn_client_conflict_t *conflict, 04909 svn_client_ctx_t *ctx, 04910 apr_pool_t *result_pool, 04911 apr_pool_t *scratch_pool); 04912 04913 /** 04914 * Set @a *options to an array of pointers to svn_client_conflict_option_t 04915 * objects applicable to property conflicts described by @a conflict. 04916 * 04917 * @since New in 1.10. 04918 */ 04919 svn_error_t * 04920 svn_client_conflict_prop_get_resolution_options(apr_array_header_t **options, 04921 svn_client_conflict_t *conflict, 04922 svn_client_ctx_t *ctx, 04923 apr_pool_t *result_pool, 04924 apr_pool_t *scratch_pool); 04925 04926 /** 04927 * Set @a *options to an array of pointers to svn_client_conflict_option_t 04928 * objects applicable to the tree conflict described by @a conflict. 04929 * 04930 * By default, the list of options is based only on information available in 04931 * the working copy. If svn_client_conflict_tree_get_details() was already 04932 * called for @a conflict, a more useful list of options might be returned. 04933 * 04934 * @since New in 1.10. 04935 */ 04936 svn_error_t * 04937 svn_client_conflict_tree_get_resolution_options(apr_array_header_t **options, 04938 svn_client_conflict_t *conflict, 04939 svn_client_ctx_t *ctx, 04940 apr_pool_t *result_pool, 04941 apr_pool_t *scratch_pool); 04942 04943 /** 04944 * Find more information about the tree conflict represented by @a conflict. 04945 * 04946 * A call to svn_client_conflict_tree_get_description() may yield much better 04947 * results after this function has been called. 04948 * 04949 * A call to svn_client_conflict_tree_get_resolution_options() may provide 04950 * more useful resolution options if this function has been called. 04951 * 04952 * This function may contact the repository. Use the authentication baton 04953 * cached in @a ctx for authentication if contacting the repository. 04954 * 04955 * @since New in 1.10. 04956 */ 04957 svn_error_t * 04958 svn_client_conflict_tree_get_details(svn_client_conflict_t *conflict, 04959 svn_client_ctx_t *ctx, 04960 apr_pool_t *scratch_pool); 04961 04962 /** 04963 * Return an ID for @a option. This ID can be used by callers to associate 04964 * arbitrary data with a particular conflict resolution option. 04965 * 04966 * The ID of a particular resolution option will never change in future 04967 * revisions of this API. 04968 * 04969 * @since New in 1.10. 04970 */ 04971 svn_client_conflict_option_id_t 04972 svn_client_conflict_option_get_id(svn_client_conflict_option_t *option); 04973 04974 /** 04975 * Return a textual human-readable label of @a option, allocated in 04976 * @a result_pool. The label is encoded in UTF-8 and usually 04977 * contains up to three words. 04978 * 04979 * Additionally, the label may be localized to the language used 04980 * by the current locale. 04981 * 04982 * @since New in 1.10. 04983 */ 04984 const char * 04985 svn_client_conflict_option_get_label(svn_client_conflict_option_t *option, 04986 apr_pool_t *result_pool); 04987 04988 /** 04989 * Return a textual human-readable description of @a option, allocated in 04990 * @a result_pool. The description is encoded in UTF-8 and may contain 04991 * multiple lines separated by @c APR_EOL_STR. 04992 * 04993 * Additionally, the description may be localized to the language used 04994 * by the current locale. 04995 * 04996 * @since New in 1.10. 04997 */ 04998 const char * 04999 svn_client_conflict_option_get_description(svn_client_conflict_option_t *option, 05000 apr_pool_t *result_pool); 05001 05002 /** 05003 * Return the ID of the recommended resolution option. If no specific option 05004 * is recommended, return @c svn_client_conflict_option_unspecified; 05005 * 05006 * Client implementations which aim to avoid excessive interactive prompting 05007 * may wish to try a recommended resolution option before falling back to 05008 * asking the user which option to use. 05009 * 05010 * Conflict resolution with a recommended option is not guaranteed to succeed. 05011 * Clients should check for errors when trying to resolve a conflict and fall 05012 * back to other options and/or interactive prompting when the recommended 05013 * option fails to resolve a conflict. 05014 * 05015 * If @a conflict is a tree conflict, svn_client_conflict_tree_get_details() 05016 * should be called before this function to allow for useful recommendations. 05017 * 05018 * @since New in 1.10. 05019 */ 05020 svn_client_conflict_option_id_t 05021 svn_client_conflict_get_recommended_option_id(svn_client_conflict_t *conflict); 05022 05023 /** 05024 * Return the absolute path to the conflicted working copy node described 05025 * by @a conflict. 05026 * 05027 * @since New in 1.10. 05028 */ 05029 const char * 05030 svn_client_conflict_get_local_abspath(svn_client_conflict_t *conflict); 05031 05032 /** 05033 * Return the operation during which the conflict described by @a 05034 * conflict was recorded. 05035 * 05036 * @since New in 1.10. 05037 */ 05038 svn_wc_operation_t 05039 svn_client_conflict_get_operation(svn_client_conflict_t *conflict); 05040 05041 /** 05042 * Return the action an update, switch, or merge operation attempted to 05043 * perform on the working copy node described by @a conflict. 05044 * 05045 * @since New in 1.10. 05046 */ 05047 svn_wc_conflict_action_t 05048 svn_client_conflict_get_incoming_change(svn_client_conflict_t *conflict); 05049 05050 /** 05051 * Return the reason why the attempted action performed by an update, switch, 05052 * or merge operation conflicted with the state of the node in the working copy. 05053 * 05054 * During update and switch operations this local change is part of uncommitted 05055 * modifications in the working copy. During merge operations it may 05056 * additionally be part of the history of the merge target branch, anywhere 05057 * between the common ancestor revision and the working copy revision. 05058 * 05059 * @since New in 1.10. 05060 */ 05061 svn_wc_conflict_reason_t 05062 svn_client_conflict_get_local_change(svn_client_conflict_t *conflict); 05063 05064 /** 05065 * Return information about the repository associated with @a conflict. 05066 * In case of a foreign-repository merge this will differ from the 05067 * repository information associated with the merge target working copy. 05068 * 05069 * @since New in 1.10. 05070 */ 05071 svn_error_t * 05072 svn_client_conflict_get_repos_info(const char **repos_root_url, 05073 const char **repos_uuid, 05074 svn_client_conflict_t *conflict, 05075 apr_pool_t *result_pool, 05076 apr_pool_t *scratch_pool); 05077 05078 /** 05079 * Return the repository-relative location and the node kind of the incoming 05080 * old version of the conflicted node described by @a conflict. 05081 * 05082 * If the repository-relative path is not available, the @a 05083 * *incoming_old_repos_relpath will be set to @c NULL, 05084 * 05085 * If the peg revision is not available, @a *incoming_old_regrev will be 05086 * set to SVN_INVALID_REVNUM. 05087 * 05088 * If the node kind is not available or if the node does not exist at the 05089 * specified path and revision, @a *incoming_old_node_kind will be set to 05090 * svn_node_none. 05091 * ### Should return svn_node_unkown if not available? 05092 * 05093 * Any output parameter may be set to @c NULL by the caller to indicate that 05094 * a particular piece of information should not be returned. 05095 * 05096 * In case of tree conflicts, this "path@revision" does not necessarily exist 05097 * in the repository, and it does not necessarily represent the incoming 05098 * change which is responsible for the occurance of the tree conflict. 05099 * The responsible incoming change is generally located somewhere between 05100 * the old and new incoming versions. 05101 * 05102 * @since New in 1.10. 05103 */ 05104 svn_error_t * 05105 svn_client_conflict_get_incoming_old_repos_location( 05106 const char **incoming_old_repos_relpath, 05107 svn_revnum_t *incoming_old_regrev, 05108 svn_node_kind_t *incoming_old_node_kind, 05109 svn_client_conflict_t *conflict, 05110 apr_pool_t *result_pool, 05111 apr_pool_t *scratch_pool); 05112 05113 /** 05114 * Like svn_client_conflict_get_incoming_old_repos_location(), expect this 05115 * function returns the same data for the incoming new version. 05116 * 05117 * The same note about tree conflicts applies. 05118 * 05119 * @since New in 1.10. 05120 */ 05121 svn_error_t * 05122 svn_client_conflict_get_incoming_new_repos_location( 05123 const char **incoming_new_repos_relpath, 05124 svn_revnum_t *incoming_new_regrev, 05125 svn_node_kind_t *incoming_new_node_kind, 05126 svn_client_conflict_t *conflict, 05127 apr_pool_t *result_pool, 05128 apr_pool_t *scratch_pool); 05129 05130 /** 05131 * Return the node kind of the tree conflict victim described by @a conflict. 05132 * The victim is the local node in the working copy which was affected by the 05133 * tree conflict at the time the conflict was raised. 05134 * 05135 * @since New in 1.10. 05136 */ 05137 svn_node_kind_t 05138 svn_client_conflict_tree_get_victim_node_kind(svn_client_conflict_t *conflict); 05139 05140 /** 05141 * Resolve a tree @a conflict using resolution option @a option. 05142 * 05143 * May raise an error in case the tree conflict cannot be resolved yet, for 05144 * instance @c SVN_ERR_WC_OBSTRUCTED_UPDATE, @c SVN_ERR_WC_FOUND_CONFLICT, 05145 * or @c SVN_ERR_WC_CONFLICT_RESOLVER_FAILUE. 05146 * This may happen when other tree conflicts, or unversioned obstructions, 05147 * block the resolution of this tree conflict. In such a case the other 05148 * conflicts should be resolved first and resolution of this conflict should 05149 * be attempted again later. 05150 * 05151 * @since New in 1.10. 05152 */ 05153 svn_error_t * 05154 svn_client_conflict_tree_resolve(svn_client_conflict_t *conflict, 05155 svn_client_conflict_option_t *option, 05156 svn_client_ctx_t *ctx, 05157 apr_pool_t *scratch_pool); 05158 05159 /** 05160 * Like svn_client_conflict_tree_resolve(), except that it identifies 05161 * the desired resolution option by ID @a option_id. 05162 * 05163 * If the provided @a option_id is the ID of an option which resolves 05164 * @a conflict, try to resolve the tree conflict using that option. 05165 * Else, return @c SVN_ERR_CLIENT_CONFLICT_OPTION_NOT_APPLICABLE. 05166 * 05167 * @since New in 1.10. 05168 */ 05169 svn_error_t * 05170 svn_client_conflict_tree_resolve_by_id( 05171 svn_client_conflict_t *conflict, 05172 svn_client_conflict_option_id_t option_id, 05173 svn_client_ctx_t *ctx, 05174 apr_pool_t *scratch_pool); 05175 05176 /** 05177 * Return the ID of the option this tree @a conflict has been resolved to. 05178 * If the conflict has not been resolved yet, then return 05179 * @c svn_client_conflict_option_unspecified. 05180 * 05181 * @since New in 1.10. 05182 */ 05183 svn_client_conflict_option_id_t 05184 svn_client_conflict_tree_get_resolution(svn_client_conflict_t *conflict); 05185 05186 /** 05187 * Return the path to the legacy property conflicts reject file 05188 * for the property conflicts represented by @a conflict. 05189 * 05190 * This function exists for backwards compatibility only and should not be 05191 * used in new code. 05192 * 05193 * @since New in 1.10. 05194 */ 05195 const char * 05196 svn_client_conflict_prop_get_reject_abspath(svn_client_conflict_t *conflict); 05197 05198 /** 05199 * Return the set of property values involved in the conflict of property 05200 * PROPNAME described by @a conflict. If a property value is unavailable the 05201 * corresponding output argument is set to @c NULL. 05202 * 05203 * A 3-way diff of these property values can be generated with 05204 * svn_diff_mem_string_diff3(). A merged version with conflict 05205 * markers can be generated with svn_diff_mem_string_output_merge3(). 05206 * 05207 * @since New in 1.10. 05208 */ 05209 svn_error_t * 05210 svn_client_conflict_prop_get_propvals(const svn_string_t **base_propval, 05211 const svn_string_t **working_propval, 05212 const svn_string_t **incoming_old_propval, 05213 const svn_string_t **incoming_new_propval, 05214 svn_client_conflict_t *conflict, 05215 const char *propname, 05216 apr_pool_t *result_pool); 05217 05218 /** 05219 * Resolve a property @a conflict in property @a propname using resolution 05220 * option @a option. To resolve all properties to the same option at once, 05221 * set @a propname to the empty string "". 05222 * 05223 * @since New in 1.10. 05224 */ 05225 svn_error_t * 05226 svn_client_conflict_prop_resolve(svn_client_conflict_t *conflict, 05227 const char *propname, 05228 svn_client_conflict_option_t *option, 05229 svn_client_ctx_t *ctx, 05230 apr_pool_t *scratch_pool); 05231 /** 05232 * If the provided @a option_id is the ID of an option which resolves 05233 * @a conflict, resolve the property conflict in property @a propname 05234 * using that option. 05235 * Else, return @c SVN_ERR_CLIENT_CONFLICT_OPTION_NOT_APPLICABLE. 05236 * 05237 * @since New in 1.10. 05238 */ 05239 svn_error_t * 05240 svn_client_conflict_prop_resolve_by_id( 05241 svn_client_conflict_t *conflict, 05242 const char *propname, 05243 svn_client_conflict_option_id_t option_id, 05244 svn_client_ctx_t *ctx, 05245 apr_pool_t *scratch_pool); 05246 05247 /** 05248 * Return the ID of the option this property @a conflict in property 05249 * @a propname has been resolved to. 05250 * If the conflict has not been resolved yet, then return 05251 * @c svn_client_conflict_option_unspecified. 05252 * 05253 * @since New in 1.10. 05254 */ 05255 svn_client_conflict_option_id_t 05256 svn_client_conflict_prop_get_resolution(svn_client_conflict_t *conflict, 05257 const char *propname); 05258 05259 /** 05260 * Return the MIME-type of the working version of the text-conflicted file 05261 * described by @a conflict. 05262 * 05263 * ### Really needed? What about base/incoming_old/incoming_new values? 05264 * @since: New in 1.10. 05265 */ 05266 const char * 05267 svn_client_conflict_text_get_mime_type(svn_client_conflict_t *conflict); 05268 05269 /** 05270 * Return absolute paths to the versions of the text-conflicted file 05271 * described by @a conflict. 05272 * 05273 * If a particular content is not available, it is set to @c NULL. 05274 * 05275 * ### Should this be returning svn_stream_t instead of paths? 05276 * @since: New in 1.10. 05277 */ 05278 svn_error_t * 05279 svn_client_conflict_text_get_contents(const char **base_abspath, 05280 const char **working_abspath, 05281 const char **incoming_old_abspath, 05282 const char **incoming_new_abspath, 05283 svn_client_conflict_t *conflict, 05284 apr_pool_t *result_pool, 05285 apr_pool_t *scratch_pool); 05286 05287 /** 05288 * Resolve a text @a conflict using resolution option @a option. 05289 * 05290 * @since New in 1.10. 05291 */ 05292 svn_error_t * 05293 svn_client_conflict_text_resolve(svn_client_conflict_t *conflict, 05294 svn_client_conflict_option_t *option, 05295 svn_client_ctx_t *ctx, 05296 apr_pool_t *scratch_pool); 05297 05298 /** 05299 * If the provided @a option_id is the ID of an option which resolves 05300 * @a conflict, resolve the text conflict using that option. 05301 * Else, return @c SVN_ERR_CLIENT_CONFLICT_OPTION_NOT_APPLICABLE. 05302 * 05303 * @since New in 1.10. 05304 */ 05305 svn_error_t * 05306 svn_client_conflict_text_resolve_by_id( 05307 svn_client_conflict_t *conflict, 05308 svn_client_conflict_option_id_t option_id, 05309 svn_client_ctx_t *ctx, 05310 apr_pool_t *scratch_pool); 05311 05312 /** 05313 * Return the ID of the option this text @a conflict has been resolved to. 05314 * If the conflict has not been resolved yet, then return 05315 * @c svn_client_conflict_option_unspecified. 05316 * 05317 * @since New in 1.10. 05318 */ 05319 svn_client_conflict_option_id_t 05320 svn_client_conflict_text_get_resolution(svn_client_conflict_t *conflict); 05321 05322 /** @} */ 05323 05324 /** 05325 * @defgroup Resolved Mark conflicted paths as resolved. 05326 * 05327 * @{ 05328 */ 05329 05330 /** 05331 * Similar to svn_client_resolve(), but without automatic conflict 05332 * resolution support. 05333 * 05334 * @deprecated Provided for backward compatibility with the 1.4 API. 05335 * Use svn_client_resolve() with @a conflict_choice == @c 05336 * svn_wc_conflict_choose_merged instead. 05337 */ 05338 SVN_DEPRECATED 05339 svn_error_t * 05340 svn_client_resolved(const char *path, 05341 svn_boolean_t recursive, 05342 svn_client_ctx_t *ctx, 05343 apr_pool_t *pool); 05344 05345 /** Perform automatic conflict resolution on a working copy @a path. 05346 * 05347 * If @a conflict_choice is 05348 * 05349 * - #svn_wc_conflict_choose_base: 05350 * resolve the conflict with the old file contents 05351 * 05352 * - #svn_wc_conflict_choose_mine_full: 05353 * use the original working contents 05354 * 05355 * - #svn_wc_conflict_choose_theirs_full: 05356 * use the new contents 05357 * 05358 * - #svn_wc_conflict_choose_merged: 05359 * don't change the contents at all, just remove the conflict 05360 * status, which is the pre-1.5 behavior. 05361 * 05362 * - #svn_wc_conflict_choose_theirs_conflict 05363 * ###... 05364 * 05365 * - #svn_wc_conflict_choose_mine_conflict 05366 * ###... 05367 * 05368 * - svn_wc_conflict_choose_unspecified 05369 * invoke @a ctx->conflict_func2 with @a ctx->conflict_baton2 to obtain 05370 * a resolution decision for each conflict. This can be used to 05371 * implement interactive conflict resolution but is NOT RECOMMENDED for 05372 * new code. To perform conflict resolution based on interactive user 05373 * input on a per-conflict basis, use svn_client_conflict_text_resolve(), 05374 * svn_client_conflict_prop_resolve(), and 05375 * svn_client_conflict_tree_resolve() instead of svn_client_resolve(). 05376 * 05377 * #svn_wc_conflict_choose_theirs_conflict and 05378 * #svn_wc_conflict_choose_mine_conflict are not legal for binary 05379 * files or properties. 05380 * 05381 * If @a path is not in a state of conflict to begin with, do nothing. 05382 * If @a path's conflict state is removed and @a ctx->notify_func2 is non-NULL, 05383 * call @a ctx->notify_func2 with @a ctx->notify_baton2 and @a path. 05384 * ### with what notification parameters? 05385 * 05386 * If @a depth is #svn_depth_empty, act only on @a path; if 05387 * #svn_depth_files, resolve @a path and its conflicted file 05388 * children (if any); if #svn_depth_immediates, resolve @a path and 05389 * all its immediate conflicted children (both files and directories, 05390 * if any); if #svn_depth_infinity, resolve @a path and every 05391 * conflicted file or directory anywhere beneath it. 05392 * 05393 * Note that this operation will try to lock the parent directory of 05394 * @a path in order to be able to resolve tree-conflicts on @a path. 05395 * 05396 * @since New in 1.5. 05397 */ 05398 svn_error_t * 05399 svn_client_resolve(const char *path, 05400 svn_depth_t depth, 05401 svn_wc_conflict_choice_t conflict_choice, 05402 svn_client_ctx_t *ctx, 05403 apr_pool_t *pool); 05404 05405 05406 /** @} */ 05407 05408 /** 05409 * @defgroup Copy Copy paths in the working copy and repository. 05410 * 05411 * @{ 05412 */ 05413 05414 /** 05415 * A structure which describes the source of a copy operation--its path, 05416 * revision, and peg revision. 05417 * 05418 * @since New in 1.5. 05419 */ 05420 typedef struct svn_client_copy_source_t 05421 { 05422 /** The source path or URL. */ 05423 const char *path; 05424 05425 /** The source operational revision. */ 05426 const svn_opt_revision_t *revision; 05427 05428 /** The source peg revision. */ 05429 const svn_opt_revision_t *peg_revision; 05430 } svn_client_copy_source_t; 05431 05432 /** Copy each source in @a sources to @a dst_path. 05433 * 05434 * If multiple @a sources are given, @a dst_path must be a directory, 05435 * and @a sources will be copied as children of @a dst_path. 05436 * 05437 * @a sources is an array of <tt>svn_client_copy_source_t *</tt> elements, 05438 * either all referring to local WC items or all referring to versioned 05439 * items in the repository. 05440 * 05441 * If @a sources has only one item, attempt to copy it to @a dst_path. If 05442 * @a copy_as_child is TRUE and @a dst_path already exists, attempt to copy the 05443 * item as a child of @a dst_path. If @a copy_as_child is FALSE and 05444 * @a dst_path already exists, fail with #SVN_ERR_ENTRY_EXISTS if @a dst_path 05445 * is a working copy path and #SVN_ERR_FS_ALREADY_EXISTS if @a dst_path is a 05446 * URL. 05447 * 05448 * If @a sources has multiple items, and @a copy_as_child is TRUE, all 05449 * @a sources are copied as children of @a dst_path. If any child of 05450 * @a dst_path already exists with the same name any item in @a sources, 05451 * fail with #SVN_ERR_ENTRY_EXISTS if @a dst_path is a working copy path and 05452 * #SVN_ERR_FS_ALREADY_EXISTS if @a dst_path is a URL. 05453 * 05454 * If @a sources has multiple items, and @a copy_as_child is FALSE, fail 05455 * with #SVN_ERR_CLIENT_MULTIPLE_SOURCES_DISALLOWED. 05456 * 05457 * If @a dst_path is a URL, use the authentication baton 05458 * in @a ctx and @a ctx->log_msg_func3/@a ctx->log_msg_baton3 to immediately 05459 * attempt to commit the copy action in the repository. 05460 * 05461 * If @a dst_path is not a URL, then this is just a variant of 05462 * svn_client_add(), where the @a sources are scheduled for addition 05463 * as copies. No changes will happen to the repository until a commit occurs. 05464 * This scheduling can be removed with svn_client_revert2(). 05465 * 05466 * If @a make_parents is TRUE, create any non-existent parent directories 05467 * also. Otherwise the parent of @a dst_path must already exist. 05468 * 05469 * If @a ignore_externals is set, don't process externals definitions 05470 * as part of this operation. 05471 * 05472 * If @a metadata_only is @c TRUE and copying a file in a working copy, 05473 * everything in the metadata is updated as if the node is moved, but the 05474 * actual disk copy operation is not performed. This feature is useful for 05475 * clients that want to keep the working copy in sync while the actual working 05476 * copy is updated by some other task. 05477 * 05478 * If @a pin_externals is set, pin URLs in copied externals definitions 05479 * to their current revision unless they were already pinned to a 05480 * particular revision. A pinned external uses a URL which points at a 05481 * fixed revision, rather than the HEAD revision. Externals in the copy 05482 * destination are pinned to either a working copy base revision or the 05483 * HEAD revision of a repository (as of the time the copy operation is 05484 * performed), depending on the type of the copy source: 05485 <pre> 05486 copy source: working copy (WC) REPOS 05487 ------------+------------------------+---------------------------+ 05488 copy WC | external's WC BASE rev | external's repos HEAD rev | 05489 dest: |------------------------+---------------------------+ 05490 REPOS | external's WC BASE rev | external's repos HEAD rev | 05491 ------------+------------------------+---------------------------+ 05492 </pre> 05493 * If the copy source is a working copy, then all externals must be checked 05494 * out, be at a single-revision, contain no local modifications, and contain 05495 * no switched subtrees. Else, #SVN_ERR_WC_PATH_UNEXPECTED_STATUS is returned. 05496 * 05497 * If non-NULL, @a externals_to_pin restricts pinning to a subset of externals. 05498 * It is a hash table keyed by either a local absolute path or a URL at which 05499 * an svn:externals property is set. The hash table contains apr_array_header_t* 05500 * elements as returned by svn_wc_parse_externals_description3(). These arrays 05501 * contain elements of type svn_wc_external_item2_t*, each of which corresponds 05502 * to a single line of an svn:externals definition. Externals corresponding to 05503 * these items will be pinned, other externals will not be pinned. 05504 * If @a externals_to_pin is @c NULL then all externals are pinned. 05505 * If @a pin_externals is @c FALSE then @a externals_to_pin is ignored. 05506 * 05507 * If non-NULL, @a revprop_table is a hash table holding additional, 05508 * custom revision properties (<tt>const char *</tt> names mapped to 05509 * <tt>svn_string_t *</tt> values) to be set on the new revision in 05510 * the event that this is a committing operation. This table cannot 05511 * contain any standard Subversion properties. 05512 * 05513 * @a ctx->log_msg_func3/@a ctx->log_msg_baton3 are a callback/baton combo 05514 * that this function can use to query for a commit log message when one is 05515 * needed. 05516 * 05517 * If @a ctx->notify_func2 is non-NULL, invoke it with @a ctx->notify_baton2 05518 * for each item added at the new location, passing the new, relative path of 05519 * the added item. 05520 * 05521 * If @a commit_callback is non-NULL, then for each successful commit, call 05522 * @a commit_callback with @a commit_baton and a #svn_commit_info_t for 05523 * the commit. 05524 * 05525 * @since New in 1.9. 05526 */ 05527 svn_error_t * 05528 svn_client_copy7(const apr_array_header_t *sources, 05529 const char *dst_path, 05530 svn_boolean_t copy_as_child, 05531 svn_boolean_t make_parents, 05532 svn_boolean_t ignore_externals, 05533 svn_boolean_t metadata_only, 05534 svn_boolean_t pin_externals, 05535 const apr_hash_t *externals_to_pin, 05536 const apr_hash_t *revprop_table, 05537 svn_commit_callback2_t commit_callback, 05538 void *commit_baton, 05539 svn_client_ctx_t *ctx, 05540 apr_pool_t *pool); 05541 05542 /** 05543 * Similar to svn_client_copy7(), but doesn't support meta_data_only 05544 * and cannot pin externals. 05545 * 05546 * 05547 * @since New in 1.7. 05548 * @deprecated Provided for backward compatibility with the 1.8 API. 05549 */ 05550 SVN_DEPRECATED 05551 svn_error_t * 05552 svn_client_copy6(const apr_array_header_t *sources, 05553 const char *dst_path, 05554 svn_boolean_t copy_as_child, 05555 svn_boolean_t make_parents, 05556 svn_boolean_t ignore_externals, 05557 const apr_hash_t *revprop_table, 05558 svn_commit_callback2_t commit_callback, 05559 void *commit_baton, 05560 svn_client_ctx_t *ctx, 05561 apr_pool_t *pool); 05562 05563 /** 05564 * Similar to svn_client_copy6(), but returns the commit info in 05565 * @a *commit_info_p rather than through a callback function. 05566 * 05567 * @since New in 1.6. 05568 * @deprecated Provided for backward compatibility with the 1.6 API. 05569 */ 05570 SVN_DEPRECATED 05571 svn_error_t * 05572 svn_client_copy5(svn_commit_info_t **commit_info_p, 05573 const apr_array_header_t *sources, 05574 const char *dst_path, 05575 svn_boolean_t copy_as_child, 05576 svn_boolean_t make_parents, 05577 svn_boolean_t ignore_externals, 05578 const apr_hash_t *revprop_table, 05579 svn_client_ctx_t *ctx, 05580 apr_pool_t *pool); 05581 05582 /** 05583 * Similar to svn_client_copy5(), with @a ignore_externals set to @c FALSE. 05584 * 05585 * @since New in 1.5. 05586 * 05587 * @deprecated Provided for backward compatibility with the 1.5 API. 05588 */ 05589 SVN_DEPRECATED 05590 svn_error_t * 05591 svn_client_copy4(svn_commit_info_t **commit_info_p, 05592 const apr_array_header_t *sources, 05593 const char *dst_path, 05594 svn_boolean_t copy_as_child, 05595 svn_boolean_t make_parents, 05596 const apr_hash_t *revprop_table, 05597 svn_client_ctx_t *ctx, 05598 apr_pool_t *pool); 05599 05600 /** 05601 * Similar to svn_client_copy4(), with only one @a src_path, @a 05602 * copy_as_child set to @c FALSE, @a revprop_table passed as NULL, and 05603 * @a make_parents set to @c FALSE. Also, use @a src_revision as both 05604 * the operational and peg revision. 05605 * 05606 * @since New in 1.4. 05607 * 05608 * @deprecated Provided for backward compatibility with the 1.4 API. 05609 */ 05610 SVN_DEPRECATED 05611 svn_error_t * 05612 svn_client_copy3(svn_commit_info_t **commit_info_p, 05613 const char *src_path, 05614 const svn_opt_revision_t *src_revision, 05615 const char *dst_path, 05616 svn_client_ctx_t *ctx, 05617 apr_pool_t *pool); 05618 05619 05620 /** 05621 * Similar to svn_client_copy3(), with the difference that if @a dst_path 05622 * already exists and is a directory, copy the item into that directory, 05623 * keeping its name (the last component of @a src_path). 05624 * 05625 * @since New in 1.3. 05626 * 05627 * @deprecated Provided for backward compatibility with the 1.3 API. 05628 */ 05629 SVN_DEPRECATED 05630 svn_error_t * 05631 svn_client_copy2(svn_commit_info_t **commit_info_p, 05632 const char *src_path, 05633 const svn_opt_revision_t *src_revision, 05634 const char *dst_path, 05635 svn_client_ctx_t *ctx, 05636 apr_pool_t *pool); 05637 05638 05639 /** 05640 * Similar to svn_client_copy2(), but uses #svn_client_commit_info_t 05641 * for @a commit_info_p. 05642 * 05643 * @deprecated Provided for backward compatibility with the 1.2 API. 05644 */ 05645 SVN_DEPRECATED 05646 svn_error_t * 05647 svn_client_copy(svn_client_commit_info_t **commit_info_p, 05648 const char *src_path, 05649 const svn_opt_revision_t *src_revision, 05650 const char *dst_path, 05651 svn_client_ctx_t *ctx, 05652 apr_pool_t *pool); 05653 05654 05655 /** @} */ 05656 05657 /** 05658 * @defgroup Move Move paths in the working copy or repository. 05659 * 05660 * @{ 05661 */ 05662 05663 /** 05664 * Move @a src_paths to @a dst_path. 05665 * 05666 * @a src_paths is an array of (const char *) paths -- either all WC paths 05667 * or all URLs -- of versioned items. If multiple @a src_paths are given, 05668 * @a dst_path must be a directory and @a src_paths will be moved as 05669 * children of @a dst_path. 05670 * 05671 * If @a src_paths are repository URLs: 05672 * 05673 * - @a dst_path must also be a repository URL. 05674 * 05675 * - The authentication baton in @a ctx and @a ctx->log_msg_func/@a 05676 * ctx->log_msg_baton are used to commit the move. 05677 * 05678 * - The move operation will be immediately committed. 05679 * 05680 * If @a src_paths are working copy paths: 05681 * 05682 * - @a dst_path must also be a working copy path. 05683 * 05684 * - @a ctx->log_msg_func3 and @a ctx->log_msg_baton3 are ignored. 05685 * 05686 * - This is a scheduling operation. No changes will happen to the 05687 * repository until a commit occurs. This scheduling can be removed 05688 * with svn_client_revert2(). If one of @a src_paths is a file it is 05689 * removed from the working copy immediately. If one of @a src_path 05690 * is a directory it will remain in the working copy but all the files, 05691 * and unversioned items, it contains will be removed. 05692 * 05693 * If @a src_paths has only one item, attempt to move it to @a dst_path. If 05694 * @a move_as_child is TRUE and @a dst_path already exists, attempt to move the 05695 * item as a child of @a dst_path. If @a move_as_child is FALSE and 05696 * @a dst_path already exists, fail with #SVN_ERR_ENTRY_EXISTS if @a dst_path 05697 * is a working copy path and #SVN_ERR_FS_ALREADY_EXISTS if @a dst_path is a 05698 * URL. 05699 * 05700 * If @a src_paths has multiple items, and @a move_as_child is TRUE, all 05701 * @a src_paths are moved as children of @a dst_path. If any child of 05702 * @a dst_path already exists with the same name any item in @a src_paths, 05703 * fail with #SVN_ERR_ENTRY_EXISTS if @a dst_path is a working copy path and 05704 * #SVN_ERR_FS_ALREADY_EXISTS if @a dst_path is a URL. 05705 * 05706 * If @a src_paths has multiple items, and @a move_as_child is FALSE, fail 05707 * with #SVN_ERR_CLIENT_MULTIPLE_SOURCES_DISALLOWED. 05708 * 05709 * If @a make_parents is TRUE, create any non-existent parent directories 05710 * also. Otherwise, the parent of @a dst_path must already exist. 05711 * 05712 * If @a allow_mixed_revisions is @c FALSE, #SVN_ERR_WC_MIXED_REVISIONS 05713 * will be raised if the move source is a mixed-revision subtree. 05714 * If @a allow_mixed_revisions is TRUE, a mixed-revision move source is 05715 * allowed but the move will degrade to a copy and a delete without local 05716 * move tracking. This parameter should be set to FALSE except where backwards 05717 * compatibility to svn_client_move6() is required. 05718 * 05719 * If @a metadata_only is @c TRUE and moving a file in a working copy, 05720 * everything in the metadata is updated as if the node is moved, but the 05721 * actual disk move operation is not performed. This feature is useful for 05722 * clients that want to keep the working copy in sync while the actual working 05723 * copy is updated by some other task. 05724 * 05725 * If non-NULL, @a revprop_table is a hash table holding additional, 05726 * custom revision properties (<tt>const char *</tt> names mapped to 05727 * <tt>svn_string_t *</tt> values) to be set on the new revision in 05728 * the event that this is a committing operation. This table cannot 05729 * contain any standard Subversion properties. 05730 * 05731 * @a ctx->log_msg_func3/@a ctx->log_msg_baton3 are a callback/baton combo that 05732 * this function can use to query for a commit log message when one is needed. 05733 * 05734 * If @a ctx->notify_func2 is non-NULL, then for each item moved, call 05735 * @a ctx->notify_func2 with the @a ctx->notify_baton2 twice, once to indicate 05736 * the deletion of the moved thing, and once to indicate the addition of 05737 * the new location of the thing. 05738 * 05739 * ### Is this really true? What about svn_wc_notify_commit_replaced()? ### 05740 * 05741 * If @a commit_callback is non-NULL, then for each successful commit, call 05742 * @a commit_callback with @a commit_baton and a #svn_commit_info_t for 05743 * the commit. 05744 * 05745 * @since New in 1.8. 05746 */ 05747 svn_error_t * 05748 svn_client_move7(const apr_array_header_t *src_paths, 05749 const char *dst_path, 05750 svn_boolean_t move_as_child, 05751 svn_boolean_t make_parents, 05752 svn_boolean_t allow_mixed_revisions, 05753 svn_boolean_t metadata_only, 05754 const apr_hash_t *revprop_table, 05755 svn_commit_callback2_t commit_callback, 05756 void *commit_baton, 05757 svn_client_ctx_t *ctx, 05758 apr_pool_t *pool); 05759 05760 /** 05761 * Similar to svn_client_move7(), but with @a allow_mixed_revisions always 05762 * set to @c TRUE and @a metadata_only always to @c FALSE. 05763 * 05764 * @since New in 1.7. 05765 * @deprecated Provided for backward compatibility with the 1.7 API. 05766 */ 05767 SVN_DEPRECATED 05768 svn_error_t * 05769 svn_client_move6(const apr_array_header_t *src_paths, 05770 const char *dst_path, 05771 svn_boolean_t move_as_child, 05772 svn_boolean_t make_parents, 05773 const apr_hash_t *revprop_table, 05774 svn_commit_callback2_t commit_callback, 05775 void *commit_baton, 05776 svn_client_ctx_t *ctx, 05777 apr_pool_t *pool); 05778 05779 /** 05780 * Similar to svn_client_move6(), but returns the commit info in 05781 * @a *commit_info_p rather than through a callback function. 05782 * 05783 * A WC-to-WC move will include any modified and/or unversioned children. 05784 * @a force is ignored. 05785 * 05786 * @since New in 1.5. 05787 * @deprecated Provided for backward compatibility with the 1.6 API. 05788 */ 05789 SVN_DEPRECATED 05790 svn_error_t * 05791 svn_client_move5(svn_commit_info_t **commit_info_p, 05792 const apr_array_header_t *src_paths, 05793 const char *dst_path, 05794 svn_boolean_t force, 05795 svn_boolean_t move_as_child, 05796 svn_boolean_t make_parents, 05797 const apr_hash_t *revprop_table, 05798 svn_client_ctx_t *ctx, 05799 apr_pool_t *pool); 05800 05801 /** 05802 * Similar to svn_client_move5(), with only one @a src_path, @a 05803 * move_as_child set to @c FALSE, @a revprop_table passed as NULL, and 05804 * @a make_parents set to @c FALSE. 05805 * 05806 * Note: The behaviour of @a force changed in 1.5 (r860885 and r861421), when 05807 * the 'move' semantics were improved to just move the source including any 05808 * modified and/or unversioned items in it. Before that, @a force 05809 * controlled what happened to such items, but now @a force is ignored. 05810 * 05811 * @since New in 1.4. 05812 * 05813 * @deprecated Provided for backward compatibility with the 1.4 API. 05814 */ 05815 SVN_DEPRECATED 05816 svn_error_t * 05817 svn_client_move4(svn_commit_info_t **commit_info_p, 05818 const char *src_path, 05819 const char *dst_path, 05820 svn_boolean_t force, 05821 svn_client_ctx_t *ctx, 05822 apr_pool_t *pool); 05823 05824 /** 05825 * Similar to svn_client_move4(), with the difference that if @a dst_path 05826 * already exists and is a directory, move the item into that directory, 05827 * keeping its name (the last component of @a src_path). 05828 * 05829 * @since New in 1.3. 05830 * 05831 * @deprecated Provided for backward compatibility with the 1.3 API. 05832 */ 05833 SVN_DEPRECATED 05834 svn_error_t * 05835 svn_client_move3(svn_commit_info_t **commit_info_p, 05836 const char *src_path, 05837 const char *dst_path, 05838 svn_boolean_t force, 05839 svn_client_ctx_t *ctx, 05840 apr_pool_t *pool); 05841 05842 /** 05843 * Similar to svn_client_move3(), but uses #svn_client_commit_info_t 05844 * for @a commit_info_p. 05845 * 05846 * @deprecated Provided for backward compatibility with the 1.2 API. 05847 * 05848 * @since New in 1.2. 05849 */ 05850 SVN_DEPRECATED 05851 svn_error_t * 05852 svn_client_move2(svn_client_commit_info_t **commit_info_p, 05853 const char *src_path, 05854 const char *dst_path, 05855 svn_boolean_t force, 05856 svn_client_ctx_t *ctx, 05857 apr_pool_t *pool); 05858 05859 /** 05860 * Similar to svn_client_move2(), but an extra argument @a src_revision 05861 * must be passed. This has no effect, but must be of kind 05862 * #svn_opt_revision_unspecified or #svn_opt_revision_head, 05863 * otherwise error #SVN_ERR_UNSUPPORTED_FEATURE is returned. 05864 * 05865 * @deprecated Provided for backward compatibility with the 1.1 API. 05866 */ 05867 SVN_DEPRECATED 05868 svn_error_t * 05869 svn_client_move(svn_client_commit_info_t **commit_info_p, 05870 const char *src_path, 05871 const svn_opt_revision_t *src_revision, 05872 const char *dst_path, 05873 svn_boolean_t force, 05874 svn_client_ctx_t *ctx, 05875 apr_pool_t *pool); 05876 05877 /** @} */ 05878 05879 05880 /** Properties 05881 * 05882 * Note that certain svn-controlled properties must always have their 05883 * values set and stored in UTF8 with LF line endings. When 05884 * retrieving these properties, callers must convert the values back 05885 * to native locale and native line-endings before displaying them to 05886 * the user. For help with this task, see 05887 * svn_prop_needs_translation(), svn_subst_translate_string(), and 05888 * svn_subst_detranslate_string(). 05889 * 05890 * @defgroup svn_client_prop_funcs Property functions 05891 * @{ 05892 */ 05893 05894 05895 /** 05896 * Set @a propname to @a propval on @a url. A @a propval of @c NULL will 05897 * delete the property. 05898 * 05899 * Immediately attempt to commit the property change in the repository, 05900 * using the authentication baton in @a ctx and @a 05901 * ctx->log_msg_func3/@a ctx->log_msg_baton3. 05902 * 05903 * If the property has changed on @a url since revision 05904 * @a base_revision_for_url (which must not be #SVN_INVALID_REVNUM), no 05905 * change will be made and an error will be returned. 05906 * 05907 * If non-NULL, @a revprop_table is a hash table holding additional, 05908 * custom revision properties (<tt>const char *</tt> names mapped to 05909 * <tt>svn_string_t *</tt> values) to be set on the new revision. This 05910 * table cannot contain any standard Subversion properties. 05911 * 05912 * If @a commit_callback is non-NULL, then call @a commit_callback with 05913 * @a commit_baton and a #svn_commit_info_t for the commit. 05914 * 05915 * If @a propname is an svn-controlled property (i.e. prefixed with 05916 * #SVN_PROP_PREFIX), then the caller is responsible for ensuring that 05917 * the value is UTF8-encoded and uses LF line-endings. 05918 * 05919 * If @a skip_checks is TRUE, do no validity checking. But if @a 05920 * skip_checks is FALSE, and @a propname is not a valid property for @a 05921 * url, return an error, either #SVN_ERR_ILLEGAL_TARGET (if the property is 05922 * not appropriate for @a url), or * #SVN_ERR_BAD_MIME_TYPE (if @a propname 05923 * is "svn:mime-type", but @a propval is not a valid mime-type). 05924 * 05925 * Use @a scratch_pool for all memory allocation. 05926 * 05927 * @since New in 1.7. 05928 */ 05929 svn_error_t * 05930 svn_client_propset_remote(const char *propname, 05931 const svn_string_t *propval, 05932 const char *url, 05933 svn_boolean_t skip_checks, 05934 svn_revnum_t base_revision_for_url, 05935 const apr_hash_t *revprop_table, 05936 svn_commit_callback2_t commit_callback, 05937 void *commit_baton, 05938 svn_client_ctx_t *ctx, 05939 apr_pool_t *scratch_pool); 05940 05941 /** 05942 * Set @a propname to @a propval on each (const char *) target in @a 05943 * targets. The targets must be all working copy paths. A @a propval 05944 * of @c NULL will delete the property. 05945 * 05946 * If @a depth is #svn_depth_empty, set the property on each member of 05947 * @a targets only; if #svn_depth_files, set it on @a targets and their 05948 * file children (if any); if #svn_depth_immediates, on @a targets and all 05949 * of their immediate children (both files and directories); if 05950 * #svn_depth_infinity, on @a targets and everything beneath them. 05951 * 05952 * @a changelists is an array of <tt>const char *</tt> changelist 05953 * names, used as a restrictive filter on items whose properties are 05954 * set; that is, don't set properties on any item unless it's a member 05955 * of one of those changelists. If @a changelists is empty (or 05956 * altogether @c NULL), no changelist filtering occurs. 05957 * 05958 * If @a propname is an svn-controlled property (i.e. prefixed with 05959 * #SVN_PROP_PREFIX), then the caller is responsible for ensuring that 05960 * the value is UTF8-encoded and uses LF line-endings. 05961 * 05962 * If @a skip_checks is TRUE, do no validity checking. But if @a 05963 * skip_checks is FALSE, and @a propname is not a valid property for @a 05964 * targets, return an error, either #SVN_ERR_ILLEGAL_TARGET (if the 05965 * property is not appropriate for @a targets), or 05966 * #SVN_ERR_BAD_MIME_TYPE (if @a propname is "svn:mime-type", but @a 05967 * propval is not a valid mime-type). 05968 * 05969 * If @a ctx->cancel_func is non-NULL, invoke it passing @a 05970 * ctx->cancel_baton at various places during the operation. 05971 * 05972 * Use @a scratch_pool for all memory allocation. 05973 * 05974 * @since New in 1.7. 05975 */ 05976 svn_error_t * 05977 svn_client_propset_local(const char *propname, 05978 const svn_string_t *propval, 05979 const apr_array_header_t *targets, 05980 svn_depth_t depth, 05981 svn_boolean_t skip_checks, 05982 const apr_array_header_t *changelists, 05983 svn_client_ctx_t *ctx, 05984 apr_pool_t *scratch_pool); 05985 05986 /** 05987 * An amalgamation of svn_client_propset_local() and 05988 * svn_client_propset_remote() that takes only a single target, and 05989 * returns the commit info in @a *commit_info_p rather than through a 05990 * callback function. 05991 * 05992 * @since New in 1.5. 05993 * @deprecated Provided for backward compatibility with the 1.6 API. 05994 */ 05995 SVN_DEPRECATED 05996 svn_error_t * 05997 svn_client_propset3(svn_commit_info_t **commit_info_p, 05998 const char *propname, 05999 const svn_string_t *propval, 06000 const char *target, 06001 svn_depth_t depth, 06002 svn_boolean_t skip_checks, 06003 svn_revnum_t base_revision_for_url, 06004 const apr_array_header_t *changelists, 06005 const apr_hash_t *revprop_table, 06006 svn_client_ctx_t *ctx, 06007 apr_pool_t *pool); 06008 06009 /** 06010 * Like svn_client_propset3(), but with @a base_revision_for_url 06011 * always #SVN_INVALID_REVNUM; @a commit_info_p always @c NULL; @a 06012 * changelists always @c NULL; @a revprop_table always @c NULL; and @a 06013 * depth set according to @a recurse: if @a recurse is TRUE, @a depth 06014 * is #svn_depth_infinity, else #svn_depth_empty. 06015 * 06016 * @deprecated Provided for backward compatibility with the 1.4 API. 06017 */ 06018 SVN_DEPRECATED 06019 svn_error_t * 06020 svn_client_propset2(const char *propname, 06021 const svn_string_t *propval, 06022 const char *target, 06023 svn_boolean_t recurse, 06024 svn_boolean_t skip_checks, 06025 svn_client_ctx_t *ctx, 06026 apr_pool_t *pool); 06027 06028 /** 06029 * Like svn_client_propset2(), but with @a skip_checks always FALSE and a 06030 * newly created @a ctx. 06031 * 06032 * @deprecated Provided for backward compatibility with the 1.1 API. 06033 */ 06034 SVN_DEPRECATED 06035 svn_error_t * 06036 svn_client_propset(const char *propname, 06037 const svn_string_t *propval, 06038 const char *target, 06039 svn_boolean_t recurse, 06040 apr_pool_t *pool); 06041 06042 /** Set @a propname to @a propval on revision @a revision in the repository 06043 * represented by @a URL. Use the authentication baton in @a ctx for 06044 * authentication, and @a pool for all memory allocation. Return the actual 06045 * rev affected in @a *set_rev. A @a propval of @c NULL will delete the 06046 * property. 06047 * 06048 * If @a original_propval is non-NULL, then just before setting the 06049 * new value, check that the old value matches @a original_propval; 06050 * if they do not match, return the error #SVN_ERR_RA_OUT_OF_DATE. 06051 * This is to help clients support interactive editing of revprops: 06052 * without this check, the window during which the property may change 06053 * underneath the user is as wide as the amount of time the user 06054 * spends editing the property. With this check, the window is 06055 * reduced to a small, constant amount of time right before we set the 06056 * new value. (To check that an old value is still non-existent, set 06057 * @a original_propval->data to NULL, and @a original_propval->len is 06058 * ignored.) 06059 * If the server advertises #SVN_RA_CAPABILITY_ATOMIC_REVPROPS, the 06060 * check of @a original_propval is done atomically. 06061 * 06062 * Note: the representation of "property is not set" in @a 06063 * original_propval differs from the representation in other APIs 06064 * (such as svn_fs_change_rev_prop2() and svn_ra_change_rev_prop2()). 06065 * 06066 * If @a force is TRUE, allow newlines in the author property. 06067 * 06068 * If @a propname is an svn-controlled property (i.e. prefixed with 06069 * #SVN_PROP_PREFIX), then the caller is responsible for ensuring that 06070 * the value UTF8-encoded and uses LF line-endings. 06071 * 06072 * Note that unlike its cousin svn_client_propset3(), this routine 06073 * doesn't affect the working copy at all; it's a pure network 06074 * operation that changes an *unversioned* property attached to a 06075 * revision. This can be used to tweak log messages, dates, authors, 06076 * and the like. Be careful: it's a lossy operation. 06077 06078 * @a ctx->notify_func2 and @a ctx->notify_baton2 are the notification 06079 * functions and baton which are called upon successful setting of the 06080 * property. 06081 * 06082 * Also note that unless the administrator creates a 06083 * pre-revprop-change hook in the repository, this feature will fail. 06084 * 06085 * @since New in 1.6. 06086 */ 06087 svn_error_t * 06088 svn_client_revprop_set2(const char *propname, 06089 const svn_string_t *propval, 06090 const svn_string_t *original_propval, 06091 const char *URL, 06092 const svn_opt_revision_t *revision, 06093 svn_revnum_t *set_rev, 06094 svn_boolean_t force, 06095 svn_client_ctx_t *ctx, 06096 apr_pool_t *pool); 06097 06098 /** 06099 * Similar to svn_client_revprop_set2(), but with @a original_propval 06100 * always @c NULL. 06101 * 06102 * @deprecated Provided for backward compatibility with the 1.5 API. 06103 */ 06104 SVN_DEPRECATED 06105 svn_error_t * 06106 svn_client_revprop_set(const char *propname, 06107 const svn_string_t *propval, 06108 const char *URL, 06109 const svn_opt_revision_t *revision, 06110 svn_revnum_t *set_rev, 06111 svn_boolean_t force, 06112 svn_client_ctx_t *ctx, 06113 apr_pool_t *pool); 06114 06115 /** 06116 * Set @a *props to a hash table whose keys are absolute paths or URLs 06117 * of items on which property @a propname is explicitly set, and whose 06118 * values are <tt>svn_string_t *</tt> representing the property value for 06119 * @a propname at that path. 06120 * 06121 * If @a inherited_props is not @c NULL, then set @a *inherited_props to a 06122 * depth-first ordered array of #svn_prop_inherited_item_t * structures 06123 * representing the properties inherited by @a target. If @a target is a 06124 * working copy path, then properties inherited by @a target as far as the 06125 * root of the working copy are obtained from the working copy's actual 06126 * property values. Properties inherited from above the working copy root 06127 * come from the inherited properties cache. If @a target is a URL, then 06128 * the inherited properties come from the repository. If @a inherited_props 06129 * is not @c NULL and no inheritable properties are found, then set 06130 * @a *inherited_props to an empty array. 06131 * 06132 * The #svn_prop_inherited_item_t->path_or_url members of the 06133 * #svn_prop_inherited_item_t * structures in @a *inherited_props are 06134 * URLs if @a target is a URL or if @a target is a working copy path but the 06135 * property represented by the structure is above the working copy root (i.e. 06136 * the inherited property is from the cache). In all other cases the 06137 * #svn_prop_inherited_item_t->path_or_url members are absolute working copy 06138 * paths. 06139 * 06140 * Allocate @a *props (including keys and values) and @a *inherited_props 06141 * (including its elements) in @a result_pool, use @a scratch_pool for 06142 * temporary allocations. 06143 * 06144 * @a target is a WC absolute path or a URL. 06145 * 06146 * Don't store any path, not even @a target, if it does not have a 06147 * property named @a propname. 06148 * 06149 * If @a revision->kind is #svn_opt_revision_unspecified, then: get 06150 * properties from the working copy if @a target is a working copy 06151 * path, or from the repository head if @a target is a URL. Else get 06152 * the properties as of @a revision. The actual node revision 06153 * selected is determined by the path as it exists in @a peg_revision. 06154 * If @a peg_revision->kind is #svn_opt_revision_unspecified, then 06155 * it defaults to #svn_opt_revision_head for URLs or 06156 * #svn_opt_revision_working for WC targets. Use the authentication 06157 * baton in @a ctx for authentication if contacting the repository. 06158 * If @a actual_revnum is not @c NULL, the actual revision number used 06159 * for the fetch is stored in @a *actual_revnum. 06160 * 06161 * If @a depth is #svn_depth_empty, fetch the property from 06162 * @a target only; if #svn_depth_files, fetch from @a target and its 06163 * file children (if any); if #svn_depth_immediates, from @a target 06164 * and all of its immediate children (both files and directories); if 06165 * #svn_depth_infinity, from @a target and everything beneath it. 06166 * 06167 * @a changelists is an array of <tt>const char *</tt> changelist 06168 * names, used as a restrictive filter on items whose properties are 06169 * gotten; that is, don't get @a propname on any item unless it's a member 06170 * of one of those changelists. If @a changelists is empty (or 06171 * altogether @c NULL), no changelist filtering occurs. 06172 * 06173 * If error, don't touch @a *props, otherwise @a *props is a hash table 06174 * even if empty. 06175 * 06176 * This function returns SVN_ERR_UNVERSIONED_RESOURCE when it is called on 06177 * unversioned nodes. 06178 * 06179 * @since New in 1.8. 06180 */ 06181 svn_error_t * 06182 svn_client_propget5(apr_hash_t **props, 06183 apr_array_header_t **inherited_props, 06184 const char *propname, 06185 const char *target, /* abspath or URL */ 06186 const svn_opt_revision_t *peg_revision, 06187 const svn_opt_revision_t *revision, 06188 svn_revnum_t *actual_revnum, 06189 svn_depth_t depth, 06190 const apr_array_header_t *changelists, 06191 svn_client_ctx_t *ctx, 06192 apr_pool_t *result_pool, 06193 apr_pool_t *scratch_pool); 06194 06195 /** 06196 * Similar to svn_client_propget5 but with @a inherited_props always 06197 * passed as NULL. 06198 * 06199 * @since New in 1.7. 06200 * @deprecated Provided for backward compatibility with the 1.7 API. 06201 */ 06202 SVN_DEPRECATED 06203 svn_error_t * 06204 svn_client_propget4(apr_hash_t **props, 06205 const char *propname, 06206 const char *target, /* abspath or URL */ 06207 const svn_opt_revision_t *peg_revision, 06208 const svn_opt_revision_t *revision, 06209 svn_revnum_t *actual_revnum, 06210 svn_depth_t depth, 06211 const apr_array_header_t *changelists, 06212 svn_client_ctx_t *ctx, 06213 apr_pool_t *result_pool, 06214 apr_pool_t *scratch_pool); 06215 06216 /** 06217 * Similar to svn_client_propget4(), but with the following change to the 06218 * output hash keys: keys are `<tt>char *</tt>' paths, prefixed by 06219 * @a target, which is a working copy path or a URL. 06220 * 06221 * This function returns SVN_ERR_ENTRY_NOT_FOUND where svn_client_propget4 06222 * would return SVN_ERR_UNVERSIONED_RESOURCE. 06223 * 06224 * @since New in 1.5. 06225 * @deprecated Provided for backward compatibility with the 1.6 API. 06226 */ 06227 SVN_DEPRECATED 06228 svn_error_t * 06229 svn_client_propget3(apr_hash_t **props, 06230 const char *propname, 06231 const char *target, 06232 const svn_opt_revision_t *peg_revision, 06233 const svn_opt_revision_t *revision, 06234 svn_revnum_t *actual_revnum, 06235 svn_depth_t depth, 06236 const apr_array_header_t *changelists, 06237 svn_client_ctx_t *ctx, 06238 apr_pool_t *pool); 06239 06240 /** 06241 * Similar to svn_client_propget3(), except that @a actual_revnum and 06242 * @a changelists are always @c NULL, and @a depth is set according to 06243 * @a recurse: if @a recurse is TRUE, then @a depth is 06244 * #svn_depth_infinity, else #svn_depth_empty. 06245 * 06246 * @deprecated Provided for backward compatibility with the 1.4 API. 06247 */ 06248 SVN_DEPRECATED 06249 svn_error_t * 06250 svn_client_propget2(apr_hash_t **props, 06251 const char *propname, 06252 const char *target, 06253 const svn_opt_revision_t *peg_revision, 06254 const svn_opt_revision_t *revision, 06255 svn_boolean_t recurse, 06256 svn_client_ctx_t *ctx, 06257 apr_pool_t *pool); 06258 06259 /** 06260 * Similar to svn_client_propget2(), except that @a peg_revision is 06261 * always the same as @a revision. 06262 * 06263 * @deprecated Provided for backward compatibility with the 1.1 API. 06264 */ 06265 SVN_DEPRECATED 06266 svn_error_t * 06267 svn_client_propget(apr_hash_t **props, 06268 const char *propname, 06269 const char *target, 06270 const svn_opt_revision_t *revision, 06271 svn_boolean_t recurse, 06272 svn_client_ctx_t *ctx, 06273 apr_pool_t *pool); 06274 06275 /** Set @a *propval to the value of @a propname on revision @a revision 06276 * in the repository represented by @a URL. Use the authentication baton 06277 * in @a ctx for authentication, and @a pool for all memory allocation. 06278 * Return the actual rev queried in @a *set_rev. 06279 * 06280 * If @a propname does not exist on @a revision, set @a *propval to @c NULL. 06281 * 06282 * Note that unlike its cousin svn_client_propget(), this routine 06283 * doesn't affect the working copy at all; it's a pure network 06284 * operation that queries an *unversioned* property attached to a 06285 * revision. This can query log messages, dates, authors, and the 06286 * like. 06287 */ 06288 svn_error_t * 06289 svn_client_revprop_get(const char *propname, 06290 svn_string_t **propval, 06291 const char *URL, 06292 const svn_opt_revision_t *revision, 06293 svn_revnum_t *set_rev, 06294 svn_client_ctx_t *ctx, 06295 apr_pool_t *pool); 06296 06297 /** 06298 * Invoke @a receiver with @a receiver_baton to return the regular explicit, and 06299 * possibly the inherited, properties of @a target, a URL or working copy path. 06300 * @a receiver will be called for each path encountered. 06301 * 06302 * @a target is a WC path or a URL. 06303 * 06304 * If @a revision->kind is #svn_opt_revision_unspecified, then get the 06305 * explicit (and possibly the inherited) properties from the working copy, 06306 * if @a target is a working copy path, or from the repository head if 06307 * @a target is a URL. Else get the properties as of @a revision. 06308 * The actual node revision selected is determined by the path as it exists 06309 * in @a peg_revision. If @a peg_revision->kind is 06310 * #svn_opt_revision_unspecified, then it defaults to #svn_opt_revision_head 06311 * for URLs or #svn_opt_revision_working for WC targets. Use the 06312 * authentication baton cached in @a ctx for authentication if contacting 06313 * the repository. 06314 * 06315 * If @a depth is #svn_depth_empty, list only the properties of 06316 * @a target itself. If @a depth is #svn_depth_files, and 06317 * @a target is a directory, list the properties of @a target 06318 * and its file entries. If #svn_depth_immediates, list the properties 06319 * of its immediate file and directory entries. If #svn_depth_infinity, 06320 * list the properties of its file entries and recurse (with 06321 * #svn_depth_infinity) on directory entries. #svn_depth_unknown is 06322 * equivalent to #svn_depth_empty. All other values produce undefined 06323 * results. 06324 * 06325 * @a changelists is an array of <tt>const char *</tt> changelist 06326 * names, used as a restrictive filter on items whose properties are 06327 * listed; that is, don't list properties on any item unless it's a member 06328 * of one of those changelists. If @a changelists is empty (or 06329 * altogether @c NULL), no changelist filtering occurs. 06330 * 06331 * If @a get_target_inherited_props is true, then also return any inherited 06332 * properties when @a receiver is called for @a target. If @a target is a 06333 * working copy path, then properties inherited by @a target as far as the 06334 * root of the working copy are obtained from the working copy's actual 06335 * property values. Properties inherited from above the working copy 06336 * root come from the inherited properties cache. If @a target is a URL, 06337 * then the inherited properties come from the repository. 06338 * If @a get_target_inherited_props is false, then no inherited properties 06339 * are returned to @a receiver. 06340 * 06341 * If @a target is not found, return the error #SVN_ERR_ENTRY_NOT_FOUND. 06342 * 06343 * @since New in 1.8. 06344 */ 06345 svn_error_t * 06346 svn_client_proplist4(const char *target, 06347 const svn_opt_revision_t *peg_revision, 06348 const svn_opt_revision_t *revision, 06349 svn_depth_t depth, 06350 const apr_array_header_t *changelists, 06351 svn_boolean_t get_target_inherited_props, 06352 svn_proplist_receiver2_t receiver, 06353 void *receiver_baton, 06354 svn_client_ctx_t *ctx, 06355 apr_pool_t *scratch_pool); 06356 06357 /** 06358 * Similar to svn_client_proplist4(), except that the @a receiver type 06359 * is a #svn_proplist_receiver_t, @a get_target_inherited_props is 06360 * always passed NULL, and there is no separate scratch pool. 06361 * 06362 * @since New in 1.5. 06363 * @deprecated Provided for backward compatibility with the 1.7 API. 06364 */ 06365 SVN_DEPRECATED 06366 svn_error_t * 06367 svn_client_proplist3(const char *target, 06368 const svn_opt_revision_t *peg_revision, 06369 const svn_opt_revision_t *revision, 06370 svn_depth_t depth, 06371 const apr_array_header_t *changelists, 06372 svn_proplist_receiver_t receiver, 06373 void *receiver_baton, 06374 svn_client_ctx_t *ctx, 06375 apr_pool_t *pool); 06376 06377 /** 06378 * Similar to svn_client_proplist3(), except the properties are 06379 * returned as an array of #svn_client_proplist_item_t * structures 06380 * instead of by invoking the receiver function, there's no support 06381 * for @a changelists filtering, and @a recurse is used instead of a 06382 * #svn_depth_t parameter (FALSE corresponds to #svn_depth_empty, 06383 * and TRUE to #svn_depth_infinity). 06384 * 06385 * @since New in 1.2. 06386 * 06387 * @deprecated Provided for backward compatibility with the 1.4 API. 06388 */ 06389 SVN_DEPRECATED 06390 svn_error_t * 06391 svn_client_proplist2(apr_array_header_t **props, 06392 const char *target, 06393 const svn_opt_revision_t *peg_revision, 06394 const svn_opt_revision_t *revision, 06395 svn_boolean_t recurse, 06396 svn_client_ctx_t *ctx, 06397 apr_pool_t *pool); 06398 06399 /** 06400 * Similar to svn_client_proplist2(), except that @a peg_revision is 06401 * always the same as @a revision. 06402 * 06403 * @deprecated Provided for backward compatibility with the 1.1 API. 06404 */ 06405 SVN_DEPRECATED 06406 svn_error_t * 06407 svn_client_proplist(apr_array_header_t **props, 06408 const char *target, 06409 const svn_opt_revision_t *revision, 06410 svn_boolean_t recurse, 06411 svn_client_ctx_t *ctx, 06412 apr_pool_t *pool); 06413 06414 /** Set @a *props to a hash of the revision props attached to @a revision in 06415 * the repository represented by @a URL. Use the authentication baton cached 06416 * in @a ctx for authentication, and @a pool for all memory allocation. 06417 * Return the actual rev queried in @a *set_rev. 06418 * 06419 * The allocated hash maps (<tt>const char *</tt>) property names to 06420 * (#svn_string_t *) property values. 06421 * 06422 * Note that unlike its cousin svn_client_proplist(), this routine 06423 * doesn't read a working copy at all; it's a pure network operation 06424 * that reads *unversioned* properties attached to a revision. 06425 */ 06426 svn_error_t * 06427 svn_client_revprop_list(apr_hash_t **props, 06428 const char *URL, 06429 const svn_opt_revision_t *revision, 06430 svn_revnum_t *set_rev, 06431 svn_client_ctx_t *ctx, 06432 apr_pool_t *pool); 06433 /** @} */ 06434 06435 06436 /** 06437 * @defgroup Export Export a tree from version control. 06438 * 06439 * @{ 06440 */ 06441 06442 /** 06443 * Export the contents of either a subversion repository or a 06444 * subversion working copy into a 'clean' directory (meaning a 06445 * directory with no administrative directories). If @a result_rev 06446 * is not @c NULL and the path being exported is a repository URL, set 06447 * @a *result_rev to the value of the revision actually exported (set 06448 * it to #SVN_INVALID_REVNUM for local exports). 06449 * 06450 * @a from_path_or_url is either the path the working copy on disk, or 06451 * a URL to the repository you wish to export. 06452 * 06453 * When exporting a directory, @a to_path is the path to the directory 06454 * where you wish to create the exported tree; when exporting a file, it 06455 * is the path of the file that will be created. If @a to_path is the 06456 * empty path, then the basename of the export file/directory in the repository 06457 * will be used. If @a to_path represents an existing directory, and a 06458 * file is being exported, then a file with the that basename will be 06459 * created under that directory (as with 'copy' operations). 06460 * 06461 * @a peg_revision is the revision where the path is first looked up 06462 * when exporting from a repository. If @a peg_revision->kind is 06463 * #svn_opt_revision_unspecified, then it defaults to #svn_opt_revision_head 06464 * for URLs or #svn_opt_revision_working for WC targets. 06465 * 06466 * @a revision is the revision that should be exported. 06467 * 06468 * @a peg_revision and @a revision must not be @c NULL. 06469 * 06470 * @a ctx->notify_func2 and @a ctx->notify_baton2 are the notification 06471 * functions and baton which are passed to svn_client_checkout() when 06472 * exporting from a repository. 06473 * 06474 * @a ctx is a context used for authentication in the repository case. 06475 * 06476 * @a overwrite if TRUE will cause the export to overwrite files or 06477 * directories. 06478 * 06479 * If @a ignore_externals is set, don't process externals definitions 06480 * as part of this operation. 06481 * 06482 * If @a ignore_keywords is set, don't expand keywords as part of this 06483 * operation. 06484 * 06485 * @a native_eol allows you to override the standard eol marker on the 06486 * platform you are running on. Can be either "LF", "CR" or "CRLF" or 06487 * NULL. If NULL will use the standard eol marker. Any other value 06488 * will cause the #SVN_ERR_IO_UNKNOWN_EOL error to be returned. 06489 * 06490 * If @a depth is #svn_depth_infinity, export fully recursively. Else 06491 * if it is #svn_depth_immediates, export @a from_path_or_url and its 06492 * immediate children (if any), but with subdirectories empty and at 06493 * #svn_depth_empty. Else if #svn_depth_files, export @a 06494 * from_path_or_url and its immediate file children (if any) only. If 06495 * @a depth is #svn_depth_empty, then export exactly @a 06496 * from_path_or_url and none of its children. 06497 * 06498 * All allocations are done in @a pool. 06499 * 06500 * @since New in 1.7. 06501 */ 06502 svn_error_t * 06503 svn_client_export5(svn_revnum_t *result_rev, 06504 const char *from_path_or_url, 06505 const char *to_path, 06506 const svn_opt_revision_t *peg_revision, 06507 const svn_opt_revision_t *revision, 06508 svn_boolean_t overwrite, 06509 svn_boolean_t ignore_externals, 06510 svn_boolean_t ignore_keywords, 06511 svn_depth_t depth, 06512 const char *native_eol, 06513 svn_client_ctx_t *ctx, 06514 apr_pool_t *pool); 06515 06516 /** 06517 * Similar to svn_client_export5(), but with @a ignore_keywords set 06518 * to FALSE. 06519 * 06520 * @deprecated Provided for backward compatibility with the 1.6 API. 06521 * @since New in 1.5. 06522 */ 06523 SVN_DEPRECATED 06524 svn_error_t * 06525 svn_client_export4(svn_revnum_t *result_rev, 06526 const char *from_path_or_url, 06527 const char *to_path, 06528 const svn_opt_revision_t *peg_revision, 06529 const svn_opt_revision_t *revision, 06530 svn_boolean_t overwrite, 06531 svn_boolean_t ignore_externals, 06532 svn_depth_t depth, 06533 const char *native_eol, 06534 svn_client_ctx_t *ctx, 06535 apr_pool_t *pool); 06536 06537 06538 /** 06539 * Similar to svn_client_export4(), but with @a depth set according to 06540 * @a recurse: if @a recurse is TRUE, set @a depth to 06541 * #svn_depth_infinity, if @a recurse is FALSE, set @a depth to 06542 * #svn_depth_files. 06543 * 06544 * @deprecated Provided for backward compatibility with the 1.4 API. 06545 * 06546 * @since New in 1.2. 06547 */ 06548 SVN_DEPRECATED 06549 svn_error_t * 06550 svn_client_export3(svn_revnum_t *result_rev, 06551 const char *from_path_or_url, 06552 const char *to_path, 06553 const svn_opt_revision_t *peg_revision, 06554 const svn_opt_revision_t *revision, 06555 svn_boolean_t overwrite, 06556 svn_boolean_t ignore_externals, 06557 svn_boolean_t recurse, 06558 const char *native_eol, 06559 svn_client_ctx_t *ctx, 06560 apr_pool_t *pool); 06561 06562 06563 /** 06564 * Similar to svn_client_export3(), but with @a peg_revision 06565 * always set to #svn_opt_revision_unspecified, @a overwrite set to 06566 * the value of @a force, @a ignore_externals always FALSE, and 06567 * @a recurse always TRUE. 06568 * 06569 * @since New in 1.1. 06570 * @deprecated Provided for backward compatibility with the 1.1 API. 06571 */ 06572 SVN_DEPRECATED 06573 svn_error_t * 06574 svn_client_export2(svn_revnum_t *result_rev, 06575 const char *from_path_or_url, 06576 const char *to_path, 06577 svn_opt_revision_t *revision, 06578 svn_boolean_t force, 06579 const char *native_eol, 06580 svn_client_ctx_t *ctx, 06581 apr_pool_t *pool); 06582 06583 06584 /** 06585 * Similar to svn_client_export2(), but with @a native_eol always set 06586 * to NULL. 06587 * 06588 * @deprecated Provided for backward compatibility with the 1.0 API. 06589 */ 06590 SVN_DEPRECATED 06591 svn_error_t * 06592 svn_client_export(svn_revnum_t *result_rev, 06593 const char *from_path_or_url, 06594 const char *to_path, 06595 svn_opt_revision_t *revision, 06596 svn_boolean_t force, 06597 svn_client_ctx_t *ctx, 06598 apr_pool_t *pool); 06599 06600 /** @} */ 06601 06602 /** 06603 * @defgroup List List / ls 06604 * 06605 * @{ 06606 */ 06607 06608 /** The type of function invoked by svn_client_list3() to report the details 06609 * of each directory entry being listed. 06610 * 06611 * @a baton is the baton that was passed to the caller. @a path is the 06612 * entry's path relative to @a abs_path; it is the empty path when reporting 06613 * the top node of the list operation. @a dirent contains some or all of 06614 * the directory entry's details, as determined by the caller. @a lock is 06615 * the entry's lock, if it is locked and if lock information is being 06616 * reported by the caller; otherwise @a lock is NULL. @a abs_path is the 06617 * repository path of the top node of the list operation; it is relative to 06618 * the repository root and begins with "/". 06619 * 06620 * If svn_client_list3() was called with @a include_externals set to TRUE, 06621 * @a external_parent_url and @a external_target will be set. 06622 * @a external_parent_url is url of the directory which has the 06623 * externals definitions. @a external_target is the target subdirectory of 06624 * externals definitions which is relative to the parent directory that holds 06625 * the external item. 06626 * 06627 * If external_parent_url and external_target are defined, the item being 06628 * listed is part of the external described by external_parent_url and 06629 * external_target. Else, the item is not part of any external. 06630 * Moreover, we will never mix items which are part of separate 06631 * externals, and will always finish listing an external before listing 06632 * the next one. 06633 * 06634 * @a scratch_pool may be used for temporary allocations. 06635 * 06636 * @since New in 1.8. 06637 */ 06638 typedef svn_error_t *(*svn_client_list_func2_t)( 06639 void *baton, 06640 const char *path, 06641 const svn_dirent_t *dirent, 06642 const svn_lock_t *lock, 06643 const char *abs_path, 06644 const char *external_parent_url, 06645 const char *external_target, 06646 apr_pool_t *scratch_pool); 06647 06648 /** 06649 * Similar to #svn_client_list_func2_t, but without any information about 06650 * externals definitions. 06651 * 06652 * @deprecated Provided for backward compatibility with the 1.7 API. 06653 * 06654 * @since New in 1.4 06655 * 06656 * */ 06657 typedef svn_error_t *(*svn_client_list_func_t)(void *baton, 06658 const char *path, 06659 const svn_dirent_t *dirent, 06660 const svn_lock_t *lock, 06661 const char *abs_path, 06662 apr_pool_t *pool); 06663 06664 /** 06665 * Report the directory entry, and possibly children, for @a 06666 * path_or_url at @a revision. The actual node revision selected is 06667 * determined by the path as it exists in @a peg_revision. If @a 06668 * peg_revision->kind is #svn_opt_revision_unspecified, then it defaults 06669 * to #svn_opt_revision_head for URLs or #svn_opt_revision_working 06670 * for WC targets. 06671 * 06672 * Report directory entries by invoking @a list_func/@a baton with @a path 06673 * relative to @a path_or_url. The dirent for @a path_or_url is reported 06674 * using an empty @a path. If @a path_or_url is a directory, also report 06675 * its children. If @a path_or_url is non-existent, return 06676 * #SVN_ERR_FS_NOT_FOUND. 06677 * 06678 * If the @a patterns array of <tt>const char *</tt> is not @c NULL, only 06679 * report paths whose last segment matches one of the specified glob 06680 * patterns. This does not affect the size of the tree nor the number of 06681 * externals being covered. 06682 * 06683 * If @a fetch_locks is TRUE, include locks when reporting directory entries. 06684 * 06685 * If @a include_externals is TRUE, also list all external items 06686 * reached by recursion. @a depth value passed to the original list target 06687 * applies for the externals also. 06688 * 06689 * Use @a scratch_pool for temporary allocations. 06690 * 06691 * Use authentication baton cached in @a ctx to authenticate against the 06692 * repository. 06693 * 06694 * If @a depth is #svn_depth_empty, list just @a path_or_url itself. 06695 * If @a depth is #svn_depth_files, list @a path_or_url and its file 06696 * entries. If #svn_depth_immediates, list its immediate file and 06697 * directory entries. If #svn_depth_infinity, list file entries and 06698 * recurse (with #svn_depth_infinity) on directory entries. 06699 * 06700 * @a dirent_fields controls which fields in the #svn_dirent_t's are 06701 * filled in. To have them totally filled in use #SVN_DIRENT_ALL, 06702 * otherwise simply bitwise OR together the combination of @c SVN_DIRENT_ 06703 * fields you care about. 06704 * 06705 * @since New in 1.10. 06706 */ 06707 svn_error_t * 06708 svn_client_list4(const char *path_or_url, 06709 const svn_opt_revision_t *peg_revision, 06710 const svn_opt_revision_t *revision, 06711 const apr_array_header_t *patterns, 06712 svn_depth_t depth, 06713 apr_uint32_t dirent_fields, 06714 svn_boolean_t fetch_locks, 06715 svn_boolean_t include_externals, 06716 svn_client_list_func2_t list_func, 06717 void *baton, 06718 svn_client_ctx_t *ctx, 06719 apr_pool_t *scratch_pool); 06720 06721 /** Similar to svn_client_list4(), but with @a patterns set to @c NULL. 06722 * 06723 * @since New in 1.8. 06724 * 06725 * @deprecated Provided for backwards compatibility with the 1.9 API. 06726 */ 06727 SVN_DEPRECATED 06728 svn_error_t * 06729 svn_client_list3(const char *path_or_url, 06730 const svn_opt_revision_t *peg_revision, 06731 const svn_opt_revision_t *revision, 06732 svn_depth_t depth, 06733 apr_uint32_t dirent_fields, 06734 svn_boolean_t fetch_locks, 06735 svn_boolean_t include_externals, 06736 svn_client_list_func2_t list_func, 06737 void *baton, 06738 svn_client_ctx_t *ctx, 06739 apr_pool_t *pool); 06740 06741 06742 /** Similar to svn_client_list3(), but with @a include_externals set 06743 * to FALSE, and using a #svn_client_list_func_t as callback. 06744 * 06745 * @since New in 1.5. 06746 * 06747 * @deprecated Provided for backwards compatibility with the 1.7 API. 06748 */ 06749 SVN_DEPRECATED 06750 svn_error_t * 06751 svn_client_list2(const char *path_or_url, 06752 const svn_opt_revision_t *peg_revision, 06753 const svn_opt_revision_t *revision, 06754 svn_depth_t depth, 06755 apr_uint32_t dirent_fields, 06756 svn_boolean_t fetch_locks, 06757 svn_client_list_func_t list_func, 06758 void *baton, 06759 svn_client_ctx_t *ctx, 06760 apr_pool_t *pool); 06761 06762 /** 06763 * Similar to svn_client_list2(), but with @a recurse instead of @a depth. 06764 * If @a recurse is TRUE, pass #svn_depth_files for @a depth; else 06765 * pass #svn_depth_infinity. 06766 * 06767 * @since New in 1.4. 06768 * 06769 * @deprecated Provided for backward compatibility with the 1.4 API. 06770 */ 06771 SVN_DEPRECATED 06772 svn_error_t * 06773 svn_client_list(const char *path_or_url, 06774 const svn_opt_revision_t *peg_revision, 06775 const svn_opt_revision_t *revision, 06776 svn_boolean_t recurse, 06777 apr_uint32_t dirent_fields, 06778 svn_boolean_t fetch_locks, 06779 svn_client_list_func_t list_func, 06780 void *baton, 06781 svn_client_ctx_t *ctx, 06782 apr_pool_t *pool); 06783 06784 /** 06785 * Same as svn_client_list(), but always passes #SVN_DIRENT_ALL for 06786 * the @a dirent_fields argument and returns all information in two 06787 * hash tables instead of invoking a callback. 06788 * 06789 * Set @a *dirents to a newly allocated hash of directory entries. 06790 * The @a dirents hash maps entry names (<tt>const char *</tt>) to 06791 * #svn_dirent_t *'s. 06792 * 06793 * If @a locks is not @c NULL, set @a *locks to a hash table mapping 06794 * entry names (<tt>const char *</tt>) to #svn_lock_t *'s. 06795 * 06796 * @since New in 1.3. 06797 * 06798 * @deprecated Provided for backward compatibility with the 1.3 API. 06799 * Use svn_client_list2() instead. 06800 */ 06801 SVN_DEPRECATED 06802 svn_error_t * 06803 svn_client_ls3(apr_hash_t **dirents, 06804 apr_hash_t **locks, 06805 const char *path_or_url, 06806 const svn_opt_revision_t *peg_revision, 06807 const svn_opt_revision_t *revision, 06808 svn_boolean_t recurse, 06809 svn_client_ctx_t *ctx, 06810 apr_pool_t *pool); 06811 06812 /** 06813 * Same as svn_client_ls3(), but without the ability to get locks. 06814 * 06815 * @since New in 1.2. 06816 * 06817 * @deprecated Provided for backward compatibility with the 1.2 API. 06818 * Use svn_client_list2() instead. 06819 */ 06820 SVN_DEPRECATED 06821 svn_error_t * 06822 svn_client_ls2(apr_hash_t **dirents, 06823 const char *path_or_url, 06824 const svn_opt_revision_t *peg_revision, 06825 const svn_opt_revision_t *revision, 06826 svn_boolean_t recurse, 06827 svn_client_ctx_t *ctx, 06828 apr_pool_t *pool); 06829 06830 /** 06831 * Similar to svn_client_ls2() except that @a peg_revision is always 06832 * the same as @a revision. 06833 * 06834 * @deprecated Provided for backward compatibility with the 1.1 API. 06835 * Use svn_client_list2() instead. 06836 */ 06837 SVN_DEPRECATED 06838 svn_error_t * 06839 svn_client_ls(apr_hash_t **dirents, 06840 const char *path_or_url, 06841 svn_opt_revision_t *revision, 06842 svn_boolean_t recurse, 06843 svn_client_ctx_t *ctx, 06844 apr_pool_t *pool); 06845 06846 06847 /** @} */ 06848 06849 /** 06850 * @defgroup Cat View the contents of a file in the repository. 06851 * 06852 * @{ 06853 */ 06854 06855 /** 06856 * Output the content of a file. 06857 * 06858 * @param[out] props Optional output argument to obtain properties. 06859 * @param[in] out The stream to which the content will be written. 06860 * @param[in] path_or_url The path or URL of the file. 06861 * @param[in] peg_revision The peg revision. 06862 * @param[in] revision The operative revision. 06863 * @param[in] expand_keywords When true, keywords (when set) are expanded. 06864 * @param[in] ctx The standard client context, used for possible 06865 * authentication. 06866 * 06867 * @return A pointer to an #svn_error_t of the type (this list is not 06868 * exhaustive): <br> 06869 * An unspecified error if @a revision is of kind 06870 * #svn_opt_revision_previous (or some other kind that requires 06871 * a local path), because the desired revision cannot be 06872 * determined. <br> 06873 * If no error occurred, return #SVN_NO_ERROR. 06874 * 06875 * If @a *props is not NULL it is set to a hash of all the file's 06876 * non-inherited properties. If it is NULL, the properties are only 06877 * used for determining how and if the file should be translated. 06878 * 06879 * @see #svn_client_ctx_t <br> @ref clnt_revisions for 06880 * a discussion of operative and peg revisions. 06881 * 06882 * @since New in 1.9. 06883 */ 06884 svn_error_t * 06885 svn_client_cat3(apr_hash_t **props, 06886 svn_stream_t *out, 06887 const char *path_or_url, 06888 const svn_opt_revision_t *peg_revision, 06889 const svn_opt_revision_t *revision, 06890 svn_boolean_t expand_keywords, 06891 svn_client_ctx_t *ctx, 06892 apr_pool_t *result_pool, 06893 apr_pool_t *scratch_pool); 06894 06895 /** 06896 * Similar to svn_client_cat3() except without the option of directly 06897 * reading the properties, and with @a expand_keywords always TRUE. 06898 * 06899 * @since New in 1.2. 06900 * @deprecated Provided for backward compatibility with the 1.8 API. 06901 */ 06902 SVN_DEPRECATED 06903 svn_error_t * 06904 svn_client_cat2(svn_stream_t *out, 06905 const char *path_or_url, 06906 const svn_opt_revision_t *peg_revision, 06907 const svn_opt_revision_t *revision, 06908 svn_client_ctx_t *ctx, 06909 apr_pool_t *pool); 06910 06911 06912 /** 06913 * Similar to svn_client_cat2() except that the peg revision is always 06914 * the same as @a revision. 06915 * 06916 * @deprecated Provided for backward compatibility with the 1.1 API. 06917 */ 06918 SVN_DEPRECATED 06919 svn_error_t * 06920 svn_client_cat(svn_stream_t *out, 06921 const char *path_or_url, 06922 const svn_opt_revision_t *revision, 06923 svn_client_ctx_t *ctx, 06924 apr_pool_t *pool); 06925 06926 /** @} end group: cat */ 06927 06928 06929 06930 /** Shelving v2, with checkpoints 06931 * 06932 * @defgroup svn_client_shelves_checkpoints Shelves and checkpoints 06933 * @{ 06934 */ 06935 06936 /** A shelf. 06937 * 06938 * @warning EXPERIMENTAL. 06939 */ 06940 typedef struct svn_client__shelf_t 06941 { 06942 /* Public fields (read-only for public use) */ 06943 const char *name; 06944 int max_version; /** @deprecated */ 06945 06946 /* Private fields */ 06947 const char *wc_root_abspath; 06948 const char *shelves_dir; 06949 apr_hash_t *revprops; /* non-null; allocated in POOL */ 06950 svn_client_ctx_t *ctx; 06951 apr_pool_t *pool; 06952 } svn_client__shelf_t; 06953 06954 /** One version of a shelved change-set. 06955 * 06956 * @warning EXPERIMENTAL. 06957 */ 06958 typedef struct svn_client__shelf_version_t 06959 { 06960 /* Public fields (read-only for public use) */ 06961 svn_client__shelf_t *shelf; 06962 apr_time_t mtime; /** time-stamp of this version */ 06963 06964 /* Private fields */ 06965 const char *files_dir_abspath; /** abspath of the storage area */ 06966 int version_number; /** version number starting from 1 */ 06967 } svn_client__shelf_version_t; 06968 06969 /** Open an existing shelf or create a new shelf. 06970 * 06971 * Create a new shelf (containing no versions) if a shelf named @a name 06972 * is not found. 06973 * 06974 * The shelf should be closed after use by calling svn_client_shelf_close(). 06975 * 06976 * @a local_abspath is any path in the WC and is used to find the WC root. 06977 * 06978 * @warning EXPERIMENTAL. 06979 */ 06980 SVN_EXPERIMENTAL 06981 svn_error_t * 06982 svn_client__shelf_open_or_create(svn_client__shelf_t **shelf_p, 06983 const char *name, 06984 const char *local_abspath, 06985 svn_client_ctx_t *ctx, 06986 apr_pool_t *result_pool); 06987 06988 /** Open an existing shelf named @a name, or error if it doesn't exist. 06989 * 06990 * The shelf should be closed after use by calling svn_client_shelf_close(). 06991 * 06992 * @a local_abspath is any path in the WC and is used to find the WC root. 06993 * 06994 * @warning EXPERIMENTAL. 06995 */ 06996 SVN_EXPERIMENTAL 06997 svn_error_t * 06998 svn_client__shelf_open_existing(svn_client__shelf_t **shelf_p, 06999 const char *name, 07000 const char *local_abspath, 07001 svn_client_ctx_t *ctx, 07002 apr_pool_t *result_pool); 07003 07004 /** Close @a shelf. 07005 * 07006 * If @a shelf is NULL, do nothing; otherwise @a shelf must be an open shelf. 07007 * 07008 * @warning EXPERIMENTAL. 07009 */ 07010 SVN_EXPERIMENTAL 07011 svn_error_t * 07012 svn_client__shelf_close(svn_client__shelf_t *shelf, 07013 apr_pool_t *scratch_pool); 07014 07015 /** Delete the shelf named @a name, or error if it doesn't exist. 07016 * 07017 * @a local_abspath is any path in the WC and is used to find the WC root. 07018 * 07019 * @warning EXPERIMENTAL. 07020 */ 07021 SVN_EXPERIMENTAL 07022 svn_error_t * 07023 svn_client__shelf_delete(const char *name, 07024 const char *local_abspath, 07025 svn_boolean_t dry_run, 07026 svn_client_ctx_t *ctx, 07027 apr_pool_t *scratch_pool); 07028 07029 /** Save the local modifications found by @a paths, @a depth, 07030 * @a changelists as a new version of @a shelf. 07031 * 07032 * If any paths are shelved, create a new shelf-version and return the new 07033 * shelf-version in @a *new_version_p, else set @a *new_version_p to null. 07034 * @a new_version_p may be null if that output is not wanted; a new shelf- 07035 * version is still saved and may be found through @a shelf. 07036 * 07037 * @a paths are relative to the CWD, or absolute. 07038 * 07039 * For each successfully shelved path: call @a shelved_func (if not null) 07040 * with @a shelved_baton. 07041 * 07042 * If any paths cannot be shelved: if @a not_shelved_func is given, call 07043 * it with @a not_shelved_baton for each such path, and still create a new 07044 * shelf-version if any paths are shelved. 07045 * 07046 * This function does not revert the changes from the WC; use 07047 * svn_client_shelf_unapply() for that. 07048 * 07049 * @warning EXPERIMENTAL. 07050 */ 07051 SVN_EXPERIMENTAL 07052 svn_error_t * 07053 svn_client__shelf_save_new_version3(svn_client__shelf_version_t **new_version_p, 07054 svn_client__shelf_t *shelf, 07055 const apr_array_header_t *paths, 07056 svn_depth_t depth, 07057 const apr_array_header_t *changelists, 07058 svn_client_status_func_t shelved_func, 07059 void *shelved_baton, 07060 svn_client_status_func_t not_shelved_func, 07061 void *not_shelved_baton, 07062 apr_pool_t *scratch_pool); 07063 07064 /** Delete all newer versions of @a shelf newer than @a shelf_version. 07065 * 07066 * If @a shelf_version is null, delete all versions of @a shelf. (The 07067 * shelf will still exist, with any log message and other revprops, but 07068 * with no versions in it.) 07069 * 07070 * Leave the shelf's log message and other revprops unchanged. 07071 * 07072 * Any #svn_client_shelf_version_t object that refers to a deleted version 07073 * will become invalid: attempting to use it will give undefined behaviour. 07074 * The given @a shelf_version will remain valid. 07075 * 07076 * @warning EXPERIMENTAL. 07077 */ 07078 SVN_EXPERIMENTAL 07079 svn_error_t * 07080 svn_client__shelf_delete_newer_versions(svn_client__shelf_t *shelf, 07081 svn_client__shelf_version_t *shelf_version, 07082 apr_pool_t *scratch_pool); 07083 07084 /** Return in @a shelf_version an existing version of @a shelf, given its 07085 * @a version_number. Error if that version doesn't exist. 07086 * 07087 * There is no need to "close" it after use. 07088 * 07089 * @warning EXPERIMENTAL. 07090 */ 07091 SVN_EXPERIMENTAL 07092 svn_error_t * 07093 svn_client__shelf_version_open(svn_client__shelf_version_t **shelf_version_p, 07094 svn_client__shelf_t *shelf, 07095 int version_number, 07096 apr_pool_t *result_pool, 07097 apr_pool_t *scratch_pool); 07098 07099 /** Return in @a shelf_version the newest version of @a shelf. 07100 * 07101 * Set @a shelf_version to null if no versions exist. 07102 * 07103 * @warning EXPERIMENTAL. 07104 */ 07105 SVN_EXPERIMENTAL 07106 svn_error_t * 07107 svn_client__shelf_get_newest_version(svn_client__shelf_version_t **shelf_version_p, 07108 svn_client__shelf_t *shelf, 07109 apr_pool_t *result_pool, 07110 apr_pool_t *scratch_pool); 07111 07112 /** Return in @a versions_p an array of (#svn_client_shelf_version_t *) 07113 * containing all versions of @a shelf. 07114 * 07115 * The versions will be in chronological order, oldest to newest. 07116 * 07117 * @warning EXPERIMENTAL. 07118 */ 07119 SVN_EXPERIMENTAL 07120 svn_error_t * 07121 svn_client__shelf_get_all_versions(apr_array_header_t **versions_p, 07122 svn_client__shelf_t *shelf, 07123 apr_pool_t *result_pool, 07124 apr_pool_t *scratch_pool); 07125 07126 /** Apply @a shelf_version to the WC. 07127 * 07128 * If @a dry_run is true, try applying the shelf-version to the WC and 07129 * report the full set of notifications about successes and conflicts, 07130 * but leave the WC untouched. 07131 * 07132 * @warning EXPERIMENTAL. 07133 */ 07134 SVN_EXPERIMENTAL 07135 svn_error_t * 07136 svn_client__shelf_apply(svn_client__shelf_version_t *shelf_version, 07137 svn_boolean_t dry_run, 07138 apr_pool_t *scratch_pool); 07139 07140 /** Test whether we can successfully apply the changes for @a file_relpath 07141 * in @a shelf_version to the WC. 07142 * 07143 * Set @a *conflict_p to true if the changes conflict with the WC state, 07144 * else to false. 07145 * 07146 * If @a file_relpath is not found in @a shelf_version, set @a *conflict_p 07147 * to FALSE. 07148 * 07149 * @a file_relpath is relative to the WC root. 07150 * 07151 * A conflict means the shelf cannot be applied successfully to the WC 07152 * because the change to be applied is not compatible with the current 07153 * working state of the WC file. Examples are a text conflict, or the 07154 * file does not exist or is a directory, or the shelf is trying to add 07155 * the file but it already exists, or trying to delete it but it does not 07156 * exist. 07157 * 07158 * Return an error only if something is broken, e.g. unable to read data 07159 * from the specified shelf-version. 07160 * 07161 * Leave the WC untouched. 07162 * 07163 * @warning EXPERIMENTAL. 07164 */ 07165 SVN_EXPERIMENTAL 07166 svn_error_t * 07167 svn_client__shelf_test_apply_file(svn_boolean_t *conflict_p, 07168 svn_client__shelf_version_t *shelf_version, 07169 const char *file_relpath, 07170 apr_pool_t *scratch_pool); 07171 07172 /** Reverse-apply @a shelf_version to the WC. 07173 * 07174 * @warning EXPERIMENTAL. 07175 */ 07176 SVN_EXPERIMENTAL 07177 svn_error_t * 07178 svn_client__shelf_unapply(svn_client__shelf_version_t *shelf_version, 07179 svn_boolean_t dry_run, 07180 apr_pool_t *scratch_pool); 07181 07182 /** Set @a *affected_paths to a hash with one entry for each path affected 07183 * by the @a shelf_version. 07184 * 07185 * The hash key is the path of the affected file, relative to the WC root. 07186 * 07187 * (Future possibility: When moves and copies are supported, the hash key 07188 * is the old path and value is the new path.) 07189 * 07190 * @warning EXPERIMENTAL. 07191 */ 07192 SVN_EXPERIMENTAL 07193 svn_error_t * 07194 svn_client__shelf_paths_changed(apr_hash_t **affected_paths, 07195 svn_client__shelf_version_t *shelf_version, 07196 apr_pool_t *result_pool, 07197 apr_pool_t *scratch_pool); 07198 07199 /** Set @a shelf's revprop @a prop_name to @a prop_val. 07200 * 07201 * This can be used to set or change the shelf's log message 07202 * (property name "svn:log" or #SVN_PROP_REVISION_LOG). 07203 * 07204 * If @a prop_val is NULL, delete the property (if present). 07205 * 07206 * @warning EXPERIMENTAL. 07207 */ 07208 SVN_EXPERIMENTAL 07209 svn_error_t * 07210 svn_client__shelf_revprop_set(svn_client__shelf_t *shelf, 07211 const char *prop_name, 07212 const svn_string_t *prop_val, 07213 apr_pool_t *scratch_pool); 07214 07215 /** Set @a shelf's revprops to @a revprop_table. 07216 * 07217 * This deletes all previous revprops. 07218 * 07219 * @warning EXPERIMENTAL. 07220 */ 07221 SVN_EXPERIMENTAL 07222 svn_error_t * 07223 svn_client__shelf_revprop_set_all(svn_client__shelf_t *shelf, 07224 apr_hash_t *revprop_table, 07225 apr_pool_t *scratch_pool); 07226 07227 /** Get @a shelf's revprop @a prop_name into @a *prop_val. 07228 * 07229 * If the property is not present, set @a *prop_val to NULL. 07230 * 07231 * This can be used to get the shelf's log message 07232 * (property name "svn:log" or #SVN_PROP_REVISION_LOG). 07233 * 07234 * The lifetime of the result is limited to that of @a shelf and/or 07235 * of @a result_pool. 07236 * 07237 * @warning EXPERIMENTAL. 07238 */ 07239 SVN_EXPERIMENTAL 07240 svn_error_t * 07241 svn_client__shelf_revprop_get(svn_string_t **prop_val, 07242 svn_client__shelf_t *shelf, 07243 const char *prop_name, 07244 apr_pool_t *result_pool); 07245 07246 /** Get @a shelf's revprops into @a props. 07247 * 07248 * The lifetime of the result is limited to that of @a shelf and/or 07249 * of @a result_pool. 07250 * 07251 * @warning EXPERIMENTAL. 07252 */ 07253 SVN_EXPERIMENTAL 07254 svn_error_t * 07255 svn_client__shelf_revprop_list(apr_hash_t **props, 07256 svn_client__shelf_t *shelf, 07257 apr_pool_t *result_pool); 07258 07259 /** Set the log message in @a shelf to @a log_message. 07260 * 07261 * If @a log_message is null, delete the log message. 07262 * 07263 * Similar to svn_client_shelf_revprop_set(... SVN_PROP_REVISION_LOG ...). 07264 * 07265 * @warning EXPERIMENTAL. 07266 */ 07267 SVN_EXPERIMENTAL 07268 svn_error_t * 07269 svn_client__shelf_set_log_message(svn_client__shelf_t *shelf, 07270 const char *log_message, 07271 apr_pool_t *scratch_pool); 07272 07273 /** Get the log message in @a shelf into @a *log_message. 07274 * 07275 * Set @a *log_message to NULL if there is no log message. 07276 * 07277 * Similar to svn_client_shelf_revprop_get(... SVN_PROP_REVISION_LOG ...). 07278 * 07279 * The result is allocated in @a result_pool. 07280 * 07281 * @warning EXPERIMENTAL. 07282 */ 07283 SVN_EXPERIMENTAL 07284 svn_error_t * 07285 svn_client__shelf_get_log_message(char **log_message, 07286 svn_client__shelf_t *shelf, 07287 apr_pool_t *result_pool); 07288 07289 /** Information about a shelf. 07290 * 07291 * @warning EXPERIMENTAL. 07292 */ 07293 typedef struct svn_client__shelf_info_t 07294 { 07295 apr_time_t mtime; /* mtime of the latest change */ 07296 } svn_client__shelf_info_t; 07297 07298 /** Set @a *shelf_infos to a hash, keyed by shelf name, of pointers to 07299 * @c svn_client_shelf_info_t structures, one for each shelf in the 07300 * given WC. 07301 * 07302 * @a local_abspath is any path in the WC and is used to find the WC root. 07303 * 07304 * @warning EXPERIMENTAL. 07305 */ 07306 SVN_EXPERIMENTAL 07307 svn_error_t * 07308 svn_client__shelf_list(apr_hash_t **shelf_infos, 07309 const char *local_abspath, 07310 svn_client_ctx_t *ctx, 07311 apr_pool_t *result_pool, 07312 apr_pool_t *scratch_pool); 07313 07314 /* Report the shelved status of all the shelved paths in SHELF_VERSION 07315 * via WALK_FUNC(WALK_BATON, ...). 07316 * 07317 * @warning EXPERIMENTAL. 07318 */ 07319 SVN_EXPERIMENTAL 07320 svn_error_t * 07321 svn_client__shelf_version_status_walk(svn_client__shelf_version_t *shelf_version, 07322 const char *wc_relpath, 07323 svn_wc_status_func4_t walk_func, 07324 void *walk_baton, 07325 apr_pool_t *scratch_pool); 07326 /** @} */ 07327 07328 /** Changelist commands 07329 * 07330 * @defgroup svn_client_changelist_funcs Client Changelist Functions 07331 * @{ 07332 */ 07333 07334 /** 07335 * Add each path in @a paths (recursing to @a depth as necessary) to 07336 * @a changelist. If a path is already a member of another 07337 * changelist, then remove it from the other changelist and add it to 07338 * @a changelist. (For now, a path cannot belong to two changelists 07339 * at once.) 07340 * 07341 * @a paths is an array of (const char *) local WC paths. 07342 * 07343 * @a changelists is an array of <tt>const char *</tt> changelist 07344 * names, used as a restrictive filter on items whose changelist 07345 * assignments are adjusted; that is, don't tweak the changeset of any 07346 * item unless it's currently a member of one of those changelists. 07347 * If @a changelists is empty (or altogether @c NULL), no changelist 07348 * filtering occurs. 07349 * 07350 * @note This metadata is purely a client-side "bookkeeping" 07351 * convenience, and is entirely managed by the working copy. 07352 * 07353 * @since New in 1.5. 07354 */ 07355 svn_error_t * 07356 svn_client_add_to_changelist(const apr_array_header_t *paths, 07357 const char *changelist, 07358 svn_depth_t depth, 07359 const apr_array_header_t *changelists, 07360 svn_client_ctx_t *ctx, 07361 apr_pool_t *pool); 07362 07363 /** 07364 * Remove each path in @a paths (recursing to @a depth as necessary) 07365 * from changelists to which they are currently assigned. 07366 * 07367 * @a paths is an array of (const char *) local WC paths. 07368 * 07369 * @a changelists is an array of <tt>const char *</tt> changelist 07370 * names, used as a restrictive filter on items whose changelist 07371 * assignments are removed; that is, don't remove from a changeset any 07372 * item unless it's currently a member of one of those changelists. 07373 * If @a changelists is empty (or altogether @c NULL), all changelist 07374 * assignments in and under each path in @a paths (to @a depth) will 07375 * be removed. 07376 * 07377 * @note This metadata is purely a client-side "bookkeeping" 07378 * convenience, and is entirely managed by the working copy. 07379 * 07380 * @since New in 1.5. 07381 */ 07382 svn_error_t * 07383 svn_client_remove_from_changelists(const apr_array_header_t *paths, 07384 svn_depth_t depth, 07385 const apr_array_header_t *changelists, 07386 svn_client_ctx_t *ctx, 07387 apr_pool_t *pool); 07388 07389 07390 /** 07391 * Beginning at @a path, crawl to @a depth to discover every path in 07392 * or under @a path which belongs to one of the changelists in @a 07393 * changelists (an array of <tt>const char *</tt> changelist names). 07394 * If @a changelists is @c NULL, discover paths with any changelist. 07395 * Call @a callback_func (with @a callback_baton) each time a 07396 * changelist-having path is discovered. 07397 * 07398 * @a path is a local WC path. 07399 * 07400 * If @a ctx->cancel_func is not @c NULL, invoke it passing @a 07401 * ctx->cancel_baton during the recursive walk. 07402 * 07403 * @since New in 1.5. 07404 */ 07405 svn_error_t * 07406 svn_client_get_changelists(const char *path, 07407 const apr_array_header_t *changelists, 07408 svn_depth_t depth, 07409 svn_changelist_receiver_t callback_func, 07410 void *callback_baton, 07411 svn_client_ctx_t *ctx, 07412 apr_pool_t *pool); 07413 07414 /** @} */ 07415 07416 07417 07418 /** Locking commands 07419 * 07420 * @defgroup svn_client_locking_funcs Client Locking Functions 07421 * @{ 07422 */ 07423 07424 /** 07425 * Lock @a targets in the repository. @a targets is an array of 07426 * <tt>const char *</tt> paths - either all working copy paths or all URLs. 07427 * All targets must be in the same repository. 07428 * 07429 * If a target is already locked in the repository, no lock will be 07430 * acquired unless @a steal_lock is TRUE, in which case the locks are 07431 * stolen. @a comment, if non-NULL, is an xml-escapable description 07432 * stored with each lock in the repository. Each acquired lock will 07433 * be stored in the working copy if the targets are WC paths. 07434 * 07435 * For each target @a ctx->notify_func2/notify_baton2 will be used to indicate 07436 * whether it was locked. An action of #svn_wc_notify_locked 07437 * means that the path was locked. If the path was not locked because 07438 * it was out of date or there was already a lock in the repository, 07439 * the notification function will be called with 07440 * #svn_wc_notify_failed_lock, and the error passed in the notification 07441 * structure. 07442 * 07443 * Use @a pool for temporary allocations. 07444 * 07445 * @since New in 1.2. 07446 */ 07447 svn_error_t * 07448 svn_client_lock(const apr_array_header_t *targets, 07449 const char *comment, 07450 svn_boolean_t steal_lock, 07451 svn_client_ctx_t *ctx, 07452 apr_pool_t *pool); 07453 07454 /** 07455 * Unlock @a targets in the repository. @a targets is an array of 07456 * <tt>const char *</tt> paths - either all working copy paths or all URLs. 07457 * All targets must be in the same repository. 07458 * 07459 * If the targets are WC paths, and @a break_lock is FALSE, the working 07460 * copy must contain a lock for each target. 07461 * If this is not the case, or the working copy lock doesn't match the 07462 * lock token in the repository, an error will be signaled. 07463 * 07464 * If the targets are URLs, the locks may be broken even if @a break_lock 07465 * is FALSE, but only if the lock owner is the same as the 07466 * authenticated user. 07467 * 07468 * If @a break_lock is TRUE, the locks will be broken in the 07469 * repository. In both cases, the locks, if any, will be removed from 07470 * the working copy if the targets are WC paths. 07471 * 07472 * The notification functions in @a ctx will be called for each 07473 * target. If the target was successfully unlocked, 07474 * #svn_wc_notify_unlocked will be used. Else, if the error is 07475 * directly related to unlocking the path (see 07476 * #SVN_ERR_IS_UNLOCK_ERROR), #svn_wc_notify_failed_unlock will be 07477 * used and the error will be passed in the notification structure. 07478 07479 * Use @a pool for temporary allocations. 07480 * 07481 * @since New in 1.2. 07482 */ 07483 svn_error_t * 07484 svn_client_unlock(const apr_array_header_t *targets, 07485 svn_boolean_t break_lock, 07486 svn_client_ctx_t *ctx, 07487 apr_pool_t *pool); 07488 07489 /** @} */ 07490 07491 /** 07492 * @defgroup Info Show repository information about a working copy. 07493 * 07494 * @{ 07495 */ 07496 07497 /** The size of the file is unknown. 07498 * Used as value in fields of type @c apr_size_t in #svn_info_t. 07499 * 07500 * @since New in 1.5 07501 * @deprecated Provided for backward compatibility with the 1.6 API. 07502 */ 07503 #define SVN_INFO_SIZE_UNKNOWN ((apr_size_t) -1) 07504 07505 /** 07506 * A structure which describes various system-generated metadata about 07507 * a working-copy path or URL. 07508 * 07509 * @note Fields may be added to the end of this structure in future 07510 * versions. Therefore, users shouldn't allocate structures of this 07511 * type, to preserve binary compatibility. 07512 * 07513 * @since New in 1.2. 07514 * @deprecated Provided for backward compatibility with the 1.6 API. The new 07515 * API is #svn_client_info2_t. 07516 */ 07517 typedef struct svn_info_t 07518 { 07519 /** Where the item lives in the repository. */ 07520 const char *URL; 07521 07522 /** The revision of the object. If path_or_url is a working-copy 07523 * path, then this is its current working revnum. If path_or_url 07524 * is a URL, then this is the repos revision that path_or_url lives in. */ 07525 svn_revnum_t rev; 07526 07527 /** The node's kind. */ 07528 svn_node_kind_t kind; 07529 07530 /** The root URL of the repository. */ 07531 const char *repos_root_URL; 07532 07533 /** The repository's UUID. */ 07534 const char *repos_UUID; 07535 07536 /** The last revision in which this object changed. */ 07537 svn_revnum_t last_changed_rev; 07538 07539 /** The date of the last_changed_rev. */ 07540 apr_time_t last_changed_date; 07541 07542 /** The author of the last_changed_rev. */ 07543 const char *last_changed_author; 07544 07545 /** An exclusive lock, if present. Could be either local or remote. */ 07546 svn_lock_t *lock; 07547 07548 /** Whether or not to ignore the next 10 wc-specific fields. */ 07549 svn_boolean_t has_wc_info; 07550 07551 /** 07552 * @name Working-copy path fields 07553 * These things only apply to a working-copy path. 07554 * See svn_wc_entry_t for explanations. 07555 * @{ 07556 */ 07557 svn_wc_schedule_t schedule; 07558 const char *copyfrom_url; 07559 svn_revnum_t copyfrom_rev; 07560 apr_time_t text_time; 07561 apr_time_t prop_time; /* will always be 0 for svn 1.4 and later */ 07562 const char *checksum; 07563 const char *conflict_old; 07564 const char *conflict_new; 07565 const char *conflict_wrk; 07566 const char *prejfile; 07567 /** @since New in 1.5. */ 07568 const char *changelist; 07569 /** @since New in 1.5. */ 07570 svn_depth_t depth; 07571 07572 /** 07573 * Similar to working_size64, but will be #SVN_INFO_SIZE_UNKNOWN when 07574 * its value would overflow apr_size_t (so when size >= 4 GB - 1 byte). 07575 * 07576 * @deprecated Provided for backward compatibility with the 1.5 API. 07577 */ 07578 apr_size_t working_size; 07579 07580 /** @} */ 07581 07582 /** 07583 * Similar to size64, but size will be #SVN_INFO_SIZE_UNKNOWN when 07584 * its value would overflow apr_size_t (so when size >= 4 GB - 1 byte). 07585 * 07586 * @deprecated Provided for backward compatibility with the 1.5 API. 07587 */ 07588 apr_size_t size; 07589 07590 /** 07591 * The size of the file in the repository (untranslated, 07592 * e.g. without adjustment of line endings and keyword 07593 * expansion). Only applicable for file -- not directory -- URLs. 07594 * For working copy paths, size64 will be #SVN_INVALID_FILESIZE. 07595 * @since New in 1.6. 07596 */ 07597 svn_filesize_t size64; 07598 07599 /** 07600 * The size of the file after being translated into its local 07601 * representation, or #SVN_INVALID_FILESIZE if unknown. 07602 * Not applicable for directories. 07603 * @since New in 1.6. 07604 * @name Working-copy path fields 07605 * @{ 07606 */ 07607 svn_filesize_t working_size64; 07608 07609 /** 07610 * Info on any tree conflict of which this node is a victim. Otherwise NULL. 07611 * @since New in 1.6. 07612 */ 07613 svn_wc_conflict_description_t *tree_conflict; 07614 07615 /** @} */ 07616 07617 } svn_info_t; 07618 07619 07620 /** 07621 * The callback invoked by svn_client_info2(). Each invocation 07622 * describes @a path with the information present in @a info. Note 07623 * that any fields within @a info may be NULL if information is 07624 * unavailable. Use @a pool for all temporary allocation. 07625 * 07626 * @since New in 1.2. 07627 * @deprecated Provided for backward compatibility with the 1.6 API. The new 07628 * API is #svn_client_info_receiver2_t. 07629 */ 07630 typedef svn_error_t *(*svn_info_receiver_t)( 07631 void *baton, 07632 const char *path, 07633 const svn_info_t *info, 07634 apr_pool_t *pool); 07635 07636 /** 07637 * Return a duplicate of @a info, allocated in @a pool. No part of the new 07638 * structure will be shared with @a info. 07639 * 07640 * @since New in 1.3. 07641 * @deprecated Provided for backward compatibility with the 1.6 API. The new 07642 * API is #svn_client_info2_dup(). 07643 */ 07644 SVN_DEPRECATED 07645 svn_info_t * 07646 svn_info_dup(const svn_info_t *info, 07647 apr_pool_t *pool); 07648 07649 /** 07650 * A structure which describes various system-generated metadata about 07651 * a working-copy path or URL. 07652 * 07653 * @note Fields may be added to the end of this structure in future 07654 * versions. Therefore, users shouldn't allocate structures of this 07655 * type, to preserve binary compatibility. 07656 * 07657 * @since New in 1.7. 07658 */ 07659 typedef struct svn_client_info2_t 07660 { 07661 /** Where the item lives in the repository. */ 07662 const char *URL; 07663 07664 /** The revision of the object. If the target is a working-copy 07665 * path, then this is its current working revnum. If the target 07666 * is a URL, then this is the repos revision that it lives in. */ 07667 svn_revnum_t rev; 07668 07669 /** The root URL of the repository. */ 07670 const char *repos_root_URL; 07671 07672 /** The repository's UUID. */ 07673 const char *repos_UUID; 07674 07675 /** The node's kind. */ 07676 svn_node_kind_t kind; 07677 07678 /** The size of the file in the repository (untranslated, 07679 * e.g. without adjustment of line endings and keyword 07680 * expansion). Only applicable for file -- not directory -- URLs. 07681 * For working copy paths, @a size will be #SVN_INVALID_FILESIZE. */ 07682 svn_filesize_t size; 07683 07684 /** The last revision in which this object changed. */ 07685 svn_revnum_t last_changed_rev; 07686 07687 /** The date of the last_changed_rev. */ 07688 apr_time_t last_changed_date; 07689 07690 /** The author of the last_changed_rev. */ 07691 const char *last_changed_author; 07692 07693 /** An exclusive lock, if present. Could be either local or remote. */ 07694 const svn_lock_t *lock; 07695 07696 /** Possible information about the working copy, NULL if not valid. */ 07697 const svn_wc_info_t *wc_info; 07698 07699 } svn_client_info2_t; 07700 07701 /** 07702 * Return a duplicate of @a info, allocated in @a pool. No part of the new 07703 * structure will be shared with @a info. 07704 * 07705 * @since New in 1.7. 07706 */ 07707 svn_client_info2_t * 07708 svn_client_info2_dup(const svn_client_info2_t *info, 07709 apr_pool_t *pool); 07710 07711 /** 07712 * The callback invoked by info retrievers. Each invocation 07713 * describes @a abspath_or_url with the information present in @a info. 07714 * Use @a scratch_pool for all temporary allocation. 07715 * 07716 * @since New in 1.7. 07717 */ 07718 typedef svn_error_t *(*svn_client_info_receiver2_t)( 07719 void *baton, 07720 const char *abspath_or_url, 07721 const svn_client_info2_t *info, 07722 apr_pool_t *scratch_pool); 07723 07724 /** 07725 * Invoke @a receiver with @a receiver_baton to return information 07726 * about @a abspath_or_url in @a revision. The information returned is 07727 * system-generated metadata, not the sort of "property" metadata 07728 * created by users. See #svn_client_info2_t. 07729 * 07730 * If both revision arguments are either #svn_opt_revision_unspecified 07731 * or @c NULL, then information will be pulled solely from the working copy; 07732 * no network connections will be made. 07733 * 07734 * Otherwise, information will be pulled from a repository. The 07735 * actual node revision selected is determined by the @a abspath_or_url 07736 * as it exists in @a peg_revision. If @a peg_revision->kind is 07737 * #svn_opt_revision_unspecified, then it defaults to 07738 * #svn_opt_revision_head for URLs or #svn_opt_revision_working for 07739 * WC targets. 07740 * 07741 * If @a abspath_or_url is not a local path, then if @a revision is of 07742 * kind #svn_opt_revision_previous (or some other kind that requires 07743 * a local path), an error will be returned, because the desired 07744 * revision cannot be determined. 07745 * 07746 * Use the authentication baton cached in @a ctx to authenticate 07747 * against the repository. 07748 * 07749 * If @a abspath_or_url is a file, just invoke @a receiver on it. If it 07750 * is a directory, then descend according to @a depth. If @a depth is 07751 * #svn_depth_empty, invoke @a receiver on @a abspath_or_url and 07752 * nothing else; if #svn_depth_files, on @a abspath_or_url and its 07753 * immediate file children; if #svn_depth_immediates, the preceding 07754 * plus on each immediate subdirectory; if #svn_depth_infinity, then 07755 * recurse fully, invoking @a receiver on @a abspath_or_url and 07756 * everything beneath it. 07757 * 07758 * If @a fetch_excluded is TRUE, also also send excluded nodes in the working 07759 * copy to @a receiver, otherwise these are skipped. If @a fetch_actual_only 07760 * is TRUE also send nodes that don't exist as versioned but are still 07761 * tree conflicted. 07762 * 07763 * If @a include_externals is @c TRUE, recurse into externals and report about 07764 * them as well. 07765 * 07766 * @a changelists is an array of <tt>const char *</tt> changelist 07767 * names, used as a restrictive filter on items whose info is 07768 * reported; that is, don't report info about any item unless 07769 * it's a member of one of those changelists. If @a changelists is 07770 * empty (or altogether @c NULL), no changelist filtering occurs. 07771 * 07772 * @since New in 1.9. 07773 */ 07774 svn_error_t * 07775 svn_client_info4(const char *abspath_or_url, 07776 const svn_opt_revision_t *peg_revision, 07777 const svn_opt_revision_t *revision, 07778 svn_depth_t depth, 07779 svn_boolean_t fetch_excluded, 07780 svn_boolean_t fetch_actual_only, 07781 svn_boolean_t include_externals, 07782 const apr_array_header_t *changelists, 07783 svn_client_info_receiver2_t receiver, 07784 void *receiver_baton, 07785 svn_client_ctx_t *ctx, 07786 apr_pool_t *scratch_pool); 07787 07788 07789 /** Similar to svn_client_info4, but doesn't support walking externals. 07790 * 07791 * @since New in 1.7. 07792 * @deprecated Provided for backward compatibility with the 1.8 API. 07793 */ 07794 SVN_DEPRECATED 07795 svn_error_t * 07796 svn_client_info3(const char *abspath_or_url, 07797 const svn_opt_revision_t *peg_revision, 07798 const svn_opt_revision_t *revision, 07799 svn_depth_t depth, 07800 svn_boolean_t fetch_excluded, 07801 svn_boolean_t fetch_actual_only, 07802 const apr_array_header_t *changelists, 07803 svn_client_info_receiver2_t receiver, 07804 void *receiver_baton, 07805 svn_client_ctx_t *ctx, 07806 apr_pool_t *scratch_pool); 07807 07808 /** Similar to svn_client_info3, but uses an svn_info_receiver_t instead of 07809 * a #svn_client_info_receiver2_t, and @a path_or_url may be a relative path. 07810 * 07811 * @since New in 1.5. 07812 * @deprecated Provided for backward compatibility with the 1.6 API. 07813 */ 07814 SVN_DEPRECATED 07815 svn_error_t * 07816 svn_client_info2(const char *path_or_url, 07817 const svn_opt_revision_t *peg_revision, 07818 const svn_opt_revision_t *revision, 07819 svn_info_receiver_t receiver, 07820 void *receiver_baton, 07821 svn_depth_t depth, 07822 const apr_array_header_t *changelists, 07823 svn_client_ctx_t *ctx, 07824 apr_pool_t *pool); 07825 07826 /** 07827 * Similar to svn_client_info2() but with @a changelists passed as @c 07828 * NULL, and @a depth set according to @a recurse: if @a recurse is 07829 * TRUE, @a depth is #svn_depth_infinity, else #svn_depth_empty. 07830 * 07831 * @deprecated Provided for backward compatibility with the 1.4 API. 07832 */ 07833 SVN_DEPRECATED 07834 svn_error_t * 07835 svn_client_info(const char *path_or_url, 07836 const svn_opt_revision_t *peg_revision, 07837 const svn_opt_revision_t *revision, 07838 svn_info_receiver_t receiver, 07839 void *receiver_baton, 07840 svn_boolean_t recurse, 07841 svn_client_ctx_t *ctx, 07842 apr_pool_t *pool); 07843 07844 /** 07845 * Set @a *wcroot_abspath to the local abspath of the root of the 07846 * working copy in which @a local_abspath resides. 07847 * 07848 * @since New in 1.7. 07849 */ 07850 svn_error_t * 07851 svn_client_get_wc_root(const char **wcroot_abspath, 07852 const char *local_abspath, 07853 svn_client_ctx_t *ctx, 07854 apr_pool_t *result_pool, 07855 apr_pool_t *scratch_pool); 07856 07857 /** 07858 * Set @a *min_revision and @a *max_revision to the lowest and highest 07859 * revision numbers found within @a local_abspath. If @a committed is 07860 * TRUE, set @a *min_revision and @a *max_revision to the lowest and 07861 * highest comitted (i.e. "last changed") revision numbers, 07862 * respectively. NULL may be passed for either of @a min_revision and 07863 * @a max_revision to indicate the caller's lack of interest in the 07864 * value. Use @a scratch_pool for temporary allocations. 07865 * 07866 * @since New in 1.7. 07867 */ 07868 svn_error_t * 07869 svn_client_min_max_revisions(svn_revnum_t *min_revision, 07870 svn_revnum_t *max_revision, 07871 const char *local_abspath, 07872 svn_boolean_t committed, 07873 svn_client_ctx_t *ctx, 07874 apr_pool_t *scratch_pool); 07875 07876 /** @} */ 07877 07878 07879 /** 07880 * @defgroup Patch Apply a patch to the working copy 07881 * 07882 * @{ 07883 */ 07884 07885 /** 07886 * The callback invoked by svn_client_patch() before attempting to patch 07887 * the target file at @a canon_path_from_patchfile (the path as parsed from 07888 * the patch file, but in canonicalized form). The callback can set 07889 * @a *filtered to @c TRUE to prevent the file from being patched, or else 07890 * must set it to @c FALSE. 07891 * 07892 * The callback is also provided with @a patch_abspath, the path of a 07893 * temporary file containing the patched result, and with @a reject_abspath, 07894 * the path to a temporary file containing the diff text of any hunks 07895 * which were rejected during patching. 07896 * 07897 * Because the callback is invoked before the patching attempt is made, 07898 * there is no guarantee that the target file will actually be patched 07899 * successfully. Client implementations must pay attention to notification 07900 * feedback provided by svn_client_patch() to find out which paths were 07901 * patched successfully. 07902 * 07903 * Note also that the files at @a patch_abspath and @a reject_abspath are 07904 * guaranteed to remain on disk after patching only if the 07905 * @a remove_tempfiles parameter for svn_client_patch() is @c FALSE. 07906 * 07907 * The const char * parameters may be allocated in @a scratch_pool which 07908 * will be cleared after each invocation. 07909 * 07910 * @since New in 1.7. 07911 */ 07912 typedef svn_error_t *(*svn_client_patch_func_t)( 07913 void *baton, 07914 svn_boolean_t *filtered, 07915 const char *canon_path_from_patchfile, 07916 const char *patch_abspath, 07917 const char *reject_abspath, 07918 apr_pool_t *scratch_pool); 07919 07920 /** 07921 * Apply a unidiff patch that's located at absolute path 07922 * @a patch_abspath to the working copy directory at @a wc_dir_abspath. 07923 * 07924 * This function makes a best-effort attempt at applying the patch. 07925 * It might skip patch targets which cannot be patched (e.g. targets 07926 * that are outside of the working copy). It will also reject hunks 07927 * which cannot be applied to a target in case the hunk's context 07928 * does not match anywhere in the patch target. 07929 * 07930 * If @a dry_run is TRUE, the patching process is carried out, and full 07931 * notification feedback is provided, but the working copy is not modified. 07932 * 07933 * @a strip_count specifies how many leading path components should be 07934 * stripped from paths obtained from the patch. It is an error if a 07935 * negative strip count is passed. 07936 * 07937 * If @a reverse is @c TRUE, apply patches in reverse, deleting lines 07938 * the patch would add and adding lines the patch would delete. 07939 * 07940 * If @a ignore_whitespace is TRUE, allow patches to be applied if they 07941 * only differ from the target by whitespace. 07942 * 07943 * If @a remove_tempfiles is TRUE, lifetimes of temporary files created 07944 * during patching will be managed internally. Otherwise, the caller should 07945 * take ownership of these files, the names of which can be obtained by 07946 * passing a @a patch_func callback. 07947 * 07948 * If @a patch_func is non-NULL, invoke @a patch_func with @a patch_baton 07949 * for each patch target processed. 07950 * 07951 * If @a ctx->notify_func2 is non-NULL, invoke @a ctx->notify_func2 with 07952 * @a ctx->notify_baton2 as patching progresses. 07953 * 07954 * If @a ctx->cancel_func is non-NULL, invoke it passing @a 07955 * ctx->cancel_baton at various places during the operation. 07956 * 07957 * Use @a scratch_pool for temporary allocations. 07958 * 07959 * @since New in 1.7. 07960 */ 07961 svn_error_t * 07962 svn_client_patch(const char *patch_abspath, 07963 const char *wc_dir_abspath, 07964 svn_boolean_t dry_run, 07965 int strip_count, 07966 svn_boolean_t reverse, 07967 svn_boolean_t ignore_whitespace, 07968 svn_boolean_t remove_tempfiles, 07969 svn_client_patch_func_t patch_func, 07970 void *patch_baton, 07971 svn_client_ctx_t *ctx, 07972 apr_pool_t *scratch_pool); 07973 07974 /** @} */ 07975 07976 /** @} end group: Client working copy management */ 07977 07978 /** 07979 * 07980 * @defgroup clnt_sessions Client session related functions 07981 * 07982 * @{ 07983 * 07984 */ 07985 07986 07987 /* Converting paths to URLs. */ 07988 07989 /** Set @a *url to the URL for @a path_or_url allocated in result_pool. 07990 * 07991 * If @a path_or_url is already a URL, set @a *url to @a path_or_url. 07992 * 07993 * If @a path_or_url is a versioned item, set @a *url to @a 07994 * path_or_url's entry URL. If @a path_or_url is unversioned (has 07995 * no entry), set @a *url to NULL. 07996 * 07997 * Use @a ctx->wc_ctx to retrieve the information. Use 07998 ** @a scratch_pool for temporary allocations. 07999 * 08000 * @since New in 1.7. 08001 */ 08002 svn_error_t * 08003 svn_client_url_from_path2(const char **url, 08004 const char *path_or_url, 08005 svn_client_ctx_t *ctx, 08006 apr_pool_t *result_pool, 08007 apr_pool_t *scratch_pool); 08008 08009 /** Similar to svn_client_url_from_path2(), but without a context argument. 08010 * 08011 * @since New in 1.5. 08012 * @deprecated Provided for backward compatibility with the 1.6 API. 08013 */ 08014 SVN_DEPRECATED 08015 svn_error_t * 08016 svn_client_url_from_path(const char **url, 08017 const char *path_or_url, 08018 apr_pool_t *pool); 08019 08020 08021 08022 /* Fetching a repository's root URL and UUID. */ 08023 08024 /** Set @a *repos_root_url and @a *repos_uuid, to the root URL and UUID of 08025 * the repository in which @a abspath_or_url is versioned. Use the 08026 * authentication baton and working copy context cached in @a ctx as 08027 * necessary. @a repos_root_url and/or @a repos_uuid may be NULL if not 08028 * wanted. 08029 * 08030 * This function will open a temporary RA session to the repository if 08031 * necessary to get the information. 08032 * 08033 * Allocate @a *repos_root_url and @a *repos_uuid in @a result_pool. 08034 * Use @a scratch_pool for temporary allocations. 08035 * 08036 * @since New in 1.8. 08037 */ 08038 svn_error_t * 08039 svn_client_get_repos_root(const char **repos_root_url, 08040 const char **repos_uuid, 08041 const char *abspath_or_url, 08042 svn_client_ctx_t *ctx, 08043 apr_pool_t *result_pool, 08044 apr_pool_t *scratch_pool); 08045 08046 /** Set @a *url to the repository root URL of the repository in which 08047 * @a path_or_url is versioned (or scheduled to be versioned), 08048 * allocated in @a pool. @a ctx is required for possible repository 08049 * authentication. 08050 * 08051 * @since New in 1.5. 08052 * @deprecated Provided for backward compatibility with the 1.7 API. Use 08053 * svn_client_get_repos_root() instead, with an absolute path. 08054 */ 08055 SVN_DEPRECATED 08056 svn_error_t * 08057 svn_client_root_url_from_path(const char **url, 08058 const char *path_or_url, 08059 svn_client_ctx_t *ctx, 08060 apr_pool_t *pool); 08061 08062 /** Get repository @a uuid for @a url. 08063 * 08064 * Use a @a pool to open a temporary RA session to @a url, discover the 08065 * repository uuid, and free the session. Return the uuid in @a uuid, 08066 * allocated in @a pool. @a ctx is required for possible repository 08067 * authentication. 08068 * 08069 * @deprecated Provided for backward compatibility with the 1.7 API. Use 08070 * svn_client_get_repos_root() instead. 08071 */ 08072 SVN_DEPRECATED 08073 svn_error_t * 08074 svn_client_uuid_from_url(const char **uuid, 08075 const char *url, 08076 svn_client_ctx_t *ctx, 08077 apr_pool_t *pool); 08078 08079 08080 /** Return the repository @a uuid for working-copy @a local_abspath, 08081 * allocated in @a result_pool. Use @a ctx->wc_ctx to retrieve the 08082 * information. 08083 * 08084 * Use @a scratch_pool for temporary allocations. 08085 * 08086 * @since New in 1.7. 08087 * @deprecated Provided for backward compatibility with the 1.7 API. Use 08088 * svn_client_get_repos_root() instead. 08089 */ 08090 SVN_DEPRECATED 08091 svn_error_t * 08092 svn_client_uuid_from_path2(const char **uuid, 08093 const char *local_abspath, 08094 svn_client_ctx_t *ctx, 08095 apr_pool_t *result_pool, 08096 apr_pool_t *scratch_pool); 08097 08098 /** Similar to svn_client_uuid_from_path2(), but with a relative path and 08099 * an access baton. 08100 * 08101 * @deprecated Provided for backward compatibility with the 1.6 API. 08102 */ 08103 SVN_DEPRECATED 08104 svn_error_t * 08105 svn_client_uuid_from_path(const char **uuid, 08106 const char *path, 08107 svn_wc_adm_access_t *adm_access, 08108 svn_client_ctx_t *ctx, 08109 apr_pool_t *pool); 08110 08111 08112 /* Opening RA sessions. */ 08113 08114 /** Open an RA session rooted at @a url, and return it in @a *session. 08115 * 08116 * Use the authentication baton stored in @a ctx for authentication. 08117 * @a *session is allocated in @a result_pool. 08118 * 08119 * If @a wri_abspath is not NULL, use the working copy identified by @a 08120 * wri_abspath to potentially avoid transferring unneeded data. 08121 * 08122 * @note This function is similar to svn_ra_open4(), but the caller avoids 08123 * having to providing its own callback functions. 08124 * @since New in 1.8. 08125 */ 08126 svn_error_t * 08127 svn_client_open_ra_session2(svn_ra_session_t **session, 08128 const char *url, 08129 const char *wri_abspath, 08130 svn_client_ctx_t *ctx, 08131 apr_pool_t *result_pool, 08132 apr_pool_t *scratch_pool); 08133 08134 /** Similar to svn_client_open_ra_session2(), but with @ wri_abspath 08135 * always passed as NULL, and with the same pool used as both @a 08136 * result_pool and @a scratch_pool. 08137 * 08138 * @since New in 1.3. 08139 * @deprecated Provided for backward compatibility with the 1.7 API. 08140 */ 08141 SVN_DEPRECATED 08142 svn_error_t * 08143 svn_client_open_ra_session(svn_ra_session_t **session, 08144 const char *url, 08145 svn_client_ctx_t *ctx, 08146 apr_pool_t *pool); 08147 08148 08149 /** @} end group: Client session related functions */ 08150 08151 /** @} */ 08152 08153 #ifdef __cplusplus 08154 } 08155 #endif /* __cplusplus */ 08156 08157 #endif /* SVN_CLIENT_H */
1.6.1