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

Generated on Fri Nov 1 15:58:35 2013 for Subversion by  doxygen 1.4.7