svn_wc.h

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

Generated on Wed Dec 9 13:01:50 2015 for Subversion by  doxygen 1.4.7