svn_wc.h

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

Generated on Tue Jan 24 11:28:11 2017 for Subversion by  doxygen 1.4.7