svn_wc.h

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