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