Subversion 1.6.16

svn_client.h

Go to the documentation of this file.
00001 /**
00002  * @copyright
00003  * ====================================================================
00004  * Copyright (c) 2000-2008 CollabNet.  All rights reserved.
00005  *
00006  * This software is licensed as described in the file COPYING, which
00007  * you should have received as part of this distribution.  The terms
00008  * are also available at http://subversion.tigris.org/license-1.html.
00009  * If newer versions of this license are posted there, you may use a
00010  * newer version instead, at your option.
00011  *
00012  * This software consists of voluntary contributions made by many
00013  * individuals.  For exact contribution history, see the revision
00014  * history and logs, available at http://subversion.tigris.org/.
00015  * ====================================================================
00016  * @endcopyright
00017  *
00018  * @file svn_client.h
00019  * @brief Subversion's client library
00020  *
00021  * Requires:  The working copy library and repository access library.
00022  * Provides:  Broad wrappers around working copy library functionality.
00023  * Used By:   Client programs.
00024  */
00025 
00026 #ifndef SVN_CLIENT_H
00027 #define SVN_CLIENT_H
00028 
00029 #include <apr.h>
00030 #include <apr_pools.h>
00031 #include <apr_hash.h>
00032 #include <apr_tables.h>
00033 #include <apr_getopt.h>
00034 #include <apr_file_io.h>
00035 #include <apr_time.h>
00036 
00037 #include "svn_types.h"
00038 #include "svn_string.h"
00039 #include "svn_wc.h"
00040 #include "svn_opt.h"
00041 #include "svn_version.h"
00042 #include "svn_ra.h"
00043 #include "svn_diff.h"
00044 #include "svn_auth.h"
00045 
00046 #ifdef __cplusplus
00047 extern "C" {
00048 #endif /* __cplusplus */
00049 
00050 
00051 /**
00052    ### @todo  Multiple Targets
00053     - Up for debate:  an update on multiple targets is *not* atomic.
00054     Right now, svn_client_update only takes one path.  What's
00055     debatable is whether this should ever change.  On the one hand,
00056     it's kind of losing to have the client application loop over
00057     targets and call svn_client_update() on each one;  each call to
00058     update initializes a whole new repository session (network
00059     overhead, etc.)  On the other hand, it's a very simple
00060     implementation, and allows for the possibility that different
00061     targets may come from different repositories.  */
00062 
00063 
00064 /**
00065  * Get libsvn_client version information.
00066  *
00067  * @since New in 1.1.
00068  */
00069 const svn_version_t *
00070 svn_client_version(void);
00071 
00072 /** Client supporting functions
00073  *
00074  * @defgroup clnt_support Client supporting subsystem
00075  *
00076  * @{
00077  */
00078 
00079 
00080 /*** Authentication stuff ***/
00081 
00082 /**  The new authentication system allows the RA layer to "pull"
00083  *   information as needed from libsvn_client.
00084  *
00085  *   @deprecated Replaced by the svn_auth_* functions.
00086  *   @see auth_fns
00087  *
00088  *   @defgroup auth_fns_depr (deprecated) AuthZ client subsystem
00089  *
00090  *   @{
00091  */
00092 
00093 /** Create and return @a *provider, an authentication provider of type
00094  * svn_auth_cred_simple_t that gets information by prompting the user
00095  * with @a prompt_func and @a prompt_baton.  Allocate @a *provider in
00096  * @a pool.
00097  *
00098  * If both @c SVN_AUTH_PARAM_DEFAULT_USERNAME and
00099  * @c SVN_AUTH_PARAM_DEFAULT_PASSWORD are defined as runtime
00100  * parameters in the @c auth_baton, then @a *provider will return the
00101  * default arguments when svn_auth_first_credentials() is called.  If
00102  * svn_auth_first_credentials() fails, then @a *provider will
00103  * re-prompt @a retry_limit times (via svn_auth_next_credentials()).
00104  * For infinite retries, set @a retry_limit to value less than 0.
00105  *
00106  * @deprecated Provided for backward compatibility with the 1.3 API.
00107  * Use svn_auth_get_simple_prompt_provider() instead.
00108  */
00109 SVN_DEPRECATED
00110 void
00111 svn_client_get_simple_prompt_provider
00112   (svn_auth_provider_object_t **provider,
00113    svn_auth_simple_prompt_func_t prompt_func,
00114    void *prompt_baton,
00115    int retry_limit,
00116    apr_pool_t *pool);
00117 
00118 
00119 /** Create and return @a *provider, an authentication provider of type @c
00120  * svn_auth_cred_username_t that gets information by prompting the
00121  * user with @a prompt_func and @a prompt_baton.  Allocate @a *provider
00122  * in @a pool.
00123  *
00124  * If @c SVN_AUTH_PARAM_DEFAULT_USERNAME is defined as a runtime
00125  * parameter in the @c auth_baton, then @a *provider will return the
00126  * default argument when svn_auth_first_credentials() is called.  If
00127  * svn_auth_first_credentials() fails, then @a *provider will
00128  * re-prompt @a retry_limit times (via svn_auth_next_credentials()).
00129  * For infinite retries, set @a retry_limit to value less than 0.
00130  *
00131  * @deprecated Provided for backward compatibility with the 1.3 API.
00132  * Use svn_auth_get_username_prompt_provider() instead.
00133  */
00134 SVN_DEPRECATED
00135 void
00136 svn_client_get_username_prompt_provider
00137   (svn_auth_provider_object_t **provider,
00138    svn_auth_username_prompt_func_t prompt_func,
00139    void *prompt_baton,
00140    int retry_limit,
00141    apr_pool_t *pool);
00142 
00143 
00144 /** Create and return @a *provider, an authentication provider of type @c
00145  * svn_auth_cred_simple_t that gets/sets information from the user's
00146  * ~/.subversion configuration directory.  Allocate @a *provider in
00147  * @a pool.
00148  *
00149  * If a default username or password is available, @a *provider will
00150  * honor them as well, and return them when
00151  * svn_auth_first_credentials() is called.  (see @c
00152  * SVN_AUTH_PARAM_DEFAULT_USERNAME and @c
00153  * SVN_AUTH_PARAM_DEFAULT_PASSWORD).
00154  *
00155  * @deprecated Provided for backward compatibility with the 1.3 API.
00156  * Use svn_auth_get_simple_provider2() instead.
00157  */
00158 SVN_DEPRECATED
00159 void
00160 svn_client_get_simple_provider(svn_auth_provider_object_t **provider,
00161                                apr_pool_t *pool);
00162 
00163 
00164 #if (defined(WIN32) && !defined(__MINGW32__)) || defined(DOXYGEN) || defined(CTYPESGEN) || defined(SWIG)
00165 /**
00166  * Create and return @a *provider, an authentication provider of type @c
00167  * svn_auth_cred_simple_t that gets/sets information from the user's
00168  * ~/.subversion configuration directory.  Allocate @a *provider in
00169  * @a pool.
00170  *
00171  * This is like svn_client_get_simple_provider(), except that, when
00172  * running on Window 2000 or newer (or any other Windows version that
00173  * includes the CryptoAPI), the provider encrypts the password before
00174  * storing it to disk. On earlier versions of Windows, the provider
00175  * does nothing.
00176  *
00177  * @since New in 1.2.
00178  * @note This function is only available on Windows.
00179  *
00180  * @note An administrative password reset may invalidate the account's
00181  * secret key. This function will detect that situation and behave as
00182  * if the password were not cached at all.
00183  *
00184  * @deprecated Provided for backward compatibility with the 1.3 API.
00185  * Use svn_auth_get_windows_simple_provider() instead.
00186  */
00187 SVN_DEPRECATED
00188 void
00189 svn_client_get_windows_simple_provider(svn_auth_provider_object_t **provider,
00190                                        apr_pool_t *pool);
00191 #endif /* WIN32 && !__MINGW32__ || DOXYGEN || CTYPESGEN || SWIG */
00192 
00193 /** Create and return @a *provider, an authentication provider of type @c
00194  * svn_auth_cred_username_t that gets/sets information from a user's
00195  * ~/.subversion configuration directory.  Allocate @a *provider in
00196  * @a pool.
00197  *
00198  * If a default username is available, @a *provider will honor it,
00199  * and return it when svn_auth_first_credentials() is called.  (see
00200  * @c SVN_AUTH_PARAM_DEFAULT_USERNAME).
00201  *
00202  * @deprecated Provided for backward compatibility with the 1.3 API.
00203  * Use svn_auth_get_username_provider() instead.
00204  */
00205 SVN_DEPRECATED
00206 void
00207 svn_client_get_username_provider(svn_auth_provider_object_t **provider,
00208                                  apr_pool_t *pool);
00209 
00210 
00211 /** Create and return @a *provider, an authentication provider of type @c
00212  * svn_auth_cred_ssl_server_trust_t, allocated in @a pool.
00213  *
00214  * @a *provider retrieves its credentials from the configuration
00215  * mechanism.  The returned credential is used to override SSL
00216  * security on an error.
00217  *
00218  * @deprecated Provided for backward compatibility with the 1.3 API.
00219  * Use svn_auth_get_ssl_server_trust_file_provider() instead.
00220  */
00221 SVN_DEPRECATED
00222 void
00223 svn_client_get_ssl_server_trust_file_provider
00224   (svn_auth_provider_object_t **provider,
00225    apr_pool_t *pool);
00226 
00227 
00228 /** Create and return @a *provider, an authentication provider of type @c
00229  * svn_auth_cred_ssl_client_cert_t, allocated in @a pool.
00230  *
00231  * @a *provider retrieves its credentials from the configuration
00232  * mechanism.  The returned credential is used to load the appropriate
00233  * client certificate for authentication when requested by a server.
00234  *
00235  * @deprecated Provided for backward compatibility with the 1.3 API.
00236  * Use svn_auth_get_ssl_client_cert_file_provider() instead.
00237  */
00238 SVN_DEPRECATED
00239 void
00240 svn_client_get_ssl_client_cert_file_provider
00241   (svn_auth_provider_object_t **provider,
00242    apr_pool_t *pool);
00243 
00244 
00245 /** Create and return @a *provider, an authentication provider of type @c
00246  * svn_auth_cred_ssl_client_cert_pw_t, allocated in @a pool.
00247  *
00248  * @a *provider retrieves its credentials from the configuration
00249  * mechanism.  The returned credential is used when a loaded client
00250  * certificate is protected by a passphrase.
00251  *
00252  * @deprecated Provided for backward compatibility with the 1.3 API.
00253  * Use svn_auth_get_ssl_client_cert_pw_file_provider2() instead.
00254  */
00255 SVN_DEPRECATED
00256 void
00257 svn_client_get_ssl_client_cert_pw_file_provider
00258   (svn_auth_provider_object_t **provider,
00259    apr_pool_t *pool);
00260 
00261 
00262 /** Create and return @a *provider, an authentication provider of type @c
00263  * svn_auth_cred_ssl_server_trust_t, allocated in @a pool.
00264  *
00265  * @a *provider retrieves its credentials by using the @a prompt_func
00266  * and @a prompt_baton.  The returned credential is used to override
00267  * SSL security on an error.
00268  *
00269  * @deprecated Provided for backward compatibility with the 1.3 API.
00270  * Use svn_auth_get_ssl_server_trust_prompt_provider() instead.
00271  */
00272 SVN_DEPRECATED
00273 void
00274 svn_client_get_ssl_server_trust_prompt_provider
00275   (svn_auth_provider_object_t **provider,
00276    svn_auth_ssl_server_trust_prompt_func_t prompt_func,
00277    void *prompt_baton,
00278    apr_pool_t *pool);
00279 
00280 
00281 /** Create and return @a *provider, an authentication provider of type @c
00282  * svn_auth_cred_ssl_client_cert_t, allocated in @a pool.
00283  *
00284  * @a *provider retrieves its credentials by using the @a prompt_func
00285  * and @a prompt_baton.  The returned credential is used to load the
00286  * appropriate client certificate for authentication when requested by
00287  * a server.  The prompt will be retried @a retry_limit times.
00288  * For infinite retries, set @a retry_limit to value less than 0.
00289  *
00290  * @deprecated Provided for backward compatibility with the 1.3 API.
00291  * Use svn_auth_get_ssl_client_cert_prompt_provider() instead.
00292  */
00293 SVN_DEPRECATED
00294 void
00295 svn_client_get_ssl_client_cert_prompt_provider
00296   (svn_auth_provider_object_t **provider,
00297    svn_auth_ssl_client_cert_prompt_func_t prompt_func,
00298    void *prompt_baton,
00299    int retry_limit,
00300    apr_pool_t *pool);
00301 
00302 
00303 /** Create and return @a *provider, an authentication provider of type @c
00304  * svn_auth_cred_ssl_client_cert_pw_t, allocated in @a pool.
00305  *
00306  * @a *provider retrieves its credentials by using the @a prompt_func
00307  * and @a prompt_baton.  The returned credential is used when a loaded
00308  * client certificate is protected by a passphrase.  The prompt will
00309  * be retried @a retry_limit times. For infinite retries, set @a retry_limit
00310  * to value less than 0.
00311  *
00312  * @deprecated Provided for backward compatibility with the 1.3 API.
00313  * Use svn_auth_get_ssl_client_cert_pw_prompt_provider() instead.
00314  */
00315 SVN_DEPRECATED
00316 void
00317 svn_client_get_ssl_client_cert_pw_prompt_provider
00318   (svn_auth_provider_object_t **provider,
00319    svn_auth_ssl_client_cert_pw_prompt_func_t prompt_func,
00320    void *prompt_baton,
00321    int retry_limit,
00322    apr_pool_t *pool);
00323 
00324 /** @} */
00325 
00326 /**
00327  * Commit operations
00328  *
00329  * @defgroup clnt_commit Client commit subsystem
00330  *
00331  * @{
00332  */
00333 
00334 /** This is a structure which stores a filename and a hash of property
00335  * names and values.
00336  *
00337  * @deprecated Provided for backward compatibility with the 1.4 API.
00338  */
00339 typedef struct svn_client_proplist_item_t
00340 {
00341   /** The name of the node on which these properties are set. */
00342   svn_stringbuf_t *node_name;
00343 
00344   /** A hash of (const char *) property names, and (svn_string_t *) property
00345    * values. */
00346   apr_hash_t *prop_hash;
00347 
00348 } svn_client_proplist_item_t;
00349 
00350 /**
00351  * The callback invoked by svn_client_proplist3().  Each invocation
00352  * describes the property specified by @a item.  Use @a pool for all
00353  * temporary allocation.
00354  *
00355  * @since New in 1.5.
00356  */
00357 typedef svn_error_t *(*svn_proplist_receiver_t)
00358   (void *baton,
00359    const char *path,
00360    apr_hash_t *prop_hash,
00361    apr_pool_t *pool);
00362 
00363 /**
00364  * Return a duplicate of @a item, allocated in @a pool. No part of the new
00365  * structure will be shared with @a item.
00366  *
00367  * @since New in 1.3.
00368  *
00369  * @deprecated Provided for backward compatibility with the 1.4 API.
00370  */
00371 SVN_DEPRECATED
00372 svn_client_proplist_item_t *
00373 svn_client_proplist_item_dup(const svn_client_proplist_item_t *item,
00374                              apr_pool_t *pool);
00375 
00376 /** Information about commits passed back to client from this module.
00377  *
00378  * @deprecated Provided for backward compatibility with the 1.2 API.
00379  */
00380 typedef struct svn_client_commit_info_t
00381 {
00382   /** just-committed revision. */
00383   svn_revnum_t revision;
00384 
00385   /** server-side date of the commit. */
00386   const char *date;
00387 
00388   /** author of the commit. */
00389   const char *author;
00390 
00391 } svn_client_commit_info_t;
00392 
00393 
00394 /**
00395  * @name Commit state flags
00396  * @brief State flags for use with the @c svn_client_commit_item3_t structure
00397  * (see the note about the namespace for that structure, which also
00398  * applies to these flags).
00399  * @{
00400  */
00401 #define SVN_CLIENT_COMMIT_ITEM_ADD         0x01
00402 #define SVN_CLIENT_COMMIT_ITEM_DELETE      0x02
00403 #define SVN_CLIENT_COMMIT_ITEM_TEXT_MODS   0x04
00404 #define SVN_CLIENT_COMMIT_ITEM_PROP_MODS   0x08
00405 #define SVN_CLIENT_COMMIT_ITEM_IS_COPY     0x10
00406 /** @since New in 1.2. */
00407 #define SVN_CLIENT_COMMIT_ITEM_LOCK_TOKEN  0x20
00408 /** @} */
00409 
00410 /** The commit candidate structure.  In order to avoid backwards
00411  * compatibility problems clients should use
00412  * svn_client_commit_item3_create() to allocate and initialize this
00413  * structure instead of doing so themselves.
00414  *
00415  * @since New in 1.5.
00416  */
00417 typedef struct svn_client_commit_item3_t
00418 {
00419   /** absolute working-copy path of item */
00420   const char *path;
00421 
00422   /** node kind (dir, file) */
00423   svn_node_kind_t kind;
00424 
00425   /** commit URL for this item */
00426   const char *url;
00427 
00428   /** revision of textbase */
00429   svn_revnum_t revision;
00430 
00431   /** copyfrom-url or NULL if not a copied item */
00432   const char *copyfrom_url;
00433 
00434   /** copyfrom-rev, valid when copyfrom_url != NULL */
00435   svn_revnum_t copyfrom_rev;
00436 
00437   /** state flags */
00438   apr_byte_t state_flags;
00439 
00440   /** An array of @c svn_prop_t *'s, which are incoming changes from
00441    * the repository to WC properties.  These changes are applied
00442    * post-commit.
00443    *
00444    * When adding to this array, allocate the @c svn_prop_t and its
00445    * contents in @c incoming_prop_changes->pool, so that it has the
00446    * same lifetime as this data structure.
00447    *
00448    * See http://subversion.tigris.org/issues/show_bug.cgi?id=806 for a
00449    * description of what would happen if the post-commit process
00450    * didn't group these changes together with all other changes to the
00451    * item.
00452    */
00453   apr_array_header_t *incoming_prop_changes;
00454 
00455   /** An array of @c svn_prop_t *'s, which are outgoing changes to
00456    * make to properties in the repository.  These extra property
00457    * changes are declared pre-commit, and applied to the repository as
00458    * part of a commit.
00459    *
00460    * When adding to this array, allocate the @c svn_prop_t and its
00461    * contents in @c outgoing_prop_changes->pool, so that it has the
00462    * same lifetime as this data structure.
00463    */
00464   apr_array_header_t *outgoing_prop_changes;
00465 } svn_client_commit_item3_t;
00466 
00467 /** The commit candidate structure.
00468  *
00469  * @deprecated Provided for backward compatibility with the 1.3 API.
00470  */
00471 typedef struct svn_client_commit_item2_t
00472 {
00473   /** absolute working-copy path of item */
00474   const char *path;
00475 
00476   /** node kind (dir, file) */
00477   svn_node_kind_t kind;
00478 
00479   /** commit URL for this item */
00480   const char *url;
00481 
00482   /** revision of textbase */
00483   svn_revnum_t revision;
00484 
00485   /** copyfrom-url or NULL if not a copied item */
00486   const char *copyfrom_url;
00487 
00488   /** copyfrom-rev, valid when copyfrom_url != NULL */
00489   svn_revnum_t copyfrom_rev;
00490 
00491   /** state flags */
00492   apr_byte_t state_flags;
00493 
00494   /** Analogous to the @c svn_client_commit_item3_t.incoming_prop_changes
00495    * field.
00496    */
00497   apr_array_header_t *wcprop_changes;
00498 } svn_client_commit_item2_t;
00499 
00500 /** The commit candidate structure.
00501  *
00502  * @deprecated Provided for backward compatibility with the 1.2 API.
00503  */
00504 typedef struct svn_client_commit_item_t
00505 {
00506   /** absolute working-copy path of item */
00507   const char *path;
00508 
00509   /** node kind (dir, file) */
00510   svn_node_kind_t kind;
00511 
00512   /** commit URL for this item */
00513   const char *url;
00514 
00515   /** revision (copyfrom-rev if _IS_COPY) */
00516   svn_revnum_t revision;
00517 
00518   /** copyfrom-url */
00519   const char *copyfrom_url;
00520 
00521   /** state flags */
00522   apr_byte_t state_flags;
00523 
00524   /** Analogous to the @c svn_client_commit_item3_t.incoming_prop_changes
00525    * field.
00526    */
00527   apr_array_header_t *wcprop_changes;
00528 
00529 } svn_client_commit_item_t;
00530 
00531 /** Return a new commit item object, allocated in @a pool.
00532  *
00533  * In order to avoid backwards compatibility problems, this function
00534  * is used to initialize and allocate the @c svn_client_commit_item3_t
00535  * structure rather than doing so explicitly, as the size of this
00536  * structure may change in the future.
00537  *
00538  * @since New in 1.6.
00539  */
00540 svn_client_commit_item3_t *
00541 svn_client_commit_item3_create(apr_pool_t *pool);
00542 
00543 /** Like svn_client_commit_item_create2() but with a stupid "const"
00544  * qualifier on the returned structure, and it returns an error that
00545  * will never happen.
00546  *
00547  * @deprecated Provided for backward compatibility with the 1.5 API.
00548  */
00549 svn_error_t *
00550 svn_client_commit_item_create(const svn_client_commit_item3_t **item,
00551                               apr_pool_t *pool);
00552 
00553 /**
00554  * Return a duplicate of @a item, allocated in @a pool. No part of the new
00555  * structure will be shared with @a item.
00556  *
00557  * @since New in 1.5.
00558  */
00559 svn_client_commit_item3_t *
00560 svn_client_commit_item3_dup(const svn_client_commit_item3_t *item,
00561                             apr_pool_t *pool);
00562 
00563 /**
00564  * Return a duplicate of @a item, allocated in @a pool. No part of the new
00565  * structure will be shared with @a item.
00566  *
00567  * @deprecated Provided for backward compatibility with the 1.3 API.
00568  */
00569 SVN_DEPRECATED
00570 svn_client_commit_item2_t *
00571 svn_client_commit_item2_dup(const svn_client_commit_item2_t *item,
00572                             apr_pool_t *pool);
00573 
00574 /** Callback type used by commit-y operations to get a commit log message
00575  * from the caller.
00576  *
00577  * Set @a *log_msg to the log message for the commit, allocated in @a
00578  * pool, or @c NULL if wish to abort the commit process.  Set @a *tmp_file
00579  * to the path of any temporary file which might be holding that log
00580  * message, or @c NULL if no such file exists (though, if @a *log_msg is
00581  * @c NULL, this value is undefined).  The log message MUST be a UTF8
00582  * string with LF line separators.
00583  *
00584  * @a commit_items is a read-only array of @c svn_client_commit_item3_t
00585  * structures, which may be fully or only partially filled-in,
00586  * depending on the type of commit operation.
00587  *
00588  * @a baton is provided along with the callback for use by the handler.
00589  *
00590  * All allocations should be performed in @a pool.
00591  *
00592  * @since New in 1.5.
00593  */
00594 typedef svn_error_t *(*svn_client_get_commit_log3_t)
00595   (const char **log_msg,
00596    const char **tmp_file,
00597    const apr_array_header_t *commit_items,
00598    void *baton,
00599    apr_pool_t *pool);
00600 
00601 /** Callback type used by commit-y operations to get a commit log message
00602  * from the caller.
00603  *
00604  * Set @a *log_msg to the log message for the commit, allocated in @a
00605  * pool, or @c NULL if wish to abort the commit process.  Set @a *tmp_file
00606  * to the path of any temporary file which might be holding that log
00607  * message, or @c NULL if no such file exists (though, if @a *log_msg is
00608  * @c NULL, this value is undefined).  The log message MUST be a UTF8
00609  * string with LF line separators.
00610  *
00611  * @a commit_items is a read-only array of @c svn_client_commit_item2_t
00612  * structures, which may be fully or only partially filled-in,
00613  * depending on the type of commit operation.
00614  *
00615  * @a baton is provided along with the callback for use by the handler.
00616  *
00617  * All allocations should be performed in @a pool.
00618  *
00619  * @deprecated Provided for backward compatibility with the 1.3 API.
00620  */
00621 typedef svn_error_t *(*svn_client_get_commit_log2_t)
00622   (const char **log_msg,
00623    const char **tmp_file,
00624    const apr_array_header_t *commit_items,
00625    void *baton,
00626    apr_pool_t *pool);
00627 
00628 /** Callback type used by commit-y operations to get a commit log message
00629  * from the caller.
00630  *
00631  * Set @a *log_msg to the log message for the commit, allocated in @a
00632  * pool, or @c NULL if wish to abort the commit process.  Set @a *tmp_file
00633  * to the path of any temporary file which might be holding that log
00634  * message, or @c NULL if no such file exists (though, if @a *log_msg is
00635  * @c NULL, this value is undefined).  The log message MUST be a UTF8
00636  * string with LF line separators.
00637  *
00638  * @a commit_items is a read-only array of @c svn_client_commit_item_t
00639  * structures, which may be fully or only partially filled-in,
00640  * depending on the type of commit operation.
00641  *
00642  * @a baton is provided along with the callback for use by the handler.
00643  *
00644  * All allocations should be performed in @a pool.
00645  *
00646  * @deprecated Provided for backward compatibility with the 1.2 API.
00647  */
00648 typedef svn_error_t *(*svn_client_get_commit_log_t)
00649   (const char **log_msg,
00650    const char **tmp_file,
00651    apr_array_header_t *commit_items,
00652    void *baton,
00653    apr_pool_t *pool);
00654 
00655 /** @} */
00656 
00657 /**
00658  * Client blame
00659  *
00660  * @defgroup clnt_blame Client blame functionality
00661  *
00662  * @{
00663  */
00664 
00665 /** Callback type used by svn_client_blame4() to notify the caller
00666  * that line @a line_no of the blamed file was last changed in
00667  * @a revision by @a author on @a date, and that the contents were
00668  * @a line.
00669  *
00670  * If svn_client_blame4() was called with @a include_merged_revisions set to
00671  * TRUE, @a merged_revision, @a merged_author, @a merged_date, and
00672  * @a merged_path will be set, otherwise they will be NULL.  @a merged_path
00673  * will be set to the absolute repository path.
00674  *
00675  * All allocations should be performed in @a pool.
00676  *
00677  * @note If there is no blame information for this line, @a revision will be
00678  * invalid and @a author and @a date will be NULL.
00679  *
00680  *
00681  * @since New in 1.5.
00682  */
00683 typedef svn_error_t *(*svn_client_blame_receiver2_t)
00684   (void *baton,
00685    apr_int64_t line_no,
00686    svn_revnum_t revision,
00687    const char *author,
00688    const char *date,
00689    svn_revnum_t merged_revision,
00690    const char *merged_author,
00691    const char *merged_date,
00692    const char *merged_path,
00693    const char *line,
00694    apr_pool_t *pool);
00695 
00696 /**
00697  * Similar to @c svn_client_blame_receiver2_t, but without @a merged_revision,
00698  * @a merged_author, @a merged_date, or @a merged_path members.
00699  *
00700  * @note New in 1.4 is that the line is defined to contain only the line
00701  * content (and no [partial] EOLs; which was undefined in older versions).
00702  * Using this callback with svn_client_blame() or svn_client_blame2()
00703  * will still give you the old behaviour.
00704  *
00705  * @deprecated Provided for backward compatibility with the 1.4 API.
00706  */
00707 typedef svn_error_t *(*svn_client_blame_receiver_t)
00708   (void *baton,
00709    apr_int64_t line_no,
00710    svn_revnum_t revision,
00711    const char *author,
00712    const char *date,
00713    const char *line,
00714    apr_pool_t *pool);
00715 
00716 
00717 /** @} */
00718 
00719 /**
00720  * Client diff
00721  *
00722  * @defgroup clnt_diff Client diff functionality
00723  *
00724  * @{
00725  */
00726 /** The difference type in an svn_diff_summarize_t structure.
00727  *
00728  * @since New in 1.4.
00729  */
00730 typedef enum svn_client_diff_summarize_kind_t
00731 {
00732   /** An item with no text modifications */
00733   svn_client_diff_summarize_kind_normal,
00734 
00735   /** An added item */
00736   svn_client_diff_summarize_kind_added,
00737 
00738   /** An item with text modifications */
00739   svn_client_diff_summarize_kind_modified,
00740 
00741   /** A deleted item */
00742   svn_client_diff_summarize_kind_deleted
00743 } svn_client_diff_summarize_kind_t;
00744 
00745 
00746 /** A struct that describes the diff of an item. Passed to
00747  * @c svn_diff_summarize_func_t.
00748  *
00749  * @note Fields may be added to the end of this structure in future
00750  * versions.  Therefore, users shouldn't allocate structures of this
00751  * type, to preserve binary compatibility.
00752  *
00753  * @since New in 1.4.
00754  */
00755 typedef struct svn_client_diff_summarize_t
00756 {
00757   /** Path relative to the target.  If the target is a file, path is
00758    * the empty string. */
00759   const char *path;
00760 
00761   /** Change kind */
00762   svn_client_diff_summarize_kind_t summarize_kind;
00763 
00764   /** Properties changed? */
00765   svn_boolean_t prop_changed;
00766 
00767   /** File or dir */
00768   svn_node_kind_t node_kind;
00769 } svn_client_diff_summarize_t;
00770 
00771 /**
00772  * Return a duplicate of @a diff, allocated in @a pool. No part of the new
00773  * structure will be shared with @a diff.
00774  *
00775  * @since New in 1.4.
00776  */
00777 svn_client_diff_summarize_t *
00778 svn_client_diff_summarize_dup(const svn_client_diff_summarize_t *diff,
00779                               apr_pool_t *pool);
00780 
00781 
00782 /** A callback used in svn_client_diff_summarize2() and
00783  * svn_client_diff_summarize_peg2() for reporting a @a diff summary.
00784  *
00785  * All allocations should be performed in @a pool.
00786  *
00787  * @a baton is a closure object; it should be provided by the implementation,
00788  * and passed by the caller.
00789  *
00790  * @since New in 1.4.
00791  */
00792 typedef svn_error_t *(*svn_client_diff_summarize_func_t)
00793   (const svn_client_diff_summarize_t *diff,
00794    void *baton,
00795    apr_pool_t *pool);
00796 
00797 
00798 
00799 /** @} */
00800 
00801 
00802 /**
00803  * Client context
00804  *
00805  * @defgroup clnt_ctx Client context management
00806  *
00807  * @{
00808  */
00809 
00810 /** A client context structure, which holds client specific callbacks,
00811  * batons, serves as a cache for configuration options, and other various
00812  * and sundry things.  In order to avoid backwards compatibility problems
00813  * clients should use svn_client_create_context() to allocate and
00814  * initialize this structure instead of doing so themselves.
00815  */
00816 typedef struct svn_client_ctx_t
00817 {
00818   /** main authentication baton. */
00819   svn_auth_baton_t *auth_baton;
00820 
00821   /** notification callback function.
00822    * This will be called by notify_func2() by default.
00823    * @deprecated Provided for backward compatibility with the 1.1 API.
00824    * Use @c notify_func2 instead. */
00825   svn_wc_notify_func_t notify_func;
00826 
00827   /** notification callback baton for notify_func()
00828    * @deprecated Provided for backward compatibility with the 1.1 API.
00829    * Use @c notify_baton2 instead */
00830   void *notify_baton;
00831 
00832   /** Log message callback function.  NULL means that Subversion
00833     * should try not attempt to fetch a log message.
00834     * @deprecated Provided for backward compatibility with the 1.2 API.
00835     * Use @c log_msg_func2 instead. */
00836   svn_client_get_commit_log_t log_msg_func;
00837 
00838   /** log message callback baton
00839     * @deprecated Provided for backward compatibility with the 1.2 API.
00840     * Use @c log_msg_baton2 instead. */
00841   void *log_msg_baton;
00842 
00843   /** a hash mapping of <tt>const char *</tt> configuration file names to
00844    * @c svn_config_t *'s. For example, the '~/.subversion/config' file's
00845    * contents should have the key "config".  May be left unset (or set to
00846    * NULL) to use the built-in default settings and not use any configuration.
00847    */
00848   apr_hash_t *config;
00849 
00850   /** a callback to be used to see if the client wishes to cancel the running
00851    * operation. */
00852   svn_cancel_func_t cancel_func;
00853 
00854   /** a baton to pass to the cancellation callback. */
00855   void *cancel_baton;
00856 
00857   /** notification function, defaulting to a function that forwards
00858    * to notify_func().
00859    * @since New in 1.2. */
00860   svn_wc_notify_func2_t notify_func2;
00861 
00862   /** notification baton for notify_func2().
00863    * @since New in 1.2. */
00864   void *notify_baton2;
00865 
00866   /** Log message callback function. NULL means that Subversion
00867    *   should try log_msg_func.
00868    * @since New in 1.3. */
00869   svn_client_get_commit_log2_t log_msg_func2;
00870 
00871   /** callback baton for log_msg_func2
00872    * @since New in 1.3. */
00873   void *log_msg_baton2;
00874 
00875   /** Notification callback for network progress information.
00876    * May be NULL if not used.
00877    * @since New in 1.3. */
00878   svn_ra_progress_notify_func_t progress_func;
00879 
00880   /** Callback baton for progress_func.
00881    * @since New in 1.3. */
00882   void *progress_baton;
00883 
00884   /** Log message callback function. NULL means that Subversion
00885    *   should try @c log_msg_func2, then @c log_msg_func.
00886    * @since New in 1.5. */
00887   svn_client_get_commit_log3_t log_msg_func3;
00888 
00889   /** The callback baton for @c log_msg_func3.
00890    * @since New in 1.5. */
00891   void *log_msg_baton3;
00892 
00893   /** MIME types map.
00894    * @since New in 1.5. */
00895   apr_hash_t *mimetypes_map;
00896 
00897   /** Conflict resolution callback and baton, if available.
00898    * @since New in 1.5. */
00899   svn_wc_conflict_resolver_func_t conflict_func;
00900   void *conflict_baton;
00901 
00902   /** Custom client name string, or @c null.
00903    * @since New in 1.5. */
00904   const char *client_name;
00905 
00906 } svn_client_ctx_t;
00907 
00908 /** Initialize a client context.
00909  * Set @a *ctx to a client context object, allocated in @a pool, that
00910  * represents a particular instance of an svn client.
00911  *
00912  * In order to avoid backwards compatibility problems, clients must
00913  * use this function to initialize and allocate the
00914  * @c svn_client_ctx_t structure rather than doing so themselves, as
00915  * the size of this structure may change in the future.
00916  *
00917  * The current implementation never returns error, but callers should
00918  * still check for error, for compatibility with future versions.
00919  */
00920 svn_error_t *
00921 svn_client_create_context(svn_client_ctx_t **ctx,
00922                           apr_pool_t *pool);
00923 
00924 /** @} end group: Client context management */
00925 
00926 /**
00927  * @name Authentication information file names
00928  *
00929  * Names of files that contain authentication information.
00930  *
00931  * These filenames are decided by libsvn_client, since this library
00932  * implements all the auth-protocols;  libsvn_wc does nothing but
00933  * blindly store and retrieve these files from protected areas.
00934  *
00935  * @defgroup clnt_auth_filenames Client authentication file names
00936  * @{
00937  */
00938 #define SVN_CLIENT_AUTH_USERNAME            "username"
00939 #define SVN_CLIENT_AUTH_PASSWORD            "password"
00940 /** @} group end: Authentication information file names */
00941 
00942 /** Client argument processing
00943  *
00944  * @defgroup clnt_cmdline Client command-line processing
00945  *
00946  * @{
00947  */
00948 
00949 /**
00950  * Pull remaining target arguments from @a os into @a *targets_p,
00951  * converting them to UTF-8, followed by targets from @a known_targets
00952  * (which might come from, for example, the "--targets" command line option).
00953  *
00954  * On each URL target, do some IRI-to-URI encoding and some auto-escaping.
00955  * On each local path, canonicalize case and path separators.
00956  *
00957  * Allocate @a *targets_p and its elements in @a pool.
00958  *
00959  * @a ctx is required for possible repository authentication.
00960  *
00961  * If a path has the same name as a Subversion working copy
00962  * administrative directory, return SVN_ERR_RESERVED_FILENAME_SPECIFIED;
00963  * if multiple reserved paths are encountered, return a chain of
00964  * errors, all of which are SVN_ERR_RESERVED_FILENAME_SPECIFIED.  Do
00965  * not return this type of error in a chain with any other type of
00966  * error, and if this is the only type of error encountered, complete
00967  * the operation before returning the error(s).
00968  *
00969  * @since New in 1.6
00970  */
00971 svn_error_t *
00972 svn_client_args_to_target_array(apr_array_header_t **targets_p,
00973                                 apr_getopt_t *os,
00974                                 const apr_array_header_t *known_targets,
00975                                 svn_client_ctx_t *ctx,
00976                                 apr_pool_t *pool);
00977 
00978 /** @} group end: Client command-line processing */
00979 
00980 /** @} */
00981 
00982 /**
00983  * Client working copy management functions
00984  *
00985  * @defgroup clnt_wc Client working copy management
00986  *
00987  * @{
00988  */
00989 
00990 /**
00991  * @defgroup clnt_wc_checkout Checkout
00992  *
00993  * @{
00994  */
00995 
00996 
00997 /**
00998  * Checkout a working copy of @a URL at @a revision, looked up at @a
00999  * peg_revision, using @a path as the root directory of the newly
01000  * checked out working copy, and authenticating with the
01001  * authentication baton cached in @a ctx.  If @a result_rev is not @c
01002  * NULL, set @a *result_rev to the value of the revision actually
01003  * checked out from the repository.
01004  *
01005  * If @a peg_revision->kind is @c svn_opt_revision_unspecified, then it
01006  * defaults to @c svn_opt_revision_head.
01007  *
01008  * @a revision must be of kind @c svn_opt_revision_number,
01009  * @c svn_opt_revision_head, or @c svn_opt_revision_date.  If
01010  * @a revision does not meet these requirements, return the error
01011  * @c SVN_ERR_CLIENT_BAD_REVISION.
01012  *
01013  * If @a depth is @c svn_depth_infinity, check out fully recursively.
01014  * Else if it is @c svn_depth_immediates, check out @a URL and its
01015  * immediate entries (subdirectories will be present, but will be at
01016  * depth @c svn_depth_empty themselves); else @c svn_depth_files,
01017  * check out @a URL and its file entries, but no subdirectories; else
01018  * if @c svn_depth_empty, check out @a URL as an empty directory at
01019  * that depth, with no entries present.
01020  *
01021  * If @a depth is @c svn_depth_unknown, then behave as if for
01022  * @c svn_depth_infinity, except in the case of resuming a previous
01023  * checkout of @a path (i.e., updating), in which case use the depth
01024  * of the existing working copy.
01025  *
01026  * If @a ignore_externals is set, don't process externals definitions
01027  * as part of this operation.
01028  *
01029  * If @a ctx->notify_func2 is non-NULL, invoke @a ctx->notify_func2 with
01030  * @a ctx->notify_baton2 as the checkout progresses.
01031  *
01032  * If @a allow_unver_obstructions is TRUE then the checkout tolerates
01033  * existing unversioned items that obstruct added paths from @a URL.  Only
01034  * obstructions of the same type (file or dir) as the added item are
01035  * tolerated.  The text of obstructing files is left as-is, effectively
01036  * treating it as a user modification after the checkout.  Working
01037  * properties of obstructing items are set equal to the base properties.
01038  * If @a allow_unver_obstructions is FALSE then the checkout will abort
01039  * if there are any unversioned obstructing items.
01040  *
01041  * If @a URL refers to a file rather than a directory, return the
01042  * error @c SVN_ERR_UNSUPPORTED_FEATURE.  If @a URL does not exist,
01043  * return the error @c SVN_ERR_RA_ILLEGAL_URL.
01044  *
01045  * Use @a pool for any temporary allocation.
01046  *
01047  * @since New in 1.5.
01048  */
01049 svn_error_t *
01050 svn_client_checkout3(svn_revnum_t *result_rev,
01051                      const char *URL,
01052                      const char *path,
01053                      const svn_opt_revision_t *peg_revision,
01054                      const svn_opt_revision_t *revision,
01055                      svn_depth_t depth,
01056                      svn_boolean_t ignore_externals,
01057                      svn_boolean_t allow_unver_obstructions,
01058                      svn_client_ctx_t *ctx,
01059                      apr_pool_t *pool);
01060 
01061 
01062 /**
01063  * Similar to svn_client_checkout3() but with @a allow_unver_obstructions
01064  * always set to FALSE, and @a depth set according to @a recurse: if
01065  * @a recurse is TRUE, @a depth is @c svn_depth_infinity, if @a recurse
01066  * is FALSE, @a depth is @c svn_depth_files.
01067  *
01068  * @deprecated Provided for backward compatibility with the 1.4 API.
01069  */
01070 SVN_DEPRECATED
01071 svn_error_t *
01072 svn_client_checkout2(svn_revnum_t *result_rev,
01073                      const char *URL,
01074                      const char *path,
01075                      const svn_opt_revision_t *peg_revision,
01076                      const svn_opt_revision_t *revision,
01077                      svn_boolean_t recurse,
01078                      svn_boolean_t ignore_externals,
01079                      svn_client_ctx_t *ctx,
01080                      apr_pool_t *pool);
01081 
01082 
01083 /**
01084  * Similar to svn_client_checkout2(), but with @a peg_revision
01085  * always set to @c svn_opt_revision_unspecified and
01086  * @a ignore_externals always set to FALSE.
01087  *
01088  * @deprecated Provided for backward compatibility with the 1.1 API.
01089  */
01090 SVN_DEPRECATED
01091 svn_error_t *
01092 svn_client_checkout(svn_revnum_t *result_rev,
01093                     const char *URL,
01094                     const char *path,
01095                     const svn_opt_revision_t *revision,
01096                     svn_boolean_t recurse,
01097                     svn_client_ctx_t *ctx,
01098                     apr_pool_t *pool);
01099 /** @} */
01100 
01101 /**
01102  * @defgroup Update Bring a working copy up-to-date with a repository
01103  *
01104  * @{
01105  *
01106  */
01107 
01108 /**
01109  * Update working trees @a paths to @a revision, authenticating with the
01110  * authentication baton cached in @a ctx.  @a paths is an array of const
01111  * char * paths to be updated.  Unversioned paths that are direct children
01112  * of a versioned path will cause an update that attempts to add that path,
01113  * other unversioned paths are skipped.  If @a result_revs is not
01114  * @c NULL an array of svn_revnum_t will be returned with each element set
01115  * to the revision to which @a revision was resolved.
01116  *
01117  * @a revision must be of kind @c svn_opt_revision_number,
01118  * @c svn_opt_revision_head, or @c svn_opt_revision_date.  If @a
01119  * revision does not meet these requirements, return the error
01120  * @c SVN_ERR_CLIENT_BAD_REVISION.
01121  *
01122  * The paths in @a paths can be from multiple working copies from multiple
01123  * repositories, but even if they all come from the same repository there
01124  * is no guarantee that revision represented by @c svn_opt_revision_head
01125  * will remain the same as each path is updated.
01126  *
01127  * If @a ignore_externals is set, don't process externals definitions
01128  * as part of this operation.
01129  *
01130  * If @a depth is @c svn_depth_infinity, update fully recursively.
01131  * Else if it is @c svn_depth_immediates or @c svn_depth_files, update
01132  * each target and its file entries, but not its subdirectories.  Else
01133  * if @c svn_depth_empty, update exactly each target, nonrecursively
01134  * (essentially, update the target's properties).
01135  *
01136  * If @a depth is @c svn_depth_unknown, take the working depth from
01137  * @a paths and then behave as described above.
01138  *
01139  * If @a depth_is_sticky is set and @a depth is not @c
01140  * svn_depth_unknown, then in addition to updating PATHS, also set
01141  * their sticky ambient depth value to @a depth.
01142  *
01143  * If @a allow_unver_obstructions is TRUE then the update tolerates
01144  * existing unversioned items that obstruct added paths.  Only
01145  * obstructions of the same type (file or dir) as the added item are
01146  * tolerated.  The text of obstructing files is left as-is, effectively
01147  * treating it as a user modification after the update.  Working
01148  * properties of obstructing items are set equal to the base properties.
01149  * If @a allow_unver_obstructions is FALSE then the update will abort
01150  * if there are any unversioned obstructing items.
01151  *
01152  * If @a ctx->notify_func2 is non-NULL, invoke @a ctx->notify_func2 with
01153  * @a ctx->notify_baton2 for each item handled by the update, and also for
01154  * files restored from text-base.  If @a ctx->cancel_func is non-NULL, invoke
01155  * it passing @a ctx->cancel_baton at various places during the update.
01156  *
01157  * Use @a pool for any temporary allocation.
01158  *
01159  * @since New in 1.5.
01160  */
01161 svn_error_t *
01162 svn_client_update3(apr_array_header_t **result_revs,
01163                    const apr_array_header_t *paths,
01164                    const svn_opt_revision_t *revision,
01165                    svn_depth_t depth,
01166                    svn_boolean_t depth_is_sticky,
01167                    svn_boolean_t ignore_externals,
01168                    svn_boolean_t allow_unver_obstructions,
01169                    svn_client_ctx_t *ctx,
01170                    apr_pool_t *pool);
01171 
01172 /**
01173  * Similar to svn_client_update3() but with @a allow_unver_obstructions
01174  * always set to FALSE, @a depth_is_sticky to FALSE, and @a depth set
01175  * according to @a recurse: if @a recurse is TRUE, set @a depth to @c
01176  * svn_depth_infinity, if @a recurse is FALSE, set @a depth to @c
01177  * svn_depth_files.
01178  *
01179  * @deprecated Provided for backward compatibility with the 1.4 API.
01180  */
01181 SVN_DEPRECATED
01182 svn_error_t *
01183 svn_client_update2(apr_array_header_t **result_revs,
01184                    const apr_array_header_t *paths,
01185                    const svn_opt_revision_t *revision,
01186                    svn_boolean_t recurse,
01187                    svn_boolean_t ignore_externals,
01188                    svn_client_ctx_t *ctx,
01189                    apr_pool_t *pool);
01190 
01191 /**
01192  * Similar to svn_client_update2() except that it accepts only a single
01193  * target in @a path, returns a single revision if @a result_rev is
01194  * not NULL, and @a ignore_externals is always set to FALSE.
01195  *
01196  * @deprecated Provided for backward compatibility with the 1.1 API.
01197  */
01198 SVN_DEPRECATED
01199 svn_error_t *
01200 svn_client_update(svn_revnum_t *result_rev,
01201                   const char *path,
01202                   const svn_opt_revision_t *revision,
01203                   svn_boolean_t recurse,
01204                   svn_client_ctx_t *ctx,
01205                   apr_pool_t *pool);
01206 /** @} */
01207 
01208 /**
01209  * @defgroup Switch Switch a working copy to another location.
01210  *
01211  * @{
01212  */
01213 
01214 /** Switch working tree @a path to @a url\@peg_revision at @a revision,
01215  * authenticating with the authentication baton cached in @a ctx.  If
01216  * @a result_rev is not @c NULL, set @a *result_rev to the value of
01217  * the revision to which the working copy was actually switched.
01218  *
01219  * Summary of purpose: this is normally used to switch a working
01220  * directory over to another line of development, such as a branch or
01221  * a tag.  Switching an existing working directory is more efficient
01222  * than checking out @a url from scratch.
01223  *
01224  * @a revision must be of kind @c svn_opt_revision_number,
01225  * @c svn_opt_revision_head, or @c svn_opt_revision_date; otherwise,
01226  * return @c SVN_ERR_CLIENT_BAD_REVISION.
01227  *
01228  * If @a depth is @c svn_depth_infinity, switch fully recursively.
01229  * Else if it is @c svn_depth_immediates, switch @a path and its file
01230  * children (if any), and switch subdirectories but do not update
01231  * them.  Else if @c svn_depth_files, switch just file children,
01232  * ignoring subdirectories completely.  Else if @c svn_depth_empty,
01233  * switch just @a path and touch nothing underneath it.
01234  *
01235  * If @a depth_is_sticky is set and @a depth is not @c
01236  * svn_depth_unknown, then in addition to switching PATH, also set
01237  * its sticky ambient depth value to @a depth.
01238  *
01239  * If @a ignore_externals is set, don't process externals definitions
01240  * as part of this operation.
01241  *
01242  * If @a allow_unver_obstructions is TRUE then the switch tolerates
01243  * existing unversioned items that obstruct added paths.  Only
01244  * obstructions of the same type (file or dir) as the added item are
01245  * tolerated.  The text of obstructing files is left as-is, effectively
01246  * treating it as a user modification after the switch.  Working
01247  * properties of obstructing items are set equal to the base properties.
01248  * If @a allow_unver_obstructions is FALSE then the switch will abort
01249  * if there are any unversioned obstructing items.
01250  *
01251  * If @a ctx->notify_func2 is non-NULL, invoke it with @a ctx->notify_baton2
01252  * on paths affected by the switch.  Also invoke it for files may be restored
01253  * from the text-base because they were removed from the working copy.
01254  *
01255  * Use @a pool for any temporary allocation.
01256  *
01257  * @since New in 1.5.
01258  */
01259 svn_error_t *
01260 svn_client_switch2(svn_revnum_t *result_rev,
01261                    const char *path,
01262                    const char *url,
01263                    const svn_opt_revision_t *peg_revision,
01264                    const svn_opt_revision_t *revision,
01265                    svn_depth_t depth,
01266                    svn_boolean_t depth_is_sticky,
01267                    svn_boolean_t ignore_externals,
01268                    svn_boolean_t allow_unver_obstructions,
01269                    svn_client_ctx_t *ctx,
01270                    apr_pool_t *pool);
01271 
01272 
01273 /**
01274  * Similar to svn_client_switch2() but with @a allow_unver_obstructions,
01275  * @a ignore_externals, and @a depth_is_sticky always set to FALSE,
01276  * and @a depth set according to @a recurse: if @a recurse is TRUE,
01277  * set @a depth to @c svn_depth_infinity, if @a recurse is FALSE, set
01278  * @a depth to @c svn_depth_files.
01279  *
01280  * @deprecated Provided for backward compatibility with the 1.4 API.
01281  */
01282 SVN_DEPRECATED
01283 svn_error_t *
01284 svn_client_switch(svn_revnum_t *result_rev,
01285                   const char *path,
01286                   const char *url,
01287                   const svn_opt_revision_t *revision,
01288                   svn_boolean_t recurse,
01289                   svn_client_ctx_t *ctx,
01290                   apr_pool_t *pool);
01291 
01292 /** @} */
01293 
01294 /**
01295  * @defgroup Add Begin versioning files/directories in a working copy.
01296  *
01297  * @{
01298  */
01299 
01300 /**
01301  * Schedule a working copy @a path for addition to the repository.
01302  *
01303  * If @a depth is @c svn_depth_empty, add just @a path and nothing
01304  * below it.  If @c svn_depth_files, add @a path and any file
01305  * children of @a path.  If @c svn_depth_immediates, add @a path, any
01306  * file children, and any immediate subdirectories (but nothing
01307  * underneath those subdirectories).  If @c svn_depth_infinity, add
01308  * @a path and everything under it fully recursively.
01309  *
01310  * @a path's parent must be under revision control already (unless
01311  * @a add_parents is TRUE), but @a path is not.  If @a recursive is
01312  * set, then assuming @a path is a directory, all of its contents will
01313  * be scheduled for addition as well.
01314  *
01315  * If @a force is not set and @a path is already under version
01316  * control, return the error @c SVN_ERR_ENTRY_EXISTS.  If @a force is
01317  * set, do not error on already-versioned items.  When used on a
01318  * directory in conjunction with the @a recursive flag, this has the
01319  * effect of scheduling for addition unversioned files and directories
01320  * scattered deep within a versioned tree.
01321  *
01322  * If @a ctx->notify_func2 is non-NULL, then for each added item, call
01323  * @a ctx->notify_func2 with @a ctx->notify_baton2 and the path of the
01324  * added item.
01325  *
01326  * If @a no_ignore is FALSE, don't add files or directories that match
01327  * ignore patterns.
01328  *
01329  * If @a add_parents is TRUE, recurse up @a path's directory and look for
01330  * a versioned directory.  If found, add all intermediate paths between it
01331  * and @a path.  If not found, return @c SVN_ERR_CLIENT_NO_VERSIONED_PARENTS.
01332  *
01333  * @par Important:
01334  * This is a *scheduling* operation.  No changes will
01335  * happen to the repository until a commit occurs.  This scheduling
01336  * can be removed with svn_client_revert2().
01337  *
01338  * @since New in 1.5.
01339  */
01340 svn_error_t *
01341 svn_client_add4(const char *path,
01342                 svn_depth_t depth,
01343                 svn_boolean_t force,
01344                 svn_boolean_t no_ignore,
01345                 svn_boolean_t add_parents,
01346                 svn_client_ctx_t *ctx,
01347                 apr_pool_t *pool);
01348 
01349 /**
01350  * Similar to svn_client_add4(), but with @a add_parents always set to
01351  * FALSE and @a depth set according to @a recursive: if TRUE, then
01352  * @a depth is @c svn_depth_infinity, if FALSE, then @c svn_depth_empty.
01353  *
01354  * @deprecated Provided for backward compatibility with the 1.4 API.
01355  */
01356 SVN_DEPRECATED
01357 svn_error_t *
01358 svn_client_add3(const char *path,
01359                 svn_boolean_t recursive,
01360                 svn_boolean_t force,
01361                 svn_boolean_t no_ignore,
01362                 svn_client_ctx_t *ctx,
01363                 apr_pool_t *pool);
01364 
01365 /**
01366  * Similar to svn_client_add3(), but with @a no_ignore always set to
01367  * FALSE.
01368  *
01369  * @deprecated Provided for backward compatibility with the 1.2 API.
01370  */
01371 SVN_DEPRECATED
01372 svn_error_t *
01373 svn_client_add2(const char *path,
01374                 svn_boolean_t recursive,
01375                 svn_boolean_t force,
01376                 svn_client_ctx_t *ctx,
01377                 apr_pool_t *pool);
01378 
01379 /**
01380  * Similar to svn_client_add2(), but with @a force always set to FALSE.
01381  *
01382  * @deprecated Provided for backward compatibility with the 1.0 API.
01383  */
01384 SVN_DEPRECATED
01385 svn_error_t *
01386 svn_client_add(const char *path,
01387                svn_boolean_t recursive,
01388                svn_client_ctx_t *ctx,
01389                apr_pool_t *pool);
01390 
01391 /** @} */
01392 
01393 /**
01394  * @defgroup Mkdir Create directories in a working copy or repository.
01395  *
01396  * @{
01397  */
01398 
01399 /** Create a directory, either in a repository or a working copy.
01400  *
01401  * If @a paths contains URLs, use the authentication baton in @a ctx
01402  * and @a message to immediately attempt to commit the creation of the
01403  * directories in @a paths in the repository.  If the commit succeeds,
01404  * allocate (in @a pool) and populate @a *commit_info_p.
01405  *
01406  * Else, create the directories on disk, and attempt to schedule them
01407  * for addition (using svn_client_add(), whose docstring you should
01408  * read).
01409  *
01410  * If @a make_parents is TRUE, create any non-existent parent directories
01411  * also.
01412  *
01413  * If non-NULL, @a revprop_table is a hash table holding additional,
01414  * custom revision properties (<tt>const char *</tt> names mapped to
01415  * <tt>svn_string_t *</tt> values) to be set on the new revision in
01416  * the event that this is a committing operation.  This table cannot
01417  * contain any standard Subversion properties.
01418  *
01419  * @a ctx->log_msg_func3/@a ctx->log_msg_baton3 are a callback/baton
01420  * combo that this function can use to query for a commit log message
01421  * when one is needed.
01422  *
01423  * If @a ctx->notify_func2 is non-NULL, when the directory has been created
01424  * (successfully) in the working copy, call @a ctx->notify_func2 with
01425  * @a ctx->notify_baton2 and the path of the new directory.  Note that this is
01426  * only called for items added to the working copy.
01427  *
01428  * @since New in 1.5.
01429  */
01430 svn_error_t *
01431 svn_client_mkdir3(svn_commit_info_t **commit_info_p,
01432                   const apr_array_header_t *paths,
01433                   svn_boolean_t make_parents,
01434                   const apr_hash_t *revprop_table,
01435                   svn_client_ctx_t *ctx,
01436                   apr_pool_t *pool);
01437 
01438 
01439 /**
01440  * Same as svn_client_mkdir3(), but with @a make_parents always FALSE,
01441  * and @a revprop_table always NULL.
01442  *
01443  * @since New in 1.3.
01444  * @deprecated Provided for backward compatibility with the 1.4 API.
01445  */
01446 SVN_DEPRECATED
01447 svn_error_t *
01448 svn_client_mkdir2(svn_commit_info_t **commit_info_p,
01449                   const apr_array_header_t *paths,
01450                   svn_client_ctx_t *ctx,
01451                   apr_pool_t *pool);
01452 
01453 /**
01454  * Same as svn_client_mkdir2(), but takes the @c svn_client_commit_info_t
01455  * type for @a commit_info_p.
01456  *
01457  * @deprecated Provided for backward compatibility with the 1.2 API.
01458  */
01459 SVN_DEPRECATED
01460 svn_error_t *
01461 svn_client_mkdir(svn_client_commit_info_t **commit_info_p,
01462                  const apr_array_header_t *paths,
01463                  svn_client_ctx_t *ctx,
01464                  apr_pool_t *pool);
01465 
01466 /** @} */
01467 
01468 /**
01469  * @defgroup Delete Remove files/directories from a working copy or repository.
01470  *
01471  * @{
01472  */
01473 
01474 /** Delete items from a repository or working copy.
01475  *
01476  * If the paths in @a paths are URLs, use the authentication baton in
01477  * @a ctx and @a ctx->log_msg_func3/@a ctx->log_msg_baton3 to
01478  * immediately attempt to commit a deletion of the URLs from the
01479  * repository.  If the commit succeeds, allocate (in @a pool) and
01480  * populate @a *commit_info_p.  Every path must belong to the same
01481  * repository.
01482  *
01483  * Else, schedule the working copy paths in @a paths for removal from
01484  * the repository.  Each path's parent must be under revision control.
01485  * This is just a *scheduling* operation.  No changes will happen to
01486  * the repository until a commit occurs.  This scheduling can be
01487  * removed with svn_client_revert2(). If a path is a file it is
01488  * immediately removed from the working copy. If the path is a
01489  * directory it will remain in the working copy but all the files, and
01490  * all unversioned items, it contains will be removed. If @a force is
01491  * not set then this operation will fail if any path contains locally
01492  * modified and/or unversioned items. If @a force is set such items
01493  * will be deleted.
01494  *
01495  * If the paths are working copy paths and @a keep_local is TRUE then
01496  * the paths will not be removed from the working copy, only scheduled
01497  * for removal from the repository.  Once the scheduled deletion is
01498  * committed, they will appear as unversioned paths in the working copy.
01499  *
01500  * If non-NULL, @a revprop_table is a hash table holding additional,
01501  * custom revision properties (<tt>const char *</tt> names mapped to
01502  * <tt>svn_string_t *</tt> values) to be set on the new revision in
01503  * the event that this is a committing operation.  This table cannot
01504  * contain any standard Subversion properties.
01505  *
01506  * @a ctx->log_msg_func3/@a ctx->log_msg_baton3 are a callback/baton
01507  * combo that this function can use to query for a commit log message
01508  * when one is needed.
01509  *
01510  * If @a ctx->notify_func2 is non-NULL, then for each item deleted, call
01511  * @a ctx->notify_func2 with @a ctx->notify_baton2 and the path of the deleted
01512  * item.
01513  *
01514  * @since New in 1.5.
01515  */
01516 svn_error_t *
01517 svn_client_delete3(svn_commit_info_t **commit_info_p,
01518                    const apr_array_header_t *paths,
01519                    svn_boolean_t force,
01520                    svn_boolean_t keep_local,
01521                    const apr_hash_t *revprop_table,
01522                    svn_client_ctx_t *ctx,
01523                    apr_pool_t *pool);
01524 
01525 /**
01526  * Similar to svn_client_delete3(), but with @a keep_local always set
01527  * to FALSE, and @a revprop_table passed as NULL.
01528  *
01529  * @deprecated Provided for backward compatibility with the 1.4 API.
01530  */
01531 SVN_DEPRECATED
01532 svn_error_t *
01533 svn_client_delete2(svn_commit_info_t **commit_info_p,
01534                    const apr_array_header_t *paths,
01535                    svn_boolean_t force,
01536                    svn_client_ctx_t *ctx,
01537                    apr_pool_t *pool);
01538 
01539 /**
01540  * Similar to svn_client_delete2(), but takes the @c svn_client_commit_info_t
01541  * type for @a commit_info_p.
01542  *
01543  * @deprecated Provided for backward compatibility with the 1.2 API.
01544  */
01545 SVN_DEPRECATED
01546 svn_error_t *
01547 svn_client_delete(svn_client_commit_info_t **commit_info_p,
01548                   const apr_array_header_t *paths,
01549                   svn_boolean_t force,
01550                   svn_client_ctx_t *ctx,
01551                   apr_pool_t *pool);
01552 
01553 
01554 /** @} */
01555 
01556 /**
01557  * @defgroup Import Import files into the repository.
01558  *
01559  * @{
01560  */
01561 
01562 /** Import file or directory @a path into repository directory @a url at
01563  * head, authenticating with the authentication baton cached in @a ctx,
01564  * and using @a ctx->log_msg_func3/@a ctx->log_msg_baton3 to get a log message
01565  * for the (implied) commit.  Set @a *commit_info_p to the results of the
01566  * commit, allocated in @a pool.  If some components of @a url do not exist
01567  * then create parent directories as necessary.
01568  *
01569  * If @a path is a directory, the contents of that directory are
01570  * imported directly into the directory identified by @a url.  Note that the
01571  * directory @a path itself is not imported -- that is, the basename of
01572  * @a path is not part of the import.
01573  *
01574  * If @a path is a file, then the dirname of @a url is the directory
01575  * receiving the import.  The basename of @a url is the filename in the
01576  * repository.  In this case if @a url already exists, return error.
01577  *
01578  * If @a ctx->notify_func2 is non-NULL, then call @a ctx->notify_func2 with
01579  * @a ctx->notify_baton2 as the import progresses, with any of the following
01580  * actions: @c svn_wc_notify_commit_added,
01581  * @c svn_wc_notify_commit_postfix_txdelta.
01582  *
01583  * Use @a pool for any temporary allocation.
01584  *
01585  * If non-NULL, @a revprop_table is a hash table holding additional,
01586  * custom revision properties (<tt>const char *</tt> names mapped to
01587  * <tt>svn_string_t *</tt> values) to be set on the new revision.
01588  * This table cannot contain any standard Subversion properties.
01589  *
01590  * @a ctx->log_msg_func3/@a ctx->log_msg_baton3 are a callback/baton
01591  * combo that this function can use to query for a commit log message
01592  * when one is needed.
01593  *
01594  * If @a depth is @c svn_depth_empty, import just @a path and nothing
01595  * below it.  If @c svn_depth_files, import @a path and any file
01596  * children of @a path.  If @c svn_depth_immediates, import @a path, any
01597  * file children, and any immediate subdirectories (but nothing
01598  * underneath those subdirectories).  If @c svn_depth_infinity, import
01599  * @a path and everything under it fully recursively.
01600  *
01601  * If @a no_ignore is @c FALSE, don't add files or directories that match
01602  * ignore patterns.
01603  *
01604  * If @a ignore_unknown_node_types is @c FALSE, ignore files of which the
01605  * node type is unknown, such as device files and pipes.
01606  *
01607  * @since New in 1.5.
01608  */
01609 svn_error_t *
01610 svn_client_import3(svn_commit_info_t **commit_info_p,
01611                    const char *path,
01612                    const char *url,
01613                    svn_depth_t depth,
01614                    svn_boolean_t no_ignore,
01615                    svn_boolean_t ignore_unknown_node_types,
01616                    const apr_hash_t *revprop_table,
01617                    svn_client_ctx_t *ctx,
01618                    apr_pool_t *pool);
01619 
01620 /**
01621  * Similar to svn_client_import3(), but with @a ignore_unknown_node_types
01622  * always set to @c FALSE, @a revprop_table passed as NULL, and @a
01623  * depth set according to @a nonrecursive: if TRUE, then @a depth is
01624  * @c svn_depth_files, else @c svn_depth_infinity.
01625  *
01626  * @since New in 1.3.
01627  *
01628  * @deprecated Provided for backward compatibility with the 1.4 API
01629  */
01630 SVN_DEPRECATED
01631 svn_error_t *
01632 svn_client_import2(svn_commit_info_t **commit_info_p,
01633                    const char *path,
01634                    const char *url,
01635                    svn_boolean_t nonrecursive,
01636                    svn_boolean_t no_ignore,
01637                    svn_client_ctx_t *ctx,
01638                    apr_pool_t *pool);
01639 
01640 /**
01641  * Similar to svn_client_import2(), but with @a no_ignore always set
01642  * to FALSE and using the @c svn_client_commit_info_t type for
01643  * @a commit_info_p.
01644  *
01645  * @deprecated Provided for backward compatibility with the 1.2 API.
01646  */
01647 SVN_DEPRECATED
01648 svn_error_t *
01649 svn_client_import(svn_client_commit_info_t **commit_info_p,
01650                   const char *path,
01651                   const char *url,
01652                   svn_boolean_t nonrecursive,
01653                   svn_client_ctx_t *ctx,
01654                   apr_pool_t *pool);
01655 
01656 /** @} */
01657 
01658 /**
01659  * @defgroup Commit Commit local modifications to the repository.
01660  *
01661  * @{
01662  */
01663 
01664 /**
01665  * Commit files or directories into repository, authenticating with
01666  * the authentication baton cached in @a ctx, and using
01667  * @a ctx->log_msg_func3/@a ctx->log_msg_baton3 to obtain the log message.
01668  * Set @a *commit_info_p to the results of the commit, allocated in @a pool.
01669  *
01670  * @a targets is an array of <tt>const char *</tt> paths to commit.  They
01671  * need not be canonicalized nor condensed; this function will take care of
01672  * that.  If @a targets has zero elements, then do nothing and return
01673  * immediately without error.
01674  *
01675  * If non-NULL, @a revprop_table is a hash table holding additional,
01676  * custom revision properties (<tt>const char *</tt> names mapped to
01677  * <tt>svn_string_t *</tt> values) to be set on the new revision.
01678  * This table cannot contain any standard Subversion properties.
01679  *
01680  * If @a ctx->notify_func2 is non-NULL, then call @a ctx->notify_func2 with
01681  * @a ctx->notify_baton2 as the commit progresses, with any of the following
01682  * actions: @c svn_wc_notify_commit_modified, @c svn_wc_notify_commit_added,
01683  * @c svn_wc_notify_commit_deleted, @c svn_wc_notify_commit_replaced,
01684  * @c svn_wc_notify_commit_postfix_txdelta.
01685  *
01686  * If @a depth is @c svn_depth_infinity, commit all changes to and
01687  * below named targets.  If @a depth is @c svn_depth_empty, commit
01688  * only named targets (that is, only property changes on named
01689  * directory targets, and property and content changes for named file
01690  * targets).  If @a depth is @c svn_depth_files, behave as above for
01691  * named file targets, and for named directory targets, commit
01692  * property changes on a named directory and all changes to files
01693  * directly inside that directory.  If @c svn_depth_immediates, behave
01694  * as for @c svn_depth_files, and for subdirectories of any named
01695  * directory target commit as though for @c svn_depth_empty.
01696  *
01697  * Unlock paths in the repository, unless @a keep_locks is TRUE.
01698  *
01699  * @a changelists is an array of <tt>const char *</tt> changelist
01700  * names, used as a restrictive filter on items that are committed;
01701  * that is, don't commit anything unless it's a member of one of those
01702  * changelists.  After the commit completes successfully, remove
01703  * changelist associations from the targets, unless @a
01704  * keep_changelists is set.  If @a changelists is
01705  * empty (or altogether @c NULL), no changelist filtering occurs.
01706  *
01707  * Use @a pool for any temporary allocations.
01708  *
01709  * If no error is returned and @a (*commit_info_p)->revision is set to
01710  * @c SVN_INVALID_REVNUM, then the commit was a no-op; nothing needed to
01711  * be committed.
01712  *
01713  * @since New in 1.5.
01714  */
01715 svn_error_t *
01716 svn_client_commit4(svn_commit_info_t **commit_info_p,
01717                    const apr_array_header_t *targets,
01718                    svn_depth_t depth,
01719                    svn_boolean_t keep_locks,
01720                    svn_boolean_t keep_changelists,
01721                    const apr_array_header_t *changelists,
01722                    const apr_hash_t *revprop_table,
01723                    svn_client_ctx_t *ctx,
01724                    apr_pool_t *pool);
01725 
01726 /**
01727  * Similar to svn_client_commit4(), but always with NULL for
01728  * @a changelist_name, FALSE for @a keep_changelist, NULL for @a
01729  * revprop_table, and @a depth set according to @a recurse: if @a
01730  * recurse is TRUE, use @c svn_depth_infinity, else @c
01731  * svn_depth_empty.
01732  *
01733  * @deprecated Provided for backward compatibility with the 1.4 API.
01734  *
01735  * @since New in 1.3.
01736  */
01737 SVN_DEPRECATED
01738 svn_error_t *
01739 svn_client_commit3(svn_commit_info_t **commit_info_p,
01740                    const apr_array_header_t *targets,
01741                    svn_boolean_t recurse,
01742                    svn_boolean_t keep_locks,
01743                    svn_client_ctx_t *ctx,
01744                    apr_pool_t *pool);
01745 
01746 /**
01747  * Similar to svn_client_commit3(), but uses @c svn_client_commit_info_t
01748  * for @a commit_info_p.
01749  *
01750  * @deprecated Provided for backward compatibility with the 1.2 API.
01751  *
01752  * @since New in 1.2.
01753  */
01754 SVN_DEPRECATED
01755 svn_error_t *
01756 svn_client_commit2(svn_client_commit_info_t **commit_info_p,
01757                    const apr_array_header_t *targets,
01758                    svn_boolean_t recurse,
01759                    svn_boolean_t keep_locks,
01760                    svn_client_ctx_t *ctx,
01761                    apr_pool_t *pool);
01762 
01763 /**
01764  * Similar to svn_client_commit2(), but with @a keep_locks set to
01765  * TRUE and @a nonrecursive instead of @a recurse.
01766  *
01767  * @deprecated Provided for backward compatibility with the 1.1 API.
01768  */
01769 SVN_DEPRECATED
01770 svn_error_t *
01771 svn_client_commit(svn_client_commit_info_t **commit_info_p,
01772                   const apr_array_header_t *targets,
01773                   svn_boolean_t nonrecursive,
01774                   svn_client_ctx_t *ctx,
01775                   apr_pool_t *pool);
01776 
01777 /** @} */
01778 
01779 /**
01780  * @defgroup Status Report interesting information about paths in the \
01781  *                  working copy.
01782  *
01783  * @{
01784  */
01785 
01786 /**
01787  * Given @a path to a working copy directory (or single file), call
01788  * @a status_func/status_baton with a set of @c svn_wc_status_t *
01789  * structures which describe the status of @a path, and its children
01790  * (recursing according to @a depth).
01791  *
01792  *    - If @a get_all is set, retrieve all entries; otherwise,
01793  *      retrieve only "interesting" entries (local mods and/or
01794  *      out of date).
01795  *
01796  *    - If @a update is set, contact the repository and augment the
01797  *      status structures with information about out-of-dateness (with
01798  *      respect to @a revision).  Also, if @a result_rev is not @c NULL,
01799  *      set @a *result_rev to the actual revision against which the
01800  *      working copy was compared (@a *result_rev is not meaningful unless
01801  *      @a update is set).
01802  *
01803  * If @a ignore_externals is not set, then recurse into externals
01804  * definitions (if any exist) after handling the main target.  This
01805  * calls the client notification function (in @a ctx) with the @c
01806  * svn_wc_notify_status_external action before handling each externals
01807  * definition, and with @c svn_wc_notify_status_completed
01808  * after each.
01809  *
01810  * @a changelists is an array of <tt>const char *</tt> changelist
01811  * names, used as a restrictive filter on items whose statuses are
01812  * reported; that is, don't report status about any item unless
01813  * it's a member of one of those changelists.  If @a changelists is
01814  * empty (or altogether @c NULL), no changelist filtering occurs.
01815  *
01816  * @since New in 1.6.
01817  */
01818 svn_error_t *
01819 svn_client_status4(svn_revnum_t *result_rev,
01820                    const char *path,
01821                    const svn_opt_revision_t *revision,
01822                    svn_wc_status_func3_t status_func,
01823                    void *status_baton,
01824                    svn_depth_t depth,
01825                    svn_boolean_t get_all,
01826                    svn_boolean_t update,
01827                    svn_boolean_t no_ignore,
01828                    svn_boolean_t ignore_externals,
01829                    const apr_array_header_t *changelists,
01830                    svn_client_ctx_t *ctx,
01831                    apr_pool_t *pool);
01832 
01833 /**
01834  * Same as svn_client_status4(), but using an @c svn_wc_status_func2_t
01835  * instead of an @c svn_wc_status_func3_t.
01836  *
01837  * @since New in 1.5.
01838  * @deprecated Provided for backward compatibility with the 1.5 API.
01839  */
01840 SVN_DEPRECATED
01841 svn_error_t *
01842 svn_client_status3(svn_revnum_t *result_rev,
01843                    const char *path,
01844                    const svn_opt_revision_t *revision,
01845                    svn_wc_status_func2_t status_func,
01846                    void *status_baton,
01847                    svn_depth_t depth,
01848                    svn_boolean_t get_all,
01849                    svn_boolean_t update,
01850                    svn_boolean_t no_ignore,
01851                    svn_boolean_t ignore_externals,
01852                    const apr_array_header_t *changelists,
01853                    svn_client_ctx_t *ctx,
01854                    apr_pool_t *pool);
01855 
01856 /**
01857  * Like svn_client_status3(), except with @a changelists passed as @c
01858  * NULL, and with @a recurse instead of @a depth.  If @a recurse is
01859  * TRUE, behave as if for @c svn_depth_infinity; else if @a recurse is
01860  * FALSE, behave as if for @c svn_depth_immediates.
01861  *
01862  * @since New in 1.2.
01863  * @deprecated Provided for backward compatibility with the 1.4 API.
01864  */
01865 SVN_DEPRECATED
01866 svn_error_t *
01867 svn_client_status2(svn_revnum_t *result_rev,
01868                    const char *path,
01869                    const svn_opt_revision_t *revision,
01870                    svn_wc_status_func2_t status_func,
01871                    void *status_baton,
01872                    svn_boolean_t recurse,
01873                    svn_boolean_t get_all,
01874                    svn_boolean_t update,
01875                    svn_boolean_t no_ignore,
01876                    svn_boolean_t ignore_externals,
01877                    svn_client_ctx_t *ctx,
01878                    apr_pool_t *pool);
01879 
01880 
01881 /**
01882  * Similar to svn_client_status2(), but with @a ignore_externals
01883  * always set to FALSE, taking the @c svn_wc_status_func_t type
01884  * instead of the @c svn_wc_status_func2_t type for @a status_func,
01885  * and requiring @a *revision to be non-const even though it is
01886  * treated as constant.
01887  *
01888  * @deprecated Provided for backward compatibility with the 1.1 API.
01889  */
01890 SVN_DEPRECATED
01891 svn_error_t *
01892 svn_client_status(svn_revnum_t *result_rev,
01893                   const char *path,
01894                   svn_opt_revision_t *revision,
01895                   svn_wc_status_func_t status_func,
01896                   void *status_baton,
01897                   svn_boolean_t recurse,
01898                   svn_boolean_t get_all,
01899                   svn_boolean_t update,
01900                   svn_boolean_t no_ignore,
01901                   svn_client_ctx_t *ctx,
01902                   apr_pool_t *pool);
01903 
01904 /** @} */
01905 
01906 /**
01907  * @defgroup Log View information about previous revisions of an object.
01908  *
01909  * @{
01910  */
01911 
01912 /**
01913  * Invoke @a receiver with @a receiver_baton on each log message from
01914  * each start/end revision pair in the @a revision_ranges in turn,
01915  * inclusive (but never invoke @a receiver on a given log message more
01916  * than once).
01917  *
01918  * @a targets contains either a URL followed by zero or more relative
01919  * paths, or 1 working copy path, as <tt>const char *</tt>, for which log
01920  * messages are desired.  @a receiver is invoked only on messages whose
01921  * revisions involved a change to some path in @a targets.  @a peg_revision
01922  * indicates in which revision @a targets are valid.  If @a peg_revision is
01923  * @c svn_opt_revision_unspecified, it defaults to @c svn_opt_revision_head
01924  * for URLs or @c svn_opt_revision_working for WC paths.
01925  *
01926  * If @a limit is non-zero only invoke @a receiver on the first @a limit
01927  * logs.
01928  *
01929  * If @a discover_changed_paths is set, then the `@a changed_paths' argument
01930  * to @a receiver will be passed on each invocation.
01931  *
01932  * If @a strict_node_history is set, copy history (if any exists) will
01933  * not be traversed while harvesting revision logs for each target.
01934  *
01935  * If @a include_merged_revisions is set, log information for revisions
01936  * which have been merged to @a targets will also be returned.
01937  *
01938  * If @a revprops is NULL, retrieve all revprops; else, retrieve only the
01939  * revprops named in the array (i.e. retrieve none if the array is empty).
01940  *
01941  * If @a start->kind or @a end->kind is @c svn_opt_revision_unspecified,
01942  * return the error @c SVN_ERR_CLIENT_BAD_REVISION.
01943  *
01944  * Use @a pool for any temporary allocation.
01945  *
01946  * @par Important:
01947  * A special case for the revision range HEAD:1, which was present
01948  * in svn_client_log(), has been removed from svn_client_log2().  Instead, it
01949  * is expected that callers will specify the range HEAD:0, to avoid a
01950  * SVN_ERR_FS_NO_SUCH_REVISION error when invoked against an empty repository
01951  * (i.e. one not containing a revision 1).
01952  *
01953  * If @a ctx->notify_func2 is non-NULL, then call @a ctx->notify_func2/baton2
01954  * with a 'skip' signal on any unversioned targets.
01955  *
01956  * @since New in 1.6.
01957  */
01958 svn_error_t *
01959 svn_client_log5(const apr_array_header_t *targets,
01960                 const svn_opt_revision_t *peg_revision,
01961                 const apr_array_header_t *revision_ranges,
01962                 int limit,
01963                 svn_boolean_t discover_changed_paths,
01964                 svn_boolean_t strict_node_history,
01965                 svn_boolean_t include_merged_revisions,
01966                 const apr_array_header_t *revprops,
01967                 svn_log_entry_receiver_t receiver,
01968                 void *receiver_baton,
01969                 svn_client_ctx_t *ctx,
01970                 apr_pool_t *pool);
01971 
01972 /**
01973  * Similar to svn_client_log5(), but takes explicit start and end parameters
01974  * instead of an array of revision ranges.
01975  *
01976  * @deprecated Provided for compatibility with the 1.5 API.
01977  * @since New in 1.5.
01978  */
01979 SVN_DEPRECATED
01980 svn_error_t *
01981 svn_client_log4(const apr_array_header_t *targets,
01982                 const svn_opt_revision_t *peg_revision,
01983                 const svn_opt_revision_t *start,
01984                 const svn_opt_revision_t *end,
01985                 int limit,
01986                 svn_boolean_t discover_changed_paths,
01987                 svn_boolean_t strict_node_history,
01988                 svn_boolean_t include_merged_revisions,
01989                 const apr_array_header_t *revprops,
01990                 svn_log_entry_receiver_t receiver,
01991                 void *receiver_baton,
01992                 svn_client_ctx_t *ctx,
01993                 apr_pool_t *pool);
01994 
01995 /**
01996  * Similar to svn_client_log4(), but using @c svn_log_message_receiver_t
01997  * instead of @c svn_log_entry_receiver_t.  Also, @a
01998  * include_merged_revisions is set to @c FALSE and @a revprops is
01999  * svn:author, svn:date, and svn:log.
02000  *
02001  * @deprecated Provided for compatibility with the 1.4 API.
02002  * @since New in 1.4.
02003  */
02004 SVN_DEPRECATED
02005 svn_error_t *
02006 svn_client_log3(const apr_array_header_t *targets,
02007                 const svn_opt_revision_t *peg_revision,
02008                 const svn_opt_revision_t *start,
02009                 const svn_opt_revision_t *end,
02010                 int limit,
02011                 svn_boolean_t discover_changed_paths,
02012                 svn_boolean_t strict_node_history,
02013                 svn_log_message_receiver_t receiver,
02014                 void *receiver_baton,
02015                 svn_client_ctx_t *ctx,
02016                 apr_pool_t *pool);
02017 
02018 
02019 /**
02020  * Similar to svn_client_log3(), but with the @c kind field of
02021  * @a peg_revision set to @c svn_opt_revision_unspecified.
02022  *
02023  * @deprecated Provided for compatibility with the 1.3 API.
02024  * @since New in 1.2.
02025  */
02026 SVN_DEPRECATED
02027 svn_error_t *
02028 svn_client_log2(const apr_array_header_t *targets,
02029                 const svn_opt_revision_t *start,
02030                 const svn_opt_revision_t *end,
02031                 int limit,
02032                 svn_boolean_t discover_changed_paths,
02033                 svn_boolean_t strict_node_history,
02034                 svn_log_message_receiver_t receiver,
02035                 void *receiver_baton,
02036                 svn_client_ctx_t *ctx,
02037                 apr_pool_t *pool);
02038 
02039 
02040 /**
02041  * Similar to svn_client_log2(), but with @a limit set to 0, and the
02042  * following special case:
02043  *
02044  * Special case for repositories at revision 0:
02045  *
02046  * If @a start->kind is @c svn_opt_revision_head, and @a end->kind is
02047  * @c svn_opt_revision_number && @a end->number is @c 1, then handle an
02048  * empty (no revisions) repository specially: instead of erroring
02049  * because requested revision 1 when the highest revision is 0, just
02050  * invoke @a receiver on revision 0, passing @c NULL for changed paths and
02051  * empty strings for the author and date.  This is because that
02052  * particular combination of @a start and @a end usually indicates the
02053  * common case of log invocation -- the user wants to see all log
02054  * messages from youngest to oldest, where the oldest commit is
02055  * revision 1.  That works fine, except when there are no commits in
02056  * the repository, hence this special case.
02057  *
02058  * @deprecated Provided for backward compatibility with the 1.0 API.
02059  */
02060 SVN_DEPRECATED
02061 svn_error_t *
02062 svn_client_log(const apr_array_header_t *targets,
02063                const svn_opt_revision_t *start,
02064                const svn_opt_revision_t *end,
02065                svn_boolean_t discover_changed_paths,
02066                svn_boolean_t strict_node_history,
02067                svn_log_message_receiver_t receiver,
02068                void *receiver_baton,
02069                svn_client_ctx_t *ctx,
02070                apr_pool_t *pool);
02071 
02072 /** @} */
02073 
02074 /**
02075  * @defgroup Blame Show modification information about lines in a file.
02076  *
02077  * @{
02078  */
02079 
02080 /**
02081  * Invoke @a receiver with @a receiver_baton on each line-blame item
02082  * associated with revision @a end of @a path_or_url, using @a start
02083  * as the default source of all blame.  @a peg_revision indicates in
02084  * which revision @a path_or_url is valid.  If @a peg_revision->kind
02085  * is @c svn_opt_revision_unspecified, then it defaults to @c
02086  * svn_opt_revision_head for URLs or @c svn_opt_revision_working for
02087  * WC targets.
02088  *
02089  * If @a start->kind or @a end->kind is @c svn_opt_revision_unspecified,
02090  * return the error @c SVN_ERR_CLIENT_BAD_REVISION.  If either are @c
02091  * svn_opt_revision_working, return the error @c
02092  * SVN_ERR_UNSUPPORTED_FEATURE.  If any of the revisions of @a
02093  * path_or_url have a binary mime-type, return the error @c
02094  * SVN_ERR_CLIENT_IS_BINARY_FILE, unless @a ignore_mime_type is TRUE,
02095  * in which case blame information will be generated regardless of the
02096  * MIME types of the revisions.
02097  *
02098  * Use @a diff_options to determine how to compare different revisions of the
02099  * target.
02100  *
02101  * If @a include_merged_revisions is TRUE, also return data based upon
02102  * revisions which have been merged to @a path_or_url.
02103  *
02104  * Use @a pool for any temporary allocation.
02105  *
02106  * @since New in 1.5.
02107  */
02108 svn_error_t *
02109 svn_client_blame4(const char *path_or_url,
02110                   const svn_opt_revision_t *peg_revision,
02111                   const svn_opt_revision_t *start,
02112                   const svn_opt_revision_t *end,
02113                   const svn_diff_file_options_t *diff_options,
02114                   svn_boolean_t ignore_mime_type,
02115                   svn_boolean_t include_merged_revisions,
02116                   svn_client_blame_receiver2_t receiver,
02117                   void *receiver_baton,
02118                   svn_client_ctx_t *ctx,
02119                   apr_pool_t *pool);
02120 
02121 /**
02122  * Similar to svn_client_blame4(), but with @a include_merged_revisions set
02123  * to FALSE, and using a @c svn_client_blame_receiver2_t as the receiver.
02124  *
02125  * @deprecated Provided for backwards compatibility with the 1.4 API.
02126  *
02127  * @since New in 1.4.
02128  */
02129 SVN_DEPRECATED
02130 svn_error_t *
02131 svn_client_blame3(const char *path_or_url,
02132                   const svn_opt_revision_t *peg_revision,
02133                   const svn_opt_revision_t *start,
02134                   const svn_opt_revision_t *end,
02135                   const svn_diff_file_options_t *diff_options,
02136                   svn_boolean_t ignore_mime_type,
02137                   svn_client_blame_receiver_t receiver,
02138                   void *receiver_baton,
02139                   svn_client_ctx_t *ctx,
02140                   apr_pool_t *pool);
02141 
02142 /**
02143  * Similar to svn_client_blame3(), but with @a diff_options set to
02144  * default options as returned by svn_diff_file_options_parse() and
02145  * @a ignore_mime_type set to FALSE.
02146  *
02147  * @deprecated Provided for backwards compatibility with the 1.3 API.
02148  *
02149  * @since New in 1.2.
02150  */
02151 SVN_DEPRECATED
02152 svn_error_t *
02153 svn_client_blame2(const char *path_or_url,
02154                   const svn_opt_revision_t *peg_revision,
02155                   const svn_opt_revision_t *start,
02156                   const svn_opt_revision_t *end,
02157                   svn_client_blame_receiver_t receiver,
02158                   void *receiver_baton,
02159                   svn_client_ctx_t *ctx,
02160                   apr_pool_t *pool);
02161 
02162 /**
02163  * Similar to svn_client_blame2() except that @a peg_revision is always
02164  * the same as @a end.
02165  *
02166  * @deprecated Provided for backward compatibility with the 1.1 API.
02167  */
02168 SVN_DEPRECATED
02169 svn_error_t *
02170 svn_client_blame(const char *path_or_url,
02171                  const svn_opt_revision_t *start,
02172                  const svn_opt_revision_t *end,
02173                  svn_client_blame_receiver_t receiver,
02174                  void *receiver_baton,
02175                  svn_client_ctx_t *ctx,
02176                  apr_pool_t *pool);
02177 
02178 /** @} */
02179 
02180 /**
02181  * @defgroup Diff Generate differences between paths.
02182  *
02183  * @{
02184  */
02185 
02186 /**
02187  * Produce diff output which describes the delta between
02188  * @a path1/@a revision1 and @a path2/@a revision2.  Print the output
02189  * of the diff to @a outfile, and any errors to @a errfile.  @a path1
02190  * and @a path2 can be either working-copy paths or URLs.
02191  *
02192  * If @a relative_to_dir is not @c NULL, the @a original_path and
02193  * @a modified_path will have the @a relative_to_dir stripped from the
02194  * front of the respective paths.  If @a relative_to_dir is @c NULL,
02195  * paths will not be modified.  If @a relative_to_dir is not
02196  * @c NULL but @a relative_to_dir is not a parent path of the target,
02197  * an error is returned. Finally, if @a relative_to_dir is a URL, an
02198  * error will be returned.
02199  *
02200  * If either @a revision1 or @a revision2 has an `unspecified' or
02201  * unrecognized `kind', return @c SVN_ERR_CLIENT_BAD_REVISION.
02202  *
02203  * @a path1 and @a path2 must both represent the same node kind -- that
02204  * is, if @a path1 is a directory, @a path2 must also be, and if @a path1
02205  * is a file, @a path2 must also be.
02206  *
02207  * If @a depth is @c svn_depth_infinity, diff fully recursively.
02208  * Else if it is @c svn_depth_immediates, diff the named paths and
02209  * their file children (if any), and diff properties of
02210  * subdirectories, but do not descend further into the subdirectories.
02211  * Else if @c svn_depth_files, behave as if for @c svn_depth_immediates
02212  * except don't diff properties of subdirectories.  If @c
02213  * svn_depth_empty, diff exactly the named paths but nothing
02214  * underneath them.
02215  *
02216  * Use @a ignore_ancestry to control whether or not items being
02217  * diffed will be checked for relatedness first.  Unrelated items
02218  * are typically transmitted to the editor as a deletion of one thing
02219  * and the addition of another, but if this flag is TRUE, unrelated
02220  * items will be diffed as if they were related.
02221  *
02222  * If @a no_diff_deleted is TRUE, then no diff output will be
02223  * generated on deleted files.
02224  *
02225  * Generated headers are encoded using @a header_encoding.
02226  *
02227  * Diff output will not be generated for binary files, unless @a
02228  * ignore_content_type is TRUE, in which case diffs will be shown
02229  * regardless of the content types.
02230  *
02231  * @a diff_options (an array of <tt>const char *</tt>) is used to pass
02232  * additional command line options to the diff processes invoked to compare
02233  * files.
02234  *
02235  * The authentication baton cached in @a ctx is used to communicate with
02236  * the repository.
02237  *
02238  * @a changelists is an array of <tt>const char *</tt> changelist
02239  * names, used as a restrictive filter on items whose differences are
02240  * reported; that is, don't generate diffs about any item unless
02241  * it's a member of one of those changelists.  If @a changelists is
02242  * empty (or altogether @c NULL), no changelist filtering occurs.
02243  *
02244  * @note Changelist filtering only applies to diffs in which at least
02245  * one side of the diff represents working copy data.
02246  *
02247  * @note @a header_encoding doesn't affect headers generated by external
02248  * diff programs.
02249  *
02250  * @note @a relative_to_dir doesn't affect the path index generated by
02251  * external diff programs.
02252  *
02253  * @since New in 1.5.
02254  */
02255 svn_error_t *
02256 svn_client_diff4(const apr_array_header_t *diff_options,
02257                  const char *path1,
02258                  const svn_opt_revision_t *revision1,
02259                  const char *path2,
02260                  const svn_opt_revision_t *revision2,
02261                  const char *relative_to_dir,
02262                  svn_depth_t depth,
02263                  svn_boolean_t ignore_ancestry,
02264                  svn_boolean_t no_diff_deleted,
02265                  svn_boolean_t ignore_content_type,
02266                  const char *header_encoding,
02267                  apr_file_t *outfile,
02268                  apr_file_t *errfile,
02269                  const apr_array_header_t *changelists,
02270                  svn_client_ctx_t *ctx,
02271                  apr_pool_t *pool);
02272 
02273 
02274 /**
02275  * Similar to svn_client_diff4(), but with @a changelists passed as @c
02276  * NULL, and @a depth set according to @a recurse: if @a recurse is
02277  * TRUE, set @a depth to @c svn_depth_infinity, if @a recurse is
02278  * FALSE, set @a depth to @c svn_depth_empty.
02279  *
02280  * @deprecated Provided for backward compatibility with the 1.4 API.
02281  *
02282  * @since New in 1.3.
02283  */
02284 SVN_DEPRECATED
02285 svn_error_t *
02286 svn_client_diff3(const apr_array_header_t *diff_options,
02287                  const char *path1,
02288                  const svn_opt_revision_t *revision1,
02289                  const char *path2,
02290                  const svn_opt_revision_t *revision2,
02291                  svn_boolean_t recurse,
02292                  svn_boolean_t ignore_ancestry,
02293                  svn_boolean_t no_diff_deleted,
02294                  svn_boolean_t ignore_content_type,
02295                  const char *header_encoding,
02296                  apr_file_t *outfile,
02297                  apr_file_t *errfile,
02298                  svn_client_ctx_t *ctx,
02299                  apr_pool_t *pool);
02300 
02301 
02302 /**
02303  * Similar to svn_client_diff3(), but with @a header_encoding set to
02304  * @c APR_LOCALE_CHARSET.
02305  *
02306  * @deprecated Provided for backward compatibility with the 1.2 API.
02307  *
02308  * @since New in 1.2.
02309  */
02310 SVN_DEPRECATED
02311 svn_error_t *
02312 svn_client_diff2(const apr_array_header_t *diff_options,
02313                  const char *path1,
02314                  const svn_opt_revision_t *revision1,
02315                  const char *path2,
02316                  const svn_opt_revision_t *revision2,
02317                  svn_boolean_t recurse,
02318                  svn_boolean_t ignore_ancestry,
02319                  svn_boolean_t no_diff_deleted,
02320                  svn_boolean_t ignore_content_type,
02321                  apr_file_t *outfile,
02322                  apr_file_t *errfile,
02323                  svn_client_ctx_t *ctx,
02324                  apr_pool_t *pool);
02325 
02326 /**
02327  * Similar to svn_client_diff2(), but with @a ignore_content_type
02328  * always set to FALSE.
02329  *
02330  * @deprecated Provided for backward compatibility with the 1.0 API.
02331  */
02332 SVN_DEPRECATED
02333 svn_error_t *
02334 svn_client_diff(const apr_array_header_t *diff_options,
02335                 const char *path1,
02336                 const svn_opt_revision_t *revision1,
02337                 const char *path2,
02338                 const svn_opt_revision_t *revision2,
02339                 svn_boolean_t recurse,
02340                 svn_boolean_t ignore_ancestry,
02341                 svn_boolean_t no_diff_deleted,
02342                 apr_file_t *outfile,
02343                 apr_file_t *errfile,
02344                 svn_client_ctx_t *ctx,
02345                 apr_pool_t *pool);
02346 
02347 /**
02348  * Produce diff output which describes the delta between the
02349  * filesystem object @a path in peg revision @a peg_revision, as it
02350  * changed between @a start_revision and @a end_revision.  @a path can
02351  * be either a working-copy path or URL.
02352  *
02353  * If @a peg_revision is @c svn_opt_revision_unspecified, behave
02354  * identically to svn_client_diff4(), using @a path for both of that
02355  * function's @a path1 and @a path2 argments.
02356  *
02357  * All other options are handled identically to svn_client_diff4().
02358  *
02359  * @since New in 1.5.
02360  */
02361 svn_error_t *
02362 svn_client_diff_peg4(const apr_array_header_t *diff_options,
02363                      const char *path,
02364                      const svn_opt_revision_t *peg_revision,
02365                      const svn_opt_revision_t *start_revision,
02366                      const svn_opt_revision_t *end_revision,
02367                      const char *relative_to_dir,
02368                      svn_depth_t depth,
02369                      svn_boolean_t ignore_ancestry,
02370                      svn_boolean_t no_diff_deleted,
02371                      svn_boolean_t ignore_content_type,
02372                      const char *header_encoding,
02373                      apr_file_t *outfile,
02374                      apr_file_t *errfile,
02375                      const apr_array_header_t *changelists,
02376                      svn_client_ctx_t *ctx,
02377                      apr_pool_t *pool);
02378 
02379 /**
02380  * Similar to svn_client_diff_peg4(), but with @a changelists passed
02381  * as @c NULL, and @a depth set according to @a recurse: if @a recurse
02382  * is TRUE, set @a depth to @c svn_depth_infinity, if @a recurse is
02383  * FALSE, set @a depth to @c svn_depth_files.
02384  *
02385  * @deprecated Provided for backward compatibility with the 1.4 API.
02386  *
02387  * @since New in 1.3.
02388  */
02389 SVN_DEPRECATED
02390 svn_error_t *
02391 svn_client_diff_peg3(const apr_array_header_t *diff_options,
02392                      const char *path,
02393                      const svn_opt_revision_t *peg_revision,
02394                      const svn_opt_revision_t *start_revision,
02395                      const svn_opt_revision_t *end_revision,
02396                      svn_boolean_t recurse,
02397                      svn_boolean_t ignore_ancestry,
02398                      svn_boolean_t no_diff_deleted,
02399                      svn_boolean_t ignore_content_type,
02400                      const char *header_encoding,
02401                      apr_file_t *outfile,
02402                      apr_file_t *errfile,
02403                      svn_client_ctx_t *ctx,
02404                      apr_pool_t *pool);
02405 
02406 /**
02407  * Similar to svn_client_diff_peg3(), but with @a header_encoding set to
02408  * @c APR_LOCALE_CHARSET.
02409  *
02410  * @deprecated Provided for backward compatibility with the 1.2 API.
02411  *
02412  * @since New in 1.2.
02413  */
02414 SVN_DEPRECATED
02415 svn_error_t *
02416 svn_client_diff_peg2(const apr_array_header_t *diff_options,
02417                      const char *path,
02418                      const svn_opt_revision_t *peg_revision,
02419                      const svn_opt_revision_t *start_revision,
02420                      const svn_opt_revision_t *end_revision,
02421                      svn_boolean_t recurse,
02422                      svn_boolean_t ignore_ancestry,
02423                      svn_boolean_t no_diff_deleted,
02424                      svn_boolean_t ignore_content_type,
02425                      apr_file_t *outfile,
02426                      apr_file_t *errfile,
02427                      svn_client_ctx_t *ctx,
02428                      apr_pool_t *pool);
02429 
02430 /**
02431  * Similar to svn_client_diff_peg2(), but with @a ignore_content_type
02432  * always set to FALSE.
02433  *
02434  * @since New in 1.1.
02435  * @deprecated Provided for backward compatibility with the 1.1 API.
02436  */
02437 SVN_DEPRECATED
02438 svn_error_t *
02439 svn_client_diff_peg(const apr_array_header_t *diff_options,
02440                     const char *path,
02441                     const svn_opt_revision_t *peg_revision,
02442                     const svn_opt_revision_t *start_revision,
02443                     const svn_opt_revision_t *end_revision,
02444                     svn_boolean_t recurse,
02445                     svn_boolean_t ignore_ancestry,
02446                     svn_boolean_t no_diff_deleted,
02447                     apr_file_t *outfile,
02448                     apr_file_t *errfile,
02449                     svn_client_ctx_t *ctx,
02450                     apr_pool_t *pool);
02451 
02452 /**
02453  * Produce a diff summary which lists the changed items between
02454  * @a path1/@a revision1 and @a path2/@a revision2 without creating text
02455  * deltas. @a path1 and @a path2 can be either working-copy paths or URLs.
02456  *
02457  * The function may report false positives if @a ignore_ancestry is false,
02458  * since a file might have been modified between two revisions, but still
02459  * have the same contents.
02460  *
02461  * Calls @a summarize_func with @a summarize_baton for each difference
02462  * with a @c svn_client_diff_summarize_t structure describing the difference.
02463  *
02464  * See svn_client_diff4() for a description of the other parameters.
02465  *
02466  * @since New in 1.5.
02467  */
02468 svn_error_t *
02469 svn_client_diff_summarize2(const char *path1,
02470                            const svn_opt_revision_t *revision1,
02471                            const char *path2,
02472                            const svn_opt_revision_t *revision2,
02473                            svn_depth_t depth,
02474                            svn_boolean_t ignore_ancestry,
02475                            const apr_array_header_t *changelists,
02476                            svn_client_diff_summarize_func_t summarize_func,
02477                            void *summarize_baton,
02478                            svn_client_ctx_t *ctx,
02479                            apr_pool_t *pool);
02480 
02481 /**
02482  * Similar to svn_client_diff_summarize2(), but with @a changelists
02483  * passed as @c NULL, and @a depth set according to @a recurse: if @a
02484  * recurse is TRUE, set @a depth to @c svn_depth_infinity, if @a
02485  * recurse is FALSE, set @a depth to @c svn_depth_files.
02486  *
02487  * @deprecated Provided for backward compatibility with the 1.4 API.
02488  *
02489  * @since New in 1.4.
02490  */
02491 SVN_DEPRECATED
02492 svn_error_t *
02493 svn_client_diff_summarize(const char *path1,
02494                           const svn_opt_revision_t *revision1,
02495                           const char *path2,
02496                           const svn_opt_revision_t *revision2,
02497                           svn_boolean_t recurse,
02498                           svn_boolean_t ignore_ancestry,
02499                           svn_client_diff_summarize_func_t summarize_func,
02500                           void *summarize_baton,
02501                           svn_client_ctx_t *ctx,
02502                           apr_pool_t *pool);
02503 
02504 /**
02505  * Produce a diff summary which lists the changed items between the
02506  * filesystem object @a path in peg revision @a peg_revision, as it
02507  * changed between @a start_revision and @a end_revision. @a path can
02508  * be either a working-copy path or URL.
02509  *
02510  * If @a peg_revision is @c svn_opt_revision_unspecified, behave
02511  * identically to svn_client_diff_summarize2(), using @a path for both
02512  * of that function's @a path1 and @a path2 argments.
02513  *
02514  * The function may report false positives if @a ignore_ancestry is false,
02515  * as described in the documentation for svn_client_diff_summarize2().
02516  *
02517  * Call @a summarize_func with @a summarize_baton for each difference
02518  * with a @c svn_client_diff_summarize_t structure describing the difference.
02519  *
02520  * See svn_client_diff_peg4() for a description of the other parameters.
02521  *
02522  * @since New in 1.5.
02523  */
02524 svn_error_t *
02525 svn_client_diff_summarize_peg2(const char *path,
02526                                const svn_opt_revision_t *peg_revision,
02527                                const svn_opt_revision_t *start_revision,
02528                                const svn_opt_revision_t *end_revision,
02529                                svn_depth_t depth,
02530                                svn_boolean_t ignore_ancestry,
02531                                const apr_array_header_t *changelists,
02532                                svn_client_diff_summarize_func_t summarize_func,
02533                                void *summarize_baton,
02534                                svn_client_ctx_t *ctx,
02535                                apr_pool_t *pool);
02536 
02537 /**
02538  * Similar to svn_client_diff_summarize_peg2(), but with @a
02539  * changelists passed as @c NULL, and @a depth set according to @a
02540  * recurse: if @a recurse is TRUE, set @a depth to @c
02541  * svn_depth_infinity, if @a recurse is FALSE, set @a depth to @c
02542  * svn_depth_files.
02543  *
02544  * @deprecated Provided for backward compatibility with the 1.4 API.
02545  *
02546  * @since New in 1.4.
02547  */
02548 SVN_DEPRECATED
02549 svn_error_t *
02550 svn_client_diff_summarize_peg(const char *path,
02551                               const svn_opt_revision_t *peg_revision,
02552                               const svn_opt_revision_t *start_revision,
02553                               const svn_opt_revision_t *end_revision,
02554                               svn_boolean_t recurse,
02555                               svn_boolean_t ignore_ancestry,
02556                               svn_client_diff_summarize_func_t summarize_func,
02557                               void *summarize_baton,
02558                               svn_client_ctx_t *ctx,
02559                               apr_pool_t *pool);
02560 
02561 /** @} */
02562 
02563 /**
02564  * @defgroup Merge Merge changes between branches.
02565  *
02566  * @{
02567  */
02568 
02569 /** Merge changes from @a source1/@a revision1 to @a source2/@a revision2 into
02570  * the working-copy path @a target_wcpath.
02571  *
02572  * @a source1 and @a source2 are either URLs that refer to entries in the
02573  * repository, or paths to entries in the working copy.
02574  *
02575  * By "merging", we mean:  apply file differences using
02576  * svn_wc_merge(), and schedule additions & deletions when appropriate.
02577  *
02578  * @a source1 and @a source2 must both represent the same node kind -- that
02579  * is, if @a source1 is a directory, @a source2 must also be, and if @a source1
02580  * is a file, @a source2 must also be.
02581  *
02582  * If either @a revision1 or @a revision2 has an `unspecified' or
02583  * unrecognized `kind', return @c SVN_ERR_CLIENT_BAD_REVISION.
02584  *
02585  * If @a depth is @c svn_depth_infinity, merge fully recursively.
02586  * Else if @c svn_depth_immediates, merge changes at most to files
02587  * that are immediate children of @a target_wcpath and to directory
02588  * properties of @a target_wcpath and its immediate subdirectory children.
02589  * Else if @c svn_depth_files, merge at most to immediate file
02590  * children of @a target_wcpath and to @a target_wcpath itself.
02591  * Else if @c svn_depth_empty, apply changes only to @a target_wcpath
02592  * (i.e., directory property changes only)
02593  *
02594  * If @a depth is @c svn_depth_unknown, use the depth of @a target_wcpath.
02595  *
02596  * Use @a ignore_ancestry to control whether or not items being
02597  * diffed will be checked for relatedness first.  Unrelated items
02598  * are typically transmitted to the editor as a deletion of one thing
02599  * and the addition of another, but if this flag is TRUE, unrelated
02600  * items will be diffed as if they were related.
02601  *
02602  * If @a force is false and the merge involves deleting a file whose
02603  * content differs from the source-left version, or a locally modified
02604  * directory, or an unversioned item, then the operation will fail.  If
02605  * @a force is true then all such items will be deleted.
02606  *
02607  * @a merge_options (an array of <tt>const char *</tt>), if non-NULL,
02608  * is used to pass additional command line arguments to the merge
02609  * processes (internal or external).  @see
02610  * svn_diff_file_options_parse().
02611  *
02612  * If @a ctx->notify_func2 is non-NULL, then call @a ctx->notify_func2 with @a
02613  * ctx->notify_baton2 once for each merged target, passing the target's local
02614  * path.
02615  *
02616  * If @a record_only is TRUE, the merge isn't actually performed, but
02617  * the mergeinfo for the revisions which would've been merged is
02618  * recorded in the working copy (and must be subsequently committed
02619  * back to the repository).
02620  *
02621  * If @a dry_run is TRUE, the merge is carried out, and full notification
02622  * feedback is provided, but the working copy is not modified.
02623  *
02624  * The authentication baton cached in @a ctx is used to communicate with the
02625  * repository.
02626  *
02627  * @since New in 1.5.
02628  */
02629 svn_error_t *
02630 svn_client_merge3(const char *source1,
02631                   const svn_opt_revision_t *revision1,
02632                   const char *source2,
02633                   const svn_opt_revision_t *revision2,
02634                   const char *target_wcpath,
02635                   svn_depth_t depth,
02636                   svn_boolean_t ignore_ancestry,
02637                   svn_boolean_t force,
02638                   svn_boolean_t record_only,
02639                   svn_boolean_t dry_run,
02640                   const apr_array_header_t *merge_options,
02641                   svn_client_ctx_t *ctx,
02642                   apr_pool_t *pool);
02643 
02644 /**
02645  * Similar to svn_client_merge3(), but with @a record_only set to @c
02646  * FALSE, and @a depth set according to @a recurse: if @a recurse is
02647  * TRUE, set @a depth to @c svn_depth_infinity, if @a recurse is
02648  * FALSE, set @a depth to @c svn_depth_files.
02649  *
02650  * @deprecated Provided for backward compatibility with the 1.4 API.
02651  *
02652  * @since New in 1.4.
02653  */
02654 SVN_DEPRECATED
02655 svn_error_t *
02656 svn_client_merge2(const char *source1,
02657                   const svn_opt_revision_t *revision1,
02658                   const char *source2,
02659                   const svn_opt_revision_t *revision2,
02660                   const char *target_wcpath,
02661                   svn_boolean_t recurse,
02662                   svn_boolean_t ignore_ancestry,
02663                   svn_boolean_t force,
02664                   svn_boolean_t dry_run,
02665                   const apr_array_header_t *merge_options,
02666                   svn_client_ctx_t *ctx,
02667                   apr_pool_t *pool);
02668 
02669 
02670 /**
02671  * Similar to svn_client_merge2(), but with @a merge_options set to NULL.
02672  *
02673  * @deprecated Provided for backwards compatibility with the 1.3 API.
02674  */
02675 SVN_DEPRECATED
02676 svn_error_t *
02677 svn_client_merge(const char *source1,
02678                  const svn_opt_revision_t *revision1,
02679                  const char *source2,
02680                  const svn_opt_revision_t *revision2,
02681                  const char *target_wcpath,
02682                  svn_boolean_t recurse,
02683                  svn_boolean_t ignore_ancestry,
02684                  svn_boolean_t force,
02685                  svn_boolean_t dry_run,
02686                  svn_client_ctx_t *ctx,
02687                  apr_pool_t *pool);
02688 
02689 
02690 
02691 /**
02692  * Perform a reintegration merge of @a source at @a peg_revision
02693  * into @a target_wcpath.
02694  * @a target_wcpath must be a single-revision, @c svn_depth_infinity,
02695  * pristine, unswitched working copy -- in other words, it must
02696  * reflect a single revision tree, the "target".  The mergeinfo on @a
02697  * source must reflect that all of the target has been merged into it.
02698  * Then this behaves like a merge with svn_client_merge3() from the
02699  * target's URL to the source.
02700  *
02701  * All other options are handled identically to svn_client_merge3().
02702  * The depth of the merge is always @c svn_depth_infinity.
02703  *
02704  * @since New in 1.5.
02705  */
02706 svn_error_t *
02707 svn_client_merge_reintegrate(const char *source,
02708                              const svn_opt_revision_t *peg_revision,
02709                              const char *target_wcpath,
02710                              svn_boolean_t dry_run,
02711                              const apr_array_header_t *merge_options,
02712                              svn_client_ctx_t *ctx,
02713                              apr_pool_t *pool);
02714 
02715 /**
02716  * Merge the changes between the filesystem object @a source in peg
02717  * revision @a peg_revision, as it changed between the ranges described
02718  * in @a ranges_to_merge.
02719  *
02720  * @a ranges_to_merge is an array of <tt>svn_opt_revision_range_t
02721  * *</tt> ranges.  These ranges may describe additive and/or
02722  * subtractive merge ranges, they may overlap fully or partially,
02723  * and/or they may partially or fully negate each other.  This
02724  * rangelist is not required to be sorted.  If any revision in the
02725  * list of provided ranges has an `unspecified' or unrecognized
02726  * `kind', return @c SVN_ERR_CLIENT_BAD_REVISION.
02727  *
02728  * All other options are handled identically to svn_client_merge3().
02729  *
02730  * @since New in 1.5.
02731  */
02732 svn_error_t *
02733 svn_client_merge_peg3(const char *source,
02734                       const apr_array_header_t *ranges_to_merge,
02735                       const svn_opt_revision_t *peg_revision,
02736                       const char *target_wcpath,
02737                       svn_depth_t depth,
02738                       svn_boolean_t ignore_ancestry,
02739                       svn_boolean_t force,
02740                       svn_boolean_t record_only,
02741                       svn_boolean_t dry_run,
02742                       const apr_array_header_t *merge_options,
02743                       svn_client_ctx_t *ctx,
02744                       apr_pool_t *pool);
02745 
02746 /**
02747  * Similar to svn_client_merge_peg3(), but with @a record_only set to
02748  * @c FALSE, and @a depth set according to @a recurse: if @a recurse
02749  * is TRUE, set @a depth to @c svn_depth_infinity, if @a recurse is
02750  * FALSE, set @a depth to @c svn_depth_files.
02751  *
02752  * @deprecated Provided for backwards compatibility with the 1.3 API.
02753  *
02754  * @since New in 1.4.
02755  */
02756 SVN_DEPRECATED
02757 svn_error_t *
02758 svn_client_merge_peg2(const char *source,
02759                       const svn_opt_revision_t *revision1,
02760                       const svn_opt_revision_t *revision2,
02761                       const svn_opt_revision_t *peg_revision,
02762                       const char *target_wcpath,
02763                       svn_boolean_t recurse,
02764                       svn_boolean_t ignore_ancestry,
02765                       svn_boolean_t force,
02766                       svn_boolean_t dry_run,
02767                       const apr_array_header_t *merge_options,
02768                       svn_client_ctx_t *ctx,
02769                       apr_pool_t *pool);
02770 
02771 /**
02772  * Similar to svn_client_merge_peg2(), but with @a merge_options set to
02773  * NULL.
02774  *
02775  * @deprecated Provided for backwards compatibility with the 1.3 API.
02776  *
02777  * @since New in 1.1.
02778  */
02779 SVN_DEPRECATED
02780 svn_error_t *
02781 svn_client_merge_peg(const char *source,
02782                      const svn_opt_revision_t *revision1,
02783                      const svn_opt_revision_t *revision2,
02784                      const svn_opt_revision_t *peg_revision,
02785                      const char *target_wcpath,
02786                      svn_boolean_t recurse,
02787                      svn_boolean_t ignore_ancestry,
02788                      svn_boolean_t force,
02789                      svn_boolean_t dry_run,
02790                      svn_client_ctx_t *ctx,
02791                      apr_pool_t *pool);
02792 
02793 
02794 /** Set @a suggestions to an ordered array of @c const char *
02795  * potential merge sources (expressed as full repository URLs) for @a
02796  * path_or_url at @a peg_revision.  @a path_or_url is a working copy
02797  * path or repository URL.  @a ctx is a context used for
02798  * authentication in the repository case.  Use @a pool for all
02799  * allocations.
02800  *
02801  * @since New in 1.5.
02802  */
02803 svn_error_t *
02804 svn_client_suggest_merge_sources(apr_array_header_t **suggestions,
02805                                  const char *path_or_url,
02806                                  const svn_opt_revision_t *peg_revision,
02807                                  svn_client_ctx_t *ctx,
02808                                  apr_pool_t *pool);
02809 
02810 
02811 /**
02812  * Set @a *mergeinfo to a hash mapping <tt>const char *</tt> merge
02813  * source URLs to <tt>apr_array_header_t *</tt> rangelists (arrays of
02814  * <tt>svn_merge_range_t *</tt> ranges) describing the ranges which
02815  * have been merged into @a path_or_url as of @a peg_revision, or @c
02816  * NULL if there is no mergeinfo.
02817  *
02818  * Use @a pool for all necessary allocations.
02819  *
02820  * If the server doesn't support retrieval of mergeinfo (which will
02821  * never happen for file:// URLs), return an @c
02822  * SVN_ERR_UNSUPPORTED_FEATURE error.
02823  *
02824  * @note Unlike most APIs which deal with mergeinfo, this one returns
02825  * data where the keys of the hash are absolute repository URLs rather
02826  * than repository filesystem paths.
02827  *
02828  * @since New in 1.5.
02829  */
02830 svn_error_t *
02831 svn_client_mergeinfo_get_merged(apr_hash_t **mergeinfo,
02832                                 const char *path_or_url,
02833                                 const svn_opt_revision_t *peg_revision,
02834                                 svn_client_ctx_t *ctx,
02835                                 apr_pool_t *pool);
02836 
02837 
02838 /**
02839  * Drive log entry callbacks @a receiver / @a receiver_baton with the
02840  * revisions merged from @a merge_source_path_or_url (as of @a
02841  * src_peg_revision) into @a path_or_url (as of @a peg_revision).  @a
02842  * ctx is a context used for authentication.
02843  *
02844  * @a discover_changed_paths and @a revprops are the same as for
02845  * svn_client_log4().  Use @a pool for all necessary allocations.
02846  *
02847  * If the server doesn't support retrieval of mergeinfo, return an @c
02848  * SVN_ERR_UNSUPPORTED_FEATURE error.
02849  *
02850  * @since New in 1.5.
02851  */
02852 svn_error_t *
02853 svn_client_mergeinfo_log_merged(const char *path_or_url,
02854                                 const svn_opt_revision_t *peg_revision,
02855                                 const char *merge_source_path_or_url,
02856                                 const svn_opt_revision_t *src_peg_revision,
02857                                 svn_log_entry_receiver_t receiver,
02858                                 void *receiver_baton,
02859                                 svn_boolean_t discover_changed_paths,
02860                                 const apr_array_header_t *revprops,
02861                                 svn_client_ctx_t *ctx,
02862                                 apr_pool_t *pool);
02863 
02864 /**
02865  * Drive log entry callbacks @a receiver / @a receiver_baton with the
02866  * revisions eligible for merge from @a merge_source_path_or_url (as
02867  * of @a src_peg_revision) into @a path_or_url (as of @a
02868  * peg_revision).  @a ctx is a context used for authentication.
02869  *
02870  * @a discover_changed_paths and @a revprops are the same as for
02871  * svn_client_log4().  Use @a pool for all necessary allocations.
02872  *
02873  * If the server doesn't support retrieval of mergeinfo, return an @c
02874  * SVN_ERR_UNSUPPORTED_FEATURE error.
02875  *
02876  * @since New in 1.5.
02877  */
02878 svn_error_t *
02879 svn_client_mergeinfo_log_eligible(const char *path_or_url,
02880                                   const svn_opt_revision_t *peg_revision,
02881                                   const char *merge_source_path_or_url,
02882                                   const svn_opt_revision_t *src_peg_revision,
02883                                   svn_log_entry_receiver_t receiver,
02884                                   void *receiver_baton,
02885                                   svn_boolean_t discover_changed_paths,
02886                                   const apr_array_header_t *revprops,
02887                                   svn_client_ctx_t *ctx,
02888                                   apr_pool_t *pool);
02889 
02890 /** @} */
02891 
02892 /**
02893  * @defgroup Cleanup Cleanup an abnormally terminated working copy.
02894  *
02895  * @{
02896  */
02897 
02898 /** Recursively cleanup a working copy directory @a dir, finishing any
02899  * incomplete operations, removing lockfiles, etc.
02900  *
02901  * If @a ctx->cancel_func is non-NULL, invoke it with @a
02902  * ctx->cancel_baton at various points during the operation.  If it
02903  * returns an error (typically SVN_ERR_CANCELLED), return that error
02904  * immediately.
02905  */
02906 svn_error_t *
02907 svn_client_cleanup(const char *dir,
02908                    svn_client_ctx_t *ctx,
02909                    apr_pool_t *pool);
02910 
02911 
02912 /** @} */
02913 
02914 /**
02915  * @defgroup Relocate Switch a working copy to a different repository.
02916  *
02917  * @{
02918  */
02919 
02920 /**
02921  * Modify a working copy directory @a dir, changing any
02922  * repository URLs that begin with @a from to begin with @a to instead,
02923  * recursing into subdirectories if @a recurse is TRUE.
02924  *
02925  * @param dir Working copy directory
02926  * @param from Original URL
02927  * @param to New URL
02928  * @param recurse Whether to recurse
02929  * @param ctx svn_client_ctx_t
02930  * @param pool The pool from which to perform memory allocations
02931  */
02932 svn_error_t *
02933 svn_client_relocate(const char *dir,
02934                     const char *from,
02935                     const char *to,
02936                     svn_boolean_t recurse,
02937                     svn_client_ctx_t *ctx,
02938                     apr_pool_t *pool);
02939 
02940 
02941 /** @} */
02942 
02943 /**
02944  * @defgroup Revert Remove local changes in a repository.
02945  *
02946  * @{
02947  */
02948 
02949 /**
02950  * Restore the pristine version of a working copy @a paths,
02951  * effectively undoing any local mods.  For each path in @a paths,
02952  * revert it if it is a file.  Else if it is a directory, revert
02953  * according to @a depth:
02954  *
02955  * If @a depth is @c svn_depth_empty, revert just the properties on
02956  * the directory; else if @c svn_depth_files, revert the properties
02957  * and any files immediately under the directory; else if
02958  * @c svn_depth_immediates, revert all of the preceding plus
02959  * properties on immediate subdirectories; else if @c svn_depth_infinity,
02960  * revert path and everything under it fully recursively.
02961  *
02962  * @a changelists is an array of <tt>const char *</tt> changelist
02963  * names, used as a restrictive filter on items reverted; that is,
02964  * don't revert any item unless it's a member of one of those
02965  * changelists.  If @a changelists is empty (or altogether @c NULL),
02966  * no changelist filtering occurs.
02967  *
02968  * If @a ctx->notify_func2 is non-NULL, then for each item reverted,
02969  * call @a ctx->notify_func2 with @a ctx->notify_baton2 and the path of
02970  * the reverted item.
02971  *
02972  * If an item specified for reversion is not under version control,
02973  * then do not error, just invoke @a ctx->notify_func2 with @a
02974  * ctx->notify_baton2, using notification code @c svn_wc_notify_skip.
02975  *
02976  * @since New in 1.5.
02977  */
02978 svn_error_t *
02979 svn_client_revert2(const apr_array_header_t *paths,
02980                    svn_depth_t depth,
02981                    const apr_array_header_t *changelists,
02982                    svn_client_ctx_t *ctx,
02983                    apr_pool_t *pool);
02984 
02985 
02986 /**
02987  * Similar to svn_client_revert2(), but with @a changelists passed as
02988  * @c NULL, and @a depth set according to @a recurse: if @a recurse is
02989  * TRUE, @a depth is @c svn_depth_infinity, else if @a recurse is
02990  * FALSE, @a depth is @c svn_depth_empty.
02991  *
02992  * @note Most APIs map @a recurse==FALSE to @a depth==svn_depth_files;
02993  * revert is deliberately different.
02994  *
02995  * @deprecated Provided for backwards compatibility with the 1.0 API.
02996  */
02997 SVN_DEPRECATED
02998 svn_error_t *
02999 svn_client_revert(const apr_array_header_t *paths,
03000                   svn_boolean_t recursive,
03001                   svn_client_ctx_t *ctx,
03002                   apr_pool_t *pool);
03003 
03004 
03005 /** @} */
03006 
03007 /**
03008  * @defgroup Resolved Mark conflicted paths as resolved.
03009  *
03010  * @{
03011  */
03012 
03013 /**
03014  * Similar to svn_client_resolve(), but without automatic conflict
03015  * resolution support.
03016  *
03017  * @deprecated Provided for backward compatibility with the 1.4 API.
03018  * Use svn_client_resolve() instead.
03019  */
03020 SVN_DEPRECATED
03021 svn_error_t *
03022 svn_client_resolved(const char *path,
03023                     svn_boolean_t recursive,
03024                     svn_client_ctx_t *ctx,
03025                     apr_pool_t *pool);
03026 
03027 /** Perform automatic conflict resolution on a working copy @a path.
03028  *
03029  * If @a depth is @c svn_depth_empty, act only on @a path; if
03030  * @c svn_depth_files, resolve @a path and its conflicted file
03031  * children (if any); if @c svn_depth_immediates, resolve @a path and
03032  * all its immediate conflicted children (both files and directories,
03033  * if any); if @c svn_depth_infinity, resolve @a path and every
03034  * conflicted file or directory anywhere beneath it.
03035  * Note that this operation will try to lock the parent directory of
03036  * @a path in order to be able to resolve tree-conflicts on @a path.
03037  *
03038  * If @a conflict_choice is @c svn_wc_conflict_choose_base, resolve the
03039  * conflict with the old file contents; if
03040  * @c svn_wc_conflict_choose_mine_full, use the original working contents;
03041  * if @c svn_wc_conflict_choose_theirs_full, the new contents; and if
03042  * @c svn_wc_conflict_choose_merged, don't change the contents at all,
03043  * just remove the conflict status, which is the pre-1.5 behavior.
03044  *
03045  * @c svn_wc_conflict_choose_theirs_conflict and @c
03046  * svn_wc_conflict_choose_mine_conflict are not legal for binary
03047  * files or properties.
03048  *
03049  * If @a path is not in a state of conflict to begin with, do nothing.
03050  * If @a path's conflict state is removed and @a ctx->notify_func2 is non-NULL,
03051  * call @a ctx->notify_func2 with @a ctx->notify_baton2 and @a path.
03052  *
03053  * @since New in 1.5.
03054  */
03055 svn_error_t *
03056 svn_client_resolve(const char *path,
03057                    svn_depth_t depth,
03058                    svn_wc_conflict_choice_t conflict_choice,
03059                    svn_client_ctx_t *ctx,
03060                    apr_pool_t *pool);
03061 
03062 
03063 /** @} */
03064 
03065 /**
03066  * @defgroup Copy Copy paths in the working copy and repository.
03067  *
03068  * @{
03069  */
03070 
03071 /**
03072  * A structure which describes the source of a copy operation--its path,
03073  * revision, and peg revision.
03074  *
03075  * @since New in 1.5.
03076  */
03077 typedef struct svn_client_copy_source_t
03078 {
03079     /** The source path or URL. */
03080     const char *path;
03081 
03082     /** The source operational revision. */
03083     const svn_opt_revision_t *revision;
03084 
03085     /** The source peg revision. */
03086     const svn_opt_revision_t *peg_revision;
03087 } svn_client_copy_source_t;
03088 
03089 /** Copy each @a src in @a sources to @a dst_path.
03090  *
03091  * If multiple @a sources are given, @a dst_path must be a directory,
03092  * and @a sources will be copied as children of @a dst_path.
03093  *
03094  * @a sources must be an array of elements of type
03095  * <tt>svn_client_copy_source_t *</tt>.
03096  *
03097  * Each @a src in @a sources must be files or directories under version control,
03098  * or URLs of a versioned item in the repository.  If @a sources has multiple
03099  * items, the @a src members must be all repository URLs or all working copy
03100  * paths.
03101  *
03102  * The parent of @a dst_path must already exist.
03103  *
03104  * If @a sources has only one item, attempt to copy it to @a dst_path.  If
03105  * @a copy_as_child is TRUE and @a dst_path already exists, attempt to copy the
03106  * item as a child of @a dst_path.  If @a copy_as_child is FALSE and
03107  * @a dst_path already exists, fail with @c SVN_ERR_ENTRY_EXISTS if @a dst_path
03108  * is a working copy path and @c SVN_ERR_FS_ALREADY_EXISTS if @a dst_path is a
03109  * URL.
03110  *
03111  * If @a sources has multiple items, and @a copy_as_child is TRUE, all
03112  * @a sources are copied as children of @a dst_path.  If any child of
03113  * @a dst_path already exists with the same name any item in @a sources,
03114  * fail with @c SVN_ERR_ENTRY_EXISTS if @a dst_path is a working copy path and
03115  * @c SVN_ERR_FS_ALREADY_EXISTS if @a dst_path is a URL.
03116  *
03117  * If @a sources has multiple items, and @a copy_as_child is FALSE, fail
03118  * with @c SVN_ERR_CLIENT_MULTIPLE_SOURCES_DISALLOWED.
03119  *
03120  * If @a dst_path is a URL, use the authentication baton
03121  * in @a ctx and @a ctx->log_msg_func3/@a ctx->log_msg_baton3 to immediately
03122  * attempt to commit the copy action in the repository.  If the commit
03123  * succeeds, allocate (in @a pool) and populate @a *commit_info_p.  If
03124  * @a dst_path is not a URL, and the copy succeeds, set @a
03125  * *commit_info_p to @c NULL.
03126  *
03127  * If @a dst_path is not a URL, then this is just a variant of
03128  * svn_client_add(), where the @a sources are scheduled for addition
03129  * as copies.  No changes will happen to the repository until a commit occurs.
03130  * This scheduling can be removed with svn_client_revert2().
03131  *
03132  * If @a make_parents is TRUE, create any non-existent parent directories
03133  * also.
03134  *
03135  * If @a ignore_externals is set, don't process externals definitions
03136  * as part of this operation.
03137  *
03138  * If non-NULL, @a revprop_table is a hash table holding additional,
03139  * custom revision properties (<tt>const char *</tt> names mapped to
03140  * <tt>svn_string_t *</tt> values) to be set on the new revision in
03141  * the event that this is a committing operation.  This table cannot
03142  * contain any standard Subversion properties.
03143  *
03144  * @a ctx->log_msg_func3/@a ctx->log_msg_baton3 are a callback/baton combo
03145  * that this function can use to query for a commit log message when one is
03146  * needed.
03147  *
03148  * If @a ctx->notify_func2 is non-NULL, invoke it with @a ctx->notify_baton2
03149  * for each item added at the new location, passing the new, relative path of
03150  * the added item.
03151  *
03152  * @since New in 1.6.
03153  */
03154 svn_error_t *
03155 svn_client_copy5(svn_commit_info_t **commit_info_p,
03156                  apr_array_header_t *sources,
03157                  const char *dst_path,
03158                  svn_boolean_t copy_as_child,
03159                  svn_boolean_t make_parents,
03160                  svn_boolean_t ignore_externals,
03161                  const apr_hash_t *revprop_table,
03162                  svn_client_ctx_t *ctx,
03163                  apr_pool_t *pool);
03164 
03165 /**
03166  * Similar to svn_client_copy5(), with @a ignore_externals set to @c FALSE.
03167  *
03168  * @since New in 1.5.
03169  *
03170  * @deprecated Provided for backward compatibility with the 1.5 API.
03171  */
03172 SVN_DEPRECATED
03173 svn_error_t *
03174 svn_client_copy4(svn_commit_info_t **commit_info_p,
03175                  apr_array_header_t *sources,
03176                  const char *dst_path,
03177                  svn_boolean_t copy_as_child,
03178                  svn_boolean_t make_parents,
03179                  const apr_hash_t *revprop_table,
03180                  svn_client_ctx_t *ctx,
03181                  apr_pool_t *pool);
03182 
03183 /**
03184  * Similar to svn_client_copy4(), with only one @a src_path, @a
03185  * copy_as_child set to @c FALSE, @a revprop_table passed as NULL, and
03186  * @a make_parents set to @c FALSE.  Also, use @a src_revision as both
03187  * the operational and peg revision.
03188  *
03189  * @since New in 1.4.
03190  *
03191  * @deprecated Provided for backward compatibility with the 1.4 API.
03192  */
03193 SVN_DEPRECATED
03194 svn_error_t *
03195 svn_client_copy3(svn_commit_info_t **commit_info_p,
03196                  const char *src_path,
03197                  const svn_opt_revision_t *src_revision,
03198                  const char *dst_path,
03199                  svn_client_ctx_t *ctx,
03200                  apr_pool_t *pool);
03201 
03202 
03203 /**
03204  * Similar to svn_client_copy3(), with the difference that if @a dst_path
03205  * already exists and is a directory, copy the item into that directory,
03206  * keeping its name (the last component of @a src_path).
03207  *
03208  * @since New in 1.3.
03209  *
03210  * @deprecated Provided for backward compatibility with the 1.3 API.
03211  */
03212 SVN_DEPRECATED
03213 svn_error_t *
03214 svn_client_copy2(svn_commit_info_t **commit_info_p,
03215                  const char *src_path,
03216                  const svn_opt_revision_t *src_revision,
03217                  const char *dst_path,
03218                  svn_client_ctx_t *ctx,
03219                  apr_pool_t *pool);
03220 
03221 
03222 /**
03223  * Similar to svn_client_copy2(), but uses @c svn_client_commit_info_t
03224  * for @a commit_info_p.
03225  *
03226  * @deprecated Provided for backward compatibility with the 1.2 API.
03227  */
03228 SVN_DEPRECATED
03229 svn_error_t *
03230 svn_client_copy(svn_client_commit_info_t **commit_info_p,
03231                 const char *src_path,
03232                 const svn_opt_revision_t *src_revision,
03233                 const char *dst_path,
03234                 svn_client_ctx_t *ctx,
03235                 apr_pool_t *pool);
03236 
03237 
03238 /** @} */
03239 
03240 /**
03241  * @defgroup Move Move paths in the working copy or repository.
03242  *
03243  * @{
03244  */
03245 
03246 /**
03247  * Move @a src_paths to @a dst_path.
03248  *
03249  * @a src_paths must be files or directories under version control, or
03250  * URLs of versioned items in the repository.  All @a src_paths must be of
03251  * the same type.  If multiple @a src_paths are given, @a dst_path must be
03252  * a directory and @a src_paths will be moved as children of @a dst_path.
03253  *
03254  * If @a src_paths are repository URLs:
03255  *
03256  *   - @a dst_path must also be a repository URL.
03257  *
03258  *   - The authentication baton in @a ctx and @a ctx->log_msg_func/@a
03259  *     ctx->log_msg_baton are used to commit the move.
03260  *
03261  *   - The move operation will be immediately committed.  If the
03262  *     commit succeeds, allocate (in @a pool) and populate @a *commit_info_p.
03263  *
03264  * If @a src_paths are working copy paths:
03265  *
03266  *   - @a dst_path must also be a working copy path.
03267  *
03268  *   - @a ctx->log_msg_func3 and @a ctx->log_msg_baton3 are ignored.
03269  *
03270  *   - This is a scheduling operation.  No changes will happen to the
03271  *     repository until a commit occurs.  This scheduling can be removed
03272  *     with svn_client_revert2().  If one of @a src_paths is a file it is
03273  *     removed from the working copy immediately.  If one of @a src_path
03274  *     is a directory it will remain in the working copy but all the files,
03275  *     and unversioned items, it contains will be removed.
03276  *
03277  *   - If one of @a src_paths contains locally modified and/or unversioned
03278  *     items and @a force is not set, the move will fail. If @a force is set
03279  *     such items will be removed.
03280  *
03281  *   - If the move succeeds, set @a *commit_info_p to @c NULL.
03282  *
03283  * The parent of @a dst_path must already exist.
03284  *
03285  * If @a src_paths has only one item, attempt to move it to @a dst_path.  If
03286  * @a move_as_child is TRUE and @a dst_path already exists, attempt to move the
03287  * item as a child of @a dst_path.  If @a move_as_child is FALSE and
03288  * @a dst_path already exists, fail with @c SVN_ERR_ENTRY_EXISTS if @a dst_path
03289  * is a working copy path and @c SVN_ERR_FS_ALREADY_EXISTS if @a dst_path is a
03290  * URL.
03291  *
03292  * If @a src_paths has multiple items, and @a move_as_child is TRUE, all
03293  * @a src_paths are moved as children of @a dst_path.  If any child of
03294  * @a dst_path already exists with the same name any item in @a src_paths,
03295  * fail with @c SVN_ERR_ENTRY_EXISTS if @a dst_path is a working copy path and
03296  * @c SVN_ERR_FS_ALREADY_EXISTS if @a dst_path is a URL.
03297  *
03298  * If @a src_paths has multiple items, and @a move_as_child is FALSE, fail
03299  * with @c SVN_ERR_CLIENT_MULTIPLE_SOURCES_DISALLOWED.
03300  *
03301  * If @a make_parents is TRUE, create any non-existent parent directories
03302  * also.
03303  *
03304  * If non-NULL, @a revprop_table is a hash table holding additional,
03305  * custom revision properties (<tt>const char *</tt> names mapped to
03306  * <tt>svn_string_t *</tt> values) to be set on the new revision in
03307  * the event that this is a committing operation.  This table cannot
03308  * contain any standard Subversion properties.
03309  *
03310  * @a ctx->log_msg_func3/@a ctx->log_msg_baton3 are a callback/baton combo that
03311  * this function can use to query for a commit log message when one is needed.
03312  *
03313  * If @a ctx->notify_func2 is non-NULL, then for each item moved, call
03314  * @a ctx->notify_func2 with the @a ctx->notify_baton2 twice, once to indicate
03315  * the deletion of the moved thing, and once to indicate the addition of
03316  * the new location of the thing.
03317  *
03318  * ### Is this really true?  What about svn_wc_notify_commit_replaced()? ###
03319  *
03320  * @since New in 1.5.
03321  */
03322 svn_error_t *
03323 svn_client_move5(svn_commit_info_t **commit_info_p,
03324                  apr_array_header_t *src_paths,
03325                  const char *dst_path,
03326                  svn_boolean_t force,
03327                  svn_boolean_t move_as_child,
03328                  svn_boolean_t make_parents,
03329                  const apr_hash_t *revprop_table,
03330                  svn_client_ctx_t *ctx,
03331                  apr_pool_t *pool);
03332 
03333 /**
03334  * Similar to svn_client_move5(), with only one @a src_path, @a
03335  * move_as_child set to @c FALSE, @a revprop_table passed as NULL, and
03336  * @a make_parents set to @c FALSE.
03337  *
03338  * @since New in 1.4.
03339  *
03340  * @deprecated Provided for backward compatibility with the 1.4 API.
03341  */
03342 SVN_DEPRECATED
03343 svn_error_t *
03344 svn_client_move4(svn_commit_info_t **commit_info_p,
03345                  const char *src_path,
03346                  const char *dst_path,
03347                  svn_boolean_t force,
03348                  svn_client_ctx_t *ctx,
03349                  apr_pool_t *pool);
03350 
03351 /**
03352  * Similar to svn_client_move4(), with the difference that if @a dst_path
03353  * already exists and is a directory, move the item into that directory,
03354  * keeping its name (the last component of @a src_path).
03355  *
03356  * @since New in 1.3.
03357  *
03358  * @deprecated Provided for backward compatibility with the 1.3 API.
03359  */
03360 SVN_DEPRECATED
03361 svn_error_t *
03362 svn_client_move3(svn_commit_info_t **commit_info_p,
03363                  const char *src_path,
03364                  const char *dst_path,
03365                  svn_boolean_t force,
03366                  svn_client_ctx_t *ctx,
03367                  apr_pool_t *pool);
03368 
03369 /**
03370  * Similar to svn_client_move3(), but uses @c svn_client_commit_info_t
03371  * for @a commit_info_p.
03372  *
03373  * @deprecated Provided for backward compatibility with the 1.2 API.
03374  *
03375  * @since New in 1.2.
03376  */
03377 SVN_DEPRECATED
03378 svn_error_t *
03379 svn_client_move2(svn_client_commit_info_t **commit_info_p,
03380                  const char *src_path,
03381                  const char *dst_path,
03382                  svn_boolean_t force,
03383                  svn_client_ctx_t *ctx,
03384                  apr_pool_t *pool);
03385 
03386 /**
03387  * Similar to svn_client_move2(), but an extra argument @a src_revision
03388  * must be passed.  This has no effect, but must be of kind
03389  * @c svn_opt_revision_unspecified or @c svn_opt_revision_head,
03390  * otherwise error @c SVN_ERR_UNSUPPORTED_FEATURE is returned.
03391  *
03392  * @deprecated Provided for backward compatibility with the 1.1 API.
03393  */
03394 SVN_DEPRECATED
03395 svn_error_t *
03396 svn_client_move(svn_client_commit_info_t **commit_info_p,
03397                 const char *src_path,
03398                 const svn_opt_revision_t *src_revision,
03399                 const char *dst_path,
03400                 svn_boolean_t force,
03401                 svn_client_ctx_t *ctx,
03402                 apr_pool_t *pool);
03403 
03404 /** @} */
03405 
03406 
03407 /** Properties
03408  *
03409  * Note that certain svn-controlled properties must always have their
03410  * values set and stored in UTF8 with LF line endings.  When
03411  * retrieving these properties, callers must convert the values back
03412  * to native locale and native line-endings before displaying them to
03413  * the user.  For help with this task, see
03414  * svn_prop_needs_translation(), svn_subst_translate_string(),  and
03415  * svn_subst_detranslate_string().
03416  *
03417  * @defgroup svn_client_prop_funcs Property functions
03418  * @{
03419  */
03420 
03421 
03422 /**
03423  * Set @a propname to @a propval on @a target.
03424  * A @a propval of @c NULL will delete the property.
03425  *
03426  * If @a depth is @c svn_depth_empty, set the property on @a target
03427  * only; if @c svn_depth_files, set it on @a target and its file
03428  * children (if any); if @c svn_depth_immediates, on @a target and all
03429  * of its immediate children (both files and directories); if
03430  * @c svn_depth_infinity, on @a target and everything beneath it.
03431  *
03432  * The @a target may only be an URL if @a base_revision_for_url is not
03433  * @c SVN_INVALID_REVNUM; in this case, the property will only be set
03434  * if it has not changed since revision @a base_revision_for_url.
03435  * @a base_revision_for_url must be @c SVN_INVALID_REVNUM if @a target
03436  * is not an URL.  @a depth deeper than @c svn_depth_empty is not
03437  * supported on URLs.  The authentication baton in @a ctx and @a
03438  * ctx->log_msg_func3/@a ctx->log_msg_baton3 will be used to
03439  * immediately attempt to commit the property change in the
03440  * repository.  If the commit succeeds, allocate (in @a pool) and
03441  * populate @a *commit_info_p.
03442  *
03443  * If @a propname is an svn-controlled property (i.e. prefixed with
03444  * @c SVN_PROP_PREFIX), then the caller is responsible for ensuring that
03445  * the value is UTF8-encoded and uses LF line-endings.
03446  *
03447  * If @a skip_checks is TRUE, do no validity checking.  But if @a
03448  * skip_checks is FALSE, and @a propname is not a valid property for @a
03449  * target, return an error, either @c SVN_ERR_ILLEGAL_TARGET (if the
03450  * property is not appropriate for @a target), or @c
03451  * SVN_ERR_BAD_MIME_TYPE (if @a propname is "svn:mime-type", but @a
03452  * propval is not a valid mime-type).
03453  *
03454  * @a changelists is an array of <tt>const char *</tt> changelist
03455  * names, used as a restrictive filter on items whose properties are
03456  * set; that is, don't set properties on any item unless it's a member
03457  * of one of those changelists.  If @a changelists is empty (or
03458  * altogether @c NULL), no changelist filtering occurs.
03459  *
03460  * If non-NULL, @a revprop_table is a hash table holding additional,
03461  * custom revision properties (<tt>const char *</tt> names mapped to
03462  * <tt>svn_string_t *</tt> values) to be set on the new revision in
03463  * the event that this is a committing operation.  This table cannot
03464  * contain any standard Subversion properties.
03465  *
03466  * If @a ctx->cancel_func is non-NULL, invoke it passing @a
03467  * ctx->cancel_baton at various places during the operation.
03468  *
03469  * Use @a pool for all memory allocation.
03470  *
03471  * @since New in 1.5.
03472  */
03473 svn_error_t *
03474 svn_client_propset3(svn_commit_info_t **commit_info_p,
03475                     const char *propname,
03476                     const svn_string_t *propval,
03477                     const char *target,
03478                     svn_depth_t depth,
03479                     svn_boolean_t skip_checks,
03480                     svn_revnum_t base_revision_for_url,
03481                     const apr_array_header_t *changelists,
03482                     const apr_hash_t *revprop_table,
03483                     svn_client_ctx_t *ctx,
03484                     apr_pool_t *pool);
03485 
03486 /**
03487  * Like svn_client_propset3(), but with @a base_revision_for_url
03488  * always @c SVN_INVALID_REVNUM; @a commit_info_p always @c NULL; @a
03489  * changelists always @c NULL; @a revprop_table always @c NULL; and @a
03490  * depth set according to @a recurse: if @a recurse is TRUE, @a depth
03491  * is @c svn_depth_infinity, else @c svn_depth_empty.
03492  *
03493  * @deprecated Provided for backward compatibility with the 1.4 API.
03494  */
03495 SVN_DEPRECATED
03496 svn_error_t *
03497 svn_client_propset2(const char *propname,
03498                     const svn_string_t *propval,
03499                     const char *target,
03500                     svn_boolean_t recurse,
03501                     svn_boolean_t skip_checks,
03502                     svn_client_ctx_t *ctx,
03503                     apr_pool_t *pool);
03504 
03505 /**
03506  * Like svn_client_propset2(), but with @a skip_checks always FALSE and a
03507  * newly created @a ctx.
03508  *
03509  * @deprecated Provided for backward compatibility with the 1.1 API.
03510  */
03511 SVN_DEPRECATED
03512 svn_error_t *
03513 svn_client_propset(const char *propname,
03514                    const svn_string_t *propval,
03515                    const char *target,
03516                    svn_boolean_t recurse,
03517                    apr_pool_t *pool);
03518 
03519 /** Set @a propname to @a propval on revision @a revision in the repository
03520  * represented by @a URL.  Use the authentication baton in @a ctx for
03521  * authentication, and @a pool for all memory allocation.  Return the actual
03522  * rev affected in @a *set_rev.  A @a propval of @c NULL will delete the
03523  * property.
03524  *
03525  * If @a original_propval is non-NULL, then just before setting the
03526  * new value, check that the old value matches @a original_propval;
03527  * if they do not match, return the error @c SVN_ERR_RA_OUT_OF_DATE.
03528  * This is to help clients support interactive editing of revprops:
03529  * without this check, the window during which the property may change
03530  * underneath the user is as wide as the amount of time the user
03531  * spends editing the property.  With this check, the window is
03532  * reduced to a small, constant amount of time right before we set the
03533  * new value.  (To check that an old value is still non-existent, set
03534  * @a original_propval->data to NULL, and @a original_propval->len is
03535  * ignored.)
03536  *
03537  * If @a force is TRUE, allow newlines in the author property.
03538  *
03539  * If @a propname is an svn-controlled property (i.e. prefixed with
03540  * @c SVN_PROP_PREFIX), then the caller is responsible for ensuring that
03541  * the value UTF8-encoded and uses LF line-endings.
03542  *
03543  * Note that unlike its cousin svn_client_propset3(), this routine
03544  * doesn't affect the working copy at all;  it's a pure network
03545  * operation that changes an *unversioned* property attached to a
03546  * revision.  This can be used to tweak log messages, dates, authors,
03547  * and the like.  Be careful:  it's a lossy operation.
03548 
03549  * @a ctx->notify_func2 and @a ctx->notify_baton2 are the notification
03550  * functions and baton which are called upon successful setting of the
03551  * property.
03552  *
03553  * Also note that unless the administrator creates a
03554  * pre-revprop-change hook in the repository, this feature will fail.
03555  *
03556  * @since New in 1.6.
03557  */
03558 svn_error_t *
03559 svn_client_revprop_set2(const char *propname,
03560                         const svn_string_t *propval,
03561                         const svn_string_t *original_propval,
03562                         const char *URL,
03563                         const svn_opt_revision_t *revision,
03564                         svn_revnum_t *set_rev,
03565                         svn_boolean_t force,
03566                         svn_client_ctx_t *ctx,
03567                         apr_pool_t *pool);
03568 
03569 /**
03570  * Similar to svn_client_revprop_set2(), but with @a original_propval
03571  * always @c NULL.
03572  *
03573  * @deprecated Provided for backward compatibility with the 1.0 API.
03574  */
03575 SVN_DEPRECATED
03576 svn_error_t *
03577 svn_client_revprop_set(const char *propname,
03578                        const svn_string_t *propval,
03579                        const char *URL,
03580                        const svn_opt_revision_t *revision,
03581                        svn_revnum_t *set_rev,
03582                        svn_boolean_t force,
03583                        svn_client_ctx_t *ctx,
03584                        apr_pool_t *pool);
03585 
03586 /**
03587  * Set @a *props to a hash table whose keys are `<tt>char *</tt>' paths,
03588  * prefixed by @a target (a working copy path or a URL), of items on
03589  * which property @a propname is set, and whose values are `@c svn_string_t
03590  * *' representing the property value for @a propname at that path.
03591  *
03592  * Allocate @a *props, its keys, and its values in @a pool.
03593  *
03594  * Don't store any path, not even @a target, if it does not have a
03595  * property named @a propname.
03596  *
03597  * If @a revision->kind is @c svn_opt_revision_unspecified, then: get
03598  * properties from the working copy if @a target is a working copy
03599  * path, or from the repository head if @a target is a URL.  Else get
03600  * the properties as of @a revision.  The actual node revision
03601  * selected is determined by the path as it exists in @a peg_revision.
03602  * If @a peg_revision->kind is @c svn_opt_revision_unspecified, then
03603  * it defaults to @c svn_opt_revision_head for URLs or @c
03604  * svn_opt_revision_working for WC targets.  Use the authentication
03605  * baton in @a ctx for authentication if contacting the repository.
03606  * If @a actual_revnum is not @c NULL, the actual revision number used
03607  * for the fetch is stored in @a *actual_revnum.
03608  *
03609  * If @a depth is @c svn_depth_empty, fetch the property from
03610  * @a target only; if @c svn_depth_files, fetch from @a target and its
03611  * file children (if any); if @c svn_depth_immediates, from @a target
03612  * and all of its immediate children (both files and directories); if
03613  * @c svn_depth_infinity, from @a target and everything beneath it.
03614  *
03615  * @a changelists is an array of <tt>const char *</tt> changelist
03616  * names, used as a restrictive filter on items whose properties are
03617  * set; that is, don't set properties on any item unless it's a member
03618  * of one of those changelists.  If @a changelists is empty (or
03619  * altogether @c NULL), no changelist filtering occurs.
03620  *
03621  * If error, don't touch @a *props, otherwise @a *props is a hash table
03622  * even if empty.
03623  *
03624  * @since New in 1.5.
03625  */
03626 svn_error_t *
03627 svn_client_propget3(apr_hash_t **props,
03628                     const char *propname,
03629                     const char *target,
03630                     const svn_opt_revision_t *peg_revision,
03631                     const svn_opt_revision_t *revision,
03632                     svn_revnum_t *actual_revnum,
03633                     svn_depth_t depth,
03634                     const apr_array_header_t *changelists,
03635                     svn_client_ctx_t *ctx,
03636                     apr_pool_t *pool);
03637 
03638 /**
03639  * Similar to svn_client_propget3(), except that @a actual_revnum and
03640  * @a changelists are always @c NULL, and @a depth is set according to
03641  * @a recurse: if @a recurse is TRUE, then @a depth is @c
03642  * svn_depth_infinity, else @c svn_depth_empty.
03643  *
03644  * @deprecated Provided for backward compatibility with the 1.2 API.
03645  */
03646 SVN_DEPRECATED
03647 svn_error_t *
03648 svn_client_propget2(apr_hash_t **props,
03649                     const char *propname,
03650                     const char *target,
03651                     const svn_opt_revision_t *peg_revision,
03652                     const svn_opt_revision_t *revision,
03653                     svn_boolean_t recurse,
03654                     svn_client_ctx_t *ctx,
03655                     apr_pool_t *pool);
03656 
03657 /**
03658  * Similar to svn_client_propget2(), except that @a peg_revision is
03659  * always the same as @a revision.
03660  *
03661  * @deprecated Provided for backward compatibility with the 1.1 API.
03662  */
03663 SVN_DEPRECATED
03664 svn_error_t *
03665 svn_client_propget(apr_hash_t **props,
03666                    const char *propname,
03667                    const char *target,
03668                    const svn_opt_revision_t *revision,
03669                    svn_boolean_t recurse,
03670                    svn_client_ctx_t *ctx,
03671                    apr_pool_t *pool);
03672 
03673 /** Set @a *propval to the value of @a propname on revision @a revision
03674  * in the repository represented by @a URL.  Use the authentication baton
03675  * in @a ctx for authentication, and @a pool for all memory allocation.
03676  * Return the actual rev queried in @a *set_rev.
03677  *
03678  * Note that unlike its cousin svn_client_propget(), this routine
03679  * doesn't affect the working copy at all; it's a pure network
03680  * operation that queries an *unversioned* property attached to a
03681  * revision.  This can query log messages, dates, authors, and the
03682  * like.
03683  */
03684 svn_error_t *
03685 svn_client_revprop_get(const char *propname,
03686                        svn_string_t **propval,
03687                        const char *URL,
03688                        const svn_opt_revision_t *revision,
03689                        svn_revnum_t *set_rev,
03690                        svn_client_ctx_t *ctx,
03691                        apr_pool_t *pool);
03692 
03693 /**
03694  * Invoke @a receiver with @a receiver_baton to return the regular properies
03695  * of @a target, a URL or working copy path.  @a receiver will be called
03696  * for each path encountered.
03697  *
03698  * If @a revision->kind is @c svn_opt_revision_unspecified, then get
03699  * properties from the working copy, if @a target is a working copy
03700  * path, or from the repository head if @a target is a URL.  Else get
03701  * the properties as of @a revision.  The actual node revision
03702  * selected is determined by the path as it exists in @a peg_revision.
03703  * If @a peg_revision->kind is @c svn_opt_revision_unspecified, then it
03704  * defaults to @c svn_opt_revision_head for URLs or @c
03705  * svn_opt_revision_working for WC targets.  Use the authentication
03706  * baton cached in @a ctx for authentication if contacting the
03707  * repository.
03708  *
03709  * If @a depth is @c svn_depth_empty, list only the properties of
03710  * @a target itself.  If @a depth is @c svn_depth_files, and
03711  * @a target is a directory, list the properties of @a target
03712  * and its file entries.  If @c svn_depth_immediates, list the properties
03713  * of its immediate file and directory entries.  If @c svn_depth_infinity,
03714  * list the properties of its file entries and recurse (with
03715  * @c svn_depth_infinity) on directory entries.  @c svn_depth_unknown is
03716  * equivalent to @c svn_depth_empty.  All other values produce undefined
03717  * results.
03718  *
03719  * @a changelists is an array of <tt>const char *</tt> changelist
03720  * names, used as a restrictive filter on items whose properties are
03721  * set; that is, don't set properties on any item unless it's a member
03722  * of one of those changelists.  If @a changelists is empty (or
03723  * altogether @c NULL), no changelist filtering occurs.
03724  *
03725  * If @a target is not found, return the error @c SVN_ERR_ENTRY_NOT_FOUND.
03726  *
03727  * @since New in 1.5.
03728  */
03729 svn_error_t *
03730 svn_client_proplist3(const char *target,
03731                      const svn_opt_revision_t *peg_revision,
03732                      const svn_opt_revision_t *revision,
03733                      svn_depth_t depth,
03734                      const apr_array_header_t *changelists,
03735                      svn_proplist_receiver_t receiver,
03736                      void *receiver_baton,
03737                      svn_client_ctx_t *ctx,
03738                      apr_pool_t *pool);
03739 
03740 /**
03741  * Similar to svn_client_proplist3(), except the properties are
03742  * returned as an array of @c svn_client_proplist_item_t * structures
03743  * instead of by invoking the receiver function, there's no support
03744  * for @a changelists filtering, and @a recurse is used instead of a
03745  * @c svn_depth_t parameter (FALSE corresponds to @c svn_depth_empty,
03746  * and TRUE to @c svn_depth_infinity).
03747  *
03748  * @since New in 1.2.
03749  *
03750  * @deprecated Provided for backward compatiblility with the 1.2 API.
03751  */
03752 SVN_DEPRECATED
03753 svn_error_t *
03754 svn_client_proplist2(apr_array_header_t **props,
03755                      const char *target,
03756                      const svn_opt_revision_t *peg_revision,
03757                      const svn_opt_revision_t *revision,
03758                      svn_boolean_t recurse,
03759                      svn_client_ctx_t *ctx,
03760                      apr_pool_t *pool);
03761 
03762 /**
03763  * Similar to svn_client_proplist2(), except that @a peg_revision is
03764  * always the same as @a revision.
03765  *
03766  * @deprecated Provided for backward compatibility with the 1.1 API.
03767  */
03768 SVN_DEPRECATED
03769 svn_error_t *
03770 svn_client_proplist(apr_array_header_t **props,
03771                     const char *target,
03772                     const svn_opt_revision_t *revision,
03773                     svn_boolean_t recurse,
03774                     svn_client_ctx_t *ctx,
03775                     apr_pool_t *pool);
03776 
03777 /** Set @a *props to a hash of the revision props attached to @a revision in
03778  * the repository represented by @a URL.  Use the authentication baton cached
03779  * in @a ctx for authentication, and @a pool for all memory allocation.
03780  * Return the actual rev queried in @a *set_rev.
03781  *
03782  * The allocated hash maps (<tt>const char *</tt>) property names to
03783  * (@c svn_string_t *) property values.
03784  *
03785  * Note that unlike its cousin svn_client_proplist(), this routine
03786  * doesn't read a working copy at all; it's a pure network operation
03787  * that reads *unversioned* properties attached to a revision.
03788  */
03789 svn_error_t *
03790 svn_client_revprop_list(apr_hash_t **props,
03791                         const char *URL,
03792                         const svn_opt_revision_t *revision,
03793                         svn_revnum_t *set_rev,
03794                         svn_client_ctx_t *ctx,
03795                         apr_pool_t *pool);
03796 /** @} */
03797 
03798 
03799 /**
03800  * @defgroup Export Export a tree from version control.
03801  *
03802  * @{
03803  */
03804 
03805 /**
03806  * Export the contents of either a subversion repository or a
03807  * subversion working copy into a 'clean' directory (meaning a
03808  * directory with no administrative directories).  If @a result_rev
03809  * is not @c NULL and the path being exported is a repository URL, set
03810  * @a *result_rev to the value of the revision actually exported (set
03811  * it to @c SVN_INVALID_REVNUM for local exports).
03812  *
03813  * @a from is either the path the working copy on disk, or a URL to the
03814  * repository you wish to export.
03815  *
03816  * @a to is the path to the directory where you wish to create the exported
03817  * tree.
03818  *
03819  * @a peg_revision is the revision where the path is first looked up
03820  * when exporting from a repository.  If @a peg_revision->kind is @c
03821  * svn_opt_revision_unspecified, then it defaults to @c svn_opt_revision_head
03822  * for URLs or @c svn_opt_revision_working for WC targets.
03823  *
03824  * @a revision is the revision that should be exported, which is only used
03825  * when exporting from a repository.
03826  *
03827  * @a peg_revision and @a revision must not be @c NULL.
03828  *
03829  * @a ctx->notify_func2 and @a ctx->notify_baton2 are the notification
03830  * functions and baton which are passed to svn_client_checkout() when
03831  * exporting from a repository.
03832  *
03833  * @a ctx is a context used for authentication in the repository case.
03834  *
03835  * @a overwrite if TRUE will cause the export to overwrite files or directories.
03836  *
03837  * If @a ignore_externals is set, don't process externals definitions
03838  * as part of this operation.
03839  *
03840  * @a native_eol allows you to override the standard eol marker on the platform
03841  * you are running on.  Can be either "LF", "CR" or "CRLF" or NULL.  If NULL
03842  * will use the standard eol marker.  Any other value will cause the
03843  * SVN_ERR_IO_UNKNOWN_EOL error to be returned.
03844  *
03845  * If @a depth is @c svn_depth_infinity, export fully recursively.
03846  * Else if it is @c svn_depth_immediates, export @a from and its immediate
03847  * children (if any), but with subdirectories empty and at
03848  * @c svn_depth_empty.  Else if @c svn_depth_files, export @a from and
03849  * its immediate file children (if any) only.  If @a depth is @c
03850  * svn_depth_empty, then export exactly @a from and none of its children.
03851  *
03852  * All allocations are done in @a pool.
03853  *
03854  * @since New in 1.5.
03855  */
03856 svn_error_t *
03857 svn_client_export4(svn_revnum_t *result_rev,
03858                    const char *from,
03859                    const char *to,
03860                    const svn_opt_revision_t *peg_revision,
03861                    const svn_opt_revision_t *revision,
03862                    svn_boolean_t overwrite,
03863                    svn_boolean_t ignore_externals,
03864                    svn_depth_t depth,
03865                    const char *native_eol,
03866                    svn_client_ctx_t *ctx,
03867                    apr_pool_t *pool);
03868 
03869 
03870 /**
03871  * Similar to svn_client_export4(), but with @a depth set according to
03872  * @a recurse: if @a recurse is TRUE, set @a depth to
03873  * @c svn_depth_infinity, if @a recurse is FALSE, set @a depth to
03874  * @c svn_depth_files.
03875  *
03876  * @deprecated Provided for backward compatibility with the 1.4 API.
03877  *
03878  * @since New in 1.2.
03879  */
03880 SVN_DEPRECATED
03881 svn_error_t *
03882 svn_client_export3(svn_revnum_t *result_rev,
03883                    const char *from,
03884                    const char *to,
03885                    const svn_opt_revision_t *peg_revision,
03886                    const svn_opt_revision_t *revision,
03887                    svn_boolean_t overwrite,
03888                    svn_boolean_t ignore_externals,
03889                    svn_boolean_t recurse,
03890                    const char *native_eol,
03891                    svn_client_ctx_t *ctx,
03892                    apr_pool_t *pool);
03893 
03894 
03895 /**
03896  * Similar to svn_client_export3(), but with @a peg_revision
03897  * always set to @c svn_opt_revision_unspecified, @a overwrite set to
03898  * the value of @a force, @a ignore_externals always FALSE, and
03899  * @a recurse always TRUE.
03900  *
03901  * @since New in 1.1.
03902  * @deprecated Provided for backward compatibility with the 1.1 API.
03903  */
03904 SVN_DEPRECATED
03905 svn_error_t *
03906 svn_client_export2(svn_revnum_t *result_rev,
03907                    const char *from,
03908                    const char *to,
03909                    svn_opt_revision_t *revision,
03910                    svn_boolean_t force,
03911                    const char *native_eol,
03912                    svn_client_ctx_t *ctx,
03913                    apr_pool_t *pool);
03914 
03915 
03916 /**
03917  * Similar to svn_client_export2(), but with @a native_eol always set
03918  * to NULL.
03919  *
03920  * @deprecated Provided for backward compatibility with the 1.0 API.
03921  */
03922 SVN_DEPRECATED
03923 svn_error_t *
03924 svn_client_export(svn_revnum_t *result_rev,
03925                   const char *from,
03926                   const char *to,
03927                   svn_opt_revision_t *revision,
03928                   svn_boolean_t force,
03929                   svn_client_ctx_t *ctx,
03930                   apr_pool_t *pool);
03931 
03932 /** @} */
03933 
03934 /**
03935  * @defgroup List List / ls
03936  *
03937  * @{
03938  */
03939 
03940 /** Invoked by svn_client_list2() for each @a path with its @a dirent and,
03941  * if @a path is locked, its @a lock.  @a abs_path is the filesystem path
03942  * to which @a path is relative.  @a baton is the baton passed to the
03943  * caller.  @a pool may be used for temporary allocations.
03944  *
03945  * @since New in 1.4.
03946  */
03947 typedef svn_error_t *(*svn_client_list_func_t)(void *baton,
03948                                                const char *path,
03949                                                const svn_dirent_t *dirent,
03950                                                const svn_lock_t *lock,
03951                                                const char *abs_path,
03952                                                apr_pool_t *pool);
03953 
03954 /**
03955  * Report the directory entry, and possibly children, for @a
03956  * path_or_url at @a revision.  The actual node revision selected is
03957  * determined by the path as it exists in @a peg_revision.  If @a
03958  * peg_revision->kind is @c svn_opt_revision_unspecified, then it defaults
03959  * to @c svn_opt_revision_head for URLs or @c svn_opt_revision_working
03960  * for WC targets.
03961  *
03962  * Report directory entries by invoking @a list_func/@a baton with @a path
03963  * relative to @a path_or_url.  The dirent for @a path_or_url is reported
03964  * using an empty @a path.  If @a path_or_url is a directory, also report
03965  * its children.  If @a path_or_url is non-existent, return
03966  * @c SVN_ERR_FS_NOT_FOUND.
03967  *
03968  * If @a fetch_locks is TRUE, include locks when reporting directory entries.
03969  *
03970  * Use @a pool for temporary allocations.
03971  *
03972  * Use authentication baton cached in @a ctx to authenticate against the
03973  * repository.
03974  *
03975  * If @a depth is @c svn_depth_empty, list just @a path_or_url itself.
03976  * If @a depth is @c svn_depth_files, list @a path_or_url and its file
03977  * entries.  If @c svn_depth_immediates, list its immediate file and
03978  * directory entries.  If @c svn_depth_infinity, list file entries and
03979  * recurse (with @c svn_depth_infinity) on directory entries.
03980  *
03981  * @a dirent_fields controls which fields in the @c svn_dirent_t's are
03982  * filled in.  To have them totally filled in use @c SVN_DIRENT_ALL,
03983  * otherwise simply bitwise OR together the combination of @c SVN_DIRENT_
03984  * fields you care about.
03985  *
03986  * @since New in 1.5.
03987  */
03988 svn_error_t *
03989 svn_client_list2(const char *path_or_url,
03990                  const svn_opt_revision_t *peg_revision,
03991                  const svn_opt_revision_t *revision,
03992                  svn_depth_t depth,
03993                  apr_uint32_t dirent_fields,
03994                  svn_boolean_t fetch_locks,
03995                  svn_client_list_func_t list_func,
03996                  void *baton,
03997                  svn_client_ctx_t *ctx,
03998                  apr_pool_t *pool);
03999 
04000 /**
04001  * Similar to svn_client_list2(), but with @a recurse instead of @a depth.
04002  * If @a recurse is TRUE, pass @c svn_depth_files for @a depth; else
04003  * pass @c svn_depth_infinity.
04004  *
04005  * @since New in 1.4.
04006  *
04007  * @deprecated Provided for backward compatibility with the 1.4 API.
04008  */
04009 SVN_DEPRECATED
04010 svn_error_t *
04011 svn_client_list(const char *path_or_url,
04012                 const svn_opt_revision_t *peg_revision,
04013                 const svn_opt_revision_t *revision,
04014                 svn_boolean_t recurse,
04015                 apr_uint32_t dirent_fields,
04016                 svn_boolean_t fetch_locks,
04017                 svn_client_list_func_t list_func,
04018                 void *baton,
04019                 svn_client_ctx_t *ctx,
04020                 apr_pool_t *pool);
04021 
04022 /**
04023  * Same as svn_client_list(), but always passes @c SVN_DIRENT_ALL for
04024  * the @a dirent_fields argument and returns all information in two
04025  * hash tables instead of invoking a callback.
04026  *
04027  * Set @a *dirents to a newly allocated hash of directory entries.
04028  * The @a dirents hash maps entry names (<tt>const char *</tt>) to
04029  * @c svn_dirent_t *'s.
04030  *
04031  * If @a locks is not @c NULL, set @a *locks to a hash table mapping
04032  * entry names (<tt>const char *</tt>) to @c svn_lock_t *'s.
04033  *
04034  * @since New in 1.3.
04035  *
04036  * @deprecated Provided for backward compatibility with the 1.3 API.
04037  * Use svn_client_list2() instead.
04038  */
04039 SVN_DEPRECATED
04040 svn_error_t *
04041 svn_client_ls3(apr_hash_t **dirents,
04042                apr_hash_t **locks,
04043                const char *path_or_url,
04044                const svn_opt_revision_t *peg_revision,
04045                const svn_opt_revision_t *revision,
04046                svn_boolean_t recurse,
04047                svn_client_ctx_t *ctx,
04048                apr_pool_t *pool);
04049 
04050 /**
04051  * Same as svn_client_ls3(), but without the ability to get locks.
04052  *
04053  * @since New in 1.2.
04054  *
04055  * @deprecated Provided for backward compatibility with the 1.2 API.
04056  * Use svn_client_list2() instead.
04057  */
04058 SVN_DEPRECATED
04059 svn_error_t *
04060 svn_client_ls2(apr_hash_t **dirents,
04061                const char *path_or_url,
04062                const svn_opt_revision_t *peg_revision,
04063                const svn_opt_revision_t *revision,
04064                svn_boolean_t recurse,
04065                svn_client_ctx_t *ctx,
04066                apr_pool_t *pool);
04067 
04068 /**
04069  * Similar to svn_client_ls2() except that @a peg_revision is always
04070  * the same as @a revision.
04071  *
04072  * @deprecated Provided for backward compatibility with the 1.1 API.
04073  * Use svn_client_list2() instead.
04074  */
04075 SVN_DEPRECATED
04076 svn_error_t *
04077 svn_client_ls(apr_hash_t **dirents,
04078               const char *path_or_url,
04079               svn_opt_revision_t *revision,
04080               svn_boolean_t recurse,
04081               svn_client_ctx_t *ctx,
04082               apr_pool_t *pool);
04083 
04084 
04085 /** @} */
04086 
04087 /**
04088  * @defgroup Cat View the contents of a file in the repository.
04089  *
04090  * @{
04091  */
04092 
04093 /**
04094  * Output the content of file identified by @a path_or_url and @a
04095  * revision to the stream @a out.  The actual node revision selected
04096  * is determined by the path as it exists in @a peg_revision.  If @a
04097  * peg_revision->kind is @c svn_opt_revision_unspecified, then it defaults
04098  * to @c svn_opt_revision_head for URLs or @c svn_opt_revision_working
04099  * for WC targets.
04100  *
04101  * If @a path_or_url is not a local path, then if @a revision is of
04102  * kind @c svn_opt_revision_previous (or some other kind that requires
04103  * a local path), an error will be returned, because the desired
04104  * revision cannot be determined.
04105  *
04106  * Use the authentication baton cached in @a ctx to authenticate against the
04107  * repository.
04108  *
04109  * Perform all allocations from @a pool.
04110  *
04111  * ### @todo Add an expansion/translation flag?
04112  *
04113  * @since New in 1.2.
04114  */
04115 svn_error_t *
04116 svn_client_cat2(svn_stream_t *out,
04117                 const char *path_or_url,
04118                 const svn_opt_revision_t *peg_revision,
04119                 const svn_opt_revision_t *revision,
04120                 svn_client_ctx_t *ctx,
04121                 apr_pool_t *pool);
04122 
04123 
04124 /**
04125  * Similar to svn_client_cat2() except that the peg revision is always
04126  * the same as @a revision.
04127  *
04128  * @deprecated Provided for backward compatibility with the 1.1 API.
04129  */
04130 SVN_DEPRECATED
04131 svn_error_t *
04132 svn_client_cat(svn_stream_t *out,
04133                const char *path_or_url,
04134                const svn_opt_revision_t *revision,
04135                svn_client_ctx_t *ctx,
04136                apr_pool_t *pool);
04137 
04138 /** @} end group: cat */
04139 
04140 
04141 
04142 /** Changelist commands
04143  *
04144  * @defgroup svn_client_changelist_funcs Client Changelist Functions
04145  * @{
04146  */
04147 
04148 /** Implementation note:
04149  *
04150  *  For now, changelists are implemented by scattering the
04151  *  associations across multiple .svn/entries files in a working copy.
04152  *  However, this client API was written so that we have the option of
04153  *  changing the underlying implementation -- we may someday want to
04154  *  store changelist definitions in a centralized database.
04155  */
04156 
04157 /**
04158  * Add each path in @a paths (recursing to @a depth as necessary) to
04159  * @a changelist.  If a path is already a member of another
04160  * changelist, then remove it from the other changelist and add it to
04161  * @a changelist.  (For now, a path cannot belong to two changelists
04162  * at once.)
04163  *
04164  * @a changelists is an array of <tt>const char *</tt> changelist
04165  * names, used as a restrictive filter on items whose changelist
04166  * assignments are adjusted; that is, don't tweak the changeset of any
04167  * item unless it's currently a member of one of those changelists.
04168  * If @a changelists is empty (or altogether @c NULL), no changelist
04169  * filtering occurs.
04170  *
04171  * @note This metadata is purely a client-side "bookkeeping"
04172  * convenience, and is entirely managed by the working copy.
04173  *
04174  * @since New in 1.5.
04175  */
04176 svn_error_t *
04177 svn_client_add_to_changelist(const apr_array_header_t *paths,
04178                              const char *changelist,
04179                              svn_depth_t depth,
04180                              const apr_array_header_t *changelists,
04181                              svn_client_ctx_t *ctx,
04182                              apr_pool_t *pool);
04183 
04184 /**
04185  * Remove each path in @a paths (recursing to @a depth as necessary)
04186  * from changelists to which they are currently assigned.
04187  *
04188  * @a changelists is an array of <tt>const char *</tt> changelist
04189  * names, used as a restrictive filter on items whose changelist
04190  * assignments are removed; that is, don't remove from a changeset any
04191  * item unless it's currently a member of one of those changelists.
04192  * If @a changelists is empty (or altogether @c NULL), all changelist
04193  * assignments in and under each path in @a paths (to @a depth) will
04194  * be removed.
04195  *
04196  * @note This metadata is purely a client-side "bookkeeping"
04197  * convenience, and is entirely managed by the working copy.
04198  *
04199  * @since New in 1.5.
04200  */
04201 svn_error_t *
04202 svn_client_remove_from_changelists(const apr_array_header_t *paths,
04203                                    svn_depth_t depth,
04204                                    const apr_array_header_t *changelists,
04205                                    svn_client_ctx_t *ctx,
04206                                    apr_pool_t *pool);
04207 
04208 /**
04209  * The callback type used by svn_client_get_changelists().
04210  *
04211  * On each invocation, @a path is a newly discovered member of the
04212  * changelist, and @a baton is a private function closure.
04213  *
04214  * @since New in 1.5.
04215  */
04216 typedef svn_error_t *(*svn_changelist_receiver_t) (void *baton,
04217                                                    const char *path,
04218                                                    const char *changelist,
04219                                                    apr_pool_t *pool);
04220 
04221 /**
04222  * Beginning at @a path, crawl to @a depth to discover every path in
04223  * or under @a path which belongs to one of the changelists in @a
04224  * changelists (an array of <tt>const char *</tt> changelist names).
04225  * If @a changelists is @c null, discover paths with any changelist.
04226  * Call @a callback_func (with @a callback_baton) each time a
04227  * changelist-having path is discovered.
04228  *
04229  * If @a ctx->cancel_func is not @c null, invoke it passing @a
04230  * ctx->cancel_baton during the recursive walk.
04231  *
04232  * @since New in 1.5.
04233  */
04234 svn_error_t *
04235 svn_client_get_changelists(const char *path,
04236                            const apr_array_header_t *changelists,
04237                            svn_depth_t depth,
04238                            svn_changelist_receiver_t callback_func,
04239                            void *callback_baton,
04240                            svn_client_ctx_t *ctx,
04241                            apr_pool_t *pool);
04242 
04243 /** @} */
04244 
04245 
04246 
04247 /** Locking commands
04248  *
04249  * @defgroup svn_client_locking_funcs Client Locking Functions
04250  * @{
04251  */
04252 
04253 /**
04254  * Lock @a targets in the repository.  @a targets is an array of
04255  * <tt>const char *</tt> paths - either all working copy paths or URLs.  All
04256  * @a targets must be in the same repository.
04257  *
04258  * If a target is already locked in the repository, no lock will be
04259  * acquired unless @a steal_lock is TRUE, in which case the locks are
04260  * stolen.  @a comment, if non-NULL, is an xml-escapable description
04261  * stored with each lock in the repository.  Each acquired lock will
04262  * be stored in the working copy if the targets are WC paths.
04263  *
04264  * For each target @a ctx->notify_func2/notify_baton2 will be used to indicate
04265  * whether it was locked.  An action of @c svn_wc_notify_state_locked
04266  * means that the path was locked.  If the path was not locked because
04267  * it was out of date or there was already a lock in the repository,
04268  * the notification function will be called with @c
04269  * svn_wc_notify_failed_lock, and the error passed in the notification
04270  * structure.
04271  *
04272  * Use @a pool for temporary allocations.
04273  *
04274  * @since New in 1.2.
04275  */
04276 svn_error_t *
04277 svn_client_lock(const apr_array_header_t *targets,
04278                 const char *comment,
04279                 svn_boolean_t steal_lock,
04280                 svn_client_ctx_t *ctx,
04281                 apr_pool_t *pool);
04282 
04283 /**
04284  * Unlock @a targets in the repository.  @a targets is an array of
04285  * <tt>const char *</tt> paths - either all working copy paths or all URLs.
04286  * All @a targets must be in the same repository.
04287  *
04288  * If the targets are WC paths, and @a break_lock is FALSE, the working
04289  * copy must contain a locks for each target.
04290  * If this is not the case, or the working copy lock doesn't match the
04291  * lock token in the repository, an error will be signaled.
04292  *
04293  * If the targets are URLs, the locks may be broken even if @a break_lock
04294  * is FALSE, but only if the lock owner is the same as the
04295  * authenticated user.
04296  *
04297  * If @a break_lock is TRUE, the locks will be broken in the
04298  * repository.  In both cases, the locks, if any, will be removed from
04299  * the working copy if the targets are WC paths.
04300  *
04301  * The notification functions in @a ctx will be called for each
04302  * target.  If the target was successfully unlocked, @c
04303  * svn_wc_notify_unlocked will be used.  Else, if the error is
04304  * directly related to unlocking the path (see @c
04305  * SVN_ERR_IS_UNLOCK_ERROR), @c svn_wc_notify_failed_unlock will be
04306  * used and the error will be passed in the notification structure.
04307 
04308  * Use @a pool for temporary allocations.
04309  *
04310  * @since New in 1.2.
04311  */
04312 svn_error_t *
04313 svn_client_unlock(const apr_array_header_t *targets,
04314                   svn_boolean_t break_lock,
04315                   svn_client_ctx_t *ctx,
04316                   apr_pool_t *pool);
04317 
04318 /** @} */
04319 
04320 /**
04321  * @defgroup Info Show repository information about a working copy.
04322  *
04323  * @{
04324  */
04325 
04326 /** The size of the file is unknown.
04327  * Used as value in fields of type @c apr_size_t.
04328  *
04329  * @since New in 1.5
04330  */
04331 #define SVN_INFO_SIZE_UNKNOWN ((apr_size_t) -1)
04332 
04333 /**
04334  * A structure which describes various system-generated metadata about
04335  * a working-copy path or URL.
04336  *
04337  * @note Fields may be added to the end of this structure in future
04338  * versions.  Therefore, users shouldn't allocate structures of this
04339  * type, to preserve binary compatibility.
04340  *
04341  * @since New in 1.2.
04342  */
04343 typedef struct svn_info_t
04344 {
04345   /** Where the item lives in the repository. */
04346   const char *URL;
04347 
04348   /** The revision of the object.  If path_or_url is a working-copy
04349    * path, then this is its current working revnum.  If path_or_url
04350    * is a URL, then this is the repos revision that path_or_url lives in. */
04351   svn_revnum_t rev;
04352 
04353   /** The node's kind. */
04354   svn_node_kind_t kind;
04355 
04356   /** The root URL of the repository. */
04357   const char *repos_root_URL;
04358 
04359   /** The repository's UUID. */
04360   const char *repos_UUID;
04361 
04362   /** The last revision in which this object changed. */
04363   svn_revnum_t last_changed_rev;
04364 
04365   /** The date of the last_changed_rev. */
04366   apr_time_t last_changed_date;
04367 
04368   /** The author of the last_changed_rev. */
04369   const char *last_changed_author;
04370 
04371   /** An exclusive lock, if present.  Could be either local or remote. */
04372   svn_lock_t *lock;
04373 
04374   /** Whether or not to ignore the next 10 wc-specific fields. */
04375   svn_boolean_t has_wc_info;
04376 
04377   /**
04378    * @name Working-copy path fields
04379    * These things only apply to a working-copy path.
04380    * See svn_wc_entry_t for explanations.
04381    * @{
04382    */
04383   svn_wc_schedule_t schedule;
04384   const char *copyfrom_url;
04385   svn_revnum_t copyfrom_rev;
04386   apr_time_t text_time;
04387   apr_time_t prop_time;  /* will always be 0 for svn 1.4 and later */
04388   const char *checksum;
04389   const char *conflict_old;
04390   const char *conflict_new;
04391   const char *conflict_wrk;
04392   const char *prejfile;
04393   /** @since New in 1.5. */
04394   const char *changelist;
04395   /** @since New in 1.5. */
04396   svn_depth_t depth;
04397 
04398   /**
04399    * Similar to working_size64, but will be @c SVN_INFO_SIZE_UNKNOWN when
04400    * its value would overflow apr_size_t (so when size >= 4 GB - 1 byte).
04401    *
04402    * @deprecated Provided for backward compatibility with the 1.5 API.
04403    */
04404   apr_size_t working_size;
04405 
04406   /** @} */
04407 
04408   /**
04409    * Similar to size64, but size will be @c SVN_INFO_SIZE_UNKNOWN when
04410    * its value would overflow apr_size_t (so when size >= 4 GB - 1 byte).
04411    *
04412    * @deprecated Provided for backward compatibility with the 1.5 API.
04413    */
04414   apr_size_t size;
04415 
04416   /**
04417    * The size of the file in the repository (untranslated,
04418    * e.g. without adjustment of line endings and keyword
04419    * expansion). Only applicable for file -- not directory -- URLs.
04420    * For working copy paths, size64 will be @c SVN_INVALID_FILESIZE.
04421    * @since New in 1.6.
04422    */
04423   svn_filesize_t size64;
04424 
04425   /**
04426    * The size of the file after being translated into its local
04427    * representation, or @c SVN_INVALID_FILESIZE if unknown.
04428    * Not applicable for directories.
04429    * @since New in 1.6.
04430    * @name Working-copy path fields
04431    * @{
04432    */
04433   svn_filesize_t working_size64;
04434 
04435   /**
04436    * Info on any tree conflict of which this node is a victim. Otherwise NULL.
04437    * @since New in 1.6.
04438    */
04439   svn_wc_conflict_description_t *tree_conflict;
04440 
04441   /** @} */
04442 
04443 } svn_info_t;
04444 
04445 
04446 /**
04447  * The callback invoked by svn_client_info2().  Each invocation
04448  * describes @a path with the information present in @a info.  Note
04449  * that any fields within @a info may be NULL if information is
04450  * unavailable.  Use @a pool for all temporary allocation.
04451  *
04452  * @since New in 1.2.
04453  */
04454 typedef svn_error_t *(*svn_info_receiver_t)
04455   (void *baton,
04456    const char *path,
04457    const svn_info_t *info,
04458    apr_pool_t *pool);
04459 
04460 /**
04461  * Return a duplicate of @a info, allocated in @a pool. No part of the new
04462  * structure will be shared with @a info.
04463  *
04464  * @since New in 1.3.
04465  */
04466 svn_info_t *
04467 svn_info_dup(const svn_info_t *info,
04468              apr_pool_t *pool);
04469 
04470 /**
04471  * Invoke @a receiver with @a receiver_baton to return information
04472  * about @a path_or_url in @a revision.  The information returned is
04473  * system-generated metadata, not the sort of "property" metadata
04474  * created by users.  See @c svn_info_t.
04475  *
04476  * If both revision arguments are either @c
04477  * svn_opt_revision_unspecified or NULL, then information will be
04478  * pulled solely from the working copy; no network connections will be
04479  * made.
04480  *
04481  * Otherwise, information will be pulled from a repository.  The
04482  * actual node revision selected is determined by the @a path_or_url
04483  * as it exists in @a peg_revision.  If @a peg_revision->kind is @c
04484  * svn_opt_revision_unspecified, then it defaults to @c
04485  * svn_opt_revision_head for URLs or @c svn_opt_revision_working for
04486  * WC targets.
04487  *
04488  * If @a path_or_url is not a local path, then if @a revision is of
04489  * kind @c svn_opt_revision_previous (or some other kind that requires
04490  * a local path), an error will be returned, because the desired
04491  * revision cannot be determined.
04492  *
04493  * Use the authentication baton cached in @a ctx to authenticate
04494  * against the repository.
04495  *
04496  * If @a path_or_url is a file, just invoke @a receiver on it.  If it
04497  * is a directory, then descend according to @a depth.  If @a depth is
04498  * @c svn_depth_empty, invoke @a receiver on @a path_or_url and
04499  * nothing else; if @c svn_depth_files, on @a path_or_url and its
04500  * immediate file children; if @c svn_depth_immediates, the preceding
04501  * plus on each immediate subdirectory; if @c svn_depth_infinity, then
04502  * recurse fully, invoking @a receiver on @a path_or_url and
04503  * everything beneath it.
04504  *
04505  * @a changelists is an array of <tt>const char *</tt> changelist
04506  * names, used as a restrictive filter on items whose info is
04507  * reported; that is, don't report info about any item unless
04508  * it's a member of one of those changelists.  If @a changelists is
04509  * empty (or altogether @c NULL), no changelist filtering occurs.
04510  *
04511  * @since New in 1.5.
04512  */
04513 svn_error_t *
04514 svn_client_info2(const char *path_or_url,
04515                  const svn_opt_revision_t *peg_revision,
04516                  const svn_opt_revision_t *revision,
04517                  svn_info_receiver_t receiver,
04518                  void *receiver_baton,
04519                  svn_depth_t depth,
04520                  const apr_array_header_t *changelists,
04521                  svn_client_ctx_t *ctx,
04522                  apr_pool_t *pool);
04523 
04524 /**
04525  * Similar to svn_client_info2() but with @a changelists passed as @c
04526  * NULL, and @a depth set according to @a recurse: if @a recurse is
04527  * TRUE, @a depth is @c svn_depth_infinity, else @c svn_depth_empty.
04528  *
04529  * @deprecated Provided for backward compatibility with the 1.2 API.
04530  */
04531 SVN_DEPRECATED
04532 svn_error_t *
04533 svn_client_info(const char *path_or_url,
04534                 const svn_opt_revision_t *peg_revision,
04535                 const svn_opt_revision_t *revision,
04536                 svn_info_receiver_t receiver,
04537                 void *receiver_baton,
04538                 svn_boolean_t recurse,
04539                 svn_client_ctx_t *ctx,
04540                 apr_pool_t *pool);
04541 
04542 /** @} */
04543 
04544 /** @} end group: Client working copy management */
04545 
04546 /**
04547  *
04548  * @defgroup clnt_sessions Client session related functions
04549  *
04550  * @{
04551  *
04552  */
04553 
04554 
04555 /* Converting paths to URLs. */
04556 
04557 /** Set @a *url to the URL for @a path_or_url.
04558  *
04559  * If @a path_or_url is already a URL, set @a *url to @a path_or_url.
04560  *
04561  * If @a path_or_url is a versioned item, set @a *url to @a
04562  * path_or_url's entry URL.  If @a path_or_url is unversioned (has
04563  * no entry), set @a *url to NULL.
04564  */
04565 svn_error_t *
04566 svn_client_url_from_path(const char **url,
04567                          const char *path_or_url,
04568                          apr_pool_t *pool);
04569 
04570 
04571 /** Set @a *url to the repository root URL of the repository in which
04572  * @a path_or_url is versioned (or scheduled to be versioned),
04573  * allocated in @a pool.  @a ctx is required for possible repository
04574  * authentication.
04575  *
04576  * @since New in 1.5.
04577  */
04578 svn_error_t *
04579 svn_client_root_url_from_path(const char **url,
04580                               const char *path_or_url,
04581                               svn_client_ctx_t *ctx,
04582                               apr_pool_t *pool);
04583 
04584 
04585 
04586 /* Fetching repository UUIDs. */
04587 
04588 /** Get repository @a uuid for @a url.
04589  *
04590  * Use a @a pool to open a temporary RA session to @a url, discover the
04591  * repository uuid, and free the session.  Return the uuid in @a uuid,
04592  * allocated in @a pool.  @a ctx is required for possible repository
04593  * authentication.
04594  */
04595 svn_error_t *
04596 svn_client_uuid_from_url(const char **uuid,
04597                          const char *url,
04598                          svn_client_ctx_t *ctx,
04599                          apr_pool_t *pool);
04600 
04601 
04602 /** Return the repository @a uuid for working-copy @a path, allocated
04603  * in @a pool.  Use @a adm_access to retrieve the uuid from @a path's
04604  * entry; if not present in the entry, then look in its parents. If not
04605  * present in the workingcopy call svn_client_uuid_from_url() to
04606  * retrieve, using the entry's URL.  @a ctx is required for possible
04607  * repository authentication.
04608  *
04609  * @note The only reason this function falls back on
04610  * svn_client_uuid_from_url() is for compatibility purposes.  Old and
04611  * detached working copies may not have uuids in the entries file.
04612  */
04613 svn_error_t *
04614 svn_client_uuid_from_path(const char **uuid,
04615                           const char *path,
04616                           svn_wc_adm_access_t *adm_access,
04617                           svn_client_ctx_t *ctx,
04618                           apr_pool_t *pool);
04619 
04620 
04621 /* Opening RA sessions. */
04622 
04623 /** Open an RA session rooted at @a url, and return it in @a *session.
04624  *
04625  * Use the authentication baton stored in @a ctx for authentication.
04626  * @a *session is allocated in @a pool.
04627  *
04628  * @since New in 1.3.
04629  *
04630  * @note This function is similar to svn_ra_open3(), but the caller avoids
04631  * having to providing its own callback functions.
04632  */
04633 svn_error_t *
04634 svn_client_open_ra_session(svn_ra_session_t **session,
04635                            const char *url,
04636                            svn_client_ctx_t *ctx,
04637                            apr_pool_t *pool);
04638 
04639 
04640 /** @} end group: Client session related functions */
04641 
04642 /** @} */
04643 
04644 #ifdef __cplusplus
04645 }
04646 #endif /* __cplusplus */
04647 
04648 #endif  /* SVN_CLIENT_H */
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines