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_wc.h 00024 * @brief Subversion's working copy library 00025 * 00026 * Requires: 00027 * - A working copy 00028 * 00029 * Provides: 00030 * - Ability to manipulate working copy's versioned data. 00031 * - Ability to manipulate working copy's administrative files. 00032 * 00033 * Used By: 00034 * - Clients. 00035 * 00036 * Notes: 00037 * The 'path' parameters to most of the older functions can be 00038 * absolute or relative (relative to current working 00039 * directory). If there are any cases where they are 00040 * relative to the path associated with the 00041 * 'svn_wc_adm_access_t *adm_access' baton passed along with the 00042 * path, those cases should be explicitly documented, and if they 00043 * are not, please fix it. All new functions introduced since 00044 * Subversion 1.7 require absolute paths, unless explicitly 00045 * documented otherwise. 00046 * 00047 * Starting with Subversion 1.7, several arguments are re-ordered 00048 * to be more consistent through the api. The common ordering used 00049 * is: 00050 * 00051 * Firsts: 00052 * - Output arguments 00053 * Then: 00054 * - Working copy context 00055 * - Local abspath 00056 * Followed by: 00057 * - Function specific arguments 00058 * - Specific callbacks with their batons 00059 * Finally: 00060 * - Generic callbacks (with baton) from directly functional to 00061 * just observing: 00062 * - svn_wc_conflict_resolver_func2_t 00063 * - svn_wc_external_update_t 00064 * - svn_cancel_func_t 00065 * - svn_wc_notify_func2_t 00066 * - Result pool 00067 * - Scratch pool. 00068 */ 00069 00070 #ifndef SVN_WC_H 00071 #define SVN_WC_H 00072 00073 #include <apr.h> 00074 #include <apr_pools.h> 00075 #include <apr_tables.h> 00076 #include <apr_hash.h> 00077 #include <apr_time.h> 00078 #include <apr_file_io.h> 00079 00080 #include "svn_types.h" 00081 #include "svn_string.h" 00082 #include "svn_checksum.h" 00083 #include "svn_io.h" 00084 #include "svn_delta.h" /* for svn_stream_t */ 00085 #include "svn_opt.h" 00086 #include "svn_ra.h" /* for svn_ra_reporter_t type */ 00087 00088 #ifdef __cplusplus 00089 extern "C" { 00090 #endif /* __cplusplus */ 00091 00092 00093 /** 00094 * Get libsvn_wc version information. 00095 * 00096 * @since New in 1.1. 00097 */ 00098 const svn_version_t * 00099 svn_wc_version(void); 00100 00101 00102 /** 00103 * @defgroup svn_wc Working copy management 00104 * @{ 00105 */ 00106 00107 00108 /** Flags for use with svn_wc_translated_file2() and svn_wc_translated_stream(). 00109 * 00110 * @defgroup translate_flags Translation flags 00111 * @{ 00112 */ 00113 00114 /** Translate from Normal Form. 00115 * 00116 * The working copy text bases and repository files are stored 00117 * in normal form. Some files' contents - or ever representation - 00118 * differs between the working copy and the normal form. This flag 00119 * specifies to take the latter form as input and transform it 00120 * to the former. 00121 * 00122 * Either this flag or #SVN_WC_TRANSLATE_TO_NF should be specified, 00123 * but not both. 00124 */ 00125 #define SVN_WC_TRANSLATE_FROM_NF 0x00000000 00126 00127 /** Translate to Normal Form. 00128 * 00129 * Either this flag or #SVN_WC_TRANSLATE_FROM_NF should be specified, 00130 * but not both. 00131 */ 00132 #define SVN_WC_TRANSLATE_TO_NF 0x00000001 00133 00134 /** Force repair of eol styles, making sure the output file consistently 00135 * contains the one eol style as specified by the svn:eol-style 00136 * property and the required translation direction. 00137 * 00138 */ 00139 #define SVN_WC_TRANSLATE_FORCE_EOL_REPAIR 0x00000002 00140 00141 /** Don't register a pool cleanup to delete the output file */ 00142 #define SVN_WC_TRANSLATE_NO_OUTPUT_CLEANUP 0x00000004 00143 00144 /** Guarantee a new file is created on successful return. 00145 * The default shortcuts translation by returning the path 00146 * of the untranslated file when no translation is required. 00147 */ 00148 #define SVN_WC_TRANSLATE_FORCE_COPY 0x00000008 00149 00150 /** Use a non-wc-local tmp directory for creating output files, 00151 * instead of in the working copy admin tmp area which is the default. 00152 * 00153 * @since New in 1.4. 00154 */ 00155 #define SVN_WC_TRANSLATE_USE_GLOBAL_TMP 0x00000010 00156 00157 /** @} */ 00158 00159 00160 /** 00161 * @defgroup svn_wc_context Working copy context 00162 * @{ 00163 */ 00164 00165 /** The context for all working copy interactions. 00166 * 00167 * This is the client-facing datastructure API consumers are required 00168 * to create and use when interacting with a working copy. Multiple 00169 * contexts can be created for the same working copy simultaneously, within 00170 * the same process or different processes. Context mutexing will be handled 00171 * internally by the working copy library. 00172 * 00173 * @note: #svn_wc_context_t should be passed by non-const pointer in all 00174 * APIs, even for read-only operations, as it contains mutable data (caching, 00175 * etc.). 00176 * 00177 * @since New in 1.7. 00178 */ 00179 typedef struct svn_wc_context_t svn_wc_context_t; 00180 00181 /** Create a context for the working copy, and return it in @a *wc_ctx. This 00182 * context is not associated with a particular working copy, but as operations 00183 * are performed, will load the appropriate working copy information. 00184 * 00185 * @a config should hold the various configuration options that may apply to 00186 * this context. It should live at least as long as @a result_pool. It may 00187 * be @c NULL. 00188 * 00189 * The context will be allocated in @a result_pool, and will use @a 00190 * result_pool for any internal allocations requiring the same longevity as 00191 * the context. The context will be automatically destroyed, and its 00192 * resources released, when @a result_pool is cleared, or it may be manually 00193 * destroyed by invoking svn_wc_context_destroy(). 00194 * 00195 * Use @a scratch_pool for temporary allocations. It may be cleared 00196 * immediately upon returning from this function. 00197 * 00198 * @since New in 1.7. 00199 */ 00200 svn_error_t * 00201 svn_wc_context_create(svn_wc_context_t **wc_ctx, 00202 const svn_config_t *config, 00203 apr_pool_t *result_pool, 00204 apr_pool_t *scratch_pool); 00205 00206 00207 /** Destroy the working copy context described by @a wc_ctx, releasing any 00208 * acquired resources. 00209 * 00210 * @since New in 1.7. 00211 */ 00212 svn_error_t * 00213 svn_wc_context_destroy(svn_wc_context_t *wc_ctx); 00214 00215 00216 /** @} */ 00217 00218 00219 /** 00220 * Locking/Opening/Closing using adm access batons. 00221 * 00222 * @defgroup svn_wc_adm_access Adm access batons (deprecated) 00223 * @{ 00224 */ 00225 00226 /** Baton for access to a working copy administrative area. 00227 * 00228 * Access batons can be grouped into sets, by passing an existing open 00229 * baton when opening a new baton. Given one baton in a set, other batons 00230 * may be retrieved. This allows an entire hierarchy to be locked, and 00231 * then the set of batons can be passed around by passing a single baton. 00232 * 00233 * @deprecated Provided for backward compatibility with the 1.6 API. 00234 * New code should use a #svn_wc_context_t object to access the working 00235 * copy. 00236 */ 00237 typedef struct svn_wc_adm_access_t svn_wc_adm_access_t; 00238 00239 00240 /** 00241 * Return, in @a *adm_access, a pointer to a new access baton for the working 00242 * copy administrative area associated with the directory @a path. If 00243 * @a write_lock is TRUE the baton will include a write lock, otherwise the 00244 * baton can only be used for read access. If @a path refers to a directory 00245 * that is already write locked then the error #SVN_ERR_WC_LOCKED will be 00246 * returned. The error #SVN_ERR_WC_NOT_DIRECTORY will be returned if 00247 * @a path is not a versioned directory. 00248 * 00249 * If @a associated is an open access baton then @a adm_access will be added 00250 * to the set containing @a associated. @a associated can be @c NULL, in 00251 * which case @a adm_access is the start of a new set. 00252 * 00253 * @a levels_to_lock specifies how far to lock. Zero means just the specified 00254 * directory. Any negative value means to lock the entire working copy 00255 * directory hierarchy under @a path. A positive value indicates the number of 00256 * levels of directories to lock -- 1 means just immediate subdirectories, 2 00257 * means immediate subdirectories and their subdirectories, etc. All the 00258 * access batons will become part of the set containing @a adm_access. This 00259 * is an all-or-nothing option, if it is not possible to lock all the 00260 * requested directories then an error will be returned and @a adm_access will 00261 * be invalid, with the exception that subdirectories of @a path that are 00262 * missing from the physical filesystem will not be locked and will not cause 00263 * an error. The error #SVN_ERR_WC_LOCKED will be returned if a 00264 * subdirectory of @a path is already write locked. 00265 * 00266 * If @a cancel_func is non-NULL, call it with @a cancel_baton to determine 00267 * if the client has canceled the operation. 00268 * 00269 * @a pool will be used to allocate memory for the baton and any subsequently 00270 * cached items. If @a adm_access has not been closed when the pool is 00271 * cleared, it will be closed automatically at that point, and removed from 00272 * its set. A baton closed in this way will not remove physical locks from 00273 * the working copy if cleanup is required. 00274 * 00275 * The first baton in a set, with @a associated passed as @c NULL, must have 00276 * the longest lifetime of all the batons in the set. This implies it must be 00277 * the root of the hierarchy. 00278 * 00279 * @since New in 1.2. 00280 * @deprecated Provided for backward compatibility with the 1.6 API. 00281 * Callers should use a #svn_wc_context_t object to access the working 00282 * copy. 00283 */ 00284 SVN_DEPRECATED 00285 svn_error_t * 00286 svn_wc_adm_open3(svn_wc_adm_access_t **adm_access, 00287 svn_wc_adm_access_t *associated, 00288 const char *path, 00289 svn_boolean_t write_lock, 00290 int levels_to_lock, 00291 svn_cancel_func_t cancel_func, 00292 void *cancel_baton, 00293 apr_pool_t *pool); 00294 00295 /** 00296 * Similar to svn_wc_adm_open3(), but without cancellation support. 00297 * 00298 * @deprecated Provided for backward compatibility with the 1.1 API. 00299 */ 00300 SVN_DEPRECATED 00301 svn_error_t * 00302 svn_wc_adm_open2(svn_wc_adm_access_t **adm_access, 00303 svn_wc_adm_access_t *associated, 00304 const char *path, 00305 svn_boolean_t write_lock, 00306 int levels_to_lock, 00307 apr_pool_t *pool); 00308 00309 /** 00310 * Similar to svn_wc_adm_open2(), but with @a tree_lock instead of 00311 * @a levels_to_lock. @a levels_to_lock is set to -1 if @a tree_lock 00312 * is @c TRUE, else 0. 00313 * 00314 * @deprecated Provided for backward compatibility with the 1.0 API. 00315 */ 00316 SVN_DEPRECATED 00317 svn_error_t * 00318 svn_wc_adm_open(svn_wc_adm_access_t **adm_access, 00319 svn_wc_adm_access_t *associated, 00320 const char *path, 00321 svn_boolean_t write_lock, 00322 svn_boolean_t tree_lock, 00323 apr_pool_t *pool); 00324 00325 /** 00326 * Checks the working copy to determine the node type of @a path. If 00327 * @a path is a versioned directory then the behaviour is like that of 00328 * svn_wc_adm_open3(), otherwise, if @a path is a file or does not 00329 * exist, then the behaviour is like that of svn_wc_adm_open3() with 00330 * @a path replaced by the parent directory of @a path. If @a path is 00331 * an unversioned directory, the behaviour is also like that of 00332 * svn_wc_adm_open3() on the parent, except that if the open fails, 00333 * then the returned #SVN_ERR_WC_NOT_DIRECTORY error refers to @a path, 00334 * not to @a path's parent. 00335 * 00336 * @since New in 1.2. 00337 * @deprecated Provided for backward compatibility with the 1.6 API. 00338 * Callers should use a #svn_wc_context_t object to access the working 00339 * copy. 00340 */ 00341 SVN_DEPRECATED 00342 svn_error_t * 00343 svn_wc_adm_probe_open3(svn_wc_adm_access_t **adm_access, 00344 svn_wc_adm_access_t *associated, 00345 const char *path, 00346 svn_boolean_t write_lock, 00347 int levels_to_lock, 00348 svn_cancel_func_t cancel_func, 00349 void *cancel_baton, 00350 apr_pool_t *pool); 00351 00352 /** 00353 * Similar to svn_wc_adm_probe_open3() without the cancel 00354 * functionality. 00355 * 00356 * @deprecated Provided for backward compatibility with the 1.1 API. 00357 */ 00358 SVN_DEPRECATED 00359 svn_error_t * 00360 svn_wc_adm_probe_open2(svn_wc_adm_access_t **adm_access, 00361 svn_wc_adm_access_t *associated, 00362 const char *path, 00363 svn_boolean_t write_lock, 00364 int levels_to_lock, 00365 apr_pool_t *pool); 00366 00367 /** 00368 * Similar to svn_wc_adm_probe_open2(), but with @a tree_lock instead of 00369 * @a levels_to_lock. @a levels_to_lock is set to -1 if @a tree_lock 00370 * is @c TRUE, else 0. 00371 * 00372 * @deprecated Provided for backward compatibility with the 1.0 API. 00373 */ 00374 SVN_DEPRECATED 00375 svn_error_t * 00376 svn_wc_adm_probe_open(svn_wc_adm_access_t **adm_access, 00377 svn_wc_adm_access_t *associated, 00378 const char *path, 00379 svn_boolean_t write_lock, 00380 svn_boolean_t tree_lock, 00381 apr_pool_t *pool); 00382 00383 /** 00384 * Open access batons for @a path and return in @a *anchor_access and 00385 * @a *target the anchor and target required to drive an editor. Return 00386 * in @a *target_access the access baton for the target, which may be the 00387 * same as @a *anchor_access (in which case @a *target is the empty 00388 * string, never NULL). All the access batons will be in the 00389 * @a *anchor_access set. 00390 * 00391 * @a levels_to_lock determines the levels_to_lock used when opening 00392 * @a path if @a path is a versioned directory, @a levels_to_lock is 00393 * ignored otherwise. If @a write_lock is @c TRUE the access batons 00394 * will hold write locks. 00395 * 00396 * If @a cancel_func is non-NULL, call it with @a cancel_baton to determine 00397 * if the client has canceled the operation. 00398 * 00399 * This function is essentially a combination of svn_wc_adm_open3() and 00400 * svn_wc_get_actual_target(), with the emphasis on reducing physical IO. 00401 * 00402 * @since New in 1.2. 00403 * @deprecated Provided for backward compatibility with the 1.6 API. 00404 * Callers should use a #svn_wc_context_t object to access the working 00405 * copy. 00406 */ 00407 SVN_DEPRECATED 00408 svn_error_t * 00409 svn_wc_adm_open_anchor(svn_wc_adm_access_t **anchor_access, 00410 svn_wc_adm_access_t **target_access, 00411 const char **target, 00412 const char *path, 00413 svn_boolean_t write_lock, 00414 int levels_to_lock, 00415 svn_cancel_func_t cancel_func, 00416 void *cancel_baton, 00417 apr_pool_t *pool); 00418 00419 /** Return, in @a *adm_access, a pointer to an existing access baton associated 00420 * with @a path. @a path must be a directory that is locked as part of the 00421 * set containing the @a associated access baton. 00422 * 00423 * If the requested access baton is marked as missing in, or is simply 00424 * absent from, @a associated, return #SVN_ERR_WC_NOT_LOCKED. 00425 * 00426 * @a pool is used only for local processing, it is not used for the batons. 00427 * 00428 * @deprecated Provided for backward compatibility with the 1.6 API. 00429 */ 00430 SVN_DEPRECATED 00431 svn_error_t * 00432 svn_wc_adm_retrieve(svn_wc_adm_access_t **adm_access, 00433 svn_wc_adm_access_t *associated, 00434 const char *path, 00435 apr_pool_t *pool); 00436 00437 /** Check the working copy to determine the node type of @a path. If 00438 * @a path is a versioned directory then the behaviour is like that of 00439 * svn_wc_adm_retrieve(), otherwise, if @a path is a file, an unversioned 00440 * directory, or does not exist, then the behaviour is like that of 00441 * svn_wc_adm_retrieve() with @a path replaced by the parent directory of 00442 * @a path. 00443 * 00444 * @deprecated Provided for backward compatibility with the 1.6 API. 00445 */ 00446 SVN_DEPRECATED 00447 svn_error_t * 00448 svn_wc_adm_probe_retrieve(svn_wc_adm_access_t **adm_access, 00449 svn_wc_adm_access_t *associated, 00450 const char *path, 00451 apr_pool_t *pool); 00452 00453 /** 00454 * Try various ways to obtain an access baton for @a path. 00455 * 00456 * First, try to obtain @a *adm_access via svn_wc_adm_probe_retrieve(), 00457 * but if this fails because @a associated can't give a baton for 00458 * @a path or @a path's parent, then try svn_wc_adm_probe_open3(), 00459 * this time passing @a write_lock and @a levels_to_lock. If there is 00460 * still no access because @a path is not a versioned directory, then 00461 * just set @a *adm_access to NULL and return success. But if it is 00462 * because @a path is locked, then return the error #SVN_ERR_WC_LOCKED, 00463 * and the effect on @a *adm_access is undefined. (Or if the attempt 00464 * fails for any other reason, return the corresponding error, and the 00465 * effect on @a *adm_access is also undefined.) 00466 * 00467 * If svn_wc_adm_probe_open3() succeeds, then add @a *adm_access to 00468 * @a associated. 00469 * 00470 * If @a cancel_func is non-NULL, call it with @a cancel_baton to determine 00471 * if the client has canceled the operation. 00472 * 00473 * Use @a pool only for local processing, not to allocate @a *adm_access. 00474 * 00475 * @since New in 1.2. 00476 * @deprecated Provided for backward compatibility with the 1.6 API. 00477 */ 00478 SVN_DEPRECATED 00479 svn_error_t * 00480 svn_wc_adm_probe_try3(svn_wc_adm_access_t **adm_access, 00481 svn_wc_adm_access_t *associated, 00482 const char *path, 00483 svn_boolean_t write_lock, 00484 int levels_to_lock, 00485 svn_cancel_func_t cancel_func, 00486 void *cancel_baton, 00487 apr_pool_t *pool); 00488 00489 /** 00490 * Similar to svn_wc_adm_probe_try3() without the cancel 00491 * functionality. 00492 * 00493 * @deprecated Provided for backward compatibility with the 1.1 API. 00494 */ 00495 SVN_DEPRECATED 00496 svn_error_t * 00497 svn_wc_adm_probe_try2(svn_wc_adm_access_t **adm_access, 00498 svn_wc_adm_access_t *associated, 00499 const char *path, 00500 svn_boolean_t write_lock, 00501 int levels_to_lock, 00502 apr_pool_t *pool); 00503 00504 /** 00505 * Similar to svn_wc_adm_probe_try2(), but with @a tree_lock instead of 00506 * @a levels_to_lock. @a levels_to_lock is set to -1 if @a tree_lock 00507 * is @c TRUE, else 0. 00508 * 00509 * @deprecated Provided for backward compatibility with the 1.0 API. 00510 */ 00511 SVN_DEPRECATED 00512 svn_error_t * 00513 svn_wc_adm_probe_try(svn_wc_adm_access_t **adm_access, 00514 svn_wc_adm_access_t *associated, 00515 const char *path, 00516 svn_boolean_t write_lock, 00517 svn_boolean_t tree_lock, 00518 apr_pool_t *pool); 00519 00520 00521 /** Give up the access baton @a adm_access, and its lock if any. This will 00522 * recursively close any batons in the same set that are direct 00523 * subdirectories of @a adm_access. Any physical locks will be removed from 00524 * the working copy. Lock removal is unconditional, there is no check to 00525 * determine if cleanup is required. 00526 * 00527 * Any temporary allocations are performed using @a scratch_pool. 00528 * 00529 * @since New in 1.6 00530 * @deprecated Provided for backward compatibility with the 1.6 API. 00531 */ 00532 SVN_DEPRECATED 00533 svn_error_t * 00534 svn_wc_adm_close2(svn_wc_adm_access_t *adm_access, 00535 apr_pool_t *scratch_pool); 00536 00537 /** 00538 * Similar to svn_wc_adm_close2(), but with the internal pool of @a adm_access 00539 * used for temporary allocations. 00540 * 00541 * @deprecated Provided for backward compatibility with the 1.5 API. 00542 */ 00543 SVN_DEPRECATED 00544 svn_error_t * 00545 svn_wc_adm_close(svn_wc_adm_access_t *adm_access); 00546 00547 /** Return the path used to open the access baton @a adm_access. 00548 * 00549 * @deprecated Provided for backward compatibility with the 1.6 API. 00550 */ 00551 SVN_DEPRECATED 00552 const char * 00553 svn_wc_adm_access_path(const svn_wc_adm_access_t *adm_access); 00554 00555 /** Return the pool used by access baton @a adm_access. 00556 * 00557 * @deprecated Provided for backward compatibility with the 1.6 API. 00558 */ 00559 SVN_DEPRECATED 00560 apr_pool_t * 00561 svn_wc_adm_access_pool(const svn_wc_adm_access_t *adm_access); 00562 00563 /** Return @c TRUE is the access baton @a adm_access has a write lock, 00564 * @c FALSE otherwise. Compared to svn_wc_locked() this is a cheap, fast 00565 * function that doesn't access the filesystem. 00566 * 00567 * @deprecated Provided for backward compatibility with the 1.6 API. 00568 * New code should use svn_wc_locked2() instead. 00569 */ 00570 SVN_DEPRECATED 00571 svn_boolean_t 00572 svn_wc_adm_locked(const svn_wc_adm_access_t *adm_access); 00573 00574 /** @} */ 00575 00576 00577 /** Gets up to two booleans indicating whether a path is locked for 00578 * writing. 00579 * 00580 * @a locked_here is set to TRUE when a write lock on @a local_abspath 00581 * exists in @a wc_ctx. @a locked is set to TRUE when there is a 00582 * write_lock on @a local_abspath 00583 * 00584 * @a locked_here and/or @a locked can be NULL when you are not 00585 * interested in a specific value 00586 * 00587 * @since New in 1.7. 00588 */ 00589 svn_error_t * 00590 svn_wc_locked2(svn_boolean_t *locked_here, 00591 svn_boolean_t *locked, 00592 svn_wc_context_t *wc_ctx, 00593 const char *local_abspath, 00594 apr_pool_t *scratch_pool); 00595 00596 /** Set @a *locked to non-zero if @a path is locked, else set it to zero. 00597 * 00598 * New code should use svn_wc_locked2() instead. 00599 * 00600 * @deprecated Provided for backward compatibility with the 1.6 API. 00601 */ 00602 SVN_DEPRECATED 00603 svn_error_t * 00604 svn_wc_locked(svn_boolean_t *locked, 00605 const char *path, 00606 apr_pool_t *pool); 00607 00608 00609 /** 00610 * @defgroup svn_wc_adm_dir_name Name of Subversion's admin dir 00611 * @{ 00612 */ 00613 00614 /** The default name of the administrative subdirectory. 00615 * 00616 * Ideally, this would be completely private to wc internals (in fact, 00617 * it used to be that adm_subdir() in adm_files.c was the only function 00618 * who knew the adm subdir's name). However, import wants to protect 00619 * against importing administrative subdirs, so now the name is a 00620 * matter of public record. 00621 * 00622 * @deprecated Provided for backward compatibility with the 1.2 API. 00623 */ 00624 #define SVN_WC_ADM_DIR_NAME ".svn" 00625 00626 00627 /** 00628 * Return @c TRUE if @a name is the name of the WC administrative 00629 * directory. Use @a pool for any temporary allocations. Only works 00630 * with base directory names, not paths or URIs. 00631 * 00632 * For compatibility, the default name (.svn) will always be treated 00633 * as an admin dir name, even if the working copy is actually using an 00634 * alternative name. 00635 * 00636 * @since New in 1.3. 00637 */ 00638 svn_boolean_t 00639 svn_wc_is_adm_dir(const char *name, apr_pool_t *pool); 00640 00641 00642 /** 00643 * Return the name of the administrative directory. 00644 * Use @a pool for any temporary allocations. 00645 * 00646 * The returned pointer will refer to either a statically allocated 00647 * string, or to a string allocated in @a pool. 00648 * 00649 * @since New in 1.3. 00650 */ 00651 const char * 00652 svn_wc_get_adm_dir(apr_pool_t *pool); 00653 00654 00655 /** 00656 * Use @a name for the administrative directory in the working copy. 00657 * Use @a pool for any temporary allocations. 00658 * 00659 * The list of valid names is limited. Currently only ".svn" (the 00660 * default) and "_svn" are allowed. 00661 * 00662 * @note This function changes global (per-process) state and must be 00663 * called in a single-threaded context during the initialization of a 00664 * Subversion client. 00665 * 00666 * @since New in 1.3. 00667 */ 00668 svn_error_t * 00669 svn_wc_set_adm_dir(const char *name, 00670 apr_pool_t *pool); 00671 00672 /** @} */ 00673 00674 00675 /** 00676 * @defgroup svn_wc_externals Externals 00677 * @{ 00678 */ 00679 00680 /** Callback for external definitions updates 00681 * 00682 * @a local_abspath is the path on which the external definition was found. 00683 * @a old_val and @a new_val are the before and after values of the 00684 * SVN_PROP_EXTERNALS property. @a depth is the ambient depth of the 00685 * working copy directory at @a local_abspath. 00686 * 00687 * @since New in 1.7. */ 00688 typedef svn_error_t *(*svn_wc_external_update_t)(void *baton, 00689 const char *local_abspath, 00690 const svn_string_t *old_val, 00691 const svn_string_t *new_val, 00692 svn_depth_t depth, 00693 apr_pool_t *scratch_pool); 00694 00695 /** Traversal information is information gathered by a working copy 00696 * crawl or update. For example, the before and after values of the 00697 * svn:externals property are important after an update, and since 00698 * we're traversing the working tree anyway (a complete traversal 00699 * during the initial crawl, and a traversal of changed paths during 00700 * the checkout/update/switch), it makes sense to gather the 00701 * property's values then instead of making a second pass. 00702 * 00703 * New code should use the svn_wc_external_update_t callback instead. 00704 * 00705 * @deprecated Provided for backward compatibility with the 1.6 API. 00706 */ 00707 typedef struct svn_wc_traversal_info_t svn_wc_traversal_info_t; 00708 00709 00710 /** Return a new, empty traversal info object, allocated in @a pool. 00711 * 00712 * New code should use the svn_wc_external_update_t callback instead. 00713 * 00714 * @deprecated Provided for backward compatibility with the 1.6 API. 00715 */ 00716 SVN_DEPRECATED 00717 svn_wc_traversal_info_t * 00718 svn_wc_init_traversal_info(apr_pool_t *pool); 00719 00720 /** Set @a *externals_old and @a *externals_new to hash tables representing 00721 * changes to values of the svn:externals property on directories 00722 * traversed by @a traversal_info. 00723 * 00724 * @a traversal_info is obtained from svn_wc_init_traversal_info(), but is 00725 * only useful after it has been passed through another function, such 00726 * as svn_wc_crawl_revisions(), svn_wc_get_update_editor(), 00727 * svn_wc_get_switch_editor(), etc. 00728 * 00729 * Each hash maps <tt>const char *</tt> directory names onto 00730 * <tt>const char *</tt> values of the externals property for that directory. 00731 * The dir names are full paths -- that is, anchor plus target, not target 00732 * alone. The values are not parsed, they are simply copied raw, and are 00733 * never NULL: directories that acquired or lost the property are 00734 * simply omitted from the appropriate table. Directories whose value 00735 * of the property did not change show the same value in each hash. 00736 * 00737 * The hashes, keys, and values have the same lifetime as @a traversal_info. 00738 * 00739 * New code should use the svn_wc_external_update_t callback instead. 00740 * 00741 * @deprecated Provided for backward compatibility with the 1.6 API. 00742 */ 00743 SVN_DEPRECATED 00744 void 00745 svn_wc_edited_externals(apr_hash_t **externals_old, 00746 apr_hash_t **externals_new, 00747 svn_wc_traversal_info_t *traversal_info); 00748 00749 00750 /** Set @a *depths to a hash table mapping <tt>const char *</tt> 00751 * directory names (directories traversed by @a traversal_info) to 00752 * <tt>const char *</tt> values (the depths of those directories, as 00753 * converted by svn_depth_to_word()). 00754 * 00755 * @a traversal_info is obtained from svn_wc_init_traversal_info(), but is 00756 * only useful after it has been passed through another function, such 00757 * as svn_wc_crawl_revisions(), svn_wc_get_update_editor(), 00758 * svn_wc_get_switch_editor(), etc. 00759 * 00760 * The dir names are full paths -- that is, anchor plus target, not target 00761 * alone. The values are not allocated, they are static constant strings. 00762 * Although the values are never NULL, not all directories traversed 00763 * are necessarily listed. For example, directories which did not 00764 * have an svn:externals property set or modified are not included. 00765 * 00766 * The hashes and keys have the same lifetime as @a traversal_info. 00767 * 00768 * New code should use the svn_wc_external_update_t callback instead. 00769 * 00770 * @since New in 1.5. 00771 * @deprecated Provided for backward compatibility with the 1.6 API. 00772 */ 00773 SVN_DEPRECATED 00774 void 00775 svn_wc_traversed_depths(apr_hash_t **depths, 00776 svn_wc_traversal_info_t *traversal_info); 00777 00778 00779 /** One external item. This usually represents one line from an 00780 * svn:externals description but with the path and URL 00781 * canonicalized. 00782 * 00783 * In order to avoid backwards compatibility problems clients should use 00784 * svn_wc_external_item2_create() to allocate and initialize this structure 00785 * instead of doing so themselves. 00786 * 00787 * @since New in 1.5. 00788 */ 00789 typedef struct svn_wc_external_item2_t 00790 { 00791 /** The name of the subdirectory into which this external should be 00792 checked out. This is relative to the parent directory that 00793 holds this external item. (Note that these structs are often 00794 stored in hash tables with the target dirs as keys, so this 00795 field will often be redundant.) */ 00796 const char *target_dir; 00797 00798 /** Where to check out from. This is possibly a relative external URL, as 00799 * allowed in externals definitions, but without the peg revision. */ 00800 const char *url; 00801 00802 /** What revision to check out. The only valid kinds for this are 00803 svn_opt_revision_number, svn_opt_revision_date, and 00804 svn_opt_revision_head. */ 00805 svn_opt_revision_t revision; 00806 00807 /** The peg revision to use when checking out. The only valid kinds are 00808 svn_opt_revision_number, svn_opt_revision_date, and 00809 svn_opt_revision_head. */ 00810 svn_opt_revision_t peg_revision; 00811 00812 } svn_wc_external_item2_t; 00813 00814 /** 00815 * Initialize an external item. 00816 * Set @a *item to an external item object, allocated in @a pool. 00817 * 00818 * In order to avoid backwards compatibility problems, this function 00819 * is used to initialize and allocate the #svn_wc_external_item2_t 00820 * structure rather than doing so explicitly, as the size of this 00821 * structure may change in the future. 00822 * 00823 * The current implementation never returns error, but callers should 00824 * still check for error, for compatibility with future versions. 00825 * 00826 * @since New in 1.8. 00827 */ 00828 svn_error_t * 00829 svn_wc_external_item2_create(svn_wc_external_item2_t **item, 00830 apr_pool_t *pool); 00831 00832 /** Same as svn_wc_external_item2_create() except the pointer to the new 00833 * empty item is 'const' which is stupid since the next thing you need to do 00834 * is fill in its fields. 00835 * 00836 * @deprecated Provided for backward compatibility with the 1.7 API. 00837 * @since New in 1.5. 00838 */ 00839 SVN_DEPRECATED 00840 svn_error_t * 00841 svn_wc_external_item_create(const svn_wc_external_item2_t **item, 00842 apr_pool_t *pool); 00843 00844 /** 00845 * Return a duplicate of @a item, allocated in @a pool. No part of the new 00846 * item will be shared with @a item. 00847 * 00848 * @since New in 1.5. 00849 */ 00850 svn_wc_external_item2_t * 00851 svn_wc_external_item2_dup(const svn_wc_external_item2_t *item, 00852 apr_pool_t *pool); 00853 00854 /** 00855 * One external item. Similar to svn_wc_external_item2_t, except 00856 * @a revision is interpreted as both the operational revision and the 00857 * peg revision. 00858 * 00859 * @deprecated Provided for backward compatibility with the 1.4 API. 00860 */ 00861 typedef struct svn_wc_external_item_t 00862 { 00863 /** Same as #svn_wc_external_item2_t.target_dir */ 00864 const char *target_dir; 00865 00866 /** Same as #svn_wc_external_item2_t.url */ 00867 const char *url; 00868 00869 /** Same as #svn_wc_external_item2_t.revision */ 00870 svn_opt_revision_t revision; 00871 00872 } svn_wc_external_item_t; 00873 00874 /** 00875 * Return a duplicate of @a item, allocated in @a pool. No part of the new 00876 * item will be shared with @a item. 00877 * 00878 * @since New in 1.3. 00879 * 00880 * @deprecated Provided for backward compatibility with the 1.4 API. 00881 */ 00882 SVN_DEPRECATED 00883 svn_wc_external_item_t * 00884 svn_wc_external_item_dup(const svn_wc_external_item_t *item, 00885 apr_pool_t *pool); 00886 00887 /** 00888 * If @a externals_p is non-NULL, set @a *externals_p to an array of 00889 * #svn_wc_external_item2_t * objects based on @a desc. 00890 * 00891 * If the format of @a desc is invalid, don't touch @a *externals_p and 00892 * return #SVN_ERR_CLIENT_INVALID_EXTERNALS_DESCRIPTION. Thus, if 00893 * you just want to check the validity of an externals description, 00894 * and don't care about the parsed result, pass NULL for @a externals_p. 00895 * 00896 * The format of @a desc is the same as for values of the directory 00897 * property #SVN_PROP_EXTERNALS. Look there for more details. 00898 * 00899 * If @a canonicalize_url is @c TRUE, canonicalize the @a url member 00900 * of those objects. If the @a url member refers to an absolute URL, 00901 * it will be canonicalized as URL consistent with the way URLs are 00902 * canonicalized throughout the Subversion API. If, however, the 00903 * @a url member makes use of the recognized (SVN-specific) relative 00904 * URL syntax for svn:externals, "canonicalization" is an ill-defined 00905 * concept which may even result in munging the relative URL syntax 00906 * beyond recognition. You've been warned. 00907 * 00908 * Allocate the table, keys, and values in @a pool. 00909 * 00910 * @a defining_directory is the path or URL of the directory on which 00911 * the svn:externals property corresponding to @a desc is set. 00912 * @a defining_directory is only used when constructing error strings. 00913 * 00914 * @since New in 1.5. 00915 */ 00916 svn_error_t * 00917 svn_wc_parse_externals_description3(apr_array_header_t **externals_p, 00918 const char *defining_directory, 00919 const char *desc, 00920 svn_boolean_t canonicalize_url, 00921 apr_pool_t *pool); 00922 00923 /** 00924 * Similar to svn_wc_parse_externals_description3() with @a 00925 * canonicalize_url set to @c TRUE, but returns an array of 00926 * #svn_wc_external_item_t * objects instead of 00927 * #svn_wc_external_item2_t * objects 00928 * 00929 * @since New in 1.1. 00930 * 00931 * @deprecated Provided for backward compatibility with the 1.4 API. 00932 */ 00933 SVN_DEPRECATED 00934 svn_error_t * 00935 svn_wc_parse_externals_description2(apr_array_header_t **externals_p, 00936 const char *parent_directory, 00937 const char *desc, 00938 apr_pool_t *pool); 00939 00940 /** 00941 * Similar to svn_wc_parse_externals_description2(), but returns the 00942 * parsed externals in a hash instead of an array. This function 00943 * should not be used, as storing the externals in a hash causes their 00944 * order of evaluation to be not easily identifiable. 00945 * 00946 * @deprecated Provided for backward compatibility with the 1.0 API. 00947 */ 00948 SVN_DEPRECATED 00949 svn_error_t * 00950 svn_wc_parse_externals_description(apr_hash_t **externals_p, 00951 const char *parent_directory, 00952 const char *desc, 00953 apr_pool_t *pool); 00954 00955 /** @} */ 00956 00957 00958 /** 00959 * @defgroup svn_wc_notifications Notification callback handling 00960 * @{ 00961 * 00962 * In many cases, the WC library will scan a working copy and make 00963 * changes. The caller usually wants to know when each of these changes 00964 * has been made, so that it can display some kind of notification to 00965 * the user. 00966 * 00967 * These notifications have a standard callback function type, which 00968 * takes the path of the file that was affected, and a caller- 00969 * supplied baton. 00970 * 00971 * @note The callback is a 'void' return -- this is a simple 00972 * reporting mechanism, rather than an opportunity for the caller to 00973 * alter the operation of the WC library. 00974 * 00975 * @note Some of the actions are used across several 00976 * different Subversion commands. For example, the update actions are 00977 * also used for checkouts, switches, and merges. 00978 */ 00979 00980 /** The type of action occurring. */ 00981 typedef enum svn_wc_notify_action_t 00982 { 00983 /** Adding a path to revision control. */ 00984 svn_wc_notify_add = 0, 00985 00986 /** Copying a versioned path. */ 00987 svn_wc_notify_copy, 00988 00989 /** Deleting a versioned path. */ 00990 svn_wc_notify_delete, 00991 00992 /** Restoring a missing path from the pristine text-base. */ 00993 svn_wc_notify_restore, 00994 00995 /** Reverting a modified path. */ 00996 svn_wc_notify_revert, 00997 00998 /** A revert operation has failed. */ 00999 svn_wc_notify_failed_revert, 01000 01001 /** All conflicts on a path were marked as resolved. 01002 * @note As of 1.10, separate notifications are sent for individually 01003 * resolved text, property, and tree conflicts. This notification is used 01004 * only if all conflicts on a path were marked resolved at once. */ 01005 svn_wc_notify_resolved, 01006 01007 /** Skipping a path. */ 01008 svn_wc_notify_skip, 01009 01010 /** Got a delete in an update. */ 01011 svn_wc_notify_update_delete, 01012 01013 /** Got an add in an update. */ 01014 svn_wc_notify_update_add, 01015 01016 /** Got any other action in an update. */ 01017 svn_wc_notify_update_update, 01018 01019 /** The last notification in an update (including updates of externals). */ 01020 svn_wc_notify_update_completed, 01021 01022 /** Updating an external module. */ 01023 svn_wc_notify_update_external, 01024 01025 /** The last notification in a status (including status on externals). */ 01026 svn_wc_notify_status_completed, 01027 01028 /** Running status on an external module. */ 01029 svn_wc_notify_status_external, 01030 01031 /** Committing a modification. */ 01032 svn_wc_notify_commit_modified, 01033 01034 /** Committing an addition. */ 01035 svn_wc_notify_commit_added, 01036 01037 /** Committing a deletion. */ 01038 svn_wc_notify_commit_deleted, 01039 01040 /** Committing a replacement. */ 01041 svn_wc_notify_commit_replaced, 01042 01043 /** Transmitting post-fix text-delta data for a file. */ 01044 svn_wc_notify_commit_postfix_txdelta, 01045 01046 /** Processed a single revision's blame. */ 01047 svn_wc_notify_blame_revision, 01048 01049 /** Locking a path. @since New in 1.2. */ 01050 svn_wc_notify_locked, 01051 01052 /** Unlocking a path. @since New in 1.2. */ 01053 svn_wc_notify_unlocked, 01054 01055 /** Failed to lock a path. @since New in 1.2. */ 01056 svn_wc_notify_failed_lock, 01057 01058 /** Failed to unlock a path. @since New in 1.2. */ 01059 svn_wc_notify_failed_unlock, 01060 01061 /** Tried adding a path that already exists. @since New in 1.5. */ 01062 svn_wc_notify_exists, 01063 01064 /** Changelist name set. @since New in 1.5. */ 01065 svn_wc_notify_changelist_set, 01066 01067 /** Changelist name cleared. @since New in 1.5. */ 01068 svn_wc_notify_changelist_clear, 01069 01070 /** Warn user that a path has moved from one changelist to another. 01071 @since New in 1.5. 01072 @deprecated As of 1.7, separate clear and set notifications are sent. */ 01073 svn_wc_notify_changelist_moved, 01074 01075 /** A merge operation (to path) has begun. See #svn_wc_notify_t.merge_range. 01076 @since New in 1.5. */ 01077 svn_wc_notify_merge_begin, 01078 01079 /** A merge operation (to path) from a foreign repository has begun. 01080 See #svn_wc_notify_t.merge_range. @since New in 1.5. */ 01081 svn_wc_notify_foreign_merge_begin, 01082 01083 /** Replace notification. @since New in 1.5. */ 01084 svn_wc_notify_update_replace, 01085 01086 /** Property added. @since New in 1.6. */ 01087 svn_wc_notify_property_added, 01088 01089 /** Property updated. @since New in 1.6. */ 01090 svn_wc_notify_property_modified, 01091 01092 /** Property deleted. @since New in 1.6. */ 01093 svn_wc_notify_property_deleted, 01094 01095 /** Nonexistent property deleted. @since New in 1.6. */ 01096 svn_wc_notify_property_deleted_nonexistent, 01097 01098 /** Revprop set. @since New in 1.6. */ 01099 svn_wc_notify_revprop_set, 01100 01101 /** Revprop deleted. @since New in 1.6. */ 01102 svn_wc_notify_revprop_deleted, 01103 01104 /** The last notification in a merge. @since New in 1.6. */ 01105 svn_wc_notify_merge_completed, 01106 01107 /** The path is a tree-conflict victim of the intended action (*not* 01108 * a persistent tree-conflict from an earlier operation, but *this* 01109 * operation caused the tree-conflict). @since New in 1.6. */ 01110 svn_wc_notify_tree_conflict, 01111 01112 /** The path is a subdirectory referenced in an externals definition 01113 * which is unable to be operated on. @since New in 1.6. */ 01114 svn_wc_notify_failed_external, 01115 01116 /** Starting an update operation. @since New in 1.7. */ 01117 svn_wc_notify_update_started, 01118 01119 /** An update tried to add a file or directory at a path where 01120 * a separate working copy was found. @since New in 1.7. */ 01121 svn_wc_notify_update_skip_obstruction, 01122 01123 /** An explicit update tried to update a file or directory that 01124 * doesn't live in the repository and can't be brought in. 01125 * @since New in 1.7. */ 01126 svn_wc_notify_update_skip_working_only, 01127 01128 /** An update tried to update a file or directory to which access could 01129 * not be obtained. @since New in 1.7. */ 01130 svn_wc_notify_update_skip_access_denied, 01131 01132 /** An update operation removed an external working copy. 01133 * @since New in 1.7. */ 01134 svn_wc_notify_update_external_removed, 01135 01136 /** A node below an existing node was added during update. 01137 * @since New in 1.7. */ 01138 svn_wc_notify_update_shadowed_add, 01139 01140 /** A node below an existing node was updated during update. 01141 * @since New in 1.7. */ 01142 svn_wc_notify_update_shadowed_update, 01143 01144 /** A node below an existing node was deleted during update. 01145 * @since New in 1.7. */ 01146 svn_wc_notify_update_shadowed_delete, 01147 01148 /** The mergeinfo on path was updated. @since New in 1.7. */ 01149 svn_wc_notify_merge_record_info, 01150 01151 /** A working copy directory was upgraded to the latest format. 01152 * @since New in 1.7. */ 01153 svn_wc_notify_upgraded_path, 01154 01155 /** Mergeinfo describing a merge was recorded. 01156 * @since New in 1.7. */ 01157 svn_wc_notify_merge_record_info_begin, 01158 01159 /** Mergeinfo was removed due to elision. 01160 * @since New in 1.7. */ 01161 svn_wc_notify_merge_elide_info, 01162 01163 /** A file in the working copy was patched. 01164 * @since New in 1.7. */ 01165 svn_wc_notify_patch, 01166 01167 /** A hunk from a patch was applied. 01168 * @since New in 1.7. */ 01169 svn_wc_notify_patch_applied_hunk, 01170 01171 /** A hunk from a patch was rejected. 01172 * @since New in 1.7. */ 01173 svn_wc_notify_patch_rejected_hunk, 01174 01175 /** A hunk from a patch was found to already be applied. 01176 * @since New in 1.7. */ 01177 svn_wc_notify_patch_hunk_already_applied, 01178 01179 /** Committing a non-overwriting copy (path is the target of the 01180 * copy, not the source). 01181 * @since New in 1.7. */ 01182 svn_wc_notify_commit_copied, 01183 01184 /** Committing an overwriting (replace) copy (path is the target of 01185 * the copy, not the source). 01186 * @since New in 1.7. */ 01187 svn_wc_notify_commit_copied_replaced, 01188 01189 /** The server has instructed the client to follow a URL 01190 * redirection. 01191 * @since New in 1.7. */ 01192 svn_wc_notify_url_redirect, 01193 01194 /** The operation was attempted on a path which doesn't exist. 01195 * @since New in 1.7. */ 01196 svn_wc_notify_path_nonexistent, 01197 01198 /** Removing a path by excluding it. 01199 * @since New in 1.7. */ 01200 svn_wc_notify_exclude, 01201 01202 /** Operation failed because the node remains in conflict 01203 * @since New in 1.7. */ 01204 svn_wc_notify_failed_conflict, 01205 01206 /** Operation failed because an added node is missing 01207 * @since New in 1.7. */ 01208 svn_wc_notify_failed_missing, 01209 01210 /** Operation failed because a node is out of date 01211 * @since New in 1.7. */ 01212 svn_wc_notify_failed_out_of_date, 01213 01214 /** Operation failed because an added parent is not selected 01215 * @since New in 1.7. */ 01216 svn_wc_notify_failed_no_parent, 01217 01218 /** Operation failed because a node is locked by another user and/or 01219 * working copy. @since New in 1.7. */ 01220 svn_wc_notify_failed_locked, 01221 01222 /** Operation failed because the operation was forbidden by the server. 01223 * @since New in 1.7. */ 01224 svn_wc_notify_failed_forbidden_by_server, 01225 01226 /** The operation skipped the path because it was conflicted. 01227 * @since New in 1.7. */ 01228 svn_wc_notify_skip_conflicted, 01229 01230 /** Just the lock on a file was removed during update. 01231 * @since New in 1.8. */ 01232 svn_wc_notify_update_broken_lock, 01233 01234 /** Operation failed because a node is obstructed. 01235 * @since New in 1.8. */ 01236 svn_wc_notify_failed_obstruction, 01237 01238 /** Conflict resolver is starting. 01239 * This can be used by clients to detect when to display conflict summary 01240 * information, for example. 01241 * @since New in 1.8. */ 01242 svn_wc_notify_conflict_resolver_starting, 01243 01244 /** Conflict resolver is done. 01245 * This can be used by clients to detect when to display conflict summary 01246 * information, for example. 01247 * @since New in 1.8. */ 01248 svn_wc_notify_conflict_resolver_done, 01249 01250 /** The current operation left local changes of something that was deleted 01251 * The changes are available on (and below) the notified path 01252 * @since New in 1.8. */ 01253 svn_wc_notify_left_local_modifications, 01254 01255 /** A copy from a foreign repository has started 01256 * @since New in 1.8. */ 01257 svn_wc_notify_foreign_copy_begin, 01258 01259 /** A move in the working copy has been broken, i.e. degraded into a 01260 * copy + delete. The notified path is the move source (the deleted path). 01261 * ### TODO: Provide path to move destination as well? 01262 * @since New in 1.8. */ 01263 svn_wc_notify_move_broken, 01264 01265 /** Running cleanup on an external module. 01266 * @since New in 1.9. */ 01267 svn_wc_notify_cleanup_external, 01268 01269 /** The operation failed because the operation (E.g. commit) is only valid 01270 * if the operation includes this path. 01271 * @since New in 1.9. */ 01272 svn_wc_notify_failed_requires_target, 01273 01274 /** Running info on an external module. 01275 * @since New in 1.9. */ 01276 svn_wc_notify_info_external, 01277 01278 /** Finalizing commit. 01279 * @since New in 1.9. */ 01280 svn_wc_notify_commit_finalizing, 01281 01282 /** All text conflicts in a file were marked as resolved. 01283 * @since New in 1.10. */ 01284 svn_wc_notify_resolved_text, 01285 01286 /** A property conflict on a path was marked as resolved. 01287 * The name of the property is specified in #svn_wc_notify_t.prop_name. 01288 * @since New in 1.10. */ 01289 svn_wc_notify_resolved_prop, 01290 01291 /** A tree conflict on a path was marked as resolved. 01292 * @since New in 1.10. */ 01293 svn_wc_notify_resolved_tree, 01294 01295 /** Starting to search the repository for details about a tree conflict. 01296 * @since New in 1.10. */ 01297 svn_wc_notify_begin_search_tree_conflict_details, 01298 01299 /** Progressing in search of repository for details about a tree conflict. 01300 * The revision being searched is specified in #svn_wc_notify_t.revision. 01301 * @since New in 1.10. */ 01302 svn_wc_notify_tree_conflict_details_progress, 01303 01304 /** Done searching the repository for details about a conflict. 01305 * @since New in 1.10. */ 01306 svn_wc_notify_end_search_tree_conflict_details 01307 01308 } svn_wc_notify_action_t; 01309 01310 01311 /** The type of notification that is occurring. */ 01312 typedef enum svn_wc_notify_state_t 01313 { 01314 svn_wc_notify_state_inapplicable = 0, 01315 01316 /** Notifier doesn't know or isn't saying. */ 01317 svn_wc_notify_state_unknown, 01318 01319 /** The state did not change. */ 01320 svn_wc_notify_state_unchanged, 01321 01322 /** The item wasn't present. */ 01323 svn_wc_notify_state_missing, 01324 01325 /** An unversioned item obstructed work. */ 01326 svn_wc_notify_state_obstructed, 01327 01328 /** Pristine state was modified. */ 01329 svn_wc_notify_state_changed, 01330 01331 /** Modified state had mods merged in. */ 01332 svn_wc_notify_state_merged, 01333 01334 /** Modified state got conflicting mods. */ 01335 svn_wc_notify_state_conflicted, 01336 01337 /** The source to copy the file from is missing. */ 01338 svn_wc_notify_state_source_missing 01339 01340 } svn_wc_notify_state_t; 01341 01342 /** 01343 * What happened to a lock during an operation. 01344 * 01345 * @since New in 1.2. 01346 */ 01347 typedef enum svn_wc_notify_lock_state_t 01348 { 01349 svn_wc_notify_lock_state_inapplicable = 0, 01350 01351 svn_wc_notify_lock_state_unknown, 01352 01353 /** The lock wasn't changed. */ 01354 svn_wc_notify_lock_state_unchanged, 01355 01356 /** The item was locked. */ 01357 svn_wc_notify_lock_state_locked, 01358 01359 /** The item was unlocked. */ 01360 svn_wc_notify_lock_state_unlocked 01361 01362 } svn_wc_notify_lock_state_t; 01363 01364 /** 01365 * Structure used in the #svn_wc_notify_func2_t function. 01366 * 01367 * @c kind, @c content_state, @c prop_state and @c lock_state are from 01368 * after @c action, not before. 01369 * 01370 * @note If @c action is #svn_wc_notify_update_completed, then @c path has 01371 * already been installed, so it is legitimate for an implementation of 01372 * #svn_wc_notify_func2_t to examine @c path in the working copy. 01373 * 01374 * @note The purpose of the @c kind, @c mime_type, @c content_state, and 01375 * @c prop_state fields is to provide "for free" information that an 01376 * implementation is likely to want, and which it would otherwise be 01377 * forced to deduce via expensive operations such as reading entries 01378 * and properties. However, if the caller does not have this 01379 * information, it will simply pass the corresponding `*_unknown' 01380 * values, and it is up to the implementation how to handle that 01381 * (i.e., whether to attempt deduction, or just to punt and 01382 * give a less informative notification). 01383 * 01384 * @note Callers of notification functions should use svn_wc_create_notify() 01385 * or svn_wc_create_notify_url() to create structures of this type to allow 01386 * for extensibility. 01387 * 01388 * @since New in 1.2. 01389 */ 01390 typedef struct svn_wc_notify_t { 01391 01392 /** Path, either absolute or relative to the current working directory 01393 * (i.e., not relative to an anchor). @c path is "." or another valid path 01394 * value for compatibility reasons when the real target is a url that 01395 * is available in @c url. */ 01396 const char *path; 01397 01398 /** Action that describes what happened to #svn_wc_notify_t.path. */ 01399 svn_wc_notify_action_t action; 01400 01401 /** Node kind of @c path. */ 01402 svn_node_kind_t kind; 01403 01404 /** If non-NULL, indicates the mime-type of @c path. 01405 * It is always @c NULL for directories. */ 01406 const char *mime_type; 01407 01408 /** Points to the lock structure received from the repository when 01409 * @c action is #svn_wc_notify_locked. For other actions, it is 01410 * @c NULL. */ 01411 const svn_lock_t *lock; 01412 01413 /** Points to an error describing the reason for the failure when @c 01414 * action is one of the following: #svn_wc_notify_failed_lock, 01415 * #svn_wc_notify_failed_unlock, #svn_wc_notify_failed_external. 01416 * Is @c NULL otherwise. */ 01417 svn_error_t *err; 01418 01419 /** The type of notification that is occurring about node content. */ 01420 svn_wc_notify_state_t content_state; 01421 01422 /** The type of notification that is occurring about node properties. */ 01423 svn_wc_notify_state_t prop_state; 01424 01425 /** Reflects the addition or removal of a lock token in the working copy. */ 01426 svn_wc_notify_lock_state_t lock_state; 01427 01428 /** When @c action is #svn_wc_notify_update_completed, target revision 01429 * of the update, or #SVN_INVALID_REVNUM if not available; when @c 01430 * action is #svn_wc_notify_blame_revision, processed revision; Since 01431 * Subversion 1.7 when action is #svn_wc_notify_update_update or 01432 * #svn_wc_notify_update_add, the target revision. 01433 * In all other cases, it is #SVN_INVALID_REVNUM. 01434 */ 01435 svn_revnum_t revision; 01436 01437 /** If @c action pertains to a changelist, this is the changelist name. 01438 * In all other cases, it is @c NULL. @since New in 1.5 */ 01439 const char *changelist_name; 01440 01441 /** When @c action is #svn_wc_notify_merge_begin or 01442 * #svn_wc_notify_foreign_merge_begin or 01443 * #svn_wc_notify_merge_record_info_begin, and both the 01444 * left and right sides of the merge are from the same URL. In all 01445 * other cases, it is @c NULL. @since New in 1.5 */ 01446 svn_merge_range_t *merge_range; 01447 01448 /** Similar to @c path, but if non-NULL the notification is about a url. 01449 * @since New in 1.6 */ 01450 const char *url; 01451 01452 /** If non-NULL, specifies an absolute path prefix that can be subtracted 01453 * from the start of the absolute path in @c path or @c url. Its purpose 01454 * is to allow notification to remove a common prefix from all the paths 01455 * displayed for an operation. @since New in 1.6 */ 01456 const char *path_prefix; 01457 01458 /** If @c action relates to properties, specifies the name of the property. 01459 * @since New in 1.6 */ 01460 const char *prop_name; 01461 01462 /** If @c action is #svn_wc_notify_blame_revision, contains a list of 01463 * revision properties for the specified revision 01464 * @since New in 1.6 */ 01465 apr_hash_t *rev_props; 01466 01467 /** If @c action is #svn_wc_notify_update_update or 01468 * #svn_wc_notify_update_add, contains the revision before the update. 01469 * In all other cases, it is #SVN_INVALID_REVNUM. 01470 * @since New in 1.7 */ 01471 svn_revnum_t old_revision; 01472 01473 /** These fields are used by svn patch to identify the 01474 * hunk the notification is for. They are line-based 01475 * offsets and lengths parsed from the unidiff hunk header. 01476 * @since New in 1.7. */ 01477 /* @{ */ 01478 svn_linenum_t hunk_original_start; 01479 svn_linenum_t hunk_original_length; 01480 svn_linenum_t hunk_modified_start; 01481 svn_linenum_t hunk_modified_length; 01482 /* @} */ 01483 01484 /** The line at which a hunk was matched (and applied). 01485 * @since New in 1.7. */ 01486 svn_linenum_t hunk_matched_line; 01487 01488 /** The fuzz factor the hunk was applied with. 01489 * @since New in 1.7 */ 01490 svn_linenum_t hunk_fuzz; 01491 01492 /* NOTE: Add new fields at the end to preserve binary compatibility. 01493 Also, if you add fields here, you have to update svn_wc_create_notify 01494 and svn_wc_dup_notify. */ 01495 } svn_wc_notify_t; 01496 01497 /** 01498 * Allocate an #svn_wc_notify_t structure in @a pool, initialize and return 01499 * it. 01500 * 01501 * Set the @c path field of the created struct to @a path, and @c action to 01502 * @a action. Set all other fields to their @c _unknown, @c NULL or 01503 * invalid value, respectively. Make only a shallow copy of the pointer 01504 * @a path. 01505 * 01506 * @since New in 1.2. 01507 */ 01508 svn_wc_notify_t * 01509 svn_wc_create_notify(const char *path, 01510 svn_wc_notify_action_t action, 01511 apr_pool_t *pool); 01512 01513 /** 01514 * Allocate an #svn_wc_notify_t structure in @a pool, initialize and return 01515 * it. 01516 * 01517 * Set the @c url field of the created struct to @a url, @c path to "." and @c 01518 * action to @a action. Set all other fields to their @c _unknown, @c NULL or 01519 * invalid value, respectively. Make only a shallow copy of the pointer 01520 * @a url. 01521 * 01522 * @since New in 1.6. 01523 */ 01524 svn_wc_notify_t * 01525 svn_wc_create_notify_url(const char *url, 01526 svn_wc_notify_action_t action, 01527 apr_pool_t *pool); 01528 01529 /** 01530 * Return a deep copy of @a notify, allocated in @a pool. 01531 * 01532 * @since New in 1.2. 01533 */ 01534 svn_wc_notify_t * 01535 svn_wc_dup_notify(const svn_wc_notify_t *notify, 01536 apr_pool_t *pool); 01537 01538 /** 01539 * Notify the world that @a notify->action has happened to @a notify->path. 01540 * 01541 * Recommendation: callers of #svn_wc_notify_func2_t should avoid 01542 * invoking it multiple times on the same path within a given 01543 * operation, and implementations should not bother checking for such 01544 * duplicate calls. For example, in an update, the caller should not 01545 * invoke the notify func on receiving a prop change and then again 01546 * on receiving a text change. Instead, wait until all changes have 01547 * been received, and then invoke the notify func once (from within 01548 * an #svn_delta_editor_t's close_file(), for example), passing 01549 * the appropriate @a notify->content_state and @a notify->prop_state flags. 01550 * 01551 * @since New in 1.2. 01552 */ 01553 typedef void (*svn_wc_notify_func2_t)(void *baton, 01554 const svn_wc_notify_t *notify, 01555 apr_pool_t *pool); 01556 01557 /** 01558 * Similar to #svn_wc_notify_func2_t, but takes the information as arguments 01559 * instead of struct fields. 01560 * 01561 * @deprecated Provided for backward compatibility with the 1.1 API. 01562 */ 01563 typedef void (*svn_wc_notify_func_t)(void *baton, 01564 const char *path, 01565 svn_wc_notify_action_t action, 01566 svn_node_kind_t kind, 01567 const char *mime_type, 01568 svn_wc_notify_state_t content_state, 01569 svn_wc_notify_state_t prop_state, 01570 svn_revnum_t revision); 01571 01572 /** @} */ 01573 01574 01575 /** 01576 * Interactive conflict handling 01577 * 01578 * @defgroup svn_wc_conflict Conflict callback functionality 01579 * @{ 01580 * 01581 * This API gives a Subversion client application the opportunity to 01582 * define a callback that allows the user to resolve conflicts 01583 * interactively during updates and merges. 01584 * 01585 * If a conflict is discovered, libsvn_wc invokes the callback with an 01586 * #svn_wc_conflict_description_t. This structure describes the 01587 * path in conflict, whether it's a text or property conflict, and may 01588 * also present up to three files that can be used to resolve the 01589 * conflict (perhaps by launching an editor or 3rd-party merging 01590 * tool). The structure also provides a possible fourth file (@c 01591 * merged_file) which, if not NULL, represents libsvn_wc's attempt to 01592 * contextually merge the first three files. (Note that libsvn_wc 01593 * will not attempt to merge a file that it believes is binary, and it 01594 * will only attempt to merge property values it believes to be a 01595 * series of multi-line text.) 01596 * 01597 * When the callback is finished interacting with the user, it 01598 * responds by returning a #svn_wc_conflict_result_t. This 01599 * structure indicates whether the user wants to postpone the conflict 01600 * for later (allowing libsvn_wc to mark the path "conflicted" as 01601 * usual), or whether the user wants libsvn_wc to use one of the four 01602 * files as the "final" state for resolving the conflict immediately. 01603 * 01604 * Note that the callback is at liberty (and encouraged) to merge the 01605 * three files itself. If it does so, it signals this to libsvn_wc by 01606 * returning a choice of #svn_wc_conflict_choose_merged. To return 01607 * the 'final' merged file to libsvn_wc, the callback has the option of 01608 * either: 01609 * 01610 * - editing the original @c merged_file in-place 01611 * 01612 * or, if libsvn_wc never supplied a merged_file in the 01613 * description structure (i.e. passed NULL for that field), 01614 * 01615 * - return the merged file in the #svn_wc_conflict_result_t. 01616 * 01617 */ 01618 01619 /** The type of action being attempted on an object. 01620 * 01621 * @since New in 1.5. 01622 */ 01623 typedef enum svn_wc_conflict_action_t 01624 { 01625 svn_wc_conflict_action_edit, /**< attempting to change text or props */ 01626 svn_wc_conflict_action_add, /**< attempting to add object */ 01627 svn_wc_conflict_action_delete, /**< attempting to delete object */ 01628 svn_wc_conflict_action_replace /**< attempting to replace object, 01629 @since New in 1.7 */ 01630 } svn_wc_conflict_action_t; 01631 01632 01633 /** The pre-existing condition which is causing a state of conflict. 01634 * 01635 * @since New in 1.5. 01636 */ 01637 typedef enum svn_wc_conflict_reason_t 01638 { 01639 /** Local edits are already present */ 01640 svn_wc_conflict_reason_edited, 01641 /** Another object is in the way */ 01642 svn_wc_conflict_reason_obstructed, 01643 /** Object is already schedule-delete */ 01644 svn_wc_conflict_reason_deleted, 01645 /** Object is unknown or missing */ 01646 svn_wc_conflict_reason_missing, 01647 /** Object is unversioned */ 01648 svn_wc_conflict_reason_unversioned, 01649 /** Object is already added or schedule-add. @since New in 1.6. */ 01650 svn_wc_conflict_reason_added, 01651 /** Object is already replaced. @since New in 1.7. */ 01652 svn_wc_conflict_reason_replaced, 01653 /** Object is moved away. @since New in 1.8. */ 01654 svn_wc_conflict_reason_moved_away, 01655 /** Object is moved here. @since New in 1.8. */ 01656 svn_wc_conflict_reason_moved_here 01657 01658 } svn_wc_conflict_reason_t; 01659 01660 01661 /** The type of conflict being described by an 01662 * #svn_wc_conflict_description2_t (see below). 01663 * 01664 * @since New in 1.5. 01665 */ 01666 typedef enum svn_wc_conflict_kind_t 01667 { 01668 /** textual conflict (on a file) */ 01669 svn_wc_conflict_kind_text, 01670 /** property conflict (on a file or dir) */ 01671 svn_wc_conflict_kind_property, 01672 /** tree conflict (on a dir) @since New in 1.6. */ 01673 svn_wc_conflict_kind_tree 01674 } svn_wc_conflict_kind_t; 01675 01676 01677 /** The user operation that exposed a conflict. 01678 * 01679 * @since New in 1.6. 01680 */ 01681 typedef enum svn_wc_operation_t 01682 { 01683 svn_wc_operation_none = 0, 01684 svn_wc_operation_update, 01685 svn_wc_operation_switch, 01686 svn_wc_operation_merge 01687 01688 } svn_wc_operation_t; 01689 01690 01691 /** Info about one of the conflicting versions of a node. Each field may 01692 * have its respective null/invalid/unknown value if the corresponding 01693 * information is not relevant or not available. 01694 * 01695 * @todo Consider making some or all of the info mandatory, to reduce 01696 * complexity. 01697 * 01698 * @note Fields may be added to the end of this structure in future 01699 * versions. Therefore, to preserve binary compatibility, users 01700 * should not directly allocate structures of this type. 01701 * 01702 * @see svn_wc_conflict_version_create() 01703 * @see svn_wc_conflict_version_dup() 01704 * 01705 * @since New in 1.6. 01706 */ 01707 typedef struct svn_wc_conflict_version_t 01708 { 01709 /** @name Where to find this node version in a repository */ 01710 /**@{*/ 01711 01712 /** URL of repository root */ 01713 const char *repos_url; 01714 01715 /** revision at which to look up path_in_repos */ 01716 svn_revnum_t peg_rev; 01717 01718 /** path within repos; must not start with '/' */ 01719 /* ### should have been called repos_relpath, but we can't change this. */ 01720 const char *path_in_repos; 01721 /** @} */ 01722 01723 /** The node kind. Can be any kind, including 'none' or 'unknown'. */ 01724 svn_node_kind_t node_kind; 01725 01726 /** UUID of the repository (or NULL if unknown.) 01727 * @since New in 1.8. */ 01728 const char *repos_uuid; 01729 01730 /* @todo Add metadata about a local copy of the node, if and when 01731 * we store one. */ 01732 01733 /* Remember to update svn_wc_conflict_version_create() and 01734 * svn_wc_conflict_version_dup() in case you add fields to this struct. */ 01735 } svn_wc_conflict_version_t; 01736 01737 /** 01738 * Allocate an #svn_wc_conflict_version_t structure in @a pool, 01739 * initialize to contain a conflict origin, and return it. 01740 * 01741 * Set the @c repos_url field of the created struct to @a repos_root_url, 01742 * the @c path_in_repos field to @a repos_relpath, the @c peg_rev field to 01743 * @a revision and the @c node_kind to @a kind. Make only shallow 01744 * copies of the pointer arguments. 01745 * 01746 * @a repos_root_url, @a repos_relpath and @a revision must be valid, 01747 * non-null values. @a repos_uuid should be a valid UUID, but can be 01748 * NULL if unknown. @a kind can be any kind, even 'none' or 'unknown'. 01749 * 01750 * @since New in 1.8. 01751 */ 01752 svn_wc_conflict_version_t * 01753 svn_wc_conflict_version_create2(const char *repos_root_url, 01754 const char *repos_uuid, 01755 const char *repos_relpath, 01756 svn_revnum_t revision, 01757 svn_node_kind_t kind, 01758 apr_pool_t *result_pool); 01759 01760 /** Similar to svn_wc_conflict_version_create2(), but doesn't set all 01761 * required values. 01762 * 01763 * @since New in 1.6. 01764 * @deprecated Provided for backward compatibility with the 1.7 API. 01765 */ 01766 SVN_DEPRECATED 01767 svn_wc_conflict_version_t * 01768 svn_wc_conflict_version_create(const char *repos_url, 01769 const char *path_in_repos, 01770 svn_revnum_t peg_rev, 01771 svn_node_kind_t node_kind, 01772 apr_pool_t *pool); 01773 01774 /** Return a duplicate of @a version, allocated in @a pool. 01775 * No part of the new version will be shared with @a version. 01776 * 01777 * @since New in 1.6. 01778 */ 01779 svn_wc_conflict_version_t * 01780 svn_wc_conflict_version_dup(const svn_wc_conflict_version_t *version, 01781 apr_pool_t *pool); 01782 01783 01784 /** A struct that describes a conflict that has occurred in the 01785 * working copy. 01786 * 01787 * The conflict described by this structure is one of: 01788 * - a conflict on the content of the file node @a local_abspath 01789 * - a conflict on the property @a property_name of @a local_abspath 01790 * - a tree conflict, of which @a local_abspath is the victim 01791 * Be aware that the victim of a tree conflict can be a non-existent node. 01792 * The three kinds of conflict are distinguished by @a kind. 01793 * 01794 * @note Fields may be added to the end of this structure in future 01795 * versions. Therefore, to preserve binary compatibility, users 01796 * should not directly allocate structures of this type but should use 01797 * svn_wc_conflict_description_create_text2() or 01798 * svn_wc_conflict_description_create_prop2() or 01799 * svn_wc_conflict_description_create_tree2() instead. 01800 * 01801 * @since New in 1.7. 01802 */ 01803 typedef struct svn_wc_conflict_description2_t 01804 { 01805 /** The path that is in conflict (for a tree conflict, it is the victim) */ 01806 const char *local_abspath; 01807 01808 /** The node type of the local node involved in this conflict. 01809 * For a tree conflict, this is the node kind of the tree conflict victim. 01810 * For the left/right node kinds of the incoming conflicting change see 01811 * src_left_version->node_kind and src_right_version->node_kind. */ 01812 svn_node_kind_t node_kind; 01813 01814 /** What sort of conflict are we describing? */ 01815 svn_wc_conflict_kind_t kind; 01816 01817 /** The name of the property whose conflict is being described. 01818 * (Only if @a kind is 'property'; else undefined.) */ 01819 const char *property_name; 01820 01821 /** Whether svn thinks ('my' version of) @c path is a 'binary' file. 01822 * (Only if @c kind is 'text', else undefined.) */ 01823 svn_boolean_t is_binary; 01824 01825 /** The svn:mime-type property of ('my' version of) @c path, if available, 01826 * else NULL. 01827 * (Only if @c kind is 'text', else undefined.) */ 01828 const char *mime_type; 01829 01830 /** The incoming action being attempted on the conflicted node or property. 01831 * When @c kind is 'text', this action must be 'edit', but generally it can 01832 * be any kind of possible change. */ 01833 svn_wc_conflict_action_t action; 01834 01835 /** The local change or state of the target node or property, relative 01836 * to its merge-left source, that conflicts with the incoming action. 01837 * When @c kind is 'text', this must be 'edited', but generally it can 01838 * be any kind of possible change. 01839 * Note that 'local' does not always refer to a working copy. A change 01840 * can be local to the target branch of a merge operation, for example, 01841 * and is not necessarily visible in a working copy of the target branch 01842 * at any given revision. */ 01843 svn_wc_conflict_reason_t reason; 01844 01845 /** If this is text-conflict and involves the merging of two files 01846 * descended from a common ancestor, here are the paths of up to 01847 * four fulltext files that can be used to interactively resolve the 01848 * conflict. 01849 * 01850 * @a base_abspath, @a their_abspath and @a my_abspath are absolute 01851 * paths. 01852 * 01853 * ### Is @a merged_file relative to some directory, or absolute? 01854 * 01855 * All four files will be in repository-normal form -- LF 01856 * line endings and contracted keywords. (If any of these files are 01857 * not available, they default to NULL.) 01858 * 01859 * On the other hand, if this is a property-conflict, then these 01860 * paths represent temporary files that contain the three different 01861 * property-values in conflict. The fourth path (@c merged_file) 01862 * may or may not be NULL; if set, it represents libsvn_wc's 01863 * attempt to merge the property values together. (Remember that 01864 * property values are technically binary values, and thus can't 01865 * always be merged.) 01866 */ 01867 const char *base_abspath; /* common ancestor of the two files being merged */ 01868 01869 /** their version of the file */ 01870 /* ### BH: For properties this field contains the reference to 01871 the property rejection (.prej) file */ 01872 const char *their_abspath; 01873 01874 /** my locally-edited version of the file */ 01875 const char *my_abspath; 01876 01877 /** merged version; may contain conflict markers 01878 * ### For property conflicts, this contains 'their_abspath'. */ 01879 const char *merged_file; 01880 01881 /** The operation that exposed the conflict. 01882 * Used only for tree conflicts. 01883 */ 01884 svn_wc_operation_t operation; 01885 01886 /** Info on the "merge-left source" or "older" version of incoming change. */ 01887 const svn_wc_conflict_version_t *src_left_version; 01888 01889 /** Info on the "merge-right source" or "their" version of incoming change. */ 01890 const svn_wc_conflict_version_t *src_right_version; 01891 01892 /** For property conflicts, the absolute path to the .prej file. 01893 * @since New in 1.9. */ 01894 const char *prop_reject_abspath; 01895 01896 /** For property conflicts, the local base value of the property, i.e. the 01897 * value of the property as of the BASE revision of the working copy. 01898 * For conflicts created during update/switch this contains the 01899 * post-update/switch property value. The pre-update/switch value can 01900 * be found in prop_value_incoming_old. 01901 * Only set if available, so might be @c NULL. 01902 * @since New in 1.9. */ 01903 const svn_string_t *prop_value_base; 01904 01905 /** For property conflicts, the local working value of the property, 01906 * i.e. the value of the property in the working copy, possibly with 01907 * local modiciations. 01908 * Only set if available, so might be @c NULL. 01909 * @since New in 1.9. */ 01910 const svn_string_t *prop_value_working; 01911 01912 /** For property conflicts, the incoming old value of the property, 01913 * i.e. the value the property had at @c src_left_version. 01914 * Only set if available, so might be @c NULL. 01915 * @since New in 1.9 */ 01916 const svn_string_t *prop_value_incoming_old; 01917 01918 /** For property conflicts, the incoming new value of the property, 01919 * i.e. the value the property had at @c src_right_version. 01920 * Only set if available, so might be @c NULL. 01921 * @since New in 1.9 */ 01922 const svn_string_t *prop_value_incoming_new; 01923 01924 /* NOTE: Add new fields at the end to preserve binary compatibility. 01925 Also, if you add fields here, you have to update 01926 svn_wc_conflict_description2_dup and perhaps 01927 svn_wc_conflict_description_create_text2, 01928 svn_wc_conflict_description_create_prop2, and 01929 svn_wc_conflict_description_create_tree2. */ 01930 } svn_wc_conflict_description2_t; 01931 01932 01933 /** Similar to #svn_wc_conflict_description2_t, but with relative paths and 01934 * adm_access batons. Passed to #svn_wc_conflict_resolver_func_t. 01935 * 01936 * @since New in 1.5. 01937 * @deprecated Provided for backward compatibility with the 1.6 API. 01938 */ 01939 typedef struct svn_wc_conflict_description_t 01940 { 01941 /** The path that is in conflict (for a tree conflict, it is the victim) */ 01942 const char *path; 01943 01944 /** The local node type of the path being operated on (for a tree conflict, 01945 * this specifies the local node kind, which may be (and typically is) 01946 * different than the left and right kind) */ 01947 svn_node_kind_t node_kind; 01948 01949 /** What sort of conflict are we describing? */ 01950 svn_wc_conflict_kind_t kind; 01951 01952 /** The name of the property whose conflict is being described. 01953 * (Only if @a kind is 'property'; else undefined.) */ 01954 const char *property_name; 01955 01956 /** Whether svn thinks ('my' version of) @c path is a 'binary' file. 01957 * (Only if @c kind is 'text', else undefined.) */ 01958 svn_boolean_t is_binary; 01959 01960 /** The svn:mime-type property of ('my' version of) @c path, if available, 01961 * else NULL. 01962 * (Only if @c kind is 'text', else undefined.) */ 01963 const char *mime_type; 01964 01965 /** If not NULL, an open working copy access baton to either the 01966 * path itself (if @c path is a directory), or to the parent 01967 * directory (if @c path is a file.) 01968 * For a tree conflict, this will always be an access baton 01969 * to the parent directory of the path, even if the path is 01970 * a directory. */ 01971 svn_wc_adm_access_t *access; 01972 01973 /** The action being attempted on the conflicted node or property. 01974 * (When @c kind is 'text', this action must be 'edit'.) */ 01975 svn_wc_conflict_action_t action; 01976 01977 /** The state of the target node or property, relative to its merge-left 01978 * source, that is the reason for the conflict. 01979 * (When @c kind is 'text', this reason must be 'edited'.) */ 01980 svn_wc_conflict_reason_t reason; 01981 01982 /** If this is text-conflict and involves the merging of two files 01983 * descended from a common ancestor, here are the paths of up to 01984 * four fulltext files that can be used to interactively resolve the 01985 * conflict. All four files will be in repository-normal form -- LF 01986 * line endings and contracted keywords. (If any of these files are 01987 * not available, they default to NULL.) 01988 * 01989 * On the other hand, if this is a property-conflict, then these 01990 * paths represent temporary files that contain the three different 01991 * property-values in conflict. The fourth path (@c merged_file) 01992 * may or may not be NULL; if set, it represents libsvn_wc's 01993 * attempt to merge the property values together. (Remember that 01994 * property values are technically binary values, and thus can't 01995 * always be merged.) 01996 */ 01997 const char *base_file; /* common ancestor of the two files being merged */ 01998 01999 /** their version of the file */ 02000 const char *their_file; 02001 02002 /** my locally-edited version of the file */ 02003 const char *my_file; 02004 02005 /** merged version; may contain conflict markers */ 02006 const char *merged_file; 02007 02008 /** The operation that exposed the conflict. 02009 * Used only for tree conflicts. 02010 * 02011 * @since New in 1.6. 02012 */ 02013 svn_wc_operation_t operation; 02014 02015 /** Info on the "merge-left source" or "older" version of incoming change. 02016 * @since New in 1.6. */ 02017 svn_wc_conflict_version_t *src_left_version; 02018 02019 /** Info on the "merge-right source" or "their" version of incoming change. 02020 * @since New in 1.6. */ 02021 svn_wc_conflict_version_t *src_right_version; 02022 02023 } svn_wc_conflict_description_t; 02024 02025 /** 02026 * Allocate an #svn_wc_conflict_description2_t structure in @a result_pool, 02027 * initialize to represent a text conflict, and return it. 02028 * 02029 * Set the @c local_abspath field of the created struct to @a local_abspath 02030 * (which must be an absolute path), the @c kind field to 02031 * #svn_wc_conflict_kind_text, the @c node_kind to #svn_node_file, 02032 * the @c action to #svn_wc_conflict_action_edit, and the @c reason to 02033 * #svn_wc_conflict_reason_edited. 02034 * 02035 * @note It is the caller's responsibility to set the other required fields 02036 * (such as the four file names and @c mime_type and @c is_binary). 02037 * 02038 * @since New in 1.7. 02039 */ 02040 svn_wc_conflict_description2_t * 02041 svn_wc_conflict_description_create_text2(const char *local_abspath, 02042 apr_pool_t *result_pool); 02043 02044 02045 /** Similar to svn_wc_conflict_description_create_text2(), but returns 02046 * a #svn_wc_conflict_description_t *. 02047 * 02048 * @since New in 1.6. 02049 * @deprecated Provided for backward compatibility with the 1.6 API. 02050 */ 02051 SVN_DEPRECATED 02052 svn_wc_conflict_description_t * 02053 svn_wc_conflict_description_create_text(const char *path, 02054 svn_wc_adm_access_t *adm_access, 02055 apr_pool_t *pool); 02056 02057 /** 02058 * Allocate an #svn_wc_conflict_description2_t structure in @a result_pool, 02059 * initialize to represent a property conflict, and return it. 02060 * 02061 * Set the @c local_abspath field of the created struct to @a local_abspath 02062 * (which must be an absolute path), the @c kind field 02063 * to #svn_wc_conflict_kind_property, the @c node_kind to @a node_kind, and 02064 * the @c property_name to @a property_name. 02065 * 02066 * @note: It is the caller's responsibility to set the other required fields 02067 * (such as the four file names and @c action and @c reason). 02068 * 02069 * @since New in 1.7. 02070 */ 02071 svn_wc_conflict_description2_t * 02072 svn_wc_conflict_description_create_prop2(const char *local_abspath, 02073 svn_node_kind_t node_kind, 02074 const char *property_name, 02075 apr_pool_t *result_pool); 02076 02077 /** Similar to svn_wc_conflict_descriptor_create_prop(), but returns 02078 * a #svn_wc_conflict_description_t *. 02079 * 02080 * @since New in 1.6. 02081 * @deprecated Provided for backward compatibility with the 1.6 API. 02082 */ 02083 SVN_DEPRECATED 02084 svn_wc_conflict_description_t * 02085 svn_wc_conflict_description_create_prop(const char *path, 02086 svn_wc_adm_access_t *adm_access, 02087 svn_node_kind_t node_kind, 02088 const char *property_name, 02089 apr_pool_t *pool); 02090 02091 /** 02092 * Allocate an #svn_wc_conflict_description2_t structure in @a pool, 02093 * initialize to represent a tree conflict, and return it. 02094 * 02095 * Set the @c local_abspath field of the created struct to @a local_abspath 02096 * (which must be an absolute path), the @c kind field to 02097 * #svn_wc_conflict_kind_tree, the @c node_kind to @a node_kind, 02098 * the @c operation to @a operation, the @c src_left_version field to 02099 * @a src_left_version, and the @c src_right_version field to 02100 * @a src_right_version. 02101 * 02102 * @note: It is the caller's responsibility to set the other required fields 02103 * (such as the four file names and @c action and @c reason). 02104 * 02105 * @since New in 1.7. 02106 */ 02107 svn_wc_conflict_description2_t * 02108 svn_wc_conflict_description_create_tree2( 02109 const char *local_abspath, 02110 svn_node_kind_t node_kind, 02111 svn_wc_operation_t operation, 02112 const svn_wc_conflict_version_t *src_left_version, 02113 const svn_wc_conflict_version_t *src_right_version, 02114 apr_pool_t *result_pool); 02115 02116 02117 /** Similar to svn_wc_conflict_description_create_tree(), but returns 02118 * a #svn_wc_conflict_description_t *. 02119 * 02120 * @since New in 1.6. 02121 * @deprecated Provided for backward compatibility with the 1.6 API. 02122 */ 02123 SVN_DEPRECATED 02124 svn_wc_conflict_description_t * 02125 svn_wc_conflict_description_create_tree( 02126 const char *path, 02127 svn_wc_adm_access_t *adm_access, 02128 svn_node_kind_t node_kind, 02129 svn_wc_operation_t operation, 02130 /* non-const */ svn_wc_conflict_version_t *src_left_version, 02131 /* non-const */ svn_wc_conflict_version_t *src_right_version, 02132 apr_pool_t *pool); 02133 02134 02135 /** Return a duplicate of @a conflict, allocated in @a result_pool. 02136 * A deep copy of all members will be made. 02137 * 02138 * @since New in 1.9. 02139 */ 02140 svn_wc_conflict_description2_t * 02141 svn_wc_conflict_description2_dup( 02142 const svn_wc_conflict_description2_t *conflict, 02143 apr_pool_t *result_pool); 02144 02145 02146 /** Like svn_wc_conflict_description2_dup(), but is improperly named 02147 * as a private function when it is intended to be a public API. 02148 * 02149 * @since New in 1.7. 02150 * @deprecated Provided for backward compatibility with the 1.8 API. 02151 */ 02152 SVN_DEPRECATED 02153 svn_wc_conflict_description2_t * 02154 svn_wc__conflict_description2_dup( 02155 const svn_wc_conflict_description2_t *conflict, 02156 apr_pool_t *result_pool); 02157 02158 02159 /** The way in which the conflict callback chooses a course of action. 02160 * 02161 * @since New in 1.5. 02162 */ 02163 typedef enum svn_wc_conflict_choice_t 02164 { 02165 /** Undefined; for private use only. 02166 This value must never be returned in svn_wc_conflict_result_t, 02167 but a separate value, unequal to all other pre-defined values may 02168 be useful in conflict resolver implementations to signal that no 02169 choice is made yet. 02170 * @since New in 1.9 02171 */ 02172 svn_wc_conflict_choose_undefined = -1, 02173 02174 /** Don't resolve the conflict now. Let libsvn_wc mark the path 02175 'conflicted', so user can run 'svn resolved' later. */ 02176 svn_wc_conflict_choose_postpone = 0, 02177 02178 /** If there were files to choose from, select one as a way of 02179 resolving the conflict here and now. libsvn_wc will then do the 02180 work of "installing" the chosen file. 02181 */ 02182 svn_wc_conflict_choose_base, /**< original version */ 02183 svn_wc_conflict_choose_theirs_full, /**< incoming version */ 02184 svn_wc_conflict_choose_mine_full, /**< own version */ 02185 svn_wc_conflict_choose_theirs_conflict, /**< incoming (for conflicted hunks) */ 02186 svn_wc_conflict_choose_mine_conflict, /**< own (for conflicted hunks) */ 02187 svn_wc_conflict_choose_merged, /**< merged version */ 02188 02189 /** @since New in 1.8. */ 02190 svn_wc_conflict_choose_unspecified /**< undecided */ 02191 02192 } svn_wc_conflict_choice_t; 02193 02194 02195 /** The final result returned by #svn_wc_conflict_resolver_func_t. 02196 * 02197 * @note Fields may be added to the end of this structure in future 02198 * versions. Therefore, to preserve binary compatibility, users 02199 * should not directly allocate structures of this type. Instead, 02200 * construct this structure using svn_wc_create_conflict_result() 02201 * below. 02202 * 02203 * @since New in 1.5. 02204 */ 02205 typedef struct svn_wc_conflict_result_t 02206 { 02207 /** A choice to either delay the conflict resolution or select a 02208 particular file to resolve the conflict. */ 02209 svn_wc_conflict_choice_t choice; 02210 02211 /** If not NULL, this is a path to a file which contains the client's 02212 (or more likely, the user's) merging of the three values in 02213 conflict. libsvn_wc accepts this file if (and only if) @c choice 02214 is set to #svn_wc_conflict_choose_merged.*/ 02215 const char *merged_file; 02216 02217 /** If true, save a backup copy of merged_file (or the original 02218 merged_file from the conflict description, if merged_file is 02219 NULL) in the user's working copy. */ 02220 svn_boolean_t save_merged; 02221 02222 /** If not NULL, this is the new merged property, used when choosing 02223 * #svn_wc_conflict_choose_merged. This value is prefered over using 02224 * merged_file. 02225 * 02226 * @since New in 1.9. 02227 */ 02228 const svn_string_t *merged_value; 02229 02230 } svn_wc_conflict_result_t; 02231 02232 02233 /** 02234 * Allocate an #svn_wc_conflict_result_t structure in @a pool, 02235 * initialize and return it. 02236 * 02237 * Set the @c choice field of the structure to @a choice, @c merged_file 02238 * to @a merged_file, and @c save_merged to false. Make only a shallow 02239 * copy of the pointer argument @a merged_file. @a merged_file may be 02240 * NULL if setting merged_file is not needed. 02241 * 02242 * @since New in 1.5. 02243 */ 02244 svn_wc_conflict_result_t * 02245 svn_wc_create_conflict_result(svn_wc_conflict_choice_t choice, 02246 const char *merged_file, 02247 apr_pool_t *pool); 02248 02249 02250 /** A callback used in merge, update and switch for resolving conflicts 02251 * during the application of a tree delta to a working copy. 02252 * 02253 * @a description describes the exact nature of the conflict, and 02254 * provides information to help resolve it. @a baton is a closure 02255 * object; it should be provided by the implementation, and passed by 02256 * the caller. When finished, the callback signals its resolution by 02257 * returning a structure in @a *result, which should be allocated in 02258 * @a result_pool. (See #svn_wc_conflict_result_t.) @a scratch_pool 02259 * should be used for any temporary allocations. 02260 * 02261 * The values #svn_wc_conflict_choose_mine_conflict and 02262 * #svn_wc_conflict_choose_theirs_conflict are not legal for conflicts 02263 * in binary files or binary properties. 02264 * 02265 * Implementations of this callback are free to present the conflict 02266 * using any user interface. This may include simple contextual 02267 * conflicts in a file's text or properties, or more complex 02268 * 'tree'-based conflicts related to obstructed additions, deletions, 02269 * and edits. The callback implementation is free to decide which 02270 * sorts of conflicts to handle; it's also free to decide which types 02271 * of conflicts are automatically resolvable and which require user 02272 * interaction. 02273 * 02274 * @since New in 1.7. 02275 */ 02276 typedef svn_error_t *(*svn_wc_conflict_resolver_func2_t)( 02277 svn_wc_conflict_result_t **result, 02278 const svn_wc_conflict_description2_t *description, 02279 void *baton, 02280 apr_pool_t *result_pool, 02281 apr_pool_t *scratch_pool); 02282 02283 02284 /** Similar to #svn_wc_conflict_resolver_func2_t, but using 02285 * #svn_wc_conflict_description_t instead of 02286 * #svn_wc_conflict_description2_t 02287 * 02288 * @since New in 1.5. 02289 * @deprecated Provided for backward compatibility with the 1.6 API. 02290 */ 02291 typedef svn_error_t *(*svn_wc_conflict_resolver_func_t)( 02292 svn_wc_conflict_result_t **result, 02293 const svn_wc_conflict_description_t *description, 02294 void *baton, 02295 apr_pool_t *pool); 02296 02297 /** @} */ 02298 02299 02300 02301 /** 02302 * A callback vtable invoked by our diff-editors, as they receive diffs 02303 * from the server. 'svn diff' and 'svn merge' implement their own versions 02304 * of this vtable. 02305 * 02306 * Common parameters: 02307 * 02308 * If @a state is non-NULL, set @a *state to the state of the item 02309 * after the operation has been performed. (In practice, this is only 02310 * useful with merge, not diff; diff callbacks will probably set 02311 * @a *state to #svn_wc_notify_state_unknown, since they do not change 02312 * the state and therefore do not bother to know the state after the 02313 * operation.) By default, @a state refers to the item's content 02314 * state. Functions concerned with property state have separate 02315 * @a contentstate and @a propstate arguments. 02316 * 02317 * If @a tree_conflicted is non-NULL, set @a *tree_conflicted to true if 02318 * this operation caused a tree conflict, else to false. (Like with @a 02319 * state, this is only useful with merge, not diff; diff callbacks 02320 * should set this to false.) 02321 * 02322 * @since New in 1.7. 02323 */ 02324 typedef struct svn_wc_diff_callbacks4_t 02325 { 02326 /** 02327 * This function is called before @a file_changed to allow callbacks to 02328 * skip the most expensive processing of retrieving the file data. 02329 * 02330 */ 02331 svn_error_t *(*file_opened)(svn_boolean_t *tree_conflicted, 02332 svn_boolean_t *skip, 02333 const char *path, 02334 svn_revnum_t rev, 02335 void *diff_baton, 02336 apr_pool_t *scratch_pool); 02337 02338 /** 02339 * A file @a path has changed. If @a tmpfile2 is non-NULL, the 02340 * contents have changed and those changes can be seen by comparing 02341 * @a tmpfile1 and @a tmpfile2, which represent @a rev1 and @a rev2 of 02342 * the file, respectively. 02343 * 02344 * If known, the @c svn:mime-type value of each file is passed into 02345 * @a mimetype1 and @a mimetype2; either or both of the values can 02346 * be NULL. The implementor can use this information to decide if 02347 * (or how) to generate differences. 02348 * 02349 * @a propchanges is an array of (#svn_prop_t) structures. If it contains 02350 * any elements, the original list of properties is provided in 02351 * @a originalprops, which is a hash of #svn_string_t values, keyed on the 02352 * property name. 02353 * 02354 */ 02355 svn_error_t *(*file_changed)(svn_wc_notify_state_t *contentstate, 02356 svn_wc_notify_state_t *propstate, 02357 svn_boolean_t *tree_conflicted, 02358 const char *path, 02359 const char *tmpfile1, 02360 const char *tmpfile2, 02361 svn_revnum_t rev1, 02362 svn_revnum_t rev2, 02363 const char *mimetype1, 02364 const char *mimetype2, 02365 const apr_array_header_t *propchanges, 02366 apr_hash_t *originalprops, 02367 void *diff_baton, 02368 apr_pool_t *scratch_pool); 02369 02370 /** 02371 * A file @a path was added. The contents can be seen by comparing 02372 * @a tmpfile1 and @a tmpfile2, which represent @a rev1 and @a rev2 02373 * of the file, respectively. (If either file is empty, the rev 02374 * will be 0.) 02375 * 02376 * If known, the @c svn:mime-type value of each file is passed into 02377 * @a mimetype1 and @a mimetype2; either or both of the values can 02378 * be NULL. The implementor can use this information to decide if 02379 * (or how) to generate differences. 02380 * 02381 * @a propchanges is an array of (#svn_prop_t) structures. If it contains 02382 * any elements, the original list of properties is provided in 02383 * @a originalprops, which is a hash of #svn_string_t values, keyed on the 02384 * property name. 02385 * If @a copyfrom_path is non-@c NULL, this add has history (i.e., is a 02386 * copy), and the origin of the copy may be recorded as 02387 * @a copyfrom_path under @a copyfrom_revision. 02388 */ 02389 svn_error_t *(*file_added)(svn_wc_notify_state_t *contentstate, 02390 svn_wc_notify_state_t *propstate, 02391 svn_boolean_t *tree_conflicted, 02392 const char *path, 02393 const char *tmpfile1, 02394 const char *tmpfile2, 02395 svn_revnum_t rev1, 02396 svn_revnum_t rev2, 02397 const char *mimetype1, 02398 const char *mimetype2, 02399 const char *copyfrom_path, 02400 svn_revnum_t copyfrom_revision, 02401 const apr_array_header_t *propchanges, 02402 apr_hash_t *originalprops, 02403 void *diff_baton, 02404 apr_pool_t *scratch_pool); 02405 02406 /** 02407 * A file @a path was deleted. The [loss of] contents can be seen by 02408 * comparing @a tmpfile1 and @a tmpfile2. @a originalprops provides 02409 * the properties of the file. 02410 * ### Some existing callers include WC "entry props" in @a originalprops. 02411 * 02412 * If known, the @c svn:mime-type value of each file is passed into 02413 * @a mimetype1 and @a mimetype2; either or both of the values can 02414 * be NULL. The implementor can use this information to decide if 02415 * (or how) to generate differences. 02416 */ 02417 svn_error_t *(*file_deleted)(svn_wc_notify_state_t *state, 02418 svn_boolean_t *tree_conflicted, 02419 const char *path, 02420 const char *tmpfile1, 02421 const char *tmpfile2, 02422 const char *mimetype1, 02423 const char *mimetype2, 02424 apr_hash_t *originalprops, 02425 void *diff_baton, 02426 apr_pool_t *scratch_pool); 02427 02428 /** 02429 * A directory @a path was deleted. 02430 */ 02431 svn_error_t *(*dir_deleted)(svn_wc_notify_state_t *state, 02432 svn_boolean_t *tree_conflicted, 02433 const char *path, 02434 void *diff_baton, 02435 apr_pool_t *scratch_pool); 02436 /** 02437 * A directory @a path has been opened. @a rev is the revision that the 02438 * directory came from. 02439 * 02440 * This function is called for any existing directory @a path before any 02441 * of the callbacks are called for a child of @a path. 02442 * 02443 * If the callback returns @c TRUE in @a *skip_children, children 02444 * of this directory will be skipped. 02445 */ 02446 svn_error_t *(*dir_opened)(svn_boolean_t *tree_conflicted, 02447 svn_boolean_t *skip, 02448 svn_boolean_t *skip_children, 02449 const char *path, 02450 svn_revnum_t rev, 02451 void *diff_baton, 02452 apr_pool_t *scratch_pool); 02453 02454 /** 02455 * A directory @a path was added. @a rev is the revision that the 02456 * directory came from. 02457 * 02458 * This function is called for any new directory @a path before any 02459 * of the callbacks are called for a child of @a path. 02460 * 02461 * If @a copyfrom_path is non-@c NULL, this add has history (i.e., is a 02462 * copy), and the origin of the copy may be recorded as 02463 * @a copyfrom_path under @a copyfrom_revision. 02464 */ 02465 svn_error_t *(*dir_added)(svn_wc_notify_state_t *state, 02466 svn_boolean_t *tree_conflicted, 02467 svn_boolean_t *skip, 02468 svn_boolean_t *skip_children, 02469 const char *path, 02470 svn_revnum_t rev, 02471 const char *copyfrom_path, 02472 svn_revnum_t copyfrom_revision, 02473 void *diff_baton, 02474 apr_pool_t *scratch_pool); 02475 02476 /** 02477 * A list of property changes (@a propchanges) was applied to the 02478 * directory @a path. 02479 * 02480 * The array is a list of (#svn_prop_t) structures. 02481 * 02482 * @a dir_was_added is set to #TRUE if the directory was added, and 02483 * to #FALSE if the directory pre-existed. 02484 */ 02485 svn_error_t *(*dir_props_changed)(svn_wc_notify_state_t *propstate, 02486 svn_boolean_t *tree_conflicted, 02487 const char *path, 02488 svn_boolean_t dir_was_added, 02489 const apr_array_header_t *propchanges, 02490 apr_hash_t *original_props, 02491 void *diff_baton, 02492 apr_pool_t *scratch_pool); 02493 02494 /** 02495 * A directory @a path which has been opened with @a dir_opened or @a 02496 * dir_added has been closed. 02497 * 02498 * @a dir_was_added is set to #TRUE if the directory was added, and 02499 * to #FALSE if the directory pre-existed. 02500 */ 02501 svn_error_t *(*dir_closed)(svn_wc_notify_state_t *contentstate, 02502 svn_wc_notify_state_t *propstate, 02503 svn_boolean_t *tree_conflicted, 02504 const char *path, 02505 svn_boolean_t dir_was_added, 02506 void *diff_baton, 02507 apr_pool_t *scratch_pool); 02508 02509 } svn_wc_diff_callbacks4_t; 02510 02511 02512 /** 02513 * Similar to #svn_wc_diff_callbacks4_t, but without @a copyfrom_path and 02514 * @a copyfrom_revision arguments to @c file_added and @c dir_added functions. 02515 * 02516 * @since New in 1.6. 02517 * @deprecated Provided for backward compatibility with the 1.6 API. 02518 */ 02519 typedef struct svn_wc_diff_callbacks3_t 02520 { 02521 /** The same as #svn_wc_diff_callbacks4_t.file_changed. */ 02522 svn_error_t *(*file_changed)(svn_wc_adm_access_t *adm_access, 02523 svn_wc_notify_state_t *contentstate, 02524 svn_wc_notify_state_t *propstate, 02525 svn_boolean_t *tree_conflicted, 02526 const char *path, 02527 const char *tmpfile1, 02528 const char *tmpfile2, 02529 svn_revnum_t rev1, 02530 svn_revnum_t rev2, 02531 const char *mimetype1, 02532 const char *mimetype2, 02533 const apr_array_header_t *propchanges, 02534 apr_hash_t *originalprops, 02535 void *diff_baton); 02536 02537 /** Similar to #svn_wc_diff_callbacks4_t.file_added but without 02538 * @a copyfrom_path and @a copyfrom_revision arguments. */ 02539 svn_error_t *(*file_added)(svn_wc_adm_access_t *adm_access, 02540 svn_wc_notify_state_t *contentstate, 02541 svn_wc_notify_state_t *propstate, 02542 svn_boolean_t *tree_conflicted, 02543 const char *path, 02544 const char *tmpfile1, 02545 const char *tmpfile2, 02546 svn_revnum_t rev1, 02547 svn_revnum_t rev2, 02548 const char *mimetype1, 02549 const char *mimetype2, 02550 const apr_array_header_t *propchanges, 02551 apr_hash_t *originalprops, 02552 void *diff_baton); 02553 02554 /** The same as #svn_wc_diff_callbacks4_t.file_deleted. */ 02555 svn_error_t *(*file_deleted)(svn_wc_adm_access_t *adm_access, 02556 svn_wc_notify_state_t *state, 02557 svn_boolean_t *tree_conflicted, 02558 const char *path, 02559 const char *tmpfile1, 02560 const char *tmpfile2, 02561 const char *mimetype1, 02562 const char *mimetype2, 02563 apr_hash_t *originalprops, 02564 void *diff_baton); 02565 02566 /** Similar to #svn_wc_diff_callbacks4_t.dir_added but without 02567 * @a copyfrom_path and @a copyfrom_revision arguments. */ 02568 svn_error_t *(*dir_added)(svn_wc_adm_access_t *adm_access, 02569 svn_wc_notify_state_t *state, 02570 svn_boolean_t *tree_conflicted, 02571 const char *path, 02572 svn_revnum_t rev, 02573 void *diff_baton); 02574 02575 /** The same as #svn_wc_diff_callbacks4_t.dir_deleted. */ 02576 svn_error_t *(*dir_deleted)(svn_wc_adm_access_t *adm_access, 02577 svn_wc_notify_state_t *state, 02578 svn_boolean_t *tree_conflicted, 02579 const char *path, 02580 void *diff_baton); 02581 02582 /** The same as #svn_wc_diff_callbacks4_t.dir_props_changed. */ 02583 svn_error_t *(*dir_props_changed)(svn_wc_adm_access_t *adm_access, 02584 svn_wc_notify_state_t *propstate, 02585 svn_boolean_t *tree_conflicted, 02586 const char *path, 02587 const apr_array_header_t *propchanges, 02588 apr_hash_t *original_props, 02589 void *diff_baton); 02590 02591 /** The same as #svn_wc_diff_callbacks4_t.dir_opened. */ 02592 svn_error_t *(*dir_opened)(svn_wc_adm_access_t *adm_access, 02593 svn_boolean_t *tree_conflicted, 02594 const char *path, 02595 svn_revnum_t rev, 02596 void *diff_baton); 02597 02598 /** The same as #svn_wc_diff_callbacks4_t.dir_closed. */ 02599 svn_error_t *(*dir_closed)(svn_wc_adm_access_t *adm_access, 02600 svn_wc_notify_state_t *contentstate, 02601 svn_wc_notify_state_t *propstate, 02602 svn_boolean_t *tree_conflicted, 02603 const char *path, 02604 void *diff_baton); 02605 02606 } svn_wc_diff_callbacks3_t; 02607 02608 /** 02609 * Similar to #svn_wc_diff_callbacks3_t, but without the @c dir_opened 02610 * and @c dir_closed functions, and without the @a tree_conflicted argument 02611 * to the functions. 02612 * 02613 * @deprecated Provided for backward compatibility with the 1.2 API. 02614 */ 02615 typedef struct svn_wc_diff_callbacks2_t 02616 { 02617 /** The same as @c file_changed in #svn_wc_diff_callbacks3_t. */ 02618 svn_error_t *(*file_changed)(svn_wc_adm_access_t *adm_access, 02619 svn_wc_notify_state_t *contentstate, 02620 svn_wc_notify_state_t *propstate, 02621 const char *path, 02622 const char *tmpfile1, 02623 const char *tmpfile2, 02624 svn_revnum_t rev1, 02625 svn_revnum_t rev2, 02626 const char *mimetype1, 02627 const char *mimetype2, 02628 const apr_array_header_t *propchanges, 02629 apr_hash_t *originalprops, 02630 void *diff_baton); 02631 02632 /** The same as @c file_added in #svn_wc_diff_callbacks3_t. */ 02633 svn_error_t *(*file_added)(svn_wc_adm_access_t *adm_access, 02634 svn_wc_notify_state_t *contentstate, 02635 svn_wc_notify_state_t *propstate, 02636 const char *path, 02637 const char *tmpfile1, 02638 const char *tmpfile2, 02639 svn_revnum_t rev1, 02640 svn_revnum_t rev2, 02641 const char *mimetype1, 02642 const char *mimetype2, 02643 const apr_array_header_t *propchanges, 02644 apr_hash_t *originalprops, 02645 void *diff_baton); 02646 02647 /** The same as @c file_deleted in #svn_wc_diff_callbacks3_t. */ 02648 svn_error_t *(*file_deleted)(svn_wc_adm_access_t *adm_access, 02649 svn_wc_notify_state_t *state, 02650 const char *path, 02651 const char *tmpfile1, 02652 const char *tmpfile2, 02653 const char *mimetype1, 02654 const char *mimetype2, 02655 apr_hash_t *originalprops, 02656 void *diff_baton); 02657 02658 /** The same as @c dir_added in #svn_wc_diff_callbacks3_t. */ 02659 svn_error_t *(*dir_added)(svn_wc_adm_access_t *adm_access, 02660 svn_wc_notify_state_t *state, 02661 const char *path, 02662 svn_revnum_t rev, 02663 void *diff_baton); 02664 02665 /** The same as @c dir_deleted in #svn_wc_diff_callbacks3_t. */ 02666 svn_error_t *(*dir_deleted)(svn_wc_adm_access_t *adm_access, 02667 svn_wc_notify_state_t *state, 02668 const char *path, 02669 void *diff_baton); 02670 02671 /** The same as @c dir_props_changed in #svn_wc_diff_callbacks3_t. */ 02672 svn_error_t *(*dir_props_changed)(svn_wc_adm_access_t *adm_access, 02673 svn_wc_notify_state_t *state, 02674 const char *path, 02675 const apr_array_header_t *propchanges, 02676 apr_hash_t *original_props, 02677 void *diff_baton); 02678 02679 } svn_wc_diff_callbacks2_t; 02680 02681 /** 02682 * Similar to #svn_wc_diff_callbacks2_t, but with file additions/content 02683 * changes and property changes split into different functions. 02684 * 02685 * @deprecated Provided for backward compatibility with the 1.1 API. 02686 */ 02687 typedef struct svn_wc_diff_callbacks_t 02688 { 02689 /** Similar to @c file_changed in #svn_wc_diff_callbacks2_t, but without 02690 * property change information. @a tmpfile2 is never NULL. @a state applies 02691 * to the file contents. */ 02692 svn_error_t *(*file_changed)(svn_wc_adm_access_t *adm_access, 02693 svn_wc_notify_state_t *state, 02694 const char *path, 02695 const char *tmpfile1, 02696 const char *tmpfile2, 02697 svn_revnum_t rev1, 02698 svn_revnum_t rev2, 02699 const char *mimetype1, 02700 const char *mimetype2, 02701 void *diff_baton); 02702 02703 /** Similar to @c file_added in #svn_wc_diff_callbacks2_t, but without 02704 * property change information. @a *state applies to the file contents. */ 02705 svn_error_t *(*file_added)(svn_wc_adm_access_t *adm_access, 02706 svn_wc_notify_state_t *state, 02707 const char *path, 02708 const char *tmpfile1, 02709 const char *tmpfile2, 02710 svn_revnum_t rev1, 02711 svn_revnum_t rev2, 02712 const char *mimetype1, 02713 const char *mimetype2, 02714 void *diff_baton); 02715 02716 /** Similar to @c file_deleted in #svn_wc_diff_callbacks2_t, but without 02717 * the properties. */ 02718 svn_error_t *(*file_deleted)(svn_wc_adm_access_t *adm_access, 02719 svn_wc_notify_state_t *state, 02720 const char *path, 02721 const char *tmpfile1, 02722 const char *tmpfile2, 02723 const char *mimetype1, 02724 const char *mimetype2, 02725 void *diff_baton); 02726 02727 /** The same as @c dir_added in #svn_wc_diff_callbacks2_t. */ 02728 svn_error_t *(*dir_added)(svn_wc_adm_access_t *adm_access, 02729 svn_wc_notify_state_t *state, 02730 const char *path, 02731 svn_revnum_t rev, 02732 void *diff_baton); 02733 02734 /** The same as @c dir_deleted in #svn_wc_diff_callbacks2_t. */ 02735 svn_error_t *(*dir_deleted)(svn_wc_adm_access_t *adm_access, 02736 svn_wc_notify_state_t *state, 02737 const char *path, 02738 void *diff_baton); 02739 02740 /** Similar to @c dir_props_changed in #svn_wc_diff_callbacks2_t, but this 02741 * function is called for files as well as directories. */ 02742 svn_error_t *(*props_changed)(svn_wc_adm_access_t *adm_access, 02743 svn_wc_notify_state_t *state, 02744 const char *path, 02745 const apr_array_header_t *propchanges, 02746 apr_hash_t *original_props, 02747 void *diff_baton); 02748 02749 } svn_wc_diff_callbacks_t; 02750 02751 02752 /* Asking questions about a working copy. */ 02753 02754 /** Set @a *wc_format to @a local_abspath's working copy format version 02755 * number if @a local_abspath is a valid working copy directory, else set it 02756 * to 0. 02757 * 02758 * Return error @c APR_ENOENT if @a local_abspath does not exist at all. 02759 * 02760 * @since New in 1.7. 02761 */ 02762 svn_error_t * 02763 svn_wc_check_wc2(int *wc_format, 02764 svn_wc_context_t *wc_ctx, 02765 const char *local_abspath, 02766 apr_pool_t *scratch_pool); 02767 02768 /** 02769 * Similar to svn_wc_check_wc2(), but with a relative path and no supplied 02770 * working copy context. 02771 * 02772 * @deprecated Provided for backward compatibility with the 1.6 API. 02773 */ 02774 SVN_DEPRECATED 02775 svn_error_t * 02776 svn_wc_check_wc(const char *path, 02777 int *wc_format, 02778 apr_pool_t *pool); 02779 02780 02781 /** Set @a *has_binary_prop to @c TRUE iff @a path has been marked 02782 * with a property indicating that it is non-text (in other words, binary). 02783 * @a adm_access is an access baton set that contains @a path. 02784 * 02785 * @deprecated Provided for backward compatibility with the 1.6 API. As a 02786 * replacement for this functionality, @see svn_mime_type_is_binary and 02787 * #SVN_PROP_MIME_TYPE. 02788 */ 02789 SVN_DEPRECATED 02790 svn_error_t * 02791 svn_wc_has_binary_prop(svn_boolean_t *has_binary_prop, 02792 const char *path, 02793 svn_wc_adm_access_t *adm_access, 02794 apr_pool_t *pool); 02795 02796 02797 /* Detecting modification. */ 02798 02799 /** Set @a *modified_p to non-zero if @a local_abspath's text is modified 02800 * with regard to the base revision, else set @a *modified_p to zero. 02801 * @a local_abspath is the absolute path to the file. 02802 * 02803 * This function uses some heuristics to avoid byte-by-byte comparisons 02804 * against the base text (eg. file size and its modification time). 02805 * 02806 * If @a local_abspath does not exist, consider it unmodified. If it exists 02807 * but is not under revision control (not even scheduled for 02808 * addition), return the error #SVN_ERR_ENTRY_NOT_FOUND. 02809 * 02810 * @a unused is ignored. 02811 * 02812 * @since New in 1.7. 02813 */ 02814 svn_error_t * 02815 svn_wc_text_modified_p2(svn_boolean_t *modified_p, 02816 svn_wc_context_t *wc_ctx, 02817 const char *local_abspath, 02818 svn_boolean_t unused, 02819 apr_pool_t *scratch_pool); 02820 02821 /** Similar to svn_wc_text_modified_p2(), but with a relative path and 02822 * adm_access baton? 02823 * 02824 * @deprecated Provided for backward compatibility with the 1.6 API. 02825 */ 02826 SVN_DEPRECATED 02827 svn_error_t * 02828 svn_wc_text_modified_p(svn_boolean_t *modified_p, 02829 const char *filename, 02830 svn_boolean_t force_comparison, 02831 svn_wc_adm_access_t *adm_access, 02832 apr_pool_t *pool); 02833 02834 /** Set @a *modified_p to non-zero if @a path's properties are modified 02835 * with regard to the base revision, else set @a modified_p to zero. 02836 * @a adm_access must be an access baton for @a path. 02837 * 02838 * @since New in 1.7. 02839 */ 02840 svn_error_t * 02841 svn_wc_props_modified_p2(svn_boolean_t *modified_p, 02842 svn_wc_context_t *wc_ctx, 02843 const char *local_abspath, 02844 apr_pool_t *scratch_pool); 02845 02846 /** Similar to svn_wc_props_modified_p2(), but with a relative path and 02847 * adm_access baton. 02848 * 02849 * @deprecated Provided for backward compatibility with the 1.6 API. 02850 */ 02851 SVN_DEPRECATED 02852 svn_error_t * 02853 svn_wc_props_modified_p(svn_boolean_t *modified_p, 02854 const char *path, 02855 svn_wc_adm_access_t *adm_access, 02856 apr_pool_t *pool); 02857 02858 02859 /** 02860 * @defgroup svn_wc_entries Entries and status (deprecated) 02861 * @{ 02862 */ 02863 02864 /** The schedule states an entry can be in. 02865 * @deprecated Provided for backward compatibility with the 1.6 API. */ 02866 typedef enum svn_wc_schedule_t 02867 { 02868 /** Nothing special here */ 02869 svn_wc_schedule_normal, 02870 02871 /** Slated for addition */ 02872 svn_wc_schedule_add, 02873 02874 /** Slated for deletion */ 02875 svn_wc_schedule_delete, 02876 02877 /** Slated for replacement (delete + add) */ 02878 svn_wc_schedule_replace 02879 02880 } svn_wc_schedule_t; 02881 02882 02883 /** 02884 * Values for the working_size field in svn_wc_entry_t 02885 * when it isn't set to the actual size value of the unchanged 02886 * working file. 02887 * 02888 * The value of the working size is unknown (hasn't been 02889 * calculated and stored in the past for whatever reason). 02890 * 02891 * @since New in 1.5 02892 * @deprecated Provided for backward compatibility with the 1.6 API. 02893 */ 02894 #define SVN_WC_ENTRY_WORKING_SIZE_UNKNOWN (-1) 02895 02896 /** A working copy entry -- that is, revision control information about 02897 * one versioned entity. 02898 * 02899 * @deprecated Provided for backward compatibility with the 1.6 API. 02900 */ 02901 /* SVN_DEPRECATED */ 02902 typedef struct svn_wc_entry_t 02903 { 02904 /* IMPORTANT: If you extend this structure, add new fields to the end. */ 02905 02906 /* General Attributes */ 02907 02908 /** entry's name */ 02909 const char *name; 02910 02911 /** base revision */ 02912 svn_revnum_t revision; 02913 02914 /** url in repository */ 02915 const char *url; 02916 02917 /** canonical repository URL or NULL if not known */ 02918 const char *repos; 02919 02920 /** repository uuid */ 02921 const char *uuid; 02922 02923 /** node kind (file, dir, ...) */ 02924 svn_node_kind_t kind; 02925 02926 /* State information */ 02927 02928 /** scheduling (add, delete, replace ...) */ 02929 svn_wc_schedule_t schedule; 02930 02931 /** in a copied state (possibly because the entry is a child of a 02932 * path that is #svn_wc_schedule_add or #svn_wc_schedule_replace, 02933 * when the entry itself is #svn_wc_schedule_normal). 02934 * COPIED is true for nodes under a directory that was copied, but 02935 * COPYFROM_URL is null there. They are both set for the root 02936 * destination of the copy. 02937 */ 02938 svn_boolean_t copied; 02939 02940 /** The directory containing this entry had a versioned child of this 02941 * name, but this entry represents a different revision or a switched 02942 * path at which no item exists in the repository. This typically 02943 * arises from committing or updating to a deletion of this entry 02944 * without committing or updating the parent directory. 02945 * 02946 * The schedule can be 'normal' or 'add'. */ 02947 svn_boolean_t deleted; 02948 02949 /** absent -- we know an entry of this name exists, but that's all 02950 (usually this happens because of authz restrictions) */ 02951 svn_boolean_t absent; 02952 02953 /** for THIS_DIR entry, implies whole entries file is incomplete */ 02954 svn_boolean_t incomplete; 02955 02956 /** copyfrom location */ 02957 const char *copyfrom_url; 02958 02959 /** copyfrom revision */ 02960 svn_revnum_t copyfrom_rev; 02961 02962 /** old version of conflicted file. A file basename, relative to the 02963 * user's directory that the THIS_DIR entry refers to. */ 02964 const char *conflict_old; 02965 02966 /** new version of conflicted file. A file basename, relative to the 02967 * user's directory that the THIS_DIR entry refers to. */ 02968 const char *conflict_new; 02969 02970 /** working version of conflicted file. A file basename, relative to the 02971 * user's directory that the THIS_DIR entry refers to. */ 02972 const char *conflict_wrk; 02973 02974 /** property reject file. A file basename, relative to the user's 02975 * directory that the THIS_DIR entry refers to. */ 02976 const char *prejfile; 02977 02978 /** last up-to-date time for text contents (0 means no information available) 02979 */ 02980 apr_time_t text_time; 02981 02982 /** last up-to-date time for properties (0 means no information available) 02983 * 02984 * @deprecated This value will always be 0 in version 1.4 and later. 02985 */ 02986 apr_time_t prop_time; 02987 02988 /** Hex MD5 checksum for the untranslated text base file, 02989 * can be @c NULL for backwards compatibility. 02990 */ 02991 const char *checksum; 02992 02993 /* "Entry props" */ 02994 02995 /** last revision this was changed */ 02996 svn_revnum_t cmt_rev; 02997 02998 /** last date this was changed */ 02999 apr_time_t cmt_date; 03000 03001 /** last commit author of this item */ 03002 const char *cmt_author; 03003 03004 /** lock token or NULL if path not locked in this WC 03005 * @since New in 1.2. 03006 */ 03007 const char *lock_token; 03008 03009 /** lock owner, or NULL if not locked in this WC 03010 * @since New in 1.2. 03011 */ 03012 const char *lock_owner; 03013 03014 /** lock comment or NULL if not locked in this WC or no comment 03015 * @since New in 1.2. 03016 */ 03017 const char *lock_comment; 03018 03019 /** Lock creation date or 0 if not locked in this WC 03020 * @since New in 1.2. 03021 */ 03022 apr_time_t lock_creation_date; 03023 03024 /** Whether this entry has any working properties. 03025 * False if this information is not stored in the entry. 03026 * 03027 * @since New in 1.4. */ 03028 svn_boolean_t has_props; 03029 03030 /** Whether this entry has property modifications. 03031 * 03032 * @note For working copies in older formats, this flag is not valid. 03033 * 03034 * @see svn_wc_props_modified_p(). 03035 * 03036 * @since New in 1.4. */ 03037 svn_boolean_t has_prop_mods; 03038 03039 /** A space-separated list of all properties whose presence/absence is cached 03040 * in this entry. 03041 * 03042 * @see @c present_props. 03043 * 03044 * @since New in 1.4. 03045 * @deprecated This value will always be "" in version 1.7 and later. */ 03046 const char *cachable_props; 03047 03048 /** Cached property existence for this entry. 03049 * This is a space-separated list of property names. If a name exists in 03050 * @c cachable_props but not in this list, this entry does not have that 03051 * property. If a name exists in both lists, the property is present on this 03052 * entry. 03053 * 03054 * @since New in 1.4. 03055 * @deprecated This value will always be "" in version 1.7 and later. */ 03056 const char *present_props; 03057 03058 /** which changelist this item is part of, or NULL if not part of any. 03059 * @since New in 1.5. 03060 */ 03061 const char *changelist; 03062 03063 /** Size of the file after being translated into local 03064 * representation, or #SVN_WC_ENTRY_WORKING_SIZE_UNKNOWN if 03065 * unknown. 03066 * 03067 * @since New in 1.5. 03068 */ 03069 apr_off_t working_size; 03070 03071 /** Whether a local copy of this entry should be kept in the working copy 03072 * after a deletion has been committed, Only valid for the this-dir entry 03073 * when it is scheduled for deletion. 03074 * 03075 * @since New in 1.5. */ 03076 svn_boolean_t keep_local; 03077 03078 /** The depth of this entry. 03079 * 03080 * ### It's a bit annoying that we only use this on this_dir 03081 * ### entries, yet it will exist (with value svn_depth_infinity) on 03082 * ### all entries. Maybe some future extensibility would make this 03083 * ### field meaningful on entries besides this_dir. 03084 * 03085 * @since New in 1.5. */ 03086 svn_depth_t depth; 03087 03088 /** Serialized data for all of the tree conflicts detected in this_dir. 03089 * 03090 * @since New in 1.6. */ 03091 const char *tree_conflict_data; 03092 03093 /** The entry is a intra-repository file external and this is the 03094 * repository root relative path to the file specified in the 03095 * externals definition, otherwise NULL if the entry is not a file 03096 * external. 03097 * 03098 * @since New in 1.6. */ 03099 const char *file_external_path; 03100 03101 /** The entry is a intra-repository file external and this is the 03102 * peg revision number specified in the externals definition. This 03103 * field is only valid when the file_external_path field is 03104 * non-NULL. The only permissible values are 03105 * svn_opt_revision_unspecified if the entry is not an external, 03106 * svn_opt_revision_head if the external revision is unspecified or 03107 * specified with -r HEAD or svn_opt_revision_number for a specific 03108 * revision number. 03109 * 03110 * @since New in 1.6. */ 03111 svn_opt_revision_t file_external_peg_rev; 03112 03113 /** The entry is an intra-repository file external and this is the 03114 * operative revision number specified in the externals definition. 03115 * This field is only valid when the file_external_path field is 03116 * non-NULL. The only permissible values are 03117 * svn_opt_revision_unspecified if the entry is not an external, 03118 * svn_opt_revision_head if the external revision is unspecified or 03119 * specified with -r HEAD or svn_opt_revision_number for a specific 03120 * revision number. 03121 * 03122 * @since New in 1.6. */ 03123 svn_opt_revision_t file_external_rev; 03124 03125 /* IMPORTANT: If you extend this structure, check the following functions in 03126 * subversion/libsvn_wc/entries.c, to see if you need to extend them as well. 03127 * 03128 * svn_wc__atts_to_entry() 03129 * svn_wc_entry_dup() 03130 * alloc_entry() 03131 * read_entry() 03132 * write_entry() 03133 * fold_entry() 03134 */ 03135 } svn_wc_entry_t; 03136 03137 03138 /** How an entries file's owner dir is named in the entries file. 03139 * @deprecated Provided for backward compatibility with the 1.6 API. */ 03140 #define SVN_WC_ENTRY_THIS_DIR "" 03141 03142 03143 /** Set @a *entry to an entry for @a path, allocated in the access baton pool. 03144 * If @a show_hidden is TRUE, return the entry even if it's in 'excluded', 03145 * 'deleted' or 'absent' state. Excluded entries are those with their depth 03146 * set to #svn_depth_exclude. If @a path is not under revision control, or 03147 * if entry is hidden, not scheduled for re-addition, and @a show_hidden is @c 03148 * FALSE, then set @a *entry to @c NULL. 03149 * 03150 * @a *entry should not be modified, since doing so modifies the entries 03151 * cache in @a adm_access without changing the entries file on disk. 03152 * 03153 * If @a path is not a directory then @a adm_access must be an access baton 03154 * for the parent directory of @a path. To avoid needing to know whether 03155 * @a path is a directory or not, if @a path is a directory @a adm_access 03156 * can still be an access baton for the parent of @a path so long as the 03157 * access baton for @a path itself is in the same access baton set. 03158 * 03159 * @a path can be relative or absolute but must share the same base used 03160 * to open @a adm_access. 03161 * 03162 * Note that it is possible for @a path to be absent from disk but still 03163 * under revision control; and conversely, it is possible for @a path to 03164 * be present, but not under revision control. 03165 * 03166 * Use @a pool only for local processing. 03167 * 03168 * @deprecated Provided for backward compatibility with the 1.6 API. 03169 */ 03170 SVN_DEPRECATED 03171 svn_error_t * 03172 svn_wc_entry(const svn_wc_entry_t **entry, 03173 const char *path, 03174 svn_wc_adm_access_t *adm_access, 03175 svn_boolean_t show_hidden, 03176 apr_pool_t *pool); 03177 03178 03179 /** Parse the `entries' file for @a adm_access and return a hash @a entries, 03180 * whose keys are (<tt>const char *</tt>) entry names and values are 03181 * (<tt>svn_wc_entry_t *</tt>). The hash @a entries, and its keys and 03182 * values, are allocated from the pool used to open the @a adm_access 03183 * baton (that's how the entries caching works). @a pool is used for 03184 * transient allocations. 03185 * 03186 * Entries that are in a 'excluded', 'deleted' or 'absent' state (and not 03187 * scheduled for re-addition) are not returned in the hash, unless 03188 * @a show_hidden is TRUE. Excluded entries are those with their depth set to 03189 * #svn_depth_exclude. 03190 * 03191 * @par Important: 03192 * The @a entries hash is the entries cache in @a adm_access 03193 * and so usually the hash itself, the keys and the values should be treated 03194 * as read-only. If any of these are modified then it is the caller's 03195 * responsibility to ensure that the entries file on disk is updated. Treat 03196 * the hash values as type (<tt>const svn_wc_entry_t *</tt>) if you wish to 03197 * avoid accidental modification. Modifying the schedule member is a 03198 * particularly bad idea, as the entries writing process relies on having 03199 * access to the original schedule. Use a duplicate entry to modify the 03200 * schedule. 03201 * 03202 * @par Important: 03203 * Only the entry structures representing files and 03204 * #SVN_WC_ENTRY_THIS_DIR contain complete information. The entry 03205 * structures representing subdirs have only the `kind' and `state' 03206 * fields filled in. If you want info on a subdir, you must use this 03207 * routine to open its @a path and read the #SVN_WC_ENTRY_THIS_DIR 03208 * structure, or call svn_wc_entry() on its @a path. 03209 * 03210 * @deprecated Provided for backward compatibility with the 1.6 API. 03211 */ 03212 SVN_DEPRECATED 03213 svn_error_t * 03214 svn_wc_entries_read(apr_hash_t **entries, 03215 svn_wc_adm_access_t *adm_access, 03216 svn_boolean_t show_hidden, 03217 apr_pool_t *pool); 03218 03219 03220 /** Return a duplicate of @a entry, allocated in @a pool. No part of the new 03221 * entry will be shared with @a entry. 03222 * 03223 * @deprecated Provided for backward compatibility with the 1.6 API. 03224 */ 03225 SVN_DEPRECATED 03226 svn_wc_entry_t * 03227 svn_wc_entry_dup(const svn_wc_entry_t *entry, 03228 apr_pool_t *pool); 03229 03230 /** @} */ 03231 03232 03233 /** 03234 * This struct contains information about a working copy node. 03235 * 03236 * @note Fields may be added to the end of this structure in future 03237 * versions. Therefore, users shouldn't allocate structures of this 03238 * type, to preserve binary compatibility. 03239 * 03240 * @since New in 1.7. 03241 */ 03242 typedef struct svn_wc_info_t 03243 { 03244 /** The schedule of this item 03245 * ### Do we still need schedule? */ 03246 svn_wc_schedule_t schedule; 03247 03248 /** If copied, the URL from which the copy was made, else @c NULL. */ 03249 const char *copyfrom_url; 03250 03251 /** If copied, the revision from which the copy was made, 03252 * else #SVN_INVALID_REVNUM. */ 03253 svn_revnum_t copyfrom_rev; 03254 03255 /** The checksum of the node, if it is a file. */ 03256 const svn_checksum_t *checksum; 03257 03258 /** A changelist the item is in, @c NULL if this node is not in a 03259 * changelist. */ 03260 const char *changelist; 03261 03262 /** The depth of the item, see #svn_depth_t */ 03263 svn_depth_t depth; 03264 03265 /** 03266 * The size of the file after being translated into its local 03267 * representation, or #SVN_INVALID_FILESIZE if unknown. 03268 * Not applicable for directories. 03269 */ 03270 svn_filesize_t recorded_size; 03271 03272 /** 03273 * The time at which the file had the recorded size recorded_size and was 03274 * considered unmodified. */ 03275 apr_time_t recorded_time; 03276 03277 /** Array of const svn_wc_conflict_description2_t * which contains info 03278 * on any conflict of which this node is a victim. Otherwise NULL. */ 03279 const apr_array_header_t *conflicts; 03280 03281 /** The local absolute path of the working copy root. */ 03282 const char *wcroot_abspath; 03283 03284 /** The path the node was moved from, if it was moved here. Else NULL. 03285 * @since New in 1.8. */ 03286 const char *moved_from_abspath; 03287 03288 /** The path the node was moved to, if it was moved away. Else NULL. 03289 * @since New in 1.8. */ 03290 const char *moved_to_abspath; 03291 } svn_wc_info_t; 03292 03293 /** 03294 * Return a duplicate of @a info, allocated in @a pool. No part of the new 03295 * structure will be shared with @a info. 03296 * 03297 * @since New in 1.7. 03298 */ 03299 svn_wc_info_t * 03300 svn_wc_info_dup(const svn_wc_info_t *info, 03301 apr_pool_t *pool); 03302 03303 03304 /** Given @a local_abspath in a dir under version control, decide if it is 03305 * in a state of conflict; return the answers in @a *text_conflicted_p, @a 03306 * *prop_conflicted_p, and @a *tree_conflicted_p. If one or two of the 03307 * answers are uninteresting, simply pass @c NULL pointers for those. 03308 * 03309 * If @a local_abspath is unversioned or does not exist, return 03310 * #SVN_ERR_WC_PATH_NOT_FOUND. 03311 * 03312 * If the @a local_abspath has corresponding text conflict files (with suffix 03313 * .mine, .theirs, etc.) that cannot be found, assume that the text conflict 03314 * has been resolved by the user and return @c FALSE in @a 03315 * *text_conflicted_p. 03316 * 03317 * Similarly, if a property conflicts file (.prej suffix) is said to exist, 03318 * but it cannot be found, assume that the property conflicts have been 03319 * resolved by the user and return @c FALSE in @a *prop_conflicted_p. 03320 * 03321 * @a *tree_conflicted_p can't be auto-resolved in this fashion. An 03322 * explicit `resolved' is needed. 03323 * 03324 * @since New in 1.7. 03325 */ 03326 svn_error_t * 03327 svn_wc_conflicted_p3(svn_boolean_t *text_conflicted_p, 03328 svn_boolean_t *prop_conflicted_p, 03329 svn_boolean_t *tree_conflicted_p, 03330 svn_wc_context_t *wc_ctx, 03331 const char *local_abspath, 03332 apr_pool_t *scratch_pool); 03333 03334 /** Similar to svn_wc_conflicted_p3(), but with a path/adm_access parameter 03335 * pair in place of a wc_ctx/local_abspath pair. 03336 * 03337 * @since New in 1.6. 03338 * @deprecated Provided for backward compatibility with the 1.6 API. 03339 */ 03340 SVN_DEPRECATED 03341 svn_error_t * 03342 svn_wc_conflicted_p2(svn_boolean_t *text_conflicted_p, 03343 svn_boolean_t *prop_conflicted_p, 03344 svn_boolean_t *tree_conflicted_p, 03345 const char *path, 03346 svn_wc_adm_access_t *adm_access, 03347 apr_pool_t *pool); 03348 03349 /** Given a @a dir_path under version control, decide if one of its entries 03350 * (@a entry) is in a state of conflict; return the answers in @a 03351 * text_conflicted_p and @a prop_conflicted_p. These pointers must not be 03352 * null. 03353 * 03354 * If the @a entry mentions that text conflict files (with suffix .mine, 03355 * .theirs, etc.) exist, but they cannot be found, assume the text conflict 03356 * has been resolved by the user and return FALSE in @a *text_conflicted_p. 03357 * 03358 * Similarly, if the @a entry mentions that a property conflicts file (.prej 03359 * suffix) exists, but it cannot be found, assume the property conflicts 03360 * have been resolved by the user and return FALSE in @a *prop_conflicted_p. 03361 * 03362 * The @a entry is not updated. 03363 * 03364 * @deprecated Provided for backward compatibility with the 1.5 API. 03365 */ 03366 SVN_DEPRECATED 03367 svn_error_t * 03368 svn_wc_conflicted_p(svn_boolean_t *text_conflicted_p, 03369 svn_boolean_t *prop_conflicted_p, 03370 const char *dir_path, 03371 const svn_wc_entry_t *entry, 03372 apr_pool_t *pool); 03373 03374 03375 /** Set @a *url and @a *rev to the ancestor URL and revision for @a path, 03376 * allocating in @a pool. @a adm_access must be an access baton for @a path. 03377 * 03378 * If @a url or @a rev is NULL, then ignore it (just don't return the 03379 * corresponding information). 03380 * 03381 * @deprecated Provided for backward compatibility with the 1.6 API. 03382 */ 03383 SVN_DEPRECATED 03384 svn_error_t * 03385 svn_wc_get_ancestry(char **url, 03386 svn_revnum_t *rev, 03387 const char *path, 03388 svn_wc_adm_access_t *adm_access, 03389 apr_pool_t *pool); 03390 03391 03392 /** A callback vtable invoked by the generic entry-walker function. 03393 * @since New in 1.5. 03394 */ 03395 typedef struct svn_wc_entry_callbacks2_t 03396 { 03397 /** An @a entry was found at @a path. */ 03398 svn_error_t *(*found_entry)(const char *path, 03399 const svn_wc_entry_t *entry, 03400 void *walk_baton, 03401 apr_pool_t *pool); 03402 03403 /** Handle the error @a err encountered while processing @a path. 03404 * Wrap or squelch @a err as desired, and return an #svn_error_t 03405 * *, or #SVN_NO_ERROR. 03406 */ 03407 svn_error_t *(*handle_error)(const char *path, 03408 svn_error_t *err, 03409 void *walk_baton, 03410 apr_pool_t *pool); 03411 03412 } svn_wc_entry_callbacks2_t; 03413 03414 /** @deprecated Provided for backward compatibility with the 1.4 API. */ 03415 typedef struct svn_wc_entry_callbacks_t 03416 { 03417 /** An @a entry was found at @a path. */ 03418 svn_error_t *(*found_entry)(const char *path, 03419 const svn_wc_entry_t *entry, 03420 void *walk_baton, 03421 apr_pool_t *pool); 03422 03423 } svn_wc_entry_callbacks_t; 03424 03425 /** 03426 * A generic entry-walker. 03427 * 03428 * Do a potentially recursive depth-first entry-walk beginning on 03429 * @a path, which can be a file or dir. Call callbacks in 03430 * @a walk_callbacks, passing @a walk_baton to each. Use @a pool for 03431 * looping, recursion, and to allocate all entries returned. 03432 * @a adm_access must be an access baton for @a path. The pool 03433 * passed to @a walk_callbacks is a temporary subpool of @a pool. 03434 * 03435 * If @a depth is #svn_depth_empty, invoke the callbacks on @a path 03436 * and return without recursing further. If #svn_depth_files, do 03437 * the same and invoke the callbacks on file children (if any) of 03438 * @a path, then return. If #svn_depth_immediates, do the preceding 03439 * but also invoke callbacks on immediate subdirectories, then return. 03440 * If #svn_depth_infinity, recurse fully starting from @a path. 03441 * 03442 * If @a cancel_func is non-NULL, call it with @a cancel_baton to determine 03443 * if the client has canceled the operation. 03444 * 03445 * Like our other entries interfaces, entries that are in a 'excluded', 03446 * 'deleted' or 'absent' state (and not scheduled for re-addition) are not 03447 * discovered, unless @a show_hidden is TRUE. Excluded entries are those with 03448 * their depth set to #svn_depth_exclude. 03449 * 03450 * When a new directory is entered, #SVN_WC_ENTRY_THIS_DIR will always 03451 * be returned first. 03452 * 03453 * @note Callers should be aware that each directory will be 03454 * returned *twice*: first as an entry within its parent, and 03455 * subsequently as the '.' entry within itself. The two calls can be 03456 * distinguished by looking for #SVN_WC_ENTRY_THIS_DIR in the 'name' 03457 * field of the entry. 03458 * 03459 * @since New in 1.5. 03460 * @deprecated Provided for backward compatibility with the 1.6 API. 03461 */ 03462 SVN_DEPRECATED 03463 svn_error_t * 03464 svn_wc_walk_entries3(const char *path, 03465 svn_wc_adm_access_t *adm_access, 03466 const svn_wc_entry_callbacks2_t *walk_callbacks, 03467 void *walk_baton, 03468 svn_depth_t depth, 03469 svn_boolean_t show_hidden, 03470 svn_cancel_func_t cancel_func, 03471 void *cancel_baton, 03472 apr_pool_t *pool); 03473 03474 /** 03475 * Similar to svn_wc_walk_entries3(), but without cancellation support 03476 * or error handling from @a walk_callbacks, and with @a depth always 03477 * set to #svn_depth_infinity. 03478 * 03479 * @since New in 1.2. 03480 * @deprecated Provided for backward compatibility with the 1.4 API. 03481 */ 03482 SVN_DEPRECATED 03483 svn_error_t * 03484 svn_wc_walk_entries2(const char *path, 03485 svn_wc_adm_access_t *adm_access, 03486 const svn_wc_entry_callbacks_t *walk_callbacks, 03487 void *walk_baton, 03488 svn_boolean_t show_hidden, 03489 svn_cancel_func_t cancel_func, 03490 void *cancel_baton, 03491 apr_pool_t *pool); 03492 03493 /** 03494 * Similar to svn_wc_walk_entries2(), but without cancellation support. 03495 * 03496 * @deprecated Provided for backward compatibility with the 1.1 API. 03497 */ 03498 SVN_DEPRECATED 03499 svn_error_t * 03500 svn_wc_walk_entries(const char *path, 03501 svn_wc_adm_access_t *adm_access, 03502 const svn_wc_entry_callbacks_t *walk_callbacks, 03503 void *walk_baton, 03504 svn_boolean_t show_hidden, 03505 apr_pool_t *pool); 03506 03507 03508 /** Mark missing @a path as 'deleted' in its @a parent's list of 03509 * entries. @a path should be a directory that is both deleted (via 03510 * svn_wc_delete4) and removed (via a system call). This function 03511 * should only be called during post-commit processing following a 03512 * successful commit editor drive. 03513 * 03514 * Return #SVN_ERR_WC_PATH_FOUND if @a path isn't actually missing. 03515 * 03516 * @deprecated Provided for backward compatibility with the 1.6 API. 03517 */ 03518 SVN_DEPRECATED 03519 svn_error_t * 03520 svn_wc_mark_missing_deleted(const char *path, 03521 svn_wc_adm_access_t *parent, 03522 apr_pool_t *pool); 03523 03524 03525 /** Ensure that an administrative area exists for @a local_abspath, so 03526 * that @a local_abspath is a working copy subdir based on @a url at @a 03527 * revision, with depth @a depth, and with repository UUID @a repos_uuid 03528 * and repository root URL @a repos_root_url. 03529 * 03530 * @a depth must be a definite depth, it cannot be #svn_depth_unknown. 03531 * @a repos_uuid and @a repos_root_url MUST NOT be @c NULL, and 03532 * @a repos_root_url must be a prefix of @a url. 03533 * 03534 * If the administrative area does not exist, then create it and 03535 * initialize it to an unlocked state. 03536 * 03537 * If the administrative area already exists then the given @a url 03538 * must match the URL in the administrative area and the given 03539 * @a revision must match the BASE of the working copy dir unless 03540 * the admin directory is scheduled for deletion or the 03541 * #SVN_ERR_WC_OBSTRUCTED_UPDATE error will be returned. 03542 * 03543 * Do not ensure existence of @a local_abspath itself; if @a local_abspath 03544 * does not exist, return error. 03545 * 03546 * Use @a scratch_pool for temporary allocations. 03547 * 03548 * @since New in 1.7. 03549 */ 03550 svn_error_t * 03551 svn_wc_ensure_adm4(svn_wc_context_t *wc_ctx, 03552 const char *local_abspath, 03553 const char *url, 03554 const char *repos_root_url, 03555 const char *repos_uuid, 03556 svn_revnum_t revision, 03557 svn_depth_t depth, 03558 apr_pool_t *scratch_pool); 03559 03560 /** 03561 * Similar to svn_wc_ensure_adm4(), but without the wc context parameter. 03562 * 03563 * @note the @a uuid and @a repos parameters were documented as allowing 03564 * @c NULL to be passed. Beginning with 1.7, this will return an error, 03565 * contrary to prior documented behavior: see 'notes/api-errata/1.7/wc005.txt'. 03566 * 03567 * @since New in 1.5. 03568 * @deprecated Provided for backwards compatibility with the 1.6 API. 03569 */ 03570 SVN_DEPRECATED 03571 svn_error_t * 03572 svn_wc_ensure_adm3(const char *path, 03573 const char *uuid, 03574 const char *url, 03575 const char *repos, 03576 svn_revnum_t revision, 03577 svn_depth_t depth, 03578 apr_pool_t *pool); 03579 03580 03581 /** 03582 * Similar to svn_wc_ensure_adm3(), but with @a depth set to 03583 * #svn_depth_infinity. 03584 * 03585 * See the note on svn_wc_ensure_adm3() regarding the @a repos and @a uuid 03586 * parameters. 03587 * 03588 * @since New in 1.3. 03589 * @deprecated Provided for backwards compatibility with the 1.4 API. 03590 */ 03591 SVN_DEPRECATED 03592 svn_error_t * 03593 svn_wc_ensure_adm2(const char *path, 03594 const char *uuid, 03595 const char *url, 03596 const char *repos, 03597 svn_revnum_t revision, 03598 apr_pool_t *pool); 03599 03600 03601 /** 03602 * Similar to svn_wc_ensure_adm2(), but with @a repos set to @c NULL. 03603 * 03604 * @note as of 1.7, this function always returns #SVN_ERR_BAD_URL since 03605 * the @a repos parameter may not be @c NULL. 03606 * 03607 * @deprecated Provided for backwards compatibility with the 1.2 API. 03608 */ 03609 SVN_DEPRECATED 03610 svn_error_t * 03611 svn_wc_ensure_adm(const char *path, 03612 const char *uuid, 03613 const char *url, 03614 svn_revnum_t revision, 03615 apr_pool_t *pool); 03616 03617 03618 /** Set the repository root URL of @a path to @a repos, if possible. 03619 * 03620 * Before Subversion 1.7 there could be working copy directories that 03621 * didn't have a stored repository root in some specific circumstances. 03622 * This function allowed setting this root later. 03623 * 03624 * Since Subversion 1.7 this function just returns #SVN_NO_ERROR. 03625 * 03626 * @since New in 1.3. 03627 * @deprecated Provided for backwards compatibility with the 1.6 API. 03628 */ 03629 SVN_DEPRECATED 03630 svn_error_t * 03631 svn_wc_maybe_set_repos_root(svn_wc_adm_access_t *adm_access, 03632 const char *path, 03633 const char *repos, 03634 apr_pool_t *pool); 03635 03636 03637 /** 03638 * @defgroup svn_wc_status Working copy status. 03639 * @{ 03640 * 03641 * We have three functions for getting working copy status: one function 03642 * for getting the status of exactly one thing, another for 03643 * getting the statuses of (potentially) multiple things and a third for 03644 * getting the working copy out-of-dateness with respect to the repository. 03645 * 03646 * Why do we have two different functions for getting working copy status? 03647 * The concept of depth, as explained in the documentation for 03648 * svn_depth_t, may be useful in understanding this. Suppose we're 03649 * getting the status of directory D: 03650 * 03651 * To offer all three levels, we could have one unified function, 03652 * taking a `depth' parameter. Unfortunately, because this function 03653 * would have to handle multiple return values as well as the single 03654 * return value case, getting the status of just one entity would 03655 * become cumbersome: you'd have to roll through a hash to find one 03656 * lone status. 03657 * 03658 * So we have svn_wc_status3() for depth-empty (just D itself), and 03659 * svn_wc_walk_status() for depth-immediates and depth-infinity, 03660 * since the latter two involve multiple return values. And for 03661 * out-of-dateness information we have svn_wc_get_status_editor5(). 03662 */ 03663 03664 /** The type of status for the working copy. */ 03665 enum svn_wc_status_kind 03666 { 03667 /** does not exist */ 03668 svn_wc_status_none = 1, 03669 03670 /** is not a versioned thing in this wc */ 03671 svn_wc_status_unversioned, 03672 03673 /** exists, but uninteresting */ 03674 svn_wc_status_normal, 03675 03676 /** is scheduled for addition */ 03677 svn_wc_status_added, 03678 03679 /** under v.c., but is missing */ 03680 svn_wc_status_missing, 03681 03682 /** scheduled for deletion */ 03683 svn_wc_status_deleted, 03684 03685 /** was deleted and then re-added */ 03686 svn_wc_status_replaced, 03687 03688 /** text or props have been modified */ 03689 svn_wc_status_modified, 03690 03691 /** local mods received repos mods (### unused) */ 03692 svn_wc_status_merged, 03693 03694 /** local mods received conflicting repos mods */ 03695 svn_wc_status_conflicted, 03696 03697 /** is unversioned but configured to be ignored */ 03698 svn_wc_status_ignored, 03699 03700 /** an unversioned resource is in the way of the versioned resource */ 03701 svn_wc_status_obstructed, 03702 03703 /** an unversioned directory path populated by an svn:externals 03704 property; this status is not used for file externals */ 03705 svn_wc_status_external, 03706 03707 /** a directory doesn't contain a complete entries list */ 03708 svn_wc_status_incomplete 03709 }; 03710 03711 /** 03712 * Structure for holding the "status" of a working copy item. 03713 * 03714 * @note Fields may be added to the end of this structure in future 03715 * versions. Therefore, to preserve binary compatibility, users 03716 * should not directly allocate structures of this type. 03717 * 03718 * @since New in 1.7. 03719 */ 03720 typedef struct svn_wc_status3_t 03721 { 03722 /** The kind of node as recorded in the working copy */ 03723 svn_node_kind_t kind; 03724 03725 /** The depth of the node as recorded in the working copy 03726 * (#svn_depth_unknown for files or when no depth is set) */ 03727 svn_depth_t depth; 03728 03729 /** The actual size of the working file on disk, or SVN_INVALID_FILESIZE 03730 * if unknown (or if the item isn't a file at all). */ 03731 svn_filesize_t filesize; 03732 03733 /** If the path is under version control, versioned is TRUE, otherwise 03734 * FALSE. */ 03735 svn_boolean_t versioned; 03736 03737 /** Set to TRUE if the item is the victim of a conflict. */ 03738 svn_boolean_t conflicted; 03739 03740 /** The status of the node itself. In order of precedence: Obstructions, 03741 * structural changes, text changes. */ 03742 enum svn_wc_status_kind node_status; 03743 03744 /** The status of the entry's text. */ 03745 enum svn_wc_status_kind text_status; 03746 03747 /** The status of the entry's properties. */ 03748 enum svn_wc_status_kind prop_status; 03749 03750 /** a file or directory can be 'copied' if it's scheduled for 03751 * addition-with-history (or part of a subtree that is scheduled as such.). 03752 */ 03753 svn_boolean_t copied; 03754 03755 /** Base revision. */ 03756 svn_revnum_t revision; 03757 03758 /** Last revision this was changed */ 03759 svn_revnum_t changed_rev; 03760 03761 /** Date of last commit. */ 03762 apr_time_t changed_date; 03763 03764 /** Last commit author of this item */ 03765 const char *changed_author; 03766 03767 /** The URL of the repository */ 03768 const char *repos_root_url; 03769 03770 /** The UUID of the repository */ 03771 const char *repos_uuid; 03772 03773 /** The in-repository path relative to the repository root. */ 03774 const char *repos_relpath; 03775 03776 /** a file or directory can be 'switched' if the switch command has been 03777 * used. If this is TRUE, then file_external will be FALSE. 03778 */ 03779 svn_boolean_t switched; 03780 03781 /** This directory has a working copy lock */ 03782 svn_boolean_t locked; 03783 03784 /** The repository file lock. (Values of path, token, owner, comment 03785 * and are available if a lock is present) */ 03786 const svn_lock_t *lock; 03787 03788 /** Which changelist this item is part of, or NULL if not part of any. */ 03789 const char *changelist; 03790 03791 /** 03792 * @defgroup svn_wc_status_ood WC out-of-date info from the repository 03793 * @{ 03794 * 03795 * When the working copy item is out-of-date compared to the 03796 * repository, the following fields represent the state of the 03797 * youngest revision of the item in the repository. If the working 03798 * copy is not out of date, the fields are initialized as described 03799 * below. 03800 */ 03801 03802 /** Set to the node kind of the youngest commit, or #svn_node_none 03803 * if not out of date. */ 03804 svn_node_kind_t ood_kind; 03805 03806 /** The status of the node, based on the text status if the node has no 03807 * restructuring changes */ 03808 enum svn_wc_status_kind repos_node_status; 03809 03810 /** The entry's text status in the repository. */ 03811 enum svn_wc_status_kind repos_text_status; 03812 03813 /** The entry's property status in the repository. */ 03814 enum svn_wc_status_kind repos_prop_status; 03815 03816 /** The entry's lock in the repository, if any. */ 03817 const svn_lock_t *repos_lock; 03818 03819 /** Set to the youngest committed revision, or #SVN_INVALID_REVNUM 03820 * if not out of date. */ 03821 svn_revnum_t ood_changed_rev; 03822 03823 /** Set to the most recent commit date, or @c 0 if not out of date. */ 03824 apr_time_t ood_changed_date; 03825 03826 /** Set to the user name of the youngest commit, or @c NULL if not 03827 * out of date or non-existent. Because a non-existent @c 03828 * svn:author property has the same behavior as an out-of-date 03829 * working copy, examine @c ood_last_cmt_rev to determine whether 03830 * the working copy is out of date. */ 03831 const char *ood_changed_author; 03832 03833 /** @} */ 03834 03835 /** Set to the local absolute path that this node was moved from, if this 03836 * file or directory has been moved here locally and is the root of that 03837 * move. Otherwise set to NULL. 03838 * 03839 * This will be NULL for moved-here nodes that are just part of a subtree 03840 * that was moved along (and are not themselves a root of a different move 03841 * operation). 03842 * 03843 * @since New in 1.8. */ 03844 const char *moved_from_abspath; 03845 03846 /** Set to the local absolute path that this node was moved to, if this file 03847 * or directory has been moved away locally and corresponds to the root 03848 * of the destination side of the move. Otherwise set to NULL. 03849 * 03850 * Note: Saying just "root" here could be misleading. For example: 03851 * svn mv A AA; 03852 * svn mv AA/B BB; 03853 * creates a situation where A/B is moved-to BB, but one could argue that 03854 * the move source's root actually was AA/B. Note that, as far as the 03855 * working copy is concerned, above case is exactly identical to: 03856 * svn mv A/B BB; 03857 * svn mv A AA; 03858 * In both situations, @a moved_to_abspath would be set for nodes A (moved 03859 * to AA) and A/B (moved to BB), only. 03860 * 03861 * This will be NULL for moved-away nodes that were just part of a subtree 03862 * that was moved along (and are not themselves a root of a different move 03863 * operation). 03864 * 03865 * @since New in 1.8. */ 03866 const char *moved_to_abspath; 03867 03868 /** @c TRUE iff the item is a file brought in by an svn:externals definition. 03869 * @since New in 1.8. */ 03870 svn_boolean_t file_external; 03871 03872 03873 /** The actual kind of the node in the working copy. May differ from 03874 * @a kind on obstructions, deletes, etc. #svn_node_unknown if unavailable. 03875 * 03876 * @since New in 1.9 */ 03877 svn_node_kind_t actual_kind; 03878 03879 /* NOTE! Please update svn_wc_dup_status3() when adding new fields here. */ 03880 } svn_wc_status3_t; 03881 03882 /** 03883 * ### All diffs are not yet known. 03884 * Same as svn_wc_status3_t, but without the #svn_boolean_t 'versioned' 03885 * field. Instead an item that is not versioned has the 'entry' field set to 03886 * @c NULL. 03887 * 03888 * @since New in 1.2. 03889 * @deprecated Provided for backward compatibility with the 1.6 API. 03890 */ 03891 typedef struct svn_wc_status2_t 03892 { 03893 /** Can be @c NULL if not under version control. */ 03894 const svn_wc_entry_t *entry; 03895 03896 /** The status of the entry itself, including its text if it is a file. */ 03897 enum svn_wc_status_kind text_status; 03898 03899 /** The status of the entry's properties. */ 03900 enum svn_wc_status_kind prop_status; 03901 03902 /** a directory can be 'locked' if a working copy update was interrupted. */ 03903 svn_boolean_t locked; 03904 03905 /** a file or directory can be 'copied' if it's scheduled for 03906 * addition-with-history (or part of a subtree that is scheduled as such.). 03907 */ 03908 svn_boolean_t copied; 03909 03910 /** a file or directory can be 'switched' if the switch command has been 03911 * used. If this is TRUE, then file_external will be FALSE. 03912 */ 03913 svn_boolean_t switched; 03914 03915 /** The entry's text status in the repository. */ 03916 enum svn_wc_status_kind repos_text_status; 03917 03918 /** The entry's property status in the repository. */ 03919 enum svn_wc_status_kind repos_prop_status; 03920 03921 /** The entry's lock in the repository, if any. */ 03922 svn_lock_t *repos_lock; 03923 03924 /** Set to the URI (actual or expected) of the item. 03925 * @since New in 1.3 03926 */ 03927 const char *url; 03928 03929 /** 03930 * @defgroup svn_wc_status_ood WC out-of-date info from the repository 03931 * @{ 03932 * 03933 * When the working copy item is out-of-date compared to the 03934 * repository, the following fields represent the state of the 03935 * youngest revision of the item in the repository. If the working 03936 * copy is not out of date, the fields are initialized as described 03937 * below. 03938 */ 03939 03940 /** Set to the youngest committed revision, or #SVN_INVALID_REVNUM 03941 * if not out of date. 03942 * @since New in 1.3 03943 */ 03944 svn_revnum_t ood_last_cmt_rev; 03945 03946 /** Set to the most recent commit date, or @c 0 if not out of date. 03947 * @since New in 1.3 03948 */ 03949 apr_time_t ood_last_cmt_date; 03950 03951 /** Set to the node kind of the youngest commit, or #svn_node_none 03952 * if not out of date. 03953 * @since New in 1.3 03954 */ 03955 svn_node_kind_t ood_kind; 03956 03957 /** Set to the user name of the youngest commit, or @c NULL if not 03958 * out of date or non-existent. Because a non-existent @c 03959 * svn:author property has the same behavior as an out-of-date 03960 * working copy, examine @c ood_last_cmt_rev to determine whether 03961 * the working copy is out of date. 03962 * @since New in 1.3 03963 */ 03964 const char *ood_last_cmt_author; 03965 03966 /** @} */ 03967 03968 /** Non-NULL if the entry is the victim of a tree conflict. 03969 * @since New in 1.6 03970 */ 03971 svn_wc_conflict_description_t *tree_conflict; 03972 03973 /** If the item is a file that was added to the working copy with an 03974 * svn:externals; if file_external is TRUE, then switched is always 03975 * FALSE. 03976 * @since New in 1.6 03977 */ 03978 svn_boolean_t file_external; 03979 03980 /** The actual status of the text compared to the pristine base of the 03981 * file. This value isn't masked by other working copy statuses. 03982 * @c pristine_text_status is #svn_wc_status_none if this value was 03983 * not calculated during the status walk. 03984 * @since New in 1.6 03985 */ 03986 enum svn_wc_status_kind pristine_text_status; 03987 03988 /** The actual status of the properties compared to the pristine base of 03989 * the node. This value isn't masked by other working copy statuses. 03990 * @c pristine_prop_status is #svn_wc_status_none if this value was 03991 * not calculated during the status walk. 03992 * @since New in 1.6 03993 */ 03994 enum svn_wc_status_kind pristine_prop_status; 03995 03996 } svn_wc_status2_t; 03997 03998 03999 04000 /** 04001 * Same as #svn_wc_status2_t, but without the #svn_lock_t 'repos_lock', const char 'url', #svn_revnum_t 'ood_last_cmt_rev', apr_time_t 'ood_last_cmt_date', #svn_node_kind_t 'ood_kind', const char 'ood_last_cmt_author', #svn_wc_conflict_description_t 'tree_conflict', #svn_boolean_t 'file_external', #svn_wc_status_kind 'pristine_text_status', and #svn_wc_status_kind 'pristine_prop_status' fields. 04002 * 04003 * @deprecated Provided for backward compatibility with the 1.1 API. 04004 */ 04005 typedef struct svn_wc_status_t 04006 { 04007 /** Can be @c NULL if not under version control. */ 04008 const svn_wc_entry_t *entry; 04009 04010 /** The status of the entries text. */ 04011 enum svn_wc_status_kind text_status; 04012 04013 /** The status of the entries properties. */ 04014 enum svn_wc_status_kind prop_status; 04015 04016 /** a directory can be 'locked' if a working copy update was interrupted. */ 04017 svn_boolean_t locked; 04018 04019 /** a file or directory can be 'copied' if it's scheduled for 04020 * addition-with-history (or part of a subtree that is scheduled as such.). 04021 */ 04022 svn_boolean_t copied; 04023 04024 /** a file or directory can be 'switched' if the switch command has been 04025 * used. 04026 */ 04027 svn_boolean_t switched; 04028 04029 /** The entry's text status in the repository. */ 04030 enum svn_wc_status_kind repos_text_status; 04031 04032 /** The entry's property status in the repository. */ 04033 enum svn_wc_status_kind repos_prop_status; 04034 04035 } svn_wc_status_t; 04036 04037 04038 /** 04039 * Return a deep copy of the @a orig_stat status structure, allocated 04040 * in @a pool. 04041 * 04042 * @since New in 1.7. 04043 */ 04044 svn_wc_status3_t * 04045 svn_wc_dup_status3(const svn_wc_status3_t *orig_stat, 04046 apr_pool_t *pool); 04047 04048 /** 04049 * Same as svn_wc_dup_status3(), but for older svn_wc_status_t structures. 04050 * 04051 * @since New in 1.2 04052 * @deprecated Provided for backward compatibility with the 1.6 API. 04053 */ 04054 SVN_DEPRECATED 04055 svn_wc_status2_t * 04056 svn_wc_dup_status2(const svn_wc_status2_t *orig_stat, 04057 apr_pool_t *pool); 04058 04059 04060 /** 04061 * Same as svn_wc_dup_status2(), but for older svn_wc_status_t structures. 04062 * 04063 * @deprecated Provided for backward compatibility with the 1.1 API. 04064 */ 04065 SVN_DEPRECATED 04066 svn_wc_status_t * 04067 svn_wc_dup_status(const svn_wc_status_t *orig_stat, 04068 apr_pool_t *pool); 04069 04070 04071 /** 04072 * Fill @a *status for @a local_abspath, allocating in @a result_pool. 04073 * Use @a scratch_pool for temporary allocations. 04074 * 04075 * Here are some things to note about the returned structure. A quick 04076 * examination of the @c status->text_status after a successful return of 04077 * this function can reveal the following things: 04078 * 04079 * - #svn_wc_status_none : @a local_abspath is not versioned, and is 04080 * not present on disk 04081 * 04082 * - #svn_wc_status_missing : @a local_abspath is versioned, but is 04083 * missing from the working copy. 04084 * 04085 * - #svn_wc_status_unversioned : @a local_abspath is not versioned, 04086 * but is present on disk and not being 04087 * ignored (see above). 04088 * 04089 * The other available results for the @c text_status field are more 04090 * straightforward in their meanings. See the comments on the 04091 * #svn_wc_status_kind structure for some hints. 04092 * 04093 * @since New in 1.7. 04094 */ 04095 svn_error_t * 04096 svn_wc_status3(svn_wc_status3_t **status, 04097 svn_wc_context_t *wc_ctx, 04098 const char *local_abspath, 04099 apr_pool_t *result_pool, 04100 apr_pool_t *scratch_pool); 04101 04102 /** Similar to svn_wc_status3(), but with a adm_access baton and absolute 04103 * path. 04104 * 04105 * @since New in 1.2. 04106 * @deprecated Provided for backward compatibility with the 1.6 API. 04107 */ 04108 SVN_DEPRECATED 04109 svn_error_t * 04110 svn_wc_status2(svn_wc_status2_t **status, 04111 const char *path, 04112 svn_wc_adm_access_t *adm_access, 04113 apr_pool_t *pool); 04114 04115 04116 /** 04117 * Same as svn_wc_status2(), but for older svn_wc_status_t structures. 04118 * 04119 * @deprecated Provided for backward compatibility with the 1.1 API. 04120 */ 04121 SVN_DEPRECATED 04122 svn_error_t * 04123 svn_wc_status(svn_wc_status_t **status, 04124 const char *path, 04125 svn_wc_adm_access_t *adm_access, 04126 apr_pool_t *pool); 04127 04128 04129 04130 04131 /** 04132 * A callback for reporting a @a status about @a local_abspath. 04133 * 04134 * @a baton is a closure object; it should be provided by the 04135 * implementation, and passed by the caller. 04136 * 04137 * @a scratch_pool will be cleared between invocations to the callback. 04138 * 04139 * @since New in 1.7. 04140 */ 04141 typedef svn_error_t *(*svn_wc_status_func4_t)(void *baton, 04142 const char *local_abspath, 04143 const svn_wc_status3_t *status, 04144 apr_pool_t *scratch_pool); 04145 04146 /** 04147 * Same as svn_wc_status_func4_t, but with a non-const status and a relative 04148 * path. 04149 * 04150 * @since New in 1.6. 04151 * @deprecated Provided for backward compatibility with the 1.6 API. 04152 */ 04153 typedef svn_error_t *(*svn_wc_status_func3_t)(void *baton, 04154 const char *path, 04155 svn_wc_status2_t *status, 04156 apr_pool_t *pool); 04157 04158 /** 04159 * Same as svn_wc_status_func3_t, but without a provided pool or 04160 * the ability to propagate errors. 04161 * 04162 * @since New in 1.2. 04163 * @deprecated Provided for backward compatibility with the 1.5 API. 04164 */ 04165 typedef void (*svn_wc_status_func2_t)(void *baton, 04166 const char *path, 04167 svn_wc_status2_t *status); 04168 04169 /** 04170 * Same as svn_wc_status_func2_t, but for older svn_wc_status_t structures. 04171 * 04172 * @deprecated Provided for backward compatibility with the 1.1 API. 04173 */ 04174 typedef void (*svn_wc_status_func_t)(void *baton, 04175 const char *path, 04176 svn_wc_status_t *status); 04177 04178 /** 04179 * Walk the working copy status of @a local_abspath using @a wc_ctx, by 04180 * creating #svn_wc_status3_t structures and sending these through 04181 * @a status_func / @a status_baton. 04182 * 04183 * * Assuming the target is a directory, then: 04184 * 04185 * - If @a get_all is FALSE, then only locally-modified entries will be 04186 * returned. If TRUE, then all entries will be returned. 04187 * 04188 * - If @a ignore_text_mods is TRUE, then the walk will not check for 04189 * modified files. Any #svn_wc_status3_t structures returned for files 04190 * will always have a text_status field set to svn_wc_status_normal. 04191 * If @a ignore_text_mods is FALSE, the walk checks for text changes 04192 * and returns #svn_wc_status3_t structures describing any changes. 04193 * 04194 * - If @a depth is #svn_depth_empty, a status structure will 04195 * be returned for the target only; if #svn_depth_files, for the 04196 * target and its immediate file children; if 04197 * #svn_depth_immediates, for the target and its immediate 04198 * children; if #svn_depth_infinity, for the target and 04199 * everything underneath it, fully recursively. 04200 * 04201 * If @a depth is #svn_depth_unknown, take depths from the 04202 * working copy and behave as above in each directory's case. 04203 * 04204 * If the given @a depth is incompatible with the depth found in a 04205 * working copy directory, the found depth always governs. 04206 * 04207 * If @a no_ignore is set, statuses that would typically be ignored 04208 * will instead be reported. 04209 * 04210 * @a ignore_patterns is an array of file patterns matching 04211 * unversioned files to ignore for the purposes of status reporting, 04212 * or @c NULL if the default set of ignorable file patterns should be used. 04213 * Patterns from #SVN_PROP_IGNORE (and, as of 1.8, 04214 * #SVN_PROP_INHERITABLE_IGNORES) properties are always used, even if not 04215 * specified in @a ignore_patterns. 04216 * 04217 * If @a cancel_func is non-NULL, call it with @a cancel_baton while walking 04218 * to determine if the client has canceled the operation. 04219 * 04220 * This function uses @a scratch_pool for temporary allocations. 04221 * 04222 * @since New in 1.7. 04223 */ 04224 svn_error_t * 04225 svn_wc_walk_status(svn_wc_context_t *wc_ctx, 04226 const char *local_abspath, 04227 svn_depth_t depth, 04228 svn_boolean_t get_all, 04229 svn_boolean_t no_ignore, 04230 svn_boolean_t ignore_text_mods, 04231 const apr_array_header_t *ignore_patterns, 04232 svn_wc_status_func4_t status_func, 04233 void *status_baton, 04234 svn_cancel_func_t cancel_func, 04235 void *cancel_baton, 04236 apr_pool_t *scratch_pool); 04237 04238 /** 04239 * DEPRECATED -- please use APIs from svn_client.h 04240 * 04241 * --- 04242 * 04243 * Set @a *editor and @a *edit_baton to an editor that generates 04244 * #svn_wc_status3_t structures and sends them through @a status_func / 04245 * @a status_baton. @a anchor_abspath is a working copy directory 04246 * directory which will be used as the root of our editor. If @a 04247 * target_basename is not "", it represents a node in the @a anchor_abspath 04248 * which is the subject of the editor drive (otherwise, the @a 04249 * anchor_abspath is the subject). 04250 * 04251 * If @a set_locks_baton is non-@c NULL, it will be set to a baton that can 04252 * be used in a call to the svn_wc_status_set_repos_locks() function. 04253 * 04254 * Callers drive this editor to describe working copy out-of-dateness 04255 * with respect to the repository. If this information is not 04256 * available or not desired, callers should simply call the 04257 * close_edit() function of the @a editor vtable. 04258 * 04259 * If the editor driver calls @a editor's set_target_revision() vtable 04260 * function, then when the edit drive is completed, @a *edit_revision 04261 * will contain the revision delivered via that interface. 04262 * 04263 * Assuming the target is a directory, then: 04264 * 04265 * - If @a get_all is FALSE, then only locally-modified entries will be 04266 * returned. If TRUE, then all entries will be returned. 04267 * 04268 * - If @a depth is #svn_depth_empty, a status structure will 04269 * be returned for the target only; if #svn_depth_files, for the 04270 * target and its immediate file children; if 04271 * #svn_depth_immediates, for the target and its immediate 04272 * children; if #svn_depth_infinity, for the target and 04273 * everything underneath it, fully recursively. 04274 * 04275 * If @a depth is #svn_depth_unknown, take depths from the 04276 * working copy and behave as above in each directory's case. 04277 * 04278 * If the given @a depth is incompatible with the depth found in a 04279 * working copy directory, the found depth always governs. 04280 * 04281 * If @a no_ignore is set, statuses that would typically be ignored 04282 * will instead be reported. 04283 * 04284 * @a ignore_patterns is an array of file patterns matching 04285 * unversioned files to ignore for the purposes of status reporting, 04286 * or @c NULL if the default set of ignorable file patterns should be used. 04287 * 04288 * If @a cancel_func is non-NULL, call it with @a cancel_baton while building 04289 * the @a statushash to determine if the client has canceled the operation. 04290 * 04291 * If @a depth_as_sticky is set handle @a depth like when depth_is_sticky is 04292 * passed for updating. This will show excluded nodes show up as added in the 04293 * repository. 04294 * 04295 * If @a server_performs_filtering is TRUE, assume that the server handles 04296 * the ambient depth filtering, so this doesn't have to be handled in the 04297 * editor. 04298 * 04299 * Allocate the editor itself in @a result_pool, and use @a scratch_pool 04300 * for temporary allocations. The editor will do its temporary allocations 04301 * in a subpool of @a result_pool. 04302 * 04303 * @since New in 1.7. 04304 * @deprecated Provided for backward compatibility with the 1.7 API. 04305 */ 04306 SVN_DEPRECATED 04307 svn_error_t * 04308 svn_wc_get_status_editor5(const svn_delta_editor_t **editor, 04309 void **edit_baton, 04310 void **set_locks_baton, 04311 svn_revnum_t *edit_revision, 04312 svn_wc_context_t *wc_ctx, 04313 const char *anchor_abspath, 04314 const char *target_basename, 04315 svn_depth_t depth, 04316 svn_boolean_t get_all, 04317 svn_boolean_t no_ignore, 04318 svn_boolean_t depth_as_sticky, 04319 svn_boolean_t server_performs_filtering, 04320 const apr_array_header_t *ignore_patterns, 04321 svn_wc_status_func4_t status_func, 04322 void *status_baton, 04323 svn_cancel_func_t cancel_func, 04324 void *cancel_baton, 04325 apr_pool_t *result_pool, 04326 apr_pool_t *scratch_pool); 04327 04328 /** 04329 * Same as svn_wc_get_status_editor5, but using #svn_wc_status_func3_t 04330 * instead of #svn_wc_status_func4_t. And @a server_performs_filtering 04331 * always set to #TRUE. 04332 * 04333 * This also uses a single pool parameter, stating that all temporary 04334 * allocations are performed in manually constructed/destroyed subpool. 04335 * 04336 * @since New in 1.6. 04337 * @deprecated Provided for backward compatibility with the 1.6 API. 04338 */ 04339 SVN_DEPRECATED 04340 svn_error_t * 04341 svn_wc_get_status_editor4(const svn_delta_editor_t **editor, 04342 void **edit_baton, 04343 void **set_locks_baton, 04344 svn_revnum_t *edit_revision, 04345 svn_wc_adm_access_t *anchor, 04346 const char *target, 04347 svn_depth_t depth, 04348 svn_boolean_t get_all, 04349 svn_boolean_t no_ignore, 04350 const apr_array_header_t *ignore_patterns, 04351 svn_wc_status_func3_t status_func, 04352 void *status_baton, 04353 svn_cancel_func_t cancel_func, 04354 void *cancel_baton, 04355 svn_wc_traversal_info_t *traversal_info, 04356 apr_pool_t *pool); 04357 04358 /** 04359 * Same as svn_wc_get_status_editor4(), but using #svn_wc_status_func2_t 04360 * instead of #svn_wc_status_func3_t. 04361 * 04362 * @since New in 1.5. 04363 * @deprecated Provided for backward compatibility with the 1.5 API. 04364 */ 04365 SVN_DEPRECATED 04366 svn_error_t * 04367 svn_wc_get_status_editor3(const svn_delta_editor_t **editor, 04368 void **edit_baton, 04369 void **set_locks_baton, 04370 svn_revnum_t *edit_revision, 04371 svn_wc_adm_access_t *anchor, 04372 const char *target, 04373 svn_depth_t depth, 04374 svn_boolean_t get_all, 04375 svn_boolean_t no_ignore, 04376 const apr_array_header_t *ignore_patterns, 04377 svn_wc_status_func2_t status_func, 04378 void *status_baton, 04379 svn_cancel_func_t cancel_func, 04380 void *cancel_baton, 04381 svn_wc_traversal_info_t *traversal_info, 04382 apr_pool_t *pool); 04383 04384 /** 04385 * Like svn_wc_get_status_editor3(), but with @a ignore_patterns 04386 * provided from the corresponding value in @a config, and @a recurse 04387 * instead of @a depth. If @a recurse is TRUE, behave as if for 04388 * #svn_depth_infinity; else if @a recurse is FALSE, behave as if for 04389 * #svn_depth_immediates. 04390 * 04391 * @since New in 1.2. 04392 * @deprecated Provided for backward compatibility with the 1.4 API. 04393 */ 04394 SVN_DEPRECATED 04395 svn_error_t * 04396 svn_wc_get_status_editor2(const svn_delta_editor_t **editor, 04397 void **edit_baton, 04398 void **set_locks_baton, 04399 svn_revnum_t *edit_revision, 04400 svn_wc_adm_access_t *anchor, 04401 const char *target, 04402 apr_hash_t *config, 04403 svn_boolean_t recurse, 04404 svn_boolean_t get_all, 04405 svn_boolean_t no_ignore, 04406 svn_wc_status_func2_t status_func, 04407 void *status_baton, 04408 svn_cancel_func_t cancel_func, 04409 void *cancel_baton, 04410 svn_wc_traversal_info_t *traversal_info, 04411 apr_pool_t *pool); 04412 04413 /** 04414 * Same as svn_wc_get_status_editor2(), but with @a set_locks_baton set 04415 * to @c NULL, and taking a deprecated svn_wc_status_func_t argument. 04416 * 04417 * @deprecated Provided for backward compatibility with the 1.1 API. 04418 */ 04419 SVN_DEPRECATED 04420 svn_error_t * 04421 svn_wc_get_status_editor(const svn_delta_editor_t **editor, 04422 void **edit_baton, 04423 svn_revnum_t *edit_revision, 04424 svn_wc_adm_access_t *anchor, 04425 const char *target, 04426 apr_hash_t *config, 04427 svn_boolean_t recurse, 04428 svn_boolean_t get_all, 04429 svn_boolean_t no_ignore, 04430 svn_wc_status_func_t status_func, 04431 void *status_baton, 04432 svn_cancel_func_t cancel_func, 04433 void *cancel_baton, 04434 svn_wc_traversal_info_t *traversal_info, 04435 apr_pool_t *pool); 04436 04437 04438 /** 04439 * Associate @a locks, a hash table mapping <tt>const char*</tt> 04440 * absolute repository paths to <tt>svn_lock_t</tt> objects, with a 04441 * @a set_locks_baton returned by an earlier call to 04442 * svn_wc_get_status_editor3(). @a repos_root is the repository root URL. 04443 * Perform all allocations in @a pool. 04444 * 04445 * @note @a locks will not be copied, so it must be valid throughout the 04446 * edit. @a pool must also not be destroyed or cleared before the edit is 04447 * finished. 04448 * 04449 * @since New in 1.2. 04450 */ 04451 svn_error_t * 04452 svn_wc_status_set_repos_locks(void *set_locks_baton, 04453 apr_hash_t *locks, 04454 const char *repos_root, 04455 apr_pool_t *pool); 04456 04457 /** @} */ 04458 04459 04460 /** 04461 * Copy @a src_abspath to @a dst_abspath, and schedule @a dst_abspath 04462 * for addition to the repository, remembering the copy history. @a wc_ctx 04463 * is used for accessing the working copy and must contain a write lock for 04464 * the parent directory of @a dst_abspath, 04465 * 04466 * If @a metadata_only is TRUE then this is a database-only operation and 04467 * the working directories and files are not copied. 04468 * 04469 * @a src_abspath must be a file or directory under version control; 04470 * the parent of @a dst_abspath must be a directory under version control 04471 * in the same working copy; @a dst_abspath will be the name of the copied 04472 * item, and it must not exist already if @a metadata_only is FALSE. Note that 04473 * when @a src points to a versioned file, the working file doesn't 04474 * necessarily exist in which case its text-base is used instead. 04475 * 04476 * If @a cancel_func is non-NULL, call it with @a cancel_baton at 04477 * various points during the operation. If it returns an error 04478 * (typically #SVN_ERR_CANCELLED), return that error immediately. 04479 * 04480 * If @a notify_func is non-NULL, call it with @a notify_baton and the path 04481 * of the root node (only) of the destination. 04482 * 04483 * Use @a scratch_pool for temporary allocations. 04484 * 04485 * @since New in 1.7. 04486 */ 04487 svn_error_t * 04488 svn_wc_copy3(svn_wc_context_t *wc_ctx, 04489 const char *src_abspath, 04490 const char *dst_abspath, 04491 svn_boolean_t metadata_only, 04492 svn_cancel_func_t cancel_func, 04493 void *cancel_baton, 04494 svn_wc_notify_func2_t notify_func, 04495 void *notify_baton, 04496 apr_pool_t *scratch_pool); 04497 04498 /** Similar to svn_wc_copy3(), but takes access batons and a relative path 04499 * and a basename instead of absolute paths and a working copy context. 04500 * 04501 * @since New in 1.2. 04502 * @deprecated Provided for backward compatibility with the 1.6 API. 04503 */ 04504 SVN_DEPRECATED 04505 svn_error_t * 04506 svn_wc_copy2(const char *src, 04507 svn_wc_adm_access_t *dst_parent, 04508 const char *dst_basename, 04509 svn_cancel_func_t cancel_func, 04510 void *cancel_baton, 04511 svn_wc_notify_func2_t notify_func, 04512 void *notify_baton, 04513 apr_pool_t *pool); 04514 04515 /** 04516 * Similar to svn_wc_copy2(), but takes an #svn_wc_notify_func_t instead. 04517 * 04518 * @deprecated Provided for backward compatibility with the 1.1 API. 04519 */ 04520 SVN_DEPRECATED 04521 svn_error_t * 04522 svn_wc_copy(const char *src, 04523 svn_wc_adm_access_t *dst_parent, 04524 const char *dst_basename, 04525 svn_cancel_func_t cancel_func, 04526 void *cancel_baton, 04527 svn_wc_notify_func_t notify_func, 04528 void *notify_baton, 04529 apr_pool_t *pool); 04530 04531 /** 04532 * Move @a src_abspath to @a dst_abspath, by scheduling @a dst_abspath 04533 * for addition to the repository, remembering the history. Mark @a src_abspath 04534 * as deleted after moving.@a wc_ctx is used for accessing the working copy and 04535 * must contain a write lock for the parent directory of @a src_abspath and 04536 * @a dst_abspath. 04537 * 04538 * If @a metadata_only is TRUE then this is a database-only operation and 04539 * the working directories and files are not changed. 04540 * 04541 * @a src_abspath must be a file or directory under version control; 04542 * the parent of @a dst_abspath must be a directory under version control 04543 * in the same working copy; @a dst_abspath will be the name of the copied 04544 * item, and it must not exist already if @a metadata_only is FALSE. Note that 04545 * when @a src points to a versioned file, the working file doesn't 04546 * necessarily exist in which case its text-base is used instead. 04547 * 04548 * If @a cancel_func is non-NULL, call it with @a cancel_baton at 04549 * various points during the operation. If it returns an error 04550 * (typically #SVN_ERR_CANCELLED), return that error immediately. 04551 * 04552 * If @a notify_func is non-NULL, call it with @a notify_baton and the path 04553 * of the root node (only) of the destination. 04554 * 04555 * Use @a scratch_pool for temporary allocations. 04556 * 04557 * @since New in 1.7. 04558 * @deprecated Provided for backward compatibility with the 1.7 API. 04559 * @see svn_client_move7() 04560 */ 04561 SVN_DEPRECATED 04562 svn_error_t * 04563 svn_wc_move(svn_wc_context_t *wc_ctx, 04564 const char *src_abspath, 04565 const char *dst_abspath, 04566 svn_boolean_t metadata_only, 04567 svn_cancel_func_t cancel_func, 04568 void *cancel_baton, 04569 svn_wc_notify_func2_t notify_func, 04570 void *notify_baton, 04571 apr_pool_t *scratch_pool); 04572 04573 /** 04574 * Schedule @a local_abspath for deletion. It will be deleted from the 04575 * repository on the next commit. If @a local_abspath refers to a 04576 * directory, then a recursive deletion will occur. @a wc_ctx must hold 04577 * a write lock for the parent of @a local_abspath, @a local_abspath itself 04578 * and everything below @a local_abspath. 04579 * 04580 * If @a keep_local is FALSE, this function immediately deletes all files, 04581 * modified and unmodified, versioned and if @a delete_unversioned is TRUE, 04582 * unversioned from the working copy. 04583 * It also immediately deletes unversioned directories and directories that 04584 * are scheduled to be added below @a local_abspath. Only versioned may 04585 * remain in the working copy, these get deleted by the update following 04586 * the commit. 04587 * 04588 * If @a keep_local is TRUE, all files and directories will be kept in the 04589 * working copy (and will become unversioned on the next commit). 04590 * 04591 * If @a delete_unversioned_target is TRUE and @a local_abspath is not 04592 * versioned, @a local_abspath will be handled as an added files without 04593 * history. So it will be deleted if @a keep_local is FALSE. If @a 04594 * delete_unversioned is FALSE and @a local_abspath is not versioned a 04595 * #SVN_ERR_WC_PATH_NOT_FOUND error will be returned. 04596 * 04597 * If @a cancel_func is non-NULL, call it with @a cancel_baton at 04598 * various points during the operation. If it returns an error 04599 * (typically #SVN_ERR_CANCELLED), return that error immediately. 04600 * 04601 * For each path marked for deletion, @a notify_func will be called with 04602 * the @a notify_baton and that path. The @a notify_func callback may be 04603 * @c NULL if notification is not needed. 04604 * 04605 * Use @a scratch_pool for temporary allocations. It may be cleared 04606 * immediately upon returning from this function. 04607 * 04608 * @since New in 1.7. 04609 */ 04610 /* ### BH: Maybe add a delete_switched flag that allows deny switched 04611 nodes like file externals? */ 04612 svn_error_t * 04613 svn_wc_delete4(svn_wc_context_t *wc_ctx, 04614 const char *local_abspath, 04615 svn_boolean_t keep_local, 04616 svn_boolean_t delete_unversioned_target, 04617 svn_cancel_func_t cancel_func, 04618 void *cancel_baton, 04619 svn_wc_notify_func2_t notify_func, 04620 void *notify_baton, 04621 apr_pool_t *scratch_pool); 04622 04623 /** 04624 * Similar to svn_wc_delete4, but uses an access baton and relative path 04625 * instead of a working copy context and absolute path. @a adm_access 04626 * must hold a write lock for the parent of @a path. 04627 * 04628 * @c delete_unversioned_target will always be set to TRUE. 04629 * 04630 * @since New in 1.5. 04631 * @deprecated Provided for backward compatibility with the 1.6 API. 04632 */ 04633 SVN_DEPRECATED 04634 svn_error_t * 04635 svn_wc_delete3(const char *path, 04636 svn_wc_adm_access_t *adm_access, 04637 svn_cancel_func_t cancel_func, 04638 void *cancel_baton, 04639 svn_wc_notify_func2_t notify_func, 04640 void *notify_baton, 04641 svn_boolean_t keep_local, 04642 apr_pool_t *pool); 04643 04644 /** 04645 * Similar to svn_wc_delete3(), but with @a keep_local always set to FALSE. 04646 * 04647 * @deprecated Provided for backward compatibility with the 1.4 API. 04648 */ 04649 SVN_DEPRECATED 04650 svn_error_t * 04651 svn_wc_delete2(const char *path, 04652 svn_wc_adm_access_t *adm_access, 04653 svn_cancel_func_t cancel_func, 04654 void *cancel_baton, 04655 svn_wc_notify_func2_t notify_func, 04656 void *notify_baton, 04657 apr_pool_t *pool); 04658 04659 /** 04660 * Similar to svn_wc_delete2(), but takes an #svn_wc_notify_func_t instead. 04661 * 04662 * @deprecated Provided for backward compatibility with the 1.1 API. 04663 */ 04664 SVN_DEPRECATED 04665 svn_error_t * 04666 svn_wc_delete(const char *path, 04667 svn_wc_adm_access_t *adm_access, 04668 svn_cancel_func_t cancel_func, 04669 void *cancel_baton, 04670 svn_wc_notify_func_t notify_func, 04671 void *notify_baton, 04672 apr_pool_t *pool); 04673 04674 04675 /** 04676 * Schedule the single node that exists on disk at @a local_abspath for 04677 * addition to the working copy. The added node will have the properties 04678 * provided in @a props, or none if that is NULL. 04679 * 04680 * Unless @a skip_checks is TRUE, check and canonicalize the properties in the 04681 * same way as svn_wc_prop_set4(). Return an error and don't add the node if 04682 * the properties are not valid on this node. 04683 * 04684 * ### The error code on validity check failure should be specified, and 04685 * preferably should be a single code. 04686 * 04687 * The versioned state of the parent path must be a modifiable directory, 04688 * and the versioned state of @a local_abspath must be either nonexistent or 04689 * deleted; if deleted, the new node will be a replacement. 04690 * 04691 * If @a local_abspath does not exist as file, directory or symlink, return 04692 * #SVN_ERR_WC_PATH_NOT_FOUND. 04693 * 04694 * If @a notify_func is non-NULL, invoke it with @a notify_baton to report 04695 * the item being added. 04696 * 04697 * ### TODO: Split into add_dir, add_file, add_symlink? 04698 * 04699 * @since New in 1.9. 04700 */ 04701 svn_error_t * 04702 svn_wc_add_from_disk3(svn_wc_context_t *wc_ctx, 04703 const char *local_abspath, 04704 const apr_hash_t *props, 04705 svn_boolean_t skip_checks, 04706 svn_wc_notify_func2_t notify_func, 04707 void *notify_baton, 04708 apr_pool_t *scratch_pool); 04709 04710 /** 04711 * Similar to svn_wc_add_from_disk3(), but always passes FALSE for 04712 * @a skip_checks 04713 * 04714 * @since New in 1.8. 04715 * @deprecated Provided for backward compatibility with the 1.8 API. 04716 */ 04717 SVN_DEPRECATED 04718 svn_error_t * 04719 svn_wc_add_from_disk2(svn_wc_context_t *wc_ctx, 04720 const char *local_abspath, 04721 const apr_hash_t *props, 04722 svn_wc_notify_func2_t notify_func, 04723 void *notify_baton, 04724 apr_pool_t *scratch_pool); 04725 04726 04727 /** 04728 * Similar to svn_wc_add_from_disk2(), but always passes NULL for @a 04729 * props. 04730 * 04731 * This is a replacement for svn_wc_add4() case 2a (which see for 04732 * details). 04733 04734 * @see svn_wc_add4() 04735 * 04736 * @since New in 1.7. 04737 * @deprecated Provided for backward compatibility with the 1.7 API. 04738 */ 04739 SVN_DEPRECATED 04740 svn_error_t * 04741 svn_wc_add_from_disk(svn_wc_context_t *wc_ctx, 04742 const char *local_abspath, 04743 svn_wc_notify_func2_t notify_func, 04744 void *notify_baton, 04745 apr_pool_t *scratch_pool); 04746 04747 04748 /** 04749 * Put @a local_abspath under version control by registering it as addition 04750 * or copy in the database containing its parent. The new node is scheduled 04751 * for addition to the repository below its parent node. 04752 * 04753 * 1) If the node is already versioned, it MUST BE the root of a separate 04754 * working copy from the same repository as the parent WC. The new node 04755 * and anything below it will be scheduled for addition inside the parent 04756 * working copy as a copy of the original location. The separate working 04757 * copy will be integrated by this step. In this case, which is only used 04758 * by code like that of "svn cp URL@rev path" @a copyfrom_url and 04759 * @a copyfrom_rev MUST BE the url and revision of @a local_abspath 04760 * in the separate working copy. 04761 * 04762 * 2a) If the node was not versioned before it will be scheduled as a local 04763 * addition or 2b) if @a copyfrom_url and @a copyfrom_rev are set as a copy 04764 * of that location. In this last case the function doesn't set the pristine 04765 * version (of a file) and/or pristine properties, which callers should 04766 * handle via different APIs. Usually it is easier to call 04767 * svn_wc_add_repos_file4() (### or a possible svn_wc_add_repos_dir()) than 04768 * using this variant. 04769 * 04770 * If @a local_abspath does not exist as file, directory or symlink, return 04771 * #SVN_ERR_WC_PATH_NOT_FOUND. 04772 * 04773 * If @a local_abspath is an unversioned directory, record @a depth on it; 04774 * otherwise, ignore @a depth. (Use #svn_depth_infinity unless you exactly 04775 * know what you are doing, or you may create an unexpected sparse working 04776 * copy) 04777 * 04778 * If @a cancel_func is non-NULL, call it with @a cancel_baton at 04779 * various points during the operation. If it returns an error 04780 * (typically #SVN_ERR_CANCELLED), return that error immediately. 04781 * 04782 * When the @a local_abspath has been added, then @a notify_func will be 04783 * called (if it is not @c NULL) with the @a notify_baton and the path. 04784 * 04785 * @note Case 1 is deprecated. Consider doing a WC-to-WC copy instead. 04786 * @note For case 2a, prefer svn_wc_add_from_disk(). 04787 * 04788 * @since New in 1.7. 04789 */ 04790 svn_error_t * 04791 svn_wc_add4(svn_wc_context_t *wc_ctx, 04792 const char *local_abspath, 04793 svn_depth_t depth, 04794 const char *copyfrom_url, 04795 svn_revnum_t copyfrom_rev, 04796 svn_cancel_func_t cancel_func, 04797 void *cancel_baton, 04798 svn_wc_notify_func2_t notify_func, 04799 void *notify_baton, 04800 apr_pool_t *scratch_pool); 04801 04802 /** 04803 * Similar to svn_wc_add4(), but with an access baton 04804 * and relative path instead of a context and absolute path. 04805 * @since New in 1.6. 04806 * @deprecated Provided for backward compatibility with the 1.6 API. 04807 */ 04808 SVN_DEPRECATED 04809 svn_error_t * 04810 svn_wc_add3(const char *path, 04811 svn_wc_adm_access_t *parent_access, 04812 svn_depth_t depth, 04813 const char *copyfrom_url, 04814 svn_revnum_t copyfrom_rev, 04815 svn_cancel_func_t cancel_func, 04816 void *cancel_baton, 04817 svn_wc_notify_func2_t notify_func, 04818 void *notify_baton, 04819 apr_pool_t *pool); 04820 04821 /** 04822 * Similar to svn_wc_add3(), but with the @a depth parameter always 04823 * #svn_depth_infinity. 04824 * 04825 * @since New in 1.2. 04826 * @deprecated Provided for backward compatibility with the 1.5 API. 04827 */ 04828 SVN_DEPRECATED 04829 svn_error_t * 04830 svn_wc_add2(const char *path, 04831 svn_wc_adm_access_t *parent_access, 04832 const char *copyfrom_url, 04833 svn_revnum_t copyfrom_rev, 04834 svn_cancel_func_t cancel_func, 04835 void *cancel_baton, 04836 svn_wc_notify_func2_t notify_func, 04837 void *notify_baton, 04838 apr_pool_t *pool); 04839 04840 /** 04841 * Similar to svn_wc_add2(), but takes an #svn_wc_notify_func_t instead. 04842 * 04843 * @deprecated Provided for backward compatibility with the 1.1 API. 04844 */ 04845 SVN_DEPRECATED 04846 svn_error_t * 04847 svn_wc_add(const char *path, 04848 svn_wc_adm_access_t *parent_access, 04849 const char *copyfrom_url, 04850 svn_revnum_t copyfrom_rev, 04851 svn_cancel_func_t cancel_func, 04852 void *cancel_baton, 04853 svn_wc_notify_func_t notify_func, 04854 void *notify_baton, 04855 apr_pool_t *pool); 04856 04857 /** Add a file to a working copy at @a local_abspath, obtaining the 04858 * text-base's contents from @a new_base_contents, the wc file's 04859 * content from @a new_contents, its unmodified properties from @a 04860 * new_base_props and its actual properties from @a new_props. Use 04861 * @a wc_ctx for accessing the working copy. 04862 * 04863 * The unmodified text and props normally come from the repository 04864 * file represented by the copyfrom args, see below. The new file 04865 * will be marked as copy. 04866 * 04867 * @a new_contents and @a new_props may be NULL, in which case 04868 * the working copy text and props are taken from the base files with 04869 * appropriate translation of the file's content. 04870 * 04871 * @a new_contents must be provided in Normal Form. This is required 04872 * in order to pass both special and non-special files through a stream. 04873 * 04874 * @a wc_ctx must contain a write lock for the parent of @a local_abspath. 04875 * 04876 * If @a copyfrom_url is non-NULL, then @a copyfrom_rev must be a 04877 * valid revision number, and together they are the copyfrom history 04878 * for the new file. 04879 * 04880 * The @a cancel_func and @a cancel_baton are a standard cancellation 04881 * callback, or NULL if no callback is needed. @a notify_func and 04882 * @a notify_baton are a notification callback, and (if not NULL) 04883 * will be notified of the addition of this file. 04884 * 04885 * Use @a scratch_pool for temporary allocations. 04886 * 04887 * ### This function is very redundant with svn_wc_add(). Ideally, 04888 * we'd merge them, so that svn_wc_add() would just take optional 04889 * new_props and optional copyfrom information. That way it could be 04890 * used for both 'svn add somefilesittingonmydisk' and for adding 04891 * files from repositories, with or without copyfrom history. 04892 * 04893 * The problem with this Ideal Plan is that svn_wc_add() also takes 04894 * care of recursive URL-rewriting. There's a whole comment in its 04895 * doc string about how that's really weird, outside its core mission, 04896 * etc, etc. So another part of the Ideal Plan is that that 04897 * functionality of svn_wc_add() would move into a separate function. 04898 * 04899 * @since New in 1.7. 04900 */ 04901 svn_error_t * 04902 svn_wc_add_repos_file4(svn_wc_context_t *wc_ctx, 04903 const char *local_abspath, 04904 svn_stream_t *new_base_contents, 04905 svn_stream_t *new_contents, 04906 apr_hash_t *new_base_props, 04907 apr_hash_t *new_props, 04908 const char *copyfrom_url, 04909 svn_revnum_t copyfrom_rev, 04910 svn_cancel_func_t cancel_func, 04911 void *cancel_baton, 04912 apr_pool_t *scratch_pool); 04913 04914 /** Similar to svn_wc_add_repos_file4, but uses access batons and a 04915 * relative path instead of a working copy context and absolute path. 04916 * 04917 * ### NOTE: the notification callback/baton is not yet used. 04918 * 04919 * @since New in 1.6. 04920 * @deprecated Provided for compatibility with the 1.6 API. 04921 */ 04922 SVN_DEPRECATED 04923 svn_error_t * 04924 svn_wc_add_repos_file3(const char *dst_path, 04925 svn_wc_adm_access_t *adm_access, 04926 svn_stream_t *new_base_contents, 04927 svn_stream_t *new_contents, 04928 apr_hash_t *new_base_props, 04929 apr_hash_t *new_props, 04930 const char *copyfrom_url, 04931 svn_revnum_t copyfrom_rev, 04932 svn_cancel_func_t cancel_func, 04933 void *cancel_baton, 04934 svn_wc_notify_func2_t notify_func, 04935 void *notify_baton, 04936 apr_pool_t *scratch_pool); 04937 04938 04939 /** Same as svn_wc_add_repos_file3(), except that it has pathnames rather 04940 * than streams for the text base, and actual text, and has no cancellation. 04941 * 04942 * @since New in 1.4. 04943 * @deprecated Provided for compatibility with the 1.5 API 04944 */ 04945 SVN_DEPRECATED 04946 svn_error_t * 04947 svn_wc_add_repos_file2(const char *dst_path, 04948 svn_wc_adm_access_t *adm_access, 04949 const char *new_text_base_path, 04950 const char *new_text_path, 04951 apr_hash_t *new_base_props, 04952 apr_hash_t *new_props, 04953 const char *copyfrom_url, 04954 svn_revnum_t copyfrom_rev, 04955 apr_pool_t *pool); 04956 04957 /** Same as svn_wc_add_repos_file3(), except that it doesn't have the 04958 * BASE arguments or cancellation. 04959 * 04960 * @deprecated Provided for compatibility with the 1.3 API 04961 */ 04962 SVN_DEPRECATED 04963 svn_error_t * 04964 svn_wc_add_repos_file(const char *dst_path, 04965 svn_wc_adm_access_t *adm_access, 04966 const char *new_text_path, 04967 apr_hash_t *new_props, 04968 const char *copyfrom_url, 04969 svn_revnum_t copyfrom_rev, 04970 apr_pool_t *pool); 04971 04972 04973 /** Remove @a local_abspath from revision control. @a wc_ctx must 04974 * hold a write lock on the parent of @a local_abspath, or if that is a 04975 * WC root then on @a local_abspath itself. 04976 * 04977 * If @a local_abspath is a file, all its info will be removed from the 04978 * administrative area. If @a local_abspath is a directory, then the 04979 * administrative area will be deleted, along with *all* the administrative 04980 * areas anywhere in the tree below @a adm_access. 04981 * 04982 * Normally, only administrative data is removed. However, if 04983 * @a destroy_wf is TRUE, then all working file(s) and dirs are deleted 04984 * from disk as well. When called with @a destroy_wf, any locally 04985 * modified files will *not* be deleted, and the special error 04986 * #SVN_ERR_WC_LEFT_LOCAL_MOD might be returned. (Callers only need to 04987 * check for this special return value if @a destroy_wf is TRUE.) 04988 * 04989 * If @a instant_error is TRUE, then return 04990 * #SVN_ERR_WC_LEFT_LOCAL_MOD the instant a locally modified file is 04991 * encountered. Otherwise, leave locally modified files in place and 04992 * return the error only after all the recursion is complete. 04993 * 04994 * If @a cancel_func is non-NULL, call it with @a cancel_baton at 04995 * various points during the removal. If it returns an error 04996 * (typically #SVN_ERR_CANCELLED), return that error immediately. 04997 * 04998 * WARNING: This routine is exported for careful, measured use by 04999 * libsvn_client. Do *not* call this routine unless you really 05000 * understand what the heck you're doing. 05001 * 05002 * @since New in 1.7. 05003 */ 05004 svn_error_t * 05005 svn_wc_remove_from_revision_control2(svn_wc_context_t *wc_ctx, 05006 const char *local_abspath, 05007 svn_boolean_t destroy_wf, 05008 svn_boolean_t instant_error, 05009 svn_cancel_func_t cancel_func, 05010 void *cancel_baton, 05011 apr_pool_t *pool); 05012 05013 /** 05014 * Similar to svn_wc_remove_from_revision_control2() but with a name 05015 * and access baton. 05016 * 05017 * WARNING: This routine was exported for careful, measured use by 05018 * libsvn_client. Do *not* call this routine unless you really 05019 * understand what the heck you're doing. 05020 * 05021 * @deprecated Provided for compatibility with the 1.6 API 05022 */ 05023 SVN_DEPRECATED 05024 svn_error_t * 05025 svn_wc_remove_from_revision_control(svn_wc_adm_access_t *adm_access, 05026 const char *name, 05027 svn_boolean_t destroy_wf, 05028 svn_boolean_t instant_error, 05029 svn_cancel_func_t cancel_func, 05030 void *cancel_baton, 05031 apr_pool_t *pool); 05032 05033 05034 /** 05035 * Assuming @a local_abspath is under version control or a tree conflict 05036 * victim and in a state of conflict, then take @a local_abspath *out* 05037 * of this state. If @a resolve_text is TRUE then any text conflict is 05038 * resolved, if @a resolve_tree is TRUE then any tree conflicts are 05039 * resolved. If @a resolve_prop is set to "" all property conflicts are 05040 * resolved, if it is set to any other string value, conflicts on that 05041 * specific property are resolved and when resolve_prop is NULL, no 05042 * property conflicts are resolved. 05043 * 05044 * If @a depth is #svn_depth_empty, act only on @a local_abspath; if 05045 * #svn_depth_files, resolve @a local_abspath and its conflicted file 05046 * children (if any); if #svn_depth_immediates, resolve @a local_abspath 05047 * and all its immediate conflicted children (both files and directories, 05048 * if any); if #svn_depth_infinity, resolve @a local_abspath and every 05049 * conflicted file or directory anywhere beneath it. 05050 * 05051 * If @a conflict_choice is #svn_wc_conflict_choose_base, resolve the 05052 * conflict with the old file contents; if 05053 * #svn_wc_conflict_choose_mine_full, use the original working contents; 05054 * if #svn_wc_conflict_choose_theirs_full, the new contents; and if 05055 * #svn_wc_conflict_choose_merged, don't change the contents at all, 05056 * just remove the conflict status, which is the pre-1.5 behavior. 05057 * 05058 * #svn_wc_conflict_choose_theirs_conflict and 05059 * #svn_wc_conflict_choose_mine_conflict are not legal for binary 05060 * files or properties. 05061 * 05062 * @a wc_ctx is a working copy context, with a write lock, for @a 05063 * local_abspath. 05064 * 05065 * Needless to say, this function doesn't touch conflict markers or 05066 * anything of that sort -- only a human can semantically resolve a 05067 * conflict. Instead, this function simply marks a file as "having 05068 * been resolved", clearing the way for a commit. 05069 * 05070 * The implementation details are opaque, as our "conflicted" criteria 05071 * might change over time. (At the moment, this routine removes the 05072 * three fulltext 'backup' files and any .prej file created in a conflict, 05073 * and modifies @a local_abspath's entry.) 05074 * 05075 * If @a local_abspath is not under version control and not a tree 05076 * conflict, return #SVN_ERR_ENTRY_NOT_FOUND. If @a path isn't in a 05077 * state of conflict to begin with, do nothing, and return #SVN_NO_ERROR. 05078 * 05079 * If @c local_abspath was successfully taken out of a state of conflict, 05080 * report this information to @c notify_func (if non-@c NULL.) If only 05081 * text, only property, or only tree conflict resolution was requested, 05082 * and it was successful, then success gets reported. 05083 * 05084 * Temporary allocations will be performed in @a scratch_pool. 05085 * 05086 * @since New in 1.7. 05087 * @deprecated Provided for backward compatibility with the 1.9 API. 05088 * Use svn_client_conflict_text_resolve(), svn_client_conflict_prop_resolve(), 05089 * and svn_client_conflict_tree_resolve() instead. 05090 */ 05091 SVN_DEPRECATED 05092 svn_error_t * 05093 svn_wc_resolved_conflict5(svn_wc_context_t *wc_ctx, 05094 const char *local_abspath, 05095 svn_depth_t depth, 05096 svn_boolean_t resolve_text, 05097 const char *resolve_prop, 05098 svn_boolean_t resolve_tree, 05099 svn_wc_conflict_choice_t conflict_choice, 05100 svn_cancel_func_t cancel_func, 05101 void *cancel_baton, 05102 svn_wc_notify_func2_t notify_func, 05103 void *notify_baton, 05104 apr_pool_t *scratch_pool); 05105 05106 /** Similar to svn_wc_resolved_conflict5, but takes an absolute path 05107 * and an access baton. This version doesn't support resolving a specific 05108 * property.conflict. 05109 * 05110 * @since New in 1.6. 05111 * @deprecated Provided for backward compatibility with the 1.6 API. 05112 */ 05113 SVN_DEPRECATED 05114 svn_error_t * 05115 svn_wc_resolved_conflict4(const char *path, 05116 svn_wc_adm_access_t *adm_access, 05117 svn_boolean_t resolve_text, 05118 svn_boolean_t resolve_props, 05119 svn_boolean_t resolve_tree, 05120 svn_depth_t depth, 05121 svn_wc_conflict_choice_t conflict_choice, 05122 svn_wc_notify_func2_t notify_func, 05123 void *notify_baton, 05124 svn_cancel_func_t cancel_func, 05125 void *cancel_baton, 05126 apr_pool_t *pool); 05127 05128 05129 /** 05130 * Similar to svn_wc_resolved_conflict4(), but without tree-conflict 05131 * resolution support. 05132 * 05133 * @since New in 1.5. 05134 * @deprecated Provided for backward compatibility with the 1.5 API. 05135 */ 05136 SVN_DEPRECATED 05137 svn_error_t * 05138 svn_wc_resolved_conflict3(const char *path, 05139 svn_wc_adm_access_t *adm_access, 05140 svn_boolean_t resolve_text, 05141 svn_boolean_t resolve_props, 05142 svn_depth_t depth, 05143 svn_wc_conflict_choice_t conflict_choice, 05144 svn_wc_notify_func2_t notify_func, 05145 void *notify_baton, 05146 svn_cancel_func_t cancel_func, 05147 void *cancel_baton, 05148 apr_pool_t *pool); 05149 05150 05151 /** 05152 * Similar to svn_wc_resolved_conflict3(), but without automatic conflict 05153 * resolution support, and with @a depth set according to @a recurse: 05154 * if @a recurse is TRUE, @a depth is #svn_depth_infinity, else it is 05155 * #svn_depth_files. 05156 * 05157 * @since New in 1.2. 05158 * @deprecated Provided for backward compatibility with the 1.4 API. 05159 */ 05160 SVN_DEPRECATED 05161 svn_error_t * 05162 svn_wc_resolved_conflict2(const char *path, 05163 svn_wc_adm_access_t *adm_access, 05164 svn_boolean_t resolve_text, 05165 svn_boolean_t resolve_props, 05166 svn_boolean_t recurse, 05167 svn_wc_notify_func2_t notify_func, 05168 void *notify_baton, 05169 svn_cancel_func_t cancel_func, 05170 void *cancel_baton, 05171 apr_pool_t *pool); 05172 05173 /** 05174 * Similar to svn_wc_resolved_conflict2(), but takes an 05175 * svn_wc_notify_func_t and doesn't have cancellation support. 05176 * 05177 * @deprecated Provided for backward compatibility with the 1.1 API. 05178 */ 05179 SVN_DEPRECATED 05180 svn_error_t * 05181 svn_wc_resolved_conflict(const char *path, 05182 svn_wc_adm_access_t *adm_access, 05183 svn_boolean_t resolve_text, 05184 svn_boolean_t resolve_props, 05185 svn_boolean_t recurse, 05186 svn_wc_notify_func_t notify_func, 05187 void *notify_baton, 05188 apr_pool_t *pool); 05189 05190 05191 /* Commits. */ 05192 05193 05194 /** 05195 * Storage type for queued post-commit data. 05196 * 05197 * @since New in 1.5. 05198 */ 05199 typedef struct svn_wc_committed_queue_t svn_wc_committed_queue_t; 05200 05201 05202 /** 05203 * Create a queue for use with svn_wc_queue_committed() and 05204 * svn_wc_process_committed_queue(). 05205 * 05206 * The returned queue and all further allocations required for queuing 05207 * new items will also be done from @a pool. 05208 * 05209 * @since New in 1.5. 05210 */ 05211 svn_wc_committed_queue_t * 05212 svn_wc_committed_queue_create(apr_pool_t *pool); 05213 05214 05215 /** 05216 * Queue committed items to be processed later by 05217 * svn_wc_process_committed_queue2(). 05218 * 05219 * Record in @a queue that @a local_abspath will need to be bumped 05220 * after a commit succeeds. 05221 * 05222 * If non-NULL, @a wcprop_changes is an array of <tt>svn_prop_t *</tt> 05223 * changes to wc properties; if an #svn_prop_t->value is NULL, then 05224 * that property is deleted. 05225 * ### [JAF] No, a prop whose value is NULL is ignored, not deleted. This 05226 * ### seems to be not a set of changes but rather the new complete set of 05227 * ### props. And it's renamed to 'new_dav_cache' inside; why? 05228 * 05229 * If @a is_committed is @c TRUE, the node will be processed as committed. This 05230 * turns the node and its implied descendants as the new unmodified state at 05231 * the new specified revision. Unless @a recurse is TRUE, changes on 05232 * descendants are not committed as changes directly. In this case they should 05233 * be queueud as their own changes. 05234 * 05235 * If @a remove_lock is @c TRUE, any entryprops related to a repository 05236 * lock will be removed. 05237 * 05238 * If @a remove_changelist is @c TRUE, any association with a 05239 * changelist will be removed. 05240 * 05241 * 05242 * If @a sha1_checksum is non-NULL, use it to identify the node's pristine 05243 * text. 05244 * 05245 * If @a recurse is TRUE and @a local_abspath is a directory, then bump every 05246 * versioned object at or under @a local_abspath. This is usually done for 05247 * copied trees. 05248 * 05249 * ### In the present implementation, if a recursive directory item is in 05250 * the queue, then any children (at any depth) of that directory that 05251 * are also in the queue as separate items will get: 05252 * 'wcprop_changes' = NULL; 05253 * 'remove_lock' = FALSE; 05254 * 'remove_changelist' from the recursive parent item; 05255 * and any children (at any depth) of that directory that are NOT in 05256 * the queue as separate items will get: 05257 * 'wcprop_changes' = NULL; 05258 * 'remove_lock' = FALSE; 05259 * 'remove_changelist' from the recursive parent item; 05260 * 05261 * @note the @a recurse parameter should be used with extreme care since 05262 * it will bump ALL nodes under the directory, regardless of their 05263 * actual inclusion in the new revision. 05264 * 05265 * All pointer data passed to this function (@a local_abspath, 05266 * @a wcprop_changes and the checksums) should remain valid until the 05267 * queue has been processed by svn_wc_process_committed_queue2(). 05268 * 05269 * Temporary allocations will be performed in @a scratch_pool, and persistent 05270 * allocations will use the same pool as @a queue used when it was created. 05271 * 05272 * @since New in 1.9. 05273 */ 05274 svn_error_t * 05275 svn_wc_queue_committed4(svn_wc_committed_queue_t *queue, 05276 svn_wc_context_t *wc_ctx, 05277 const char *local_abspath, 05278 svn_boolean_t recurse, 05279 svn_boolean_t is_committed, 05280 const apr_array_header_t *wcprop_changes, 05281 svn_boolean_t remove_lock, 05282 svn_boolean_t remove_changelist, 05283 const svn_checksum_t *sha1_checksum, 05284 apr_pool_t *scratch_pool); 05285 05286 /** Similar to svn_wc_queue_committed4, but with is_committed always 05287 * TRUE. 05288 * 05289 * @since New in 1.7. 05290 * @deprecated Provided for backwards compatibility with the 1.8 API. 05291 */ 05292 svn_error_t * 05293 svn_wc_queue_committed3(svn_wc_committed_queue_t *queue, 05294 svn_wc_context_t *wc_ctx, 05295 const char *local_abspath, 05296 svn_boolean_t recurse, 05297 const apr_array_header_t *wcprop_changes, 05298 svn_boolean_t remove_lock, 05299 svn_boolean_t remove_changelist, 05300 const svn_checksum_t *sha1_checksum, 05301 apr_pool_t *scratch_pool); 05302 05303 /** Same as svn_wc_queue_committed3() except @a path doesn't have to be an 05304 * abspath and @a adm_access is unused and a SHA-1 checksum cannot be 05305 * specified. 05306 * 05307 * @since New in 1.6. 05308 * 05309 * @deprecated Provided for backwards compatibility with the 1.6 API. 05310 */ 05311 SVN_DEPRECATED 05312 svn_error_t * 05313 svn_wc_queue_committed2(svn_wc_committed_queue_t *queue, 05314 const char *path, 05315 svn_wc_adm_access_t *adm_access, 05316 svn_boolean_t recurse, 05317 const apr_array_header_t *wcprop_changes, 05318 svn_boolean_t remove_lock, 05319 svn_boolean_t remove_changelist, 05320 const svn_checksum_t *md5_checksum, 05321 apr_pool_t *scratch_pool); 05322 05323 05324 /** Same as svn_wc_queue_committed2() but the @a queue parameter has an 05325 * extra indirection and @a digest is supplied instead of a checksum type. 05326 * 05327 * @note despite the extra indirection, this function does NOT allocate 05328 * the queue for you. svn_wc_committed_queue_create() must be called. 05329 * 05330 * @since New in 1.5 05331 * 05332 * @deprecated Provided for backwards compatibility with 1.5 05333 */ 05334 SVN_DEPRECATED 05335 svn_error_t * 05336 svn_wc_queue_committed(svn_wc_committed_queue_t **queue, 05337 const char *path, 05338 svn_wc_adm_access_t *adm_access, 05339 svn_boolean_t recurse, 05340 const apr_array_header_t *wcprop_changes, 05341 svn_boolean_t remove_lock, 05342 svn_boolean_t remove_changelist, 05343 const unsigned char *digest, 05344 apr_pool_t *pool); 05345 05346 05347 /** 05348 * Bump all items in @a queue to @a new_revnum after a commit succeeds. 05349 * @a rev_date and @a rev_author are the (server-side) date and author 05350 * of the new revision; one or both may be @c NULL. 05351 * 05352 * If @a cancel_func is non-NULL, call it with @a cancel_baton to determine 05353 * if the client wants to cancel the operation. 05354 * 05355 * @since New in 1.7. 05356 */ 05357 svn_error_t * 05358 svn_wc_process_committed_queue2(svn_wc_committed_queue_t *queue, 05359 svn_wc_context_t *wc_ctx, 05360 svn_revnum_t new_revnum, 05361 const char *rev_date, 05362 const char *rev_author, 05363 svn_cancel_func_t cancel_func, 05364 void *cancel_baton, 05365 apr_pool_t *scratch_pool); 05366 05367 /** @see svn_wc_process_committed_queue2() 05368 * 05369 * @since New in 1.5. 05370 * @deprecated Provided for backwards compatibility with the 1.6 API. 05371 */ 05372 SVN_DEPRECATED 05373 svn_error_t * 05374 svn_wc_process_committed_queue(svn_wc_committed_queue_t *queue, 05375 svn_wc_adm_access_t *adm_access, 05376 svn_revnum_t new_revnum, 05377 const char *rev_date, 05378 const char *rev_author, 05379 apr_pool_t *pool); 05380 05381 05382 /** 05383 * @note this function has improper expectations around the operation and 05384 * execution of other parts of the Subversion WC library. The resulting 05385 * coupling makes this interface near-impossible to support. Documentation 05386 * has been removed, as a result. 05387 * 05388 * @deprecated Use the svn_wc_committed_queue_* functions instead. Provided 05389 * for backwards compatibility with the 1.5 API. 05390 */ 05391 SVN_DEPRECATED 05392 svn_error_t * 05393 svn_wc_process_committed4(const char *path, 05394 svn_wc_adm_access_t *adm_access, 05395 svn_boolean_t recurse, 05396 svn_revnum_t new_revnum, 05397 const char *rev_date, 05398 const char *rev_author, 05399 const apr_array_header_t *wcprop_changes, 05400 svn_boolean_t remove_lock, 05401 svn_boolean_t remove_changelist, 05402 const unsigned char *digest, 05403 apr_pool_t *pool); 05404 05405 /** @see svn_wc_process_committed4() 05406 * 05407 * @deprecated Use the svn_wc_committed_queue_* functions instead. Provided 05408 * for backwards compatibility with the 1.4 API. 05409 */ 05410 SVN_DEPRECATED 05411 svn_error_t * 05412 svn_wc_process_committed3(const char *path, 05413 svn_wc_adm_access_t *adm_access, 05414 svn_boolean_t recurse, 05415 svn_revnum_t new_revnum, 05416 const char *rev_date, 05417 const char *rev_author, 05418 const apr_array_header_t *wcprop_changes, 05419 svn_boolean_t remove_lock, 05420 const unsigned char *digest, 05421 apr_pool_t *pool); 05422 05423 /** @see svn_wc_process_committed4() 05424 * 05425 * @deprecated Use the svn_wc_committed_queue_* functions instead. Provided 05426 * for backwards compatibility with the 1.3 API. 05427 */ 05428 SVN_DEPRECATED 05429 svn_error_t * 05430 svn_wc_process_committed2(const char *path, 05431 svn_wc_adm_access_t *adm_access, 05432 svn_boolean_t recurse, 05433 svn_revnum_t new_revnum, 05434 const char *rev_date, 05435 const char *rev_author, 05436 const apr_array_header_t *wcprop_changes, 05437 svn_boolean_t remove_lock, 05438 apr_pool_t *pool); 05439 05440 /** @see svn_wc_process_committed4() 05441 * 05442 * @deprecated Use the svn_wc_committed_queue_* functions instead. Provided 05443 * for backward compatibility with the 1.1 API. 05444 */ 05445 SVN_DEPRECATED 05446 svn_error_t * 05447 svn_wc_process_committed(const char *path, 05448 svn_wc_adm_access_t *adm_access, 05449 svn_boolean_t recurse, 05450 svn_revnum_t new_revnum, 05451 const char *rev_date, 05452 const char *rev_author, 05453 const apr_array_header_t *wcprop_changes, 05454 apr_pool_t *pool); 05455 05456 05457 05458 05459 05460 /** 05461 * Do a depth-first crawl in a working copy, beginning at @a local_abspath, 05462 * using @a wc_ctx for accessing the working copy. 05463 * 05464 * Communicate the `state' of the working copy's revisions and depths 05465 * to @a reporter/@a report_baton. Obviously, if @a local_abspath is a 05466 * file instead of a directory, this depth-first crawl will be a short one. 05467 * 05468 * No locks or logs are created, nor are any animals harmed in the 05469 * process unless @a restore_files is TRUE. No cleanup is necessary. 05470 * 05471 * After all revisions are reported, @a reporter->finish_report() is 05472 * called, which immediately causes the RA layer to update the working 05473 * copy. Thus the return value may very well reflect the result of 05474 * the update! 05475 * 05476 * If @a depth is #svn_depth_empty, then report state only for 05477 * @a path itself. If #svn_depth_files, do the same and include 05478 * immediate file children of @a path. If #svn_depth_immediates, 05479 * then behave as if for #svn_depth_files but also report the 05480 * property states of immediate subdirectories. If @a depth is 05481 * #svn_depth_infinity, then report state fully recursively. All 05482 * descents are only as deep as @a path's own depth permits, of 05483 * course. If @a depth is #svn_depth_unknown, then just use 05484 * #svn_depth_infinity, which in practice means depth of @a path. 05485 * 05486 * Iff @a honor_depth_exclude is TRUE, the crawler will report paths 05487 * whose ambient depth is #svn_depth_exclude as being excluded, and 05488 * thus prevent the server from pushing update data for those paths; 05489 * therefore, don't set this flag if you wish to pull in excluded paths. 05490 * Note that #svn_depth_exclude on the target @a path is never 05491 * honored, even if @a honor_depth_exclude is TRUE, because we need to 05492 * be able to explicitly pull in a target. For example, if this is 05493 * the working copy... 05494 * 05495 * svn co greek_tree_repos wc_dir 05496 * svn up --set-depth exclude wc_dir/A/B/E # now A/B/E is excluded 05497 * 05498 * ...then 'svn up wc_dir/A/B' would report E as excluded (assuming 05499 * @a honor_depth_exclude is TRUE), but 'svn up wc_dir/A/B/E' would 05500 * not, because the latter is trying to explicitly pull in E. In 05501 * general, we never report the update target as excluded. 05502 * 05503 * Iff @a depth_compatibility_trick is TRUE, then set the @c start_empty 05504 * flag on @a reporter->set_path() and @a reporter->link_path() calls 05505 * as necessary to trick a pre-1.5 (i.e., depth-unaware) server into 05506 * sending back all the items the client might need to upgrade a 05507 * working copy from a shallower depth to a deeper one. 05508 * 05509 * If @a restore_files is TRUE, then unexpectedly missing working files 05510 * will be restored from the administrative directory's cache. For each 05511 * file restored, the @a notify_func function will be called with the 05512 * @a notify_baton and the path of the restored file. @a notify_func may 05513 * be @c NULL if this notification is not required. If @a 05514 * use_commit_times is TRUE, then set restored files' timestamps to 05515 * their last-commit-times. 05516 * 05517 * @since New in 1.7. 05518 */ 05519 svn_error_t * 05520 svn_wc_crawl_revisions5(svn_wc_context_t *wc_ctx, 05521 const char *local_abspath, 05522 const svn_ra_reporter3_t *reporter, 05523 void *report_baton, 05524 svn_boolean_t restore_files, 05525 svn_depth_t depth, 05526 svn_boolean_t honor_depth_exclude, 05527 svn_boolean_t depth_compatibility_trick, 05528 svn_boolean_t use_commit_times, 05529 svn_cancel_func_t cancel_func, 05530 void *cancel_baton, 05531 svn_wc_notify_func2_t notify_func, 05532 void *notify_baton, 05533 apr_pool_t *scratch_pool); 05534 05535 /** 05536 * Similar to svn_wc_crawl_revisions5, but with a relative path and 05537 * access baton instead of an absolute path and wc_ctx. 05538 * 05539 * Passes NULL for @a cancel_func and @a cancel_baton. 05540 * 05541 * @since New in 1.6. 05542 * @deprecated Provided for compatibility with the 1.6 API. 05543 */ 05544 SVN_DEPRECATED 05545 svn_error_t * 05546 svn_wc_crawl_revisions4(const char *path, 05547 svn_wc_adm_access_t *adm_access, 05548 const svn_ra_reporter3_t *reporter, 05549 void *report_baton, 05550 svn_boolean_t restore_files, 05551 svn_depth_t depth, 05552 svn_boolean_t honor_depth_exclude, 05553 svn_boolean_t depth_compatibility_trick, 05554 svn_boolean_t use_commit_times, 05555 svn_wc_notify_func2_t notify_func, 05556 void *notify_baton, 05557 svn_wc_traversal_info_t *traversal_info, 05558 apr_pool_t *pool); 05559 05560 05561 /** 05562 * Similar to svn_wc_crawl_revisions4, but with @a honor_depth_exclude always 05563 * set to false. 05564 * 05565 * @deprecated Provided for compatibility with the 1.5 API. 05566 */ 05567 SVN_DEPRECATED 05568 svn_error_t * 05569 svn_wc_crawl_revisions3(const char *path, 05570 svn_wc_adm_access_t *adm_access, 05571 const svn_ra_reporter3_t *reporter, 05572 void *report_baton, 05573 svn_boolean_t restore_files, 05574 svn_depth_t depth, 05575 svn_boolean_t depth_compatibility_trick, 05576 svn_boolean_t use_commit_times, 05577 svn_wc_notify_func2_t notify_func, 05578 void *notify_baton, 05579 svn_wc_traversal_info_t *traversal_info, 05580 apr_pool_t *pool); 05581 05582 /** 05583 * Similar to svn_wc_crawl_revisions3, but taking svn_ra_reporter2_t 05584 * instead of svn_ra_reporter3_t, and therefore only able to report 05585 * #svn_depth_infinity for depths; and taking @a recurse instead of @a 05586 * depth; and with @a depth_compatibility_trick always false. 05587 * 05588 * @deprecated Provided for compatibility with the 1.4 API. 05589 */ 05590 SVN_DEPRECATED 05591 svn_error_t * 05592 svn_wc_crawl_revisions2(const char *path, 05593 svn_wc_adm_access_t *adm_access, 05594 const svn_ra_reporter2_t *reporter, 05595 void *report_baton, 05596 svn_boolean_t restore_files, 05597 svn_boolean_t recurse, 05598 svn_boolean_t use_commit_times, 05599 svn_wc_notify_func2_t notify_func, 05600 void *notify_baton, 05601 svn_wc_traversal_info_t *traversal_info, 05602 apr_pool_t *pool); 05603 05604 /** 05605 * Similar to svn_wc_crawl_revisions2(), but takes an #svn_wc_notify_func_t 05606 * and a #svn_ra_reporter_t instead. 05607 * 05608 * @deprecated Provided for backward compatibility with the 1.1 API. 05609 */ 05610 SVN_DEPRECATED 05611 svn_error_t * 05612 svn_wc_crawl_revisions(const char *path, 05613 svn_wc_adm_access_t *adm_access, 05614 const svn_ra_reporter_t *reporter, 05615 void *report_baton, 05616 svn_boolean_t restore_files, 05617 svn_boolean_t recurse, 05618 svn_boolean_t use_commit_times, 05619 svn_wc_notify_func_t notify_func, 05620 void *notify_baton, 05621 svn_wc_traversal_info_t *traversal_info, 05622 apr_pool_t *pool); 05623 05624 05625 /** 05626 * @defgroup svn_wc_roots Working copy roots 05627 * @{ 05628 */ 05629 05630 /** If @a is_wcroot is not @c NULL, set @a *is_wcroot to @c TRUE if @a 05631 * local_abspath is the root of the working copy, otherwise to @c FALSE. 05632 * 05633 * If @a is_switched is not @c NULL, set @a *is_switched to @c TRUE if @a 05634 * local_abspath is not the root of the working copy, and switched against its 05635 * parent. 05636 * 05637 * If @a kind is not @c NULL, set @a *kind to the node kind of @a 05638 * local_abspath. 05639 * 05640 * Use @a scratch_pool for any temporary allocations. 05641 * 05642 * @since New in 1.8. 05643 */ 05644 svn_error_t * 05645 svn_wc_check_root(svn_boolean_t *is_wcroot, 05646 svn_boolean_t *is_switched, 05647 svn_node_kind_t *kind, 05648 svn_wc_context_t *wc_ctx, 05649 const char *local_abspath, 05650 apr_pool_t *scratch_pool); 05651 05652 /** Set @a *wc_root to @c TRUE if @a local_abspath represents a "working copy 05653 * root", @c FALSE otherwise. Here, @a local_abspath is a "working copy root" 05654 * if its parent directory is not a WC or if it is switched. Also, a deleted 05655 * tree-conflict victim is considered a "working copy root" because it has no 05656 * URL. 05657 * 05658 * If @a local_abspath is not found, return the error #SVN_ERR_ENTRY_NOT_FOUND. 05659 * 05660 * Use @a scratch_pool for any temporary allocations. 05661 * 05662 * @note For legacy reasons only a directory can be a wc-root. However, this 05663 * function will also set wc_root to @c TRUE for a switched file. 05664 * 05665 * @since New in 1.7. 05666 * @deprecated Provided for backward compatibility with the 1.7 API. Consider 05667 * using svn_wc_check_root() instead. 05668 */ 05669 SVN_DEPRECATED 05670 svn_error_t * 05671 svn_wc_is_wc_root2(svn_boolean_t *wc_root, 05672 svn_wc_context_t *wc_ctx, 05673 const char *local_abspath, 05674 apr_pool_t *scratch_pool); 05675 05676 05677 /** 05678 * Similar to svn_wc_is_wc_root2(), but with an access baton and relative 05679 * path. 05680 * 05681 * @note If @a path is '', this function will always return @c TRUE. 05682 * 05683 * @deprecated Provided for backward compatibility with the 1.6 API. 05684 */ 05685 SVN_DEPRECATED 05686 svn_error_t * 05687 svn_wc_is_wc_root(svn_boolean_t *wc_root, 05688 const char *path, 05689 svn_wc_adm_access_t *adm_access, 05690 apr_pool_t *pool); 05691 05692 /** @} */ 05693 05694 05695 /* Updates. */ 05696 05697 /** Conditionally split @a path into an @a anchor and @a target for the 05698 * purpose of updating and committing. 05699 * 05700 * @a anchor is the directory at which the update or commit editor 05701 * should be rooted. 05702 * 05703 * @a target is the actual subject (relative to the @a anchor) of the 05704 * update/commit, or "" if the @a anchor itself is the subject. 05705 * 05706 * Allocate @a anchor and @a target in @a result_pool; @a scratch_pool 05707 * is used for temporary allocations. 05708 * 05709 * @note Even though this API uses a #svn_wc_context_t, it accepts a 05710 * (possibly) relative path and returns a (possibly) relative path in 05711 * @a *anchor. The reason being that the outputs are generally used to 05712 * open access batons, and such opening currently requires relative paths. 05713 * In the long-run, I expect this API to be removed from 1.7, due to the 05714 * remove of access batons, but for the time being, the #svn_wc_context_t 05715 * parameter allows us to avoid opening a duplicate database, just for this 05716 * function. 05717 * 05718 * @since New in 1.7. 05719 */ 05720 svn_error_t * 05721 svn_wc_get_actual_target2(const char **anchor, 05722 const char **target, 05723 svn_wc_context_t *wc_ctx, 05724 const char *path, 05725 apr_pool_t *result_pool, 05726 apr_pool_t *scratch_pool); 05727 05728 05729 /** Similar to svn_wc_get_actual_target2(), but without the wc context, and 05730 * with a absolute path. 05731 * 05732 * @deprecated Provided for backward compatibility with the 1.6 API. 05733 */ 05734 SVN_DEPRECATED 05735 svn_error_t * 05736 svn_wc_get_actual_target(const char *path, 05737 const char **anchor, 05738 const char **target, 05739 apr_pool_t *pool); 05740 05741 05742 /** 05743 * @defgroup svn_wc_update_switch Update and switch (update-like functionality) 05744 * @{ 05745 */ 05746 05747 /** 05748 * A simple callback type to wrap svn_ra_get_file(); see that 05749 * docstring for more information. 05750 * 05751 * This technique allows libsvn_client to 'wrap' svn_ra_get_file() and 05752 * pass it down into libsvn_wc functions, thus allowing the WC layer 05753 * to legally call the RA function via (blind) callback. 05754 * 05755 * @since New in 1.5 05756 * @deprecated Provided for backward compatibility with the 1.6 API. 05757 */ 05758 typedef svn_error_t *(*svn_wc_get_file_t)(void *baton, 05759 const char *path, 05760 svn_revnum_t revision, 05761 svn_stream_t *stream, 05762 svn_revnum_t *fetched_rev, 05763 apr_hash_t **props, 05764 apr_pool_t *pool); 05765 05766 /** 05767 * A simple callback type to wrap svn_ra_get_dir2() for avoiding issue #3569, 05768 * where a directory is updated to a revision without some of its children 05769 * recorded in the working copy. A future update won't bring these files in 05770 * because the repository assumes they are already there. 05771 * 05772 * We really only need the names of the dirents for a not-present marking, 05773 * but we also store the node-kind if we receive one. 05774 * 05775 * @a *dirents should be set to a hash mapping <tt>const char *</tt> child 05776 * names, to <tt>const svn_dirent_t *</tt> instances. 05777 * 05778 * @since New in 1.7. 05779 */ 05780 typedef svn_error_t *(*svn_wc_dirents_func_t)(void *baton, 05781 apr_hash_t **dirents, 05782 const char *repos_root_url, 05783 const char *repos_relpath, 05784 apr_pool_t *result_pool, 05785 apr_pool_t *scratch_pool); 05786 05787 05788 /** 05789 * DEPRECATED -- please use APIs from svn_client.h 05790 * 05791 * --- 05792 * 05793 * Set @a *editor and @a *edit_baton to an editor and baton for updating a 05794 * working copy. 05795 * 05796 * @a anchor_abspath is a local working copy directory, with a fully recursive 05797 * write lock in @a wc_ctx, which will be used as the root of our editor. 05798 * 05799 * @a target_basename is the entry in @a anchor_abspath that will actually be 05800 * updated, or the empty string if all of @a anchor_abspath should be updated. 05801 * 05802 * The editor invokes @a notify_func with @a notify_baton as the update 05803 * progresses, if @a notify_func is non-NULL. 05804 * 05805 * If @a cancel_func is non-NULL, the editor will invoke @a cancel_func with 05806 * @a cancel_baton as the update progresses to see if it should continue. 05807 * 05808 * If @a conflict_func is non-NULL, then invoke it with @a 05809 * conflict_baton whenever a conflict is encountered, giving the 05810 * callback a chance to resolve the conflict before the editor takes 05811 * more drastic measures (such as marking a file conflicted, or 05812 * bailing out of the update). 05813 * 05814 * If @a external_func is non-NULL, then invoke it with @a external_baton 05815 * whenever external changes are encountered, giving the callback a chance 05816 * to store the external information for processing. 05817 * 05818 * If @a diff3_cmd is non-NULL, then use it as the diff3 command for 05819 * any merging; otherwise, use the built-in merge code. 05820 * 05821 * @a preserved_exts is an array of filename patterns which, when 05822 * matched against the extensions of versioned files, determine for 05823 * which such files any related generated conflict files will preserve 05824 * the original file's extension as their own. If a file's extension 05825 * does not match any of the patterns in @a preserved_exts (which is 05826 * certainly the case if @a preserved_exts is @c NULL or empty), 05827 * generated conflict files will carry Subversion's custom extensions. 05828 * 05829 * @a target_revision is a pointer to a revision location which, after 05830 * successful completion of the drive of this editor, will be 05831 * populated with the revision to which the working copy was updated. 05832 * 05833 * If @a use_commit_times is TRUE, then all edited/added files will 05834 * have their working timestamp set to the last-committed-time. If 05835 * FALSE, the working files will be touched with the 'now' time. 05836 * 05837 * If @a allow_unver_obstructions is TRUE, then allow unversioned 05838 * obstructions when adding a path. 05839 * 05840 * If @a adds_as_modification is TRUE, a local addition at the same path 05841 * as an incoming addition of the same node kind results in a normal node 05842 * with a possible local modification, instead of a tree conflict. 05843 * 05844 * If @a depth is #svn_depth_infinity, update fully recursively. 05845 * Else if it is #svn_depth_immediates, update the uppermost 05846 * directory, its file entries, and the presence or absence of 05847 * subdirectories (but do not descend into the subdirectories). 05848 * Else if it is #svn_depth_files, update the uppermost directory 05849 * and its immediate file entries, but not subdirectories. 05850 * Else if it is #svn_depth_empty, update exactly the uppermost 05851 * target, and don't touch its entries. 05852 * 05853 * If @a depth_is_sticky is set and @a depth is not 05854 * #svn_depth_unknown, then in addition to updating PATHS, also set 05855 * their sticky ambient depth value to @a depth. 05856 * 05857 * If @a server_performs_filtering is TRUE, assume that the server handles 05858 * the ambient depth filtering, so this doesn't have to be handled in the 05859 * editor. 05860 * 05861 * If @a clean_checkout is TRUE, assume that we are checking out into an 05862 * empty directory, and so bypass a number of conflict checks that are 05863 * unnecessary in this case. 05864 * 05865 * If @a fetch_dirents_func is not NULL, the update editor may call this 05866 * callback, when asked to perform a depth restricted update. It will do this 05867 * before returning the editor to allow using the primary ra session for this. 05868 * 05869 * @since New in 1.7. 05870 * @deprecated Provided for backward compatibility with the 1.7 API. 05871 */ 05872 SVN_DEPRECATED 05873 svn_error_t * 05874 svn_wc_get_update_editor4(const svn_delta_editor_t **editor, 05875 void **edit_baton, 05876 svn_revnum_t *target_revision, 05877 svn_wc_context_t *wc_ctx, 05878 const char *anchor_abspath, 05879 const char *target_basename, 05880 svn_boolean_t use_commit_times, 05881 svn_depth_t depth, 05882 svn_boolean_t depth_is_sticky, 05883 svn_boolean_t allow_unver_obstructions, 05884 svn_boolean_t adds_as_modification, 05885 svn_boolean_t server_performs_filtering, 05886 svn_boolean_t clean_checkout, 05887 const char *diff3_cmd, 05888 const apr_array_header_t *preserved_exts, 05889 svn_wc_dirents_func_t fetch_dirents_func, 05890 void *fetch_dirents_baton, 05891 svn_wc_conflict_resolver_func2_t conflict_func, 05892 void *conflict_baton, 05893 svn_wc_external_update_t external_func, 05894 void *external_baton, 05895 svn_cancel_func_t cancel_func, 05896 void *cancel_baton, 05897 svn_wc_notify_func2_t notify_func, 05898 void *notify_baton, 05899 apr_pool_t *result_pool, 05900 apr_pool_t *scratch_pool); 05901 05902 /** Similar to svn_wc_get_update_editor4, but uses access batons and relative 05903 * path instead of a working copy context-abspath pair and 05904 * svn_wc_traversal_info_t instead of an externals callback. Also, 05905 * @a fetch_func and @a fetch_baton are ignored. 05906 * 05907 * If @a ti is non-NULL, record traversal info in @a ti, for use by 05908 * post-traversal accessors such as svn_wc_edited_externals(). 05909 * 05910 * All locks, both those in @a anchor and newly acquired ones, will be 05911 * released when the editor driver calls @c close_edit. 05912 * 05913 * Always sets @a adds_as_modification to TRUE, @a server_performs_filtering 05914 * and @a clean_checkout to FALSE. 05915 * 05916 * Uses a svn_wc_conflict_resolver_func_t conflict resolver instead of a 05917 * svn_wc_conflict_resolver_func2_t. 05918 * 05919 * This function assumes that @a diff3_cmd is path encoded. Later versions 05920 * assume utf-8. 05921 * 05922 * Always passes a null dirent function. 05923 * 05924 * @since New in 1.5. 05925 * @deprecated Provided for backward compatibility with the 1.6 API. 05926 */ 05927 SVN_DEPRECATED 05928 svn_error_t * 05929 svn_wc_get_update_editor3(svn_revnum_t *target_revision, 05930 svn_wc_adm_access_t *anchor, 05931 const char *target, 05932 svn_boolean_t use_commit_times, 05933 svn_depth_t depth, 05934 svn_boolean_t depth_is_sticky, 05935 svn_boolean_t allow_unver_obstructions, 05936 svn_wc_notify_func2_t notify_func, 05937 void *notify_baton, 05938 svn_cancel_func_t cancel_func, 05939 void *cancel_baton, 05940 svn_wc_conflict_resolver_func_t conflict_func, 05941 void *conflict_baton, 05942 svn_wc_get_file_t fetch_func, 05943 void *fetch_baton, 05944 const char *diff3_cmd, 05945 const apr_array_header_t *preserved_exts, 05946 const svn_delta_editor_t **editor, 05947 void **edit_baton, 05948 svn_wc_traversal_info_t *ti, 05949 apr_pool_t *pool); 05950 05951 05952 /** 05953 * Similar to svn_wc_get_update_editor3() but with the @a 05954 * allow_unver_obstructions parameter always set to FALSE, @a 05955 * conflict_func and baton set to NULL, @a fetch_func and baton set to 05956 * NULL, @a preserved_exts set to NULL, @a depth_is_sticky set to 05957 * FALSE, and @a depth set according to @a recurse: if @a recurse is 05958 * TRUE, pass #svn_depth_infinity, if FALSE, pass #svn_depth_files. 05959 * 05960 * @deprecated Provided for backward compatibility with the 1.4 API. 05961 */ 05962 SVN_DEPRECATED 05963 svn_error_t * 05964 svn_wc_get_update_editor2(svn_revnum_t *target_revision, 05965 svn_wc_adm_access_t *anchor, 05966 const char *target, 05967 svn_boolean_t use_commit_times, 05968 svn_boolean_t recurse, 05969 svn_wc_notify_func2_t notify_func, 05970 void *notify_baton, 05971 svn_cancel_func_t cancel_func, 05972 void *cancel_baton, 05973 const char *diff3_cmd, 05974 const svn_delta_editor_t **editor, 05975 void **edit_baton, 05976 svn_wc_traversal_info_t *ti, 05977 apr_pool_t *pool); 05978 05979 /** 05980 * Similar to svn_wc_get_update_editor2(), but takes an svn_wc_notify_func_t 05981 * instead. 05982 * 05983 * @deprecated Provided for backward compatibility with the 1.1 API. 05984 */ 05985 SVN_DEPRECATED 05986 svn_error_t * 05987 svn_wc_get_update_editor(svn_revnum_t *target_revision, 05988 svn_wc_adm_access_t *anchor, 05989 const char *target, 05990 svn_boolean_t use_commit_times, 05991 svn_boolean_t recurse, 05992 svn_wc_notify_func_t notify_func, 05993 void *notify_baton, 05994 svn_cancel_func_t cancel_func, 05995 void *cancel_baton, 05996 const char *diff3_cmd, 05997 const svn_delta_editor_t **editor, 05998 void **edit_baton, 05999 svn_wc_traversal_info_t *ti, 06000 apr_pool_t *pool); 06001 06002 /** 06003 * DEPRECATED -- please use APIs from svn_client.h 06004 * 06005 * --- 06006 * 06007 * A variant of svn_wc_get_update_editor4(). 06008 * 06009 * Set @a *editor and @a *edit_baton to an editor and baton for "switching" 06010 * a working copy to a new @a switch_url. (Right now, this URL must be 06011 * within the same repository that the working copy already comes 06012 * from.) @a switch_url must not be @c NULL. 06013 * 06014 * All other parameters behave as for svn_wc_get_update_editor4(). 06015 * 06016 * @since New in 1.7. 06017 * @deprecated Provided for backward compatibility with the 1.7 API. 06018 */ 06019 SVN_DEPRECATED 06020 svn_error_t * 06021 svn_wc_get_switch_editor4(const svn_delta_editor_t **editor, 06022 void **edit_baton, 06023 svn_revnum_t *target_revision, 06024 svn_wc_context_t *wc_ctx, 06025 const char *anchor_abspath, 06026 const char *target_basename, 06027 const char *switch_url, 06028 svn_boolean_t use_commit_times, 06029 svn_depth_t depth, 06030 svn_boolean_t depth_is_sticky, 06031 svn_boolean_t allow_unver_obstructions, 06032 svn_boolean_t server_performs_filtering, 06033 const char *diff3_cmd, 06034 const apr_array_header_t *preserved_exts, 06035 svn_wc_dirents_func_t fetch_dirents_func, 06036 void *fetch_dirents_baton, 06037 svn_wc_conflict_resolver_func2_t conflict_func, 06038 void *conflict_baton, 06039 svn_wc_external_update_t external_func, 06040 void *external_baton, 06041 svn_cancel_func_t cancel_func, 06042 void *cancel_baton, 06043 svn_wc_notify_func2_t notify_func, 06044 void *notify_baton, 06045 apr_pool_t *result_pool, 06046 apr_pool_t *scratch_pool); 06047 06048 /** Similar to svn_wc_get_switch_editor4, but uses access batons and relative 06049 * path instead of a working copy context and svn_wc_traversal_info_t instead 06050 * of an externals callback. 06051 * 06052 * If @a ti is non-NULL, record traversal info in @a ti, for use by 06053 * post-traversal accessors such as svn_wc_edited_externals(). 06054 * 06055 * All locks, both those in @a anchor and newly acquired ones, will be 06056 * released when the editor driver calls @c close_edit. 06057 * 06058 * Always sets @a server_performs_filtering to FALSE. 06059 * 06060 * Uses a svn_wc_conflict_resolver_func_t conflict resolver instead of a 06061 * svn_wc_conflict_resolver_func2_t. 06062 * 06063 * This function assumes that @a diff3_cmd is path encoded. Later versions 06064 * assume utf-8. 06065 * 06066 * @since New in 1.5. 06067 * @deprecated Provided for backward compatibility with the 1.6 API. 06068 */ 06069 SVN_DEPRECATED 06070 svn_error_t * 06071 svn_wc_get_switch_editor3(svn_revnum_t *target_revision, 06072 svn_wc_adm_access_t *anchor, 06073 const char *target, 06074 const char *switch_url, 06075 svn_boolean_t use_commit_times, 06076 svn_depth_t depth, 06077 svn_boolean_t depth_is_sticky, 06078 svn_boolean_t allow_unver_obstructions, 06079 svn_wc_notify_func2_t notify_func, 06080 void *notify_baton, 06081 svn_cancel_func_t cancel_func, 06082 void *cancel_baton, 06083 svn_wc_conflict_resolver_func_t conflict_func, 06084 void *conflict_baton, 06085 const char *diff3_cmd, 06086 const apr_array_header_t *preserved_exts, 06087 const svn_delta_editor_t **editor, 06088 void **edit_baton, 06089 svn_wc_traversal_info_t *ti, 06090 apr_pool_t *pool); 06091 06092 /** 06093 * Similar to svn_wc_get_switch_editor3() but with the 06094 * @a allow_unver_obstructions parameter always set to FALSE, 06095 * @a preserved_exts set to NULL, @a conflict_func and baton set to NULL, 06096 * @a depth_is_sticky set to FALSE, and @a depth set according to @a 06097 * recurse: if @a recurse is TRUE, pass #svn_depth_infinity, if 06098 * FALSE, pass #svn_depth_files. 06099 * 06100 * @deprecated Provided for backward compatibility with the 1.4 API. 06101 */ 06102 SVN_DEPRECATED 06103 svn_error_t * 06104 svn_wc_get_switch_editor2(svn_revnum_t *target_revision, 06105 svn_wc_adm_access_t *anchor, 06106 const char *target, 06107 const char *switch_url, 06108 svn_boolean_t use_commit_times, 06109 svn_boolean_t recurse, 06110 svn_wc_notify_func2_t notify_func, 06111 void *notify_baton, 06112 svn_cancel_func_t cancel_func, 06113 void *cancel_baton, 06114 const char *diff3_cmd, 06115 const svn_delta_editor_t **editor, 06116 void **edit_baton, 06117 svn_wc_traversal_info_t *ti, 06118 apr_pool_t *pool); 06119 06120 /** 06121 * Similar to svn_wc_get_switch_editor2(), but takes an 06122 * #svn_wc_notify_func_t instead. 06123 * 06124 * @deprecated Provided for backward compatibility with the 1.1 API. 06125 */ 06126 SVN_DEPRECATED 06127 svn_error_t * 06128 svn_wc_get_switch_editor(svn_revnum_t *target_revision, 06129 svn_wc_adm_access_t *anchor, 06130 const char *target, 06131 const char *switch_url, 06132 svn_boolean_t use_commit_times, 06133 svn_boolean_t recurse, 06134 svn_wc_notify_func_t notify_func, 06135 void *notify_baton, 06136 svn_cancel_func_t cancel_func, 06137 void *cancel_baton, 06138 const char *diff3_cmd, 06139 const svn_delta_editor_t **editor, 06140 void **edit_baton, 06141 svn_wc_traversal_info_t *ti, 06142 apr_pool_t *pool); 06143 06144 /** @} */ 06145 06146 06147 /** 06148 * @defgroup svn_wc_properties Properties 06149 * @{ 06150 */ 06151 06152 /** Set @a *props to a hash table mapping <tt>char *</tt> names onto 06153 * <tt>svn_string_t *</tt> values for all the regular properties of 06154 * @a local_abspath. Allocate the table, names, and values in 06155 * @a result_pool. If the node has no properties, then an empty hash 06156 * is returned. Use @a wc_ctx to access the working copy, and @a 06157 * scratch_pool for temporary allocations. 06158 * 06159 * If the node does not exist, #SVN_ERR_WC_PATH_NOT_FOUND is returned. 06160 * 06161 * @since New in 1.7. 06162 */ 06163 svn_error_t * 06164 svn_wc_prop_list2(apr_hash_t **props, 06165 svn_wc_context_t *wc_ctx, 06166 const char *local_abspath, 06167 apr_pool_t *result_pool, 06168 apr_pool_t *scratch_pool); 06169 06170 /** Similar to svn_wc_prop_list2() but with a #svn_wc_adm_access_t / 06171 * relative path parameter pair. 06172 * 06173 * @deprecated Provided for backwards compatibility with the 1.6 API. 06174 */ 06175 SVN_DEPRECATED 06176 svn_error_t * 06177 svn_wc_prop_list(apr_hash_t **props, 06178 const char *path, 06179 svn_wc_adm_access_t *adm_access, 06180 apr_pool_t *pool); 06181 06182 06183 /** Return the set of "pristine" properties for @a local_abspath. 06184 * 06185 * There are node states where properties do not make sense. For these 06186 * cases, NULL will be returned in @a *props. Otherwise, a hash table 06187 * will always be returned (but may be empty, indicating no properties). 06188 * 06189 * If the node is locally-added, then @a *props will be set to NULL since 06190 * pristine properties are undefined. Note: if this addition is replacing a 06191 * previously-deleted node, then the replaced node's properties are not 06192 * available until the addition is reverted. 06193 * 06194 * If the node has been copied (from another node in the repository), then 06195 * the pristine properties will correspond to those original properties. 06196 * 06197 * If the node is locally-deleted, these properties will correspond to 06198 * the BASE node's properties, as checked-out from the repository. Note: if 06199 * this deletion is a child of a copy, then the pristine properties will 06200 * correspond to that copy's properties, not any potential BASE node. The 06201 * BASE node's properties will not be accessible until the copy is reverted. 06202 * 06203 * Nodes that are incomplete, excluded, absent, or not present at the 06204 * node's revision will return NULL in @a props. 06205 * 06206 * If the node is not versioned, SVN_ERR_WC_PATH_NOT_FOUND will be returned. 06207 * 06208 * @a props will be allocated in @a result_pool, and all temporary 06209 * allocations will be performed in @a scratch_pool. 06210 * 06211 * @since New in 1.7. 06212 */ 06213 svn_error_t * 06214 svn_wc_get_pristine_props(apr_hash_t **props, 06215 svn_wc_context_t *wc_ctx, 06216 const char *local_abspath, 06217 apr_pool_t *result_pool, 06218 apr_pool_t *scratch_pool); 06219 06220 06221 /** Set @a *value to the value of property @a name for @a local_abspath, 06222 * allocating @a *value in @a result_pool. If no such prop, set @a *value 06223 * to @c NULL. @a name may be a regular or wc property; if it is an 06224 * entry property, return the error #SVN_ERR_BAD_PROP_KIND. @a wc_ctx 06225 * is used to access the working copy. 06226 * 06227 * If @a local_abspath is not a versioned path, return 06228 * #SVN_ERR_WC_PATH_NOT_FOUND 06229 * 06230 * @since New in 1.7. 06231 */ 06232 svn_error_t * 06233 svn_wc_prop_get2(const svn_string_t **value, 06234 svn_wc_context_t *wc_ctx, 06235 const char *local_abspath, 06236 const char *name, 06237 apr_pool_t *result_pool, 06238 apr_pool_t *scratch_pool); 06239 06240 /** Similar to svn_wc_prop_get2(), but with a #svn_wc_adm_access_t / 06241 * relative path parameter pair. 06242 * 06243 * When @a path is not versioned, set @a *value to NULL. 06244 * 06245 * @deprecated Provided for backwards compatibility with the 1.6 API. 06246 */ 06247 SVN_DEPRECATED 06248 svn_error_t * 06249 svn_wc_prop_get(const svn_string_t **value, 06250 const char *name, 06251 const char *path, 06252 svn_wc_adm_access_t *adm_access, 06253 apr_pool_t *pool); 06254 06255 /** 06256 * Set property @a name to @a value for @a local_abspath, or if @a value is 06257 * NULL, remove property @a name from @a local_abspath. Use @a wc_ctx to 06258 * access @a local_abspath. 06259 * 06260 * @a name may be a regular property or a "wc property". If @a name is 06261 * an "entry property", return the error #SVN_ERR_BAD_PROP_KIND (even if 06262 * @a skip_checks is TRUE). 06263 * 06264 * If @a name is a "wc property", then just update the WC DAV cache for 06265 * @a local_abspath with @a name and @a value. In this case, @a depth 06266 * must be #svn_depth_empty. 06267 * 06268 * The rest of this description applies when @a name is a regular property. 06269 * 06270 * If @a name is a name in the reserved "svn:" name space, and @a value is 06271 * non-null, then canonicalize the property value and check the property 06272 * name and value as documented for svn_wc_canonicalize_svn_prop(). 06273 * @a skip_checks controls the level of checking as documented there. 06274 * 06275 * Return an error if the canonicalization or the check fails. 06276 * The error will be either #SVN_ERR_ILLEGAL_TARGET (if the 06277 * property is not appropriate for @a path), or 06278 * #SVN_ERR_BAD_MIME_TYPE (if @a name is "svn:mime-type", but @a value 06279 * is not a valid mime-type). 06280 * ### That is not currently right -- several other errors can be raised. 06281 * 06282 * @a depth follows the usual semantics for depth. 06283 * 06284 * @a changelist_filter is an array of <tt>const char *</tt> changelist 06285 * names, used as a restrictive filter on items whose properties are 06286 * set; that is, don't set properties on any item unless it's a member 06287 * of one of those changelists. If @a changelist_filter is empty (or 06288 * altogether @c NULL), no changelist filtering occurs. 06289 * 06290 * If @a cancel_func is non-NULL, then it will be invoked (with the 06291 * @a cancel_baton value passed) during the processing of the property 06292 * set (i.e. when @a depth indicates some amount of recursion). 06293 * 06294 * For each file or directory operated on, @a notify_func will be called 06295 * with its path and the @a notify_baton. @a notify_func may be @c NULL 06296 * if you are not interested in this information. 06297 * 06298 * Use @a scratch_pool for temporary allocation. 06299 * 06300 * @note If the caller is setting both svn:mime-type and svn:eol-style in 06301 * separate calls, and @a skip_checks is false, there is an ordering 06302 * dependency between them, as the validity check for svn:eol-style makes 06303 * use of the current value of svn:mime-type. 06304 * 06305 * ### The error code on validity check failure should be specified, and 06306 * should be a single code or a very small set of possibilities. 06307 * 06308 * @since New in 1.7. 06309 */ 06310 svn_error_t * 06311 svn_wc_prop_set4(svn_wc_context_t *wc_ctx, 06312 const char *local_abspath, 06313 const char *name, 06314 const svn_string_t *value, 06315 svn_depth_t depth, 06316 svn_boolean_t skip_checks, 06317 const apr_array_header_t *changelist_filter, 06318 svn_cancel_func_t cancel_func, 06319 void *cancel_baton, 06320 svn_wc_notify_func2_t notify_func, 06321 void *notify_baton, 06322 apr_pool_t *scratch_pool); 06323 06324 /** Similar to svn_wc_prop_set4(), but with a #svn_wc_adm_access_t / 06325 * relative path parameter pair, no @a depth parameter, no changelist 06326 * filtering (for the depth-based property setting), and no cancellation. 06327 * 06328 * @since New in 1.6. 06329 * @deprecated Provided for backwards compatibility with the 1.6 API. 06330 */ 06331 SVN_DEPRECATED 06332 svn_error_t * 06333 svn_wc_prop_set3(const char *name, 06334 const svn_string_t *value, 06335 const char *path, 06336 svn_wc_adm_access_t *adm_access, 06337 svn_boolean_t skip_checks, 06338 svn_wc_notify_func2_t notify_func, 06339 void *notify_baton, 06340 apr_pool_t *pool); 06341 06342 06343 /** 06344 * Like svn_wc_prop_set3(), but without the notification callbacks. 06345 * 06346 * @since New in 1.2. 06347 * @deprecated Provided for backwards compatibility with the 1.5 API. 06348 */ 06349 SVN_DEPRECATED 06350 svn_error_t * 06351 svn_wc_prop_set2(const char *name, 06352 const svn_string_t *value, 06353 const char *path, 06354 svn_wc_adm_access_t *adm_access, 06355 svn_boolean_t skip_checks, 06356 apr_pool_t *pool); 06357 06358 06359 /** 06360 * Like svn_wc_prop_set2(), but with @a skip_checks always FALSE. 06361 * 06362 * @deprecated Provided for backward compatibility with the 1.1 API. 06363 */ 06364 SVN_DEPRECATED 06365 svn_error_t * 06366 svn_wc_prop_set(const char *name, 06367 const svn_string_t *value, 06368 const char *path, 06369 svn_wc_adm_access_t *adm_access, 06370 apr_pool_t *pool); 06371 06372 06373 /** Return TRUE iff @a name is a 'normal' property name. 'Normal' is 06374 * defined as a user-visible and user-tweakable property that shows up 06375 * when you fetch a proplist. 06376 * 06377 * The function currently parses the namespace like so: 06378 * 06379 * - 'svn:wc:' ==> a wcprop, stored/accessed separately via different API. 06380 * 06381 * - 'svn:entry:' ==> an "entry" prop, shunted into the 'entries' file. 06382 * 06383 * If these patterns aren't found, then the property is assumed to be 06384 * Normal. 06385 */ 06386 svn_boolean_t 06387 svn_wc_is_normal_prop(const char *name); 06388 06389 06390 06391 /** Return TRUE iff @a name is a 'wc' property name. */ 06392 svn_boolean_t 06393 svn_wc_is_wc_prop(const char *name); 06394 06395 /** Return TRUE iff @a name is a 'entry' property name. */ 06396 svn_boolean_t 06397 svn_wc_is_entry_prop(const char *name); 06398 06399 /** Callback type used by #svn_wc_canonicalize_svn_prop. 06400 * 06401 * If @a mime_type is non-null, it sets @a *mime_type to the value of 06402 * #SVN_PROP_MIME_TYPE for the path passed to 06403 * #svn_wc_canonicalize_svn_prop (allocated from @a pool). If @a 06404 * stream is non-null, it writes the contents of the file to @a 06405 * stream. 06406 * 06407 * (Currently, this is used if you are attempting to set the 06408 * #SVN_PROP_EOL_STYLE property, to make sure that the value matches 06409 * the mime type and contents.) 06410 * 06411 * @since New in 1.5. 06412 */ 06413 typedef svn_error_t *(*svn_wc_canonicalize_svn_prop_get_file_t)( 06414 const svn_string_t **mime_type, 06415 svn_stream_t *stream, 06416 void *baton, 06417 apr_pool_t *pool); 06418 06419 06420 /** Canonicalize the value of an svn:* property @a propname with 06421 * value @a propval. 06422 * 06423 * If the property is not appropriate for a node of kind @a kind, or 06424 * is otherwise invalid, throw an error. Otherwise, set @a *propval_p 06425 * to a canonicalized version of the property value. 06426 * 06427 * The exact set of canonicalizations and checks may vary across different 06428 * versions of this API. Currently: 06429 * 06430 * - svn:executable 06431 * - svn:needs-lock 06432 * - svn:special 06433 * - set the value to '*' 06434 * 06435 * - svn:keywords 06436 * - strip leading and trailing white space 06437 * 06438 * - svn:ignore 06439 * - svn:global-ignores 06440 * - svn:auto-props 06441 * - add a final a newline character if missing 06442 * 06443 * - svn:externals 06444 * - add a final a newline character if missing 06445 * - check for valid syntax 06446 * - check for no duplicate entries 06447 * 06448 * - svn:mergeinfo 06449 * - canonicalize 06450 * - check for validity 06451 * 06452 * Also, unless @a skip_some_checks is TRUE: 06453 * 06454 * - svn:eol-style 06455 * - strip leading and trailing white space 06456 * - check value is recognized 06457 * - check file content has a self-consistent EOL style 06458 * (but not necessarily that it matches @a propval) 06459 * 06460 * - svn:mime-type 06461 * - strip white space 06462 * - check for reasonable syntax 06463 * 06464 * The EOL-style check (if not skipped) requires access to the contents and 06465 * MIME type of the target if it is a file. It will call @a prop_getter with 06466 * @a getter_baton. The callback must set the MIME type and/or write the 06467 * contents of the file to the given stream. If @a skip_some_checks is true, 06468 * then @a prop_getter is not used and may be NULL. 06469 * 06470 * @a path should be the path of the file in question; it is only used 06471 * for error messages. 06472 * 06473 * ### The error code on validity check failure should be specified, and 06474 * should be a single code or a very small set of possibilities. 06475 * 06476 * ### This is not actually related to the WC, but it does need to call 06477 * ### svn_wc_parse_externals_description3. 06478 * 06479 * @since New in 1.5. 06480 */ 06481 svn_error_t * 06482 svn_wc_canonicalize_svn_prop(const svn_string_t **propval_p, 06483 const char *propname, 06484 const svn_string_t *propval, 06485 const char *path, 06486 svn_node_kind_t kind, 06487 svn_boolean_t skip_some_checks, 06488 svn_wc_canonicalize_svn_prop_get_file_t prop_getter, 06489 void *getter_baton, 06490 apr_pool_t *pool); 06491 06492 /** @} */ 06493 06494 06495 /** 06496 * @defgroup svn_wc_diffs Diffs 06497 * @{ 06498 */ 06499 06500 /** 06501 * DEPRECATED -- please use APIs from svn_client.h 06502 * 06503 * --- 06504 * 06505 * Return an @a editor/@a edit_baton for diffing a working copy against the 06506 * repository. The editor is allocated in @a result_pool; temporary 06507 * calculations are performed in @a scratch_pool. 06508 * 06509 * This editor supports diffing either the actual files and properties in the 06510 * working copy (when @a use_text_base is #FALSE), or the current pristine 06511 * information (when @a use_text_base is #TRUE) against the editor driver. 06512 * 06513 * @a anchor_abspath/@a target represent the base of the hierarchy to be 06514 * compared. The diff callback paths will be relative to this path. 06515 * 06516 * Diffs will be reported as valid relpaths, with @a anchor_abspath being 06517 * the root (""). 06518 * 06519 * @a callbacks/@a callback_baton is the callback table to use. 06520 * 06521 * If @a depth is #svn_depth_empty, just diff exactly @a target or 06522 * @a anchor_path if @a target is empty. If #svn_depth_files then do the same 06523 * and for top-level file entries as well (if any). If 06524 * #svn_depth_immediates, do the same as #svn_depth_files but also diff 06525 * top-level subdirectories at #svn_depth_empty. If #svn_depth_infinity, 06526 * then diff fully recursively. 06527 * 06528 * @a ignore_ancestry determines whether paths that have discontinuous node 06529 * ancestry are treated as delete/add or as simple modifications. If 06530 * @a ignore_ancestry is @c FALSE, then any discontinuous node ancestry will 06531 * result in the diff given as a full delete followed by an add. 06532 * 06533 * @a show_copies_as_adds determines whether paths added with history will 06534 * appear as a diff against their copy source, or whether such paths will 06535 * appear as if they were newly added in their entirety. 06536 * @a show_copies_as_adds implies not @a ignore_ancestry. 06537 * 06538 * If @a use_git_diff_format is TRUE, copied paths will be treated as added 06539 * if they weren't modified after being copied. This allows the callbacks 06540 * to generate appropriate --git diff headers for such files. 06541 * @a use_git_diff_format implies @a show_copies_as_adds, and as such implies 06542 * not @a ignore_ancestry. 06543 * 06544 * Normally, the difference from repository->working_copy is shown. 06545 * If @a reverse_order is TRUE, then show working_copy->repository diffs. 06546 * 06547 * If @a cancel_func is non-NULL, it will be used along with @a cancel_baton 06548 * to periodically check if the client has canceled the operation. 06549 * 06550 * @a changelist_filter is an array of <tt>const char *</tt> changelist 06551 * names, used as a restrictive filter on items whose differences are 06552 * reported; that is, don't generate diffs about any item unless 06553 * it's a member of one of those changelists. If @a changelist_filter is 06554 * empty (or altogether @c NULL), no changelist filtering occurs. 06555 * 06556 * If @a server_performs_filtering is TRUE, assume that the server handles 06557 * the ambient depth filtering, so this doesn't have to be handled in the 06558 * editor. 06559 * 06560 * @since New in 1.7. 06561 * @deprecated Provided for backward compatibility with the 1.7 API. 06562 */ 06563 SVN_DEPRECATED 06564 svn_error_t * 06565 svn_wc_get_diff_editor6(const svn_delta_editor_t **editor, 06566 void **edit_baton, 06567 svn_wc_context_t *wc_ctx, 06568 const char *anchor_abspath, 06569 const char *target, 06570 svn_depth_t depth, 06571 svn_boolean_t ignore_ancestry, 06572 svn_boolean_t show_copies_as_adds, 06573 svn_boolean_t use_git_diff_format, 06574 svn_boolean_t use_text_base, 06575 svn_boolean_t reverse_order, 06576 svn_boolean_t server_performs_filtering, 06577 const apr_array_header_t *changelist_filter, 06578 const svn_wc_diff_callbacks4_t *callbacks, 06579 void *callback_baton, 06580 svn_cancel_func_t cancel_func, 06581 void *cancel_baton, 06582 apr_pool_t *result_pool, 06583 apr_pool_t *scratch_pool); 06584 06585 /** 06586 * Similar to svn_wc_get_diff_editor6(), but with an access baton and relative 06587 * path. @a server_performs_filtering always true and with a 06588 * #svn_wc_diff_callbacks3_t instead of #svn_wc_diff_callbacks4_t, 06589 * @a show_copies_as_adds, and @a use_git_diff_format set to @c FALSE. 06590 * 06591 * Diffs will be reported as below the relative path stored in @a anchor. 06592 * 06593 * @since New in 1.6. 06594 * 06595 * @deprecated Provided for backward compatibility with the 1.6 API. 06596 */ 06597 SVN_DEPRECATED 06598 svn_error_t * 06599 svn_wc_get_diff_editor5(svn_wc_adm_access_t *anchor, 06600 const char *target, 06601 const svn_wc_diff_callbacks3_t *callbacks, 06602 void *callback_baton, 06603 svn_depth_t depth, 06604 svn_boolean_t ignore_ancestry, 06605 svn_boolean_t use_text_base, 06606 svn_boolean_t reverse_order, 06607 svn_cancel_func_t cancel_func, 06608 void *cancel_baton, 06609 const apr_array_header_t *changelist_filter, 06610 const svn_delta_editor_t **editor, 06611 void **edit_baton, 06612 apr_pool_t *pool); 06613 06614 /** 06615 * Similar to svn_wc_get_diff_editor5(), but with an 06616 * #svn_wc_diff_callbacks2_t instead of #svn_wc_diff_callbacks3_t. 06617 * 06618 * @deprecated Provided for backward compatibility with the 1.5 API. 06619 */ 06620 SVN_DEPRECATED 06621 svn_error_t * 06622 svn_wc_get_diff_editor4(svn_wc_adm_access_t *anchor, 06623 const char *target, 06624 const svn_wc_diff_callbacks2_t *callbacks, 06625 void *callback_baton, 06626 svn_depth_t depth, 06627 svn_boolean_t ignore_ancestry, 06628 svn_boolean_t use_text_base, 06629 svn_boolean_t reverse_order, 06630 svn_cancel_func_t cancel_func, 06631 void *cancel_baton, 06632 const apr_array_header_t *changelist_filter, 06633 const svn_delta_editor_t **editor, 06634 void **edit_baton, 06635 apr_pool_t *pool); 06636 06637 /** 06638 * Similar to svn_wc_get_diff_editor4(), but with @a changelist_filter 06639 * passed as @c NULL, and @a depth set to #svn_depth_infinity if @a 06640 * recurse is TRUE, or #svn_depth_files if @a recurse is FALSE. 06641 * 06642 * @deprecated Provided for backward compatibility with the 1.4 API. 06643 06644 * @since New in 1.2. 06645 */ 06646 SVN_DEPRECATED 06647 svn_error_t * 06648 svn_wc_get_diff_editor3(svn_wc_adm_access_t *anchor, 06649 const char *target, 06650 const svn_wc_diff_callbacks2_t *callbacks, 06651 void *callback_baton, 06652 svn_boolean_t recurse, 06653 svn_boolean_t ignore_ancestry, 06654 svn_boolean_t use_text_base, 06655 svn_boolean_t reverse_order, 06656 svn_cancel_func_t cancel_func, 06657 void *cancel_baton, 06658 const svn_delta_editor_t **editor, 06659 void **edit_baton, 06660 apr_pool_t *pool); 06661 06662 06663 /** 06664 * Similar to svn_wc_get_diff_editor3(), but with an 06665 * #svn_wc_diff_callbacks_t instead of #svn_wc_diff_callbacks2_t. 06666 * 06667 * @deprecated Provided for backward compatibility with the 1.1 API. 06668 */ 06669 SVN_DEPRECATED 06670 svn_error_t * 06671 svn_wc_get_diff_editor2(svn_wc_adm_access_t *anchor, 06672 const char *target, 06673 const svn_wc_diff_callbacks_t *callbacks, 06674 void *callback_baton, 06675 svn_boolean_t recurse, 06676 svn_boolean_t ignore_ancestry, 06677 svn_boolean_t use_text_base, 06678 svn_boolean_t reverse_order, 06679 svn_cancel_func_t cancel_func, 06680 void *cancel_baton, 06681 const svn_delta_editor_t **editor, 06682 void **edit_baton, 06683 apr_pool_t *pool); 06684 06685 06686 /** 06687 * Similar to svn_wc_get_diff_editor2(), but with @a ignore_ancestry 06688 * always set to @c FALSE. 06689 * 06690 * @deprecated Provided for backward compatibility with the 1.0 API. 06691 */ 06692 SVN_DEPRECATED 06693 svn_error_t * 06694 svn_wc_get_diff_editor(svn_wc_adm_access_t *anchor, 06695 const char *target, 06696 const svn_wc_diff_callbacks_t *callbacks, 06697 void *callback_baton, 06698 svn_boolean_t recurse, 06699 svn_boolean_t use_text_base, 06700 svn_boolean_t reverse_order, 06701 svn_cancel_func_t cancel_func, 06702 void *cancel_baton, 06703 const svn_delta_editor_t **editor, 06704 void **edit_baton, 06705 apr_pool_t *pool); 06706 06707 06708 /** 06709 * Compare working copy against the text-base. 06710 * 06711 * @a target_abspath represents the base of the hierarchy to be compared. 06712 * 06713 * @a callbacks/@a callback_baton is the callback table to use when two 06714 * files are to be compared. 06715 * 06716 * If @a depth is #svn_depth_empty, just diff exactly @a target_path. 06717 * If #svn_depth_files then do the same 06718 * and for top-level file entries as well (if any). If 06719 * #svn_depth_immediates, do the same as #svn_depth_files but also diff 06720 * top-level subdirectories at #svn_depth_empty. If #svn_depth_infinity, 06721 * then diff fully recursively. 06722 * 06723 * @a ignore_ancestry determines whether paths that have discontinuous node 06724 * ancestry are treated as delete/add or as simple modifications. If 06725 * @a ignore_ancestry is @c FALSE, then any discontinuous node ancestry will 06726 * result in the diff given as a full delete followed by an add. 06727 * 06728 * @a show_copies_as_adds determines whether paths added with history will 06729 * appear as a diff against their copy source, or whether such paths will 06730 * appear as if they were newly added in their entirety. 06731 * 06732 * If @a use_git_diff_format is TRUE, copied paths will be treated as added 06733 * if they weren't modified after being copied. This allows the callbacks 06734 * to generate appropriate --git diff headers for such files. 06735 * 06736 * @a changelist_filter is an array of <tt>const char *</tt> changelist 06737 * names, used as a restrictive filter on items whose differences are 06738 * reported; that is, don't generate diffs about any item unless 06739 * it's a member of one of those changelists. If @a changelist_filter is 06740 * empty (or altogether @c NULL), no changelist filtering occurs. 06741 * 06742 * If @a cancel_func is non-NULL, invoke it with @a cancel_baton at various 06743 * points during the operation. If it returns an error (typically 06744 * #SVN_ERR_CANCELLED), return that error immediately. 06745 * 06746 * @since New in 1.7. 06747 */ 06748 svn_error_t * 06749 svn_wc_diff6(svn_wc_context_t *wc_ctx, 06750 const char *target_abspath, 06751 const svn_wc_diff_callbacks4_t *callbacks, 06752 void *callback_baton, 06753 svn_depth_t depth, 06754 svn_boolean_t ignore_ancestry, 06755 svn_boolean_t show_copies_as_adds, 06756 svn_boolean_t use_git_diff_format, 06757 const apr_array_header_t *changelist_filter, 06758 svn_cancel_func_t cancel_func, 06759 void *cancel_baton, 06760 apr_pool_t *scratch_pool); 06761 06762 /** 06763 * Similar to svn_wc_diff6(), but with a #svn_wc_diff_callbacks3_t argument 06764 * instead of #svn_wc_diff_callbacks4_t, @a show_copies_as_adds, 06765 * and @a use_git_diff_format set to * @c FALSE. 06766 * It also doesn't allow specifying a cancel function. 06767 * 06768 * @since New in 1.6. 06769 * @deprecated Provided for backward compatibility with the 1.6 API. 06770 */ 06771 SVN_DEPRECATED 06772 svn_error_t * 06773 svn_wc_diff5(svn_wc_adm_access_t *anchor, 06774 const char *target, 06775 const svn_wc_diff_callbacks3_t *callbacks, 06776 void *callback_baton, 06777 svn_depth_t depth, 06778 svn_boolean_t ignore_ancestry, 06779 const apr_array_header_t *changelist_filter, 06780 apr_pool_t *pool); 06781 06782 /** 06783 * Similar to svn_wc_diff5(), but with a #svn_wc_diff_callbacks2_t argument 06784 * instead of #svn_wc_diff_callbacks3_t. 06785 * 06786 * @since New in 1.5. 06787 * @deprecated Provided for backward compatibility with the 1.5 API. 06788 */ 06789 SVN_DEPRECATED 06790 svn_error_t * 06791 svn_wc_diff4(svn_wc_adm_access_t *anchor, 06792 const char *target, 06793 const svn_wc_diff_callbacks2_t *callbacks, 06794 void *callback_baton, 06795 svn_depth_t depth, 06796 svn_boolean_t ignore_ancestry, 06797 const apr_array_header_t *changelist_filter, 06798 apr_pool_t *pool); 06799 06800 /** 06801 * Similar to svn_wc_diff4(), but with @a changelist_filter passed @c NULL, 06802 * and @a depth set to #svn_depth_infinity if @a recurse is TRUE, or 06803 * #svn_depth_files if @a recurse is FALSE. 06804 * 06805 * @since New in 1.2. 06806 * @deprecated Provided for backward compatibility with the 1.4 API. 06807 */ 06808 SVN_DEPRECATED 06809 svn_error_t * 06810 svn_wc_diff3(svn_wc_adm_access_t *anchor, 06811 const char *target, 06812 const svn_wc_diff_callbacks2_t *callbacks, 06813 void *callback_baton, 06814 svn_boolean_t recurse, 06815 svn_boolean_t ignore_ancestry, 06816 apr_pool_t *pool); 06817 06818 /** 06819 * Similar to svn_wc_diff3(), but with a #svn_wc_diff_callbacks_t argument 06820 * instead of #svn_wc_diff_callbacks2_t. 06821 * 06822 * @since New in 1.1. 06823 * @deprecated Provided for backward compatibility with the 1.1 API. 06824 */ 06825 SVN_DEPRECATED 06826 svn_error_t * 06827 svn_wc_diff2(svn_wc_adm_access_t *anchor, 06828 const char *target, 06829 const svn_wc_diff_callbacks_t *callbacks, 06830 void *callback_baton, 06831 svn_boolean_t recurse, 06832 svn_boolean_t ignore_ancestry, 06833 apr_pool_t *pool); 06834 06835 /** 06836 * Similar to svn_wc_diff2(), but with @a ignore_ancestry always set 06837 * to @c FALSE. 06838 * 06839 * @deprecated Provided for backward compatibility with the 1.0 API. 06840 */ 06841 SVN_DEPRECATED 06842 svn_error_t * 06843 svn_wc_diff(svn_wc_adm_access_t *anchor, 06844 const char *target, 06845 const svn_wc_diff_callbacks_t *callbacks, 06846 void *callback_baton, 06847 svn_boolean_t recurse, 06848 apr_pool_t *pool); 06849 06850 06851 /** Given a @a local_abspath to a file or directory under version control, 06852 * discover any local changes made to properties and/or the set of 'pristine' 06853 * properties. @a wc_ctx will be used to access the working copy. 06854 * 06855 * If @a propchanges is non-@c NULL, return these changes as an array of 06856 * #svn_prop_t structures stored in @a *propchanges. The structures and 06857 * array will be allocated in @a result_pool. If there are no local property 06858 * modifications on @a local_abspath, then set @a *propchanges will be empty. 06859 * 06860 * If @a original_props is non-@c NULL, then set @a *original_props to 06861 * hashtable (<tt>const char *name</tt> -> <tt>const svn_string_t *value</tt>) 06862 * that represents the 'pristine' property list of @a path. This hashtable is 06863 * allocated in @a result_pool. 06864 * 06865 * Use @a scratch_pool for temporary allocations. 06866 */ 06867 svn_error_t * 06868 svn_wc_get_prop_diffs2(apr_array_header_t **propchanges, 06869 apr_hash_t **original_props, 06870 svn_wc_context_t *wc_ctx, 06871 const char *local_abspath, 06872 apr_pool_t *result_pool, 06873 apr_pool_t *scratch_pool); 06874 06875 /** Similar to svn_wc_get_prop_diffs2(), but with a #svn_wc_adm_access_t / 06876 * relative path parameter pair. 06877 * 06878 * @deprecated Provided for backwards compatibility with the 1.6 API. 06879 */ 06880 SVN_DEPRECATED 06881 svn_error_t * 06882 svn_wc_get_prop_diffs(apr_array_header_t **propchanges, 06883 apr_hash_t **original_props, 06884 const char *path, 06885 svn_wc_adm_access_t *adm_access, 06886 apr_pool_t *pool); 06887 06888 /** @} */ 06889 06890 06891 /** 06892 * @defgroup svn_wc_merging Merging 06893 * @{ 06894 */ 06895 06896 /** The outcome of a merge carried out (or tried as a dry-run) by 06897 * svn_wc_merge() 06898 */ 06899 typedef enum svn_wc_merge_outcome_t 06900 { 06901 /** The working copy is (or would be) unchanged. The changes to be 06902 * merged were already present in the working copy 06903 */ 06904 svn_wc_merge_unchanged, 06905 06906 /** The working copy has been (or would be) changed. */ 06907 svn_wc_merge_merged, 06908 06909 /** The working copy has been (or would be) changed, but there was (or 06910 * would be) a conflict 06911 */ 06912 svn_wc_merge_conflict, 06913 06914 /** No merge was performed, probably because the target file was 06915 * either absent or not under version control. 06916 */ 06917 svn_wc_merge_no_merge 06918 06919 } svn_wc_merge_outcome_t; 06920 06921 /** Given absolute paths to three fulltexts, merge the differences between 06922 * @a left_abspath and @a right_abspath into @a target_abspath. 06923 * It may help to know that @a left_abspath, @a right_abspath and @a 06924 * target_abspath correspond to "OLDER", "YOURS", and "MINE", 06925 * respectively, in the diff3 documentation. 06926 * 06927 * @a wc_ctx should contain a write lock for the directory containing @a 06928 * target_abspath. 06929 * 06930 * This function assumes that @a left_abspath and @a right_abspath are 06931 * in repository-normal form (linefeeds, with keywords contracted); if 06932 * necessary, @a target_abspath is temporarily converted to this form to 06933 * receive the changes, then translated back again. 06934 * 06935 * If @a target_abspath is absent, or present but not under version 06936 * control, then set @a *merge_content_outcome to #svn_wc_merge_no_merge and 06937 * return success without merging anything. (The reasoning is that if 06938 * the file is not versioned, then it is probably unrelated to the 06939 * changes being considered, so they should not be merged into it. 06940 * Furthermore, merging into an unversioned file is a lossy operation.) 06941 * 06942 * @a dry_run determines whether the working copy is modified. When it 06943 * is @c FALSE the merge will cause @a target_abspath to be modified, when 06944 * it is @c TRUE the merge will be carried out to determine the result but 06945 * @a target_abspath will not be modified. 06946 * 06947 * If @a diff3_cmd is non-NULL, then use it as the diff3 command for 06948 * any merging; otherwise, use the built-in merge code. If @a 06949 * merge_options is non-NULL, either pass its elements to @a diff3_cmd or 06950 * parse it and use as options to the internal merge code (see 06951 * svn_diff_file_options_parse()). @a merge_options must contain 06952 * <tt>const char *</tt> elements. 06953 * 06954 * If @a merge_props_state is non-NULL, merge @a prop_diff into the 06955 * working properties before merging the text. (If @a merge_props_state 06956 * is NULL, do not merge any property changes; in this case, @a prop_diff 06957 * is only used to help determine the text merge result.) Handle any 06958 * conflicts as described for svn_wc_merge_props3(), with the parameters 06959 * @a dry_run, @a conflict_func and @a conflict_baton. Return the 06960 * outcome of the property merge in @a *merge_props_state. 06961 * 06962 * The outcome of the text merge is returned in @a *merge_content_outcome. If 06963 * there is a conflict and @a dry_run is @c FALSE, then attempt to call @a 06964 * conflict_func with @a conflict_baton (if non-NULL). If the 06965 * conflict callback cannot resolve the conflict, then: 06966 * 06967 * * Put conflict markers around the conflicting regions in 06968 * @a target_abspath, labeled with @a left_label, @a right_label, and 06969 * @a target_label. (If any of these labels are @c NULL, default 06970 * values will be used.) 06971 * 06972 * * Copy @a left_abspath, @a right_abspath, and the original @a 06973 * target_abspath to unique names in the same directory as @a 06974 * target_abspath, ending with the suffixes ".LEFT_LABEL", ".RIGHT_LABEL", 06975 * and ".TARGET_LABEL" respectively. 06976 * 06977 * * Mark @a target_abspath as "text-conflicted", and track the above 06978 * mentioned backup files as well. 06979 * 06980 * * If @a left_version and/or @a right_version are not NULL, provide 06981 * these values to the conflict handler and track these while the conflict 06982 * exists. 06983 * 06984 * Binary case: 06985 * 06986 * If @a target_abspath is a binary file, then no merging is attempted, 06987 * the merge is deemed to be a conflict. If @a dry_run is @c FALSE the 06988 * working @a target_abspath is untouched, and copies of @a left_abspath and 06989 * @a right_abspath are created next to it using @a left_label and 06990 * @a right_label. @a target_abspath is marked as "text-conflicted", and 06991 * begins tracking the two backup files and the version information. 06992 * 06993 * If @a dry_run is @c TRUE no files are changed. The outcome of the merge 06994 * is returned in @a *merge_content_outcome. 06995 * ### (and what about @a *merge_props_state?) 06996 * 06997 * ### BH: Two kinds of outcome is not how it should be. 06998 * 06999 * ### For text, we report the outcome as 'merged' if there was some 07000 * incoming change that we dealt with (even if we decided to no-op?) 07001 * but the callers then convert this outcome into a notification 07002 * of 'merged' only if there was already a local modification; 07003 * otherwise they notify it as simply 'updated'. But for props 07004 * we report a notify state of 'merged' here if there was an 07005 * incoming change regardless of the local-mod state. Inconsistent. 07006 * 07007 * Use @a scratch_pool for any temporary allocation. 07008 * 07009 * @since New in 1.8. 07010 */ 07011 svn_error_t * 07012 svn_wc_merge5(enum svn_wc_merge_outcome_t *merge_content_outcome, 07013 enum svn_wc_notify_state_t *merge_props_state, 07014 svn_wc_context_t *wc_ctx, 07015 const char *left_abspath, 07016 const char *right_abspath, 07017 const char *target_abspath, 07018 const char *left_label, 07019 const char *right_label, 07020 const char *target_label, 07021 const svn_wc_conflict_version_t *left_version, 07022 const svn_wc_conflict_version_t *right_version, 07023 svn_boolean_t dry_run, 07024 const char *diff3_cmd, 07025 const apr_array_header_t *merge_options, 07026 apr_hash_t *original_props, 07027 const apr_array_header_t *prop_diff, 07028 svn_wc_conflict_resolver_func2_t conflict_func, 07029 void *conflict_baton, 07030 svn_cancel_func_t cancel_func, 07031 void *cancel_baton, 07032 apr_pool_t *scratch_pool); 07033 07034 /** Similar to svn_wc_merge5() but with @a merge_props_state and @a 07035 * original_props always passed as NULL. 07036 * 07037 * Unlike svn_wc_merge5(), this function doesn't merge property 07038 * changes. Callers of this function must first use 07039 * svn_wc_merge_props3() to get this functionality. 07040 * 07041 * @since New in 1.7. 07042 * @deprecated Provided for backwards compatibility with the 1.7 API. 07043 */ 07044 SVN_DEPRECATED 07045 svn_error_t * 07046 svn_wc_merge4(enum svn_wc_merge_outcome_t *merge_outcome, 07047 svn_wc_context_t *wc_ctx, 07048 const char *left_abspath, 07049 const char *right_abspath, 07050 const char *target_abspath, 07051 const char *left_label, 07052 const char *right_label, 07053 const char *target_label, 07054 const svn_wc_conflict_version_t *left_version, 07055 const svn_wc_conflict_version_t *right_version, 07056 svn_boolean_t dry_run, 07057 const char *diff3_cmd, 07058 const apr_array_header_t *merge_options, 07059 const apr_array_header_t *prop_diff, 07060 svn_wc_conflict_resolver_func2_t conflict_func, 07061 void *conflict_baton, 07062 svn_cancel_func_t cancel_func, 07063 void *cancel_baton, 07064 apr_pool_t *scratch_pool); 07065 07066 07067 /** Similar to svn_wc_merge4() but takes relative paths and an access 07068 * baton. It doesn't support a cancel function or tracking origin version 07069 * information. 07070 * 07071 * Uses a svn_wc_conflict_resolver_func_t conflict resolver instead of a 07072 * svn_wc_conflict_resolver_func2_t. 07073 * 07074 * This function assumes that @a diff3_cmd is path encoded. Later versions 07075 * assume utf-8. 07076 * 07077 * @since New in 1.5. 07078 * @deprecated Provided for backwards compatibility with the 1.6 API. 07079 */ 07080 SVN_DEPRECATED 07081 svn_error_t * 07082 svn_wc_merge3(enum svn_wc_merge_outcome_t *merge_outcome, 07083 const char *left, 07084 const char *right, 07085 const char *merge_target, 07086 svn_wc_adm_access_t *adm_access, 07087 const char *left_label, 07088 const char *right_label, 07089 const char *target_label, 07090 svn_boolean_t dry_run, 07091 const char *diff3_cmd, 07092 const apr_array_header_t *merge_options, 07093 const apr_array_header_t *prop_diff, 07094 svn_wc_conflict_resolver_func_t conflict_func, 07095 void *conflict_baton, 07096 apr_pool_t *pool); 07097 07098 07099 /** Similar to svn_wc_merge3(), but with @a prop_diff, @a 07100 * conflict_func, @a conflict_baton set to NULL. 07101 * 07102 * @deprecated Provided for backwards compatibility with the 1.4 API. 07103 */ 07104 SVN_DEPRECATED 07105 svn_error_t * 07106 svn_wc_merge2(enum svn_wc_merge_outcome_t *merge_outcome, 07107 const char *left, 07108 const char *right, 07109 const char *merge_target, 07110 svn_wc_adm_access_t *adm_access, 07111 const char *left_label, 07112 const char *right_label, 07113 const char *target_label, 07114 svn_boolean_t dry_run, 07115 const char *diff3_cmd, 07116 const apr_array_header_t *merge_options, 07117 apr_pool_t *pool); 07118 07119 07120 /** Similar to svn_wc_merge2(), but with @a merge_options set to NULL. 07121 * 07122 * @deprecated Provided for backwards compatibility with the 1.3 API. 07123 */ 07124 SVN_DEPRECATED 07125 svn_error_t * 07126 svn_wc_merge(const char *left, 07127 const char *right, 07128 const char *merge_target, 07129 svn_wc_adm_access_t *adm_access, 07130 const char *left_label, 07131 const char *right_label, 07132 const char *target_label, 07133 svn_boolean_t dry_run, 07134 enum svn_wc_merge_outcome_t *merge_outcome, 07135 const char *diff3_cmd, 07136 apr_pool_t *pool); 07137 07138 07139 /** Given a @a local_abspath under version control, merge an array of @a 07140 * propchanges into the path's existing properties. @a propchanges is 07141 * an array of #svn_prop_t objects, and @a baseprops is a hash 07142 * representing the original set of properties that @a propchanges is 07143 * working against. @a wc_ctx contains a lock for @a local_abspath. 07144 * 07145 * Only the working properties will be changed. 07146 * 07147 * If @a state is non-NULL, set @a *state to the state of the properties 07148 * after the merge. 07149 * 07150 * If a conflict is found when merging a property, and @a dry_run is 07151 * false and @a conflict_func is not null, then call @a conflict_func 07152 * with @a conflict_baton and a description of the conflict. If any 07153 * conflicts are not resolved by such callbacks, describe the unresolved 07154 * conflicts in a temporary .prej file (or append to an already-existing 07155 * .prej file) and mark the path as conflicted in the WC DB. 07156 * 07157 * If @a cancel_func is non-NULL, invoke it with @a cancel_baton at various 07158 * points during the operation. If it returns an error (typically 07159 * #SVN_ERR_CANCELLED), return that error immediately. 07160 * 07161 * If @a local_abspath is not under version control, return the error 07162 * #SVN_ERR_WC_PATH_NOT_FOUND and don't touch anyone's properties. 07163 * 07164 * If @a local_abspath has a status in which it doesn't have properties 07165 * (E.g. deleted) return the error SVN_ERR_WC_PATH_UNEXPECTED_STATUS. 07166 * 07167 * @since New in 1.7. 07168 */ 07169 svn_error_t * 07170 svn_wc_merge_props3(svn_wc_notify_state_t *state, 07171 svn_wc_context_t *wc_ctx, 07172 const char *local_abspath, 07173 const svn_wc_conflict_version_t *left_version, 07174 const svn_wc_conflict_version_t *right_version, 07175 apr_hash_t *baseprops, 07176 const apr_array_header_t *propchanges, 07177 svn_boolean_t dry_run, 07178 svn_wc_conflict_resolver_func2_t conflict_func, 07179 void *conflict_baton, 07180 svn_cancel_func_t cancel_func, 07181 void *cancel_baton, 07182 apr_pool_t *scratch_pool); 07183 07184 07185 /** Similar to svn_wc_merge_props3, but takes an access baton and relative 07186 * path, no cancel_function, and no left and right version. 07187 * 07188 * This function has the @a base_merge parameter which (when TRUE) will 07189 * apply @a propchanges to this node's pristine set of properties. This 07190 * functionality is not supported since API version 1.7 and will give an 07191 * error if requested (unless @a dry_run is TRUE). For details see 07192 * 'notes/api-errata/1.7/wc006.txt'. 07193 * 07194 * Uses a svn_wc_conflict_resolver_func_t conflict resolver instead of a 07195 * svn_wc_conflict_resolver_func2_t. 07196 * 07197 * For compatibility reasons this function returns 07198 * #SVN_ERR_UNVERSIONED_RESOURCE, when svn_wc_merge_props3 would return either 07199 * #SVN_ERR_WC_PATH_NOT_FOUND or #SVN_ERR_WC_PATH_UNEXPECTED_STATUS. 07200 * 07201 * @since New in 1.5. The base_merge option is not supported since 1.7. 07202 * @deprecated Provided for backward compatibility with the 1.6 API. 07203 */ 07204 SVN_DEPRECATED 07205 svn_error_t * 07206 svn_wc_merge_props2(svn_wc_notify_state_t *state, 07207 const char *path, 07208 svn_wc_adm_access_t *adm_access, 07209 apr_hash_t *baseprops, 07210 const apr_array_header_t *propchanges, 07211 svn_boolean_t base_merge, 07212 svn_boolean_t dry_run, 07213 svn_wc_conflict_resolver_func_t conflict_func, 07214 void *conflict_baton, 07215 apr_pool_t *pool); 07216 07217 07218 /** 07219 * Same as svn_wc_merge_props2(), but with a @a conflict_func (and 07220 * baton) of NULL. 07221 * 07222 * @since New in 1.3. The base_merge option is not supported since 1.7. 07223 * @deprecated Provided for backward compatibility with the 1.4 API. 07224 */ 07225 SVN_DEPRECATED 07226 svn_error_t * 07227 svn_wc_merge_props(svn_wc_notify_state_t *state, 07228 const char *path, 07229 svn_wc_adm_access_t *adm_access, 07230 apr_hash_t *baseprops, 07231 const apr_array_header_t *propchanges, 07232 svn_boolean_t base_merge, 07233 svn_boolean_t dry_run, 07234 apr_pool_t *pool); 07235 07236 07237 /** 07238 * Similar to svn_wc_merge_props(), but no baseprops are given. 07239 * Instead, it's assumed that the incoming propchanges are based 07240 * against the working copy's own baseprops. While this assumption is 07241 * correct for 'svn update', it's incorrect for 'svn merge', and can 07242 * cause flawed behavior. (See issue #2035.) 07243 * 07244 * @since The base_merge option is not supported since 1.7. 07245 * @deprecated Provided for backward compatibility with the 1.2 API. 07246 * Replaced by svn_wc_merge_props(). 07247 */ 07248 SVN_DEPRECATED 07249 svn_error_t * 07250 svn_wc_merge_prop_diffs(svn_wc_notify_state_t *state, 07251 const char *path, 07252 svn_wc_adm_access_t *adm_access, 07253 const apr_array_header_t *propchanges, 07254 svn_boolean_t base_merge, 07255 svn_boolean_t dry_run, 07256 apr_pool_t *pool); 07257 07258 /** @} */ 07259 07260 07261 /** Given a @a path to a wc file, return in @a *contents a readonly stream to 07262 * the pristine contents of the file that would serve as base content for the 07263 * next commit. That means: 07264 * 07265 * When there is no change in node history scheduled, i.e. when there are only 07266 * local text-mods, prop-mods or a delete, return the last checked-out or 07267 * updated-/switched-to contents of the file. 07268 * 07269 * If the file is simply added or replaced (no copy-/move-here involved), 07270 * set @a *contents to @c NULL. 07271 * 07272 * When the file has been locally copied-/moved-here, return the contents of 07273 * the copy/move source (even if the copy-/move-here replaces a locally 07274 * deleted file). 07275 * 07276 * If @a local_abspath refers to an unversioned or non-existent path, return 07277 * @c SVN_ERR_WC_PATH_NOT_FOUND. Use @a wc_ctx to access the working copy. 07278 * @a contents may not be @c NULL (unlike @a *contents). 07279 * 07280 * @since New in 1.7. */ 07281 svn_error_t * 07282 svn_wc_get_pristine_contents2(svn_stream_t **contents, 07283 svn_wc_context_t *wc_ctx, 07284 const char *local_abspath, 07285 apr_pool_t *result_pool, 07286 apr_pool_t *scratch_pool); 07287 07288 /** Similar to svn_wc_get_pristine_contents2, but takes no working copy 07289 * context and a path that can be relative 07290 * 07291 * @since New in 1.6. 07292 * @deprecated Provided for backward compatibility with the 1.6 API. 07293 */ 07294 SVN_DEPRECATED 07295 svn_error_t * 07296 svn_wc_get_pristine_contents(svn_stream_t **contents, 07297 const char *path, 07298 apr_pool_t *result_pool, 07299 apr_pool_t *scratch_pool); 07300 07301 07302 /** Set @a *pristine_path to the path of the "normal" pristine text file for 07303 * the versioned file @a path. 07304 * 07305 * If @a path does not have a pristine text, set @a *pristine_path to a path where 07306 * nothing exists on disk (in a directory that does exist). 07307 * 07308 * @note: Before version 1.7, the behaviour in that case was to provide the 07309 * path where the pristine text *would be* if it were present. The new 07310 * behaviour is intended to provide backward compatibility for callers that 07311 * open or test the provided path immediately, and not for callers that 07312 * store the path for later use. 07313 * 07314 * @deprecated Provided for backwards compatibility with the 1.5 API. 07315 * Callers should use svn_wc_get_pristine_contents() instead. 07316 */ 07317 SVN_DEPRECATED 07318 svn_error_t * 07319 svn_wc_get_pristine_copy_path(const char *path, 07320 const char **pristine_path, 07321 apr_pool_t *pool); 07322 07323 07324 /** 07325 * Recurse from @a local_abspath, cleaning up unfinished tasks. Perform 07326 * any temporary allocations in @a scratch_pool. If @a break_locks is TRUE 07327 * Any working copy locks under @a local_abspath will be taken over and then 07328 * cleared by this function. 07329 * WARNING: If @a break_locks is TRUE there is no mechanism that will protect 07330 * locks that are still being used. 07331 * 07332 * If @a fix_recorded_timestamps is TRUE the recorded timestamps of unmodified 07333 * files will be updated, which will improve performance of future is-modified 07334 * checks. 07335 * 07336 * If @a clear_dav_cache is @c TRUE, the caching of DAV information for older 07337 * mod_dav served repositories is cleared. This clearing invalidates some 07338 * cached information used for pre-HTTPv2 repositories. 07339 * 07340 * If @a vacuum_pristines is TRUE, try to remove unreferenced pristines from 07341 * the working copy. (Will not remove anything unless the obtained lock applies 07342 * to the entire working copy) 07343 * 07344 * If @a cancel_func is non-NULL, invoke it with @a cancel_baton at various 07345 * points during the operation. If it returns an error (typically 07346 * #SVN_ERR_CANCELLED), return that error immediately. 07347 * 07348 * If @a notify_func is non-NULL, invoke it with @a notify_baton to report 07349 * the progress of the operation. 07350 * 07351 * @note In 1.9, @a notify_func does not get called at all. This may change 07352 * in later releases. 07353 * 07354 * @since New in 1.9. 07355 */ 07356 svn_error_t * 07357 svn_wc_cleanup4(svn_wc_context_t *wc_ctx, 07358 const char *local_abspath, 07359 svn_boolean_t break_locks, 07360 svn_boolean_t fix_recorded_timestamps, 07361 svn_boolean_t clear_dav_cache, 07362 svn_boolean_t vacuum_pristines, 07363 svn_cancel_func_t cancel_func, 07364 void *cancel_baton, 07365 svn_wc_notify_func2_t notify_func, 07366 void *notify_baton, 07367 apr_pool_t *scratch_pool); 07368 07369 /** 07370 * Similar to svn_wc_cleanup4() but will always break locks, fix recorded 07371 * timestamps, clear the dav cache and vacuum pristines. This function also 07372 * doesn't support notifications. 07373 * 07374 * @since New in 1.7. 07375 * @deprecated Provided for backward compatibility with the 1.8 API. 07376 */ 07377 SVN_DEPRECATED 07378 svn_error_t * 07379 svn_wc_cleanup3(svn_wc_context_t *wc_ctx, 07380 const char *local_abspath, 07381 svn_cancel_func_t cancel_func, 07382 void *cancel_baton, 07383 apr_pool_t *scratch_pool); 07384 07385 /** 07386 * Similar to svn_wc_cleanup3() but uses relative paths and creates its own 07387 * #svn_wc_context_t. 07388 * 07389 * @since New in 1.2. 07390 * @deprecated Provided for backward compatibility with the 1.6 API. 07391 */ 07392 SVN_DEPRECATED 07393 svn_error_t * 07394 svn_wc_cleanup2(const char *path, 07395 const char *diff3_cmd, 07396 svn_cancel_func_t cancel_func, 07397 void *cancel_baton, 07398 apr_pool_t *pool); 07399 07400 /** 07401 * Similar to svn_wc_cleanup2(). @a optional_adm_access is an historic 07402 * relic and not used, it may be NULL. 07403 * 07404 * @deprecated Provided for backward compatibility with the 1.1 API. 07405 */ 07406 SVN_DEPRECATED 07407 svn_error_t * 07408 svn_wc_cleanup(const char *path, 07409 svn_wc_adm_access_t *optional_adm_access, 07410 const char *diff3_cmd, 07411 svn_cancel_func_t cancel_func, 07412 void *cancel_baton, 07413 apr_pool_t *pool); 07414 07415 /** Callback for retrieving a repository root for a url from upgrade. 07416 * 07417 * Called by svn_wc_upgrade() when no repository root and/or repository 07418 * uuid are recorded in the working copy. For normal Subversion 1.5 and 07419 * later working copies, this callback will not be used. 07420 * 07421 * @since New in 1.7. 07422 */ 07423 typedef svn_error_t * (*svn_wc_upgrade_get_repos_info_t)( 07424 const char **repos_root, 07425 const char **repos_uuid, 07426 void *baton, 07427 const char *url, 07428 apr_pool_t *result_pool, 07429 apr_pool_t *scratch_pool); 07430 07431 07432 /** 07433 * Upgrade the working copy at @a local_abspath to the latest metadata 07434 * storage format. @a local_abspath should be an absolute path to the 07435 * root of the working copy. 07436 * 07437 * If @a cancel_func is non-NULL, invoke it with @a cancel_baton at 07438 * various points during the operation. If it returns an error 07439 * (typically #SVN_ERR_CANCELLED), return that error immediately. 07440 * 07441 * For each directory converted, @a notify_func will be called with 07442 * in @a notify_baton action #svn_wc_notify_upgraded_path and as path 07443 * the path of the upgraded directory. @a notify_func may be @c NULL 07444 * if this notification is not needed. 07445 * 07446 * If the old working copy doesn't contain a repository root and/or 07447 * repository uuid, @a repos_info_func (if non-NULL) will be called 07448 * with @a repos_info_baton to provide the missing information. 07449 * 07450 * @since New in 1.7. 07451 */ 07452 svn_error_t * 07453 svn_wc_upgrade(svn_wc_context_t *wc_ctx, 07454 const char *local_abspath, 07455 svn_wc_upgrade_get_repos_info_t repos_info_func, 07456 void *repos_info_baton, 07457 svn_cancel_func_t cancel_func, 07458 void *cancel_baton, 07459 svn_wc_notify_func2_t notify_func, 07460 void *notify_baton, 07461 apr_pool_t *scratch_pool); 07462 07463 07464 /** Relocation validation callback typedef. 07465 * 07466 * Called for each relocated file/directory. @a uuid, if non-NULL, contains 07467 * the expected repository UUID, @a url contains the tentative URL. 07468 * 07469 * @a baton is a closure object; it should be provided by the 07470 * implementation, and passed by the caller. 07471 * 07472 * If @a root_url is passed, then the implementation should make sure that 07473 * @a url is the repository root. 07474 * @a pool may be used for temporary allocations. 07475 * 07476 * @since New in 1.5. 07477 */ 07478 typedef svn_error_t *(*svn_wc_relocation_validator3_t)(void *baton, 07479 const char *uuid, 07480 const char *url, 07481 const char *root_url, 07482 apr_pool_t *pool); 07483 07484 /** Similar to #svn_wc_relocation_validator3_t, but with 07485 * the @a root argument. 07486 * 07487 * If @a root is TRUE, then the implementation should make sure that @a url 07488 * is the repository root. Else, it can be a URL inside the repository. 07489 * 07490 * @deprecated Provided for backwards compatibility with the 1.4 API. 07491 */ 07492 typedef svn_error_t *(*svn_wc_relocation_validator2_t)(void *baton, 07493 const char *uuid, 07494 const char *url, 07495 svn_boolean_t root, 07496 apr_pool_t *pool); 07497 07498 /** Similar to #svn_wc_relocation_validator2_t, but without 07499 * the @a root and @a pool arguments. @a uuid will not be NULL in this version 07500 * of the function. 07501 * 07502 * @deprecated Provided for backwards compatibility with the 1.3 API. 07503 */ 07504 typedef svn_error_t *(*svn_wc_relocation_validator_t)(void *baton, 07505 const char *uuid, 07506 const char *url); 07507 07508 /** Recursively change repository references at @a wcroot_abspath 07509 * (which is the root directory of a working copy). The pre-change 07510 * URL should begin with @a from, and the post-change URL will begin 07511 * with @a to. @a validator (and its baton, @a validator_baton), will 07512 * be called for the newly generated base URL and calculated repo 07513 * root. 07514 * 07515 * @a wc_ctx is an working copy context. 07516 * 07517 * @a scratch_pool will be used for temporary allocations. 07518 * 07519 * @since New in 1.7. 07520 */ 07521 svn_error_t * 07522 svn_wc_relocate4(svn_wc_context_t *wc_ctx, 07523 const char *wcroot_abspath, 07524 const char *from, 07525 const char *to, 07526 svn_wc_relocation_validator3_t validator, 07527 void *validator_baton, 07528 apr_pool_t *scratch_pool); 07529 07530 /** Similar to svn_wc_relocate4(), but with a #svn_wc_adm_access_t / 07531 * relative path parameter pair. 07532 * 07533 * @note As of the 1.7 API, @a path is required to be a working copy 07534 * root directory, and @a recurse is required to be TRUE. 07535 * 07536 * @since New in 1.5. 07537 * @deprecated Provided for limited backwards compatibility with the 07538 * 1.6 API. 07539 */ 07540 SVN_DEPRECATED 07541 svn_error_t * 07542 svn_wc_relocate3(const char *path, 07543 svn_wc_adm_access_t *adm_access, 07544 const char *from, 07545 const char *to, 07546 svn_boolean_t recurse, 07547 svn_wc_relocation_validator3_t validator, 07548 void *validator_baton, 07549 apr_pool_t *pool); 07550 07551 /** Similar to svn_wc_relocate3(), but uses #svn_wc_relocation_validator2_t. 07552 * 07553 * @since New in 1.4. 07554 * @deprecated Provided for backwards compatibility with the 1.4 API. */ 07555 SVN_DEPRECATED 07556 svn_error_t * 07557 svn_wc_relocate2(const char *path, 07558 svn_wc_adm_access_t *adm_access, 07559 const char *from, 07560 const char *to, 07561 svn_boolean_t recurse, 07562 svn_wc_relocation_validator2_t validator, 07563 void *validator_baton, 07564 apr_pool_t *pool); 07565 07566 /** Similar to svn_wc_relocate2(), but uses #svn_wc_relocation_validator_t. 07567 * 07568 * @deprecated Provided for backwards compatibility with the 1.3 API. */ 07569 SVN_DEPRECATED 07570 svn_error_t * 07571 svn_wc_relocate(const char *path, 07572 svn_wc_adm_access_t *adm_access, 07573 const char *from, 07574 const char *to, 07575 svn_boolean_t recurse, 07576 svn_wc_relocation_validator_t validator, 07577 void *validator_baton, 07578 apr_pool_t *pool); 07579 07580 07581 /** 07582 * Revert changes to @a local_abspath. Perform necessary allocations in 07583 * @a scratch_pool. 07584 * 07585 * @a wc_ctx contains the necessary locks required for performing the 07586 * operation. 07587 * 07588 * If @a depth is #svn_depth_empty, revert just @a path (if a 07589 * directory, then revert just the properties on that directory). 07590 * Else if #svn_depth_files, revert @a path and any files 07591 * directly under @a path if it is directory. Else if 07592 * #svn_depth_immediates, revert all of the preceding plus 07593 * properties on immediate subdirectories; else if #svn_depth_infinity, 07594 * revert path and everything under it fully recursively. 07595 * 07596 * @a changelist_filter is an array of <tt>const char *</tt> changelist 07597 * names, used as a restrictive filter on items reverted; that is, 07598 * don't revert any item unless it's a member of one of those 07599 * changelists. If @a changelist_filter is empty (or altogether @c NULL), 07600 * no changelist filtering occurs. 07601 * 07602 * If @a clear_changelists is TRUE, then changelist information for the 07603 * paths is cleared. 07604 * 07605 * If @a metadata_only is TRUE, the working copy files are untouched, but 07606 * if there are conflict marker files attached to these files these 07607 * markers are removed. 07608 * 07609 * If @a cancel_func is non-NULL, call it with @a cancel_baton at 07610 * various points during the reversion process. If it returns an 07611 * error (typically #SVN_ERR_CANCELLED), return that error 07612 * immediately. 07613 * 07614 * If @a use_commit_times is TRUE, then all reverted working-files 07615 * will have their timestamp set to the last-committed-time. If 07616 * FALSE, the reverted working-files will be touched with the 'now' time. 07617 * 07618 * For each item reverted, @a notify_func will be called with @a notify_baton 07619 * and the path of the reverted item. @a notify_func may be @c NULL if this 07620 * notification is not needed. 07621 * 07622 * If @a path is not under version control, return the error 07623 * #SVN_ERR_UNVERSIONED_RESOURCE. 07624 * 07625 * @since New in 1.9. 07626 */ 07627 svn_error_t * 07628 svn_wc_revert5(svn_wc_context_t *wc_ctx, 07629 const char *local_abspath, 07630 svn_depth_t depth, 07631 svn_boolean_t use_commit_times, 07632 const apr_array_header_t *changelist_filter, 07633 svn_boolean_t clear_changelists, 07634 svn_boolean_t metadata_only, 07635 svn_cancel_func_t cancel_func, 07636 void *cancel_baton, 07637 svn_wc_notify_func2_t notify_func, 07638 void *notify_baton, 07639 apr_pool_t *scratch_pool); 07640 07641 /** Similar to svn_wc_revert5() but with @a clear_changelists always set to 07642 * FALSE and @a metadata_only set to FALSE. 07643 * 07644 * @since New in 1.7. 07645 * @deprecated Provided for backward compatibility with the 1.8 API. 07646 */ 07647 SVN_DEPRECATED 07648 svn_error_t * 07649 svn_wc_revert4(svn_wc_context_t *wc_ctx, 07650 const char *local_abspath, 07651 svn_depth_t depth, 07652 svn_boolean_t use_commit_times, 07653 const apr_array_header_t *changelist_filter, 07654 svn_cancel_func_t cancel_func, 07655 void *cancel_baton, 07656 svn_wc_notify_func2_t notify_func, 07657 void *notify_baton, 07658 apr_pool_t *scratch_pool); 07659 07660 /** Similar to svn_wc_revert4() but takes a relative path and access baton. 07661 * 07662 * @since New in 1.5. 07663 * @deprecated Provided for backward compatibility with the 1.6 API. 07664 */ 07665 SVN_DEPRECATED 07666 svn_error_t * 07667 svn_wc_revert3(const char *path, 07668 svn_wc_adm_access_t *parent_access, 07669 svn_depth_t depth, 07670 svn_boolean_t use_commit_times, 07671 const apr_array_header_t *changelist_filter, 07672 svn_cancel_func_t cancel_func, 07673 void *cancel_baton, 07674 svn_wc_notify_func2_t notify_func, 07675 void *notify_baton, 07676 apr_pool_t *pool); 07677 07678 /** 07679 * Similar to svn_wc_revert3(), but with @a changelist_filter passed as @c 07680 * NULL, and @a depth set according to @a recursive: if @a recursive 07681 * is TRUE, @a depth is #svn_depth_infinity; if FALSE, @a depth is 07682 * #svn_depth_empty. 07683 * 07684 * @note Most APIs map @a recurse==FALSE to @a depth==svn_depth_files; 07685 * revert is deliberately different. 07686 * 07687 * @since New in 1.2. 07688 * @deprecated Provided for backward compatibility with the 1.4 API. 07689 */ 07690 SVN_DEPRECATED 07691 svn_error_t * 07692 svn_wc_revert2(const char *path, 07693 svn_wc_adm_access_t *parent_access, 07694 svn_boolean_t recursive, 07695 svn_boolean_t use_commit_times, 07696 svn_cancel_func_t cancel_func, 07697 void *cancel_baton, 07698 svn_wc_notify_func2_t notify_func, 07699 void *notify_baton, 07700 apr_pool_t *pool); 07701 07702 /** 07703 * Similar to svn_wc_revert2(), but takes an #svn_wc_notify_func_t instead. 07704 * 07705 * @deprecated Provided for backward compatibility with the 1.1 API. 07706 */ 07707 SVN_DEPRECATED 07708 svn_error_t * 07709 svn_wc_revert(const char *path, 07710 svn_wc_adm_access_t *parent_access, 07711 svn_boolean_t recursive, 07712 svn_boolean_t use_commit_times, 07713 svn_cancel_func_t cancel_func, 07714 void *cancel_baton, 07715 svn_wc_notify_func_t notify_func, 07716 void *notify_baton, 07717 apr_pool_t *pool); 07718 07719 /** 07720 * Restores a missing node, @a local_abspath using the @a wc_ctx. Records 07721 * the new last modified time of the file for status processing. 07722 * 07723 * If @a use_commit_times is TRUE, then set restored files' timestamps 07724 * to their last-commit-times. 07725 * 07726 * Returns SVN_ERROR_WC_PATH_NOT_FOUND if LOCAL_ABSPATH is not versioned and 07727 * SVN_ERROR_WC_PATH_UNEXPECTED_STATUS if LOCAL_ABSPATH is in a status where 07728 * it can't be restored. 07729 * 07730 * @since New in 1.7. 07731 */ 07732 svn_error_t * 07733 svn_wc_restore(svn_wc_context_t *wc_ctx, 07734 const char *local_abspath, 07735 svn_boolean_t use_commit_times, 07736 apr_pool_t *scratch_pool); 07737 07738 07739 /* Tmp files */ 07740 07741 /** Create a unique temporary file in administrative tmp/ area of 07742 * directory @a path. Return a handle in @a *fp and the path 07743 * in @a *new_name. Either @a fp or @a new_name can be NULL. 07744 * 07745 * The flags will be <tt>APR_WRITE | APR_CREATE | APR_EXCL</tt> and 07746 * optionally @c APR_DELONCLOSE (if the @a delete_when argument is 07747 * set to #svn_io_file_del_on_close). 07748 * 07749 * This means that as soon as @a fp is closed, the tmp file will vanish. 07750 * 07751 * @since New in 1.4 07752 * @deprecated For compatibility with 1.6 API 07753 */ 07754 SVN_DEPRECATED 07755 svn_error_t * 07756 svn_wc_create_tmp_file2(apr_file_t **fp, 07757 const char **new_name, 07758 const char *path, 07759 svn_io_file_del_t delete_when, 07760 apr_pool_t *pool); 07761 07762 07763 /** Same as svn_wc_create_tmp_file2(), but with @a new_name set to @c NULL, 07764 * and without the ability to delete the file on pool cleanup. 07765 * 07766 * @deprecated For compatibility with 1.3 API 07767 */ 07768 SVN_DEPRECATED 07769 svn_error_t * 07770 svn_wc_create_tmp_file(apr_file_t **fp, 07771 const char *path, 07772 svn_boolean_t delete_on_close, 07773 apr_pool_t *pool); 07774 07775 07776 /** 07777 * @defgroup svn_wc_translate EOL conversion and keyword expansion 07778 * @{ 07779 */ 07780 07781 07782 /** Set @a xlated_path to a translated copy of @a src 07783 * or to @a src itself if no translation is necessary. 07784 * That is, if @a versioned_file's properties indicate newline conversion or 07785 * keyword expansion, point @a *xlated_path to a copy of @a src 07786 * whose newlines and keywords are converted using the translation 07787 * as requested by @a flags. 07788 * 07789 * If @a cancel_func is non-NULL, call it with @a cancel_baton to determine 07790 * if the client has canceled the operation. 07791 * 07792 * When translating to the normal form, inconsistent eol styles will be 07793 * repaired when appropriate for the given setting. When translating 07794 * from normal form, no EOL repair is performed (consistency is assumed). 07795 * This behaviour can be overridden by specifying 07796 * #SVN_WC_TRANSLATE_FORCE_EOL_REPAIR. 07797 * 07798 * The caller can explicitly request a new file to be returned by setting the 07799 * #SVN_WC_TRANSLATE_FORCE_COPY flag in @a flags. 07800 * 07801 * This function is generally used to get a file that can be compared 07802 * meaningfully against @a versioned_file's text base, if 07803 * @c SVN_WC_TRANSLATE_TO_NF is specified, against @a versioned_file itself 07804 * if @c SVN_WC_TRANSLATE_FROM_NF is specified. 07805 * 07806 * If a new output file is created, it is created in the temp file area 07807 * belonging to @a versioned_file. By default it will be deleted at pool 07808 * cleanup. If @c SVN_WC_TRANSLATE_NO_OUTPUT_CLEANUP is specified, the 07809 * default pool cleanup handler to remove @a *xlated_path is not registered. 07810 * If the input file is returned as the output, its lifetime is not 07811 * specified. 07812 * 07813 * If an error is returned, the effect on @a *xlated_path is undefined. 07814 * 07815 * @since New in 1.4 07816 * @deprecated Provided for compatibility with the 1.6 API 07817 */ 07818 SVN_DEPRECATED 07819 svn_error_t * 07820 svn_wc_translated_file2(const char **xlated_path, 07821 const char *src, 07822 const char *versioned_file, 07823 svn_wc_adm_access_t *adm_access, 07824 apr_uint32_t flags, 07825 apr_pool_t *pool); 07826 07827 07828 /** Same as svn_wc_translated_file2, but will never clean up 07829 * temporary files. 07830 * 07831 * @deprecated Provided for compatibility with the 1.3 API 07832 */ 07833 SVN_DEPRECATED 07834 svn_error_t * 07835 svn_wc_translated_file(const char **xlated_p, 07836 const char *vfile, 07837 svn_wc_adm_access_t *adm_access, 07838 svn_boolean_t force_repair, 07839 apr_pool_t *pool); 07840 07841 07842 /** Returns a @a stream allocated in @a pool with access to the given 07843 * @a path taking the file properties from @a versioned_file using 07844 * @a adm_access. 07845 * 07846 * If @a flags includes #SVN_WC_TRANSLATE_FROM_NF, the stream will 07847 * translate from Normal Form to working copy form while writing to 07848 * @a path; stream read operations are not supported. 07849 * Conversely, if @a flags includes #SVN_WC_TRANSLATE_TO_NF, the stream will 07850 * translate from working copy form to Normal Form while reading from 07851 * @a path; stream write operations are not supported. 07852 * 07853 * The @a flags are the same constants as those used for 07854 * svn_wc_translated_file2(). 07855 * 07856 * @since New in 1.5. 07857 * @deprecated Provided for compatibility with the 1.6 API. 07858 */ 07859 SVN_DEPRECATED 07860 svn_error_t * 07861 svn_wc_translated_stream(svn_stream_t **stream, 07862 const char *path, 07863 const char *versioned_file, 07864 svn_wc_adm_access_t *adm_access, 07865 apr_uint32_t flags, 07866 apr_pool_t *pool); 07867 07868 /** @} */ 07869 07870 07871 /** 07872 * @defgroup svn_wc_deltas Text/Prop Deltas Using an Editor 07873 * @{ 07874 */ 07875 07876 /** Send the local modifications for versioned file @a local_abspath (with 07877 * matching @a file_baton) through @a editor, then close @a file_baton 07878 * afterwards. Use @a scratch_pool for any temporary allocation. 07879 * 07880 * If @a new_text_base_md5_checksum is non-NULL, set 07881 * @a *new_text_base_md5_checksum to the MD5 checksum of (@a local_abspath 07882 * translated to repository-normal form), allocated in @a result_pool. 07883 * 07884 * If @a new_text_base_sha1_checksum in non-NULL, store a copy of (@a 07885 * local_abspath translated to repository-normal form) in the pristine text 07886 * store, and set @a *new_text_base_sha1_checksum to its SHA-1 checksum. 07887 * 07888 * If @a fulltext, send the untranslated copy of @a local_abspath through 07889 * @a editor as full-text; else send it as svndiff against the current text 07890 * base. 07891 * 07892 * If sending a diff, and the recorded checksum for @a local_abspath's 07893 * text-base does not match the current actual checksum, then remove the tmp 07894 * copy (and set @a *tempfile to NULL if appropriate), and return the 07895 * error #SVN_ERR_WC_CORRUPT_TEXT_BASE. 07896 * 07897 * @note This is intended for use with both infix and postfix 07898 * text-delta styled editor drivers. 07899 * 07900 * @since New in 1.7. 07901 */ 07902 svn_error_t * 07903 svn_wc_transmit_text_deltas3(const svn_checksum_t **new_text_base_md5_checksum, 07904 const svn_checksum_t **new_text_base_sha1_checksum, 07905 svn_wc_context_t *wc_ctx, 07906 const char *local_abspath, 07907 svn_boolean_t fulltext, 07908 const svn_delta_editor_t *editor, 07909 void *file_baton, 07910 apr_pool_t *result_pool, 07911 apr_pool_t *scratch_pool); 07912 07913 /** Similar to svn_wc_transmit_text_deltas3(), but with a relative path 07914 * and adm_access baton, and the checksum output is an MD5 digest instead of 07915 * two svn_checksum_t objects. 07916 * 07917 * If @a tempfile is non-NULL, make a copy of @a path with keywords 07918 * and eol translated to repository-normal form, and set @a *tempfile to the 07919 * absolute path to this copy, allocated in @a result_pool. The copy will 07920 * be in the temporary-text-base directory. Do not clean up the copy; 07921 * caller can do that. (The purpose of handing back the tmp copy is that it 07922 * is usually about to become the new text base anyway, but the installation 07923 * of the new text base is outside the scope of this function.) 07924 * 07925 * @since New in 1.4. 07926 * @deprecated Provided for backwards compatibility with the 1.6 API. 07927 */ 07928 SVN_DEPRECATED 07929 svn_error_t * 07930 svn_wc_transmit_text_deltas2(const char **tempfile, 07931 unsigned char digest[], 07932 const char *path, 07933 svn_wc_adm_access_t *adm_access, 07934 svn_boolean_t fulltext, 07935 const svn_delta_editor_t *editor, 07936 void *file_baton, 07937 apr_pool_t *pool); 07938 07939 /** Similar to svn_wc_transmit_text_deltas2(), but with @a digest set to NULL. 07940 * 07941 * @deprecated Provided for backwards compatibility with the 1.3 API. 07942 */ 07943 SVN_DEPRECATED 07944 svn_error_t * 07945 svn_wc_transmit_text_deltas(const char *path, 07946 svn_wc_adm_access_t *adm_access, 07947 svn_boolean_t fulltext, 07948 const svn_delta_editor_t *editor, 07949 void *file_baton, 07950 const char **tempfile, 07951 apr_pool_t *pool); 07952 07953 07954 /** Given a @a local_abspath, transmit all local property 07955 * modifications using the appropriate @a editor method (in conjunction 07956 * with @a baton). Use @a scratch_pool for any temporary allocation. 07957 * 07958 * @since New in 1.7. 07959 */ 07960 svn_error_t * 07961 svn_wc_transmit_prop_deltas2(svn_wc_context_t *wc_ctx, 07962 const char *local_abspath, 07963 const svn_delta_editor_t *editor, 07964 void *baton, 07965 apr_pool_t *scratch_pool); 07966 07967 07968 /** Similar to svn_wc_transmit_prop_deltas2(), but with a relative path, 07969 * adm_access baton and tempfile. 07970 * 07971 * If a temporary file remains after this function is finished, the 07972 * path to that file is returned in @a *tempfile (so the caller can 07973 * clean this up if it wishes to do so). 07974 * 07975 * @note Starting version 1.5, no tempfile will ever be returned 07976 * anymore. If @a *tempfile is passed, its value is set to @c NULL. 07977 * 07978 * @deprecated Provided for backwards compatibility with the 1.6 API. 07979 */ 07980 SVN_DEPRECATED 07981 svn_error_t * 07982 svn_wc_transmit_prop_deltas(const char *path, 07983 svn_wc_adm_access_t *adm_access, 07984 const svn_wc_entry_t *entry, 07985 const svn_delta_editor_t *editor, 07986 void *baton, 07987 const char **tempfile, 07988 apr_pool_t *pool); 07989 07990 /** @} */ 07991 07992 07993 /** 07994 * @defgroup svn_wc_ignore Ignoring unversioned files and directories 07995 * @{ 07996 */ 07997 07998 /** Get the run-time configured list of ignore patterns from the 07999 * #svn_config_t's in the @a config hash, and store them in @a *patterns. 08000 * Allocate @a *patterns and its contents in @a pool. 08001 */ 08002 svn_error_t * 08003 svn_wc_get_default_ignores(apr_array_header_t **patterns, 08004 apr_hash_t *config, 08005 apr_pool_t *pool); 08006 08007 /** Get the list of ignore patterns from the #svn_config_t's in the 08008 * @a config hash and the local ignore patterns from the directory 08009 * at @a local_abspath, using @a wc_ctx, and store them in @a *patterns. 08010 * Allocate @a *patterns and its contents in @a result_pool, use @a 08011 * scratch_pool for temporary allocations. 08012 * 08013 * @since New in 1.7. 08014 */ 08015 svn_error_t * 08016 svn_wc_get_ignores2(apr_array_header_t **patterns, 08017 svn_wc_context_t *wc_ctx, 08018 const char *local_abspath, 08019 apr_hash_t *config, 08020 apr_pool_t *result_pool, 08021 apr_pool_t *scratch_pool); 08022 08023 /** Similar to svn_wc_get_ignores2(), but with a #svn_wc_adm_access_t 08024 * parameter in place of #svn_wc_context_t and @c local_abspath parameters. 08025 * 08026 * @since New in 1.3. 08027 * @deprecated Provided for backwards compatibility with the 1.6 API. 08028 */ 08029 SVN_DEPRECATED 08030 svn_error_t * 08031 svn_wc_get_ignores(apr_array_header_t **patterns, 08032 apr_hash_t *config, 08033 svn_wc_adm_access_t *adm_access, 08034 apr_pool_t *pool); 08035 08036 /** Return TRUE iff @a str matches any of the elements of @a list, a 08037 * list of zero or more ignore patterns. 08038 * 08039 * @since New in 1.5. 08040 */ 08041 svn_boolean_t 08042 svn_wc_match_ignore_list(const char *str, 08043 const apr_array_header_t *list, 08044 apr_pool_t *pool); 08045 08046 /** @} */ 08047 08048 08049 /** 08050 * @defgroup svn_wc_repos_locks Repository locks 08051 * @{ 08052 */ 08053 08054 /** Add @a lock to the working copy for @a local_abspath. If @a 08055 * local_abspath is read-only, due to locking properties, make it writable. 08056 * Perform temporary allocations in @a scratch_pool. 08057 * 08058 * @since New in 1.7. 08059 */ 08060 svn_error_t * 08061 svn_wc_add_lock2(svn_wc_context_t *wc_ctx, 08062 const char *abspath, 08063 const svn_lock_t *lock, 08064 apr_pool_t *scratch_pool); 08065 08066 /** 08067 * Similar to svn_wc_add_lock2(), but with a #svn_wc_adm_access_t / 08068 * relative path parameter pair. 08069 * 08070 * @deprecated Provided for backward compatibility with the 1.6 API. 08071 * @since New in 1.2. 08072 */ 08073 SVN_DEPRECATED 08074 svn_error_t * 08075 svn_wc_add_lock(const char *path, 08076 const svn_lock_t *lock, 08077 svn_wc_adm_access_t *adm_access, 08078 apr_pool_t *pool); 08079 08080 /** Remove any lock from @a local_abspath. If @a local_abspath has a 08081 * lock and the locking so specifies, make the file read-only. Don't 08082 * return an error if @a local_abspath didn't have a lock. Perform temporary 08083 * allocations in @a scratch_pool. 08084 * 08085 * @since New in 1.7. 08086 */ 08087 svn_error_t * 08088 svn_wc_remove_lock2(svn_wc_context_t *wc_ctx, 08089 const char *local_abspath, 08090 apr_pool_t *scratch_pool); 08091 08092 /** 08093 * Similar to svn_wc_remove_lock2(), but with a #svn_wc_adm_access_t / 08094 * relative path parameter pair. 08095 * 08096 * @deprecated Provided for backward compatibility with the 1.6 API. 08097 * @since New in 1.2. 08098 */ 08099 SVN_DEPRECATED 08100 svn_error_t * 08101 svn_wc_remove_lock(const char *path, 08102 svn_wc_adm_access_t *adm_access, 08103 apr_pool_t *pool); 08104 08105 /** @} */ 08106 08107 08108 /** A structure to report a summary of a working copy, including the 08109 * mix of revisions found within it, whether any parts are switched or 08110 * locally modified, and whether it is a sparse checkout. 08111 * 08112 * @note Fields may be added to the end of this structure in future 08113 * versions. Therefore, to preserve binary compatibility, users 08114 * should not directly allocate structures of this type. 08115 * 08116 * @since New in 1.4 08117 */ 08118 typedef struct svn_wc_revision_status_t 08119 { 08120 svn_revnum_t min_rev; /**< Lowest revision found */ 08121 svn_revnum_t max_rev; /**< Highest revision found */ 08122 08123 svn_boolean_t switched; /**< Is anything switched? */ 08124 svn_boolean_t modified; /**< Is anything modified? */ 08125 08126 /** Whether any WC paths are at a depth other than #svn_depth_infinity or 08127 * are user excluded. 08128 * @since New in 1.5. 08129 */ 08130 svn_boolean_t sparse_checkout; 08131 } svn_wc_revision_status_t; 08132 08133 /** Set @a *result_p to point to a new #svn_wc_revision_status_t structure 08134 * containing a summary of the revision range and status of the working copy 08135 * at @a local_abspath (not including "externals"). @a local_abspath must 08136 * be absolute. Return SVN_ERR_WC_PATH_NOT_FOUND if @a local_abspath is not 08137 * a working copy path. 08138 * 08139 * Set @a (*result_p)->min_rev and @a (*result_p)->max_rev respectively to the 08140 * lowest and highest revision numbers in the working copy. If @a committed 08141 * is TRUE, summarize the last-changed revisions, else the base revisions. 08142 * 08143 * Set @a (*result_p)->switched to indicate whether any item in the WC is 08144 * switched relative to its parent. If @a trail_url is non-NULL, use it to 08145 * determine if @a local_abspath itself is switched. It should be any trailing 08146 * portion of @a local_abspath's expected URL, long enough to include any parts 08147 * that the caller considers might be changed by a switch. If it does not 08148 * match the end of @a local_abspath's actual URL, then report a "switched" 08149 * status. 08150 * 08151 * Set @a (*result_p)->modified to indicate whether any item is locally 08152 * modified. 08153 * 08154 * If @a cancel_func is non-NULL, call it with @a cancel_baton to determine 08155 * if the client has canceled the operation. 08156 * 08157 * Allocate *result_p in @a result_pool, use @a scratch_pool for temporary 08158 * allocations. 08159 * 08160 * @a wc_ctx should be a valid working copy context. 08161 * 08162 * @since New in 1.7 08163 */ 08164 svn_error_t * 08165 svn_wc_revision_status2(svn_wc_revision_status_t **result_p, 08166 svn_wc_context_t *wc_ctx, 08167 const char *local_abspath, 08168 const char *trail_url, 08169 svn_boolean_t committed, 08170 svn_cancel_func_t cancel_func, 08171 void *cancel_baton, 08172 apr_pool_t *result_pool, 08173 apr_pool_t *scratch_pool); 08174 08175 08176 /** Similar to svn_wc_revision_status2(), but with a (possibly) local 08177 * path and no wc_ctx parameter. 08178 * 08179 * @since New in 1.4. 08180 * @deprecated Provided for backward compatibility with the 1.6 API. 08181 */ 08182 SVN_DEPRECATED 08183 svn_error_t * 08184 svn_wc_revision_status(svn_wc_revision_status_t **result_p, 08185 const char *wc_path, 08186 const char *trail_url, 08187 svn_boolean_t committed, 08188 svn_cancel_func_t cancel_func, 08189 void *cancel_baton, 08190 apr_pool_t *pool); 08191 08192 08193 /** 08194 * Set @a local_abspath's 'changelist' attribute to @a changelist iff 08195 * @a changelist is not @c NULL; otherwise, remove any current 08196 * changelist assignment from @a local_abspath. @a changelist may not 08197 * be the empty string. Recurse to @a depth. 08198 * 08199 * @a changelist_filter is an array of <tt>const char *</tt> changelist 08200 * names, used as a restrictive filter on items whose changelist 08201 * assignments are adjusted; that is, don't tweak the changeset of any 08202 * item unless it's currently a member of one of those changelists. 08203 * If @a changelist_filter is empty (or altogether @c NULL), no changelist 08204 * filtering occurs. 08205 * 08206 * If @a cancel_func is not @c NULL, call it with @a cancel_baton to 08207 * determine if the client has canceled the operation. 08208 * 08209 * If @a notify_func is not @c NULL, call it with @a notify_baton to 08210 * report the change (using notification types 08211 * #svn_wc_notify_changelist_set and #svn_wc_notify_changelist_clear). 08212 * 08213 * Use @a scratch_pool for temporary allocations. 08214 * 08215 * @note For now, directories are NOT allowed to be associated with 08216 * changelists; there is confusion about whether they should behave 08217 * as depth-0 or depth-infinity objects. If @a local_abspath is a directory, 08218 * return an error. 08219 * 08220 * @note This metadata is purely a client-side "bookkeeping" 08221 * convenience, and is entirely managed by the working copy. 08222 * 08223 * @since New in 1.7. 08224 */ 08225 svn_error_t * 08226 svn_wc_set_changelist2(svn_wc_context_t *wc_ctx, 08227 const char *local_abspath, 08228 const char *changelist, 08229 svn_depth_t depth, 08230 const apr_array_header_t *changelist_filter, 08231 svn_cancel_func_t cancel_func, 08232 void *cancel_baton, 08233 svn_wc_notify_func2_t notify_func, 08234 void *notify_baton, 08235 apr_pool_t *scratch_pool); 08236 08237 /** Similar to svn_wc_set_changelist2(), but with an access baton and 08238 * relative path. 08239 * 08240 * @since New in 1.5. 08241 * @deprecated Provided for backward compatibility with the 1.6 API. 08242 */ 08243 SVN_DEPRECATED 08244 svn_error_t * 08245 svn_wc_set_changelist(const char *path, 08246 const char *changelist, 08247 svn_wc_adm_access_t *adm_access, 08248 svn_cancel_func_t cancel_func, 08249 void *cancel_baton, 08250 svn_wc_notify_func2_t notify_func, 08251 void *notify_baton, 08252 apr_pool_t *pool); 08253 08254 08255 08256 /** 08257 * The callback type used by svn_wc_get_changelists() and 08258 * svn_client_get_changelists(). 08259 * 08260 * On each invocation, @a path is a newly discovered member of the 08261 * changelist, and @a baton is a private function closure. 08262 * 08263 * @since New in 1.5. 08264 */ 08265 typedef svn_error_t *(*svn_changelist_receiver_t) (void *baton, 08266 const char *path, 08267 const char *changelist, 08268 apr_pool_t *pool); 08269 08270 08271 /** 08272 * Beginning at @a local_abspath, crawl to @a depth to discover every path in 08273 * or under @a local_abspath which belongs to one of the changelists in @a 08274 * changelist_filter (an array of <tt>const char *</tt> changelist names). 08275 * If @a changelist_filter is @c NULL, discover paths with any changelist. 08276 * Call @a callback_func (with @a callback_baton) each time a 08277 * changelist-having path is discovered. 08278 * 08279 * @a local_abspath is a local WC path. 08280 * 08281 * If @a cancel_func is not @c NULL, invoke it passing @a cancel_baton 08282 * during the recursive walk. 08283 * 08284 * @since New in 1.7. 08285 */ 08286 svn_error_t * 08287 svn_wc_get_changelists(svn_wc_context_t *wc_ctx, 08288 const char *local_abspath, 08289 svn_depth_t depth, 08290 const apr_array_header_t *changelist_filter, 08291 svn_changelist_receiver_t callback_func, 08292 void *callback_baton, 08293 svn_cancel_func_t cancel_func, 08294 void *cancel_baton, 08295 apr_pool_t *scratch_pool); 08296 08297 08298 /** Crop @a local_abspath according to @a depth. 08299 * 08300 * Remove any item that exceeds the boundary of @a depth (relative to 08301 * @a local_abspath) from revision control. Leave modified items behind 08302 * (unversioned), while removing unmodified ones completely. 08303 * 08304 * @a depth can be svn_depth_empty, svn_depth_files or svn_depth_immediates. 08305 * Excluding nodes is handled by svn_wc_exclude(). 08306 * 08307 * If @a local_abspath starts out with a shallower depth than @a depth, 08308 * do not upgrade it to @a depth (that would not be cropping); however, do 08309 * check children and crop them appropriately according to @a depth. 08310 * 08311 * Returns immediately with an #SVN_ERR_UNSUPPORTED_FEATURE error if @a 08312 * local_abspath is not a directory, or if @a depth is not restrictive 08313 * (e.g., #svn_depth_infinity). 08314 * 08315 * @a wc_ctx contains a tree lock, for the local path to the working copy 08316 * which will be used as the root of this operation. 08317 * 08318 * If @a cancel_func is not @c NULL, call it with @a cancel_baton at 08319 * various points to determine if the client has canceled the operation. 08320 * 08321 * If @a notify_func is not @c NULL, call it with @a notify_baton to 08322 * report changes as they are made. 08323 * 08324 * @since New in 1.7 08325 */ 08326 svn_error_t * 08327 svn_wc_crop_tree2(svn_wc_context_t *wc_ctx, 08328 const char *local_abspath, 08329 svn_depth_t depth, 08330 svn_cancel_func_t cancel_func, 08331 void *cancel_baton, 08332 svn_wc_notify_func2_t notify_func, 08333 void *notify_baton, 08334 apr_pool_t *scratch_pool); 08335 08336 /** Similar to svn_wc_crop_tree2(), but uses an access baton and target. 08337 * 08338 * svn_wc_crop_tree() also allows #svn_depth_exclude, which is now 08339 * handled via svn_wc_exclude() 08340 * 08341 * @a target is a basename in @a anchor or "" for @a anchor itself. 08342 * 08343 * @since New in 1.6 08344 * @deprecated Provided for backward compatibility with the 1.6 API. 08345 */ 08346 SVN_DEPRECATED 08347 svn_error_t * 08348 svn_wc_crop_tree(svn_wc_adm_access_t *anchor, 08349 const char *target, 08350 svn_depth_t depth, 08351 svn_wc_notify_func2_t notify_func, 08352 void *notify_baton, 08353 svn_cancel_func_t cancel_func, 08354 void *cancel_baton, 08355 apr_pool_t *pool); 08356 08357 /** Remove the local node for @a local_abspath from the working copy and 08358 * add an excluded node placeholder in its place. 08359 * 08360 * This feature is only supported for unmodified nodes. An 08361 * #SVN_ERR_UNSUPPORTED_FEATURE error is returned if the node can't be 08362 * excluded in its current state. 08363 * 08364 * @a wc_ctx contains a tree lock, for the local path to the working copy 08365 * which will be used as the root of this operation 08366 * 08367 * If @a notify_func is not @c NULL, call it with @a notify_baton to 08368 * report changes as they are made. 08369 * 08370 * If @a cancel_func is not @c NULL, call it with @a cancel_baton at 08371 * various points to determine if the client has canceled the operation. 08372 * 08373 * 08374 * @since New in 1.7 08375 */ 08376 svn_error_t * 08377 svn_wc_exclude(svn_wc_context_t *wc_ctx, 08378 const char *local_abspath, 08379 svn_cancel_func_t cancel_func, 08380 void *cancel_baton, 08381 svn_wc_notify_func2_t notify_func, 08382 void *notify_baton, 08383 apr_pool_t *scratch_pool); 08384 08385 08386 /** @} */ 08387 08388 /** 08389 * Set @a kind to the #svn_node_kind_t of @a abspath. Use @a wc_ctx to access 08390 * the working copy, and @a scratch_pool for all temporary allocations. 08391 * 08392 * If @a abspath is not under version control, set @a kind to #svn_node_none. 08393 * 08394 * If @a show_hidden and @a show_deleted are both @c FALSE, the kind of 08395 * scheduled for delete, administrative only 'not present' and excluded 08396 * nodes is reported as #svn_node_none. This is recommended as a check 08397 * for 'is there a versioned file or directory here?' 08398 * 08399 * If @a show_deleted is FALSE, but @a show_hidden is @c TRUE then only 08400 * scheduled for delete and administrative only 'not present' nodes are 08401 * reported as #svn_node_none. This is recommended as check for 08402 * 'Can I add a node here?' 08403 * 08404 * If @a show_deleted is TRUE, but @a show_hidden is FALSE, then only 08405 * administrative only 'not present' nodes and excluded nodes are reported as 08406 * #svn_node_none. This behavior is the behavior bescribed as 'hidden' 08407 * before Subversion 1.7. 08408 * 08409 * If @a show_hidden and @a show_deleted are both @c TRUE all nodes are 08410 * reported. 08411 * 08412 * @since New in 1.8. 08413 */ 08414 svn_error_t * 08415 svn_wc_read_kind2(svn_node_kind_t *kind, 08416 svn_wc_context_t *wc_ctx, 08417 const char *local_abspath, 08418 svn_boolean_t show_deleted, 08419 svn_boolean_t show_hidden, 08420 apr_pool_t *scratch_pool); 08421 08422 /** Similar to svn_wc_read_kind2() but with @a show_deleted always 08423 * passed as TRUE. 08424 * 08425 * @since New in 1.7. 08426 * @deprecated Provided for backward compatibility with the 1.7 API. 08427 */ 08428 SVN_DEPRECATED 08429 svn_error_t * 08430 svn_wc_read_kind(svn_node_kind_t *kind, 08431 svn_wc_context_t *wc_ctx, 08432 const char *abspath, 08433 svn_boolean_t show_hidden, 08434 apr_pool_t *scratch_pool); 08435 08436 08437 /** @} */ 08438 08439 #ifdef __cplusplus 08440 } 08441 #endif /* __cplusplus */ 08442 08443 #endif /* SVN_WC_H */
1.6.1