Subversion 1.6.16
|
00001 /** 00002 * @copyright 00003 * ==================================================================== 00004 * Copyright (c) 2000-2008 CollabNet. All rights reserved. 00005 * 00006 * This software is licensed as described in the file COPYING, which 00007 * you should have received as part of this distribution. The terms 00008 * are also available at http://subversion.tigris.org/license-1.html. 00009 * If newer versions of this license are posted there, you may use a 00010 * newer version instead, at your option. 00011 * 00012 * This software consists of voluntary contributions made by many 00013 * individuals. For exact contribution history, see the revision 00014 * history and logs, available at http://subversion.tigris.org/. 00015 * ==================================================================== 00016 * @endcopyright 00017 * 00018 * @file svn_wc.h 00019 * @brief Subversion's working copy library 00020 * 00021 * Requires: 00022 * - A working copy 00023 * 00024 * Provides: 00025 * - Ability to manipulate working copy's versioned data. 00026 * - Ability to manipulate working copy's administrative files. 00027 * 00028 * Used By: 00029 * - Clients. 00030 * 00031 * Notes: 00032 * The 'path' parameters to most of these functions can be 00033 * absolute or relative (relative to current working 00034 * directory). If there are any cases where they are 00035 * relative to the path associated with the 00036 * 'svn_wc_adm_access_t *adm_access' baton passed along 00037 * with the path, those cases should be explicitly 00038 * documented, and if they are not, please fix it. 00039 */ 00040 00041 #ifndef SVN_WC_H 00042 #define SVN_WC_H 00043 00044 #include <apr.h> 00045 #include <apr_pools.h> 00046 #include <apr_tables.h> 00047 #include <apr_hash.h> 00048 #include <apr_time.h> 00049 #include <apr_file_io.h> 00050 00051 #include "svn_types.h" 00052 #include "svn_string.h" 00053 #include "svn_checksum.h" 00054 #include "svn_io.h" 00055 #include "svn_delta.h" /* for svn_stream_t */ 00056 #include "svn_opt.h" 00057 #include "svn_ra.h" /* for svn_ra_reporter_t type */ 00058 #include "svn_version.h" 00059 00060 #ifdef __cplusplus 00061 extern "C" { 00062 #endif /* __cplusplus */ 00063 00064 00065 /** 00066 * Get libsvn_wc version information. 00067 * 00068 * @since New in 1.1. 00069 */ 00070 const svn_version_t * 00071 svn_wc_version(void); 00072 00073 /** 00074 * @defgroup svn_wc Working copy management 00075 * @{ 00076 */ 00077 00078 /** Flags for use with svn_wc_translated_file2 00079 * 00080 * @defgroup translate_flags Translation flags 00081 * 00082 * @{ 00083 */ 00084 00085 /** Translate from Normal Form. 00086 * 00087 * The working copy text bases and repository files are stored 00088 * in normal form. Some files' contents - or ever representation - 00089 * differs between the working copy and the normal form. This flag 00090 * specifies to take the latter form as input and transform it 00091 * to the former. 00092 * 00093 * Either this flag or @c SVN_WC_TRANSLATE_TO_NF should be specified, 00094 * but not both. 00095 */ 00096 #define SVN_WC_TRANSLATE_FROM_NF 0x00000000 00097 00098 /** Translate to Normal Form. 00099 * 00100 * Either this flag or @c SVN_WC_TRANSLATE_FROM_NF should be specified, 00101 * but not both. 00102 */ 00103 #define SVN_WC_TRANSLATE_TO_NF 0x00000001 00104 00105 /** Force repair of eol styles, making sure the output file consistently 00106 * contains the one eol style as specified by the svn:eol-style 00107 * property and the required translation direction. 00108 * 00109 */ 00110 #define SVN_WC_TRANSLATE_FORCE_EOL_REPAIR 0x00000002 00111 00112 /** Don't register a pool cleanup to delete the output file */ 00113 #define SVN_WC_TRANSLATE_NO_OUTPUT_CLEANUP 0x00000004 00114 00115 /** Guarantee a new file is created on successful return. 00116 * The default shortcuts translation by returning the path 00117 * of the untranslated file when no translation is required. 00118 */ 00119 #define SVN_WC_TRANSLATE_FORCE_COPY 0x00000008 00120 00121 /** Use a non-wc-local tmp directory for creating output files, 00122 * instead of in the working copy admin tmp area which is the default. 00123 * 00124 * @since New in 1.4. 00125 */ 00126 #define SVN_WC_TRANSLATE_USE_GLOBAL_TMP 0x00000010 00127 00128 /** @} */ 00129 00130 00131 /* Locking/Opening/Closing */ 00132 00133 /** Baton for access to a working copy administrative area. 00134 * 00135 * One day all such access will require a baton, we're not there yet. 00136 * 00137 * Access batons can be grouped into sets, by passing an existing open 00138 * baton when opening a new baton. Given one baton in a set, other batons 00139 * may be retrieved. This allows an entire hierarchy to be locked, and 00140 * then the set of batons can be passed around by passing a single baton. 00141 */ 00142 typedef struct svn_wc_adm_access_t svn_wc_adm_access_t; 00143 00144 00145 /** 00146 * Return, in @a *adm_access, a pointer to a new access baton for the working 00147 * copy administrative area associated with the directory @a path. If 00148 * @a write_lock is TRUE the baton will include a write lock, otherwise the 00149 * baton can only be used for read access. If @a path refers to a directory 00150 * that is already write locked then the error @c SVN_ERR_WC_LOCKED will be 00151 * returned. The error @c SVN_ERR_WC_NOT_DIRECTORY will be returned if 00152 * @a path is not a versioned directory. 00153 * 00154 * If @a associated is an open access baton then @a adm_access will be added 00155 * to the set containing @a associated. @a associated can be @c NULL, in 00156 * which case @a adm_access is the start of a new set. 00157 * 00158 * @a levels_to_lock specifies how far to lock. Zero means just the specified 00159 * directory. Any negative value means to lock the entire working copy 00160 * directory hierarchy under @a path. A positive value indicates the number of 00161 * levels of directories to lock -- 1 means just immediate subdirectories, 2 00162 * means immediate subdirectories and their subdirectories, etc. All the 00163 * access batons will become part of the set containing @a adm_access. This 00164 * is an all-or-nothing option, if it is not possible to lock all the 00165 * requested directories then an error will be returned and @a adm_access will 00166 * be invalid, with the exception that subdirectories of @a path that are 00167 * missing from the physical filesystem will not be locked and will not cause 00168 * an error. The error @c SVN_ERR_WC_LOCKED will be returned if a 00169 * subdirectory of @a path is already write locked. 00170 * 00171 * If @a cancel_func is non-NULL, call it with @a cancel_baton to determine 00172 * if the client has cancelled the operation. 00173 * 00174 * @a pool will be used to allocate memory for the baton and any subsequently 00175 * cached items. If @a adm_access has not been closed when the pool is 00176 * cleared, it will be closed automatically at that point, and removed from 00177 * its set. A baton closed in this way will not remove physical locks from 00178 * the working copy if cleanup is required. 00179 * 00180 * The first baton in a set, with @a associated passed as @c NULL, must have 00181 * the longest lifetime of all the batons in the set. This implies it must be 00182 * the root of the hierarchy. 00183 * 00184 * @since New in 1.2. 00185 */ 00186 svn_error_t * 00187 svn_wc_adm_open3(svn_wc_adm_access_t **adm_access, 00188 svn_wc_adm_access_t *associated, 00189 const char *path, 00190 svn_boolean_t write_lock, 00191 int levels_to_lock, 00192 svn_cancel_func_t cancel_func, 00193 void *cancel_baton, 00194 apr_pool_t *pool); 00195 00196 /** 00197 * Similar to svn_wc_adm_open3(), but without cancellation support. 00198 * 00199 * @deprecated Provided for backward compatibility with the 1.1 API. 00200 */ 00201 SVN_DEPRECATED 00202 svn_error_t * 00203 svn_wc_adm_open2(svn_wc_adm_access_t **adm_access, 00204 svn_wc_adm_access_t *associated, 00205 const char *path, 00206 svn_boolean_t write_lock, 00207 int levels_to_lock, 00208 apr_pool_t *pool); 00209 00210 /** 00211 * Similar to svn_wc_adm_open2(), but with @a tree_lock instead of 00212 * @a levels_to_lock. @a levels_to_lock is set to -1 if @a tree_lock 00213 * is @c TRUE, else 0. 00214 * 00215 * @deprecated Provided for backward compatibility with the 1.0 API. 00216 */ 00217 SVN_DEPRECATED 00218 svn_error_t * 00219 svn_wc_adm_open(svn_wc_adm_access_t **adm_access, 00220 svn_wc_adm_access_t *associated, 00221 const char *path, 00222 svn_boolean_t write_lock, 00223 svn_boolean_t tree_lock, 00224 apr_pool_t *pool); 00225 00226 /** 00227 * Checks the working copy to determine the node type of @a path. If 00228 * @a path is a versioned directory then the behaviour is like that of 00229 * svn_wc_adm_open3(), otherwise, if @a path is a file or does not 00230 * exist, then the behaviour is like that of svn_wc_adm_open3() with 00231 * @a path replaced by the parent directory of @a path. If @a path is 00232 * an unversioned directory, the behaviour is also like that of 00233 * svn_wc_adm_open3() on the parent, except that if the open fails, 00234 * then the returned SVN_ERR_WC_NOT_DIRECTORY error refers to @a path, 00235 * not to @a path's parent. 00236 * 00237 * @since New in 1.2. 00238 */ 00239 svn_error_t * 00240 svn_wc_adm_probe_open3(svn_wc_adm_access_t **adm_access, 00241 svn_wc_adm_access_t *associated, 00242 const char *path, 00243 svn_boolean_t write_lock, 00244 int levels_to_lock, 00245 svn_cancel_func_t cancel_func, 00246 void *cancel_baton, 00247 apr_pool_t *pool); 00248 00249 /** 00250 * Similar to svn_wc_adm_probe_open3() without the cancel 00251 * functionality. 00252 * 00253 * @deprecated Provided for backward compatibility with the 1.1 API. 00254 */ 00255 SVN_DEPRECATED 00256 svn_error_t * 00257 svn_wc_adm_probe_open2(svn_wc_adm_access_t **adm_access, 00258 svn_wc_adm_access_t *associated, 00259 const char *path, 00260 svn_boolean_t write_lock, 00261 int levels_to_lock, 00262 apr_pool_t *pool); 00263 00264 /** 00265 * Similar to svn_wc_adm_probe_open2(), but with @a tree_lock instead of 00266 * @a levels_to_lock. @a levels_to_lock is set to -1 if @a tree_lock 00267 * is @c TRUE, else 0. 00268 * 00269 * @deprecated Provided for backward compatibility with the 1.0 API. 00270 */ 00271 SVN_DEPRECATED 00272 svn_error_t * 00273 svn_wc_adm_probe_open(svn_wc_adm_access_t **adm_access, 00274 svn_wc_adm_access_t *associated, 00275 const char *path, 00276 svn_boolean_t write_lock, 00277 svn_boolean_t tree_lock, 00278 apr_pool_t *pool); 00279 00280 /** 00281 * Open access batons for @a path and return in @a *anchor_access and 00282 * @a *target the anchor and target required to drive an editor. Return 00283 * in @a *target_access the access baton for the target, which may be the 00284 * same as @a *anchor_access (in which case @a *target is the empty 00285 * string, never NULL). All the access batons will be in the 00286 * @a *anchor_access set. 00287 * 00288 * @a levels_to_lock determines the levels_to_lock used when opening 00289 * @a path if @a path is a versioned directory, @a levels_to_lock is 00290 * ignored otherwise. If @a write_lock is @c TRUE the access batons 00291 * will hold write locks. 00292 * 00293 * If @a cancel_func is non-NULL, call it with @a cancel_baton to determine 00294 * if the client has cancelled the operation. 00295 * 00296 * This function is essentially a combination of svn_wc_adm_open3() and 00297 * svn_wc_get_actual_target(), with the emphasis on reducing physical IO. 00298 * 00299 * @since New in 1.2. 00300 */ 00301 svn_error_t * 00302 svn_wc_adm_open_anchor(svn_wc_adm_access_t **anchor_access, 00303 svn_wc_adm_access_t **target_access, 00304 const char **target, 00305 const char *path, 00306 svn_boolean_t write_lock, 00307 int levels_to_lock, 00308 svn_cancel_func_t cancel_func, 00309 void *cancel_baton, 00310 apr_pool_t *pool); 00311 00312 /** Return, in @a *adm_access, a pointer to an existing access baton associated 00313 * with @a path. @a path must be a directory that is locked as part of the 00314 * set containing the @a associated access baton. 00315 * 00316 * If the requested access baton is marked as missing in, or is simply 00317 * absent from, @a associated, return SVN_ERR_WC_NOT_LOCKED. 00318 * 00319 * @a pool is used only for local processing, it is not used for the batons. 00320 */ 00321 svn_error_t * 00322 svn_wc_adm_retrieve(svn_wc_adm_access_t **adm_access, 00323 svn_wc_adm_access_t *associated, 00324 const char *path, 00325 apr_pool_t *pool); 00326 00327 /** Check the working copy to determine the node type of @a path. If 00328 * @a path is a versioned directory then the behaviour is like that of 00329 * svn_wc_adm_retrieve(), otherwise, if @a path is a file, an unversioned 00330 * directory, or does not exist, then the behaviour is like that of 00331 * svn_wc_adm_retrieve() with @a path replaced by the parent directory of 00332 * @a path. 00333 */ 00334 svn_error_t * 00335 svn_wc_adm_probe_retrieve(svn_wc_adm_access_t **adm_access, 00336 svn_wc_adm_access_t *associated, 00337 const char *path, 00338 apr_pool_t *pool); 00339 00340 /** 00341 * Try various ways to obtain an access baton for @a path. 00342 * 00343 * First, try to obtain @a *adm_access via svn_wc_adm_probe_retrieve(), 00344 * but if this fails because @a associated can't give a baton for 00345 * @a path or @a path's parent, then try svn_wc_adm_probe_open3(), 00346 * this time passing @a write_lock and @a levels_to_lock. If there is 00347 * still no access because @a path is not a versioned directory, then 00348 * just set @a *adm_access to NULL and return success. But if it is 00349 * because @a path is locked, then return the error @c SVN_ERR_WC_LOCKED, 00350 * and the effect on @a *adm_access is undefined. (Or if the attempt 00351 * fails for any other reason, return the corresponding error, and the 00352 * effect on @a *adm_access is also undefined.) 00353 * 00354 * If svn_wc_adm_probe_open3() succeeds, then add @a *adm_access to 00355 * @a associated. 00356 * 00357 * If @a cancel_func is non-NULL, call it with @a cancel_baton to determine 00358 * if the client has cancelled the operation. 00359 * 00360 * Use @a pool only for local processing, not to allocate @a *adm_access. 00361 * 00362 * @since New in 1.2. 00363 */ 00364 svn_error_t * 00365 svn_wc_adm_probe_try3(svn_wc_adm_access_t **adm_access, 00366 svn_wc_adm_access_t *associated, 00367 const char *path, 00368 svn_boolean_t write_lock, 00369 int levels_to_lock, 00370 svn_cancel_func_t cancel_func, 00371 void *cancel_baton, 00372 apr_pool_t *pool); 00373 00374 /** 00375 * Similar to svn_wc_adm_probe_try3() without the cancel 00376 * functionality. 00377 * 00378 * @deprecated Provided for backward compatibility with the 1.1 API. 00379 */ 00380 SVN_DEPRECATED 00381 svn_error_t * 00382 svn_wc_adm_probe_try2(svn_wc_adm_access_t **adm_access, 00383 svn_wc_adm_access_t *associated, 00384 const char *path, 00385 svn_boolean_t write_lock, 00386 int levels_to_lock, 00387 apr_pool_t *pool); 00388 00389 /** 00390 * Similar to svn_wc_adm_probe_try2(), but with @a tree_lock instead of 00391 * @a levels_to_lock. @a levels_to_lock is set to -1 if @a tree_lock 00392 * is @c TRUE, else 0. 00393 * 00394 * @deprecated Provided for backward compatibility with the 1.0 API. 00395 */ 00396 SVN_DEPRECATED 00397 svn_error_t * 00398 svn_wc_adm_probe_try(svn_wc_adm_access_t **adm_access, 00399 svn_wc_adm_access_t *associated, 00400 const char *path, 00401 svn_boolean_t write_lock, 00402 svn_boolean_t tree_lock, 00403 apr_pool_t *pool); 00404 00405 00406 /** Give up the access baton @a adm_access, and its lock if any. This will 00407 * recursively close any batons in the same set that are direct 00408 * subdirectories of @a adm_access. Any physical locks will be removed from 00409 * the working copy. Lock removal is unconditional, there is no check to 00410 * determine if cleanup is required. 00411 * 00412 * Any temporary allocations are performed using @a scratch_pool. 00413 * 00414 * @since New in 1.6 00415 */ 00416 svn_error_t * 00417 svn_wc_adm_close2(svn_wc_adm_access_t *adm_access, 00418 apr_pool_t *scratch_pool); 00419 00420 /* @deprecated Provided for backward compabibility with the 1.5 API. */ 00421 SVN_DEPRECATED 00422 svn_error_t * 00423 svn_wc_adm_close(svn_wc_adm_access_t *adm_access); 00424 00425 /** Return the path used to open the access baton @a adm_access */ 00426 const char * 00427 svn_wc_adm_access_path(const svn_wc_adm_access_t *adm_access); 00428 00429 /** Return the pool used by access baton @a adm_access */ 00430 apr_pool_t * 00431 svn_wc_adm_access_pool(const svn_wc_adm_access_t *adm_access); 00432 00433 /** Return @c TRUE is the access baton @a adm_access has a write lock, 00434 * @c FALSE otherwise. Compared to svn_wc_locked() this is a cheap, fast 00435 * function that doesn't access the filesystem. 00436 */ 00437 svn_boolean_t 00438 svn_wc_adm_locked(const svn_wc_adm_access_t *adm_access); 00439 00440 /** Set @a *locked to non-zero if @a path is locked, else set it to zero. */ 00441 svn_error_t * 00442 svn_wc_locked(svn_boolean_t *locked, 00443 const char *path, 00444 apr_pool_t *pool); 00445 00446 00447 /** 00448 * Return @c TRUE if @a name is the name of the WC administrative 00449 * directory. Use @a pool for any temporary allocations. Only works 00450 * with base directory names, not paths or URIs. 00451 * 00452 * For compatibility, the default name (.svn) will always be treated 00453 * as an admin dir name, even if the working copy is actually using an 00454 * alternative name. 00455 * 00456 * @since New in 1.3. 00457 */ 00458 svn_boolean_t 00459 svn_wc_is_adm_dir(const char *name, apr_pool_t *pool); 00460 00461 00462 /** 00463 * Return the name of the administrative directory. 00464 * Use @a pool for any temporary allocations. 00465 * 00466 * The returned pointer will refer to either a statically allocated 00467 * string, or to a string allocated in @a pool. 00468 * 00469 * @since New in 1.3. 00470 */ 00471 const char * 00472 svn_wc_get_adm_dir(apr_pool_t *pool); 00473 00474 00475 /** 00476 * Use @a name for the administrative directory in the working copy. 00477 * Use @a pool for any temporary allocations. 00478 * 00479 * The list of valid names is limited. Currently only ".svn" (the 00480 * default) and "_svn" are allowed. 00481 * 00482 * @note This function changes global (per-process) state and must be 00483 * called in a single-threaded context during the initialization of a 00484 * Subversion client. 00485 * 00486 * @since New in 1.3. 00487 */ 00488 svn_error_t * 00489 svn_wc_set_adm_dir(const char *name, 00490 apr_pool_t *pool); 00491 00492 00493 00494 /** Traversal information is information gathered by a working copy 00495 * crawl or update. For example, the before and after values of the 00496 * svn:externals property are important after an update, and since 00497 * we're traversing the working tree anyway (a complete traversal 00498 * during the initial crawl, and a traversal of changed paths during 00499 * the checkout/update/switch), it makes sense to gather the 00500 * property's values then instead of making a second pass. 00501 */ 00502 typedef struct svn_wc_traversal_info_t svn_wc_traversal_info_t; 00503 00504 00505 /** Return a new, empty traversal info object, allocated in @a pool. */ 00506 svn_wc_traversal_info_t * 00507 svn_wc_init_traversal_info(apr_pool_t *pool); 00508 00509 00510 /** Set @a *externals_old and @a *externals_new to hash tables representing 00511 * changes to values of the svn:externals property on directories 00512 * traversed by @a traversal_info. 00513 * 00514 * @a traversal_info is obtained from svn_wc_init_traversal_info(), but is 00515 * only useful after it has been passed through another function, such 00516 * as svn_wc_crawl_revisions(), svn_wc_get_update_editor(), 00517 * svn_wc_get_switch_editor(), etc. 00518 * 00519 * Each hash maps <tt>const char *</tt> directory names onto 00520 * <tt>const char *</tt> values of the externals property for that directory. 00521 * The dir names are full paths -- that is, anchor plus target, not target 00522 * alone. The values are not parsed, they are simply copied raw, and are 00523 * never NULL: directories that acquired or lost the property are 00524 * simply omitted from the appropriate table. Directories whose value 00525 * of the property did not change show the same value in each hash. 00526 * 00527 * The hashes, keys, and values have the same lifetime as @a traversal_info. 00528 */ 00529 void 00530 svn_wc_edited_externals(apr_hash_t **externals_old, 00531 apr_hash_t **externals_new, 00532 svn_wc_traversal_info_t *traversal_info); 00533 00534 00535 /** Set @a *depths to a hash table mapping <tt>const char *</tt> 00536 * directory names (directories traversed by @a traversal_info) to 00537 * <tt>const char *</tt> values (the depths of those directories, as 00538 * converted by svn_depth_to_word()). 00539 * 00540 * @a traversal_info is obtained from svn_wc_init_traversal_info(), but is 00541 * only useful after it has been passed through another function, such 00542 * as svn_wc_crawl_revisions(), svn_wc_get_update_editor(), 00543 * svn_wc_get_switch_editor(), etc. 00544 * 00545 * The dir names are full paths -- that is, anchor plus target, not target 00546 * alone. The values are not allocated, they are static constant strings. 00547 * Although the values are never NULL, not all directories traversed 00548 * are necessarily listed. For example, directories which did not 00549 * have an svn:externals property set or modified are not included. 00550 * 00551 * The hashes and keys have the same lifetime as @a traversal_info. 00552 * 00553 * @since New in 1.5. 00554 */ 00555 void 00556 svn_wc_traversed_depths(apr_hash_t **depths, 00557 svn_wc_traversal_info_t *traversal_info); 00558 00559 00560 /** One external item. This usually represents one line from an 00561 * svn:externals description but with the path and URL 00562 * canonicalized. 00563 * 00564 * In order to avoid backwards compatibility problems clients should use 00565 * svn_wc_external_item_create() to allocate and initialize this structure 00566 * instead of doing so themselves. 00567 * 00568 * @since New in 1.5. 00569 */ 00570 typedef struct svn_wc_external_item2_t 00571 { 00572 /** The name of the subdirectory into which this external should be 00573 checked out. This is relative to the parent directory that 00574 holds this external item. (Note that these structs are often 00575 stored in hash tables with the target dirs as keys, so this 00576 field will often be redundant.) */ 00577 const char *target_dir; 00578 00579 /** Where to check out from. */ 00580 const char *url; 00581 00582 /** What revision to check out. The only valid kinds for this are 00583 svn_opt_revision_number, svn_opt_revision_date, and 00584 svn_opt_revision_head. */ 00585 svn_opt_revision_t revision; 00586 00587 /** The peg revision to use when checking out. The only valid kinds are 00588 svn_opt_revision_number, svn_opt_revision_date, and 00589 svn_opt_revision_head. */ 00590 svn_opt_revision_t peg_revision; 00591 00592 } svn_wc_external_item2_t; 00593 00594 /** 00595 * Initialize an external item. 00596 * Set @a *item to an external item object, allocated in @a pool. 00597 * 00598 * In order to avoid backwards compatibility problems, this function 00599 * is used to initialize and allocate the @c svn_wc_external_item2_t 00600 * structure rather than doing so explicitly, as the size of this 00601 * structure may change in the future. 00602 * 00603 * The current implementation never returns error, but callers should 00604 * still check for error, for compatibility with future versions. 00605 * 00606 * @since New in 1.5. 00607 */ 00608 svn_error_t * 00609 svn_wc_external_item_create(const svn_wc_external_item2_t **item, 00610 apr_pool_t *pool); 00611 00612 /** 00613 * Return a duplicate of @a item, allocated in @a pool. No part of the new 00614 * item will be shared with @a item. 00615 * 00616 * @since New in 1.5. 00617 */ 00618 svn_wc_external_item2_t * 00619 svn_wc_external_item2_dup(const svn_wc_external_item2_t *item, 00620 apr_pool_t *pool); 00621 00622 /** 00623 * One external item. Similar to svn_wc_external_item2_t, except 00624 * @a revision is interpreted as both the operational revision and the 00625 * peg revision. 00626 * 00627 * @deprecated Provided for backward compatibility with the 1.4 API. 00628 */ 00629 typedef struct svn_wc_external_item_t 00630 { 00631 /** Same as @c svn_wc_external_item2_t.target_dir */ 00632 const char *target_dir; 00633 00634 /** Same as @c svn_wc_external_item2_t.url */ 00635 const char *url; 00636 00637 /** Same as @c svn_wc_external_item2_t.revision */ 00638 svn_opt_revision_t revision; 00639 00640 } svn_wc_external_item_t; 00641 00642 /** 00643 * Return a duplicate of @a item, allocated in @a pool. No part of the new 00644 * item will be shared with @a item. 00645 * 00646 * @since New in 1.3. 00647 * 00648 * @deprecated Provided for backward compatibility with the 1.4 API. 00649 */ 00650 SVN_DEPRECATED 00651 svn_wc_external_item_t * 00652 svn_wc_external_item_dup(const svn_wc_external_item_t *item, 00653 apr_pool_t *pool); 00654 00655 /** 00656 * If @a externals_p is non-NULL, set @a *externals_p to an array of 00657 * @c svn_wc_external_item2_t * objects based on @a desc. The @a url 00658 * member of the objects will be canonicalized if @a canonicalize_url 00659 * is @c TRUE. 00660 * 00661 * If the format of @a desc is invalid, don't touch @a *externals_p and 00662 * return @c SVN_ERR_CLIENT_INVALID_EXTERNALS_DESCRIPTION. Thus, if 00663 * you just want to check the validity of an externals description, 00664 * and don't care about the parsed result, pass NULL for @a externals_p. 00665 * 00666 * The format of @a desc is the same as for values of the directory 00667 * property @c SVN_PROP_EXTERNALS, which see. 00668 * 00669 * Allocate the table, keys, and values in @a pool. 00670 * 00671 * Use @a parent_directory only in constructing error strings. 00672 * 00673 * @since New in 1.5. 00674 */ 00675 svn_error_t * 00676 svn_wc_parse_externals_description3(apr_array_header_t **externals_p, 00677 const char *parent_directory, 00678 const char *desc, 00679 svn_boolean_t canonicalize_url, 00680 apr_pool_t *pool); 00681 00682 /** 00683 * Similar to svn_wc_parse_externals_description3() with @a 00684 * canonicalize_url set to @c TRUE, but returns an array of @c 00685 * svn_wc_external_item_t * objects instead of @c 00686 * svn_wc_external_item2_t * objects 00687 * 00688 * @since New in 1.1. 00689 * 00690 * @deprecated Provided for backward compatibility with the 1.4 API. 00691 */ 00692 SVN_DEPRECATED 00693 svn_error_t * 00694 svn_wc_parse_externals_description2(apr_array_header_t **externals_p, 00695 const char *parent_directory, 00696 const char *desc, 00697 apr_pool_t *pool); 00698 00699 /** 00700 * Similar to svn_wc_parse_externals_description2(), but returns the 00701 * parsed externals in a hash instead of an array. This function 00702 * should not be used, as storing the externals in a hash causes their 00703 * order of evaluation to be not easily identifiable. 00704 * 00705 * @deprecated Provided for backward compatibility with the 1.0 API. 00706 */ 00707 SVN_DEPRECATED 00708 svn_error_t * 00709 svn_wc_parse_externals_description(apr_hash_t **externals_p, 00710 const char *parent_directory, 00711 const char *desc, 00712 apr_pool_t *pool); 00713 00714 00715 00716 /* Notification/callback handling. */ 00717 00718 /** 00719 * @defgroup svn_wc_notifications Notification callback handling 00720 * @{ 00721 * 00722 * In many cases, the WC library will scan a working copy and make 00723 * changes. The caller usually wants to know when each of these changes 00724 * has been made, so that it can display some kind of notification to 00725 * the user. 00726 * 00727 * These notifications have a standard callback function type, which 00728 * takes the path of the file that was affected, and a caller- 00729 * supplied baton. 00730 * 00731 * Note that the callback is a 'void' return -- this is a simple 00732 * reporting mechanism, rather than an opportunity for the caller to 00733 * alter the operation of the WC library. 00734 * 00735 * Note also that some of the actions are used across several 00736 * different Subversion commands. For example, the update actions are 00737 * also used for checkouts, switches, and merges. 00738 */ 00739 00740 /** The type of action occurring. */ 00741 typedef enum svn_wc_notify_action_t 00742 { 00743 /** Adding a path to revision control. */ 00744 svn_wc_notify_add = 0, 00745 00746 /** Copying a versioned path. */ 00747 svn_wc_notify_copy, 00748 00749 /** Deleting a versioned path. */ 00750 svn_wc_notify_delete, 00751 00752 /** Restoring a missing path from the pristine text-base. */ 00753 svn_wc_notify_restore, 00754 00755 /** Reverting a modified path. */ 00756 svn_wc_notify_revert, 00757 00758 /** A revert operation has failed. */ 00759 svn_wc_notify_failed_revert, 00760 00761 /** Resolving a conflict. */ 00762 svn_wc_notify_resolved, 00763 00764 /** Skipping a path. */ 00765 svn_wc_notify_skip, 00766 00767 /** Got a delete in an update. */ 00768 svn_wc_notify_update_delete, 00769 00770 /** Got an add in an update. */ 00771 svn_wc_notify_update_add, 00772 00773 /** Got any other action in an update. */ 00774 svn_wc_notify_update_update, 00775 00776 /** The last notification in an update (including updates of externals). */ 00777 svn_wc_notify_update_completed, 00778 00779 /** Updating an external module. */ 00780 svn_wc_notify_update_external, 00781 00782 /** The last notification in a status (including status on externals). */ 00783 svn_wc_notify_status_completed, 00784 00785 /** Running status on an external module. */ 00786 svn_wc_notify_status_external, 00787 00788 /** Committing a modification. */ 00789 svn_wc_notify_commit_modified, 00790 00791 /** Committing an addition. */ 00792 svn_wc_notify_commit_added, 00793 00794 /** Committing a deletion. */ 00795 svn_wc_notify_commit_deleted, 00796 00797 /** Committing a replacement. */ 00798 svn_wc_notify_commit_replaced, 00799 00800 /** Transmitting post-fix text-delta data for a file. */ 00801 svn_wc_notify_commit_postfix_txdelta, 00802 00803 /** Processed a single revision's blame. */ 00804 svn_wc_notify_blame_revision, 00805 00806 /** Locking a path. @since New in 1.2. */ 00807 svn_wc_notify_locked, 00808 00809 /** Unlocking a path. @since New in 1.2. */ 00810 svn_wc_notify_unlocked, 00811 00812 /** Failed to lock a path. @since New in 1.2. */ 00813 svn_wc_notify_failed_lock, 00814 00815 /** Failed to unlock a path. @since New in 1.2. */ 00816 svn_wc_notify_failed_unlock, 00817 00818 /** Tried adding a path that already exists. @since New in 1.5. */ 00819 svn_wc_notify_exists, 00820 00821 /** Changelist name set. @since New in 1.5. */ 00822 svn_wc_notify_changelist_set, 00823 00824 /** Changelist name cleared. @since New in 1.5. */ 00825 svn_wc_notify_changelist_clear, 00826 00827 /** Warn user that a path has moved from one changelist to another. 00828 @since New in 1.5. */ 00829 svn_wc_notify_changelist_moved, 00830 00831 /** A merge operation (to path) has begun. See @c merge_range in 00832 @c svn_wc_notify_t. @since New in 1.5. */ 00833 svn_wc_notify_merge_begin, 00834 00835 /** A merge operation (to path) from a foreign repository has begun. 00836 See @c merge_range in @c svn_wc_notify_t. @since New in 1.5. */ 00837 svn_wc_notify_foreign_merge_begin, 00838 00839 /** Replace notification. @since New in 1.5. */ 00840 svn_wc_notify_update_replace, 00841 00842 /** Property added. @since New in 1.6. */ 00843 svn_wc_notify_property_added, 00844 00845 /** Property updated. @since New in 1.6. */ 00846 svn_wc_notify_property_modified, 00847 00848 /** Property deleted. @since New in 1.6. */ 00849 svn_wc_notify_property_deleted, 00850 00851 /** Nonexistent property deleted. @since New in 1.6. */ 00852 svn_wc_notify_property_deleted_nonexistent, 00853 00854 /** Revprop set. @since New in 1.6. */ 00855 svn_wc_notify_revprop_set, 00856 00857 /** Revprop deleted. @since New in 1.6. */ 00858 svn_wc_notify_revprop_deleted, 00859 00860 /** The last notification in a merge. @since New in 1.6. */ 00861 svn_wc_notify_merge_completed, 00862 00863 /** The path is a tree-conflict victim of the intended action (*not* 00864 * a persistent tree-conflict from an earlier operation, but *this* 00865 * operation caused the tree-conflict). @since New in 1.6. */ 00866 svn_wc_notify_tree_conflict, 00867 00868 /** The path is a subdirectory referenced in an externals definition 00869 * which is unable to be operated on. @since New in 1.6. */ 00870 svn_wc_notify_failed_external 00871 00872 } svn_wc_notify_action_t; 00873 00874 00875 /** The type of notification that is occurring. */ 00876 typedef enum svn_wc_notify_state_t 00877 { 00878 svn_wc_notify_state_inapplicable = 0, 00879 00880 /** Notifier doesn't know or isn't saying. */ 00881 svn_wc_notify_state_unknown, 00882 00883 /** The state did not change. */ 00884 svn_wc_notify_state_unchanged, 00885 00886 /** The item wasn't present. */ 00887 svn_wc_notify_state_missing, 00888 00889 /** An unversioned item obstructed work. */ 00890 svn_wc_notify_state_obstructed, 00891 00892 /** Pristine state was modified. */ 00893 svn_wc_notify_state_changed, 00894 00895 /** Modified state had mods merged in. */ 00896 svn_wc_notify_state_merged, 00897 00898 /** Modified state got conflicting mods. */ 00899 svn_wc_notify_state_conflicted 00900 00901 } svn_wc_notify_state_t; 00902 00903 /** 00904 * What happened to a lock during an operation. 00905 * 00906 * @since New in 1.2. 00907 */ 00908 typedef enum svn_wc_notify_lock_state_t 00909 { 00910 svn_wc_notify_lock_state_inapplicable = 0, 00911 00912 svn_wc_notify_lock_state_unknown, 00913 00914 /** The lock wasn't changed. */ 00915 svn_wc_notify_lock_state_unchanged, 00916 00917 /** The item was locked. */ 00918 svn_wc_notify_lock_state_locked, 00919 00920 /** The item was unlocked. */ 00921 svn_wc_notify_lock_state_unlocked 00922 00923 } svn_wc_notify_lock_state_t; 00924 00925 /** 00926 * Structure used in the @c svn_wc_notify_func2_t function. 00927 * 00928 * @c kind, @c content_state, @c prop_state and @c lock_state are from 00929 * after @c action, not before. 00930 * 00931 * @note If @c action is @c svn_wc_notify_update, then @c path has 00932 * already been installed, so it is legitimate for an implementation of 00933 * @c svn_wc_notify_func2_t to examine @c path in the working copy. 00934 * 00935 * @note The purpose of the @c kind, @c mime_type, @c content_state, and 00936 * @c prop_state fields is to provide "for free" information that an 00937 * implementation is likely to want, and which it would otherwise be 00938 * forced to deduce via expensive operations such as reading entries 00939 * and properties. However, if the caller does not have this 00940 * information, it will simply pass the corresponding `*_unknown' 00941 * values, and it is up to the implementation how to handle that 00942 * (i.e., whether to attempt deduction, or just to punt and 00943 * give a less informative notification). 00944 * 00945 * @note Callers of notification functions should use svn_wc_create_notify() 00946 * or svn_wc_create_notify_url() to create structures of this type to allow 00947 * for extensibility. 00948 * 00949 * @since New in 1.2. 00950 */ 00951 typedef struct svn_wc_notify_t { 00952 00953 /** Path, either absolute or relative to the current working directory 00954 * (i.e., not relative to an anchor).@c path is "." or another valid path 00955 * value for compatibilty reasons when the real target is an url that 00956 * is available in @c url. */ 00957 const char *path; 00958 00959 /** Action that describes what happened to @c path. */ 00960 svn_wc_notify_action_t action; 00961 00962 /** Node kind of @c path. */ 00963 svn_node_kind_t kind; 00964 00965 /** If non-NULL, indicates the mime-type of @c path. 00966 * It is always @c NULL for directories. */ 00967 const char *mime_type; 00968 00969 /** Points to the lock structure received from the repository when 00970 * @c action is @c svn_wc_notify_locked. For other actions, it is 00971 * @c NULL. */ 00972 const svn_lock_t *lock; 00973 00974 /** Points to an error describing the reason for the failure when @c 00975 * action is one of the following: @c svn_wc_notify_failed_lock, @c 00976 * svn_wc_notify_failed_unlock, @c svn_wc_notify_failed_external. 00977 * Is @c NULL otherwise. */ 00978 svn_error_t *err; 00979 00980 /** The type of notification that is occurring about node content. */ 00981 svn_wc_notify_state_t content_state; 00982 00983 /** The type of notification that is occurring about node properties. */ 00984 svn_wc_notify_state_t prop_state; 00985 00986 /** Reflects the addition or removal of a lock token in the working copy. */ 00987 svn_wc_notify_lock_state_t lock_state; 00988 00989 /** When @c action is @c svn_wc_notify_update_completed, target revision 00990 * of the update, or @c SVN_INVALID_REVNUM if not available; when @c 00991 * action is @c svn_wc_notify_blame_revision, processed revision. 00992 * In all other cases, it is @c SVN_INVALID_REVNUM. */ 00993 svn_revnum_t revision; 00994 00995 /** When @c action is @c svn_wc_notify_changelist_add or name. In all other 00996 * cases, it is @c NULL. @since New in 1.5 */ 00997 const char *changelist_name; 00998 00999 /** When @c action is @c svn_wc_notify_merge_begin, and both the 01000 * left and right sides of the merge are from the same URL. In all 01001 * other cases, it is @c NULL. @since New in 1.5 */ 01002 svn_merge_range_t *merge_range; 01003 01004 /** Similar to @c path, but if non-NULL the notification is about a url. 01005 * @since New in 1.6 */ 01006 const char *url; 01007 01008 /** If non-NULL, specifies an absolute path prefix that can be subtracted 01009 * from the start of the absolute path in @c path or @c url. Its purpose 01010 * is to allow notification to remove a common prefix from all the paths 01011 * displayed for an operation. @since New in 1.6 */ 01012 const char *path_prefix; 01013 01014 /** If @c action relates to properties, specifies the name of the property. 01015 * @since New in 1.6 */ 01016 const char *prop_name; 01017 01018 /** If @c action is @c svn_wc_notify_blame_revision, contains a list of 01019 * revision properties for the specified revision */ 01020 apr_hash_t *rev_props; 01021 01022 /* NOTE: Add new fields at the end to preserve binary compatibility. 01023 Also, if you add fields here, you have to update svn_wc_create_notify 01024 and svn_wc_dup_notify. */ 01025 } svn_wc_notify_t; 01026 01027 /** 01028 * Allocate an @c svn_wc_notify_t structure in @a pool, initialize and return 01029 * it. 01030 * 01031 * Set the @c path field of the created struct to @a path, and @c action to 01032 * @a action. Set all other fields to their @c _unknown, @c NULL or 01033 * invalid value, respectively. Make only a shallow copy of the pointer 01034 * @a path. 01035 * 01036 * @since New in 1.2. 01037 */ 01038 svn_wc_notify_t * 01039 svn_wc_create_notify(const char *path, 01040 svn_wc_notify_action_t action, 01041 apr_pool_t *pool); 01042 01043 /** 01044 * Allocate an @c svn_wc_notify_t structure in @a pool, initialize and return 01045 * it. 01046 * 01047 * Set the @c url field of the created struct to @a url, @c action to, @c path 01048 * to "." and @a action. Set all other fields to their @c _unknown, @c NULL or 01049 * invalid value, respectively. Make only a shallow copy of the pointer 01050 * @a url. 01051 * 01052 * @since New in 1.6. 01053 */ 01054 svn_wc_notify_t * 01055 svn_wc_create_notify_url(const char *url, 01056 svn_wc_notify_action_t action, 01057 apr_pool_t *pool); 01058 01059 /** 01060 * Return a deep copy of @a notify, allocated in @a pool. 01061 * 01062 * @since New in 1.2. 01063 */ 01064 svn_wc_notify_t * 01065 svn_wc_dup_notify(const svn_wc_notify_t *notify, 01066 apr_pool_t *pool); 01067 01068 /** 01069 * Notify the world that @a notify->action has happened to @a notify->path. 01070 * 01071 * Recommendation: callers of @c svn_wc_notify_func2_t should avoid 01072 * invoking it multiple times on the same path within a given 01073 * operation, and implementations should not bother checking for such 01074 * duplicate calls. For example, in an update, the caller should not 01075 * invoke the notify func on receiving a prop change and then again 01076 * on receiving a text change. Instead, wait until all changes have 01077 * been received, and then invoke the notify func once (from within 01078 * an @c svn_delta_editor_t's close_file(), for example), passing 01079 * the appropriate @a notify->content_state and @a notify->prop_state flags. 01080 * 01081 * @since New in 1.2. 01082 */ 01083 typedef void (*svn_wc_notify_func2_t)(void *baton, 01084 const svn_wc_notify_t *notify, 01085 apr_pool_t *pool); 01086 01087 /** 01088 * Similar to @c svn_wc_notify_func2_t, but takes the information as arguments 01089 * instead of struct fields. 01090 * 01091 * @deprecated Provided for backward compatibility with the 1.1 API. 01092 */ 01093 typedef void (*svn_wc_notify_func_t)(void *baton, 01094 const char *path, 01095 svn_wc_notify_action_t action, 01096 svn_node_kind_t kind, 01097 const char *mime_type, 01098 svn_wc_notify_state_t content_state, 01099 svn_wc_notify_state_t prop_state, 01100 svn_revnum_t revision); 01101 01102 /** @} */ 01103 01104 01105 /** 01106 * A simple callback type to wrap svn_ra_get_file(); see that 01107 * docstring for more information. 01108 * 01109 * This technique allows libsvn_client to 'wrap' svn_ra_get_file() and 01110 * pass it down into libsvn_wc functions, thus allowing the WC layer 01111 * to legally call the RA function via (blind) callback. 01112 * 01113 * @since New in 1.5 01114 */ 01115 typedef svn_error_t *(*svn_wc_get_file_t)(void *baton, 01116 const char *path, 01117 svn_revnum_t revision, 01118 svn_stream_t *stream, 01119 svn_revnum_t *fetched_rev, 01120 apr_hash_t **props, 01121 apr_pool_t *pool); 01122 01123 01124 /** 01125 * Interactive conflict handling 01126 * 01127 * @defgroup svn_wc_conflict Conflict callback functionality 01128 * 01129 * @{ 01130 * 01131 * This API gives a Subversion client application the opportunity to 01132 * define a callback that allows the user to resolve conflicts 01133 * interactively during updates and merges. 01134 * 01135 * If a conflict is discovered, libsvn_wc invokes the callback with an 01136 * @c svn_wc_conflict_description_t. This structure describes the 01137 * path in conflict, whether it's a text or property conflict, and may 01138 * also present up to three files that can be used to resolve the 01139 * conflict (perhaps by launching an editor or 3rd-party merging 01140 * tool). The structure also provides a possible fourth file (@c 01141 * merged_file) which, if not NULL, represents libsvn_wc's attempt to 01142 * contextually merge the first three files. (Note that libsvn_wc 01143 * will not attempt to merge a file that it believes is binary, and it 01144 * will only attempt to merge property values it believes to be a 01145 * series of multi-line text.) 01146 * 01147 * When the callback is finished interacting with the user, it 01148 * responds by returning a @c svn_wc_conflict_result_t. This 01149 * structure indicates whether the user wants to postpone the conflict 01150 * for later (allowing libsvn_wc to mark the path "conflicted" as 01151 * usual), or whether the user wants libsvn_wc to use one of the four 01152 * files as the "final" state for resolving the conflict immediately. 01153 * 01154 * Note that the callback is at liberty (and encouraged) to merge the 01155 * three files itself. If it does so, it signals this to libsvn_wc by 01156 * returning a choice of @c svn_wc_conflict_choose_merged. To return 01157 * the 'final' merged file to libsvn_wc, the callback has the option of 01158 * either: 01159 * 01160 * - editing the original @c merged_file in-place 01161 * 01162 * or, if libsvn_wc never supplied a merged_file in the 01163 * description structure (i.e. passed NULL for that field), 01164 * 01165 * - return the merged file in the @c svn_wc_conflict_result_t. 01166 * 01167 */ 01168 01169 /** The type of action being attempted on an object. 01170 * 01171 * @since New in 1.5. 01172 */ 01173 typedef enum svn_wc_conflict_action_t 01174 { 01175 svn_wc_conflict_action_edit, /* attempting to change text or props */ 01176 svn_wc_conflict_action_add, /* attempting to add object */ 01177 svn_wc_conflict_action_delete /* attempting to delete object */ 01178 01179 } svn_wc_conflict_action_t; 01180 01181 01182 /** The pre-existing condition which is causing a state of conflict. 01183 * 01184 * @since New in 1.5. 01185 */ 01186 typedef enum svn_wc_conflict_reason_t 01187 { 01188 /** Local edits are already present */ 01189 svn_wc_conflict_reason_edited, 01190 /** Another object is in the way */ 01191 svn_wc_conflict_reason_obstructed, 01192 /** Object is already schedule-delete */ 01193 svn_wc_conflict_reason_deleted, 01194 /** Object is unknown or missing */ 01195 svn_wc_conflict_reason_missing, 01196 /** Object is unversioned */ 01197 svn_wc_conflict_reason_unversioned, 01198 /** Object is already added or schedule-add. @since New in 1.6. */ 01199 svn_wc_conflict_reason_added 01200 01201 } svn_wc_conflict_reason_t; 01202 01203 01204 /** The type of conflict being described by an @c 01205 * svn_wc_conflict_description_t (see below). 01206 * 01207 * @since New in 1.5. 01208 */ 01209 typedef enum svn_wc_conflict_kind_t 01210 { 01211 /** textual conflict (on a file) */ 01212 svn_wc_conflict_kind_text, 01213 /** property conflict (on a file or dir) */ 01214 svn_wc_conflict_kind_property, 01215 /** tree conflict (on a dir) @since New in 1.6. */ 01216 svn_wc_conflict_kind_tree 01217 } svn_wc_conflict_kind_t; 01218 01219 01220 /** The user operation that exposed a conflict. 01221 * 01222 * @since New in 1.6. 01223 */ 01224 typedef enum svn_wc_operation_t 01225 { 01226 svn_wc_operation_none = 0, 01227 svn_wc_operation_update, 01228 svn_wc_operation_switch, 01229 svn_wc_operation_merge 01230 01231 } svn_wc_operation_t; 01232 01233 01234 /** Info about one of the conflicting versions of a node. Each field may 01235 * have its respective null/invalid/unknown value if the corresponding 01236 * information is not relevant or not available. 01237 * 01238 * @todo Consider making some or all of the info mandatory, to reduce 01239 * complexity. 01240 * 01241 * @note Fields may be added to the end of this structure in future 01242 * versions. Therefore, to preserve binary compatibility, users 01243 * should not directly allocate structures of this type. 01244 * 01245 * @see svn_wc_conflict_version_create() 01246 * @see svn_wc_conflict_version_dup() 01247 * 01248 * @since New in 1.6. 01249 */ 01250 typedef struct svn_wc_conflict_version_t 01251 { 01252 /** @name Where to find this node version in a repository */ 01253 /**@{*/ 01254 01255 /** URL of repository root */ 01256 const char *repos_url; 01257 01258 /** revision at which to look up path_in_repos */ 01259 svn_revnum_t peg_rev; 01260 01261 /** path within repos; must not start with '/' */ 01262 const char *path_in_repos; 01263 /* @todo We may decide to add the repository UUID, to handle conflicts 01264 * properly during a repository move. */ 01265 /** @} */ 01266 01267 /** Info about this node */ 01268 svn_node_kind_t node_kind; /* note that 'none' is a legitimate value */ 01269 01270 /* @todo Add metadata about a local copy of the node, if and when 01271 * we store one. */ 01272 01273 /* Remember to update svn_wc_conflict_version_create() and 01274 * svn_wc_conflict_version_dup() in case you add fields to this struct. */ 01275 } svn_wc_conflict_version_t; 01276 01277 /** 01278 * Allocate an @c svn_wc_conflict_version_t structure in @a pool, 01279 * initialize to contain a conflict origin, and return it. 01280 * 01281 * Set the @c repos_url field of the created struct to @a repos_url, the 01282 * @c path_in_repos field to @a path_in_repos, the @c peg_rev field to 01283 * @a peg_rev and the the @c node_kind to @c node_kind. Make only shallow 01284 * copies of the pointer arguments. 01285 * 01286 * @since New in 1.6. 01287 */ 01288 svn_wc_conflict_version_t * 01289 svn_wc_conflict_version_create(const char *repos_url, 01290 const char* path_in_repos, 01291 svn_revnum_t peg_rev, 01292 svn_node_kind_t node_kind, 01293 apr_pool_t *pool); 01294 01295 /** Return a duplicate of @a version, allocated in @a pool. 01296 * No part of the new version will be shared with @a version. 01297 * 01298 * @since New in 1.6. 01299 */ 01300 svn_wc_conflict_version_t * 01301 svn_wc_conflict_version_dup(const svn_wc_conflict_version_t *version, 01302 apr_pool_t *pool); 01303 01304 01305 /** A struct that describes a conflict that has occurred in the 01306 * working copy. Passed to @c svn_wc_conflict_resolver_func_t. 01307 * 01308 * The conflict described by this structure is one of: 01309 * - a conflict on the content of the file node @a path 01310 * - a conflict on the property @a property_name of @a path 01311 * 01312 * @note Fields may be added to the end of this structure in future 01313 * versions. Therefore, to preserve binary compatibility, users 01314 * should not directly allocate structures of this type but should use 01315 * svn_wc_create_conflict_description_text() or 01316 * svn_wc_create_conflict_description_prop() or 01317 * svn_wc_create_conflict_description_tree() instead. 01318 * 01319 * @since New in 1.5. 01320 */ 01321 typedef struct svn_wc_conflict_description_t 01322 { 01323 /** The path that is in conflict (for a tree conflict, it is the victim) */ 01324 const char *path; 01325 01326 /** The node type of the path being operated on (for a tree conflict, 01327 * ### which version?) */ 01328 svn_node_kind_t node_kind; 01329 01330 /** What sort of conflict are we describing? */ 01331 svn_wc_conflict_kind_t kind; 01332 01333 /** The name of the property whose conflict is being described. 01334 * (Only if @a kind is 'property'; else undefined.) */ 01335 const char *property_name; 01336 01337 /** Whether svn thinks ('my' version of) @c path is a 'binary' file. 01338 * (Only if @c kind is 'text', else undefined.) */ 01339 svn_boolean_t is_binary; 01340 01341 /** The svn:mime-type property of ('my' version of) @c path, if available, 01342 * else NULL. 01343 * (Only if @c kind is 'text', else undefined.) */ 01344 const char *mime_type; 01345 01346 /** If not NULL, an open working copy access baton to either the 01347 * path itself (if @c path is a directory), or to the parent 01348 * directory (if @c path is a file.) 01349 * For a tree conflict, this will always be an access baton 01350 * to the parent directory of the path, even if the path is 01351 * a directory. */ 01352 svn_wc_adm_access_t *access; 01353 01354 /** The action being attempted on the conflicted node or property. 01355 * (When @c kind is 'text', this action must be 'edit'.) */ 01356 svn_wc_conflict_action_t action; 01357 01358 /** The state of the target node or property, relative to its merge-left 01359 * source, that is the reason for the conflict. 01360 * (When @c kind is 'text', this reason must be 'edited'.) */ 01361 svn_wc_conflict_reason_t reason; 01362 01363 /** If this is text-conflict and involves the merging of two files 01364 * descended from a common ancestor, here are the paths of up to 01365 * four fulltext files that can be used to interactively resolve the 01366 * conflict. All four files will be in repository-normal form -- LF 01367 * line endings and contracted keywords. (If any of these files are 01368 * not available, they default to NULL.) 01369 * 01370 * On the other hand, if this is a property-conflict, then these 01371 * paths represent temporary files that contain the three different 01372 * property-values in conflict. The fourth path (@c merged_file) 01373 * may or may not be NULL; if set, it represents libsvn_wc's 01374 * attempt to merge the property values together. (Remember that 01375 * property values are technically binary values, and thus can't 01376 * always be merged.) 01377 */ 01378 const char *base_file; /* common ancestor of the two files being merged */ 01379 01380 /** their version of the file */ 01381 const char *their_file; 01382 01383 /** my locally-edited version of the file */ 01384 const char *my_file; 01385 01386 /** merged version; may contain conflict markers */ 01387 const char *merged_file; 01388 01389 /** The operation that exposed the conflict. 01390 * Used only for tree conflicts. 01391 * 01392 * @since New in 1.6. 01393 */ 01394 svn_wc_operation_t operation; 01395 01396 /** Info on the "merge-left source" or "older" version of incoming change. 01397 * @since New in 1.6. */ 01398 svn_wc_conflict_version_t *src_left_version; 01399 01400 /** Info on the "merge-right source" or "their" version of incoming change. 01401 * @since New in 1.6. */ 01402 svn_wc_conflict_version_t *src_right_version; 01403 01404 /* Remember to adjust svn_wc__conflict_description_dup() 01405 * if you add new fields to this struct. */ 01406 } svn_wc_conflict_description_t; 01407 01408 /** 01409 * Allocate an @c svn_wc_conflict_description_t structure in @a pool, 01410 * initialize to represent a text conflict, and return it. 01411 * 01412 * Set the @c path field of the created struct to @a path, the @c access 01413 * field to @a adm_access, the @c kind field to @c 01414 * svn_wc_conflict_kind_text, the @c node_kind to @c svn_node_file, the @c 01415 * action to @c svn_wc_conflict_action_edit, and the @c reason to @c 01416 * svn_wc_conflict_reason_edited. Make only shallow copies of the pointer 01417 * arguments. 01418 * 01419 * @note: It is the caller's responsibility to set the other required fields 01420 * (such as the four file names and @c mime_type and @c is_binary). 01421 * 01422 * @since New in 1.6. 01423 */ 01424 svn_wc_conflict_description_t * 01425 svn_wc_conflict_description_create_text(const char *path, 01426 svn_wc_adm_access_t *adm_access, 01427 apr_pool_t *pool); 01428 01429 /** 01430 * Allocate an @c svn_wc_conflict_description_t structure in @a pool, 01431 * initialize to represent a property conflict, and return it. 01432 * 01433 * Set the @c path field of the created struct to @a path, the @c access 01434 * field to @a adm_access, the @c kind field to @c 01435 * svn_wc_conflict_kind_prop, the @c node_kind to @a node_kind, and the @c 01436 * property_name to @a property_name. Make only shallow copies of the pointer 01437 * arguments. 01438 * 01439 * @note: It is the caller's responsibility to set the other required fields 01440 * (such as the four file names and @c action and @c reason). 01441 * 01442 * @since New in 1.6. 01443 */ 01444 svn_wc_conflict_description_t * 01445 svn_wc_conflict_description_create_prop(const char *path, 01446 svn_wc_adm_access_t *adm_access, 01447 svn_node_kind_t node_kind, 01448 const char *property_name, 01449 apr_pool_t *pool); 01450 01451 /** 01452 * Allocate an @c svn_wc_conflict_description_t structure in @a pool, 01453 * initialize to represent a tree conflict, and return it. 01454 * 01455 * Set the @c path field of the created struct to @a path, the @c access 01456 * field to @a adm_access, the @c kind field to @c 01457 * svn_wc_conflict_kind_tree, the @c node_kind to @a node_kind, the @c 01458 * operation to @a operation, the @c src_left_version field to 01459 * @a src_left_version, and the @c src_right_version field to 01460 * @a src_right_version. 01461 * Make only shallow copies of the pointer arguments. 01462 * 01463 * @note: It is the caller's responsibility to set the other required fields 01464 * (such as the four file names and @c action and @c reason). 01465 * 01466 * @since New in 1.6. 01467 */ 01468 svn_wc_conflict_description_t * 01469 svn_wc_conflict_description_create_tree(const char *path, 01470 svn_wc_adm_access_t *adm_access, 01471 svn_node_kind_t node_kind, 01472 svn_wc_operation_t operation, 01473 svn_wc_conflict_version_t 01474 *src_left_version, 01475 svn_wc_conflict_version_t 01476 *src_right_version, 01477 apr_pool_t *pool); 01478 01479 01480 /** The way in which the conflict callback chooses a course of action. 01481 * 01482 * @since New in 1.5. 01483 */ 01484 typedef enum svn_wc_conflict_choice_t 01485 { 01486 /* Don't resolve the conflict now. Let libsvn_wc mark the path 01487 'conflicted', so user can run 'svn resolved' later. */ 01488 svn_wc_conflict_choose_postpone, 01489 01490 /* If their were files to choose from, select one as a way of 01491 resolving the conflict here and now. libsvn_wc will then do the 01492 work of "installing" the chosen file. 01493 */ 01494 svn_wc_conflict_choose_base, /* original version */ 01495 svn_wc_conflict_choose_theirs_full, /* incoming version */ 01496 svn_wc_conflict_choose_mine_full, /* own version */ 01497 svn_wc_conflict_choose_theirs_conflict, /* incoming (for conflicted hunks) */ 01498 svn_wc_conflict_choose_mine_conflict, /* own (for conflicted hunks) */ 01499 svn_wc_conflict_choose_merged /* merged version */ 01500 01501 } svn_wc_conflict_choice_t; 01502 01503 01504 /** The final result returned by @c svn_wc_conflict_resolver_func_t. 01505 * 01506 * @note Fields may be added to the end of this structure in future 01507 * versions. Therefore, to preserve binary compatibility, users 01508 * should not directly allocate structures of this type. Instead, 01509 * construct this structure using @c svn_wc_create_conflict_result() 01510 * below. 01511 * 01512 * @since New in 1.5. 01513 */ 01514 typedef struct svn_wc_conflict_result_t 01515 { 01516 /** A choice to either delay the conflict resolution or select a 01517 particular file to resolve the conflict. */ 01518 svn_wc_conflict_choice_t choice; 01519 01520 /** If not NULL, this is a path to a file which contains the client's 01521 (or more likely, the user's) merging of the three values in 01522 conflict. libsvn_wc accepts this file if (and only if) @c choice 01523 is set to @c svn_wc_conflict_choose_merged.*/ 01524 const char *merged_file; 01525 01526 /** If true, save a backup copy of merged_file (or the original 01527 merged_file from the conflict description, if merged_file is 01528 NULL) in the user's working copy. */ 01529 svn_boolean_t save_merged; 01530 01531 } svn_wc_conflict_result_t; 01532 01533 01534 /** 01535 * Allocate an @c svn_wc_conflict_result_t structure in @a pool, 01536 * initialize and return it. 01537 * 01538 * Set the @c choice field of the structure to @a choice, and @c 01539 * merged_file to @a merged_file. Set all other fields to their @c 01540 * _unknown, @c NULL or invalid value, respectively. Make only a shallow 01541 * copy of the pointer argument @a merged_file. 01542 * 01543 * @since New in 1.5. 01544 */ 01545 svn_wc_conflict_result_t * 01546 svn_wc_create_conflict_result(svn_wc_conflict_choice_t choice, 01547 const char *merged_file, 01548 apr_pool_t *pool); 01549 01550 01551 /** A callback used in svn_client_merge3(), svn_client_update3(), and 01552 * svn_client_switch2() for resolving conflicts during the application 01553 * of a tree delta to a working copy. 01554 * 01555 * @a description describes the exact nature of the conflict, and 01556 * provides information to help resolve it. @a baton is a closure 01557 * object; it should be provided by the implementation, and passed by 01558 * the caller. All allocations should be performed in @a pool. When 01559 * finished, the callback signals its resolution by returning a 01560 * structure in @a *result. (See @c svn_wc_conflict_result_t.) 01561 * 01562 * The values @c svn_wc_conflict_choose_mine_conflict and @c 01563 * svn_wc_conflict_choose_theirs_conflict are not legal for conflicts 01564 * in binary files or properties. 01565 * 01566 * Implementations of this callback are free to present the conflict 01567 * using any user interface. This may include simple contextual 01568 * conflicts in a file's text or properties, or more complex 01569 * 'tree'-based conflcts related to obstructed additions, deletions, 01570 * and edits. The callback implementation is free to decide which 01571 * sorts of conflicts to handle; it's also free to decide which types 01572 * of conflicts are automatically resolvable and which require user 01573 * interaction. 01574 * 01575 * @since New in 1.5. 01576 */ 01577 typedef svn_error_t *(*svn_wc_conflict_resolver_func_t) 01578 (svn_wc_conflict_result_t **result, 01579 const svn_wc_conflict_description_t *description, 01580 void *baton, 01581 apr_pool_t *pool); 01582 01583 /** @} */ 01584 01585 01586 01587 /** 01588 * A callback vtable invoked by our diff-editors, as they receive 01589 * diffs from the server. 'svn diff' and 'svn merge' both implement 01590 * their own versions of this table. 01591 * 01592 * Common parameters: 01593 * 01594 * @a adm_access will be an access baton for the directory containing 01595 * @a path, or @c NULL if the diff editor is not using access batons. 01596 * 01597 * If @a state is non-NULL, set @a *state to the state of the item 01598 * after the operation has been performed. (In practice, this is only 01599 * useful with merge, not diff; diff callbacks will probably set 01600 * @a *state to @c svn_wc_notify_state_unknown, since they do not change 01601 * the state and therefore do not bother to know the state after the 01602 * operation.) By default, @a state refers to the item's content 01603 * state. Functions concerned with property state have separate 01604 * @a contentstate and @a propstate arguments. 01605 * 01606 * If @a tree_conflicted is non-NULL, set @a *tree_conflicted to true if 01607 * this operation caused a tree conflict, else to false. (Like with @a 01608 * state, this is only useful with merge, not diff; diff callbacks 01609 * should set this to false.) 01610 * 01611 * @since New in 1.6. 01612 */ 01613 typedef struct svn_wc_diff_callbacks3_t 01614 { 01615 /** 01616 * A file @a path has changed. If @a tmpfile2 is non-NULL, the 01617 * contents have changed and those changes can be seen by comparing 01618 * @a tmpfile1 and @a tmpfile2, which represent @a rev1 and @a rev2 of 01619 * the file, respectively. 01620 * 01621 * If known, the @c svn:mime-type value of each file is passed into 01622 * @a mimetype1 and @a mimetype2; either or both of the values can 01623 * be NULL. The implementor can use this information to decide if 01624 * (or how) to generate differences. 01625 * 01626 * @a propchanges is an array of (@c svn_prop_t) structures. If it contains 01627 * any elements, the original list of properties is provided in 01628 * @a originalprops, which is a hash of @c svn_string_t values, keyed on the 01629 * property name. 01630 * 01631 */ 01632 svn_error_t *(*file_changed)(svn_wc_adm_access_t *adm_access, 01633 svn_wc_notify_state_t *contentstate, 01634 svn_wc_notify_state_t *propstate, 01635 svn_boolean_t *tree_conflicted, 01636 const char *path, 01637 const char *tmpfile1, 01638 const char *tmpfile2, 01639 svn_revnum_t rev1, 01640 svn_revnum_t rev2, 01641 const char *mimetype1, 01642 const char *mimetype2, 01643 const apr_array_header_t *propchanges, 01644 apr_hash_t *originalprops, 01645 void *diff_baton); 01646 01647 /** 01648 * A file @a path was added. The contents can be seen by comparing 01649 * @a tmpfile1 and @a tmpfile2, which represent @a rev1 and @a rev2 01650 * of the file, respectively. (If either file is empty, the rev 01651 * will be 0.) 01652 * 01653 * If known, the @c svn:mime-type value of each file is passed into 01654 * @a mimetype1 and @a mimetype2; either or both of the values can 01655 * be NULL. The implementor can use this information to decide if 01656 * (or how) to generate differences. 01657 * 01658 * @a propchanges is an array of (@c svn_prop_t) structures. If it contains 01659 * any elements, the original list of properties is provided in 01660 * @a originalprops, which is a hash of @c svn_string_t values, keyed on the 01661 * property name. 01662 */ 01663 svn_error_t *(*file_added)(svn_wc_adm_access_t *adm_access, 01664 svn_wc_notify_state_t *contentstate, 01665 svn_wc_notify_state_t *propstate, 01666 svn_boolean_t *tree_conflicted, 01667 const char *path, 01668 const char *tmpfile1, 01669 const char *tmpfile2, 01670 svn_revnum_t rev1, 01671 svn_revnum_t rev2, 01672 const char *mimetype1, 01673 const char *mimetype2, 01674 const apr_array_header_t *propchanges, 01675 apr_hash_t *originalprops, 01676 void *diff_baton); 01677 01678 /** 01679 * A file @a path was deleted. The [loss of] contents can be seen by 01680 * comparing @a tmpfile1 and @a tmpfile2. @a originalprops provides 01681 * the properties of the file. 01682 * ### Some existing callers include WC "entry props" in @a originalprops. 01683 * 01684 * If known, the @c svn:mime-type value of each file is passed into 01685 * @a mimetype1 and @a mimetype2; either or both of the values can 01686 * be NULL. The implementor can use this information to decide if 01687 * (or how) to generate differences. 01688 */ 01689 svn_error_t *(*file_deleted)(svn_wc_adm_access_t *adm_access, 01690 svn_wc_notify_state_t *state, 01691 svn_boolean_t *tree_conflicted, 01692 const char *path, 01693 const char *tmpfile1, 01694 const char *tmpfile2, 01695 const char *mimetype1, 01696 const char *mimetype2, 01697 apr_hash_t *originalprops, 01698 void *diff_baton); 01699 01700 /** 01701 * A directory @a path was added. @a rev is the revision that the 01702 * directory came from. 01703 */ 01704 svn_error_t *(*dir_added)(svn_wc_adm_access_t *adm_access, 01705 svn_wc_notify_state_t *state, 01706 svn_boolean_t *tree_conflicted, 01707 const char *path, 01708 svn_revnum_t rev, 01709 void *diff_baton); 01710 01711 /** 01712 * A directory @a path was deleted. 01713 */ 01714 svn_error_t *(*dir_deleted)(svn_wc_adm_access_t *adm_access, 01715 svn_wc_notify_state_t *state, 01716 svn_boolean_t *tree_conflicted, 01717 const char *path, 01718 void *diff_baton); 01719 01720 /** 01721 * A list of property changes (@a propchanges) was applied to the 01722 * directory @a path. 01723 * 01724 * The array is a list of (@c svn_prop_t) structures. 01725 * 01726 * The original list of properties is provided in @a original_props, 01727 * which is a hash of @c svn_string_t values, keyed on the property 01728 * name. 01729 */ 01730 svn_error_t *(*dir_props_changed)(svn_wc_adm_access_t *adm_access, 01731 svn_wc_notify_state_t *propstate, 01732 svn_boolean_t *tree_conflicted, 01733 const char *path, 01734 const apr_array_header_t *propchanges, 01735 apr_hash_t *original_props, 01736 void *diff_baton); 01737 01738 /** 01739 * A directory @a path has been opened. @a rev is the revision that the 01740 * directory came from. 01741 * 01742 * This function is called for @a path before any of the callbacks are 01743 * called for a child of @a path. 01744 */ 01745 svn_error_t *(*dir_opened)(svn_wc_adm_access_t *adm_access, 01746 svn_boolean_t *tree_conflicted, 01747 const char *path, 01748 svn_revnum_t rev, 01749 void *diff_baton); 01750 01751 /** 01752 * A directory @a path has been closed. 01753 */ 01754 svn_error_t *(*dir_closed)(svn_wc_adm_access_t *adm_access, 01755 svn_wc_notify_state_t *contentstate, 01756 svn_wc_notify_state_t *propstate, 01757 svn_boolean_t *tree_conflicted, 01758 const char *path, 01759 void *diff_baton); 01760 01761 } svn_wc_diff_callbacks3_t; 01762 01763 /** 01764 * Similar to @c svn_wc_diff_callbacks3_t, but without the dir_opened() 01765 * function, and without the 'tree_conflicted' argument to the functions. 01766 * 01767 * @deprecated Provided for backward compatibility with the 1.2 API. 01768 */ 01769 typedef struct svn_wc_diff_callbacks2_t 01770 { 01771 /** The same as @c file_changed in @c svn_wc_diff_callbacks3_t. */ 01772 svn_error_t *(*file_changed)(svn_wc_adm_access_t *adm_access, 01773 svn_wc_notify_state_t *contentstate, 01774 svn_wc_notify_state_t *propstate, 01775 const char *path, 01776 const char *tmpfile1, 01777 const char *tmpfile2, 01778 svn_revnum_t rev1, 01779 svn_revnum_t rev2, 01780 const char *mimetype1, 01781 const char *mimetype2, 01782 const apr_array_header_t *propchanges, 01783 apr_hash_t *originalprops, 01784 void *diff_baton); 01785 01786 /** The same as @c file_added in @c svn_wc_diff_callbacks3_t. */ 01787 svn_error_t *(*file_added)(svn_wc_adm_access_t *adm_access, 01788 svn_wc_notify_state_t *contentstate, 01789 svn_wc_notify_state_t *propstate, 01790 const char *path, 01791 const char *tmpfile1, 01792 const char *tmpfile2, 01793 svn_revnum_t rev1, 01794 svn_revnum_t rev2, 01795 const char *mimetype1, 01796 const char *mimetype2, 01797 const apr_array_header_t *propchanges, 01798 apr_hash_t *originalprops, 01799 void *diff_baton); 01800 01801 /** The same as @c file_deleted in @c svn_wc_diff_callbacks3_t. */ 01802 svn_error_t *(*file_deleted)(svn_wc_adm_access_t *adm_access, 01803 svn_wc_notify_state_t *state, 01804 const char *path, 01805 const char *tmpfile1, 01806 const char *tmpfile2, 01807 const char *mimetype1, 01808 const char *mimetype2, 01809 apr_hash_t *originalprops, 01810 void *diff_baton); 01811 01812 /** The same as @c dir_added in @c svn_wc_diff_callbacks3_t. */ 01813 svn_error_t *(*dir_added)(svn_wc_adm_access_t *adm_access, 01814 svn_wc_notify_state_t *state, 01815 const char *path, 01816 svn_revnum_t rev, 01817 void *diff_baton); 01818 01819 /** The same as @c dir_deleted in @c svn_wc_diff_callbacks3_t. */ 01820 svn_error_t *(*dir_deleted)(svn_wc_adm_access_t *adm_access, 01821 svn_wc_notify_state_t *state, 01822 const char *path, 01823 void *diff_baton); 01824 01825 /** The same as @c dir_props_changed in @c svn_wc_diff_callbacks3_t. */ 01826 svn_error_t *(*dir_props_changed)(svn_wc_adm_access_t *adm_access, 01827 svn_wc_notify_state_t *state, 01828 const char *path, 01829 const apr_array_header_t *propchanges, 01830 apr_hash_t *original_props, 01831 void *diff_baton); 01832 01833 } svn_wc_diff_callbacks2_t; 01834 01835 /** 01836 * Similar to @c svn_wc_diff_callbacks2_t, but with file additions/content 01837 * changes and property changes split into different functions. 01838 * 01839 * @deprecated Provided for backward compatibility with the 1.1 API. 01840 */ 01841 typedef struct svn_wc_diff_callbacks_t 01842 { 01843 /** Similar to @c file_changed in @c svn_wc_diff_callbacks2_t, but without 01844 * property change information. @a tmpfile2 is never NULL. @a state applies 01845 * to the file contents. */ 01846 svn_error_t *(*file_changed)(svn_wc_adm_access_t *adm_access, 01847 svn_wc_notify_state_t *state, 01848 const char *path, 01849 const char *tmpfile1, 01850 const char *tmpfile2, 01851 svn_revnum_t rev1, 01852 svn_revnum_t rev2, 01853 const char *mimetype1, 01854 const char *mimetype2, 01855 void *diff_baton); 01856 01857 /** Similar to @c file_added in @c svn_wc_diff_callbacks2_t, but without 01858 * property change information. @a *state applies to the file contents. */ 01859 svn_error_t *(*file_added)(svn_wc_adm_access_t *adm_access, 01860 svn_wc_notify_state_t *state, 01861 const char *path, 01862 const char *tmpfile1, 01863 const char *tmpfile2, 01864 svn_revnum_t rev1, 01865 svn_revnum_t rev2, 01866 const char *mimetype1, 01867 const char *mimetype2, 01868 void *diff_baton); 01869 01870 /** Similar to @c file_deleted in @c svn_wc_diff_callbacks2_t, but without 01871 * the properties. */ 01872 svn_error_t *(*file_deleted)(svn_wc_adm_access_t *adm_access, 01873 svn_wc_notify_state_t *state, 01874 const char *path, 01875 const char *tmpfile1, 01876 const char *tmpfile2, 01877 const char *mimetype1, 01878 const char *mimetype2, 01879 void *diff_baton); 01880 01881 /** The same as @c dir_added in @c svn_wc_diff_callbacks2_t. */ 01882 svn_error_t *(*dir_added)(svn_wc_adm_access_t *adm_access, 01883 svn_wc_notify_state_t *state, 01884 const char *path, 01885 svn_revnum_t rev, 01886 void *diff_baton); 01887 01888 /** The same as @c dir_deleted in @c svn_wc_diff_callbacks2_t. */ 01889 svn_error_t *(*dir_deleted)(svn_wc_adm_access_t *adm_access, 01890 svn_wc_notify_state_t *state, 01891 const char *path, 01892 void *diff_baton); 01893 01894 /** Similar to @c dir_props_changed in @c svn_wc_diff_callbacks2_t, but this 01895 * function is called for files as well as directories. */ 01896 svn_error_t *(*props_changed)(svn_wc_adm_access_t *adm_access, 01897 svn_wc_notify_state_t *state, 01898 const char *path, 01899 const apr_array_header_t *propchanges, 01900 apr_hash_t *original_props, 01901 void *diff_baton); 01902 01903 } svn_wc_diff_callbacks_t; 01904 01905 01906 /* Asking questions about a working copy. */ 01907 01908 /** Set @a *wc_format to @a path's working copy format version number if 01909 * @a path is a valid working copy directory, else set it to 0. 01910 * Return error @c APR_ENOENT if @a path does not exist at all. 01911 */ 01912 svn_error_t * 01913 svn_wc_check_wc(const char *path, 01914 int *wc_format, 01915 apr_pool_t *pool); 01916 01917 01918 /** Set @a *has_binary_prop to @c TRUE iff @a path has been marked 01919 * with a property indicating that it is non-text (in other words, binary). 01920 * @a adm_access is an access baton set that contains @a path. 01921 */ 01922 svn_error_t * 01923 svn_wc_has_binary_prop(svn_boolean_t *has_binary_prop, 01924 const char *path, 01925 svn_wc_adm_access_t *adm_access, 01926 apr_pool_t *pool); 01927 01928 01929 /* Detecting modification. */ 01930 01931 /** Set @a *modified_p to non-zero if @a filename's text is modified 01932 * with regard to the base revision, else set @a *modified_p to zero. 01933 * @a filename is a path to the file, not just a basename. @a adm_access 01934 * must be an access baton for @a filename. 01935 * 01936 * If @a force_comparison is @c TRUE, this function will not allow 01937 * early return mechanisms that avoid actual content comparison. 01938 * Instead, if there is a text base, a full byte-by-byte comparison 01939 * will be done, and the entry checksum verified as well. (This means 01940 * that if the text base is much longer than the working file, every 01941 * byte of the text base will still be examined.) 01942 * 01943 * If @a filename does not exist, consider it unmodified. If it exists 01944 * but is not under revision control (not even scheduled for 01945 * addition), return the error @c SVN_ERR_ENTRY_NOT_FOUND. 01946 * 01947 * If @a filename is unmodified but has a timestamp variation then this 01948 * function may "repair" @a filename's text-time by setting it to 01949 * @a filename's last modification time. 01950 */ 01951 svn_error_t * 01952 svn_wc_text_modified_p(svn_boolean_t *modified_p, 01953 const char *filename, 01954 svn_boolean_t force_comparison, 01955 svn_wc_adm_access_t *adm_access, 01956 apr_pool_t *pool); 01957 01958 01959 /** Set @a *modified_p to non-zero if @a path's properties are modified 01960 * with regard to the base revision, else set @a modified_p to zero. 01961 * @a adm_access must be an access baton for @a path. 01962 */ 01963 svn_error_t * 01964 svn_wc_props_modified_p(svn_boolean_t *modified_p, 01965 const char *path, 01966 svn_wc_adm_access_t *adm_access, 01967 apr_pool_t *pool); 01968 01969 01970 01971 01972 /** Administrative subdir. 01973 * 01974 * Ideally, this would be completely private to wc internals (in fact, 01975 * it used to be that adm_subdir() in adm_files.c was the only function 01976 * who knew the adm subdir's name). However, import wants to protect 01977 * against importing administrative subdirs, so now the name is a 01978 * matter of public record. 01979 * 01980 * @deprecated Provided for backward compatibility with the 1.2 API. 01981 */ 01982 #define SVN_WC_ADM_DIR_NAME ".svn" 01983 01984 01985 01986 /* Entries and status. */ 01987 01988 /** The schedule states an entry can be in. */ 01989 typedef enum svn_wc_schedule_t 01990 { 01991 /** Nothing special here */ 01992 svn_wc_schedule_normal, 01993 01994 /** Slated for addition */ 01995 svn_wc_schedule_add, 01996 01997 /** Slated for deletion */ 01998 svn_wc_schedule_delete, 01999 02000 /** Slated for replacement (delete + add) */ 02001 svn_wc_schedule_replace 02002 02003 } svn_wc_schedule_t; 02004 02005 02006 /** 02007 * Values for the working_size field in svn_wc_entry_t 02008 * when it isn't set to the actual size value of the unchanged 02009 * working file. 02010 * 02011 * @defgroup svn_wc_entry_working_size_constants Working size constants 02012 * 02013 * @{ 02014 */ 02015 02016 /** The value of the working size is unknown (hasn't been 02017 * calculated and stored in the past for whatever reason). 02018 * 02019 * @since New in 1.5 02020 */ 02021 #define SVN_WC_ENTRY_WORKING_SIZE_UNKNOWN (-1) 02022 02023 /** @} */ 02024 02025 /** A working copy entry -- that is, revision control information about 02026 * one versioned entity. 02027 */ 02028 typedef struct svn_wc_entry_t 02029 { 02030 /* IMPORTANT: If you extend this structure, add new fields to the end. */ 02031 02032 /* General Attributes */ 02033 02034 /** entry's name */ 02035 const char *name; 02036 02037 /** base revision */ 02038 svn_revnum_t revision; 02039 02040 /** url in repository */ 02041 const char *url; 02042 02043 /** canonical repository URL or NULL if not known */ 02044 const char *repos; 02045 02046 /** repository uuid */ 02047 const char *uuid; 02048 02049 /** node kind (file, dir, ...) */ 02050 svn_node_kind_t kind; 02051 02052 /* State information */ 02053 02054 /** scheduling (add, delete, replace ...) */ 02055 svn_wc_schedule_t schedule; 02056 02057 /** in a copied state (possibly because the entry is a child of a 02058 * path that is @c svn_wc_schedule_add or @c svn_wc_schedule_replace, 02059 * when the entry itself is @c svn_wc_schedule_normal). 02060 * COPIED is true for nodes under a directory that was copied, but 02061 * COPYFROM_URL is null there. They are both set for the root 02062 * destination of the copy. 02063 */ 02064 svn_boolean_t copied; 02065 02066 /** The directory containing this entry had a versioned child of this 02067 * name, but this entry represents a different revision or a switched 02068 * path at which no item exists in the repository. This typically 02069 * arises from committing or updating to a deletion of this entry 02070 * without committing or updating the parent directory. 02071 * 02072 * The schedule can be 'normal' or 'add'. */ 02073 svn_boolean_t deleted; 02074 02075 /** absent -- we know an entry of this name exists, but that's all 02076 (usually this happens because of authz restrictions) */ 02077 svn_boolean_t absent; 02078 02079 /** for THIS_DIR entry, implies whole entries file is incomplete */ 02080 svn_boolean_t incomplete; 02081 02082 /** copyfrom location */ 02083 const char *copyfrom_url; 02084 02085 /** copyfrom revision */ 02086 svn_revnum_t copyfrom_rev; 02087 02088 /** old version of conflicted file. A file basename, relative to the 02089 * user's directory that the THIS_DIR entry refers to. */ 02090 const char *conflict_old; 02091 02092 /** new version of conflicted file. A file basename, relative to the 02093 * user's directory that the THIS_DIR entry refers to. */ 02094 const char *conflict_new; 02095 02096 /** working version of conflicted file. A file basename, relative to the 02097 * user's directory that the THIS_DIR entry refers to. */ 02098 const char *conflict_wrk; 02099 02100 /** property reject file. A file basename, relative to the user's 02101 * directory that the THIS_DIR entry refers to. */ 02102 const char *prejfile; 02103 02104 /** last up-to-date time for text contents (0 means no information available) 02105 */ 02106 apr_time_t text_time; 02107 02108 /** last up-to-date time for properties (0 means no information available) 02109 * 02110 * @deprecated This value will always be 0 in version 1.4 and later. 02111 */ 02112 apr_time_t prop_time; 02113 02114 /** Hex MD5 checksum for the untranslated text base file, 02115 * can be @c NULL for backwards compatibility. 02116 */ 02117 const char *checksum; 02118 02119 /* "Entry props" */ 02120 02121 /** last revision this was changed */ 02122 svn_revnum_t cmt_rev; 02123 02124 /** last date this was changed */ 02125 apr_time_t cmt_date; 02126 02127 /** last commit author of this item */ 02128 const char *cmt_author; 02129 02130 /** lock token or NULL if path not locked in this WC 02131 * @since New in 1.2. 02132 */ 02133 const char *lock_token; 02134 02135 /** lock owner, or NULL if not locked in this WC 02136 * @since New in 1.2. 02137 */ 02138 const char *lock_owner; 02139 02140 /** lock comment or NULL if not locked in this WC or no comment 02141 * @since New in 1.2. 02142 */ 02143 const char *lock_comment; 02144 02145 /** Lock creation date or 0 if not locked in this WC 02146 * @since New in 1.2. 02147 */ 02148 apr_time_t lock_creation_date; 02149 02150 /** Whether this entry has any working properties. 02151 * False if this information is not stored in the entry. 02152 * 02153 * @since New in 1.4. */ 02154 svn_boolean_t has_props; 02155 02156 /** Whether this entry has property modifications. 02157 * 02158 * @note For working copies in older formats, this flag is not valid. 02159 * 02160 * @see svn_wc_props_modified_p(). 02161 * 02162 * @since New in 1.4. */ 02163 svn_boolean_t has_prop_mods; 02164 02165 /** A space-separated list of all properties whose presence/absence is cached 02166 * in this entry. 02167 * 02168 * @see @c present_props. 02169 * 02170 * @since New in 1.4. 02171 * @deprecated This value will always be "" in version 1.7 and later. */ 02172 const char *cachable_props; 02173 02174 /** Cached property existence for this entry. 02175 * This is a space-separated list of property names. If a name exists in 02176 * @c cachable_props but not in this list, this entry does not have that 02177 * property. If a name exists in both lists, the property is present on this 02178 * entry. 02179 * 02180 * @since New in 1.4. 02181 * @deprecated This value will always be "" in version 1.7 and later. */ 02182 const char *present_props; 02183 02184 /** which changelist this item is part of, or NULL if not part of any. 02185 * @since New in 1.5. 02186 */ 02187 const char *changelist; 02188 02189 /** Size of the file after being translated into local 02190 * representation, or @c SVN_WC_ENTRY_WORKING_SIZE_UNKNOWN if 02191 * unknown. 02192 * 02193 * @since New in 1.5. 02194 */ 02195 apr_off_t working_size; 02196 02197 /** Whether a local copy of this entry should be kept in the working copy 02198 * after a deletion has been committed, Only valid for the this-dir entry 02199 * when it is scheduled for deletion. 02200 * 02201 * @since New in 1.5. */ 02202 svn_boolean_t keep_local; 02203 02204 /** The depth of this entry. 02205 * 02206 * ### It's a bit annoying that we only use this on this_dir 02207 * ### entries, yet it will exist (with value svn_depth_infinity) on 02208 * ### all entries. Maybe some future extensibility would make this 02209 * ### field meaningful on entries besides this_dir. 02210 * 02211 * @since New in 1.5. */ 02212 svn_depth_t depth; 02213 02214 /** Serialized data for all of the tree conflicts detected in this_dir. 02215 * 02216 * @since New in 1.6. */ 02217 const char *tree_conflict_data; 02218 02219 /** The entry is a intra-repository file external and this is the 02220 * repository root relative path to the file specified in the 02221 * externals definition, otherwise NULL if the entry is not a file 02222 * external. 02223 * 02224 * @since New in 1.6. */ 02225 const char *file_external_path; 02226 02227 /** The entry is a intra-repository file external and this is the 02228 * peg revision number specified in the externals definition. This 02229 * field is only valid when the file_external_path field is 02230 * non-NULL. The only permissible values are 02231 * svn_opt_revision_unspecified if the entry is not an external, 02232 * svn_opt_revision_head if the external revision is unspecified or 02233 * specified with -r HEAD or svn_opt_revision_number for a specific 02234 * revision number. 02235 * 02236 * @since New in 1.6. */ 02237 svn_opt_revision_t file_external_peg_rev; 02238 02239 /** The entry is a intra-repository file external and this is the 02240 * operative revision number specified in the externals definition. 02241 * This field is only valid when the file_external_path field is 02242 * non-NULL. The only permissible values are 02243 * svn_opt_revision_unspecified if the entry is not an external, 02244 * svn_opt_revision_head if the external revision is unspecified or 02245 * specified with -r HEAD or svn_opt_revision_number for a specific 02246 * revision number. 02247 * 02248 * @since New in 1.6. */ 02249 svn_opt_revision_t file_external_rev; 02250 02251 /* IMPORTANT: If you extend this structure, check the following functions in 02252 * subversion/libsvn_wc/entries.c, to see if you need to extend them as well. 02253 * 02254 * svn_wc__atts_to_entry() 02255 * svn_wc_entry_dup() 02256 * alloc_entry() 02257 * read_entry() 02258 * write_entry() 02259 * fold_entry() 02260 */ 02261 } svn_wc_entry_t; 02262 02263 02264 /** How an entries file's owner dir is named in the entries file. */ 02265 #define SVN_WC_ENTRY_THIS_DIR "" 02266 02267 02268 /** Set @a *entry to an entry for @a path, allocated in the access baton pool. 02269 * If @a show_hidden is TRUE, return the entry even if it's in 'excluded', 02270 * 'deleted' or 'absent' state. Excluded entries are those with their depth 02271 * set to @c svn_depth_exclude. If @a path is not under revision control, or 02272 * if entry is hidden, not scheduled for re-addition, and @a show_hidden is @c 02273 * FALSE, then set @a *entry to @c NULL. 02274 * 02275 * @a *entry should not be modified, since doing so modifies the entries 02276 * cache in @a adm_access without changing the entries file on disk. 02277 * 02278 * If @a path is not a directory then @a adm_access must be an access baton 02279 * for the parent directory of @a path. To avoid needing to know whether 02280 * @a path is a directory or not, if @a path is a directory @a adm_access 02281 * can still be an access baton for the parent of @a path so long as the 02282 * access baton for @a path itself is in the same access baton set. 02283 * 02284 * @a path can be relative or absolute but must share the same base used 02285 * to open @a adm_access. 02286 * 02287 * Note that it is possible for @a path to be absent from disk but still 02288 * under revision control; and conversely, it is possible for @a path to 02289 * be present, but not under revision control. 02290 * 02291 * Use @a pool only for local processing. 02292 */ 02293 svn_error_t * 02294 svn_wc_entry(const svn_wc_entry_t **entry, 02295 const char *path, 02296 svn_wc_adm_access_t *adm_access, 02297 svn_boolean_t show_hidden, 02298 apr_pool_t *pool); 02299 02300 02301 /** Parse the `entries' file for @a adm_access and return a hash @a entries, 02302 * whose keys are (<tt>const char *</tt>) entry names and values are 02303 * (<tt>svn_wc_entry_t *</tt>). The hash @a entries, and its keys and 02304 * values, are allocated from the pool used to open the @a adm_access 02305 * baton (that's how the entries caching works). @a pool is used for 02306 * transient allocations. 02307 * 02308 * Entries that are in a 'excluded', 'deleted' or 'absent' state (and not 02309 * scheduled for re-addition) are not returned in the hash, unless 02310 * @a show_hidden is TRUE. Excluded entries are those with their depth set to 02311 * @c svn_depth_exclude. 02312 * 02313 * @par Important: 02314 * The @a entries hash is the entries cache in @a adm_access 02315 * and so usually the hash itself, the keys and the values should be treated 02316 * as read-only. If any of these are modified then it is the caller's 02317 * responsibility to ensure that the entries file on disk is updated. Treat 02318 * the hash values as type (<tt>const svn_wc_entry_t *</tt>) if you wish to 02319 * avoid accidental modification. Modifying the schedule member is a 02320 * particularly bad idea, as the entries writing process relies on having 02321 * access to the original schedule. Use a duplicate entry to modify the 02322 * schedule. 02323 * 02324 * @par Important: 02325 * Only the entry structures representing files and 02326 * @c SVN_WC_ENTRY_THIS_DIR contain complete information. The entry 02327 * structures representing subdirs have only the `kind' and `state' 02328 * fields filled in. If you want info on a subdir, you must use this 02329 * routine to open its @a path and read the @c SVN_WC_ENTRY_THIS_DIR 02330 * structure, or call svn_wc_entry() on its @a path. 02331 */ 02332 svn_error_t * 02333 svn_wc_entries_read(apr_hash_t **entries, 02334 svn_wc_adm_access_t *adm_access, 02335 svn_boolean_t show_hidden, 02336 apr_pool_t *pool); 02337 02338 02339 /** Return a duplicate of @a entry, allocated in @a pool. No part of the new 02340 * entry will be shared with @a entry. 02341 */ 02342 svn_wc_entry_t * 02343 svn_wc_entry_dup(const svn_wc_entry_t *entry, 02344 apr_pool_t *pool); 02345 02346 02347 /** Given a @a path in a dir under version control, decide if it is in a 02348 * state of conflict; return the answers in @a *text_conflicted_p, @a 02349 * *prop_conflicted_p, and @a *tree_conflicted_p. If one or two of the 02350 * answers are uninteresting, simply pass @c NULL pointers for those. 02351 * 02352 * If @a path is unversioned or does not exist, @a *text_conflicted_p and 02353 * @a *prop_conflicted_p will be @c FALSE if non-NULL. 02354 * 02355 * @a adm_access is the admin access baton of the parent directory. 02356 * 02357 * If the @a path has corresponding text conflict files (with suffix .mine, 02358 * .theirs, etc.) that cannot be found, assume that the text conflict has 02359 * been resolved by the user and return @c FALSE in @a *text_conflicted_p. 02360 * 02361 * Similarly, if a property conflicts file (.prej suffix) is said to exist, 02362 * but it cannot be found, assume that the property conflicts have been 02363 * resolved by the user and return @c FALSE in @a *prop_conflicted_p. 02364 * 02365 * @a *tree_conflicted_p can't be auto-resolved in this fashion. An 02366 * explicit `resolved' is needed. 02367 * 02368 * @since New in 1.6. 02369 */ 02370 svn_error_t * 02371 svn_wc_conflicted_p2(svn_boolean_t *text_conflicted_p, 02372 svn_boolean_t *prop_conflicted_p, 02373 svn_boolean_t *tree_conflicted_p, 02374 const char *path, 02375 svn_wc_adm_access_t *adm_access, 02376 apr_pool_t *pool); 02377 02378 /** Given a @a dir_path under version control, decide if one of its entries 02379 * (@a entry) is in a state of conflict; return the answers in @a 02380 * text_conflicted_p and @a prop_conflicted_p. These pointers must not be 02381 * null. 02382 * 02383 * If the @a entry mentions that text conflict files (with suffix .mine, 02384 * .theirs, etc.) exist, but they cannot be found, assume the text conflict 02385 * has been resolved by the user and return FALSE in @a *text_conflicted_p. 02386 * 02387 * Similarly, if the @a entry mentions that a property conflicts file (.prej 02388 * suffix) exists, but it cannot be found, assume the property conflicts 02389 * have been resolved by the user and return FALSE in @a *prop_conflicted_p. 02390 * 02391 * The @a entry is not updated. 02392 * 02393 * @deprecated Provided for backward compatibility with the 1.5 API. 02394 */ 02395 SVN_DEPRECATED 02396 svn_error_t * 02397 svn_wc_conflicted_p(svn_boolean_t *text_conflicted_p, 02398 svn_boolean_t *prop_conflicted_p, 02399 const char *dir_path, 02400 const svn_wc_entry_t *entry, 02401 apr_pool_t *pool); 02402 02403 /** Set @a *url and @a *rev to the ancestor URL and revision for @a path, 02404 * allocating in @a pool. @a adm_access must be an access baton for @a path. 02405 * 02406 * If @a url or @a rev is NULL, then ignore it (just don't return the 02407 * corresponding information). 02408 */ 02409 svn_error_t * 02410 svn_wc_get_ancestry(char **url, 02411 svn_revnum_t *rev, 02412 const char *path, 02413 svn_wc_adm_access_t *adm_access, 02414 apr_pool_t *pool); 02415 02416 02417 /** A callback vtable invoked by the generic entry-walker function. 02418 * @since New in 1.5. 02419 */ 02420 typedef struct svn_wc_entry_callbacks2_t 02421 { 02422 /** An @a entry was found at @a path. */ 02423 svn_error_t *(*found_entry)(const char *path, 02424 const svn_wc_entry_t *entry, 02425 void *walk_baton, 02426 apr_pool_t *pool); 02427 02428 /** Handle the error @a err encountered while processing @a path. 02429 * Wrap or squelch @a err as desired, and return an @c svn_error_t 02430 * *, or @c SVN_NO_ERROR. 02431 */ 02432 svn_error_t *(*handle_error)(const char *path, 02433 svn_error_t *err, 02434 void *walk_baton, 02435 apr_pool_t *pool); 02436 02437 } svn_wc_entry_callbacks2_t; 02438 02439 /** @deprecated Provided for backward compatibility with the 1.4 API. */ 02440 typedef struct svn_wc_entry_callbacks_t 02441 { 02442 /** An @a entry was found at @a path. */ 02443 svn_error_t *(*found_entry)(const char *path, 02444 const svn_wc_entry_t *entry, 02445 void *walk_baton, 02446 apr_pool_t *pool); 02447 02448 } svn_wc_entry_callbacks_t; 02449 02450 /** 02451 * A generic entry-walker. 02452 * 02453 * Do a potentially recursive depth-first entry-walk beginning on 02454 * @a path, which can be a file or dir. Call callbacks in 02455 * @a walk_callbacks, passing @a walk_baton to each. Use @a pool for 02456 * looping, recursion, and to allocate all entries returned. 02457 * @a adm_access must be an access baton for @a path. 02458 * 02459 * If @a depth is @c svn_depth_empty, invoke the callbacks on @a path 02460 * and return without recursing further. If @c svn_depth_files, do 02461 * the same and invoke the callbacks on file children (if any) of 02462 * @a path, then return. If @c svn_depth_immediates, do the preceding 02463 * but also invoke callbacks on immediate subdirectories, then return. 02464 * If @c svn_depth_infinity, recurse fully starting from @a path. 02465 * 02466 * If @a cancel_func is non-NULL, call it with @a cancel_baton to determine 02467 * if the client has cancelled the operation. 02468 * 02469 * Like our other entries interfaces, entries that are in a 'excluded', 02470 * 'deleted' or 'absent' state (and not scheduled for re-addition) are not 02471 * discovered, unless @a show_hidden is TRUE. Excluded entries are those with 02472 * their depth set to @c svn_depth_exclude. 02473 * 02474 * When a new directory is entered, @c SVN_WC_ENTRY_THIS_DIR will always 02475 * be returned first. 02476 * 02477 * @note Callers should be aware that each directory will be 02478 * returned *twice*: first as an entry within its parent, and 02479 * subsequently as the '.' entry within itself. The two calls can be 02480 * distinguished by looking for @c SVN_WC_ENTRY_THIS_DIR in the 'name' 02481 * field of the entry. 02482 * 02483 * @since New in 1.5. 02484 */ 02485 svn_error_t * 02486 svn_wc_walk_entries3(const char *path, 02487 svn_wc_adm_access_t *adm_access, 02488 const svn_wc_entry_callbacks2_t *walk_callbacks, 02489 void *walk_baton, 02490 svn_depth_t depth, 02491 svn_boolean_t show_hidden, 02492 svn_cancel_func_t cancel_func, 02493 void *cancel_baton, 02494 apr_pool_t *pool); 02495 02496 /** 02497 * Similar to svn_wc_walk_entries3(), but without cancellation support 02498 * or error handling from @a walk_callbacks, and with @a depth always 02499 * set to @c svn_depth_infinity. 02500 * 02501 * @deprecated Provided for backward compatibility with the 1.4 API. 02502 */ 02503 SVN_DEPRECATED 02504 svn_error_t * 02505 svn_wc_walk_entries2(const char *path, 02506 svn_wc_adm_access_t *adm_access, 02507 const svn_wc_entry_callbacks_t *walk_callbacks, 02508 void *walk_baton, 02509 svn_boolean_t show_hidden, 02510 svn_cancel_func_t cancel_func, 02511 void *cancel_baton, 02512 apr_pool_t *pool); 02513 02514 /** 02515 * Similar to svn_wc_walk_entries2(), but without cancellation support. 02516 * 02517 * @deprecated Provided for backward compatibility with the 1.0 API. 02518 */ 02519 SVN_DEPRECATED 02520 svn_error_t * 02521 svn_wc_walk_entries(const char *path, 02522 svn_wc_adm_access_t *adm_access, 02523 const svn_wc_entry_callbacks_t *walk_callbacks, 02524 void *walk_baton, 02525 svn_boolean_t show_hidden, 02526 apr_pool_t *pool); 02527 02528 02529 /** Mark missing @a path as 'deleted' in its @a parent's list of entries. 02530 * 02531 * Return @c SVN_ERR_WC_PATH_FOUND if @a path isn't actually missing. 02532 */ 02533 svn_error_t * 02534 svn_wc_mark_missing_deleted(const char *path, 02535 svn_wc_adm_access_t *parent, 02536 apr_pool_t *pool); 02537 02538 02539 /** Ensure that an administrative area exists for @a path, so that @a 02540 * path is a working copy subdir based on @a url at @a revision, with 02541 * depth @a depth, and with repository UUID @a uuid and repository 02542 * root URL @a repos. 02543 * 02544 * @a depth must be a definite depth, it cannot be @c svn_depth_unknown. 02545 * @a uuid and @a repos may be @c NULL. If non-@c NULL, @a repos must 02546 * be a prefix of @a url. 02547 * 02548 * If the administrative area does not exist, then create it and 02549 * initialize it to an unlocked state. 02550 * 02551 * If the administrative area already exists then the given @a url 02552 * must match the URL in the administrative area and the given 02553 * @a revision must match the BASE of the working copy dir unless 02554 * the admin directory is scheduled for deletion or the 02555 * SVN_ERR_WC_OBSTRUCTED_UPDATE error will be returned. 02556 * 02557 * Do not ensure existence of @a path itself; if @a path does not 02558 * exist, return error. 02559 * 02560 * @since New in 1.5. 02561 */ 02562 svn_error_t * 02563 svn_wc_ensure_adm3(const char *path, 02564 const char *uuid, 02565 const char *url, 02566 const char *repos, 02567 svn_revnum_t revision, 02568 svn_depth_t depth, 02569 apr_pool_t *pool); 02570 02571 02572 /** 02573 * Similar to svn_wc_ensure_adm3(), but with @a depth set to 02574 * @c svn_depth_infinity. 02575 * 02576 * @deprecated Provided for backwards compatibility with the 1.4 API. 02577 * 02578 * @since New in 1.3. 02579 */ 02580 SVN_DEPRECATED 02581 svn_error_t * 02582 svn_wc_ensure_adm2(const char *path, 02583 const char *uuid, 02584 const char *url, 02585 const char *repos, 02586 svn_revnum_t revision, 02587 apr_pool_t *pool); 02588 02589 02590 /** 02591 * Similar to svn_wc_ensure_adm2(), but with @a repos set to @c NULL. 02592 * 02593 * @deprecated Provided for backwards compatibility with the 1.2 API. 02594 */ 02595 SVN_DEPRECATED 02596 svn_error_t * 02597 svn_wc_ensure_adm(const char *path, 02598 const char *uuid, 02599 const char *url, 02600 svn_revnum_t revision, 02601 apr_pool_t *pool); 02602 02603 02604 /** Set the repository root URL of @a path to @a repos, if possible. 02605 * 02606 * @a adm_access must contain @a path and be write-locked, if @a path 02607 * is versioned. Return no error if path is missing or unversioned. 02608 * Use @a pool for temporary allocations. 02609 * 02610 * @note In some circumstances, the repository root can't be set 02611 * without making the working copy corrupt. In such cases, this 02612 * function just returns no error, without modifying the @a path entry. 02613 * 02614 * @note This function exists to make it possible to try to set the repository 02615 * root in old working copies; new working copies normally get this set at 02616 * creation time. 02617 * 02618 * @since New in 1.3. 02619 */ 02620 svn_error_t * 02621 svn_wc_maybe_set_repos_root(svn_wc_adm_access_t *adm_access, 02622 const char *path, 02623 const char *repos, 02624 apr_pool_t *pool); 02625 02626 02627 /** 02628 * @defgroup svn_wc_status Working copy status. 02629 * @{ 02630 * 02631 * We have two functions for getting working copy status: one function 02632 * for getting the status of exactly one thing, and another for 02633 * getting the statuses of (potentially) multiple things. 02634 * 02635 * The concept of depth, as explained in the documentation for 02636 * svn_depth_t, may be useful in understanding this. Suppose we're 02637 * getting the status of directory D: 02638 * 02639 * To offer all three levels, we could have one unified function, 02640 * taking a `depth' parameter. Unfortunately, because this function 02641 * would have to handle multiple return values as well as the single 02642 * return value case, getting the status of just one entity would 02643 * become cumbersome: you'd have to roll through a hash to find one 02644 * lone status. 02645 * 02646 * So we have svn_wc_status() for depth-empty (just D itself), and 02647 * svn_wc_get_status_editor() for depth-immediates and depth-infinity, 02648 * since the latter two involve multiple return values. 02649 * 02650 * @note The status structures may contain a @c NULL ->entry field. 02651 * This indicates an item that is not versioned in the working copy. 02652 */ 02653 02654 /** The type of status for the working copy. */ 02655 enum svn_wc_status_kind 02656 { 02657 /** does not exist */ 02658 svn_wc_status_none = 1, 02659 02660 /** is not a versioned thing in this wc */ 02661 svn_wc_status_unversioned, 02662 02663 /** exists, but uninteresting */ 02664 svn_wc_status_normal, 02665 02666 /** is scheduled for addition */ 02667 svn_wc_status_added, 02668 02669 /** under v.c., but is missing */ 02670 svn_wc_status_missing, 02671 02672 /** scheduled for deletion */ 02673 svn_wc_status_deleted, 02674 02675 /** was deleted and then re-added */ 02676 svn_wc_status_replaced, 02677 02678 /** text or props have been modified */ 02679 svn_wc_status_modified, 02680 02681 /** local mods received repos mods */ 02682 svn_wc_status_merged, 02683 02684 /** local mods received conflicting repos mods */ 02685 svn_wc_status_conflicted, 02686 02687 /** is unversioned but configured to be ignored */ 02688 svn_wc_status_ignored, 02689 02690 /** an unversioned resource is in the way of the versioned resource */ 02691 svn_wc_status_obstructed, 02692 02693 /** an unversioned directory path populated by an svn:externals 02694 property; this status is not used for file externals */ 02695 svn_wc_status_external, 02696 02697 /** a directory doesn't contain a complete entries list */ 02698 svn_wc_status_incomplete 02699 }; 02700 02701 /** 02702 * Structure for holding the "status" of a working copy item. 02703 * 02704 * The item's entry data is in @a entry, augmented and possibly shadowed 02705 * by the other fields. @a entry is @c NULL if this item is not under 02706 * version control. 02707 * 02708 * @note Fields may be added to the end of this structure in future 02709 * versions. Therefore, to preserve binary compatibility, users 02710 * should not directly allocate structures of this type. 02711 * 02712 * @since New in 1.2. 02713 */ 02714 typedef struct svn_wc_status2_t 02715 { 02716 /** Can be @c NULL if not under version control. */ 02717 svn_wc_entry_t *entry; 02718 02719 /** The status of the entries text. */ 02720 enum svn_wc_status_kind text_status; 02721 02722 /** The status of the entries properties. */ 02723 enum svn_wc_status_kind prop_status; 02724 02725 /** a directory can be 'locked' if a working copy update was interrupted. */ 02726 svn_boolean_t locked; 02727 02728 /** a file or directory can be 'copied' if it's scheduled for 02729 * addition-with-history (or part of a subtree that is scheduled as such.). 02730 */ 02731 svn_boolean_t copied; 02732 02733 /** a file or directory can be 'switched' if the switch command has been 02734 * used. If this is TRUE, then file_external will be FALSE. 02735 */ 02736 svn_boolean_t switched; 02737 02738 /** The entry's text status in the repository. */ 02739 enum svn_wc_status_kind repos_text_status; 02740 02741 /** The entry's property status in the repository. */ 02742 enum svn_wc_status_kind repos_prop_status; 02743 02744 /** The entry's lock in the repository, if any. */ 02745 svn_lock_t *repos_lock; 02746 02747 /** Set to the URI (actual or expected) of the item. 02748 * @since New in 1.3 02749 */ 02750 const char *url; 02751 02752 /** 02753 * @defgroup svn_wc_status_ood WC out-of-date info from the repository 02754 * @{ 02755 * 02756 * When the working copy item is out-of-date compared to the 02757 * repository, the following fields represent the state of the 02758 * youngest revision of the item in the repository. If the working 02759 * copy is not out of date, the fields are initialized as described 02760 * below. 02761 */ 02762 02763 /** Set to the youngest committed revision, or @c SVN_INVALID_REVNUM 02764 * if not out of date. 02765 * @since New in 1.3 02766 */ 02767 svn_revnum_t ood_last_cmt_rev; 02768 02769 /** Set to the most recent commit date, or @c 0 if not out of date. 02770 * @since New in 1.3 02771 */ 02772 apr_time_t ood_last_cmt_date; 02773 02774 /** Set to the node kind of the youngest commit, or @c svn_node_none 02775 * if not out of date. 02776 * @since New in 1.3 02777 */ 02778 svn_node_kind_t ood_kind; 02779 02780 /** Set to the user name of the youngest commit, or @c NULL if not 02781 * out of date or non-existent. Because a non-existent @c 02782 * svn:author property has the same behavior as an out-of-date 02783 * working copy, examine @c ood_last_cmt_rev to determine whether 02784 * the working copy is out of date. 02785 * @since New in 1.3 02786 */ 02787 const char *ood_last_cmt_author; 02788 02789 /** @} */ 02790 02791 /** Non-NULL if the entry is the victim of a tree conflict. 02792 * @since New in 1.6 02793 */ 02794 svn_wc_conflict_description_t *tree_conflict; 02795 02796 /** If the item is a file that was added to the working copy with an 02797 * svn:externals; if file_external is TRUE, then switched is always 02798 * FALSE. 02799 * @since New in 1.6 02800 */ 02801 svn_boolean_t file_external; 02802 02803 /** The actual status of the text compared to the pristine base of the 02804 * file. This value isn't masked by other working copy statuses. 02805 * @c pristine_text_status is @c svn_wc_status_none if this value was 02806 * not calculated during the status walk. 02807 * @since New in 1.6 02808 */ 02809 enum svn_wc_status_kind pristine_text_status; 02810 02811 /** The actual status of the properties compared to the pristine base of 02812 * the node. This value isn't masked by other working copy statuses. 02813 * @c pristine_prop_status is @c svn_wc_status_none if this value was 02814 * not calculated during the status walk. 02815 * @since New in 1.6 02816 */ 02817 enum svn_wc_status_kind pristine_prop_status; 02818 02819 /* NOTE! Please update svn_wc_dup_status2() when adding new fields here. */ 02820 } svn_wc_status2_t; 02821 02822 02823 02824 /** 02825 * Same as @c svn_wc_status2_t, but without the svn_lock_t 'repos_lock' field. 02826 * 02827 * @deprecated Provided for backward compatibility with the 1.1 API. 02828 */ 02829 typedef struct svn_wc_status_t 02830 { 02831 /** Can be @c NULL if not under version control. */ 02832 svn_wc_entry_t *entry; 02833 02834 /** The status of the entries text. */ 02835 enum svn_wc_status_kind text_status; 02836 02837 /** The status of the entries properties. */ 02838 enum svn_wc_status_kind prop_status; 02839 02840 /** a directory can be 'locked' if a working copy update was interrupted. */ 02841 svn_boolean_t locked; 02842 02843 /** a file or directory can be 'copied' if it's scheduled for 02844 * addition-with-history (or part of a subtree that is scheduled as such.). 02845 */ 02846 svn_boolean_t copied; 02847 02848 /** a file or directory can be 'switched' if the switch command has been 02849 * used. 02850 */ 02851 svn_boolean_t switched; 02852 02853 /** The entry's text status in the repository. */ 02854 enum svn_wc_status_kind repos_text_status; 02855 02856 /** The entry's property status in the repository. */ 02857 enum svn_wc_status_kind repos_prop_status; 02858 02859 } svn_wc_status_t; 02860 02861 02862 02863 /** 02864 * Return a deep copy of the @a orig_stat status structure, allocated 02865 * in @a pool. 02866 * 02867 * @since New in 1.2. 02868 */ 02869 svn_wc_status2_t * 02870 svn_wc_dup_status2(const svn_wc_status2_t *orig_stat, 02871 apr_pool_t *pool); 02872 02873 02874 /** 02875 * Same as svn_wc_dup_status2(), but for older svn_wc_status_t structures. 02876 * 02877 * @deprecated Provided for backward compatibility with the 1.1 API. 02878 */ 02879 SVN_DEPRECATED 02880 svn_wc_status_t * 02881 svn_wc_dup_status(const svn_wc_status_t *orig_stat, 02882 apr_pool_t *pool); 02883 02884 02885 /** 02886 * Fill @a *status for @a path, allocating in @a pool. 02887 * @a adm_access must be an access baton for @a path. 02888 * 02889 * Here are some things to note about the returned structure. A quick 02890 * examination of the @c status->text_status after a successful return of 02891 * this function can reveal the following things: 02892 * 02893 * - @c svn_wc_status_none : @a path is not versioned, and is either not 02894 * present on disk, or is ignored by svn's 02895 * default ignore regular expressions or the 02896 * svn:ignore property setting for @a path's 02897 * parent directory. 02898 * 02899 * - @c svn_wc_status_missing : @a path is versioned, but is missing from 02900 * the working copy. 02901 * 02902 * - @c svn_wc_status_unversioned : @a path is not versioned, but is 02903 * present on disk and not being 02904 * ignored (see above). 02905 * 02906 * The other available results for the @c text_status field are more 02907 * straightforward in their meanings. See the comments on the 02908 * @c svn_wc_status_kind structure for some hints. 02909 * 02910 * @since New in 1.2. 02911 */ 02912 svn_error_t * 02913 svn_wc_status2(svn_wc_status2_t **status, 02914 const char *path, 02915 svn_wc_adm_access_t *adm_access, 02916 apr_pool_t *pool); 02917 02918 02919 /** 02920 * Same as svn_wc_status2(), but for older svn_wc_status_t structures. 02921 * 02922 * @deprecated Provided for backward compatibility with the 1.1 API. 02923 */ 02924 SVN_DEPRECATED 02925 svn_error_t * 02926 svn_wc_status(svn_wc_status_t **status, 02927 const char *path, 02928 svn_wc_adm_access_t *adm_access, 02929 apr_pool_t *pool); 02930 02931 02932 02933 02934 /** 02935 * A callback for reporting a @a status about @a path. 02936 * 02937 * @a baton is a closure object; it should be provided by the 02938 * implementation, and passed by the caller. 02939 * 02940 * @a pool will be cleared between invocations to the callback. 02941 * 02942 * @since New in 1.6. 02943 */ 02944 typedef svn_error_t *(*svn_wc_status_func3_t)(void *baton, 02945 const char *path, 02946 svn_wc_status2_t *status, 02947 apr_pool_t *pool); 02948 02949 /** 02950 * Same as svn_wc_status_func3_t(), but without a provided pool or 02951 * the ability to propagate errors. 02952 * 02953 * @since New in 1.2. 02954 * @deprecated Provided for backward compatibility with the 1.5 API. 02955 */ 02956 typedef void (*svn_wc_status_func2_t)(void *baton, 02957 const char *path, 02958 svn_wc_status2_t *status); 02959 02960 /** 02961 * Same as svn_wc_status_func2_t(), but for older svn_wc_status_t structures. 02962 * 02963 * @deprecated Provided for backward compatibility with the 1.1 API. 02964 */ 02965 typedef void (*svn_wc_status_func_t)(void *baton, 02966 const char *path, 02967 svn_wc_status_t *status); 02968 02969 02970 /** 02971 * Set @a *editor and @a *edit_baton to an editor that generates @c 02972 * svn_wc_status2_t structures and sends them through @a status_func / 02973 * @a status_baton. @a anchor is an access baton, with a tree lock, 02974 * for the local path to the working copy which will be used as the 02975 * root of our editor. If @a target is not empty, it represents an 02976 * entry in the @a anchor path which is the subject of the editor 02977 * drive (otherwise, the @a anchor is the subject). 02978 * 02979 * If @a set_locks_baton is non-@c NULL, it will be set to a baton that can 02980 * be used in a call to the svn_wc_status_set_repos_locks() function. 02981 * 02982 * Callers drive this editor to describe working copy out-of-dateness 02983 * with respect to the repository. If this information is not 02984 * available or not desired, callers should simply call the 02985 * close_edit() function of the @a editor vtable. 02986 * 02987 * If the editor driver calls @a editor's set_target_revision() vtable 02988 * function, then when the edit drive is completed, @a *edit_revision 02989 * will contain the revision delivered via that interface. 02990 * 02991 * Assuming the target is a directory, then: 02992 * 02993 * - If @a get_all is FALSE, then only locally-modified entries will be 02994 * returned. If TRUE, then all entries will be returned. 02995 * 02996 * - If @a depth is @c svn_depth_empty, a status structure will 02997 * be returned for the target only; if @c svn_depth_files, for the 02998 * target and its immediate file children; if 02999 * @c svn_depth_immediates, for the target and its immediate 03000 * children; if @c svn_depth_infinity, for the target and 03001 * everything underneath it, fully recursively. 03002 * 03003 * If @a depth is @c svn_depth_unknown, take depths from the 03004 * working copy and behave as above in each directory's case. 03005 * 03006 * If the given @a depth is incompatible with the depth found in a 03007 * working copy directory, the found depth always governs. 03008 * 03009 * If @a no_ignore is set, statuses that would typically be ignored 03010 * will instead be reported. 03011 * 03012 * @a ignore_patterns is an array of file patterns matching 03013 * unversioned files to ignore for the purposes of status reporting, 03014 * or @c NULL if the default set of ignorable file patterns should be used. 03015 * 03016 * If @a cancel_func is non-NULL, call it with @a cancel_baton while building 03017 * the @a statushash to determine if the client has cancelled the operation. 03018 * 03019 * If @a traversal_info is non-NULL, then record pre-update traversal 03020 * state in it. (Caller should obtain @a traversal_info from 03021 * svn_wc_init_traversal_info().) 03022 * 03023 * Allocate the editor itself in @a pool, but the editor does temporary 03024 * allocations in a subpool of @a pool. 03025 * 03026 * @since New in 1.6. 03027 */ 03028 svn_error_t * 03029 svn_wc_get_status_editor4(const svn_delta_editor_t **editor, 03030 void **edit_baton, 03031 void **set_locks_baton, 03032 svn_revnum_t *edit_revision, 03033 svn_wc_adm_access_t *anchor, 03034 const char *target, 03035 svn_depth_t depth, 03036 svn_boolean_t get_all, 03037 svn_boolean_t no_ignore, 03038 const apr_array_header_t *ignore_patterns, 03039 svn_wc_status_func3_t status_func, 03040 void *status_baton, 03041 svn_cancel_func_t cancel_func, 03042 void *cancel_baton, 03043 svn_wc_traversal_info_t *traversal_info, 03044 apr_pool_t *pool); 03045 03046 /** 03047 * Same as svn_wc_get_status_editor4(), but using @c svn_wc_status_func2_t 03048 * instead of @c svn_wc_status_func3_t. 03049 * 03050 * @since New in 1.5. 03051 * @deprecated Provided for backward compatibility with the 1.4 API. 03052 */ 03053 SVN_DEPRECATED 03054 svn_error_t * 03055 svn_wc_get_status_editor3(const svn_delta_editor_t **editor, 03056 void **edit_baton, 03057 void **set_locks_baton, 03058 svn_revnum_t *edit_revision, 03059 svn_wc_adm_access_t *anchor, 03060 const char *target, 03061 svn_depth_t depth, 03062 svn_boolean_t get_all, 03063 svn_boolean_t no_ignore, 03064 apr_array_header_t *ignore_patterns, 03065 svn_wc_status_func2_t status_func, 03066 void *status_baton, 03067 svn_cancel_func_t cancel_func, 03068 void *cancel_baton, 03069 svn_wc_traversal_info_t *traversal_info, 03070 apr_pool_t *pool); 03071 03072 /** 03073 * Like svn_wc_get_status_editor3(), but with @a ignore_patterns 03074 * provided from the corresponding value in @a config, and @a recurse 03075 * instead of @a depth. If @a recurse is TRUE, behave as if for @c 03076 * svn_depth_infinity; else if @a recurse is FALSE, behave as if for 03077 * @c svn_depth_immediates. 03078 * 03079 * @since New in 1.2. 03080 * @deprecated Provided for backward compatibility with the 1.4 API. 03081 */ 03082 SVN_DEPRECATED 03083 svn_error_t * 03084 svn_wc_get_status_editor2(const svn_delta_editor_t **editor, 03085 void **edit_baton, 03086 void **set_locks_baton, 03087 svn_revnum_t *edit_revision, 03088 svn_wc_adm_access_t *anchor, 03089 const char *target, 03090 apr_hash_t *config, 03091 svn_boolean_t recurse, 03092 svn_boolean_t get_all, 03093 svn_boolean_t no_ignore, 03094 svn_wc_status_func2_t status_func, 03095 void *status_baton, 03096 svn_cancel_func_t cancel_func, 03097 void *cancel_baton, 03098 svn_wc_traversal_info_t *traversal_info, 03099 apr_pool_t *pool); 03100 03101 /** 03102 * Same as svn_wc_get_status_editor2(), but with @a set_locks_baton set 03103 * to @c NULL, and taking a deprecated svn_wc_status_func_t argument. 03104 * 03105 * @deprecated Provided for backward compatibility with the 1.1 API. 03106 */ 03107 SVN_DEPRECATED 03108 svn_error_t * 03109 svn_wc_get_status_editor(const svn_delta_editor_t **editor, 03110 void **edit_baton, 03111 svn_revnum_t *edit_revision, 03112 svn_wc_adm_access_t *anchor, 03113 const char *target, 03114 apr_hash_t *config, 03115 svn_boolean_t recurse, 03116 svn_boolean_t get_all, 03117 svn_boolean_t no_ignore, 03118 svn_wc_status_func_t status_func, 03119 void *status_baton, 03120 svn_cancel_func_t cancel_func, 03121 void *cancel_baton, 03122 svn_wc_traversal_info_t *traversal_info, 03123 apr_pool_t *pool); 03124 03125 03126 /** 03127 * Associate @a locks, a hash table mapping <tt>const char*</tt> 03128 * absolute repository paths to <tt>svn_lock_t</tt> objects, with a 03129 * @a set_locks_baton returned by an earlier call to 03130 * svn_wc_get_status_editor3(). @a repos_root is the repository root URL. 03131 * Perform all allocations in @a pool. 03132 * 03133 * @note @a locks will not be copied, so it must be valid throughout the 03134 * edit. @a pool must also not be destroyed or cleared before the edit is 03135 * finished. 03136 * 03137 * @since New in 1.2. 03138 */ 03139 svn_error_t * 03140 svn_wc_status_set_repos_locks(void *set_locks_baton, 03141 apr_hash_t *locks, 03142 const char *repos_root, 03143 apr_pool_t *pool); 03144 03145 /** @} */ 03146 03147 03148 /** 03149 * Copy @a src to @a dst_basename in @a dst_parent, and schedule 03150 * @a dst_basename for addition to the repository, remembering the copy 03151 * history. 03152 * 03153 * @a src must be a file or directory under version control; @a dst_parent 03154 * must be a directory under version control in the same working copy; 03155 * @a dst_basename will be the name of the copied item, and it must not 03156 * exist already. 03157 * 03158 * If @a cancel_func is non-NULL, call it with @a cancel_baton at 03159 * various points during the operation. If it returns an error 03160 * (typically @c SVN_ERR_CANCELLED), return that error immediately. 03161 * 03162 * For each file or directory copied, @a notify_func will be called 03163 * with its path and the @a notify_baton. @a notify_func may be @c NULL 03164 * if you are not interested in this information. 03165 * 03166 * @par Important: 03167 * This is a variant of svn_wc_add(). No changes will happen 03168 * to the repository until a commit occurs. This scheduling can be 03169 * removed with svn_client_revert2(). 03170 * 03171 * @since New in 1.2. 03172 */ 03173 svn_error_t * 03174 svn_wc_copy2(const char *src, 03175 svn_wc_adm_access_t *dst_parent, 03176 const char *dst_basename, 03177 svn_cancel_func_t cancel_func, 03178 void *cancel_baton, 03179 svn_wc_notify_func2_t notify_func, 03180 void *notify_baton, 03181 apr_pool_t *pool); 03182 03183 /** 03184 * Similar to svn_wc_copy2(), but takes an @c svn_wc_notify_func_t instead. 03185 * 03186 * @deprecated Provided for backward compatibility with the 1.1 API. 03187 */ 03188 SVN_DEPRECATED 03189 svn_error_t * 03190 svn_wc_copy(const char *src, 03191 svn_wc_adm_access_t *dst_parent, 03192 const char *dst_basename, 03193 svn_cancel_func_t cancel_func, 03194 void *cancel_baton, 03195 svn_wc_notify_func_t notify_func, 03196 void *notify_baton, 03197 apr_pool_t *pool); 03198 03199 /** 03200 * Schedule @a path for deletion, it will be deleted from the repository on 03201 * the next commit. If @a path refers to a directory, then a recursive 03202 * deletion will occur. @a adm_access must hold a write lock for the parent 03203 * of @a path. 03204 * 03205 * If @a keep_local is FALSE, this function immediately deletes all files, 03206 * modified and unmodified, versioned and unversioned from the working copy. 03207 * It also immediately deletes unversioned directories and directories that 03208 * are scheduled to be added. Only versioned directories will remain in the 03209 * working copy, these get deleted by the update following the commit. 03210 * 03211 * If @a keep_local is TRUE, all files and directories will be kept in the 03212 * working copy (and will become unversioned on the next commit). 03213 * 03214 * If @a cancel_func is non-NULL, call it with @a cancel_baton at 03215 * various points during the operation. If it returns an error 03216 * (typically @c SVN_ERR_CANCELLED), return that error immediately. 03217 * 03218 * For each path marked for deletion, @a notify_func will be called with 03219 * the @a notify_baton and that path. The @a notify_func callback may be 03220 * @c NULL if notification is not needed. 03221 * 03222 * @since New in 1.5. 03223 */ 03224 svn_error_t * 03225 svn_wc_delete3(const char *path, 03226 svn_wc_adm_access_t *adm_access, 03227 svn_cancel_func_t cancel_func, 03228 void *cancel_baton, 03229 svn_wc_notify_func2_t notify_func, 03230 void *notify_baton, 03231 svn_boolean_t keep_local, 03232 apr_pool_t *pool); 03233 03234 /** 03235 * Similar to svn_wc_delete3(), but with @a keep_local always set to FALSE. 03236 * 03237 * @deprecated Provided for backward compatibility with the 1.4 API. 03238 */ 03239 SVN_DEPRECATED 03240 svn_error_t * 03241 svn_wc_delete2(const char *path, 03242 svn_wc_adm_access_t *adm_access, 03243 svn_cancel_func_t cancel_func, 03244 void *cancel_baton, 03245 svn_wc_notify_func2_t notify_func, 03246 void *notify_baton, 03247 apr_pool_t *pool); 03248 03249 /** 03250 * Similar to svn_wc_delete2(), but takes an @c svn_wc_notify_func_t instead. 03251 * 03252 * @deprecated Provided for backward compatibility with the 1.1 API. 03253 */ 03254 SVN_DEPRECATED 03255 svn_error_t * 03256 svn_wc_delete(const char *path, 03257 svn_wc_adm_access_t *adm_access, 03258 svn_cancel_func_t cancel_func, 03259 void *cancel_baton, 03260 svn_wc_notify_func_t notify_func, 03261 void *notify_baton, 03262 apr_pool_t *pool); 03263 03264 03265 /** 03266 * Put @a path under version control by adding an entry in its parent, 03267 * and, if @a path is a directory, adding an administrative area. The 03268 * new entry and anything under it is scheduled for addition to the 03269 * repository. @a parent_access should hold a write lock for the parent 03270 * directory of @a path. If @a path is a directory then an access baton 03271 * for @a path will be added to the set containing @a parent_access. 03272 * 03273 * If @a path does not exist, return @c SVN_ERR_WC_PATH_NOT_FOUND. 03274 * 03275 * If @a path is a directory, add it at @a depth; otherwise, ignore 03276 * @a depth. 03277 * 03278 * If @a copyfrom_url is non-NULL, it and @a copyfrom_rev are used as 03279 * `copyfrom' args. This is for copy operations, where one wants 03280 * to schedule @a path for addition with a particular history. 03281 * 03282 * If @a cancel_func is non-NULL, call it with @a cancel_baton at 03283 * various points during the operation. If it returns an error 03284 * (typically @c SVN_ERR_CANCELLED), return that error immediately. 03285 * 03286 * When the @a path has been added, then @a notify_func will be called 03287 * (if it is not @c NULL) with the @a notify_baton and the path. 03288 * 03289 * Return @c SVN_ERR_WC_NODE_KIND_CHANGE if @a path is both an unversioned 03290 * directory and a file that is scheduled for deletion or in state deleted. 03291 * 03292 *<pre> ### This function currently does double duty -- it is also 03293 * ### responsible for "switching" a working copy directory over to a 03294 * ### new copyfrom ancestry and scheduling it for addition. Here is 03295 * ### the old doc string from Ben, lightly edited to bring it 03296 * ### up-to-date, explaining the TRUE, secret life of this function:</pre> 03297 * 03298 * Given a @a path within a working copy of type KIND, follow this algorithm: 03299 * 03300 * - if @a path is not under version control: 03301 * - Place it under version control and schedule for addition; 03302 * if @a copyfrom_url is non-NULL, use it and @a copyfrom_rev as 03303 * 'copyfrom' history 03304 * 03305 * - if @a path is already under version control: 03306 * (This can only happen when a directory is copied, in which 03307 * case ancestry must have been supplied as well.) 03308 * 03309 * - Schedule the directory itself for addition with copyfrom history. 03310 * - Mark all its children with a 'copied' flag 03311 * - Rewrite all the URLs to what they will be after a commit. 03312 * - ### @todo Remove old wcprops too, see the '###' below. 03313 * 03314 *<pre> ### I think possibly the "switchover" functionality should be 03315 * ### broken out into a separate function, but its all intertwined in 03316 * ### the code right now. Ben, thoughts? Hard? Easy? Mauve?</pre> 03317 * 03318 * ### Update: see "###" comment in svn_wc_add_repos_file3()'s doc 03319 * string about this. 03320 * 03321 * @since New in 1.6. 03322 */ 03323 svn_error_t * 03324 svn_wc_add3(const char *path, 03325 svn_wc_adm_access_t *parent_access, 03326 svn_depth_t depth, 03327 const char *copyfrom_url, 03328 svn_revnum_t copyfrom_rev, 03329 svn_cancel_func_t cancel_func, 03330 void *cancel_baton, 03331 svn_wc_notify_func2_t notify_func, 03332 void *notify_baton, 03333 apr_pool_t *pool); 03334 03335 /** 03336 * Similar to svn_wc_add3(), but with the @a depth parameter always 03337 * @c svn_depth_infinity. 03338 * 03339 * @since New in 1.2. 03340 * @deprecated Provided for backward compatibility with the 1.5 API. 03341 */ 03342 SVN_DEPRECATED 03343 svn_error_t * 03344 svn_wc_add2(const char *path, 03345 svn_wc_adm_access_t *parent_access, 03346 const char *copyfrom_url, 03347 svn_revnum_t copyfrom_rev, 03348 svn_cancel_func_t cancel_func, 03349 void *cancel_baton, 03350 svn_wc_notify_func2_t notify_func, 03351 void *notify_baton, 03352 apr_pool_t *pool); 03353 03354 /** 03355 * Similar to svn_wc_add2(), but takes an @c svn_wc_notify_func_t instead. 03356 * 03357 * @deprecated Provided for backward compatibility with the 1.1 API. 03358 */ 03359 SVN_DEPRECATED 03360 svn_error_t * 03361 svn_wc_add(const char *path, 03362 svn_wc_adm_access_t *parent_access, 03363 const char *copyfrom_url, 03364 svn_revnum_t copyfrom_rev, 03365 svn_cancel_func_t cancel_func, 03366 void *cancel_baton, 03367 svn_wc_notify_func_t notify_func, 03368 void *notify_baton, 03369 apr_pool_t *pool); 03370 03371 /** Add a file to a working copy at @a dst_path, obtaining the text-base's 03372 * contents from @a new_base_contents, the wc file's content from 03373 * @a new_contents, its base properties from @a new_base_props and 03374 * wc properties from @a new_props. 03375 * 03376 * The base text and props normally come from the repository file 03377 * represented by the copyfrom args, see below. The new file will 03378 * be scheduled for addition with history. 03379 * 03380 * @a new_contents and @a new_props may be NULL, in which case 03381 * the working copy text and props are taken from the base files with 03382 * appropriate translation of the file's content. 03383 * 03384 * @a new_contents must be provided in Normal Form. This is required 03385 * in order to pass both special and non-special files through a stream. 03386 * 03387 * @a adm_access, or an access baton in its associated set, must 03388 * contain a write lock for the parent of @a dst_path. 03389 * 03390 * If @a copyfrom_url is non-NULL, then @a copyfrom_rev must be a 03391 * valid revision number, and together they are the copyfrom history 03392 * for the new file. 03393 * 03394 * The @a cancel_func and @a cancel_baton are a standard cancellation 03395 * callback, or NULL if no callback is needed. @a notify_func and 03396 * @a notify_baton are a notification callback, and will be notified 03397 * of the addition of this file. 03398 * 03399 * Use @a scratch_pool for temporary allocations. 03400 * 03401 * ### NOTE: the notification callback/baton is not yet used. 03402 * 03403 * ### This function is very redundant with svn_wc_add(). Ideally, 03404 * we'd merge them, so that svn_wc_add() would just take optional 03405 * new_props and optional copyfrom information. That way it could be 03406 * used for both 'svn add somefilesittingonmydisk' and for adding 03407 * files from repositories, with or without copyfrom history. 03408 * 03409 * The problem with this Ideal Plan is that svn_wc_add() also takes 03410 * care of recursive URL-rewriting. There's a whole comment in its 03411 * doc string about how that's really weird, outside its core mission, 03412 * etc, etc. So another part of the Ideal Plan is that that 03413 * functionality of svn_wc_add() would move into a separate function. 03414 * 03415 * @since New in 1.6 03416 */ 03417 svn_error_t * 03418 svn_wc_add_repos_file3(const char *dst_path, 03419 svn_wc_adm_access_t *adm_access, 03420 svn_stream_t *new_base_contents, 03421 svn_stream_t *new_contents, 03422 apr_hash_t *new_base_props, 03423 apr_hash_t *new_props, 03424 const char *copyfrom_url, 03425 svn_revnum_t copyfrom_rev, 03426 svn_cancel_func_t cancel_func, 03427 void *cancel_baton, 03428 svn_wc_notify_func2_t notify_func, 03429 void *notify_baton, 03430 apr_pool_t *scratch_pool); 03431 03432 03433 /** Same as svn_wc_add_repos_file3(), except that it has pathnames rather 03434 * than streams for the text base, and actual text, and has no cancellation. 03435 * 03436 * @since New in 1.4. 03437 * @deprecated Provided for compatibility with the 1.5 API 03438 */ 03439 SVN_DEPRECATED 03440 svn_error_t * 03441 svn_wc_add_repos_file2(const char *dst_path, 03442 svn_wc_adm_access_t *adm_access, 03443 const char *new_text_base_path, 03444 const char *new_text_path, 03445 apr_hash_t *new_base_props, 03446 apr_hash_t *new_props, 03447 const char *copyfrom_url, 03448 svn_revnum_t copyfrom_rev, 03449 apr_pool_t *pool); 03450 03451 /** Same as svn_wc_add_repos_file3(), except that it doesn't have the 03452 * BASE arguments or cancellation. 03453 * 03454 * @deprecated Provided for compatibility with the 1.3 API 03455 */ 03456 SVN_DEPRECATED 03457 svn_error_t * 03458 svn_wc_add_repos_file(const char *dst_path, 03459 svn_wc_adm_access_t *adm_access, 03460 const char *new_text_path, 03461 apr_hash_t *new_props, 03462 const char *copyfrom_url, 03463 svn_revnum_t copyfrom_rev, 03464 apr_pool_t *pool); 03465 03466 03467 /** Remove entry @a name in @a adm_access from revision control. @a name 03468 * must be either a file or @c SVN_WC_ENTRY_THIS_DIR. @a adm_access must 03469 * hold a write lock. 03470 * 03471 * If @a name is a file, all its info will be removed from @a adm_access's 03472 * administrative directory. If @a name is @c SVN_WC_ENTRY_THIS_DIR, then 03473 * @a adm_access's entire administrative area will be deleted, along with 03474 * *all* the administrative areas anywhere in the tree below @a adm_access. 03475 * 03476 * Normally, only administrative data is removed. However, if 03477 * @a destroy_wf is TRUE, then all working file(s) and dirs are deleted 03478 * from disk as well. When called with @a destroy_wf, any locally 03479 * modified files will *not* be deleted, and the special error 03480 * @c SVN_ERR_WC_LEFT_LOCAL_MOD might be returned. (Callers only need to 03481 * check for this special return value if @a destroy_wf is TRUE.) 03482 * 03483 * If @a instant_error is TRUE, then return @c 03484 * SVN_ERR_WC_LEFT_LOCAL_MOD the instant a locally modified file is 03485 * encountered. Otherwise, leave locally modified files in place and 03486 * return the error only after all the recursion is complete. 03487 * 03488 * If @a cancel_func is non-NULL, call it with @a cancel_baton at 03489 * various points during the removal. If it returns an error 03490 * (typically @c SVN_ERR_CANCELLED), return that error immediately. 03491 * 03492 * WARNING: This routine is exported for careful, measured use by 03493 * libsvn_client. Do *not* call this routine unless you really 03494 * understand what the heck you're doing. 03495 */ 03496 svn_error_t * 03497 svn_wc_remove_from_revision_control(svn_wc_adm_access_t *adm_access, 03498 const char *name, 03499 svn_boolean_t destroy_wf, 03500 svn_boolean_t instant_error, 03501 svn_cancel_func_t cancel_func, 03502 void *cancel_baton, 03503 apr_pool_t *pool); 03504 03505 03506 /** 03507 * Assuming @a path is under version control and in a state of conflict, 03508 * then take @a path *out* of this state. If @a resolve_text is TRUE then 03509 * any text conflict is resolved, if @a resolve_props is TRUE then any 03510 * property conflicts are resolved, if @a resolve_tree is TRUE then any 03511 * tree conflicts are resolved. 03512 * 03513 * If @a depth is @c svn_depth_empty, act only on @a path; if 03514 * @c svn_depth_files, resolve @a path and its conflicted file 03515 * children (if any); if @c svn_depth_immediates, resolve @a path and 03516 * all its immediate conflicted children (both files and directories, 03517 * if any); if @c svn_depth_infinity, resolve @a path and every 03518 * conflicted file or directory anywhere beneath it. 03519 * 03520 * If @a conflict_choice is @c svn_wc_conflict_choose_base, resolve the 03521 * conflict with the old file contents; if 03522 * @c svn_wc_conflict_choose_mine_full, use the original working contents; 03523 * if @c svn_wc_conflict_choose_theirs_full, the new contents; and if 03524 * @c svn_wc_conflict_choose_merged, don't change the contents at all, 03525 * just remove the conflict status, which is the pre-1.5 behavior. 03526 * 03527 * @c svn_wc_conflict_choose_theirs_conflict and @c 03528 * svn_wc_conflict_choose_mine_conflict are not legal for binary 03529 * files or properties. 03530 * 03531 * @a adm_access is an access baton, with a write lock, for @a path. 03532 * 03533 * Needless to say, this function doesn't touch conflict markers or 03534 * anything of that sort -- only a human can semantically resolve a 03535 * conflict. Instead, this function simply marks a file as "having 03536 * been resolved", clearing the way for a commit. 03537 * 03538 * The implementation details are opaque, as our "conflicted" criteria 03539 * might change over time. (At the moment, this routine removes the 03540 * three fulltext 'backup' files and any .prej file created in a conflict, 03541 * and modifies @a path's entry.) 03542 * 03543 * If @a path is not under version control, return @c SVN_ERR_ENTRY_NOT_FOUND. 03544 * If @a path isn't in a state of conflict to begin with, do nothing, and 03545 * return @c SVN_NO_ERROR. 03546 * 03547 * If @c path was successfully taken out of a state of conflict, report this 03548 * information to @c notify_func (if non-@c NULL.) If only text, only 03549 * property, or only tree conflict resolution was requested, and it was 03550 * successful, then success gets reported. 03551 * 03552 * @since New in 1.6. 03553 */ 03554 svn_error_t * 03555 svn_wc_resolved_conflict4(const char *path, 03556 svn_wc_adm_access_t *adm_access, 03557 svn_boolean_t resolve_text, 03558 svn_boolean_t resolve_props, 03559 svn_boolean_t resolve_tree, 03560 svn_depth_t depth, 03561 svn_wc_conflict_choice_t conflict_choice, 03562 svn_wc_notify_func2_t notify_func, 03563 void *notify_baton, 03564 svn_cancel_func_t cancel_func, 03565 void *cancel_baton, 03566 apr_pool_t *pool); 03567 03568 03569 /** 03570 * Similar to svn_wc_resolved_conflict4(), but without tree-conflict 03571 * resolution support. 03572 * 03573 * @deprecated Provided for backward compatibility with the 1.5 API. 03574 */ 03575 SVN_DEPRECATED 03576 svn_error_t * 03577 svn_wc_resolved_conflict3(const char *path, 03578 svn_wc_adm_access_t *adm_access, 03579 svn_boolean_t resolve_text, 03580 svn_boolean_t resolve_props, 03581 svn_depth_t depth, 03582 svn_wc_conflict_choice_t conflict_choice, 03583 svn_wc_notify_func2_t notify_func, 03584 void *notify_baton, 03585 svn_cancel_func_t cancel_func, 03586 void *cancel_baton, 03587 apr_pool_t *pool); 03588 03589 03590 /** 03591 * Similar to svn_wc_resolved_conflict3(), but without automatic conflict 03592 * resolution support, and with @a depth set according to @a recurse: 03593 * if @a recurse is TRUE, @a depth is @c svn_depth_infinity, else it is 03594 * @c svn_depth_files. 03595 * 03596 * @deprecated Provided for backward compatibility with the 1.4 API. 03597 */ 03598 SVN_DEPRECATED 03599 svn_error_t * 03600 svn_wc_resolved_conflict2(const char *path, 03601 svn_wc_adm_access_t *adm_access, 03602 svn_boolean_t resolve_text, 03603 svn_boolean_t resolve_props, 03604 svn_boolean_t recurse, 03605 svn_wc_notify_func2_t notify_func, 03606 void *notify_baton, 03607 svn_cancel_func_t cancel_func, 03608 void *cancel_baton, 03609 apr_pool_t *pool); 03610 03611 /** 03612 * Similar to svn_wc_resolved_conflict2(), but takes an 03613 * svn_wc_notify_func_t and doesn't have cancellation support. 03614 * 03615 * @deprecated Provided for backward compatibility with the 1.0 API. 03616 */ 03617 SVN_DEPRECATED 03618 svn_error_t * 03619 svn_wc_resolved_conflict(const char *path, 03620 svn_wc_adm_access_t *adm_access, 03621 svn_boolean_t resolve_text, 03622 svn_boolean_t resolve_props, 03623 svn_boolean_t recurse, 03624 svn_wc_notify_func_t notify_func, 03625 void *notify_baton, 03626 apr_pool_t *pool); 03627 03628 03629 /* Commits. */ 03630 03631 03632 /** 03633 * Storage type for queued post-commit data. 03634 * 03635 * @since New in 1.5. 03636 */ 03637 typedef struct svn_wc_committed_queue_t svn_wc_committed_queue_t; 03638 03639 03640 /** 03641 * Create a queue for use with svn_wc_queue_committed() and 03642 * svn_wc_process_committed_queue(). 03643 * 03644 * The returned queue and all further allocations required for queueing 03645 * new items will also be done from @a pool. 03646 * 03647 * @since New in 1.5. 03648 */ 03649 svn_wc_committed_queue_t * 03650 svn_wc_committed_queue_create(apr_pool_t *pool); 03651 03652 03653 /** 03654 * Queue committed items to be processed later by 03655 * svn_wc_process_committed_queue(). 03656 * 03657 * All pointer data passed to this function (@a path, @a adm_access, 03658 * @a wcprop_changes and @a checksum) should remain valid until the queue 03659 * has been processed by svn_wc_process_committed_queue(). 03660 * 03661 * Record in @a queue that @a path will need to be bumped after a commit 03662 * succeeds. @a adm_access must hold a write lock appropriate for @a path. 03663 * 03664 * If non-NULL, @a wcprop_changes is an array of <tt>svn_prop_t *</tt> 03665 * changes to wc properties; if an @c svn_prop_t->value is NULL, then 03666 * that property is deleted. 03667 * 03668 * If @a remove_lock is @c TRUE, any entryprops related to a repository 03669 * lock will be removed. 03670 * 03671 * If @a remove_changelist is @c TRUE, any association with a 03672 * changelist will be removed. 03673 * 03674 * If @a path is a file and @a checksum is non-NULL, use @a checksum as 03675 * the checksum for the new text base. Otherwise, calculate the checksum 03676 * if needed. 03677 * 03678 * If @a recurse is TRUE and @a path is a directory, then bump every 03679 * versioned object at or under @a path. This is usually done for 03680 * copied trees. 03681 * 03682 * Temporary allocations will be performed in @a scratch_pool, and persistent 03683 * allocations will use the same pool as @a queue used when it was created. 03684 * 03685 * @note the @a recurse parameter should be used with extreme care since 03686 * it will bump ALL nodes under the directory, regardless of their 03687 * actual inclusion in the new revision. 03688 * 03689 * @since New in 1.6. 03690 */ 03691 svn_error_t * 03692 svn_wc_queue_committed2(svn_wc_committed_queue_t *queue, 03693 const char *path, 03694 svn_wc_adm_access_t *adm_access, 03695 svn_boolean_t recurse, 03696 apr_array_header_t *wcprop_changes, 03697 svn_boolean_t remove_lock, 03698 svn_boolean_t remove_changelist, 03699 svn_checksum_t *checksum, 03700 apr_pool_t *scratch_pool); 03701 03702 03703 /** Same as svn_wc_queue_committed2() but the @a queue parameter has an 03704 * extra indirection and @a digest is supplied instead of a checksum type. 03705 * 03706 * @note despite the extra indirection, this function does NOT allocate 03707 * the queue for you. svn_wc_committed_queue_create() must be called. 03708 * 03709 * @since New in 1.5 03710 * 03711 * @deprecated Provided for backwards compatibility with 1.5 03712 */ 03713 svn_error_t * 03714 svn_wc_queue_committed(svn_wc_committed_queue_t **queue, 03715 const char *path, 03716 svn_wc_adm_access_t *adm_access, 03717 svn_boolean_t recurse, 03718 apr_array_header_t *wcprop_changes, 03719 svn_boolean_t remove_lock, 03720 svn_boolean_t remove_changelist, 03721 const unsigned char *digest, 03722 apr_pool_t *pool); 03723 03724 03725 /** 03726 * Bump all items in @a queue to @a new_revnum after a commit succeeds. 03727 * @a rev_date and @a rev_author are the (server-side) date and author 03728 * of the new revision; one or both may be @c NULL. 03729 * 03730 * @a adm_access must be associated with all affected directories, and 03731 * must hold a write lock in each one. 03732 * 03733 * @since New in 1.5. 03734 */ 03735 svn_error_t * 03736 svn_wc_process_committed_queue(svn_wc_committed_queue_t *queue, 03737 svn_wc_adm_access_t *adm_access, 03738 svn_revnum_t new_revnum, 03739 const char *rev_date, 03740 const char *rev_author, 03741 apr_pool_t *pool); 03742 03743 03744 /** 03745 * @note this function has improper expectations around the operation and 03746 * execution of other parts of the Subversion WC library. The resulting 03747 * coupling makes this interface near-impossible to support. Documentation 03748 * has been removed, as a result. 03749 * 03750 * @deprecated Use the svn_wc_committed_queue_* functions instead. Provided 03751 * for backwards compatibility with the 1.5 API. 03752 */ 03753 SVN_DEPRECATED 03754 svn_error_t * 03755 svn_wc_process_committed4(const char *path, 03756 svn_wc_adm_access_t *adm_access, 03757 svn_boolean_t recurse, 03758 svn_revnum_t new_revnum, 03759 const char *rev_date, 03760 const char *rev_author, 03761 apr_array_header_t *wcprop_changes, 03762 svn_boolean_t remove_lock, 03763 svn_boolean_t remove_changelist, 03764 const unsigned char *digest, 03765 apr_pool_t *pool); 03766 03767 /** @see svn_wc_process_committed4() 03768 * 03769 * @deprecated Use the svn_wc_committed_queue_* functions instead. Provided 03770 * for backwards compatibility with the 1.4 API. 03771 */ 03772 SVN_DEPRECATED 03773 svn_error_t * 03774 svn_wc_process_committed3(const char *path, 03775 svn_wc_adm_access_t *adm_access, 03776 svn_boolean_t recurse, 03777 svn_revnum_t new_revnum, 03778 const char *rev_date, 03779 const char *rev_author, 03780 apr_array_header_t *wcprop_changes, 03781 svn_boolean_t remove_lock, 03782 const unsigned char *digest, 03783 apr_pool_t *pool); 03784 03785 /** @see svn_wc_process_committed4() 03786 * 03787 * @deprecated Use the svn_wc_committed_queue_* functions instead. Provided 03788 * for backwards compatibility with the 1.3 API. 03789 */ 03790 SVN_DEPRECATED 03791 svn_error_t * 03792 svn_wc_process_committed2(const char *path, 03793 svn_wc_adm_access_t *adm_access, 03794 svn_boolean_t recurse, 03795 svn_revnum_t new_revnum, 03796 const char *rev_date, 03797 const char *rev_author, 03798 apr_array_header_t *wcprop_changes, 03799 svn_boolean_t remove_lock, 03800 apr_pool_t *pool); 03801 03802 /** @see svn_wc_process_committed4() 03803 * 03804 * @deprecated Use the svn_wc_committed_queue_* functions instead. Provided 03805 * for backward compatibility with the 1.1 API. 03806 */ 03807 SVN_DEPRECATED 03808 svn_error_t * 03809 svn_wc_process_committed(const char *path, 03810 svn_wc_adm_access_t *adm_access, 03811 svn_boolean_t recurse, 03812 svn_revnum_t new_revnum, 03813 const char *rev_date, 03814 const char *rev_author, 03815 apr_array_header_t *wcprop_changes, 03816 apr_pool_t *pool); 03817 03818 03819 03820 03821 03822 /** 03823 * Do a depth-first crawl in a working copy, beginning at @a path. 03824 * 03825 * Communicate the `state' of the working copy's revisions and depths 03826 * to @a reporter/@a report_baton. Obviously, if @a path is a file 03827 * instead of a directory, this depth-first crawl will be a short one. 03828 * 03829 * No locks are or logs are created, nor are any animals harmed in the 03830 * process. No cleanup is necessary. @a adm_access must be an access 03831 * baton for the @a path hierarchy, it does not require a write lock. 03832 * 03833 * After all revisions are reported, @a reporter->finish_report() is 03834 * called, which immediately causes the RA layer to update the working 03835 * copy. Thus the return value may very well reflect the result of 03836 * the update! 03837 * 03838 * If @a depth is @c svn_depth_empty, then report state only for 03839 * @a path itself. If @c svn_depth_files, do the same and include 03840 * immediate file children of @a path. If @c svn_depth_immediates, 03841 * then behave as if for @c svn_depth_files but also report the 03842 * property states of immediate subdirectories. If @a depth is 03843 * @c svn_depth_infinity, then report state fully recursively. All 03844 * descents are only as deep as @a path's own depth permits, of 03845 * course. If @a depth is @c svn_depth_unknown, then just use 03846 * @c svn_depth_infinity, which in practice means depth of @a path. 03847 * 03848 * Iff @a honor_depth_exclude is TRUE, the crawler will report paths 03849 * whose ambient depth is @c svn_depth_exclude as being excluded, and 03850 * thus prevent the server from pushing update data for those paths; 03851 * therefore, don't set this flag if you wish to pull in excluded paths. 03852 * Note that @c svn_depth_exclude on the target @a path is never 03853 * honored, even if @a honor_depth_exclude is TRUE, because we need to 03854 * be able to explicitly pull in a target. For example, if this is 03855 * the working copy... 03856 * 03857 * svn co greek_tree_repos wc_dir 03858 * svn up --set-depth exclude wc_dir/A/B/E # now A/B/E is excluded 03859 * 03860 * ...then 'svn up wc_dir/A/B' would report E as excluded (assuming 03861 * @a honor_depth_exclude is TRUE), but 'svn up wc_dir/A/B/E' would 03862 * not, because the latter is trying to explicitly pull in E. In 03863 * general, we never report the update target as excluded. 03864 * 03865 * Iff @a depth_compatibility_trick is TRUE, then set the @c start_empty 03866 * flag on @a reporter->set_path() and @a reporter->link_path() calls 03867 * as necessary to trick a pre-1.5 (i.e., depth-unaware) server into 03868 * sending back all the items the client might need to upgrade a 03869 * working copy from a shallower depth to a deeper one. 03870 * 03871 * If @a restore_files is TRUE, then unexpectedly missing working files 03872 * will be restored from the administrative directory's cache. For each 03873 * file restored, the @a notify_func function will be called with the 03874 * @a notify_baton and the path of the restored file. @a notify_func may 03875 * be @c NULL if this notification is not required. If @a 03876 * use_commit_times is TRUE, then set restored files' timestamps to 03877 * their last-commit-times. 03878 * 03879 * If @a traversal_info is non-NULL, then record pre-update traversal 03880 * state in it. (Caller should obtain @a traversal_info from 03881 * svn_wc_init_traversal_info().) 03882 * 03883 * @since New in 1.6. 03884 */ 03885 svn_error_t * 03886 svn_wc_crawl_revisions4(const char *path, 03887 svn_wc_adm_access_t *adm_access, 03888 const svn_ra_reporter3_t *reporter, 03889 void *report_baton, 03890 svn_boolean_t restore_files, 03891 svn_depth_t depth, 03892 svn_boolean_t honor_depth_exclude, 03893 svn_boolean_t depth_compatibility_trick, 03894 svn_boolean_t use_commit_times, 03895 svn_wc_notify_func2_t notify_func, 03896 void *notify_baton, 03897 svn_wc_traversal_info_t *traversal_info, 03898 apr_pool_t *pool); 03899 03900 /** 03901 * Similar to svn_wc_crawl_revisions4, but with @a honor_depth_exclude always 03902 * set to false. 03903 * 03904 * @deprecated Provided for compatibility with the 1.5 API. 03905 */ 03906 svn_error_t * 03907 svn_wc_crawl_revisions3(const char *path, 03908 svn_wc_adm_access_t *adm_access, 03909 const svn_ra_reporter3_t *reporter, 03910 void *report_baton, 03911 svn_boolean_t restore_files, 03912 svn_depth_t depth, 03913 svn_boolean_t depth_compatibility_trick, 03914 svn_boolean_t use_commit_times, 03915 svn_wc_notify_func2_t notify_func, 03916 void *notify_baton, 03917 svn_wc_traversal_info_t *traversal_info, 03918 apr_pool_t *pool); 03919 03920 /** 03921 * Similar to svn_wc_crawl_revisions3, but taking svn_ra_reporter2_t 03922 * instead of svn_ra_reporter3_t, and therefore only able to report @c 03923 * svn_depth_infinity for depths; and taking @a recurse instead of @a 03924 * depth; and with @a depth_compatibility_trick always false. 03925 * 03926 * @deprecated Provided for compatibility with the 1.4 API. 03927 */ 03928 SVN_DEPRECATED 03929 svn_error_t * 03930 svn_wc_crawl_revisions2(const char *path, 03931 svn_wc_adm_access_t *adm_access, 03932 const svn_ra_reporter2_t *reporter, 03933 void *report_baton, 03934 svn_boolean_t restore_files, 03935 svn_boolean_t recurse, 03936 svn_boolean_t use_commit_times, 03937 svn_wc_notify_func2_t notify_func, 03938 void *notify_baton, 03939 svn_wc_traversal_info_t *traversal_info, 03940 apr_pool_t *pool); 03941 03942 /** 03943 * Similar to svn_wc_crawl_revisions2(), but takes an svn_wc_notify_func_t 03944 * and a @c svn_reporter_t instead. 03945 * 03946 * @deprecated Provided for backward compatibility with the 1.1 API. 03947 */ 03948 SVN_DEPRECATED 03949 svn_error_t * 03950 svn_wc_crawl_revisions(const char *path, 03951 svn_wc_adm_access_t *adm_access, 03952 const svn_ra_reporter_t *reporter, 03953 void *report_baton, 03954 svn_boolean_t restore_files, 03955 svn_boolean_t recurse, 03956 svn_boolean_t use_commit_times, 03957 svn_wc_notify_func_t notify_func, 03958 void *notify_baton, 03959 svn_wc_traversal_info_t *traversal_info, 03960 apr_pool_t *pool); 03961 03962 03963 /* Updates. */ 03964 03965 /** Set @a *wc_root to @c TRUE if @a path represents a "working copy root", 03966 * @c FALSE otherwise. Here, @a path is a "working copy root" if its parent 03967 * directory is not a WC or if its parent directory's repository URL is not 03968 * the parent of its own repository URL. Thus, a switched subtree is 03969 * considered to be a working copy root. Also, a deleted tree-conflict 03970 * victim is considered a "working copy root" because it has no URL. 03971 * 03972 * If @a path is not found, return the error @c SVN_ERR_ENTRY_NOT_FOUND. 03973 * 03974 * Use @a pool for any intermediate allocations. 03975 * 03976 * @note Due to the way in which "WC-root-ness" is calculated, passing 03977 * a @a path of `.' to this function will always return @c TRUE. 03978 */ 03979 svn_error_t * 03980 svn_wc_is_wc_root(svn_boolean_t *wc_root, 03981 const char *path, 03982 svn_wc_adm_access_t *adm_access, 03983 apr_pool_t *pool); 03984 03985 03986 /** Conditionally split @a path into an @a anchor and @a target for the 03987 * purpose of updating and committing. 03988 * 03989 * @a anchor is the directory at which the update or commit editor 03990 * should be rooted. 03991 * 03992 * @a target is the actual subject (relative to the @a anchor) of the 03993 * update/commit, or "" if the @a anchor itself is the subject. 03994 * 03995 * Allocate @a anchor and @a target in @a pool. 03996 */ 03997 svn_error_t * 03998 svn_wc_get_actual_target(const char *path, 03999 const char **anchor, 04000 const char **target, 04001 apr_pool_t *pool); 04002 04003 04004 04005 /* Update and update-like functionality. */ 04006 04007 /** 04008 * Set @a *editor and @a *edit_baton to an editor and baton for updating a 04009 * working copy. 04010 * 04011 * If @a ti is non-NULL, record traversal info in @a ti, for use by 04012 * post-traversal accessors such as svn_wc_edited_externals(). 04013 * 04014 * @a anchor is an access baton, with a write lock, for the local path to the 04015 * working copy which will be used as the root of our editor. Further 04016 * locks will be acquired if the update creates new directories. All 04017 * locks, both those in @a anchor and newly acquired ones, will be released 04018 * when the editor driver calls @c close_edit. 04019 * 04020 * @a target is the entry in @a anchor that will actually be updated, or 04021 * the empty string if all of @a anchor should be updated. 04022 * 04023 * The editor invokes @a notify_func with @a notify_baton as the update 04024 * progresses, if @a notify_func is non-NULL. 04025 * 04026 * If @a cancel_func is non-NULL, the editor will invoke @a cancel_func with 04027 * @a cancel_baton as the update progresses to see if it should continue. 04028 * 04029 * If @a conflict_func is non-NULL, then invoke it with @a 04030 * conflict_baton whenever a conflict is encountered, giving the 04031 * callback a chance to resolve the conflict before the editor takes 04032 * more drastic measures (such as marking a file conflicted, or 04033 * bailing out of the update). 04034 * 04035 * If @a fetch_func is non-NULL, then use it (with @a fetch_baton) as 04036 * a fallback for retrieving repository files whenever 'copyfrom' args 04037 * are sent into editor->add_file(). 04038 * 04039 * If @a diff3_cmd is non-NULL, then use it as the diff3 command for 04040 * any merging; otherwise, use the built-in merge code. 04041 * 04042 * @a preserved_exts is an array of filename patterns which, when 04043 * matched against the extensions of versioned files, determine for 04044 * which such files any related generated conflict files will preserve 04045 * the original file's extension as their own. If a file's extension 04046 * does not match any of the patterns in @a preserved_exts (which is 04047 * certainly the case if @a preserved_exts is @c NULL or empty), 04048 * generated conflict files will carry Subversion's custom extensions. 04049 * 04050 * @a target_revision is a pointer to a revision location which, after 04051 * successful completion of the drive of this editor, will be 04052 * populated with the revision to which the working copy was updated. 04053 * 04054 * If @a use_commit_times is TRUE, then all edited/added files will 04055 * have their working timestamp set to the last-committed-time. If 04056 * FALSE, the working files will be touched with the 'now' time. 04057 * 04058 * If @a allow_unver_obstructions is TRUE, then allow unversioned 04059 * obstructions when adding a path. 04060 * 04061 * If @a depth is @c svn_depth_infinity, update fully recursively. 04062 * Else if it is @c svn_depth_immediates, update the uppermost 04063 * directory, its file entries, and the presence or absence of 04064 * subdirectories (but do not descend into the subdirectories). 04065 * Else if it is @c svn_depth_files, update the uppermost directory 04066 * and its immediate file entries, but not subdirectories. 04067 * Else if it is @c svn_depth_empty, update exactly the uppermost 04068 * target, and don't touch its entries. 04069 * 04070 * If @a depth_is_sticky is set and @a depth is not @c 04071 * svn_depth_unknown, then in addition to updating PATHS, also set 04072 * their sticky ambient depth value to @a depth. 04073 * 04074 * @since New in 1.5. 04075 */ 04076 svn_error_t * 04077 svn_wc_get_update_editor3(svn_revnum_t *target_revision, 04078 svn_wc_adm_access_t *anchor, 04079 const char *target, 04080 svn_boolean_t use_commit_times, 04081 svn_depth_t depth, 04082 svn_boolean_t depth_is_sticky, 04083 svn_boolean_t allow_unver_obstructions, 04084 svn_wc_notify_func2_t notify_func, 04085 void *notify_baton, 04086 svn_cancel_func_t cancel_func, 04087 void *cancel_baton, 04088 svn_wc_conflict_resolver_func_t conflict_func, 04089 void *conflict_baton, 04090 svn_wc_get_file_t fetch_func, 04091 void *fetch_baton, 04092 const char *diff3_cmd, 04093 apr_array_header_t *preserved_exts, 04094 const svn_delta_editor_t **editor, 04095 void **edit_baton, 04096 svn_wc_traversal_info_t *ti, 04097 apr_pool_t *pool); 04098 04099 04100 /** 04101 * Similar to svn_wc_get_update_editor3() but with the @a 04102 * allow_unver_obstructions parameter always set to FALSE, @a 04103 * conflict_func and baton set to NULL, @a fetch_func and baton set to 04104 * NULL, @a preserved_exts set to NULL, @a depth_is_sticky set to 04105 * FALSE, and @a depth set according to @a recurse: if @a recurse is 04106 * TRUE, pass @c svn_depth_infinity, if FALSE, pass @c 04107 * svn_depth_files. 04108 * 04109 * @deprecated Provided for backward compatibility with the 1.4 API. 04110 */ 04111 SVN_DEPRECATED 04112 svn_error_t * 04113 svn_wc_get_update_editor2(svn_revnum_t *target_revision, 04114 svn_wc_adm_access_t *anchor, 04115 const char *target, 04116 svn_boolean_t use_commit_times, 04117 svn_boolean_t recurse, 04118 svn_wc_notify_func2_t notify_func, 04119 void *notify_baton, 04120 svn_cancel_func_t cancel_func, 04121 void *cancel_baton, 04122 const char *diff3_cmd, 04123 const svn_delta_editor_t **editor, 04124 void **edit_baton, 04125 svn_wc_traversal_info_t *ti, 04126 apr_pool_t *pool); 04127 04128 /** 04129 * Similar to svn_wc_get_update_editor2(), but takes an svn_wc_notify_func_t 04130 * instead. 04131 * 04132 * @deprecated Provided for backward compatibility with the 1.1 API. 04133 */ 04134 SVN_DEPRECATED 04135 svn_error_t * 04136 svn_wc_get_update_editor(svn_revnum_t *target_revision, 04137 svn_wc_adm_access_t *anchor, 04138 const char *target, 04139 svn_boolean_t use_commit_times, 04140 svn_boolean_t recurse, 04141 svn_wc_notify_func_t notify_func, 04142 void *notify_baton, 04143 svn_cancel_func_t cancel_func, 04144 void *cancel_baton, 04145 const char *diff3_cmd, 04146 const svn_delta_editor_t **editor, 04147 void **edit_baton, 04148 svn_wc_traversal_info_t *ti, 04149 apr_pool_t *pool); 04150 04151 /** 04152 * A variant of svn_wc_get_update_editor(). 04153 * 04154 * Set @a *editor and @a *edit_baton to an editor and baton for "switching" 04155 * a working copy to a new @a switch_url. (Right now, this URL must be 04156 * within the same repository that the working copy already comes 04157 * from.) @a switch_url must not be @c NULL. 04158 * 04159 * If @a ti is non-NULL, record traversal info in @a ti, for use by 04160 * post-traversal accessors such as svn_wc_edited_externals(). 04161 * 04162 * @a anchor is an access baton, with a write lock, for the local path to the 04163 * working copy which will be used as the root of our editor. Further 04164 * locks will be acquired if the switch creates new directories. All 04165 * locks, both those in @a anchor and newly acquired ones, will be released 04166 * when the editor driver calls @c close_edit. 04167 * 04168 * @a target is the entry in @a anchor that will actually be updated, or 04169 * empty if all of @a anchor should be updated. 04170 * 04171 * The editor invokes @a notify_func with @a notify_baton as the switch 04172 * progresses, if @a notify_func is non-NULL. 04173 * 04174 * If @a cancel_func is non-NULL, it will be called with @a cancel_baton as 04175 * the switch progresses to determine if it should continue. 04176 * 04177 * If @a conflict_func is non-NULL, then invoke it with @a 04178 * conflict_baton whenever a conflict is encountered, giving the 04179 * callback a chance to resolve the conflict before the editor takes 04180 * more drastic measures (such as marking a file conflicted, or 04181 * bailing out of the switch). 04182 * 04183 * If @a diff3_cmd is non-NULL, then use it as the diff3 command for 04184 * any merging; otherwise, use the built-in merge code. 04185 * 04186 * @a preserved_exts is an array of filename patterns which, when 04187 * matched against the extensions of versioned files, determine for 04188 * which such files any related generated conflict files will preserve 04189 * the original file's extension as their own. If a file's extension 04190 * does not match any of the patterns in @a preserved_exts (which is 04191 * certainly the case if @a preserved_exts is @c NULL or empty), 04192 * generated conflict files will carry Subversion's custom extensions. 04193 * 04194 * @a target_revision is a pointer to a revision location which, after 04195 * successful completion of the drive of this editor, will be 04196 * populated with the revision to which the working copy was updated. 04197 * 04198 * If @a use_commit_times is TRUE, then all edited/added files will 04199 * have their working timestamp set to the last-committed-time. If 04200 * FALSE, the working files will be touched with the 'now' time. 04201 * 04202 * @a depth and @a depth_is_sticky behave as for svn_wc_get_update_editor3(). 04203 * 04204 * If @a allow_unver_obstructions is TRUE, then allow unversioned 04205 * obstructions when adding a path. 04206 * 04207 * @since New in 1.5. 04208 */ 04209 svn_error_t * 04210 svn_wc_get_switch_editor3(svn_revnum_t *target_revision, 04211 svn_wc_adm_access_t *anchor, 04212 const char *target, 04213 const char *switch_url, 04214 svn_boolean_t use_commit_times, 04215 svn_depth_t depth, 04216 svn_boolean_t depth_is_sticky, 04217 svn_boolean_t allow_unver_obstructions, 04218 svn_wc_notify_func2_t notify_func, 04219 void *notify_baton, 04220 svn_cancel_func_t cancel_func, 04221 void *cancel_baton, 04222 svn_wc_conflict_resolver_func_t conflict_func, 04223 void *conflict_baton, 04224 const char *diff3_cmd, 04225 apr_array_header_t *preserved_exts, 04226 const svn_delta_editor_t **editor, 04227 void **edit_baton, 04228 svn_wc_traversal_info_t *ti, 04229 apr_pool_t *pool); 04230 04231 /** 04232 * Similar to svn_wc_get_switch_editor3() but with the 04233 * @a allow_unver_obstructions parameter always set to FALSE, 04234 * @a preserved_exts set to NULL, @a conflict_func and baton set to NULL, 04235 * @a depth_is_sticky set to FALSE, and @a depth set according to @a 04236 * recurse: if @a recurse is TRUE, pass @c svn_depth_infinity, if 04237 * FALSE, pass @c svn_depth_files. 04238 * 04239 * @deprecated Provided for backward compatibility with the 1.4 API. 04240 */ 04241 SVN_DEPRECATED 04242 svn_error_t * 04243 svn_wc_get_switch_editor2(svn_revnum_t *target_revision, 04244 svn_wc_adm_access_t *anchor, 04245 const char *target, 04246 const char *switch_url, 04247 svn_boolean_t use_commit_times, 04248 svn_boolean_t recurse, 04249 svn_wc_notify_func2_t notify_func, 04250 void *notify_baton, 04251 svn_cancel_func_t cancel_func, 04252 void *cancel_baton, 04253 const char *diff3_cmd, 04254 const svn_delta_editor_t **editor, 04255 void **edit_baton, 04256 svn_wc_traversal_info_t *ti, 04257 apr_pool_t *pool); 04258 04259 /** 04260 * Similar to svn_wc_get_switch_editor2(), but takes an 04261 * @c svn_wc_notify_func_t instead. 04262 * 04263 * @deprecated Provided for backward compatibility with the 1.1 API. 04264 */ 04265 SVN_DEPRECATED 04266 svn_error_t * 04267 svn_wc_get_switch_editor(svn_revnum_t *target_revision, 04268 svn_wc_adm_access_t *anchor, 04269 const char *target, 04270 const char *switch_url, 04271 svn_boolean_t use_commit_times, 04272 svn_boolean_t recurse, 04273 svn_wc_notify_func_t notify_func, 04274 void *notify_baton, 04275 svn_cancel_func_t cancel_func, 04276 void *cancel_baton, 04277 const char *diff3_cmd, 04278 const svn_delta_editor_t **editor, 04279 void **edit_baton, 04280 svn_wc_traversal_info_t *ti, 04281 apr_pool_t *pool); 04282 04283 04284 04285 /* A word about the implementation of working copy property storage: 04286 * 04287 * Since properties are key/val pairs, you'd think we store them in 04288 * some sort of Berkeley DB-ish format, and even store pending changes 04289 * to them that way too. 04290 * 04291 * However, we already have libsvn_subr/hashdump.c working, and it 04292 * uses a human-readable format. That will be very handy when we're 04293 * debugging, and presumably we will not be dealing with any huge 04294 * properties or property lists initially. Therefore, we will 04295 * continue to use hashdump as the internal mechanism for storing and 04296 * reading from property lists, but note that the interface here is 04297 * _not_ dependent on that. We can swap in a DB-based implementation 04298 * at any time and users of this library will never know the 04299 * difference. 04300 */ 04301 04302 /** Set @a *props to a hash table mapping <tt>char *</tt> names onto 04303 * <tt>svn_string_t *</tt> values for all the regular properties of 04304 * @a path. Allocate the table, names, and values in @a pool. If 04305 * the node has no properties, or does not exist in the working copy, 04306 * then an empty hash is returned. @a adm_access is an access baton 04307 * set that contains @a path. 04308 */ 04309 svn_error_t * 04310 svn_wc_prop_list(apr_hash_t **props, 04311 const char *path, 04312 svn_wc_adm_access_t *adm_access, 04313 apr_pool_t *pool); 04314 04315 04316 /** Set @a *value to the value of property @a name for @a path, allocating 04317 * @a *value in @a pool. If no such prop, set @a *value to @c NULL. 04318 * @a name may be a regular or wc property; if it is an entry property, 04319 * return the error @c SVN_ERR_BAD_PROP_KIND. @a adm_access is an access 04320 * baton set that contains @a path. 04321 */ 04322 svn_error_t * 04323 svn_wc_prop_get(const svn_string_t **value, 04324 const char *name, 04325 const char *path, 04326 svn_wc_adm_access_t *adm_access, 04327 apr_pool_t *pool); 04328 04329 /** 04330 * Set property @a name to @a value for @a path, or if @a value is 04331 * NULL, remove property @a name from @a path. @a adm_access is an 04332 * access baton with a write lock for @a path. 04333 * 04334 * If @a skip_checks is TRUE, do no validity checking. But if @a 04335 * skip_checks is FALSE, and @a name is not a valid property for @a 04336 * path, return an error, either @c SVN_ERR_ILLEGAL_TARGET (if the 04337 * property is not appropriate for @a path), or @c 04338 * SVN_ERR_BAD_MIME_TYPE (if @a name is "svn:mime-type", but @a value 04339 * is not a valid mime-type). 04340 * 04341 * @a name may be a wc property or a regular property; but if it is an 04342 * entry property, return the error @c SVN_ERR_BAD_PROP_KIND, even if 04343 * @a skip_checks is TRUE. 04344 * 04345 * For each file or directory operated on, @a notify_func will be called 04346 * with its path and the @a notify_baton. @a notify_func may be @c NULL 04347 * if you are not interested in this information. 04348 * 04349 * Use @a pool for temporary allocation. 04350 * 04351 * @since New in 1.6. 04352 */ 04353 svn_error_t * 04354 svn_wc_prop_set3(const char *name, 04355 const svn_string_t *value, 04356 const char *path, 04357 svn_wc_adm_access_t *adm_access, 04358 svn_boolean_t skip_checks, 04359 svn_wc_notify_func2_t notify_func, 04360 void *notify_baton, 04361 apr_pool_t *pool); 04362 04363 04364 /** 04365 * Like svn_wc_prop_set3(), but without the notification callbacks. 04366 * 04367 * @since New in 1.2. 04368 */ 04369 SVN_DEPRECATED 04370 svn_error_t * 04371 svn_wc_prop_set2(const char *name, 04372 const svn_string_t *value, 04373 const char *path, 04374 svn_wc_adm_access_t *adm_access, 04375 svn_boolean_t skip_checks, 04376 apr_pool_t *pool); 04377 04378 04379 /** 04380 * Like svn_wc_prop_set2(), but with @a skip_checks always FALSE. 04381 * 04382 * @deprecated Provided for backward compatibility with the 1.1 API. 04383 */ 04384 SVN_DEPRECATED 04385 svn_error_t * 04386 svn_wc_prop_set(const char *name, 04387 const svn_string_t *value, 04388 const char *path, 04389 svn_wc_adm_access_t *adm_access, 04390 apr_pool_t *pool); 04391 04392 04393 /** Return TRUE iff @a name is a 'normal' property name. 'Normal' is 04394 * defined as a user-visible and user-tweakable property that shows up 04395 * when you fetch a proplist. 04396 * 04397 * The function currently parses the namespace like so: 04398 * 04399 * - 'svn:wc:' ==> a wcprop, stored/accessed separately via different API. 04400 * 04401 * - 'svn:entry:' ==> an "entry" prop, shunted into the 'entries' file. 04402 * 04403 * If these patterns aren't found, then the property is assumed to be 04404 * Normal. 04405 */ 04406 svn_boolean_t 04407 svn_wc_is_normal_prop(const char *name); 04408 04409 04410 04411 /** Return TRUE iff @a name is a 'wc' property name. */ 04412 svn_boolean_t 04413 svn_wc_is_wc_prop(const char *name); 04414 04415 /** Return TRUE iff @a name is a 'entry' property name. */ 04416 svn_boolean_t 04417 svn_wc_is_entry_prop(const char *name); 04418 04419 /** Callback type used by @c svn_wc_canonicalize_svn_prop. 04420 * 04421 * If @a mime_type is non-null, it sets @a *mime_type to the value of 04422 * @c SVN_PROP_MIME_TYPE for the path passed to @c 04423 * svn_wc_canonicalize_svn_prop (allocated from @a pool). If @a 04424 * stream is non-null, it writes the contents of the file to @a 04425 * stream. 04426 * 04427 * (Currently, this is used if you are attempting to set the @c 04428 * SVN_PROP_EOL_STYLE property, to make sure that the value matches 04429 * the mime type and contents.) 04430 */ 04431 typedef svn_error_t *(*svn_wc_canonicalize_svn_prop_get_file_t) 04432 (const svn_string_t **mime_type, 04433 svn_stream_t *stream, 04434 void *baton, 04435 apr_pool_t *pool); 04436 04437 04438 /** Canonicalize the value of an svn:* property @a propname with 04439 * value @a propval. 04440 * 04441 * If the property is not appropriate for a node of kind @a kind, or 04442 * is otherwise invalid, throw an error. Otherwise, set @a *propval_p 04443 * to a canonicalized version of the property value. If @a 04444 * skip_some_checks is TRUE, only some validity checks are taken. 04445 * 04446 * Some validity checks require access to the contents and MIME type 04447 * of the target if it is a file; they will call @a prop_getter with @a 04448 * getter_baton, which then needs to set the MIME type and print the 04449 * contents of the file to the given stream. 04450 * 04451 * @a path should be the path of the file in question; it is only used 04452 * for error messages. 04453 * 04454 * ### This is not actually related to the WC, but it does need to call 04455 * ### svn_wc_parse_externals_description2. 04456 */ 04457 svn_error_t * 04458 svn_wc_canonicalize_svn_prop(const svn_string_t **propval_p, 04459 const char *propname, 04460 const svn_string_t *propval, 04461 const char *path, 04462 svn_node_kind_t kind, 04463 svn_boolean_t skip_some_checks, 04464 svn_wc_canonicalize_svn_prop_get_file_t prop_getter, 04465 void *getter_baton, 04466 apr_pool_t *pool); 04467 04468 04469 04470 /* Diffs */ 04471 04472 04473 /** 04474 * Return an @a editor/@a edit_baton for diffing a working copy against the 04475 * repository. 04476 * 04477 * @a anchor/@a target represent the base of the hierarchy to be compared. 04478 * 04479 * @a callbacks/@a callback_baton is the callback table to use when two 04480 * files are to be compared. 04481 * 04482 * If @a depth is @c svn_depth_empty, just diff exactly @a target or 04483 * @a anchor if @a target is empty. If @c svn_depth_files then do the same 04484 * and for top-level file entries as well (if any). If 04485 * @c svn_depth_immediates, do the same as @c svn_depth_files but also diff 04486 * top-level subdirectories at @c svn_depth_empty. If @c svn_depth_infinity, 04487 * then diff fully recursively. In the latter case, @a anchor should be part 04488 * of an access baton set for the @a target hierarchy. 04489 * 04490 * @a ignore_ancestry determines whether paths that have discontinuous node 04491 * ancestry are treated as delete/add or as simple modifications. If 04492 * @a ignore_ancestry is @c FALSE, then any discontinuous node ancestry will 04493 * result in the diff given as a full delete followed by an add. 04494 * 04495 * If @a use_text_base is TRUE, then compare the repository against 04496 * the working copy's text-base files, rather than the working files. 04497 * 04498 * Normally, the difference from repository->working_copy is shown. 04499 * If @a reverse_order is TRUE, then show working_copy->repository diffs. 04500 * 04501 * If @a cancel_func is non-NULL, it will be used along with @a cancel_baton 04502 * to periodically check if the client has canceled the operation. 04503 * 04504 * @a changelists is an array of <tt>const char *</tt> changelist 04505 * names, used as a restrictive filter on items whose differences are 04506 * reported; that is, don't generate diffs about any item unless 04507 * it's a member of one of those changelists. If @a changelists is 04508 * empty (or altogether @c NULL), no changelist filtering occurs. 04509 * 04510 * @since New in 1.6. 04511 */ 04512 svn_error_t * 04513 svn_wc_get_diff_editor5(svn_wc_adm_access_t *anchor, 04514 const char *target, 04515 const svn_wc_diff_callbacks3_t *callbacks, 04516 void *callback_baton, 04517 svn_depth_t depth, 04518 svn_boolean_t ignore_ancestry, 04519 svn_boolean_t use_text_base, 04520 svn_boolean_t reverse_order, 04521 svn_cancel_func_t cancel_func, 04522 void *cancel_baton, 04523 const apr_array_header_t *changelists, 04524 const svn_delta_editor_t **editor, 04525 void **edit_baton, 04526 apr_pool_t *pool); 04527 04528 /** 04529 * Similar to svn_wc_get_diff_editor5(), but with an 04530 * @c svn_wc_diff_callbacks2_t instead of @c svn_wc_diff_callbacks3_t. 04531 * 04532 * @deprecated Provided for backward compatibility with the 1.5 API. 04533 */ 04534 SVN_DEPRECATED 04535 svn_error_t * 04536 svn_wc_get_diff_editor4(svn_wc_adm_access_t *anchor, 04537 const char *target, 04538 const svn_wc_diff_callbacks2_t *callbacks, 04539 void *callback_baton, 04540 svn_depth_t depth, 04541 svn_boolean_t ignore_ancestry, 04542 svn_boolean_t use_text_base, 04543 svn_boolean_t reverse_order, 04544 svn_cancel_func_t cancel_func, 04545 void *cancel_baton, 04546 const apr_array_header_t *changelists, 04547 const svn_delta_editor_t **editor, 04548 void **edit_baton, 04549 apr_pool_t *pool); 04550 04551 /** 04552 * Similar to svn_wc_get_diff_editor4(), but with @a changelists 04553 * passed as @c NULL, and @a depth set to @c svn_depth_infinity if @a 04554 * recurse is TRUE, or @c svn_depth_files if @a recurse is FALSE. 04555 * 04556 * @deprecated Provided for backward compatibility with the 1.4 API. 04557 04558 * @since New in 1.2. 04559 */ 04560 SVN_DEPRECATED 04561 svn_error_t * 04562 svn_wc_get_diff_editor3(svn_wc_adm_access_t *anchor, 04563 const char *target, 04564 const svn_wc_diff_callbacks2_t *callbacks, 04565 void *callback_baton, 04566 svn_boolean_t recurse, 04567 svn_boolean_t ignore_ancestry, 04568 svn_boolean_t use_text_base, 04569 svn_boolean_t reverse_order, 04570 svn_cancel_func_t cancel_func, 04571 void *cancel_baton, 04572 const svn_delta_editor_t **editor, 04573 void **edit_baton, 04574 apr_pool_t *pool); 04575 04576 04577 /** 04578 * Similar to svn_wc_get_diff_editor3(), but with an 04579 * @c svn_wc_diff_callbacks_t instead of @c svn_wc_diff_callbacks2_t. 04580 * 04581 * @deprecated Provided for backward compatibility with the 1.1 API. 04582 */ 04583 SVN_DEPRECATED 04584 svn_error_t * 04585 svn_wc_get_diff_editor2(svn_wc_adm_access_t *anchor, 04586 const char *target, 04587 const svn_wc_diff_callbacks_t *callbacks, 04588 void *callback_baton, 04589 svn_boolean_t recurse, 04590 svn_boolean_t ignore_ancestry, 04591 svn_boolean_t use_text_base, 04592 svn_boolean_t reverse_order, 04593 svn_cancel_func_t cancel_func, 04594 void *cancel_baton, 04595 const svn_delta_editor_t **editor, 04596 void **edit_baton, 04597 apr_pool_t *pool); 04598 04599 04600 /** 04601 * Similar to svn_wc_get_diff_editor2(), but with @a ignore_ancestry 04602 * always set to @c FALSE. 04603 * 04604 * @deprecated Provided for backward compatibility with the 1.0 API. 04605 */ 04606 SVN_DEPRECATED 04607 svn_error_t * 04608 svn_wc_get_diff_editor(svn_wc_adm_access_t *anchor, 04609 const char *target, 04610 const svn_wc_diff_callbacks_t *callbacks, 04611 void *callback_baton, 04612 svn_boolean_t recurse, 04613 svn_boolean_t use_text_base, 04614 svn_boolean_t reverse_order, 04615 svn_cancel_func_t cancel_func, 04616 void *cancel_baton, 04617 const svn_delta_editor_t **editor, 04618 void **edit_baton, 04619 apr_pool_t *pool); 04620 04621 04622 /** 04623 * Compare working copy against the text-base. 04624 * 04625 * @a anchor/@a target represent the base of the hierarchy to be compared. 04626 * 04627 * @a callbacks/@a callback_baton is the callback table to use when two 04628 * files are to be compared. 04629 * 04630 * If @a depth is @c svn_depth_empty, just diff exactly @a target or 04631 * @a anchor if @a target is empty. If @c svn_depth_files then do the same 04632 * and for top-level file entries as well (if any). If 04633 * @c svn_depth_immediates, do the same as @c svn_depth_files but also diff 04634 * top-level subdirectories at @c svn_depth_empty. If @c svn_depth_infinity, 04635 * then diff fully recursively. In the latter case, @a anchor should be part 04636 * of an access baton set for the @a target hierarchy. 04637 * 04638 * @a ignore_ancestry determines whether paths that have discontinuous node 04639 * ancestry are treated as delete/add or as simple modifications. If 04640 * @a ignore_ancestry is @c FALSE, then any discontinuous node ancestry will 04641 * result in the diff given as a full delete followed by an add. 04642 * 04643 * @a changelists is an array of <tt>const char *</tt> changelist 04644 * names, used as a restrictive filter on items whose differences are 04645 * reported; that is, don't generate diffs about any item unless 04646 * it's a member of one of those changelists. If @a changelists is 04647 * empty (or altogether @c NULL), no changelist filtering occurs. 04648 * 04649 * @since New in 1.6. 04650 */ 04651 svn_error_t * 04652 svn_wc_diff5(svn_wc_adm_access_t *anchor, 04653 const char *target, 04654 const svn_wc_diff_callbacks3_t *callbacks, 04655 void *callback_baton, 04656 svn_depth_t depth, 04657 svn_boolean_t ignore_ancestry, 04658 const apr_array_header_t *changelists, 04659 apr_pool_t *pool); 04660 04661 /** 04662 * Similar to svn_wc_diff5(), but with a @c svn_wc_diff_callbacks2_t argument 04663 * instead of @c svn_wc_diff_callbacks3_t. 04664 * 04665 * @deprecated Provided for backward compatibility with the 1.5 API. 04666 */ 04667 SVN_DEPRECATED 04668 svn_error_t * 04669 svn_wc_diff4(svn_wc_adm_access_t *anchor, 04670 const char *target, 04671 const svn_wc_diff_callbacks2_t *callbacks, 04672 void *callback_baton, 04673 svn_depth_t depth, 04674 svn_boolean_t ignore_ancestry, 04675 const apr_array_header_t *changelists, 04676 apr_pool_t *pool); 04677 04678 04679 /** 04680 * Similar to svn_wc_diff4(), but with @a changelists passed @c NULL, 04681 * and @a depth set to @c svn_depth_infinity if @a recurse is TRUE, or 04682 * @c svn_depth_files if @a recurse is FALSE. 04683 * 04684 * @deprecated Provided for backward compatibility with the 1.2 API. 04685 */ 04686 SVN_DEPRECATED 04687 svn_error_t * 04688 svn_wc_diff3(svn_wc_adm_access_t *anchor, 04689 const char *target, 04690 const svn_wc_diff_callbacks2_t *callbacks, 04691 void *callback_baton, 04692 svn_boolean_t recurse, 04693 svn_boolean_t ignore_ancestry, 04694 apr_pool_t *pool); 04695 04696 /** 04697 * Similar to svn_wc_diff3(), but with a @c svn_wc_diff_callbacks_t argument 04698 * instead of @c svn_wc_diff_callbacks2_t. 04699 * 04700 * @deprecated Provided for backward compatibility with the 1.1 API. 04701 */ 04702 SVN_DEPRECATED 04703 svn_error_t * 04704 svn_wc_diff2(svn_wc_adm_access_t *anchor, 04705 const char *target, 04706 const svn_wc_diff_callbacks_t *callbacks, 04707 void *callback_baton, 04708 svn_boolean_t recurse, 04709 svn_boolean_t ignore_ancestry, 04710 apr_pool_t *pool); 04711 04712 /** 04713 * Similar to svn_wc_diff2(), but with @a ignore_ancestry always set 04714 * to @c FALSE. 04715 * 04716 * @deprecated Provided for backward compatibility with the 1.0 API. 04717 */ 04718 SVN_DEPRECATED 04719 svn_error_t * 04720 svn_wc_diff(svn_wc_adm_access_t *anchor, 04721 const char *target, 04722 const svn_wc_diff_callbacks_t *callbacks, 04723 void *callback_baton, 04724 svn_boolean_t recurse, 04725 apr_pool_t *pool); 04726 04727 04728 /** Given a @a path to a file or directory under version control, discover 04729 * any local changes made to properties and/or the set of 'pristine' 04730 * properties. @a adm_access is an access baton set for @a path. 04731 * 04732 * If @a propchanges is non-@c NULL, return these changes as an array of 04733 * @c svn_prop_t structures stored in @a *propchanges. The structures and 04734 * array will be allocated in @a pool. If there are no local property 04735 * modifications on @a path, then set @a *propchanges to @c NULL. 04736 * 04737 * If @a original_props is non-@c NULL, then set @a *original_props to 04738 * hashtable (<tt>const char *name</tt> -> <tt>const svn_string_t *value</tt>) 04739 * that represents the 'pristine' property list of @a path. This hashtable is 04740 * allocated in @a pool, and can be used to compare old and new values of 04741 * properties. 04742 */ 04743 svn_error_t * 04744 svn_wc_get_prop_diffs(apr_array_header_t **propchanges, 04745 apr_hash_t **original_props, 04746 const char *path, 04747 svn_wc_adm_access_t *adm_access, 04748 apr_pool_t *pool); 04749 04750 04751 /** The outcome of a merge carried out (or tried as a dry-run) by 04752 * svn_wc_merge() 04753 */ 04754 typedef enum svn_wc_merge_outcome_t 04755 { 04756 /** The working copy is (or would be) unchanged. The changes to be 04757 * merged were already present in the working copy 04758 */ 04759 svn_wc_merge_unchanged, 04760 04761 /** The working copy has been (or would be) changed. */ 04762 svn_wc_merge_merged, 04763 04764 /** The working copy has been (or would be) changed, but there was (or 04765 * would be) a conflict 04766 */ 04767 svn_wc_merge_conflict, 04768 04769 /** No merge was performed, probably because the target file was 04770 * either absent or not under version control. 04771 */ 04772 svn_wc_merge_no_merge 04773 04774 } svn_wc_merge_outcome_t; 04775 04776 /** Given paths to three fulltexts, merge the differences between @a left 04777 * and @a right into @a merge_target. (It may help to know that @a left, 04778 * @a right, and @a merge_target correspond to "OLDER", "YOURS", and "MINE", 04779 * respectively, in the diff3 documentation.) Use @a pool for any 04780 * temporary allocation. 04781 * 04782 * @a adm_access is an access baton with a write lock for the directory 04783 * containing @a merge_target. 04784 * 04785 * This function assumes that @a left and @a right are in repository-normal 04786 * form (linefeeds, with keywords contracted); if necessary, 04787 * @a merge_target is temporarily converted to this form to receive the 04788 * changes, then translated back again. 04789 * 04790 * If @a merge_target is absent, or present but not under version 04791 * control, then set @a *merge_outcome to @c svn_wc_merge_no_merge and 04792 * return success without merging anything. (The reasoning is that if 04793 * the file is not versioned, then it is probably unrelated to the 04794 * changes being considered, so they should not be merged into it.) 04795 * 04796 * @a dry_run determines whether the working copy is modified. When it 04797 * is @c FALSE the merge will cause @a merge_target to be modified, when it 04798 * is @c TRUE the merge will be carried out to determine the result but 04799 * @a merge_target will not be modified. 04800 * 04801 * If @a diff3_cmd is non-NULL, then use it as the diff3 command for 04802 * any merging; otherwise, use the built-in merge code. If @a 04803 * merge_options is non-NULL, either pass its elements to @a diff3_cmd or 04804 * parse it and use as options to the internal merge code (see 04805 * svn_diff_file_options_parse()). @a merge_options must contain 04806 * <tt>const char *</tt> elements. 04807 * 04808 * The outcome of the merge is returned in @a *merge_outcome. If there 04809 * is a conflict and @a dry_run is @c FALSE, then attempt to call @a 04810 * conflict_func with @a conflict_baton (if non-NULL). If the 04811 * conflict callback cannot resolve the conflict, then: 04812 * 04813 * * Put conflict markers around the conflicting regions in 04814 * @a merge_target, labeled with @a left_label, @a right_label, and 04815 * @a target_label. (If any of these labels are @c NULL, default 04816 * values will be used.) 04817 * 04818 * * Copy @a left, @a right, and the original @a merge_target to unique 04819 * names in the same directory as @a merge_target, ending with the 04820 * suffixes ".LEFT_LABEL", ".RIGHT_LABEL", and ".TARGET_LABEL" 04821 * respectively. 04822 * 04823 * * Mark the entry for @a merge_target as "conflicted", and track the 04824 * above mentioned backup files in the entry as well. 04825 * 04826 * Binary case: 04827 * 04828 * If @a merge_target is a binary file, then no merging is attempted, 04829 * the merge is deemed to be a conflict. If @a dry_run is @c FALSE the 04830 * working @a merge_target is untouched, and copies of @a left and 04831 * @a right are created next to it using @a left_label and @a right_label. 04832 * @a merge_target's entry is marked as "conflicted", and begins 04833 * tracking the two backup files. If @a dry_run is @c TRUE no files are 04834 * changed. The outcome of the merge is returned in @a *merge_outcome. 04835 * 04836 * @since New in 1.5. 04837 */ 04838 svn_error_t * 04839 svn_wc_merge3(enum svn_wc_merge_outcome_t *merge_outcome, 04840 const char *left, 04841 const char *right, 04842 const char *merge_target, 04843 svn_wc_adm_access_t *adm_access, 04844 const char *left_label, 04845 const char *right_label, 04846 const char *target_label, 04847 svn_boolean_t dry_run, 04848 const char *diff3_cmd, 04849 const apr_array_header_t *merge_options, 04850 const apr_array_header_t *prop_diff, 04851 svn_wc_conflict_resolver_func_t conflict_func, 04852 void *conflict_baton, 04853 apr_pool_t *pool); 04854 04855 /** Similar to svn_wc_merge3(), but with @a prop_diff, @a 04856 * conflict_func, @a conflict_baton set to NULL. 04857 * 04858 * @deprecated Provided for backwards compatibility with the 1.4 API. 04859 */ 04860 SVN_DEPRECATED 04861 svn_error_t * 04862 svn_wc_merge2(enum svn_wc_merge_outcome_t *merge_outcome, 04863 const char *left, 04864 const char *right, 04865 const char *merge_target, 04866 svn_wc_adm_access_t *adm_access, 04867 const char *left_label, 04868 const char *right_label, 04869 const char *target_label, 04870 svn_boolean_t dry_run, 04871 const char *diff3_cmd, 04872 const apr_array_header_t *merge_options, 04873 apr_pool_t *pool); 04874 04875 04876 /** Similar to svn_wc_merge2(), but with @a merge_options set to NULL. 04877 * 04878 * @deprecated Provided for backwards compatibility with the 1.3 API. 04879 */ 04880 SVN_DEPRECATED 04881 svn_error_t * 04882 svn_wc_merge(const char *left, 04883 const char *right, 04884 const char *merge_target, 04885 svn_wc_adm_access_t *adm_access, 04886 const char *left_label, 04887 const char *right_label, 04888 const char *target_label, 04889 svn_boolean_t dry_run, 04890 enum svn_wc_merge_outcome_t *merge_outcome, 04891 const char *diff3_cmd, 04892 apr_pool_t *pool); 04893 04894 04895 /** Given a @a path under version control, merge an array of @a 04896 * propchanges into the path's existing properties. @a propchanges is 04897 * an array of @c svn_prop_t objects, and @a baseprops is a hash 04898 * representing the original set of properties that @a propchanges is 04899 * working against. @a adm_access is an access baton for the directory 04900 * containing @a path. 04901 * 04902 * If @a base_merge is @c FALSE only the working properties will be changed, 04903 * if it is @c TRUE both the base and working properties will be changed. 04904 * 04905 * If @a state is non-NULL, set @a *state to the state of the properties 04906 * after the merge. 04907 * 04908 * If conflicts are found when merging working properties, they are 04909 * described in a temporary .prej file (or appended to an already-existing 04910 * .prej file), and the entry is marked "conflicted". Base properties 04911 * are changed unconditionally, if @a base_merge is @c TRUE, they never result 04912 * in a conflict. 04913 * 04914 * If @a path is not under version control, return the error 04915 * SVN_ERR_UNVERSIONED_RESOURCE and don't touch anyone's properties. 04916 * 04917 * @since New in 1.5. 04918 */ 04919 svn_error_t * 04920 svn_wc_merge_props2(svn_wc_notify_state_t *state, 04921 const char *path, 04922 svn_wc_adm_access_t *adm_access, 04923 apr_hash_t *baseprops, 04924 const apr_array_header_t *propchanges, 04925 svn_boolean_t base_merge, 04926 svn_boolean_t dry_run, 04927 svn_wc_conflict_resolver_func_t conflict_func, 04928 void *conflict_baton, 04929 apr_pool_t *pool); 04930 04931 04932 /** 04933 * Same as svn_wc_merge_props2(), but with a @a conflict_func (and 04934 * baton) of NULL. 04935 * 04936 * @deprecated Provided for backward compatibility with the 1.3 API. 04937 * 04938 */ 04939 SVN_DEPRECATED 04940 svn_error_t * 04941 svn_wc_merge_props(svn_wc_notify_state_t *state, 04942 const char *path, 04943 svn_wc_adm_access_t *adm_access, 04944 apr_hash_t *baseprops, 04945 const apr_array_header_t *propchanges, 04946 svn_boolean_t base_merge, 04947 svn_boolean_t dry_run, 04948 apr_pool_t *pool); 04949 04950 04951 /** 04952 * Similar to svn_wc_merge_props(), but no baseprops are given. 04953 * Instead, it's assumed that the incoming propchanges are based 04954 * against the working copy's own baseprops. While this assumption is 04955 * correct for 'svn update', it's incorrect for 'svn merge', and can 04956 * cause flawed behavior. (See issue #2035.) 04957 * 04958 * @deprecated Provided for backward compatibility with the 1.2 API. 04959 */ 04960 SVN_DEPRECATED 04961 svn_error_t * 04962 svn_wc_merge_prop_diffs(svn_wc_notify_state_t *state, 04963 const char *path, 04964 svn_wc_adm_access_t *adm_access, 04965 const apr_array_header_t *propchanges, 04966 svn_boolean_t base_merge, 04967 svn_boolean_t dry_run, 04968 apr_pool_t *pool); 04969 04970 04971 /** Given a @a path to a wc file, return a stream to the @a contents of 04972 * the pristine copy of the file. This is needed so clients can do 04973 * diffs. If the WC has no text-base, return a @c NULL instead of a 04974 * stream. 04975 * 04976 * @since New in 1.6. 04977 */ 04978 svn_error_t * 04979 svn_wc_get_pristine_contents(svn_stream_t **contents, 04980 const char *path, 04981 apr_pool_t *result_pool, 04982 apr_pool_t *scratch_pool); 04983 04984 04985 /** Returns a path to the pristine copy of @a path. Should use 04986 * svn_wc_get_pristine_contents() instead. 04987 * 04988 * @deprecated Provided for backwards compatibility with the 1.5 API. 04989 */ 04990 SVN_DEPRECATED 04991 svn_error_t * 04992 svn_wc_get_pristine_copy_path(const char *path, 04993 const char **pristine_path, 04994 apr_pool_t *pool); 04995 04996 04997 /** 04998 * Recurse from @a path, cleaning up unfinished log business. Perform 04999 * necessary allocations in @a pool. Any working copy locks under @a path 05000 * will be taken over and then cleared by this function. If @a diff3_cmd 05001 * is non-NULL, then use it as the diff3 command for any merging; otherwise, 05002 * use the built-in merge code. 05003 * 05004 * WARNING: there is no mechanism that will protect locks that are still 05005 * being used. 05006 * 05007 * If @a cancel_func is non-NULL, invoke it with @a cancel_baton at 05008 * various points during the operation. If it returns an error 05009 * (typically @c SVN_ERR_CANCELLED), return that error immediately. 05010 * 05011 * @since New in 1.2. 05012 */ 05013 svn_error_t * 05014 svn_wc_cleanup2(const char *path, 05015 const char *diff3_cmd, 05016 svn_cancel_func_t cancel_func, 05017 void *cancel_baton, 05018 apr_pool_t *pool); 05019 05020 /** 05021 * Similar to svn_wc_cleanup2(). @a optional_adm_access is an historic 05022 * relic and not used, it may be NULL. 05023 * 05024 * @deprecated Provided for backward compatibility with the 1.1 API. 05025 */ 05026 SVN_DEPRECATED 05027 svn_error_t * 05028 svn_wc_cleanup(const char *path, 05029 svn_wc_adm_access_t *optional_adm_access, 05030 const char *diff3_cmd, 05031 svn_cancel_func_t cancel_func, 05032 void *cancel_baton, 05033 apr_pool_t *pool); 05034 05035 05036 /** Relocation validation callback typedef. 05037 * 05038 * Called for each relocated file/directory. @a uuid, if non-NULL, contains 05039 * the expected repository UUID, @a url contains the tentative URL. 05040 * 05041 * @a baton is a closure object; it should be provided by the 05042 * implementation, and passed by the caller. 05043 * 05044 * If @a root is TRUE, then the implementation should make sure that @a url 05045 * is the repository root. Else, it can be an URL inside the repository. 05046 * @a pool may be used for temporary allocations. 05047 * 05048 * @since New in 1.5. 05049 */ 05050 typedef svn_error_t *(*svn_wc_relocation_validator3_t)(void *baton, 05051 const char *uuid, 05052 const char *url, 05053 const char *root_url, 05054 apr_pool_t *pool); 05055 05056 /** Similar to @c svn_wc_relocation_validator3_t, but without 05057 * the @a root_url arguments. 05058 * 05059 * @deprecated Provided for backwards compatibility with the 1.4 API. 05060 */ 05061 typedef svn_error_t *(*svn_wc_relocation_validator2_t)(void *baton, 05062 const char *uuid, 05063 const char *url, 05064 svn_boolean_t root, 05065 apr_pool_t *pool); 05066 05067 /** Similar to @c svn_wc_relocation_validator2_t, but without 05068 * the @a root and @a pool arguments. @a uuid will not be NULL in this version 05069 * of the function. 05070 * 05071 * @deprecated Provided for backwards compatibility with the 1.3 API. 05072 */ 05073 typedef svn_error_t *(*svn_wc_relocation_validator_t)(void *baton, 05074 const char *uuid, 05075 const char *url); 05076 05077 /** Change repository references at @a path that begin with @a from 05078 * to begin with @a to instead. Perform necessary allocations in @a pool. 05079 * If @a recurse is TRUE, do so. @a validator (and its baton, 05080 * @a validator_baton), will be called for each newly generated URL. 05081 * 05082 * @a adm_access is an access baton for the directory containing 05083 * @a path. 05084 * 05085 * @since New in 1.5. 05086 */ 05087 svn_error_t * 05088 svn_wc_relocate3(const char *path, 05089 svn_wc_adm_access_t *adm_access, 05090 const char *from, 05091 const char *to, 05092 svn_boolean_t recurse, 05093 svn_wc_relocation_validator3_t validator, 05094 void *validator_baton, 05095 apr_pool_t *pool); 05096 05097 /** Similar to svn_wc_relocate3(), but uses @c svn_wc_relocation_validator2_t. 05098 * 05099 * @deprecated Provided for backwards compatibility with the 1.4 API. */ 05100 SVN_DEPRECATED 05101 svn_error_t * 05102 svn_wc_relocate2(const char *path, 05103 svn_wc_adm_access_t *adm_access, 05104 const char *from, 05105 const char *to, 05106 svn_boolean_t recurse, 05107 svn_wc_relocation_validator2_t validator, 05108 void *validator_baton, 05109 apr_pool_t *pool); 05110 05111 /** Similar to svn_wc_relocate2(), but uses @c svn_wc_relocation_validator_t. 05112 * 05113 * @deprecated Provided for backwards compatibility with the 1.3 API. */ 05114 SVN_DEPRECATED 05115 svn_error_t * 05116 svn_wc_relocate(const char *path, 05117 svn_wc_adm_access_t *adm_access, 05118 const char *from, 05119 const char *to, 05120 svn_boolean_t recurse, 05121 svn_wc_relocation_validator_t validator, 05122 void *validator_baton, 05123 apr_pool_t *pool); 05124 05125 05126 /** 05127 * Revert changes to @a path. Perform necessary allocations in @a pool. 05128 * 05129 * @a parent_access is an access baton for the directory containing @a 05130 * path, unless @a path is a working copy root (as determined by @c 05131 * svn_wc_is_wc_root), in which case @a parent_access refers to @a 05132 * path itself. 05133 * 05134 * If @a depth is @c svn_depth_empty, revert just @a path (if a 05135 * directory, then revert just the properties on that directory). 05136 * Else if @c svn_depth_files, revert @a path and any files 05137 * directly under @a path if it is directory. Else if 05138 * @c svn_depth_immediates, revert all of the preceding plus 05139 * properties on immediate subdirectories; else if @c svn_depth_infinity, 05140 * revert path and everything under it fully recursively. 05141 * 05142 * @a changelists is an array of <tt>const char *</tt> changelist 05143 * names, used as a restrictive filter on items reverted; that is, 05144 * don't revert any item unless it's a member of one of those 05145 * changelists. If @a changelists is empty (or altogether @c NULL), 05146 * no changelist filtering occurs. 05147 * 05148 * If @a cancel_func is non-NULL, call it with @a cancel_baton at 05149 * various points during the reversion process. If it returns an 05150 * error (typically @c SVN_ERR_CANCELLED), return that error 05151 * immediately. 05152 * 05153 * If @a use_commit_times is TRUE, then all reverted working-files 05154 * will have their timestamp set to the last-committed-time. If 05155 * FALSE, the reverted working-files will be touched with the 'now' time. 05156 * 05157 * For each item reverted, @a notify_func will be called with @a notify_baton 05158 * and the path of the reverted item. @a notify_func may be @c NULL if this 05159 * notification is not needed. 05160 * 05161 * If @a path is not under version control, return the error 05162 * SVN_ERR_UNVERSIONED_RESOURCE. 05163 * 05164 * @since New in 1.5. 05165 */ 05166 svn_error_t * 05167 svn_wc_revert3(const char *path, 05168 svn_wc_adm_access_t *parent_access, 05169 svn_depth_t depth, 05170 svn_boolean_t use_commit_times, 05171 const apr_array_header_t *changelists, 05172 svn_cancel_func_t cancel_func, 05173 void *cancel_baton, 05174 svn_wc_notify_func2_t notify_func, 05175 void *notify_baton, 05176 apr_pool_t *pool); 05177 05178 /** 05179 * Similar to svn_wc_revert3(), but with @a changelists passed as @c 05180 * NULL, and @a depth set according to @a recursive: if @a recursive 05181 * is TRUE, @a depth is @c svn_depth_infinity; if FALSE, @a depth is 05182 * @c svn_depth_empty. 05183 * 05184 * @note Most APIs map @a recurse==FALSE to @a depth==svn_depth_files; 05185 * revert is deliberately different. 05186 * 05187 * @deprecated Provided for backward compatibility with the 1.2 API. 05188 */ 05189 SVN_DEPRECATED 05190 svn_error_t * 05191 svn_wc_revert2(const char *path, 05192 svn_wc_adm_access_t *parent_access, 05193 svn_boolean_t recursive, 05194 svn_boolean_t use_commit_times, 05195 svn_cancel_func_t cancel_func, 05196 void *cancel_baton, 05197 svn_wc_notify_func2_t notify_func, 05198 void *notify_baton, 05199 apr_pool_t *pool); 05200 05201 /** 05202 * Similar to svn_wc_revert2(), but takes an @c svn_wc_notify_func_t instead. 05203 * 05204 * @deprecated Provided for backward compatibility with the 1.1 API. 05205 */ 05206 SVN_DEPRECATED 05207 svn_error_t * 05208 svn_wc_revert(const char *path, 05209 svn_wc_adm_access_t *parent_access, 05210 svn_boolean_t recursive, 05211 svn_boolean_t use_commit_times, 05212 svn_cancel_func_t cancel_func, 05213 void *cancel_baton, 05214 svn_wc_notify_func_t notify_func, 05215 void *notify_baton, 05216 apr_pool_t *pool); 05217 05218 05219 /* Tmp files */ 05220 05221 /** Create a unique temporary file in administrative tmp/ area of 05222 * directory @a path. Return a handle in @a *fp and the path 05223 * in @a *new_name. Either @a fp or @a new_name can be NULL. 05224 * 05225 * The flags will be <tt>APR_WRITE | APR_CREATE | APR_EXCL</tt> and 05226 * optionally @c APR_DELONCLOSE (if the @a delete_when argument is 05227 * set to @c svn_io_file_del_on_close). 05228 * 05229 * This means that as soon as @a fp is closed, the tmp file will vanish. 05230 * 05231 * @since New in 1.4 05232 */ 05233 svn_error_t * 05234 svn_wc_create_tmp_file2(apr_file_t **fp, 05235 const char **new_name, 05236 const char *path, 05237 svn_io_file_del_t delete_when, 05238 apr_pool_t *pool); 05239 05240 05241 /** Same as svn_wc_create_tmp_file2(), but with @a new_name set to @c NULL, 05242 * and without the ability to delete the file on pool cleanup. 05243 * 05244 * @deprecated For compatibility with 1.3 API 05245 */ 05246 SVN_DEPRECATED 05247 svn_error_t * 05248 svn_wc_create_tmp_file(apr_file_t **fp, 05249 const char *path, 05250 svn_boolean_t delete_on_close, 05251 apr_pool_t *pool); 05252 05253 05254 05255 /* EOL conversion and keyword expansion. */ 05256 05257 /** Set @a xlated_path to a translated copy of @a src 05258 * or to @a src itself if no translation is necessary. 05259 * That is, if @a versioned_file's properties indicate newline conversion or 05260 * keyword expansion, point @a *xlated_path to a copy of @a src 05261 * whose newlines and keywords are converted using the translation 05262 * as requested by @a flags. 05263 * 05264 * When translating to the normal form, inconsistent eol styles will be 05265 * repaired when appropriate for the given setting. When translating 05266 * from normal form, no EOL repair is performed (consistency is assumed). 05267 * This behaviour can be overridden by specifying 05268 * @c SVN_WC_TRANSLATE_FORCE_EOL_REPAIR. 05269 * 05270 * The caller can explicitly request a new file to be returned by setting the 05271 * @c SVN_WC_TRANSLATE_FORCE_COPY flag in @a flags. 05272 * 05273 * This function is generally used to get a file that can be compared 05274 * meaningfully against @a versioned_file's text base, if 05275 * @c SVN_WC_TRANSLATE_TO_NF is specified, against @a versioned_file itself 05276 * if @c SVN_WC_TRANSLATE_FROM_NF is specified. 05277 * 05278 * Output files are created in the temp file area belonging to 05279 * @a versioned_file. By default they will be deleted at pool cleanup. 05280 * 05281 * If @c SVN_WC_TRANSLATE_NO_OUTPUT_CLEANUP is specified, the default 05282 * pool cleanup handler to remove @a *xlated_path is not registered. 05283 * 05284 * If an error is returned, the effect on @a *xlated_path is undefined. 05285 * 05286 * @since New in 1.4 05287 */ 05288 svn_error_t * 05289 svn_wc_translated_file2(const char **xlated_path, 05290 const char *src, 05291 const char *versioned_file, 05292 svn_wc_adm_access_t *adm_access, 05293 apr_uint32_t flags, 05294 apr_pool_t *pool); 05295 05296 05297 /** Same as svn_wc_translated_file2, but will never clean up 05298 * temporary files. 05299 * 05300 * @deprecated Provided for compatibility with the 1.3 API 05301 */ 05302 SVN_DEPRECATED 05303 svn_error_t * 05304 svn_wc_translated_file(const char **xlated_p, 05305 const char *vfile, 05306 svn_wc_adm_access_t *adm_access, 05307 svn_boolean_t force_repair, 05308 apr_pool_t *pool); 05309 05310 05311 /** Returns a @a stream allocated in @a pool with access to the given 05312 * @a path taking the file properties from @a versioned_file using 05313 * @a adm_access. 05314 * 05315 * When translation from normal form is requested 05316 * (@c SVN_WC_TRANSLATE_FROM_NF is specified in @a flags), @a path 05317 * is used as target path and stream read operations are not supported. 05318 * Conversely, if translation to normal form is requested 05319 * (@c SVN_WC_TRANSLATE_TO_NF is specified in @a flags), @a path is 05320 * used as source path and stream write operations are not supported. 05321 * 05322 * The @a flags are the same constants as those used for 05323 * svn_wc_translated_file(). 05324 * 05325 * @since New in 1.5. 05326 */ 05327 svn_error_t * 05328 svn_wc_translated_stream(svn_stream_t **stream, 05329 const char *path, 05330 const char *versioned_file, 05331 svn_wc_adm_access_t *adm_access, 05332 apr_uint32_t flags, 05333 apr_pool_t *pool); 05334 05335 05336 /* Text/Prop Deltas Using an Editor */ 05337 05338 05339 /** Send the local modifications for versioned file @a path (with 05340 * matching @a file_baton) through @a editor, then close @a file_baton 05341 * afterwards. Use @a pool for any temporary allocation and 05342 * @a adm_access as an access baton for @a path. 05343 * 05344 * This process creates a copy of @a path with keywords and eol 05345 * untranslated. If @a tempfile is non-NULL, set @a *tempfile to the 05346 * path to this copy. Do not clean up the copy; caller can do that. 05347 * If @a digest is non-NULL, put the MD5 checksum of the 05348 * temporary file into @a digest, which must point to @c APR_MD5_DIGESTSIZE 05349 * bytes of storage. (The purpose of handing back the tmp copy is that 05350 * it is usually about to become the new text base anyway, but the 05351 * installation of the new text base is outside the scope of this 05352 * function.) 05353 * 05354 * If @a fulltext, send the untranslated copy of @a path through @a editor 05355 * as full-text; else send it as svndiff against the current text base. 05356 * 05357 * If sending a diff, and the recorded checksum for @a path's text-base 05358 * does not match the current actual checksum, then remove the tmp 05359 * copy (and set @a *tempfile to NULL if appropriate), and return the 05360 * error @c SVN_ERR_WC_CORRUPT_TEXT_BASE. 05361 * 05362 * @note This is intended for use with both infix and postfix 05363 * text-delta styled editor drivers. 05364 * 05365 * @since New in 1.4. 05366 */ 05367 svn_error_t * 05368 svn_wc_transmit_text_deltas2(const char **tempfile, 05369 unsigned char digest[], 05370 const char *path, 05371 svn_wc_adm_access_t *adm_access, 05372 svn_boolean_t fulltext, 05373 const svn_delta_editor_t *editor, 05374 void *file_baton, 05375 apr_pool_t *pool); 05376 05377 /** Similar to svn_wc_transmit_text_deltas2(), but with @a digest set to NULL. 05378 * 05379 * @deprecated Provided for backwards compatibility with the 1.3 API. 05380 */ 05381 SVN_DEPRECATED 05382 svn_error_t * 05383 svn_wc_transmit_text_deltas(const char *path, 05384 svn_wc_adm_access_t *adm_access, 05385 svn_boolean_t fulltext, 05386 const svn_delta_editor_t *editor, 05387 void *file_baton, 05388 const char **tempfile, 05389 apr_pool_t *pool); 05390 05391 05392 /** Given a @a path with its accompanying @a entry, transmit all local 05393 * property modifications using the appropriate @a editor method (in 05394 * conjunction with @a baton). @a adm_access is an access baton set 05395 * that contains @a path. Use @a pool for all allocations. 05396 * 05397 * If a temporary file remains after this function is finished, the 05398 * path to that file is returned in @a *tempfile (so the caller can 05399 * clean this up if it wishes to do so). 05400 * 05401 * @note Starting version 1.5, no tempfile will ever be returned 05402 * anymore. If @a *tempfile is passed, its value is set to @c NULL. 05403 */ 05404 svn_error_t * 05405 svn_wc_transmit_prop_deltas(const char *path, 05406 svn_wc_adm_access_t *adm_access, 05407 const svn_wc_entry_t *entry, 05408 const svn_delta_editor_t *editor, 05409 void *baton, 05410 const char **tempfile, 05411 apr_pool_t *pool); 05412 05413 05414 /** Get the run-time configured list of ignore patterns from the 05415 * @c svn_config_t's in the @a config hash, and store them in @a *patterns. 05416 * Allocate @a *patterns and its contents in @a pool. 05417 */ 05418 svn_error_t * 05419 svn_wc_get_default_ignores(apr_array_header_t **patterns, 05420 apr_hash_t *config, 05421 apr_pool_t *pool); 05422 05423 /** Get the list of ignore patterns from the @c svn_config_t's in the 05424 * @a config hash and the local ignore patterns from the directory 05425 * in @a adm_access, and store them in @a *patterns. 05426 * Allocate @a *patterns and its contents in @a pool. 05427 * 05428 * @since New in 1.3. 05429 */ 05430 svn_error_t * 05431 svn_wc_get_ignores(apr_array_header_t **patterns, 05432 apr_hash_t *config, 05433 svn_wc_adm_access_t *adm_access, 05434 apr_pool_t *pool); 05435 05436 /** Return TRUE iff @a str matches any of the elements of @a list, a 05437 * list of zero or more ignore patterns. 05438 * 05439 * @since New in 1.5. 05440 */ 05441 svn_boolean_t 05442 svn_wc_match_ignore_list(const char *str, 05443 apr_array_header_t *list, 05444 apr_pool_t *pool); 05445 05446 05447 /** Add @a lock to the working copy for @a path. @a adm_access must contain 05448 * a write lock for @a path. If @a path is read-only, due to locking 05449 * properties, make it writable. Perform temporary allocations in @a 05450 * pool. */ 05451 svn_error_t * 05452 svn_wc_add_lock(const char *path, 05453 const svn_lock_t *lock, 05454 svn_wc_adm_access_t *adm_access, 05455 apr_pool_t *pool); 05456 05457 /** Remove any lock from @a path. @a adm_access must contain a 05458 * write-lock for @a path. If @a path has a lock and the locking 05459 * so specifies, make the file read-only. Don't return an error if @a 05460 * path didn't have a lock. Perform temporary allocations in @a pool. */ 05461 svn_error_t * 05462 svn_wc_remove_lock(const char *path, 05463 svn_wc_adm_access_t *adm_access, 05464 apr_pool_t *pool); 05465 05466 05467 /** A structure to report a summary of a working copy, including the 05468 * mix of revisions found within it, whether any parts are switched or 05469 * locally modified, and whether it is a sparse checkout. 05470 * 05471 * @note Fields may be added to the end of this structure in future 05472 * versions. Therefore, to preserve binary compatibility, users 05473 * should not directly allocate structures of this type. 05474 * 05475 * @since New in 1.4 05476 */ 05477 typedef struct svn_wc_revision_status_t 05478 { 05479 svn_revnum_t min_rev; /**< Lowest revision found */ 05480 svn_revnum_t max_rev; /**< Highest revision found */ 05481 05482 svn_boolean_t switched; /**< Is anything switched? */ 05483 svn_boolean_t modified; /**< Is anything modified? */ 05484 05485 /** Whether any WC paths are at a depth other than @c svn_depth_infinity. 05486 * @since New in 1.5. 05487 */ 05488 svn_boolean_t sparse_checkout; 05489 } svn_wc_revision_status_t; 05490 05491 /** Set @a *result_p to point to a new @c svn_wc_revision_status_t structure 05492 * containing a summary of the revision range and status of the working copy 05493 * at @a wc_path (not including "externals"). 05494 * 05495 * Set @a (*result_p)->min_rev and @a (*result_p)->max_rev respectively to the 05496 * lowest and highest revision numbers in the working copy. If @a committed 05497 * is TRUE, summarize the last-changed revisions, else the base revisions. 05498 * 05499 * Set @a (*result_p)->switched to indicate whether any item in the WC is 05500 * switched relative to its parent. If @a trail_url is non-NULL, use it to 05501 * determine if @a wc_path itself is switched. It should be any trailing 05502 * portion of @a wc_path's expected URL, long enough to include any parts 05503 * that the caller considers might be changed by a switch. If it does not 05504 * match the end of @a wc_path's actual URL, then report a "switched" 05505 * status. 05506 * 05507 * Set @a (*result_p)->modified to indicate whether any item is locally 05508 * modified. 05509 * 05510 * If @a cancel_func is non-NULL, call it with @a cancel_baton to determine 05511 * if the client has cancelled the operation. 05512 * 05513 * Allocate *result_p in @a pool. 05514 * 05515 * @since New in 1.4 05516 */ 05517 svn_error_t * 05518 svn_wc_revision_status(svn_wc_revision_status_t **result_p, 05519 const char *wc_path, 05520 const char *trail_url, 05521 svn_boolean_t committed, 05522 svn_cancel_func_t cancel_func, 05523 void *cancel_baton, 05524 apr_pool_t *pool); 05525 05526 05527 /** 05528 * Set @a path's entry's 'changelist' attribute to @a changelist iff 05529 * @a changelist is not @c NULL; otherwise, remove any current 05530 * changelist assignment from @a path. @a changelist may not be the 05531 * empty string. @a adm_access is an access baton set that contains 05532 * @a path. 05533 * 05534 * If @a cancel_func is not @c NULL, call it with @a cancel_baton to 05535 * determine if the client has cancelled the operation. 05536 * 05537 * If @a notify_func is not @c NULL, call it with @a notify_baton to 05538 * report the change (using notification types @c 05539 * svn_wc_notify_changelist_set and @c svn_wc_notify_changelist_clear). 05540 * 05541 * @note For now, directories are NOT allowed to be associated with 05542 * changelists; there is confusion about whether they should behave 05543 * as depth-0 or depth-infinity objects. If @a path is a directory, 05544 * return @c SVN_ERR_UNSUPPORTED_FEATURE. 05545 * 05546 * @note This metadata is purely a client-side "bookkeeping" 05547 * convenience, and is entirely managed by the working copy. 05548 * 05549 * @since New in 1.5. 05550 */ 05551 svn_error_t * 05552 svn_wc_set_changelist(const char *path, 05553 const char *changelist, 05554 svn_wc_adm_access_t *adm_access, 05555 svn_cancel_func_t cancel_func, 05556 void *cancel_baton, 05557 svn_wc_notify_func2_t notify_func, 05558 void *notify_baton, 05559 apr_pool_t *pool); 05560 05561 /** Crop @a target according to @a depth. 05562 * 05563 * Remove any item that exceeds the boundary of @a depth (relative to 05564 * @a target) from revision control. Leave modified items behind 05565 * (unversioned), while removing unmodified ones completely. 05566 * 05567 * If @a target starts out with a shallower depth than @a depth, do not 05568 * upgrade it to @a depth (that would not be cropping); however, do 05569 * check children and crop them appropriately according to @a depth. 05570 * 05571 * Returns immediately with no error if @a target is not a directory, 05572 * or if @a depth is not restrictive (e.g., @c svn_depth_infinity). 05573 * 05574 * @a anchor is an access baton, with a tree lock, for the local path to the 05575 * working copy which will be used as the root of this operation. If 05576 * @a target is not empty, it represents an entry in the @a anchor path; 05577 * otherwise, the @a anchor path is the target. @a target may not be 05578 * @c NULL. 05579 * 05580 * If @a cancel_func is not @c NULL, call it with @a cancel_baton at 05581 * various points to determine if the client has cancelled the operation. 05582 * 05583 * If @a notify_func is not @c NULL, call it with @a notify_baton to 05584 * report changes as they are made. 05585 * 05586 * @note: svn_depth_exclude currently does nothing; passing it results 05587 * in immediate success with no side effects. 05588 * 05589 * @since New in 1.6 05590 */ 05591 svn_error_t * 05592 svn_wc_crop_tree(svn_wc_adm_access_t *anchor, 05593 const char *target, 05594 svn_depth_t depth, 05595 svn_wc_notify_func2_t notify_func, 05596 void *notify_baton, 05597 svn_cancel_func_t cancel_func, 05598 void *cancel_baton, 05599 apr_pool_t *pool); 05600 05601 /** @} */ 05602 05603 #ifdef __cplusplus 05604 } 05605 #endif /* __cplusplus */ 05606 05607 #endif /* SVN_WC_H */