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