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