svn_client.h

Go to the documentation of this file.
00001 /**
00002  * @copyright
00003  * ====================================================================
00004  *    Licensed to the Apache Software Foundation (ASF) under one
00005  *    or more contributor license agreements.  See the NOTICE file
00006  *    distributed with this work for additional information
00007  *    regarding copyright ownership.  The ASF licenses this file
00008  *    to you under the Apache License, Version 2.0 (the
00009  *    "License"); you may not use this file except in compliance
00010  *    with the License.  You may obtain a copy of the License at
00011  *
00012  *      http://www.apache.org/licenses/LICENSE-2.0
00013  *
00014  *    Unless required by applicable law or agreed to in writing,
00015  *    software distributed under the License is distributed on an
00016  *    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
00017  *    KIND, either express or implied.  See the License for the
00018  *    specific language governing permissions and limitations
00019  *    under the License.
00020  * ====================================================================
00021  * @endcopyright
00022  *
00023  * @file svn_client.h
00024  * @brief Subversion's client library
00025  *
00026  * Requires:  The working copy library and repository access library.
00027  * Provides:  Broad wrappers around working copy library functionality.
00028  * Used By:   Client programs.
00029  */
00030 
00031 #ifndef SVN_CLIENT_H
00032 #define SVN_CLIENT_H
00033 
00034 #include <apr.h>
00035 #include <apr_pools.h>
00036 #include <apr_hash.h>
00037 #include <apr_tables.h>
00038 #include <apr_getopt.h>
00039 #include <apr_file_io.h>
00040 #include <apr_time.h>
00041 
00042 #include "svn_types.h"
00043 #include "svn_string.h"
00044 #include "svn_wc.h"
00045 #include "svn_opt.h"
00046 #include "svn_ra.h"
00047 #include "svn_diff.h"
00048 #include "svn_auth.h"
00049 
00050 #ifdef __cplusplus
00051 extern "C" {
00052 #endif /* __cplusplus */
00053 
00054 
00055 
00056 /**
00057  * Get libsvn_client version information.
00058  *
00059  * @since New in 1.1.
00060  */
00061 const svn_version_t *
00062 svn_client_version(void);
00063 
00064 /** Client supporting functions
00065  *
00066  * @defgroup clnt_support Client supporting subsystem
00067  *
00068  * @{
00069  */
00070 
00071 
00072 /*** Authentication stuff ***/
00073 
00074 /**  The new authentication system allows the RA layer to "pull"
00075  *   information as needed from libsvn_client.
00076  *
00077  *   @deprecated Replaced by the svn_auth_* functions.
00078  *   @see auth_fns
00079  *
00080  *   @defgroup auth_fns_depr (deprecated) AuthZ client subsystem
00081  *
00082  *   @{
00083  */
00084 
00085 /** Create and return @a *provider, an authentication provider of type
00086  * svn_auth_cred_simple_t that gets information by prompting the user
00087  * with @a prompt_func and @a prompt_baton.  Allocate @a *provider in
00088  * @a pool.
00089  *
00090  * If both #SVN_AUTH_PARAM_DEFAULT_USERNAME and
00091  * #SVN_AUTH_PARAM_DEFAULT_PASSWORD are defined as runtime
00092  * parameters in the @c auth_baton, then @a *provider will return the
00093  * default arguments when svn_auth_first_credentials() is called.  If
00094  * svn_auth_first_credentials() fails, then @a *provider will
00095  * re-prompt @a retry_limit times (via svn_auth_next_credentials()).
00096  * For infinite retries, set @a retry_limit to value less than 0.
00097  *
00098  * @deprecated Provided for backward compatibility with the 1.3 API.
00099  * Use svn_auth_get_simple_prompt_provider() instead.
00100  */
00101 SVN_DEPRECATED
00102 void
00103 svn_client_get_simple_prompt_provider(
00104   svn_auth_provider_object_t **provider,
00105   svn_auth_simple_prompt_func_t prompt_func,
00106   void *prompt_baton,
00107   int retry_limit,
00108   apr_pool_t *pool);
00109 
00110 
00111 /** Create and return @a *provider, an authentication provider of type
00112  * #svn_auth_cred_username_t that gets information by prompting the
00113  * user with @a prompt_func and @a prompt_baton.  Allocate @a *provider
00114  * in @a pool.
00115  *
00116  * If #SVN_AUTH_PARAM_DEFAULT_USERNAME is defined as a runtime
00117  * parameter in the @c auth_baton, then @a *provider will return the
00118  * default argument when svn_auth_first_credentials() is called.  If
00119  * svn_auth_first_credentials() fails, then @a *provider will
00120  * re-prompt @a retry_limit times (via svn_auth_next_credentials()).
00121  * For infinite retries, set @a retry_limit to value less than 0.
00122  *
00123  * @deprecated Provided for backward compatibility with the 1.3 API.
00124  * Use svn_auth_get_username_prompt_provider() instead.
00125  */
00126 SVN_DEPRECATED
00127 void
00128 svn_client_get_username_prompt_provider(
00129   svn_auth_provider_object_t **provider,
00130   svn_auth_username_prompt_func_t prompt_func,
00131   void *prompt_baton,
00132   int retry_limit,
00133   apr_pool_t *pool);
00134 
00135 
00136 /** Create and return @a *provider, an authentication provider of type
00137  * #svn_auth_cred_simple_t that gets/sets information from the user's
00138  * ~/.subversion configuration directory.  Allocate @a *provider in
00139  * @a pool.
00140  *
00141  * If a default username or password is available, @a *provider will
00142  * honor them as well, and return them when
00143  * svn_auth_first_credentials() is called.  (see
00144  * #SVN_AUTH_PARAM_DEFAULT_USERNAME and #SVN_AUTH_PARAM_DEFAULT_PASSWORD).
00145  *
00146  * @deprecated Provided for backward compatibility with the 1.3 API.
00147  * Use svn_auth_get_simple_provider2() instead.
00148  */
00149 SVN_DEPRECATED
00150 void
00151 svn_client_get_simple_provider(svn_auth_provider_object_t **provider,
00152                                apr_pool_t *pool);
00153 
00154 
00155 #if (defined(WIN32) && !defined(__MINGW32__)) || defined(DOXYGEN) || defined(CTYPESGEN) || defined(SWIG)
00156 /**
00157  * Create and return @a *provider, an authentication provider of type
00158  * #svn_auth_cred_simple_t that gets/sets information from the user's
00159  * ~/.subversion configuration directory.  Allocate @a *provider in
00160  * @a pool.
00161  *
00162  * This is like svn_client_get_simple_provider(), except that, when
00163  * running on Window 2000 or newer (or any other Windows version that
00164  * includes the CryptoAPI), the provider encrypts the password before
00165  * storing it to disk. On earlier versions of Windows, the provider
00166  * does nothing.
00167  *
00168  * @since New in 1.2.
00169  * @note This function is only available on Windows.
00170  *
00171  * @note An administrative password reset may invalidate the account's
00172  * secret key. This function will detect that situation and behave as
00173  * if the password were not cached at all.
00174  *
00175  * @deprecated Provided for backward compatibility with the 1.3 API.
00176  * Use svn_auth_get_windows_simple_provider() instead.
00177  */
00178 SVN_DEPRECATED
00179 void
00180 svn_client_get_windows_simple_provider(svn_auth_provider_object_t **provider,
00181                                        apr_pool_t *pool);
00182 #endif /* WIN32 && !__MINGW32__ || DOXYGEN || CTYPESGEN || SWIG */
00183 
00184 /** Create and return @a *provider, an authentication provider of type
00185  * #svn_auth_cred_username_t that gets/sets information from a user's
00186  * ~/.subversion configuration directory.  Allocate @a *provider in
00187  * @a pool.
00188  *
00189  * If a default username is available, @a *provider will honor it,
00190  * and return it when svn_auth_first_credentials() is called.  (see
00191  * #SVN_AUTH_PARAM_DEFAULT_USERNAME).
00192  *
00193  * @deprecated Provided for backward compatibility with the 1.3 API.
00194  * Use svn_auth_get_username_provider() instead.
00195  */
00196 SVN_DEPRECATED
00197 void
00198 svn_client_get_username_provider(svn_auth_provider_object_t **provider,
00199                                  apr_pool_t *pool);
00200 
00201 
00202 /** Create and return @a *provider, an authentication provider of type
00203  * #svn_auth_cred_ssl_server_trust_t, allocated in @a pool.
00204  *
00205  * @a *provider retrieves its credentials from the configuration
00206  * mechanism.  The returned credential is used to override SSL
00207  * security on an error.
00208  *
00209  * @deprecated Provided for backward compatibility with the 1.3 API.
00210  * Use svn_auth_get_ssl_server_trust_file_provider() instead.
00211  */
00212 SVN_DEPRECATED
00213 void
00214 svn_client_get_ssl_server_trust_file_provider(
00215   svn_auth_provider_object_t **provider,
00216   apr_pool_t *pool);
00217 
00218 
00219 /** Create and return @a *provider, an authentication provider of type
00220  * #svn_auth_cred_ssl_client_cert_t, allocated in @a pool.
00221  *
00222  * @a *provider retrieves its credentials from the configuration
00223  * mechanism.  The returned credential is used to load the appropriate
00224  * client certificate for authentication when requested by a server.
00225  *
00226  * @deprecated Provided for backward compatibility with the 1.3 API.
00227  * Use svn_auth_get_ssl_client_cert_file_provider() instead.
00228  */
00229 SVN_DEPRECATED
00230 void
00231 svn_client_get_ssl_client_cert_file_provider(
00232   svn_auth_provider_object_t **provider,
00233   apr_pool_t *pool);
00234 
00235 
00236 /** Create and return @a *provider, an authentication provider of type
00237  * #svn_auth_cred_ssl_client_cert_pw_t, allocated in @a pool.
00238  *
00239  * @a *provider retrieves its credentials from the configuration
00240  * mechanism.  The returned credential is used when a loaded client
00241  * certificate is protected by a passphrase.
00242  *
00243  * @deprecated Provided for backward compatibility with the 1.3 API.
00244  * Use svn_auth_get_ssl_client_cert_pw_file_provider2() instead.
00245  */
00246 SVN_DEPRECATED
00247 void
00248 svn_client_get_ssl_client_cert_pw_file_provider(
00249   svn_auth_provider_object_t **provider,
00250   apr_pool_t *pool);
00251 
00252 
00253 /** Create and return @a *provider, an authentication provider of type
00254  * #svn_auth_cred_ssl_server_trust_t, allocated in @a pool.
00255  *
00256  * @a *provider retrieves its credentials by using the @a prompt_func
00257  * and @a prompt_baton.  The returned credential is used to override
00258  * SSL security on an error.
00259  *
00260  * @deprecated Provided for backward compatibility with the 1.3 API.
00261  * Use svn_auth_get_ssl_server_trust_prompt_provider() instead.
00262  */
00263 SVN_DEPRECATED
00264 void
00265 svn_client_get_ssl_server_trust_prompt_provider(
00266   svn_auth_provider_object_t **provider,
00267   svn_auth_ssl_server_trust_prompt_func_t prompt_func,
00268   void *prompt_baton,
00269   apr_pool_t *pool);
00270 
00271 
00272 /** Create and return @a *provider, an authentication provider of type
00273  * #svn_auth_cred_ssl_client_cert_t, allocated in @a pool.
00274  *
00275  * @a *provider retrieves its credentials by using the @a prompt_func
00276  * and @a prompt_baton.  The returned credential is used to load the
00277  * appropriate client certificate for authentication when requested by
00278  * a server.  The prompt will be retried @a retry_limit times.
00279  * For infinite retries, set @a retry_limit to value less than 0.
00280  *
00281  * @deprecated Provided for backward compatibility with the 1.3 API.
00282  * Use svn_auth_get_ssl_client_cert_prompt_provider() instead.
00283  */
00284 SVN_DEPRECATED
00285 void
00286 svn_client_get_ssl_client_cert_prompt_provider(
00287   svn_auth_provider_object_t **provider,
00288   svn_auth_ssl_client_cert_prompt_func_t prompt_func,
00289   void *prompt_baton,
00290   int retry_limit,
00291   apr_pool_t *pool);
00292 
00293 
00294 /** Create and return @a *provider, an authentication provider of type
00295  * #svn_auth_cred_ssl_client_cert_pw_t, allocated in @a pool.
00296  *
00297  * @a *provider retrieves its credentials by using the @a prompt_func
00298  * and @a prompt_baton.  The returned credential is used when a loaded
00299  * client certificate is protected by a passphrase.  The prompt will
00300  * be retried @a retry_limit times. For infinite retries, set @a retry_limit
00301  * to value less than 0.
00302  *
00303  * @deprecated Provided for backward compatibility with the 1.3 API.
00304  * Use svn_auth_get_ssl_client_cert_pw_prompt_provider() instead.
00305  */
00306 SVN_DEPRECATED
00307 void
00308 svn_client_get_ssl_client_cert_pw_prompt_provider(
00309   svn_auth_provider_object_t **provider,
00310   svn_auth_ssl_client_cert_pw_prompt_func_t prompt_func,
00311   void *prompt_baton,
00312   int retry_limit,
00313   apr_pool_t *pool);
00314 
00315 /** @} */
00316 
00317 /**
00318  * Revisions and Peg Revisions
00319  *
00320  * @defgroup clnt_revisions Revisions and Peg Revisions
00321  *
00322  * A brief word on operative and peg revisions.
00323  *
00324  * If the kind of the peg revision is #svn_opt_revision_unspecified, then it
00325  * defaults to #svn_opt_revision_head for URLs and #svn_opt_revision_working
00326  * for local paths.
00327  *
00328  * For deeper insight, please see the
00329  * <a href="http://svnbook.red-bean.com/nightly/en/svn.advanced.pegrevs.html">
00330  * Peg and Operative Revisions</a> section of the Subversion Book.
00331  */
00332 
00333 /**
00334  * Commit operations
00335  *
00336  * @defgroup clnt_commit Client commit subsystem
00337  *
00338  * @{
00339  */
00340 
00341 /** This is a structure which stores a filename and a hash of property
00342  * names and values.
00343  *
00344  * @deprecated Provided for backward compatibility with the 1.4 API.
00345  */
00346 typedef struct svn_client_proplist_item_t
00347 {
00348   /** The name of the node on which these properties are set. */
00349   svn_stringbuf_t *node_name;
00350 
00351   /** A hash of (const char *) property names, and (svn_string_t *) property
00352    * values. */
00353   apr_hash_t *prop_hash;
00354 
00355 } svn_client_proplist_item_t;
00356 
00357 /**
00358  * The callback invoked by svn_client_proplist4().  Each invocation
00359  * provides the regular and/or inherited properties of @a path, which is
00360  * either a working copy path or a URL.  If @a prop_hash is not @c NULL, then
00361  * it maps explicit <tt>const char *</tt> property names to
00362  * <tt>svn_string_t *</tt> explicit property values.  If @a inherited_props
00363  * is not @c NULL, then it is a depth-first ordered array of
00364  * #svn_prop_inherited_item_t * structures representing the
00365  * properties inherited by @a path.  Use @a scratch_pool for all temporary
00366  * allocations.
00367  *
00368  * The #svn_prop_inherited_item_t->path_or_url members of the
00369  * #svn_prop_inherited_item_t * structures in @a inherited_props are
00370  * URLs if @a path is a URL or if @a path is a working copy path but the
00371  * property represented by the structure is above the working copy root (i.e.
00372  * the inherited property is from the cache).  In all other cases the
00373  * #svn_prop_inherited_item_t->path_or_url members are absolute working copy
00374  * paths.
00375  *
00376  * @since New in 1.8.
00377  */
00378 typedef svn_error_t *(*svn_proplist_receiver2_t)(
00379   void *baton,
00380   const char *path,
00381   apr_hash_t *prop_hash,
00382   apr_array_header_t *inherited_props,
00383   apr_pool_t *scratch_pool);
00384 
00385 /**
00386  * Similar to #svn_proplist_receiver2_t, but doesn't return inherited
00387  * properties.
00388  *
00389  * @deprecated Provided for backward compatibility with the 1.7 API.
00390  *
00391  * @since New in 1.5.
00392  */
00393 typedef svn_error_t *(*svn_proplist_receiver_t)(
00394   void *baton,
00395   const char *path,
00396   apr_hash_t *prop_hash,
00397   apr_pool_t *pool);
00398 
00399 /**
00400  * Return a duplicate of @a item, allocated in @a pool. No part of the new
00401  * structure will be shared with @a item.
00402  *
00403  * @since New in 1.3.
00404  *
00405  * @deprecated Provided for backward compatibility with the 1.4 API.
00406  */
00407 SVN_DEPRECATED
00408 svn_client_proplist_item_t *
00409 svn_client_proplist_item_dup(const svn_client_proplist_item_t *item,
00410                              apr_pool_t *pool);
00411 
00412 /** Information about commits passed back to client from this module.
00413  *
00414  * @deprecated Provided for backward compatibility with the 1.2 API.
00415  */
00416 typedef struct svn_client_commit_info_t
00417 {
00418   /** just-committed revision. */
00419   svn_revnum_t revision;
00420 
00421   /** server-side date of the commit. */
00422   const char *date;
00423 
00424   /** author of the commit. */
00425   const char *author;
00426 
00427 } svn_client_commit_info_t;
00428 
00429 
00430 /**
00431  * @name Commit state flags
00432  * @brief State flags for use with the #svn_client_commit_item3_t structure
00433  * (see the note about the namespace for that structure, which also
00434  * applies to these flags).
00435  * @{
00436  */
00437 #define SVN_CLIENT_COMMIT_ITEM_ADD         0x01
00438 #define SVN_CLIENT_COMMIT_ITEM_DELETE      0x02
00439 #define SVN_CLIENT_COMMIT_ITEM_TEXT_MODS   0x04
00440 #define SVN_CLIENT_COMMIT_ITEM_PROP_MODS   0x08
00441 #define SVN_CLIENT_COMMIT_ITEM_IS_COPY     0x10
00442 /** One of the flags for a commit item.  The node has a lock token that
00443  * should be released after a successful commit and, if the node is also
00444  * modified, transferred to the server as part of the commit process.
00445  *
00446  * @since New in 1.2. */
00447 #define SVN_CLIENT_COMMIT_ITEM_LOCK_TOKEN  0x20
00448 /** One of the flags for a commit item.  The node is the 'moved here'
00449  * side of a local move.  This is used to check and enforce that the
00450  * other side of the move is also included in the commit.
00451  *
00452  * @since New in 1.8. */
00453 #define SVN_CLIENT_COMMIT_ITEM_MOVED_HERE  0x40
00454 /** @} */
00455 
00456 /** The commit candidate structure.
00457  *
00458  * In order to avoid backwards compatibility problems clients should use
00459  * svn_client_commit_item3_create() to allocate and initialize this
00460  * structure instead of doing so themselves.
00461  *
00462  * @since New in 1.5.
00463  */
00464 typedef struct svn_client_commit_item3_t
00465 {
00466   /* IMPORTANT: If you extend this structure, add new fields to the end. */
00467 
00468   /** absolute working-copy path of item */
00469   const char *path;
00470 
00471   /** node kind (dir, file) */
00472   svn_node_kind_t kind;
00473 
00474   /** commit URL for this item */
00475   const char *url;
00476 
00477   /** revision of textbase */
00478   svn_revnum_t revision;
00479 
00480   /** copyfrom-url or NULL if not a copied item */
00481   const char *copyfrom_url;
00482 
00483   /** copyfrom-rev, valid when copyfrom_url != NULL */
00484   svn_revnum_t copyfrom_rev;
00485 
00486   /** state flags */
00487   apr_byte_t state_flags;
00488 
00489   /** An array of #svn_prop_t *'s, which are incoming changes from
00490    * the repository to WC properties.  These changes are applied
00491    * post-commit.
00492    *
00493    * When adding to this array, allocate the #svn_prop_t and its
00494    * contents in @c incoming_prop_changes->pool, so that it has the
00495    * same lifetime as this data structure.
00496    *
00497    * See http://subversion.tigris.org/issues/show_bug.cgi?id=806 for a
00498    * description of what would happen if the post-commit process
00499    * didn't group these changes together with all other changes to the
00500    * item.
00501    */
00502   apr_array_header_t *incoming_prop_changes;
00503 
00504   /** An array of #svn_prop_t *'s, which are outgoing changes to
00505    * make to properties in the repository.  These extra property
00506    * changes are declared pre-commit, and applied to the repository as
00507    * part of a commit.
00508    *
00509    * When adding to this array, allocate the #svn_prop_t and its
00510    * contents in @c outgoing_prop_changes->pool, so that it has the
00511    * same lifetime as this data structure.
00512    */
00513   apr_array_header_t *outgoing_prop_changes;
00514 
00515   /**
00516    * When processing the commit this contains the relative path for
00517    * the commit session. #NULL until the commit item is preprocessed.
00518    * @since New in 1.7.
00519    */
00520   const char *session_relpath;
00521 
00522   /**
00523    * When committing a move, this contains the absolute path where
00524    * the node was directly moved from. (If an ancestor at the original
00525    * location was moved then it points to where the node itself was
00526    * moved from; not the original location.)
00527    * @since New in 1.8.
00528    */
00529   const char *moved_from_abspath;
00530 
00531 } svn_client_commit_item3_t;
00532 
00533 /** The commit candidate structure.
00534  *
00535  * @deprecated Provided for backward compatibility with the 1.4 API.
00536  */
00537 typedef struct svn_client_commit_item2_t
00538 {
00539   /** absolute working-copy path of item */
00540   const char *path;
00541 
00542   /** node kind (dir, file) */
00543   svn_node_kind_t kind;
00544 
00545   /** commit URL for this item */
00546   const char *url;
00547 
00548   /** revision of textbase */
00549   svn_revnum_t revision;
00550 
00551   /** copyfrom-url or NULL if not a copied item */
00552   const char *copyfrom_url;
00553 
00554   /** copyfrom-rev, valid when copyfrom_url != NULL */
00555   svn_revnum_t copyfrom_rev;
00556 
00557   /** state flags */
00558   apr_byte_t state_flags;
00559 
00560   /** Analogous to the #svn_client_commit_item3_t.incoming_prop_changes
00561    * field.
00562    */
00563   apr_array_header_t *wcprop_changes;
00564 } svn_client_commit_item2_t;
00565 
00566 /** The commit candidate structure.
00567  *
00568  * @deprecated Provided for backward compatibility with the 1.2 API.
00569  */
00570 typedef struct svn_client_commit_item_t
00571 {
00572   /** absolute working-copy path of item */
00573   const char *path;
00574 
00575   /** node kind (dir, file) */
00576   svn_node_kind_t kind;
00577 
00578   /** commit URL for this item */
00579   const char *url;
00580 
00581   /** revision (copyfrom-rev if _IS_COPY) */
00582   svn_revnum_t revision;
00583 
00584   /** copyfrom-url */
00585   const char *copyfrom_url;
00586 
00587   /** state flags */
00588   apr_byte_t state_flags;
00589 
00590   /** Analogous to the #svn_client_commit_item3_t.incoming_prop_changes
00591    * field.
00592    */
00593   apr_array_header_t *wcprop_changes;
00594 
00595 } svn_client_commit_item_t;
00596 
00597 /** Return a new commit item object, allocated in @a pool.
00598  *
00599  * In order to avoid backwards compatibility problems, this function
00600  * is used to initialize and allocate the #svn_client_commit_item3_t
00601  * structure rather than doing so explicitly, as the size of this
00602  * structure may change in the future.
00603  *
00604  * @since New in 1.6.
00605  */
00606 svn_client_commit_item3_t *
00607 svn_client_commit_item3_create(apr_pool_t *pool);
00608 
00609 /** Like svn_client_commit_item3_create() but with a stupid "const"
00610  * qualifier on the returned structure, and it returns an error that
00611  * will never happen.
00612  *
00613  * @deprecated Provided for backward compatibility with the 1.5 API.
00614  */
00615 SVN_DEPRECATED
00616 svn_error_t *
00617 svn_client_commit_item_create(const svn_client_commit_item3_t **item,
00618                               apr_pool_t *pool);
00619 
00620 /**
00621  * Return a duplicate of @a item, allocated in @a pool. No part of the
00622  * new structure will be shared with @a item, except for the adm_access
00623  * member.
00624  *
00625  * @since New in 1.5.
00626  */
00627 svn_client_commit_item3_t *
00628 svn_client_commit_item3_dup(const svn_client_commit_item3_t *item,
00629                             apr_pool_t *pool);
00630 
00631 /**
00632  * Return a duplicate of @a item, allocated in @a pool. No part of the new
00633  * structure will be shared with @a item.
00634  *
00635  * @deprecated Provided for backward compatibility with the 1.4 API.
00636  */
00637 SVN_DEPRECATED
00638 svn_client_commit_item2_t *
00639 svn_client_commit_item2_dup(const svn_client_commit_item2_t *item,
00640                             apr_pool_t *pool);
00641 
00642 /** Callback type used by commit-y operations to get a commit log message
00643  * from the caller.
00644  *
00645  * Set @a *log_msg to the log message for the commit, allocated in @a
00646  * pool, or @c NULL if wish to abort the commit process.  Set @a *tmp_file
00647  * to the path of any temporary file which might be holding that log
00648  * message, or @c NULL if no such file exists (though, if @a *log_msg is
00649  * @c NULL, this value is undefined).  The log message MUST be a UTF8
00650  * string with LF line separators.
00651  *
00652  * @a commit_items is a read-only array of #svn_client_commit_item3_t
00653  * structures, which may be fully or only partially filled-in,
00654  * depending on the type of commit operation.
00655  *
00656  * @a baton is provided along with the callback for use by the handler.
00657  *
00658  * All allocations should be performed in @a pool.
00659  *
00660  * @since New in 1.5.
00661  */
00662 typedef svn_error_t *(*svn_client_get_commit_log3_t)(
00663   const char **log_msg,
00664   const char **tmp_file,
00665   const apr_array_header_t *commit_items,
00666   void *baton,
00667   apr_pool_t *pool);
00668 
00669 /** Callback type used by commit-y operations to get a commit log message
00670  * from the caller.
00671  *
00672  * Set @a *log_msg to the log message for the commit, allocated in @a
00673  * pool, or @c NULL if wish to abort the commit process.  Set @a *tmp_file
00674  * to the path of any temporary file which might be holding that log
00675  * message, or @c NULL if no such file exists (though, if @a *log_msg is
00676  * @c NULL, this value is undefined).  The log message MUST be a UTF8
00677  * string with LF line separators.
00678  *
00679  * @a commit_items is a read-only array of #svn_client_commit_item2_t
00680  * structures, which may be fully or only partially filled-in,
00681  * depending on the type of commit operation.
00682  *
00683  * @a baton is provided along with the callback for use by the handler.
00684  *
00685  * All allocations should be performed in @a pool.
00686  *
00687  * @deprecated Provided for backward compatibility with the 1.3 API.
00688  */
00689 typedef svn_error_t *(*svn_client_get_commit_log2_t)(
00690   const char **log_msg,
00691   const char **tmp_file,
00692   const apr_array_header_t *commit_items,
00693   void *baton,
00694   apr_pool_t *pool);
00695 
00696 /** Callback type used by commit-y operations to get a commit log message
00697  * from the caller.
00698  *
00699  * Set @a *log_msg to the log message for the commit, allocated in @a
00700  * pool, or @c NULL if wish to abort the commit process.  Set @a *tmp_file
00701  * to the path of any temporary file which might be holding that log
00702  * message, or @c NULL if no such file exists (though, if @a *log_msg is
00703  * @c NULL, this value is undefined).  The log message MUST be a UTF8
00704  * string with LF line separators.
00705  *
00706  * @a commit_items is a read-only array of #svn_client_commit_item_t
00707  * structures, which may be fully or only partially filled-in,
00708  * depending on the type of commit operation.
00709  *
00710  * @a baton is provided along with the callback for use by the handler.
00711  *
00712  * All allocations should be performed in @a pool.
00713  *
00714  * @deprecated Provided for backward compatibility with the 1.2 API.
00715  */
00716 typedef svn_error_t *(*svn_client_get_commit_log_t)(
00717   const char **log_msg,
00718   const char **tmp_file,
00719   apr_array_header_t *commit_items,
00720   void *baton,
00721   apr_pool_t *pool);
00722 
00723 /** @} */
00724 
00725 /**
00726  * Client blame
00727  *
00728  * @defgroup clnt_blame Client blame functionality
00729  *
00730  * @{
00731  */
00732 
00733 /** Callback type used by svn_client_blame5() to notify the caller
00734  * that line @a line_no of the blamed file was last changed in @a revision
00735  * which has the revision properties @a rev_props, and that the contents were
00736  * @a line.
00737  *
00738  * @a start_revnum and @a end_revnum contain the start and end revision
00739  * number of the entire blame operation, as determined from the repository
00740  * inside svn_client_blame5(). This can be useful for the blame receiver
00741  * to format the blame output.
00742  *
00743  * If svn_client_blame5() was called with @a include_merged_revisions set to
00744  * TRUE, @a merged_revision, @a merged_rev_props and @a merged_path will be
00745  * set, otherwise they will be NULL. @a merged_path will be set to the
00746  * absolute repository path.
00747  *
00748  * All allocations should be performed in @a pool.
00749  *
00750  * @note If there is no blame information for this line, @a revision will be
00751  * invalid and @a rev_props will be NULL. In this case @a local_change
00752  * will be true if the reason there is no blame information is that the line
00753  * was modified locally. In all other cases @a local_change will be false.
00754  *
00755  * @since New in 1.7.
00756  */
00757 typedef svn_error_t *(*svn_client_blame_receiver3_t)(
00758   void *baton,
00759   svn_revnum_t start_revnum,
00760   svn_revnum_t end_revnum,
00761   apr_int64_t line_no,
00762   svn_revnum_t revision,
00763   apr_hash_t *rev_props,
00764   svn_revnum_t merged_revision,
00765   apr_hash_t *merged_rev_props,
00766   const char *merged_path,
00767   const char *line,
00768   svn_boolean_t local_change,
00769   apr_pool_t *pool);
00770 
00771 /**
00772  * Similar to #svn_client_blame_receiver3_t, but with separate author and
00773  * date revision properties instead of all revision properties, and without
00774  * information about local changes.
00775  *
00776  * @deprecated Provided for backward compatibility with the 1.6 API.
00777  *
00778  * @since New in 1.5.
00779  */
00780 typedef svn_error_t *(*svn_client_blame_receiver2_t)(
00781   void *baton,
00782   apr_int64_t line_no,
00783   svn_revnum_t revision,
00784   const char *author,
00785   const char *date,
00786   svn_revnum_t merged_revision,
00787   const char *merged_author,
00788   const char *merged_date,
00789   const char *merged_path,
00790   const char *line,
00791   apr_pool_t *pool);
00792 
00793 /**
00794  * Similar to #svn_client_blame_receiver2_t, but without @a merged_revision,
00795  * @a merged_author, @a merged_date, or @a merged_path members.
00796  *
00797  * @note New in 1.4 is that the line is defined to contain only the line
00798  * content (and no [partial] EOLs; which was undefined in older versions).
00799  * Using this callback with svn_client_blame() or svn_client_blame2()
00800  * will still give you the old behaviour.
00801  *
00802  * @deprecated Provided for backward compatibility with the 1.4 API.
00803  */
00804 typedef svn_error_t *(*svn_client_blame_receiver_t)(
00805   void *baton,
00806   apr_int64_t line_no,
00807   svn_revnum_t revision,
00808   const char *author,
00809   const char *date,
00810   const char *line,
00811   apr_pool_t *pool);
00812 
00813 
00814 /** @} */
00815 
00816 /**
00817  * Client diff
00818  *
00819  * @defgroup clnt_diff Client diff functionality
00820  *
00821  * @{
00822  */
00823 /** The difference type in an svn_diff_summarize_t structure.
00824  *
00825  * @since New in 1.4.
00826  */
00827 typedef enum svn_client_diff_summarize_kind_t
00828 {
00829   /** An item with no text modifications */
00830   svn_client_diff_summarize_kind_normal,
00831 
00832   /** An added item */
00833   svn_client_diff_summarize_kind_added,
00834 
00835   /** An item with text modifications */
00836   svn_client_diff_summarize_kind_modified,
00837 
00838   /** A deleted item */
00839   svn_client_diff_summarize_kind_deleted
00840 } svn_client_diff_summarize_kind_t;
00841 
00842 
00843 /** A struct that describes the diff of an item. Passed to
00844  * #svn_client_diff_summarize_func_t.
00845  *
00846  * @note Fields may be added to the end of this structure in future
00847  * versions.  Therefore, users shouldn't allocate structures of this
00848  * type, to preserve binary compatibility.
00849  *
00850  * @since New in 1.4.
00851  */
00852 typedef struct svn_client_diff_summarize_t
00853 {
00854   /** Path relative to the target.  If the target is a file, path is
00855    * the empty string. */
00856   const char *path;
00857 
00858   /** Change kind */
00859   svn_client_diff_summarize_kind_t summarize_kind;
00860 
00861   /** Properties changed?  For consistency with 'svn status' output,
00862    * this should be false if summarize_kind is _added or _deleted. */
00863   svn_boolean_t prop_changed;
00864 
00865   /** File or dir */
00866   svn_node_kind_t node_kind;
00867 } svn_client_diff_summarize_t;
00868 
00869 /**
00870  * Return a duplicate of @a diff, allocated in @a pool. No part of the new
00871  * structure will be shared with @a diff.
00872  *
00873  * @since New in 1.4.
00874  */
00875 svn_client_diff_summarize_t *
00876 svn_client_diff_summarize_dup(const svn_client_diff_summarize_t *diff,
00877                               apr_pool_t *pool);
00878 
00879 
00880 /** A callback used in svn_client_diff_summarize2() and
00881  * svn_client_diff_summarize_peg2() for reporting a @a diff summary.
00882  *
00883  * All allocations should be performed in @a pool.
00884  *
00885  * @a baton is a closure object; it should be provided by the implementation,
00886  * and passed by the caller.
00887  *
00888  * @since New in 1.4.
00889  */
00890 typedef svn_error_t *(*svn_client_diff_summarize_func_t)(
00891   const svn_client_diff_summarize_t *diff,
00892   void *baton,
00893   apr_pool_t *pool);
00894 
00895 
00896 
00897 /** @} */
00898 
00899 
00900 /**
00901  * Client context
00902  *
00903  * @defgroup clnt_ctx Client context management
00904  *
00905  * @{
00906  */
00907 
00908 /** A client context structure, which holds client specific callbacks,
00909  * batons, serves as a cache for configuration options, and other various
00910  * and sundry things.  In order to avoid backwards compatibility problems
00911  * clients should use svn_client_create_context() to allocate and
00912  * initialize this structure instead of doing so themselves.
00913  */
00914 typedef struct svn_client_ctx_t
00915 {
00916   /** main authentication baton. */
00917   svn_auth_baton_t *auth_baton;
00918 
00919   /** notification callback function.
00920    * This will be called by notify_func2() by default.
00921    * @deprecated Provided for backward compatibility with the 1.1 API.
00922    * Use @c notify_func2 instead. */
00923   svn_wc_notify_func_t notify_func;
00924 
00925   /** notification callback baton for notify_func()
00926    * @deprecated Provided for backward compatibility with the 1.1 API.
00927    * Use @c notify_baton2 instead */
00928   void *notify_baton;
00929 
00930   /** Log message callback function.  NULL means that Subversion
00931     * should try not attempt to fetch a log message.
00932     * @deprecated Provided for backward compatibility with the 1.2 API.
00933     * Use @c log_msg_func2 instead. */
00934   svn_client_get_commit_log_t log_msg_func;
00935 
00936   /** log message callback baton
00937     * @deprecated Provided for backward compatibility with the 1.2 API.
00938     * Use @c log_msg_baton2 instead. */
00939   void *log_msg_baton;
00940 
00941   /** a hash mapping of <tt>const char *</tt> configuration file names to
00942    * #svn_config_t *'s. For example, the '~/.subversion/config' file's
00943    * contents should have the key "config".  May be left unset (or set to
00944    * NULL) to use the built-in default settings and not use any configuration.
00945    */
00946   apr_hash_t *config;
00947 
00948   /** a callback to be used to see if the client wishes to cancel the running
00949    * operation. */
00950   svn_cancel_func_t cancel_func;
00951 
00952   /** a baton to pass to the cancellation callback. */
00953   void *cancel_baton;
00954 
00955   /** notification function, defaulting to a function that forwards
00956    * to notify_func().  If @c NULL, it will not be invoked.
00957    * @since New in 1.2. */
00958   svn_wc_notify_func2_t notify_func2;
00959 
00960   /** notification baton for notify_func2().
00961    * @since New in 1.2. */
00962   void *notify_baton2;
00963 
00964   /** Log message callback function. NULL means that Subversion
00965    *   should try log_msg_func.
00966    * @since New in 1.3. */
00967   svn_client_get_commit_log2_t log_msg_func2;
00968 
00969   /** callback baton for log_msg_func2
00970    * @since New in 1.3. */
00971   void *log_msg_baton2;
00972 
00973   /** Notification callback for network progress information.
00974    * May be NULL if not used.
00975    * @since New in 1.3. */
00976   svn_ra_progress_notify_func_t progress_func;
00977 
00978   /** Callback baton for progress_func.
00979    * @since New in 1.3. */
00980   void *progress_baton;
00981 
00982   /** Log message callback function. NULL means that Subversion
00983    *   should try @c log_msg_func2, then @c log_msg_func.
00984    * @since New in 1.5. */
00985   svn_client_get_commit_log3_t log_msg_func3;
00986 
00987   /** The callback baton for @c log_msg_func3.
00988    * @since New in 1.5. */
00989   void *log_msg_baton3;
00990 
00991   /** MIME types map.
00992    * @since New in 1.5. */
00993   apr_hash_t *mimetypes_map;
00994 
00995   /** Conflict resolution callback and baton, if available.
00996    * @since New in 1.5. */
00997   svn_wc_conflict_resolver_func_t conflict_func;
00998   void *conflict_baton;
00999 
01000   /** Custom client name string, or @c NULL.
01001    * @since New in 1.5. */
01002   const char *client_name;
01003 
01004   /** Conflict resolution callback and baton, if available. NULL means that
01005    * subversion should try @c conflict_func.
01006    * @since New in 1.7. */
01007   svn_wc_conflict_resolver_func2_t conflict_func2;
01008   void *conflict_baton2;
01009 
01010   /** A working copy context for the client operation to use.
01011    * This is initialized by svn_client_create_context() and should never
01012    * be @c NULL.
01013    *
01014    * @since New in 1.7.  */
01015   svn_wc_context_t *wc_ctx;
01016 
01017 } svn_client_ctx_t;
01018 
01019 /** Initialize a client context.
01020  * Set @a *ctx to a client context object, allocated in @a pool, that
01021  * represents a particular instance of an svn client. @a cfg_hash is used
01022  * to initialise the config member of the returned context object and should
01023  * remain valid for the lifetime of the object. @a cfg_hash may be @c NULL,
01024  * in which case it is ignored.
01025  *
01026  * In order to avoid backwards compatibility problems, clients must
01027  * use this function to initialize and allocate the
01028  * #svn_client_ctx_t structure rather than doing so themselves, as
01029  * the size of this structure may change in the future.
01030  *
01031  * The current implementation never returns error, but callers should
01032  * still check for error, for compatibility with future versions.
01033  *
01034  * @since New in 1.8.
01035  */
01036 svn_error_t *
01037 svn_client_create_context2(svn_client_ctx_t **ctx,
01038                            apr_hash_t *cfg_hash,
01039                            apr_pool_t *pool);
01040 
01041 
01042 /** Similar to svn_client_create_context2 but passes a NULL @a cfg_hash.
01043  *
01044  * @deprecated Provided for backward compatibility with the 1.7 API.
01045  */
01046 SVN_DEPRECATED
01047 svn_error_t *
01048 svn_client_create_context(svn_client_ctx_t **ctx,
01049                           apr_pool_t *pool);
01050 
01051 /** @} end group: Client context management */
01052 
01053 /**
01054  * @name Authentication information file names
01055  *
01056  * Names of files that contain authentication information.
01057  *
01058  * These filenames are decided by libsvn_client, since this library
01059  * implements all the auth-protocols;  libsvn_wc does nothing but
01060  * blindly store and retrieve these files from protected areas.
01061  *
01062  * @defgroup clnt_auth_filenames Client authentication file names
01063  * @{
01064  */
01065 #define SVN_CLIENT_AUTH_USERNAME            "username"
01066 #define SVN_CLIENT_AUTH_PASSWORD            "password"
01067 /** @} group end: Authentication information file names */
01068 
01069 /** Client argument processing
01070  *
01071  * @defgroup clnt_cmdline Client command-line processing
01072  *
01073  * @{
01074  */
01075 
01076 /**
01077  * Pull remaining target arguments from @a os into @a *targets_p,
01078  * converting them to UTF-8, followed by targets from @a known_targets
01079  * (which might come from, for example, the "--targets" command line option).
01080  *
01081  * Process each target in one of the following ways.  For a repository-
01082  * relative URL: resolve to a full URL, contacting the repository if
01083  * necessary to do so, and then treat as a full URL.  For a URL: do some
01084  * IRI-to-URI encoding and some auto-escaping, and canonicalize.  For a
01085  * local path: canonicalize case and path separators.
01086  *
01087  * If @a keep_last_origpath_on_truepath_collision is TRUE, and there are
01088  * exactly two targets which both case-canonicalize to the same path, the last
01089  * target will be returned in the original non-case-canonicalized form.
01090  *
01091  * Allocate @a *targets_p and its elements in @a pool.
01092  *
01093  * @a ctx is required for possible repository authentication.
01094  *
01095  * If a path has the same name as a Subversion working copy
01096  * administrative directory, return #SVN_ERR_RESERVED_FILENAME_SPECIFIED;
01097  * if multiple reserved paths are encountered, return a chain of
01098  * errors, all of which are #SVN_ERR_RESERVED_FILENAME_SPECIFIED.  Do
01099  * not return this type of error in a chain with any other type of
01100  * error, and if this is the only type of error encountered, complete
01101  * the operation before returning the error(s).
01102  *
01103  * @since New in 1.7
01104  */
01105 svn_error_t *
01106 svn_client_args_to_target_array2(apr_array_header_t **targets_p,
01107                                  apr_getopt_t *os,
01108                                  const apr_array_header_t *known_targets,
01109                                  svn_client_ctx_t *ctx,
01110                                  svn_boolean_t keep_last_origpath_on_truepath_collision,
01111                                  apr_pool_t *pool);
01112 
01113 /**
01114  * Similar to svn_client_args_to_target_array2() but with
01115  * @a keep_last_origpath_on_truepath_collision always set to FALSE.
01116  *
01117  * @deprecated Provided for backward compatibility with the 1.6 API.
01118  */
01119 SVN_DEPRECATED
01120 svn_error_t *
01121 svn_client_args_to_target_array(apr_array_header_t **targets_p,
01122                                 apr_getopt_t *os,
01123                                 const apr_array_header_t *known_targets,
01124                                 svn_client_ctx_t *ctx,
01125                                 apr_pool_t *pool);
01126 
01127 /** @} group end: Client command-line processing */
01128 
01129 /** @} */
01130 
01131 /**
01132  * Client working copy management functions
01133  *
01134  * @defgroup clnt_wc Client working copy management
01135  *
01136  * @{
01137  */
01138 
01139 /**
01140  * @defgroup clnt_wc_checkout Checkout
01141  *
01142  * @{
01143  */
01144 
01145 
01146 /**
01147  * Checkout a working copy from a repository.
01148  *
01149  * @param[out] result_rev   If non-NULL, the value of the revision checked
01150  *              out from the repository.
01151  * @param[in] URL       The repository URL of the checkout source.
01152  * @param[in] path      The root of the new working copy.
01153  * @param[in] peg_revision  The peg revision.
01154  * @param[in] revision  The operative revision.
01155  * @param[in] depth     The depth of the operation.  If #svn_depth_unknown,
01156  *              then behave as if for #svn_depth_infinity, except in the case
01157  *              of resuming a previous checkout of @a path (i.e., updating),
01158  *              in which case use the depth of the existing working copy.
01159  * @param[in] ignore_externals  If @c TRUE, don't process externals
01160  *              definitions as part of this operation.
01161  * @param[in] allow_unver_obstructions  If @c TRUE, then tolerate existing
01162  *              unversioned items that obstruct incoming paths.  Only
01163  *              obstructions of the same type (file or dir) as the added
01164  *              item are tolerated.  The text of obstructing files is left
01165  *              as-is, effectively treating it as a user modification after
01166  *              the checkout.  Working properties of obstructing items are
01167  *              set equal to the base properties. <br>
01168  *              If @c FALSE, then abort if there are any unversioned
01169  *              obstructing items.
01170  * @param[in] ctx   The standard client context, used for authentication and
01171  *              notification.
01172  * @param[in] pool  Used for any temporary allocation.
01173  *
01174  * @return A pointer to an #svn_error_t of the type (this list is not
01175  *         exhaustive): <br>
01176  *         #SVN_ERR_UNSUPPORTED_FEATURE if @a URL refers to a file rather
01177  *         than a directory; <br>
01178  *         #SVN_ERR_RA_ILLEGAL_URL if @a URL does not exist; <br>
01179  *         #SVN_ERR_CLIENT_BAD_REVISION if @a revision is not one of
01180  *         #svn_opt_revision_number, #svn_opt_revision_head, or
01181  *         #svn_opt_revision_date. <br>
01182  *         If no error occurred, return #SVN_NO_ERROR.
01183  *
01184  * @since New in 1.5.
01185  *
01186  * @see #svn_depth_t <br> #svn_client_ctx_t <br> @ref clnt_revisions for
01187  *      a discussion of operative and peg revisions.
01188  */
01189 svn_error_t *
01190 svn_client_checkout3(svn_revnum_t *result_rev,
01191                      const char *URL,
01192                      const char *path,
01193                      const svn_opt_revision_t *peg_revision,
01194                      const svn_opt_revision_t *revision,
01195                      svn_depth_t depth,
01196                      svn_boolean_t ignore_externals,
01197                      svn_boolean_t allow_unver_obstructions,
01198                      svn_client_ctx_t *ctx,
01199                      apr_pool_t *pool);
01200 
01201 
01202 /**
01203  * Similar to svn_client_checkout3() but with @a allow_unver_obstructions
01204  * always set to FALSE, and @a depth set according to @a recurse: if
01205  * @a recurse is TRUE, @a depth is #svn_depth_infinity, if @a recurse
01206  * is FALSE, @a depth is #svn_depth_files.
01207  *
01208  * @deprecated Provided for backward compatibility with the 1.4 API.
01209  */
01210 SVN_DEPRECATED
01211 svn_error_t *
01212 svn_client_checkout2(svn_revnum_t *result_rev,
01213                      const char *URL,
01214                      const char *path,
01215                      const svn_opt_revision_t *peg_revision,
01216                      const svn_opt_revision_t *revision,
01217                      svn_boolean_t recurse,
01218                      svn_boolean_t ignore_externals,
01219                      svn_client_ctx_t *ctx,
01220                      apr_pool_t *pool);
01221 
01222 
01223 /**
01224  * Similar to svn_client_checkout2(), but with @a peg_revision
01225  * always set to #svn_opt_revision_unspecified and
01226  * @a ignore_externals always set to FALSE.
01227  *
01228  * @deprecated Provided for backward compatibility with the 1.1 API.
01229  */
01230 SVN_DEPRECATED
01231 svn_error_t *
01232 svn_client_checkout(svn_revnum_t *result_rev,
01233                     const char *URL,
01234                     const char *path,
01235                     const svn_opt_revision_t *revision,
01236                     svn_boolean_t recurse,
01237                     svn_client_ctx_t *ctx,
01238                     apr_pool_t *pool);
01239 /** @} */
01240 
01241 /**
01242  * @defgroup Update Bring a working copy up-to-date with a repository
01243  *
01244  * @{
01245  *
01246  */
01247 
01248 /**
01249  * Update working trees @a paths to @a revision, authenticating with the
01250  * authentication baton cached in @a ctx.  @a paths is an array of const
01251  * char * paths to be updated.  Unversioned paths that are direct children
01252  * of a versioned path will cause an update that attempts to add that path;
01253  * other unversioned paths are skipped.  If @a result_revs is not NULL,
01254  * @a *result_revs will be set to an array of svn_revnum_t with each
01255  * element set to the revision to which @a revision was resolved for the
01256  * corresponding element of @a paths.
01257  *
01258  * @a revision must be of kind #svn_opt_revision_number,
01259  * #svn_opt_revision_head, or #svn_opt_revision_date.  If @a
01260  * revision does not meet these requirements, return the error
01261  * #SVN_ERR_CLIENT_BAD_REVISION.
01262  *
01263  * The paths in @a paths can be from multiple working copies from multiple
01264  * repositories, but even if they all come from the same repository there
01265  * is no guarantee that revision represented by #svn_opt_revision_head
01266  * will remain the same as each path is updated.
01267  *
01268  * If @a ignore_externals is set, don't process externals definitions
01269  * as part of this operation.
01270  *
01271  * If @a depth is #svn_depth_infinity, update fully recursively.
01272  * Else if it is #svn_depth_immediates or #svn_depth_files, update
01273  * each target and its file entries, but not its subdirectories.  Else
01274  * if #svn_depth_empty, update exactly each target, nonrecursively
01275  * (essentially, update the target's properties).
01276  *
01277  * If @a depth is #svn_depth_unknown, take the working depth from
01278  * @a paths and then behave as described above.
01279  *
01280  * If @a depth_is_sticky is set and @a depth is not
01281  * #svn_depth_unknown, then in addition to updating PATHS, also set
01282  * their sticky ambient depth value to @a depth.
01283  *
01284  * If @a allow_unver_obstructions is TRUE then the update tolerates
01285  * existing unversioned items that obstruct added paths.  Only
01286  * obstructions of the same type (file or dir) as the added item are
01287  * tolerated.  The text of obstructing files is left as-is, effectively
01288  * treating it as a user modification after the update.  Working
01289  * properties of obstructing items are set equal to the base properties.
01290  * If @a allow_unver_obstructions is FALSE then the update will abort
01291  * if there are any unversioned obstructing items.
01292  *
01293  * If @a adds_as_modification is TRUE, a local addition at the same path
01294  * as an incoming addition of the same node kind results in a normal node
01295  * with a possible local modification, instead of a tree conflict.
01296  *
01297  * If @a make_parents is TRUE, create any non-existent parent
01298  * directories also by checking them out at depth=empty.
01299  *
01300  * If @a ctx->notify_func2 is non-NULL, invoke @a ctx->notify_func2 with
01301  * @a ctx->notify_baton2 for each item handled by the update, and also for
01302  * files restored from text-base.  If @a ctx->cancel_func is non-NULL, invoke
01303  * it passing @a ctx->cancel_baton at various places during the update.
01304  *
01305  * Use @a pool for any temporary allocation.
01306  *
01307  *  @todo  Multiple Targets
01308  *  - Up for debate:  an update on multiple targets is *not* atomic.
01309  *  Right now, svn_client_update only takes one path.  What's
01310  *  debatable is whether this should ever change.  On the one hand,
01311  *  it's kind of losing to have the client application loop over
01312  *  targets and call svn_client_update() on each one;  each call to
01313  *  update initializes a whole new repository session (network
01314  *  overhead, etc.)  On the other hand, it's a very simple
01315  *  implementation, and allows for the possibility that different
01316  *  targets may come from different repositories.
01317  *
01318  * @since New in 1.7.
01319  */
01320 svn_error_t *
01321 svn_client_update4(apr_array_header_t **result_revs,
01322                    const apr_array_header_t *paths,
01323                    const svn_opt_revision_t *revision,
01324                    svn_depth_t depth,
01325                    svn_boolean_t depth_is_sticky,
01326                    svn_boolean_t ignore_externals,
01327                    svn_boolean_t allow_unver_obstructions,
01328                    svn_boolean_t adds_as_modification,
01329                    svn_boolean_t make_parents,
01330                    svn_client_ctx_t *ctx,
01331                    apr_pool_t *pool);
01332 
01333 /**
01334  * Similar to svn_client_update4() but with @a make_parents always set
01335  * to FALSE and @a adds_as_modification set to TRUE.
01336  *
01337  * @deprecated Provided for backward compatibility with the 1.6 API.
01338  * @since New in 1.5.
01339  */
01340 SVN_DEPRECATED
01341 svn_error_t *
01342 svn_client_update3(apr_array_header_t **result_revs,
01343                    const apr_array_header_t *paths,
01344                    const svn_opt_revision_t *revision,
01345                    svn_depth_t depth,
01346                    svn_boolean_t depth_is_sticky,
01347                    svn_boolean_t ignore_externals,
01348                    svn_boolean_t allow_unver_obstructions,
01349                    svn_client_ctx_t *ctx,
01350                    apr_pool_t *pool);
01351 
01352 /**
01353  * Similar to svn_client_update3() but with @a allow_unver_obstructions
01354  * always set to FALSE, @a depth_is_sticky to FALSE, and @a depth set
01355  * according to @a recurse: if @a recurse is TRUE, set @a depth to
01356  * #svn_depth_infinity, if @a recurse is FALSE, set @a depth to
01357  * #svn_depth_files.
01358  *
01359  * @deprecated Provided for backward compatibility with the 1.4 API.
01360  */
01361 SVN_DEPRECATED
01362 svn_error_t *
01363 svn_client_update2(apr_array_header_t **result_revs,
01364                    const apr_array_header_t *paths,
01365                    const svn_opt_revision_t *revision,
01366                    svn_boolean_t recurse,
01367                    svn_boolean_t ignore_externals,
01368                    svn_client_ctx_t *ctx,
01369                    apr_pool_t *pool);
01370 
01371 /**
01372  * Similar to svn_client_update2() except that it accepts only a single
01373  * target in @a path, returns a single revision if @a result_rev is
01374  * not NULL, and @a ignore_externals is always set to FALSE.
01375  *
01376  * @deprecated Provided for backward compatibility with the 1.1 API.
01377  */
01378 SVN_DEPRECATED
01379 svn_error_t *
01380 svn_client_update(svn_revnum_t *result_rev,
01381                   const char *path,
01382                   const svn_opt_revision_t *revision,
01383                   svn_boolean_t recurse,
01384                   svn_client_ctx_t *ctx,
01385                   apr_pool_t *pool);
01386 /** @} */
01387 
01388 /**
01389  * @defgroup Switch Switch a working copy to another location.
01390  *
01391  * @{
01392  */
01393 
01394 /**
01395  * Switch an existing working copy directory to a different repository
01396  * location.
01397  *
01398  * This is normally used to switch a working copy directory over to another
01399  * line of development, such as a branch or a tag.  Switching an existing
01400  * working copy directory is more efficient than checking out @a url from
01401  * scratch.
01402  *
01403  * @param[out] result_rev   If non-NULL, the value of the revision to which
01404  *                          the working copy was actually switched.
01405  * @param[in] path      The directory to be switched.  This need not be the
01406  *              root of a working copy.
01407  * @param[in] url       The repository URL to switch to.
01408  * @param[in] peg_revision  The peg revision.
01409  * @param[in] revision  The operative revision.
01410  * @param[in] depth     The depth of the operation.  If #svn_depth_infinity,
01411  *                      switch fully recursively.  Else if #svn_depth_immediates,
01412  *                      switch @a path and its file children (if any), and
01413  *                      switch subdirectories but do not update them.  Else if
01414  *                      #svn_depth_files, switch just file children, ignoring
01415  *                      subdirectories completely.  Else if #svn_depth_empty,
01416  *                      switch just @a path and touch nothing underneath it.
01417  * @param[in] depth_is_sticky   If @c TRUE, and @a depth is not
01418  *              #svn_depth_unknown, then in addition to switching @a path, also
01419  *              set its sticky ambient depth value to @a depth.
01420  * @param[in] ignore_externals  If @c TRUE, don't process externals
01421  *              definitions as part of this operation.
01422  * @param[in] allow_unver_obstructions  If @c TRUE, then tolerate existing
01423  *              unversioned items that obstruct incoming paths.  Only
01424  *              obstructions of the same type (file or dir) as the added
01425  *              item are tolerated.  The text of obstructing files is left
01426  *              as-is, effectively treating it as a user modification after
01427  *              the checkout.  Working properties of obstructing items are
01428  *              set equal to the base properties. <br>
01429  *              If @c FALSE, then abort if there are any unversioned
01430  *              obstructing items.
01431  * @param[in] ignore_ancestry  If @c FALSE, then verify that the file
01432  *              or directory at @a path shares some common version control
01433  *              ancestry with the switch URL location (represented by the
01434  *              combination of @a url, @a peg_revision, and @a revision),
01435  *              and returning #SVN_ERR_CLIENT_UNRELATED_RESOURCES if they
01436  *              do not. If @c TRUE, no such sanity checks are performed.
01437  *
01438  * @param[in] ctx   The standard client context, used for authentication and
01439  *              notification.  The notifier is invoked for paths affected by
01440  *              the switch, and also for files which may be restored from the
01441  *              pristine store after being previously removed from the working
01442  *              copy.
01443  * @param[in] pool  Used for any temporary allocation.
01444  *
01445  * @return A pointer to an #svn_error_t of the type (this list is not
01446  *         exhaustive): <br>
01447  *         #SVN_ERR_CLIENT_BAD_REVISION if @a revision is not one of
01448  *         #svn_opt_revision_number, #svn_opt_revision_head, or
01449  *         #svn_opt_revision_date. <br>
01450  *         If no error occurred, return #SVN_NO_ERROR.
01451  *
01452  * @since New in 1.7.
01453  *
01454  * @see #svn_depth_t <br> #svn_client_ctx_t <br> @ref clnt_revisions for
01455  *      a discussion of operative and peg revisions.
01456  */
01457 svn_error_t *
01458 svn_client_switch3(svn_revnum_t *result_rev,
01459                    const char *path,
01460                    const char *url,
01461                    const svn_opt_revision_t *peg_revision,
01462                    const svn_opt_revision_t *revision,
01463                    svn_depth_t depth,
01464                    svn_boolean_t depth_is_sticky,
01465                    svn_boolean_t ignore_externals,
01466                    svn_boolean_t allow_unver_obstructions,
01467                    svn_boolean_t ignore_ancestry,
01468                    svn_client_ctx_t *ctx,
01469                    apr_pool_t *pool);
01470 
01471 
01472 /**
01473  * Similar to svn_client_switch3() but with @a ignore_ancestry always
01474  * set to TRUE.
01475  *
01476  * @since New in 1.5.
01477  * @deprecated Provided for backward compatibility with the 1.4 API.
01478  */
01479 SVN_DEPRECATED
01480 svn_error_t *
01481 svn_client_switch2(svn_revnum_t *result_rev,
01482                    const char *path,
01483                    const char *url,
01484                    const svn_opt_revision_t *peg_revision,
01485                    const svn_opt_revision_t *revision,
01486                    svn_depth_t depth,
01487                    svn_boolean_t depth_is_sticky,
01488                    svn_boolean_t ignore_externals,
01489                    svn_boolean_t allow_unver_obstructions,
01490                    svn_client_ctx_t *ctx,
01491                    apr_pool_t *pool);
01492 
01493 
01494 /**
01495  * Similar to svn_client_switch2() but with @a allow_unver_obstructions,
01496  * @a ignore_externals, and @a depth_is_sticky always set to FALSE,
01497  * and @a depth set according to @a recurse: if @a recurse is TRUE,
01498  * set @a depth to #svn_depth_infinity, if @a recurse is FALSE, set
01499  * @a depth to #svn_depth_files.
01500  *
01501  * @deprecated Provided for backward compatibility with the 1.4 API.
01502  */
01503 SVN_DEPRECATED
01504 svn_error_t *
01505 svn_client_switch(svn_revnum_t *result_rev,
01506                   const char *path,
01507                   const char *url,
01508                   const svn_opt_revision_t *revision,
01509                   svn_boolean_t recurse,
01510                   svn_client_ctx_t *ctx,
01511                   apr_pool_t *pool);
01512 
01513 /** @} */
01514 
01515 /**
01516  * @defgroup Add Begin versioning files/directories in a working copy.
01517  *
01518  * @{
01519  */
01520 
01521 /**
01522  * Schedule a working copy @a path for addition to the repository.
01523  *
01524  * If @a depth is #svn_depth_empty, add just @a path and nothing
01525  * below it.  If #svn_depth_files, add @a path and any file
01526  * children of @a path.  If #svn_depth_immediates, add @a path, any
01527  * file children, and any immediate subdirectories (but nothing
01528  * underneath those subdirectories).  If #svn_depth_infinity, add
01529  * @a path and everything under it fully recursively.
01530  *
01531  * @a path's parent must be under revision control already (unless
01532  * @a add_parents is TRUE), but @a path is not.
01533  *
01534  * If @a force is not set and @a path is already under version
01535  * control, return the error #SVN_ERR_ENTRY_EXISTS.  If @a force is
01536  * set, do not error on already-versioned items.  When used on a
01537  * directory in conjunction with a @a depth value greater than
01538  * #svn_depth_empty, this has the effect of scheduling for addition
01539  * any unversioned files and directories scattered within even a
01540  * versioned tree (up to @a depth).
01541  *
01542  * If @a ctx->notify_func2 is non-NULL, then for each added item, call
01543  * @a ctx->notify_func2 with @a ctx->notify_baton2 and the path of the
01544  * added item.
01545  *
01546  * If @a no_ignore is FALSE, don't add any file or directory (or recurse
01547  * into any directory) that is unversioned and found by recursion (as
01548  * opposed to being the explicit target @a path) and whose name matches the
01549  * svn:ignore property on its parent directory or the global-ignores list in
01550  * @a ctx->config. If @a no_ignore is TRUE, do include such files and
01551  * directories. (Note that an svn:ignore property can influence this
01552  * behaviour only when recursing into an already versioned directory with @a
01553  * force.)
01554  *
01555  * If @a no_autoprops is TRUE, don't set any autoprops on added files. If
01556  * @a no_autoprops is FALSE then all added files have autprops set as per
01557  * the auto-props list in @a ctx->config and the value of any
01558  * @c SVN_PROP_INHERITABLE_AUTO_PROPS properties inherited by the nearest
01559  * parents of @a path which are already under version control.
01560  *
01561  * If @a add_parents is TRUE, recurse up @a path's directory and look for
01562  * a versioned directory.  If found, add all intermediate paths between it
01563  * and @a path.  If not found, return #SVN_ERR_CLIENT_NO_VERSIONED_PARENT.
01564  *
01565  * @a scratch_pool is used for temporary allocations only.
01566  *
01567  * @par Important:
01568  * This is a *scheduling* operation.  No changes will
01569  * happen to the repository until a commit occurs.  This scheduling
01570  * can be removed with svn_client_revert2().
01571  *
01572  * @since New in 1.8.
01573  */
01574 svn_error_t *
01575 svn_client_add5(const char *path,
01576                 svn_depth_t depth,
01577                 svn_boolean_t force,
01578                 svn_boolean_t no_ignore,
01579                 svn_boolean_t no_autoprops,
01580                 svn_boolean_t add_parents,
01581                 svn_client_ctx_t *ctx,
01582                 apr_pool_t *scratch_pool);
01583 
01584 /**
01585  * Similar to svn_client_add5(), but with @a no_autoprops always set to
01586  * FALSE.
01587  *
01588  * @deprecated Provided for backward compatibility with the 1.7 API.
01589  */
01590 SVN_DEPRECATED
01591 svn_error_t *
01592 svn_client_add4(const char *path,
01593                 svn_depth_t depth,
01594                 svn_boolean_t force,
01595                 svn_boolean_t no_ignore,
01596                 svn_boolean_t add_parents,
01597                 svn_client_ctx_t *ctx,
01598                 apr_pool_t *pool);
01599 
01600 /**
01601  * Similar to svn_client_add4(), but with @a add_parents always set to
01602  * FALSE and @a depth set according to @a recursive: if TRUE, then
01603  * @a depth is #svn_depth_infinity, if FALSE, then #svn_depth_empty.
01604  *
01605  * @deprecated Provided for backward compatibility with the 1.4 API.
01606  */
01607 SVN_DEPRECATED
01608 svn_error_t *
01609 svn_client_add3(const char *path,
01610                 svn_boolean_t recursive,
01611                 svn_boolean_t force,
01612                 svn_boolean_t no_ignore,
01613                 svn_client_ctx_t *ctx,
01614                 apr_pool_t *pool);
01615 
01616 /**
01617  * Similar to svn_client_add3(), but with @a no_ignore always set to
01618  * FALSE.
01619  *
01620  * @deprecated Provided for backward compatibility with the 1.2 API.
01621  */
01622 SVN_DEPRECATED
01623 svn_error_t *
01624 svn_client_add2(const char *path,
01625                 svn_boolean_t recursive,
01626                 svn_boolean_t force,
01627                 svn_client_ctx_t *ctx,
01628                 apr_pool_t *pool);
01629 
01630 /**
01631  * Similar to svn_client_add2(), but with @a force always set to FALSE.
01632  *
01633  * @deprecated Provided for backward compatibility with the 1.0 API.
01634  */
01635 SVN_DEPRECATED
01636 svn_error_t *
01637 svn_client_add(const char *path,
01638                svn_boolean_t recursive,
01639                svn_client_ctx_t *ctx,
01640                apr_pool_t *pool);
01641 
01642 /** @} */
01643 
01644 /**
01645  * @defgroup Mkdir Create directories in a working copy or repository.
01646  *
01647  * @{
01648  */
01649 
01650 /** Create a directory, either in a repository or a working copy.
01651  *
01652  * @a paths is an array of (const char *) paths, either all local WC paths
01653  * or all URLs.
01654  *
01655  * If @a paths contains URLs, use the authentication baton in @a ctx
01656  * and @a message to immediately attempt to commit the creation of the
01657  * directories in @a paths in the repository.
01658  *
01659  * Else, create the directories on disk, and attempt to schedule them
01660  * for addition (using svn_client_add(), whose docstring you should
01661  * read).
01662  *
01663  * If @a make_parents is TRUE, create any non-existent parent directories
01664  * also.
01665  *
01666  * If non-NULL, @a revprop_table is a hash table holding additional,
01667  * custom revision properties (<tt>const char *</tt> names mapped to
01668  * <tt>svn_string_t *</tt> values) to be set on the new revision in
01669  * the event that this is a committing operation.  This table cannot
01670  * contain any standard Subversion properties.
01671  *
01672  * @a ctx->log_msg_func3/@a ctx->log_msg_baton3 are a callback/baton
01673  * combo that this function can use to query for a commit log message
01674  * when one is needed.
01675  *
01676  * If @a ctx->notify_func2 is non-NULL, when the directory has been created
01677  * (successfully) in the working copy, call @a ctx->notify_func2 with
01678  * @a ctx->notify_baton2 and the path of the new directory.  Note that this is
01679  * only called for items added to the working copy.
01680  *
01681  * If @a commit_callback is non-NULL, then for each successful commit, call
01682  * @a commit_callback with @a commit_baton and a #svn_commit_info_t for
01683  * the commit.
01684  *
01685  * @since New in 1.7.
01686  */
01687 svn_error_t *
01688 svn_client_mkdir4(const apr_array_header_t *paths,
01689                   svn_boolean_t make_parents,
01690                   const apr_hash_t *revprop_table,
01691                   svn_commit_callback2_t commit_callback,
01692                   void *commit_baton,
01693                   svn_client_ctx_t *ctx,
01694                   apr_pool_t *pool);
01695 
01696 /**
01697  * Similar to svn_client_mkdir4(), but returns the commit info in
01698  * @a *commit_info_p rather than through a callback function.
01699  *
01700  * @since New in 1.5.
01701  * @deprecated Provided for backward compatibility with the 1.6 API.
01702  */
01703 SVN_DEPRECATED
01704 svn_error_t *
01705 svn_client_mkdir3(svn_commit_info_t **commit_info_p,
01706                   const apr_array_header_t *paths,
01707                   svn_boolean_t make_parents,
01708                   const apr_hash_t *revprop_table,
01709                   svn_client_ctx_t *ctx,
01710                   apr_pool_t *pool);
01711 
01712 
01713 /**
01714  * Same as svn_client_mkdir3(), but with @a make_parents always FALSE,
01715  * and @a revprop_table always NULL.
01716  *
01717  * @since New in 1.3.
01718  * @deprecated Provided for backward compatibility with the 1.4 API.
01719  */
01720 SVN_DEPRECATED
01721 svn_error_t *
01722 svn_client_mkdir2(svn_commit_info_t **commit_info_p,
01723                   const apr_array_header_t *paths,
01724                   svn_client_ctx_t *ctx,
01725                   apr_pool_t *pool);
01726 
01727 /**
01728  * Same as svn_client_mkdir2(), but takes the #svn_client_commit_info_t
01729  * type for @a commit_info_p.
01730  *
01731  * @deprecated Provided for backward compatibility with the 1.2 API.
01732  */
01733 SVN_DEPRECATED
01734 svn_error_t *
01735 svn_client_mkdir(svn_client_commit_info_t **commit_info_p,
01736                  const apr_array_header_t *paths,
01737                  svn_client_ctx_t *ctx,
01738                  apr_pool_t *pool);
01739 
01740 /** @} */
01741 
01742 /**
01743  * @defgroup Delete Remove files/directories from a working copy or repository.
01744  *
01745  * @{
01746  */
01747 
01748 /** Delete items from a repository or working copy.
01749  *
01750  * @a paths is an array of (const char *) paths, either all local WC paths
01751  * or all URLs.
01752  *
01753  * If the paths in @a paths are URLs, use the authentication baton in
01754  * @a ctx and @a ctx->log_msg_func3/@a ctx->log_msg_baton3 to
01755  * immediately attempt to commit a deletion of the URLs from the
01756  * repository.  Every path must belong to the same repository.
01757  *
01758  * Else, schedule the working copy paths in @a paths for removal from
01759  * the repository.  Each path's parent must be under revision control.
01760  * This is just a *scheduling* operation.  No changes will happen to
01761  * the repository until a commit occurs.  This scheduling can be
01762  * removed with svn_client_revert2(). If a path is a file it is
01763  * immediately removed from the working copy. If the path is a
01764  * directory it will remain in the working copy but all the files, and
01765  * all unversioned items, it contains will be removed. If @a force is
01766  * not set then this operation will fail if any path contains locally
01767  * modified and/or unversioned items. If @a force is set such items
01768  * will be deleted.
01769  *
01770  * If the paths are working copy paths and @a keep_local is TRUE then
01771  * the paths will not be removed from the working copy, only scheduled
01772  * for removal from the repository.  Once the scheduled deletion is
01773  * committed, they will appear as unversioned paths in the working copy.
01774  *
01775  * If non-NULL, @a revprop_table is a hash table holding additional,
01776  * custom revision properties (<tt>const char *</tt> names mapped to
01777  * <tt>svn_string_t *</tt> values) to be set on the new revision in
01778  * the event that this is a committing operation.  This table cannot
01779  * contain any standard Subversion properties.
01780  *
01781  * @a ctx->log_msg_func3/@a ctx->log_msg_baton3 are a callback/baton
01782  * combo that this function can use to query for a commit log message
01783  * when one is needed.
01784  *
01785  * If @a ctx->notify_func2 is non-NULL, then for each item deleted, call
01786  * @a ctx->notify_func2 with @a ctx->notify_baton2 and the path of the deleted
01787  * item.
01788  *
01789  * If @a commit_callback is non-NULL, then for each successful commit, call
01790  * @a commit_callback with @a commit_baton and a #svn_commit_info_t for
01791  * the commit.
01792  *
01793  * @since New in 1.7.
01794  */
01795 svn_error_t *
01796 svn_client_delete4(const apr_array_header_t *paths,
01797                    svn_boolean_t force,
01798                    svn_boolean_t keep_local,
01799                    const apr_hash_t *revprop_table,
01800                    svn_commit_callback2_t commit_callback,
01801                    void *commit_baton,
01802                    svn_client_ctx_t *ctx,
01803                    apr_pool_t *pool);
01804 
01805 /**
01806  * Similar to svn_client_delete4(), but returns the commit info in
01807  * @a *commit_info_p rather than through a callback function.
01808  *
01809  * @since New in 1.5.
01810  * @deprecated Provided for backward compatibility with the 1.6 API.
01811  */
01812 SVN_DEPRECATED
01813 svn_error_t *
01814 svn_client_delete3(svn_commit_info_t **commit_info_p,
01815                    const apr_array_header_t *paths,
01816                    svn_boolean_t force,
01817                    svn_boolean_t keep_local,
01818                    const apr_hash_t *revprop_table,
01819                    svn_client_ctx_t *ctx,
01820                    apr_pool_t *pool);
01821 
01822 /**
01823  * Similar to svn_client_delete3(), but with @a keep_local always set
01824  * to FALSE, and @a revprop_table passed as NULL.
01825  *
01826  * @deprecated Provided for backward compatibility with the 1.4 API.
01827  */
01828 SVN_DEPRECATED
01829 svn_error_t *
01830 svn_client_delete2(svn_commit_info_t **commit_info_p,
01831                    const apr_array_header_t *paths,
01832                    svn_boolean_t force,
01833                    svn_client_ctx_t *ctx,
01834                    apr_pool_t *pool);
01835 
01836 /**
01837  * Similar to svn_client_delete2(), but takes the #svn_client_commit_info_t
01838  * type for @a commit_info_p.
01839  *
01840  * @deprecated Provided for backward compatibility with the 1.2 API.
01841  */
01842 SVN_DEPRECATED
01843 svn_error_t *
01844 svn_client_delete(svn_client_commit_info_t **commit_info_p,
01845                   const apr_array_header_t *paths,
01846                   svn_boolean_t force,
01847                   svn_client_ctx_t *ctx,
01848                   apr_pool_t *pool);
01849 
01850 
01851 /** @} */
01852 
01853 /**
01854  * @defgroup Import Import files into the repository.
01855  *
01856  * @{
01857  */
01858 
01859 /**
01860  * The callback invoked by svn_client_import5() before adding a node to the
01861  * list of nodes to be imported.
01862  *
01863  * @a baton is the value passed to @a svn_client_import5 as filter_baton.
01864  *
01865  * The callback receives the @a local_abspath for each node and the @a dirent
01866  * for it when walking the directory tree. Only the kind of node, including
01867  * special status is available in @a dirent.
01868  *
01869  * Implementations can set @a *filtered to TRUE, to make the import
01870  * process omit the node and (if the node is a directory) all its
01871  * descendants.
01872  *
01873  * @a scratch_pool can be used for temporary allocations.
01874  *
01875  * @since New in 1.8.
01876  */
01877 typedef svn_error_t *(*svn_client_import_filter_func_t)(
01878   void *baton,
01879   svn_boolean_t *filtered,
01880   const char *local_abspath,
01881   const svn_io_dirent2_t *dirent,
01882   apr_pool_t *scratch_pool);
01883 
01884 /** Import file or directory @a path into repository directory @a url at
01885  * head, authenticating with the authentication baton cached in @a ctx,
01886  * and using @a ctx->log_msg_func3/@a ctx->log_msg_baton3 to get a log message
01887  * for the (implied) commit.  If some components of @a url do not exist
01888  * then create parent directories as necessary.
01889  *
01890  * This function reads an unversioned tree from disk and skips any ".svn"
01891  * directories. Even if a file or directory being imported is part of an
01892  * existing WC, this function sees it as unversioned and does not notice any
01893  * existing Subversion properties in it.
01894  *
01895  * If @a path is a directory, the contents of that directory are
01896  * imported directly into the directory identified by @a url.  Note that the
01897  * directory @a path itself is not imported -- that is, the basename of
01898  * @a path is not part of the import.
01899  *
01900  * If @a path is a file, then the dirname of @a url is the directory
01901  * receiving the import.  The basename of @a url is the filename in the
01902  * repository.  In this case if @a url already exists, return error.
01903  *
01904  * If @a ctx->notify_func2 is non-NULL, then call @a ctx->notify_func2 with
01905  * @a ctx->notify_baton2 as the import progresses, with any of the following
01906  * actions: #svn_wc_notify_commit_added,
01907  * #svn_wc_notify_commit_postfix_txdelta.
01908  *
01909  * Use @a scratch_pool for any temporary allocation.
01910  *
01911  * If non-NULL, @a revprop_table is a hash table holding additional,
01912  * custom revision properties (<tt>const char *</tt> names mapped to
01913  * <tt>svn_string_t *</tt> values) to be set on the new revision.
01914  * This table cannot contain any standard Subversion properties.
01915  *
01916  * @a ctx->log_msg_func3/@a ctx->log_msg_baton3 are a callback/baton
01917  * combo that this function can use to query for a commit log message
01918  * when one is needed.
01919  *
01920  * If @a depth is #svn_depth_empty, import just @a path and nothing
01921  * below it.  If #svn_depth_files, import @a path and any file
01922  * children of @a path.  If #svn_depth_immediates, import @a path, any
01923  * file children, and any immediate subdirectories (but nothing
01924  * underneath those subdirectories).  If #svn_depth_infinity, import
01925  * @a path and everything under it fully recursively.
01926  *
01927  * If @a no_ignore is @c FALSE, don't import any file or directory (or
01928  * recurse into any directory) that is found by recursion (as opposed to
01929  * being the explicit target @a path) and whose name matches the
01930  * global-ignores list in @a ctx->config. If @a no_ignore is @c TRUE, do
01931  * include such files and directories. (Note that svn:ignore properties are
01932  * not involved, as auto-props cannot set properties on directories and even
01933  * if the target is part of a WC the import ignores any existing
01934  * properties.)
01935  *
01936  * If @a no_autoprops is TRUE, don't set any autoprops on imported files. If
01937  * @a no_autoprops is FALSE then all imported files have autprops set as per
01938  * the auto-props list in @a ctx->config and the value of any
01939  * @c SVN_PROP_INHERITABLE_AUTO_PROPS properties inherited by and explicitly set
01940  * on @a url if @a url is already under versioned control, or the nearest parents
01941  * of @a path which are already under version control if not.
01942  *
01943  * If @a ignore_unknown_node_types is @c FALSE, ignore files of which the
01944  * node type is unknown, such as device files and pipes.
01945  *
01946  * If @a filter_callback is non-NULL, call it for each node that isn't ignored
01947  * for other reasons with @a filter_baton, to allow third party to ignore
01948  * specific nodes during importing.
01949  *
01950  * If @a commit_callback is non-NULL, then for each successful commit, call
01951  * @a commit_callback with @a commit_baton and a #svn_commit_info_t for
01952  * the commit.
01953  *
01954  * @since New in 1.8.
01955  */
01956 svn_error_t *
01957 svn_client_import5(const char *path,
01958                    const char *url,
01959                    svn_depth_t depth,
01960                    svn_boolean_t no_ignore,
01961                    svn_boolean_t no_autoprops,
01962                    svn_boolean_t ignore_unknown_node_types,
01963                    const apr_hash_t *revprop_table,
01964                    svn_client_import_filter_func_t filter_callback,
01965                    void *filter_baton,
01966                    svn_commit_callback2_t commit_callback,
01967                    void *commit_baton,
01968                    svn_client_ctx_t *ctx,
01969                    apr_pool_t *scratch_pool);
01970 
01971 /**
01972  * Similar to svn_client_import5(), but without support for an optional
01973  * @a filter_callback and @a no_autoprops always set to FALSE.
01974  *
01975  * @since New in 1.7.
01976  * @deprecated Provided for backward compatibility with the 1.7 API.
01977  */
01978 SVN_DEPRECATED
01979 svn_error_t *
01980 svn_client_import4(const char *path,
01981                    const char *url,
01982                    svn_depth_t depth,
01983                    svn_boolean_t no_ignore,
01984                    svn_boolean_t ignore_unknown_node_types,
01985                    const apr_hash_t *revprop_table,
01986                    svn_commit_callback2_t commit_callback,
01987                    void *commit_baton,
01988                    svn_client_ctx_t *ctx,
01989                    apr_pool_t *pool);
01990 
01991 /**
01992  * Similar to svn_client_import4(), but returns the commit info in
01993  * @a *commit_info_p rather than through a callback function.
01994  *
01995  * @since New in 1.5.
01996  * @deprecated Provided for backward compatibility with the 1.6 API.
01997  */
01998 SVN_DEPRECATED
01999 svn_error_t *
02000 svn_client_import3(svn_commit_info_t **commit_info_p,
02001                    const char *path,
02002                    const char *url,
02003                    svn_depth_t depth,
02004                    svn_boolean_t no_ignore,
02005                    svn_boolean_t ignore_unknown_node_types,
02006                    const apr_hash_t *revprop_table,
02007                    svn_client_ctx_t *ctx,
02008                    apr_pool_t *pool);
02009 
02010 /**
02011  * Similar to svn_client_import3(), but with @a ignore_unknown_node_types
02012  * always set to @c FALSE, @a revprop_table passed as NULL, and @a
02013  * depth set according to @a nonrecursive: if TRUE, then @a depth is
02014  * #svn_depth_files, else #svn_depth_infinity.
02015  *
02016  * @since New in 1.3.
02017  *
02018  * @deprecated Provided for backward compatibility with the 1.4 API
02019  */
02020 SVN_DEPRECATED
02021 svn_error_t *
02022 svn_client_import2(svn_commit_info_t **commit_info_p,
02023                    const char *path,
02024                    const char *url,
02025                    svn_boolean_t nonrecursive,
02026                    svn_boolean_t no_ignore,
02027                    svn_client_ctx_t *ctx,
02028                    apr_pool_t *pool);
02029 
02030 /**
02031  * Similar to svn_client_import2(), but with @a no_ignore always set
02032  * to FALSE and using the #svn_client_commit_info_t type for
02033  * @a commit_info_p.
02034  *
02035  * @deprecated Provided for backward compatibility with the 1.2 API.
02036  */
02037 SVN_DEPRECATED
02038 svn_error_t *
02039 svn_client_import(svn_client_commit_info_t **commit_info_p,
02040                   const char *path,
02041                   const char *url,
02042                   svn_boolean_t nonrecursive,
02043                   svn_client_ctx_t *ctx,
02044                   apr_pool_t *pool);
02045 
02046 /** @} */
02047 
02048 /**
02049  * @defgroup Commit Commit local modifications to the repository.
02050  *
02051  * @{
02052  */
02053 
02054 /**
02055  * Commit files or directories into repository, authenticating with
02056  * the authentication baton cached in @a ctx, and using
02057  * @a ctx->log_msg_func3/@a ctx->log_msg_baton3 to obtain the log message.
02058  * Set @a *commit_info_p to the results of the commit, allocated in @a pool.
02059  *
02060  * @a targets is an array of <tt>const char *</tt> paths to commit.  They
02061  * need not be canonicalized nor condensed; this function will take care of
02062  * that.  If @a targets has zero elements, then do nothing and return
02063  * immediately without error.
02064  *
02065  * If non-NULL, @a revprop_table is a hash table holding additional,
02066  * custom revision properties (<tt>const char *</tt> names mapped to
02067  * <tt>svn_string_t *</tt> values) to be set on the new revision.
02068  * This table cannot contain any standard Subversion properties.
02069  *
02070  * If @a ctx->notify_func2 is non-NULL, then call @a ctx->notify_func2 with
02071  * @a ctx->notify_baton2 as the commit progresses, with any of the following
02072  * actions: #svn_wc_notify_commit_modified, #svn_wc_notify_commit_added,
02073  * #svn_wc_notify_commit_deleted, #svn_wc_notify_commit_replaced,
02074  * #svn_wc_notify_commit_copied, #svn_wc_notify_commit_copied_replaced,
02075  * #svn_wc_notify_commit_postfix_txdelta.
02076  *
02077  * If @a depth is #svn_depth_infinity, commit all changes to and
02078  * below named targets.  If @a depth is #svn_depth_empty, commit
02079  * only named targets (that is, only property changes on named
02080  * directory targets, and property and content changes for named file
02081  * targets).  If @a depth is #svn_depth_files, behave as above for
02082  * named file targets, and for named directory targets, commit
02083  * property changes on a named directory and all changes to files
02084  * directly inside that directory.  If #svn_depth_immediates, behave
02085  * as for #svn_depth_files, and for subdirectories of any named
02086  * directory target commit as though for #svn_depth_empty.
02087  *
02088  * Unlock paths in the repository, unless @a keep_locks is TRUE.
02089  *
02090  * @a changelists is an array of <tt>const char *</tt> changelist
02091  * names, used as a restrictive filter on items that are committed;
02092  * that is, don't commit anything unless it's a member of one of those
02093  * changelists.  After the commit completes successfully, remove
02094  * changelist associations from the targets, unless @a
02095  * keep_changelists is set.  If @a changelists is
02096  * empty (or altogether @c NULL), no changelist filtering occurs.
02097  *
02098  * If @a commit_as_operations is set to FALSE, when a copy is committed
02099  * all changes below the copy are always committed at the same time
02100  * (independent of the value of @a depth). If @a commit_as_operations is
02101  * #TRUE, changes to descendants are only committed if they are itself
02102  * included via @a depth and targets.
02103  *
02104  * If @a include_file_externals and/or @a include_dir_externals are #TRUE,
02105  * also commit all file and/or dir externals (respectively) that are reached
02106  * by recursion, except for those externals which:
02107  *     - have a fixed revision, or
02108  *     - come from a different repository root URL (dir externals).
02109  * These flags affect only recursion; externals that directly appear in @a
02110  * targets are always included in the commit.
02111  *
02112  * ### TODO: currently, file externals hidden inside an unversioned dir are
02113  *     skipped deliberately, because we can't commit those yet.
02114  *     See STMT_SELECT_COMMITTABLE_EXTERNALS_BELOW.
02115  *
02116  * ### TODO: With @c depth_immediates, this function acts as if
02117  *     @a include_dir_externals was passed #FALSE, but caller expects
02118  *     immediate child dir externals to be included @c depth_empty.
02119  *
02120  * When @a commit_as_operations is #TRUE it is possible to delete a node and
02121  * all its descendants by selecting just the root of the deletion. If it is
02122  * set to #FALSE this will raise an error.
02123  *
02124  * If @a commit_callback is non-NULL, then for each successful commit, call
02125  * @a commit_callback with @a commit_baton and a #svn_commit_info_t for
02126  * the commit.
02127  *
02128  * @note #svn_depth_unknown and #svn_depth_exclude must not be passed
02129  * for @a depth.
02130  *
02131  * Use @a pool for any temporary allocations.
02132  *
02133  * @since New in 1.8.
02134  */
02135 svn_error_t *
02136 svn_client_commit6(const apr_array_header_t *targets,
02137                    svn_depth_t depth,
02138                    svn_boolean_t keep_locks,
02139                    svn_boolean_t keep_changelists,
02140                    svn_boolean_t commit_as_operations,
02141                    svn_boolean_t include_file_externals,
02142                    svn_boolean_t include_dir_externals,
02143                    const apr_array_header_t *changelists,
02144                    const apr_hash_t *revprop_table,
02145                    svn_commit_callback2_t commit_callback,
02146                    void *commit_baton,
02147                    svn_client_ctx_t *ctx,
02148                    apr_pool_t *pool);
02149 
02150 /**
02151  * Similar to svn_client_commit6(), but passes @a include_file_externals as
02152  * FALSE and @a include_dir_externals as FALSE.
02153  *
02154  * @since New in 1.7.
02155  * @deprecated Provided for backward compatibility with the 1.7 API.
02156  */
02157 SVN_DEPRECATED
02158 svn_error_t *
02159 svn_client_commit5(const apr_array_header_t *targets,
02160                    svn_depth_t depth,
02161                    svn_boolean_t keep_locks,
02162                    svn_boolean_t keep_changelists,
02163                    svn_boolean_t commit_as_operations,
02164                    const apr_array_header_t *changelists,
02165                    const apr_hash_t *revprop_table,
02166                    svn_commit_callback2_t commit_callback,
02167                    void *commit_baton,
02168                    svn_client_ctx_t *ctx,
02169                    apr_pool_t *pool);
02170 
02171 /**
02172  * Similar to svn_client_commit5(), but returns the commit info in
02173  * @a *commit_info_p rather than through a callback function.  Does not use
02174  * #svn_wc_notify_commit_copied or #svn_wc_notify_commit_copied_replaced
02175  * (preferring #svn_wc_notify_commit_added and
02176  * #svn_wc_notify_commit_replaced, respectively, instead).
02177  *
02178  * Also, if no error is returned and @a (*commit_info_p)->revision is set to
02179  * #SVN_INVALID_REVNUM, then the commit was a no-op; nothing needed to
02180  * be committed.
02181  *
02182  * Sets @a commit_as_operations to FALSE to match Subversion 1.6's behavior.
02183  *
02184  * @since New in 1.5.
02185  * @deprecated Provided for backward compatibility with the 1.6 API.
02186  */
02187 SVN_DEPRECATED
02188 svn_error_t *
02189 svn_client_commit4(svn_commit_info_t **commit_info_p,
02190                    const apr_array_header_t *targets,
02191                    svn_depth_t depth,
02192                    svn_boolean_t keep_locks,
02193                    svn_boolean_t keep_changelists,
02194                    const apr_array_header_t *changelists,
02195                    const apr_hash_t *revprop_table,
02196                    svn_client_ctx_t *ctx,
02197                    apr_pool_t *pool);
02198 
02199 /**
02200  * Similar to svn_client_commit4(), but always with NULL for
02201  * @a changelist_name, FALSE for @a keep_changelist, NULL for @a
02202  * revprop_table, and @a depth set according to @a recurse: if @a
02203  * recurse is TRUE, use #svn_depth_infinity, else #svn_depth_empty.
02204  *
02205  * @deprecated Provided for backward compatibility with the 1.4 API.
02206  *
02207  * @since New in 1.3.
02208  */
02209 SVN_DEPRECATED
02210 svn_error_t *
02211 svn_client_commit3(svn_commit_info_t **commit_info_p,
02212                    const apr_array_header_t *targets,
02213                    svn_boolean_t recurse,
02214                    svn_boolean_t keep_locks,
02215                    svn_client_ctx_t *ctx,
02216                    apr_pool_t *pool);
02217 
02218 /**
02219  * Similar to svn_client_commit3(), but uses #svn_client_commit_info_t
02220  * for @a commit_info_p.
02221  *
02222  * @deprecated Provided for backward compatibility with the 1.2 API.
02223  *
02224  * @since New in 1.2.
02225  */
02226 SVN_DEPRECATED
02227 svn_error_t *
02228 svn_client_commit2(svn_client_commit_info_t **commit_info_p,
02229                    const apr_array_header_t *targets,
02230                    svn_boolean_t recurse,
02231                    svn_boolean_t keep_locks,
02232                    svn_client_ctx_t *ctx,
02233                    apr_pool_t *pool);
02234 
02235 /**
02236  * Similar to svn_client_commit2(), but with @a keep_locks set to
02237  * TRUE and @a nonrecursive instead of @a recurse.
02238  *
02239  * @deprecated Provided for backward compatibility with the 1.1 API.
02240  */
02241 SVN_DEPRECATED
02242 svn_error_t *
02243 svn_client_commit(svn_client_commit_info_t **commit_info_p,
02244                   const apr_array_header_t *targets,
02245                   svn_boolean_t nonrecursive,
02246                   svn_client_ctx_t *ctx,
02247                   apr_pool_t *pool);
02248 
02249 /** @} */
02250 
02251 /**
02252  * @defgroup Status Report interesting information about paths in the \
02253  *                  working copy.
02254  *
02255  * @{
02256  */
02257 
02258 /**
02259  * Structure for holding the "status" of a working copy item.
02260  *
02261  * @note Fields may be added to the end of this structure in future
02262  * versions.  Therefore, to preserve binary compatibility, users
02263  * should not directly allocate structures of this type.
02264  *
02265  * @since New in 1.7.
02266  */
02267 typedef struct svn_client_status_t
02268 {
02269   /** The kind of node as recorded in the working copy */
02270   svn_node_kind_t kind;
02271 
02272   /** The absolute path to the node */
02273   const char *local_abspath;
02274 
02275   /** The actual size of the working file on disk, or SVN_INVALID_FILESIZE
02276    * if unknown (or if the item isn't a file at all). */
02277   svn_filesize_t filesize;
02278 
02279   /** If the path is under version control, versioned is TRUE, otherwise
02280    * FALSE. */
02281   svn_boolean_t versioned;
02282 
02283   /** Set to TRUE if the node is the victim of some kind of conflict. */
02284   svn_boolean_t conflicted;
02285 
02286   /** The status of the node, based on the restructuring changes and if the
02287    * node has no restructuring changes the text and prop status. */
02288   enum svn_wc_status_kind node_status;
02289 
02290   /** The status of the text of the node, not including restructuring changes.
02291    * Valid values are: svn_wc_status_none, svn_wc_status_normal,
02292    * svn_wc_status_modified and svn_wc_status_conflicted. */
02293   enum svn_wc_status_kind text_status;
02294 
02295   /** The status of the node's properties.
02296    * Valid values are: svn_wc_status_none, svn_wc_status_normal,
02297    * svn_wc_status_modified and svn_wc_status_conflicted. */
02298   enum svn_wc_status_kind prop_status;
02299 
02300   /** A node can be 'locked' if a working copy update is in progress or
02301    * was interrupted. */
02302   svn_boolean_t wc_is_locked;
02303 
02304   /** A file or directory can be 'copied' if it's scheduled for
02305    * addition-with-history (or part of a subtree that is scheduled as such.).
02306    */
02307   svn_boolean_t copied;
02308 
02309   /** The URL of the repository root. */
02310   const char *repos_root_url;
02311 
02312   /** The UUID of the repository */
02313   const char *repos_uuid;
02314 
02315   /** The in-repository path relative to the repository root. */
02316   const char *repos_relpath;
02317 
02318   /** Base revision. */
02319   svn_revnum_t revision;
02320 
02321   /** Last revision this was changed */
02322   svn_revnum_t changed_rev;
02323 
02324   /** Date of last commit. */
02325   apr_time_t changed_date;
02326 
02327   /** Last commit author of this item */
02328   const char *changed_author;
02329 
02330   /** A file or directory can be 'switched' if the switch command has been
02331    * used.  If this is TRUE, then file_external will be FALSE.
02332    */
02333   svn_boolean_t switched;
02334 
02335   /** If the item is a file that was added to the working copy with an
02336    * svn:externals; if file_external is TRUE, then switched is always
02337    * FALSE.
02338    */
02339   svn_boolean_t file_external;
02340 
02341   /** The locally present lock. (Values of path, token, owner, comment and
02342    * are available if a lock is present) */
02343   const svn_lock_t *lock;
02344 
02345   /** Which changelist this item is part of, or NULL if not part of any. */
02346   const char *changelist;
02347 
02348   /** The depth of the node as recorded in the working copy
02349    * (#svn_depth_unknown for files or when no depth is recorded) */
02350   svn_depth_t depth;
02351 
02352   /**
02353    * @defgroup svn_wc_status_ood WC out-of-date info from the repository
02354    * @{
02355    *
02356    * When the working copy item is out-of-date compared to the
02357    * repository, the following fields represent the state of the
02358    * youngest revision of the item in the repository.  If the working
02359    * copy is not out of date, the fields are initialized as described
02360    * below.
02361    */
02362 
02363   /** Set to the node kind of the youngest commit, or #svn_node_none
02364    * if not out of date. */
02365   svn_node_kind_t ood_kind;
02366 
02367   /** The status of the node, based on the text status if the node has no
02368    * restructuring changes */
02369   enum svn_wc_status_kind repos_node_status;
02370 
02371   /** The node's text status in the repository. */
02372   enum svn_wc_status_kind repos_text_status;
02373 
02374   /** The node's property status in the repository. */
02375   enum svn_wc_status_kind repos_prop_status;
02376 
02377   /** The node's lock in the repository, if any. */
02378   const svn_lock_t *repos_lock;
02379 
02380   /** Set to the youngest committed revision, or #SVN_INVALID_REVNUM
02381    * if not out of date. */
02382   svn_revnum_t ood_changed_rev;
02383 
02384   /** Set to the most recent commit date, or @c 0 if not out of date. */
02385   apr_time_t ood_changed_date;
02386 
02387   /** Set to the user name of the youngest commit, or @c NULL if not
02388    * out of date or non-existent.  Because a non-existent @c
02389    * svn:author property has the same behavior as an out-of-date
02390    * working copy, examine @c ood_changed_rev to determine whether
02391    * the working copy is out of date. */
02392   const char *ood_changed_author;
02393 
02394   /** @} */
02395 
02396   /** Reserved for libsvn_client's internal use; this value is only to be used
02397    * for libsvn_client backwards compatibility wrappers. This value may be NULL
02398    * or to other data in future versions. */
02399   const void *backwards_compatibility_baton;
02400 
02401   /** Set to the local absolute path that this node was moved from, if this
02402    * file or directory has been moved here locally and is the root of that
02403    * move. Otherwise set to NULL.
02404    *
02405    * This will be NULL for moved-here nodes that are just part of a subtree
02406    * that was moved along (and are not themselves a root of a different move
02407    * operation).
02408    *
02409    * @since New in 1.8. */
02410   const char *moved_from_abspath;
02411 
02412   /** Set to the local absolute path that this node was moved to, if this file
02413    * or directory has been moved away locally and corresponds to the root
02414    * of the destination side of the move. Otherwise set to NULL.
02415    *
02416    * Note: Saying just "root" here could be misleading. For example:
02417    *   svn mv A AA;
02418    *   svn mv AA/B BB;
02419    * creates a situation where A/B is moved-to BB, but one could argue that
02420    * the move source's root actually was AA/B. Note that, as far as the
02421    * working copy is concerned, above case is exactly identical to:
02422    *   svn mv A/B BB;
02423    *   svn mv A AA;
02424    * In both situations, @a moved_to_abspath would be set for nodes A (moved
02425    * to AA) and A/B (moved to BB), only.
02426    *
02427    * This will be NULL for moved-away nodes that were just part of a subtree
02428    * that was moved along (and are not themselves a root of a different move
02429    * operation).
02430    *
02431    * @since New in 1.8. */
02432   const char *moved_to_abspath;
02433 
02434   /* NOTE! Please update svn_client_status_dup() when adding new fields here. */
02435 } svn_client_status_t;
02436 
02437 /**
02438  * Return a duplicate of @a status, allocated in @a result_pool. No part of the new
02439  * structure will be shared with @a status.
02440  *
02441  * @since New in 1.7.
02442  */
02443 svn_client_status_t *
02444 svn_client_status_dup(const svn_client_status_t *status,
02445                       apr_pool_t *result_pool);
02446 
02447 /**
02448  * A callback for reporting a @a status about @a path (which may be an
02449  * absolute or relative path).
02450  *
02451  * @a baton is a closure object; it should be provided by the
02452  * implementation, and passed by the caller.
02453  *
02454  * @a scratch_pool will be cleared between invocations to the callback.
02455  *
02456  * @since New in 1.7.
02457  */
02458 typedef svn_error_t *(*svn_client_status_func_t)(
02459                                             void *baton,
02460                                             const char *path,
02461                                             const svn_client_status_t *status,
02462                                             apr_pool_t *scratch_pool);
02463 
02464 /**
02465  * Given @a path to a working copy directory (or single file), call
02466  * @a status_func/status_baton with a set of #svn_wc_status_t *
02467  * structures which describe the status of @a path, and its children
02468  * (recursing according to @a depth).
02469  *
02470  *    - If @a get_all is set, retrieve all entries; otherwise,
02471  *      retrieve only "interesting" entries (local mods and/or
02472  *      out of date).
02473  *
02474  *    - If @a update is set, contact the repository and augment the
02475  *      status structures with information about out-of-dateness (with
02476  *      respect to @a revision).  Also, if @a result_rev is not @c NULL,
02477  *      set @a *result_rev to the actual revision against which the
02478  *      working copy was compared (@a *result_rev is not meaningful unless
02479  *      @a update is set).
02480  *
02481  * If @a no_ignore is @c FALSE, don't report any file or directory (or
02482  * recurse into any directory) that is found by recursion (as opposed to
02483  * being the explicit target @a path) and whose name matches the
02484  * svn:ignore property on its parent directory or the global-ignores
02485  * list in @a ctx->config. If @a no_ignore is @c TRUE, report each such
02486  * file or directory with the status code #svn_wc_status_ignored.
02487  *
02488  * If @a ignore_externals is not set, then recurse into externals
02489  * definitions (if any exist) after handling the main target.  This
02490  * calls the client notification function (in @a ctx) with the
02491  * #svn_wc_notify_status_external action before handling each externals
02492  * definition, and with #svn_wc_notify_status_completed
02493  * after each.
02494  *
02495  * If @a depth_as_sticky is set and @a depth is not
02496  * #svn_depth_unknown, then the status is calculated as if depth_is_sticky
02497  * was passed to an equivalent update command.
02498  *
02499  * @a changelists is an array of <tt>const char *</tt> changelist
02500  * names, used as a restrictive filter on items whose statuses are
02501  * reported; that is, don't report status about any item unless
02502  * it's a member of one of those changelists.  If @a changelists is
02503  * empty (or altogether @c NULL), no changelist filtering occurs.
02504  *
02505  * If @a path is an absolute path then the @c path parameter passed in each
02506  * call to @a status_func will be an absolute path.
02507  *
02508  * All temporary allocations are performed in @a scratch_pool.
02509  *
02510  * @since New in 1.7.
02511  */
02512 svn_error_t *
02513 svn_client_status5(svn_revnum_t *result_rev,
02514                    svn_client_ctx_t *ctx,
02515                    const char *path,
02516                    const svn_opt_revision_t *revision,
02517                    svn_depth_t depth,
02518                    svn_boolean_t get_all,
02519                    svn_boolean_t update,
02520                    svn_boolean_t no_ignore,
02521                    svn_boolean_t ignore_externals,
02522                    svn_boolean_t depth_as_sticky,
02523                    const apr_array_header_t *changelists,
02524                    svn_client_status_func_t status_func,
02525                    void *status_baton,
02526                    apr_pool_t *scratch_pool);
02527 
02528 /**
02529  * Same as svn_client_status5(), but using #svn_wc_status_func3_t
02530  * instead of #svn_client_status_func_t and depth_as_sticky set to TRUE.
02531  *
02532  * @since New in 1.6.
02533  * @deprecated Provided for backward compatibility with the 1.6 API.
02534  */
02535 SVN_DEPRECATED
02536 svn_error_t *
02537 svn_client_status4(svn_revnum_t *result_rev,
02538                    const char *path,
02539                    const svn_opt_revision_t *revision,
02540                    svn_wc_status_func3_t status_func,
02541                    void *status_baton,
02542                    svn_depth_t depth,
02543                    svn_boolean_t get_all,
02544                    svn_boolean_t update,
02545                    svn_boolean_t no_ignore,
02546                    svn_boolean_t ignore_externals,
02547                    const apr_array_header_t *changelists,
02548                    svn_client_ctx_t *ctx,
02549                    apr_pool_t *pool);
02550 
02551 /**
02552  * Same as svn_client_status4(), but using an #svn_wc_status_func2_t
02553  * instead of an #svn_wc_status_func3_t.
02554  *
02555  * @since New in 1.5.
02556  * @deprecated Provided for backward compatibility with the 1.5 API.
02557  */
02558 SVN_DEPRECATED
02559 svn_error_t *
02560 svn_client_status3(svn_revnum_t *result_rev,
02561                    const char *path,
02562                    const svn_opt_revision_t *revision,
02563                    svn_wc_status_func2_t status_func,
02564                    void *status_baton,
02565                    svn_depth_t depth,
02566                    svn_boolean_t get_all,
02567                    svn_boolean_t update,
02568                    svn_boolean_t no_ignore,
02569                    svn_boolean_t ignore_externals,
02570                    const apr_array_header_t *changelists,
02571                    svn_client_ctx_t *ctx,
02572                    apr_pool_t *pool);
02573 
02574 /**
02575  * Like svn_client_status3(), except with @a changelists passed as @c
02576  * NULL, and with @a recurse instead of @a depth.  If @a recurse is
02577  * TRUE, behave as if for #svn_depth_infinity; else if @a recurse is
02578  * FALSE, behave as if for #svn_depth_immediates.
02579  *
02580  * @since New in 1.2.
02581  * @deprecated Provided for backward compatibility with the 1.4 API.
02582  */
02583 SVN_DEPRECATED
02584 svn_error_t *
02585 svn_client_status2(svn_revnum_t *result_rev,
02586                    const char *path,
02587                    const svn_opt_revision_t *revision,
02588                    svn_wc_status_func2_t status_func,
02589                    void *status_baton,
02590                    svn_boolean_t recurse,
02591                    svn_boolean_t get_all,
02592                    svn_boolean_t update,
02593                    svn_boolean_t no_ignore,
02594                    svn_boolean_t ignore_externals,
02595                    svn_client_ctx_t *ctx,
02596                    apr_pool_t *pool);
02597 
02598 
02599 /**
02600  * Similar to svn_client_status2(), but with @a ignore_externals
02601  * always set to FALSE, taking the #svn_wc_status_func_t type
02602  * instead of the #svn_wc_status_func2_t type for @a status_func,
02603  * and requiring @a *revision to be non-const even though it is
02604  * treated as constant.
02605  *
02606  * @deprecated Provided for backward compatibility with the 1.1 API.
02607  */
02608 SVN_DEPRECATED
02609 svn_error_t *
02610 svn_client_status(svn_revnum_t *result_rev,
02611                   const char *path,
02612                   svn_opt_revision_t *revision,
02613                   svn_wc_status_func_t status_func,
02614                   void *status_baton,
02615                   svn_boolean_t recurse,
02616                   svn_boolean_t get_all,
02617                   svn_boolean_t update,
02618                   svn_boolean_t no_ignore,
02619                   svn_client_ctx_t *ctx,
02620                   apr_pool_t *pool);
02621 
02622 /** @} */
02623 
02624 /**
02625  * @defgroup Log View information about previous revisions of an object.
02626  *
02627  * @{
02628  */
02629 
02630 /**
02631  * Invoke @a receiver with @a receiver_baton on each log message from
02632  * each (#svn_opt_revision_range_t *) range in @a revision_ranges in turn,
02633  * inclusive (but never invoke @a receiver on a given log message more
02634  * than once).
02635  *
02636  * @a targets contains either a URL followed by zero or more relative
02637  * paths, or 1 working copy path, as <tt>const char *</tt>, for which log
02638  * messages are desired.  @a receiver is invoked only on messages whose
02639  * revisions involved a change to some path in @a targets.  @a peg_revision
02640  * indicates in which revision @a targets are valid.  If @a peg_revision is
02641  * #svn_opt_revision_unspecified, it defaults to #svn_opt_revision_head
02642  * for URLs or #svn_opt_revision_working for WC paths.
02643  *
02644  * If @a limit is non-zero only invoke @a receiver on the first @a limit
02645  * logs.
02646  *
02647  * If @a discover_changed_paths is set, then the @c changed_paths and @c
02648  * changed_paths2 fields in the @c log_entry argument to @a receiver will be
02649  * populated on each invocation.  @note The @c text_modified and @c
02650  * props_modified fields of the changed paths structure may have the value
02651  * #svn_tristate_unknown if the repository does not report that information.
02652  *
02653  * If @a strict_node_history is set, copy history (if any exists) will
02654  * not be traversed while harvesting revision logs for each target.
02655  *
02656  * If @a include_merged_revisions is set, log information for revisions
02657  * which have been merged to @a targets will also be returned.
02658  *
02659  * If @a revprops is NULL, retrieve all revision properties; else, retrieve
02660  * only the revision properties named by the (const char *) array elements
02661  * (i.e. retrieve none if the array is empty).
02662  *
02663  * Use @a pool for any temporary allocation.
02664  *
02665  * If @a ctx->notify_func2 is non-NULL, then call @a ctx->notify_func2/baton2
02666  * with a 'skip' signal on any unversioned targets.
02667  *
02668  * @since New in 1.6.
02669  */
02670 svn_error_t *
02671 svn_client_log5(const apr_array_header_t *targets,
02672                 const svn_opt_revision_t *peg_revision,
02673                 const apr_array_header_t *revision_ranges,
02674                 int limit,
02675                 svn_boolean_t discover_changed_paths,
02676                 svn_boolean_t strict_node_history,
02677                 svn_boolean_t include_merged_revisions,
02678                 const apr_array_header_t *revprops,
02679                 svn_log_entry_receiver_t receiver,
02680                 void *receiver_baton,
02681                 svn_client_ctx_t *ctx,
02682                 apr_pool_t *pool);
02683 
02684 /**
02685  * Similar to svn_client_log5(), but takes explicit start and end parameters
02686  * instead of an array of revision ranges.
02687  *
02688  * @deprecated Provided for compatibility with the 1.5 API.
02689  * @since New in 1.5.
02690  */
02691 SVN_DEPRECATED
02692 svn_error_t *
02693 svn_client_log4(const apr_array_header_t *targets,
02694                 const svn_opt_revision_t *peg_revision,
02695                 const svn_opt_revision_t *start,
02696                 const svn_opt_revision_t *end,
02697                 int limit,
02698                 svn_boolean_t discover_changed_paths,
02699                 svn_boolean_t strict_node_history,
02700                 svn_boolean_t include_merged_revisions,
02701                 const apr_array_header_t *revprops,
02702                 svn_log_entry_receiver_t receiver,
02703                 void *receiver_baton,
02704                 svn_client_ctx_t *ctx,
02705                 apr_pool_t *pool);
02706 
02707 /**
02708  * Similar to svn_client_log4(), but using #svn_log_message_receiver_t
02709  * instead of #svn_log_entry_receiver_t.  Also, @a
02710  * include_merged_revisions is set to @c FALSE and @a revprops is
02711  * svn:author, svn:date, and svn:log.
02712  *
02713  * @deprecated Provided for compatibility with the 1.4 API.
02714  * @since New in 1.4.
02715  */
02716 SVN_DEPRECATED
02717 svn_error_t *
02718 svn_client_log3(const apr_array_header_t *targets,
02719                 const svn_opt_revision_t *peg_revision,
02720                 const svn_opt_revision_t *start,
02721                 const svn_opt_revision_t *end,
02722                 int limit,
02723                 svn_boolean_t discover_changed_paths,
02724                 svn_boolean_t strict_node_history,
02725                 svn_log_message_receiver_t receiver,
02726                 void *receiver_baton,
02727                 svn_client_ctx_t *ctx,
02728                 apr_pool_t *pool);
02729 
02730 
02731 /**
02732  * Similar to svn_client_log3(), but with the @c kind field of
02733  * @a peg_revision set to #svn_opt_revision_unspecified.
02734  *
02735  * @par Important:
02736  * A special case for the revision range HEAD:1, which was present
02737  * in svn_client_log(), has been removed from svn_client_log2().  Instead, it
02738  * is expected that callers will specify the range HEAD:0, to avoid a
02739  * #SVN_ERR_FS_NO_SUCH_REVISION error when invoked against an empty repository
02740  * (i.e. one not containing a revision 1).
02741  *
02742  * @deprecated Provided for compatibility with the 1.3 API.
02743  * @since New in 1.2.
02744  */
02745 SVN_DEPRECATED
02746 svn_error_t *
02747 svn_client_log2(const apr_array_header_t *targets,
02748                 const svn_opt_revision_t *start,
02749                 const svn_opt_revision_t *end,
02750                 int limit,
02751                 svn_boolean_t discover_changed_paths,
02752                 svn_boolean_t strict_node_history,
02753                 svn_log_message_receiver_t receiver,
02754                 void *receiver_baton,
02755                 svn_client_ctx_t *ctx,
02756                 apr_pool_t *pool);
02757 
02758 
02759 /**
02760  * Similar to svn_client_log2(), but with @a limit set to 0, and the
02761  * following special case:
02762  *
02763  * Special case for repositories at revision 0:
02764  *
02765  * If @a start->kind is #svn_opt_revision_head, and @a end->kind is
02766  * #svn_opt_revision_number && @a end->number is @c 1, then handle an
02767  * empty (no revisions) repository specially: instead of erroring
02768  * because requested revision 1 when the highest revision is 0, just
02769  * invoke @a receiver on revision 0, passing @c NULL for changed paths and
02770  * empty strings for the author and date.  This is because that
02771  * particular combination of @a start and @a end usually indicates the
02772  * common case of log invocation -- the user wants to see all log
02773  * messages from youngest to oldest, where the oldest commit is
02774  * revision 1.  That works fine, except when there are no commits in
02775  * the repository, hence this special case.
02776  *
02777  * @deprecated Provided for backward compatibility with the 1.1 API.
02778  */
02779 SVN_DEPRECATED
02780 svn_error_t *
02781 svn_client_log(const apr_array_header_t *targets,
02782                const svn_opt_revision_t *start,
02783                const svn_opt_revision_t *end,
02784                svn_boolean_t discover_changed_paths,
02785                svn_boolean_t strict_node_history,
02786                svn_log_message_receiver_t receiver,
02787                void *receiver_baton,
02788                svn_client_ctx_t *ctx,
02789                apr_pool_t *pool);
02790 
02791 /** @} */
02792 
02793 /**
02794  * @defgroup Blame Show modification information about lines in a file.
02795  *
02796  * @{
02797  */
02798 
02799 /**
02800  * Invoke @a receiver with @a receiver_baton on each line-blame item
02801  * associated with revision @a end of @a path_or_url, using @a start
02802  * as the default source of all blame.  @a peg_revision indicates in
02803  * which revision @a path_or_url is valid.  If @a peg_revision->kind
02804  * is #svn_opt_revision_unspecified, then it defaults to
02805  * #svn_opt_revision_head for URLs or #svn_opt_revision_working for
02806  * WC targets.
02807  *
02808  * If @a start->kind or @a end->kind is #svn_opt_revision_unspecified,
02809  * return the error #SVN_ERR_CLIENT_BAD_REVISION.  If either are
02810  * #svn_opt_revision_working, return the error
02811  * #SVN_ERR_UNSUPPORTED_FEATURE.  If any of the revisions of @a
02812  * path_or_url have a binary mime-type, return the error
02813  * #SVN_ERR_CLIENT_IS_BINARY_FILE, unless @a ignore_mime_type is TRUE,
02814  * in which case blame information will be generated regardless of the
02815  * MIME types of the revisions.
02816  *
02817  * Use @a diff_options to determine how to compare different revisions of the
02818  * target.
02819  *
02820  * If @a include_merged_revisions is TRUE, also return data based upon
02821  * revisions which have been merged to @a path_or_url.
02822  *
02823  * Use @a pool for any temporary allocation.
02824  *
02825  * @since New in 1.7.
02826  */
02827 svn_error_t *
02828 svn_client_blame5(const char *path_or_url,
02829                   const svn_opt_revision_t *peg_revision,
02830                   const svn_opt_revision_t *start,
02831                   const svn_opt_revision_t *end,
02832                   const svn_diff_file_options_t *diff_options,
02833                   svn_boolean_t ignore_mime_type,
02834                   svn_boolean_t include_merged_revisions,
02835                   svn_client_blame_receiver3_t receiver,
02836                   void *receiver_baton,
02837                   svn_client_ctx_t *ctx,
02838                   apr_pool_t *pool);
02839 
02840 
02841 /**
02842  * Similar to svn_client_blame5(), but with #svn_client_blame_receiver3_t
02843  * as the receiver.
02844  *
02845  * @deprecated Provided for backwards compatibility with the 1.6 API.
02846  *
02847  * @since New in 1.5.
02848  */
02849 SVN_DEPRECATED
02850 svn_error_t *
02851 svn_client_blame4(const char *path_or_url,
02852                   const svn_opt_revision_t *peg_revision,
02853                   const svn_opt_revision_t *start,
02854                   const svn_opt_revision_t *end,
02855                   const svn_diff_file_options_t *diff_options,
02856                   svn_boolean_t ignore_mime_type,
02857                   svn_boolean_t include_merged_revisions,
02858                   svn_client_blame_receiver2_t receiver,
02859                   void *receiver_baton,
02860                   svn_client_ctx_t *ctx,
02861                   apr_pool_t *pool);
02862 
02863 /**
02864  * Similar to svn_client_blame4(), but with @a include_merged_revisions set
02865  * to FALSE, and using a #svn_client_blame_receiver2_t as the receiver.
02866  *
02867  * @deprecated Provided for backwards compatibility with the 1.4 API.
02868  *
02869  * @since New in 1.4.
02870  */
02871 SVN_DEPRECATED
02872 svn_error_t *
02873 svn_client_blame3(const char *path_or_url,
02874                   const svn_opt_revision_t *peg_revision,
02875                   const svn_opt_revision_t *start,
02876                   const svn_opt_revision_t *end,
02877                   const svn_diff_file_options_t *diff_options,
02878                   svn_boolean_t ignore_mime_type,
02879                   svn_client_blame_receiver_t receiver,
02880                   void *receiver_baton,
02881                   svn_client_ctx_t *ctx,
02882                   apr_pool_t *pool);
02883 
02884 /**
02885  * Similar to svn_client_blame3(), but with @a diff_options set to
02886  * default options as returned by svn_diff_file_options_parse() and
02887  * @a ignore_mime_type set to FALSE.
02888  *
02889  * @deprecated Provided for backwards compatibility with the 1.3 API.
02890  *
02891  * @since New in 1.2.
02892  */
02893 SVN_DEPRECATED
02894 svn_error_t *
02895 svn_client_blame2(const char *path_or_url,
02896                   const svn_opt_revision_t *peg_revision,
02897                   const svn_opt_revision_t *start,
02898                   const svn_opt_revision_t *end,
02899                   svn_client_blame_receiver_t receiver,
02900                   void *receiver_baton,
02901                   svn_client_ctx_t *ctx,
02902                   apr_pool_t *pool);
02903 
02904 /**
02905  * Similar to svn_client_blame2() except that @a peg_revision is always
02906  * the same as @a end.
02907  *
02908  * @deprecated Provided for backward compatibility with the 1.1 API.
02909  */
02910 SVN_DEPRECATED
02911 svn_error_t *
02912 svn_client_blame(const char *path_or_url,
02913                  const svn_opt_revision_t *start,
02914                  const svn_opt_revision_t *end,
02915                  svn_client_blame_receiver_t receiver,
02916                  void *receiver_baton,
02917                  svn_client_ctx_t *ctx,
02918                  apr_pool_t *pool);
02919 
02920 /** @} */
02921 
02922 /**
02923  * @defgroup Diff Generate differences between paths.
02924  *
02925  * @{
02926  */
02927 
02928 /**
02929  * Produce diff output which describes the delta between
02930  * @a path_or_url1/@a revision1 and @a path_or_url2/@a revision2.  Print
02931  * the output of the diff to @a outstream, and any errors to @a
02932  * errstream.  @a path_or_url1 and @a path_or_url2 can be either
02933  * working-copy paths or URLs.
02934  *
02935  * If @a relative_to_dir is not @c NULL, the original path and
02936  * modified path will have the @a relative_to_dir stripped from the
02937  * front of the respective paths.  If @a relative_to_dir is @c NULL,
02938  * paths will not be modified.  If @a relative_to_dir is not
02939  * @c NULL but @a relative_to_dir is not a parent path of the target,
02940  * an error is returned. Finally, if @a relative_to_dir is a URL, an
02941  * error will be returned.
02942  *
02943  * If either @a revision1 or @a revision2 has an `unspecified' or
02944  * unrecognized `kind', return #SVN_ERR_CLIENT_BAD_REVISION.
02945  *
02946  * @a path_or_url1 and @a path_or_url2 must both represent the same node
02947  * kind -- that is, if @a path_or_url1 is a directory, @a path_or_url2
02948  * must also be, and if @a path_or_url1 is a file, @a path_or_url2 must
02949  * also be.
02950  *
02951  * If @a depth is #svn_depth_infinity, diff fully recursively.
02952  * Else if it is #svn_depth_immediates, diff the named paths and
02953  * their file children (if any), and diff properties of
02954  * subdirectories, but do not descend further into the subdirectories.
02955  * Else if #svn_depth_files, behave as if for #svn_depth_immediates
02956  * except don't diff properties of subdirectories.  If
02957  * #svn_depth_empty, diff exactly the named paths but nothing
02958  * underneath them.
02959  *
02960  * Use @a ignore_ancestry to control whether or not items being
02961  * diffed will be checked for relatedness first.  Unrelated items
02962  * are typically transmitted to the editor as a deletion of one thing
02963  * and the addition of another, but if this flag is TRUE, unrelated
02964  * items will be diffed as if they were related.
02965  *
02966  * If @a no_diff_added is TRUE, then no diff output will be generated
02967  * on added files.
02968  *
02969  * If @a no_diff_deleted is TRUE, then no diff output will be
02970  * generated on deleted files.
02971  *
02972  * If @a show_copies_as_adds is TRUE, then copied files will not be diffed
02973  * against their copyfrom source, and will appear in the diff output
02974  * in their entirety, as if they were newly added.
02975  * ### BUGS: For a repos-repos diff, this is ignored. Instead, a file is
02976  *     diffed against its copyfrom source iff the file is the diff target
02977  *     and not if some parent directory is the diff target. For a repos-WC
02978  *     diff, this is ignored if the file is the diff target.
02979  *
02980  * If @a use_git_diff_format is TRUE, then the git's extended diff format
02981  * will be used.
02982  * ### Do we need to say more about the format? A reference perhaps?
02983  *
02984  * If @a ignore_properties is TRUE, do not show property differences.
02985  * If @a properties_only is TRUE, show only property changes.
02986  * The above two options are mutually exclusive. It is an error to set
02987  * both to TRUE.
02988  *
02989  * Generated headers are encoded using @a header_encoding.
02990  *
02991  * Diff output will not be generated for binary files, unless @a
02992  * ignore_content_type is TRUE, in which case diffs will be shown
02993  * regardless of the content types.
02994  *
02995  * @a diff_options (an array of <tt>const char *</tt>) is used to pass
02996  * additional command line options to the diff processes invoked to compare
02997  * files. @a diff_options is allowed to be @c NULL, in which case a value
02998  * for this option might still be obtained from the Subversion configuration
02999  * file via client context @a ctx.
03000  *
03001  * The authentication baton cached in @a ctx is used to communicate with
03002  * the repository.
03003  *
03004  * @a changelists is an array of <tt>const char *</tt> changelist
03005  * names, used as a restrictive filter on items whose differences are
03006  * reported; that is, don't generate diffs about any item unless
03007  * it's a member of one of those changelists.  If @a changelists is
03008  * empty (or altogether @c NULL), no changelist filtering occurs.
03009  *
03010  * @note Changelist filtering only applies to diffs in which at least
03011  * one side of the diff represents working copy data.
03012  *
03013  * @note @a header_encoding doesn't affect headers generated by external
03014  * diff programs.
03015  *
03016  * @note @a relative_to_dir doesn't affect the path index generated by
03017  * external diff programs.
03018  *
03019  * @since New in 1.8.
03020  */
03021 svn_error_t *
03022 svn_client_diff6(const apr_array_header_t *diff_options,
03023                  const char *path_or_url1,
03024                  const svn_opt_revision_t *revision1,
03025                  const char *path_or_url2,
03026                  const svn_opt_revision_t *revision2,
03027                  const char *relative_to_dir,
03028                  svn_depth_t depth,
03029                  svn_boolean_t ignore_ancestry,
03030                  svn_boolean_t no_diff_added,
03031                  svn_boolean_t no_diff_deleted,
03032                  svn_boolean_t show_copies_as_adds,
03033                  svn_boolean_t ignore_content_type,
03034                  svn_boolean_t ignore_properties,
03035                  svn_boolean_t properties_only,
03036                  svn_boolean_t use_git_diff_format,
03037                  const char *header_encoding,
03038                  svn_stream_t *outstream,
03039                  svn_stream_t *errstream,
03040                  const apr_array_header_t *changelists,
03041                  svn_client_ctx_t *ctx,
03042                  apr_pool_t *pool);
03043 
03044 /** Similar to svn_client_diff6(), but with @a outfile and @a errfile,
03045  * instead of @a outstream and @a errstream, and with @a
03046  * no_diff_added, @a ignore_properties, and @a properties_only always
03047  * passed as @c FALSE (which means that additions and property changes
03048  * are always transmitted).
03049  *
03050  * @deprecated Provided for backward compatibility with the 1.7 API.
03051  * @since New in 1.7.
03052  */
03053 SVN_DEPRECATED
03054 svn_error_t *
03055 svn_client_diff5(const apr_array_header_t *diff_options,
03056                  const char *path1,
03057                  const svn_opt_revision_t *revision1,
03058                  const char *path2,
03059                  const svn_opt_revision_t *revision2,
03060                  const char *relative_to_dir,
03061                  svn_depth_t depth,
03062                  svn_boolean_t ignore_ancestry,
03063                  svn_boolean_t no_diff_deleted,
03064                  svn_boolean_t show_copies_as_adds,
03065                  svn_boolean_t ignore_content_type,
03066                  svn_boolean_t use_git_diff_format,
03067                  const char *header_encoding,
03068                  apr_file_t *outfile,
03069                  apr_file_t *errfile,
03070                  const apr_array_header_t *changelists,
03071                  svn_client_ctx_t *ctx,
03072                  apr_pool_t *pool);
03073 
03074 /**
03075  * Similar to svn_client_diff5(), but with @a show_copies_as_adds set to
03076  * @c FALSE and @a use_git_diff_format set to @c FALSE.
03077  *
03078  * @deprecated Provided for backward compatibility with the 1.6 API.
03079  * @since New in 1.5.
03080  */
03081 SVN_DEPRECATED
03082 svn_error_t *
03083 svn_client_diff4(const apr_array_header_t *diff_options,
03084                  const char *path1,
03085                  const svn_opt_revision_t *revision1,
03086                  const char *path2,
03087                  const svn_opt_revision_t *revision2,
03088                  const char *relative_to_dir,
03089                  svn_depth_t depth,
03090                  svn_boolean_t ignore_ancestry,
03091                  svn_boolean_t no_diff_deleted,
03092                  svn_boolean_t ignore_content_type,
03093                  const char *header_encoding,
03094                  apr_file_t *outfile,
03095                  apr_file_t *errfile,
03096                  const apr_array_header_t *changelists,
03097                  svn_client_ctx_t *ctx,
03098                  apr_pool_t *pool);
03099 
03100 /**
03101  * Similar to svn_client_diff4(), but with @a changelists passed as @c
03102  * NULL, and @a depth set according to @a recurse: if @a recurse is
03103  * TRUE, set @a depth to #svn_depth_infinity, if @a recurse is
03104  * FALSE, set @a depth to #svn_depth_empty.
03105  *
03106  * @deprecated Provided for backward compatibility with the 1.4 API.
03107  * @since New in 1.3.
03108  */
03109 SVN_DEPRECATED
03110 svn_error_t *
03111 svn_client_diff3(const apr_array_header_t *diff_options,
03112                  const char *path1,
03113                  const svn_opt_revision_t *revision1,
03114                  const char *path2,
03115                  const svn_opt_revision_t *revision2,
03116                  svn_boolean_t recurse,
03117                  svn_boolean_t ignore_ancestry,
03118                  svn_boolean_t no_diff_deleted,
03119                  svn_boolean_t ignore_content_type,
03120                  const char *header_encoding,
03121                  apr_file_t *outfile,
03122                  apr_file_t *errfile,
03123                  svn_client_ctx_t *ctx,
03124                  apr_pool_t *pool);
03125 
03126 
03127 /**
03128  * Similar to svn_client_diff3(), but with @a header_encoding set to
03129  * @c APR_LOCALE_CHARSET.
03130  *
03131  * @deprecated Provided for backward compatibility with the 1.2 API.
03132  * @since New in 1.2.
03133  */
03134 SVN_DEPRECATED
03135 svn_error_t *
03136 svn_client_diff2(const apr_array_header_t *diff_options,
03137                  const char *path1,
03138                  const svn_opt_revision_t *revision1,
03139                  const char *path2,
03140                  const svn_opt_revision_t *revision2,
03141                  svn_boolean_t recurse,
03142                  svn_boolean_t ignore_ancestry,
03143                  svn_boolean_t no_diff_deleted,
03144                  svn_boolean_t ignore_content_type,
03145                  apr_file_t *outfile,
03146                  apr_file_t *errfile,
03147                  svn_client_ctx_t *ctx,
03148                  apr_pool_t *pool);
03149 
03150 /**
03151  * Similar to svn_client_diff2(), but with @a ignore_content_type
03152  * always set to FALSE.
03153  *
03154  * @deprecated Provided for backward compatibility with the 1.1 API.
03155  */
03156 SVN_DEPRECATED
03157 svn_error_t *
03158 svn_client_diff(const apr_array_header_t *diff_options,
03159                 const char *path1,
03160                 const svn_opt_revision_t *revision1,
03161                 const char *path2,
03162                 const svn_opt_revision_t *revision2,
03163                 svn_boolean_t recurse,
03164                 svn_boolean_t ignore_ancestry,
03165                 svn_boolean_t no_diff_deleted,
03166                 apr_file_t *outfile,
03167                 apr_file_t *errfile,
03168                 svn_client_ctx_t *ctx,
03169                 apr_pool_t *pool);
03170 
03171 /**
03172  * Produce diff output which describes the delta between the filesystem
03173  * object @a path_or_url in peg revision @a peg_revision, as it changed
03174  * between @a start_revision and @a end_revision.  @a path_or_url can
03175  * be either a working-copy path or URL.
03176  *
03177  * If @a peg_revision is #svn_opt_revision_unspecified, behave
03178  * identically to svn_client_diff6(), using @a path_or_url for both of that
03179  * function's @a path_or_url1 and @a path_or_url2 arguments.
03180  *
03181  * All other options are handled identically to svn_client_diff6().
03182  *
03183  * @since New in 1.8.
03184  */
03185 svn_error_t *
03186 svn_client_diff_peg6(const apr_array_header_t *diff_options,
03187                      const char *path_or_url,
03188                      const svn_opt_revision_t *peg_revision,
03189                      const svn_opt_revision_t *start_revision,
03190                      const svn_opt_revision_t *end_revision,
03191                      const char *relative_to_dir,
03192                      svn_depth_t depth,
03193                      svn_boolean_t ignore_ancestry,
03194                      svn_boolean_t no_diff_added,
03195                      svn_boolean_t no_diff_deleted,
03196                      svn_boolean_t show_copies_as_adds,
03197                      svn_boolean_t ignore_content_type,
03198                      svn_boolean_t ignore_properties,
03199                      svn_boolean_t properties_only,
03200                      svn_boolean_t use_git_diff_format,
03201                      const char *header_encoding,
03202                      svn_stream_t *outstream,
03203                      svn_stream_t *errstream,
03204                      const apr_array_header_t *changelists,
03205                      svn_client_ctx_t *ctx,
03206                      apr_pool_t *pool);
03207 
03208 /** Similar to svn_client_diff6_peg6(), but with @a outfile and @a errfile,
03209  * instead of @a outstream and @a errstream, and with @a
03210  * no_diff_added, @a ignore_properties, and @a properties_only always
03211  * passed as @c FALSE (which means that additions and property changes
03212  * are always transmitted).
03213  *
03214  * @deprecated Provided for backward compatibility with the 1.7 API.
03215  * @since New in 1.7.
03216  */
03217 SVN_DEPRECATED
03218 svn_error_t *
03219 svn_client_diff_peg5(const apr_array_header_t *diff_options,
03220                      const char *path,
03221                      const svn_opt_revision_t *peg_revision,
03222                      const svn_opt_revision_t *start_revision,
03223                      const svn_opt_revision_t *end_revision,
03224                      const char *relative_to_dir,
03225                      svn_depth_t depth,
03226                      svn_boolean_t ignore_ancestry,
03227                      svn_boolean_t no_diff_deleted,
03228                      svn_boolean_t show_copies_as_adds,
03229                      svn_boolean_t ignore_content_type,
03230                      svn_boolean_t use_git_diff_format,
03231                      const char *header_encoding,
03232                      apr_file_t *outfile,
03233                      apr_file_t *errfile,
03234                      const apr_array_header_t *changelists,
03235                      svn_client_ctx_t *ctx,
03236                      apr_pool_t *pool);
03237 
03238 /**
03239  * Similar to svn_client_diff_peg5(), but with @a show_copies_as_adds set to
03240  * @c FALSE and @a use_git_diff_format set to @c FALSE.
03241  *
03242  * @since New in 1.5.
03243  * @deprecated Provided for backward compatibility with the 1.6 API.
03244  */
03245 SVN_DEPRECATED
03246 svn_error_t *
03247 svn_client_diff_peg4(const apr_array_header_t *diff_options,
03248                      const char *path,
03249                      const svn_opt_revision_t *peg_revision,
03250                      const svn_opt_revision_t *start_revision,
03251                      const svn_opt_revision_t *end_revision,
03252                      const char *relative_to_dir,
03253                      svn_depth_t depth,
03254                      svn_boolean_t ignore_ancestry,
03255                      svn_boolean_t no_diff_deleted,
03256                      svn_boolean_t ignore_content_type,
03257                      const char *header_encoding,
03258                      apr_file_t *outfile,
03259                      apr_file_t *errfile,
03260                      const apr_array_header_t *changelists,
03261                      svn_client_ctx_t *ctx,
03262                      apr_pool_t *pool);
03263 
03264 /**
03265  * Similar to svn_client_diff_peg4(), but with @a changelists passed
03266  * as @c NULL, and @a depth set according to @a recurse: if @a recurse
03267  * is TRUE, set @a depth to #svn_depth_infinity, if @a recurse is
03268  * FALSE, set @a depth to #svn_depth_files.
03269  *
03270  * @deprecated Provided for backward compatibility with the 1.4 API.
03271  * @since New in 1.3.
03272  */
03273 SVN_DEPRECATED
03274 svn_error_t *
03275 svn_client_diff_peg3(const apr_array_header_t *diff_options,
03276                      const char *path,
03277                      const svn_opt_revision_t *peg_revision,
03278                      const svn_opt_revision_t *start_revision,
03279                      const svn_opt_revision_t *end_revision,
03280                      svn_boolean_t recurse,
03281                      svn_boolean_t ignore_ancestry,
03282                      svn_boolean_t no_diff_deleted,
03283                      svn_boolean_t ignore_content_type,
03284                      const char *header_encoding,
03285                      apr_file_t *outfile,
03286                      apr_file_t *errfile,
03287                      svn_client_ctx_t *ctx,
03288                      apr_pool_t *pool);
03289 
03290 /**
03291  * Similar to svn_client_diff_peg3(), but with @a header_encoding set to
03292  * @c APR_LOCALE_CHARSET.
03293  *
03294  * @deprecated Provided for backward compatibility with the 1.2 API.
03295  * @since New in 1.2.
03296  */
03297 SVN_DEPRECATED
03298 svn_error_t *
03299 svn_client_diff_peg2(const apr_array_header_t *diff_options,
03300                      const char *path,
03301                      const svn_opt_revision_t *peg_revision,
03302                      const svn_opt_revision_t *start_revision,
03303                      const svn_opt_revision_t *end_revision,
03304                      svn_boolean_t recurse,
03305                      svn_boolean_t ignore_ancestry,
03306                      svn_boolean_t no_diff_deleted,
03307                      svn_boolean_t ignore_content_type,
03308                      apr_file_t *outfile,
03309                      apr_file_t *errfile,
03310                      svn_client_ctx_t *ctx,
03311                      apr_pool_t *pool);
03312 
03313 /**
03314  * Similar to svn_client_diff_peg2(), but with @a ignore_content_type
03315  * always set to FALSE.
03316  *
03317  * @since New in 1.1.
03318  * @deprecated Provided for backward compatibility with the 1.1 API.
03319  */
03320 SVN_DEPRECATED
03321 svn_error_t *
03322 svn_client_diff_peg(const apr_array_header_t *diff_options,
03323                     const char *path,
03324                     const svn_opt_revision_t *peg_revision,
03325                     const svn_opt_revision_t *start_revision,
03326                     const svn_opt_revision_t *end_revision,
03327                     svn_boolean_t recurse,
03328                     svn_boolean_t ignore_ancestry,
03329                     svn_boolean_t no_diff_deleted,
03330                     apr_file_t *outfile,
03331                     apr_file_t *errfile,
03332                     svn_client_ctx_t *ctx,
03333                     apr_pool_t *pool);
03334 
03335 /**
03336  * Produce a diff summary which lists the changed items between
03337  * @a path_or_url1/@a revision1 and @a path_or_url2/@a revision2 without
03338  * creating text deltas. @a path_or_url1 and @a path_or_url2 can be
03339  * either working-copy paths or URLs.
03340  *
03341  * The function may report false positives if @a ignore_ancestry is false,
03342  * since a file might have been modified between two revisions, but still
03343  * have the same contents.
03344  *
03345  * Calls @a summarize_func with @a summarize_baton for each difference
03346  * with a #svn_client_diff_summarize_t structure describing the difference.
03347  *
03348  * See svn_client_diff6() for a description of the other parameters.
03349  *
03350  * @since New in 1.5.
03351  */
03352 svn_error_t *
03353 svn_client_diff_summarize2(const char *path_or_url1,
03354                            const svn_opt_revision_t *revision1,
03355                            const char *path_or_url2,
03356                            const svn_opt_revision_t *revision2,
03357                            svn_depth_t depth,
03358                            svn_boolean_t ignore_ancestry,
03359                            const apr_array_header_t *changelists,
03360                            svn_client_diff_summarize_func_t summarize_func,
03361                            void *summarize_baton,
03362                            svn_client_ctx_t *ctx,
03363                            apr_pool_t *pool);
03364 
03365 /**
03366  * Similar to svn_client_diff_summarize2(), but with @a changelists
03367  * passed as @c NULL, and @a depth set according to @a recurse: if @a
03368  * recurse is TRUE, set @a depth to #svn_depth_infinity, if @a
03369  * recurse is FALSE, set @a depth to #svn_depth_files.
03370  *
03371  * @deprecated Provided for backward compatibility with the 1.4 API.
03372  *
03373  * @since New in 1.4.
03374  */
03375 SVN_DEPRECATED
03376 svn_error_t *
03377 svn_client_diff_summarize(const char *path1,
03378                           const svn_opt_revision_t *revision1,
03379                           const char *path2,
03380                           const svn_opt_revision_t *revision2,
03381                           svn_boolean_t recurse,
03382                           svn_boolean_t ignore_ancestry,
03383                           svn_client_diff_summarize_func_t summarize_func,
03384                           void *summarize_baton,
03385                           svn_client_ctx_t *ctx,
03386                           apr_pool_t *pool);
03387 
03388 /**
03389  * Produce a diff summary which lists the changed items between the
03390  * filesystem object @a path_or_url in peg revision @a peg_revision, as it
03391  * changed between @a start_revision and @a end_revision. @a path_or_url can
03392  * be either a working-copy path or URL.
03393  *
03394  * If @a peg_revision is #svn_opt_revision_unspecified, behave
03395  * identically to svn_client_diff_summarize2(), using @a path_or_url for
03396  * both of that function's @a path_or_url1 and @a path_or_url2 arguments.
03397  *
03398  * The function may report false positives if @a ignore_ancestry is false,
03399  * as described in the documentation for svn_client_diff_summarize2().
03400  *
03401  * Call @a summarize_func with @a summarize_baton for each difference
03402  * with a #svn_client_diff_summarize_t structure describing the difference.
03403  *
03404  * See svn_client_diff_peg5() for a description of the other parameters.
03405  *
03406  * @since New in 1.5.
03407  */
03408 svn_error_t *
03409 svn_client_diff_summarize_peg2(const char *path_or_url,
03410                                const svn_opt_revision_t *peg_revision,
03411                                const svn_opt_revision_t *start_revision,
03412                                const svn_opt_revision_t *end_revision,
03413                                svn_depth_t depth,
03414                                svn_boolean_t ignore_ancestry,
03415                                const apr_array_header_t *changelists,
03416                                svn_client_diff_summarize_func_t summarize_func,
03417                                void *summarize_baton,
03418                                svn_client_ctx_t *ctx,
03419                                apr_pool_t *pool);
03420 
03421 /**
03422  * Similar to svn_client_diff_summarize_peg2(), but with @a
03423  * changelists passed as @c NULL, and @a depth set according to @a
03424  * recurse: if @a recurse is TRUE, set @a depth to
03425  * #svn_depth_infinity, if @a recurse is FALSE, set @a depth to
03426  * #svn_depth_files.
03427  *
03428  * @deprecated Provided for backward compatibility with the 1.4 API.
03429  *
03430  * @since New in 1.4.
03431  */
03432 SVN_DEPRECATED
03433 svn_error_t *
03434 svn_client_diff_summarize_peg(const char *path,
03435                               const svn_opt_revision_t *peg_revision,
03436                               const svn_opt_revision_t *start_revision,
03437                               const svn_opt_revision_t *end_revision,
03438                               svn_boolean_t recurse,
03439                               svn_boolean_t ignore_ancestry,
03440                               svn_client_diff_summarize_func_t summarize_func,
03441                               void *summarize_baton,
03442                               svn_client_ctx_t *ctx,
03443                               apr_pool_t *pool);
03444 
03445 /** @} */
03446 
03447 /**
03448  * @defgroup Merge Merge changes between branches.
03449  *
03450  * @{
03451  */
03452 
03453 /** Get information about the state of merging between two branches.
03454  *
03455  * The source is specified by @a source_path_or_url at @a source_revision.
03456  * The target is specified by @a target_path_or_url at @a target_revision,
03457  * which refers to either a WC or a repository location.
03458  *
03459  * Set @a *needs_reintegration to true if an automatic merge from source
03460  * to target would be a reintegration merge: that is, if the last automatic
03461  * merge was in the opposite direction; or to false otherwise.
03462  *
03463  * Set @a *yca_url, @a *yca_rev, @a *base_url, @a *base_rev, @a *right_url,
03464  * @a *right_rev, @a *target_url, @a *target_rev to the repository locations
03465  * of, respectively: the youngest common ancestor of the branches, the base
03466  * chosen for 3-way merge, the right-hand side of the source diff, and the
03467  * target.
03468  *
03469  * Set @a repos_root_url to the URL of the repository root.  This is a
03470  * common prefix of all four URL outputs.
03471  *
03472  * Allocate the results in @a result_pool.  Any of the output pointers may
03473  * be NULL if not wanted.
03474  *
03475  * @since New in 1.8.
03476  */
03477 svn_error_t *
03478 svn_client_get_merging_summary(svn_boolean_t *needs_reintegration,
03479                                const char **yca_url, svn_revnum_t *yca_rev,
03480                                const char **base_url, svn_revnum_t *base_rev,
03481                                const char **right_url, svn_revnum_t *right_rev,
03482                                const char **target_url, svn_revnum_t *target_rev,
03483                                const char **repos_root_url,
03484                                const char *source_path_or_url,
03485                                const svn_opt_revision_t *source_revision,
03486                                const char *target_path_or_url,
03487                                const svn_opt_revision_t *target_revision,
03488                                svn_client_ctx_t *ctx,
03489                                apr_pool_t *result_pool,
03490                                apr_pool_t *scratch_pool);
03491 
03492 
03493 /** Merge changes from @a source1/@a revision1 to @a source2/@a revision2 into
03494  * the working-copy path @a target_wcpath.
03495  *
03496  * @a source1 and @a source2 are either URLs that refer to entries in the
03497  * repository, or paths to entries in the working copy.
03498  *
03499  * By "merging", we mean:  apply file differences using
03500  * svn_wc_merge(), and schedule additions & deletions when appropriate.
03501  *
03502  * @a source1 and @a source2 must both represent the same node kind -- that
03503  * is, if @a source1 is a directory, @a source2 must also be, and if @a source1
03504  * is a file, @a source2 must also be.
03505  *
03506  * If either @a revision1 or @a revision2 has an `unspecified' or
03507  * unrecognized `kind', return #SVN_ERR_CLIENT_BAD_REVISION.
03508  *
03509  * If @a depth is #svn_depth_infinity, merge fully recursively.
03510  * Else if #svn_depth_immediates, merge changes at most to files
03511  * that are immediate children of @a target_wcpath and to directory
03512  * properties of @a target_wcpath and its immediate subdirectory children.
03513  * Else if #svn_depth_files, merge at most to immediate file
03514  * children of @a target_wcpath and to @a target_wcpath itself.
03515  * Else if #svn_depth_empty, apply changes only to @a target_wcpath
03516  * (i.e., directory property changes only)
03517  *
03518  * If @a depth is #svn_depth_unknown, use the depth of @a target_wcpath.
03519  *
03520  * If @a ignore_mergeinfo is true, disable merge tracking, by treating the
03521  * two sources as unrelated even if they actually have a common ancestor.
03522  *
03523  * If @a diff_ignore_ancestry is true, diff unrelated nodes as if related:
03524  * that is, diff the 'left' and 'right' versions of a node as if they were
03525  * related (if they are the same kind) even if they are not related.
03526  * Otherwise, diff unrelated items as a deletion of one thing and the
03527  * addition of another.
03528  *
03529  * If @a force_delete is false and the merge involves deleting a file whose
03530  * content differs from the source-left version, or a locally modified
03531  * directory, or an unversioned item, then the operation will fail.  If
03532  * @a force_delete is true then all such items will be deleted.
03533  *
03534  * @a merge_options (an array of <tt>const char *</tt>), if non-NULL,
03535  * is used to pass additional command line arguments to the merge
03536  * processes (internal or external).  @see
03537  * svn_diff_file_options_parse().
03538  *
03539  * If @a ctx->notify_func2 is non-NULL, then call @a ctx->notify_func2 with @a
03540  * ctx->notify_baton2 once for each merged target, passing the target's local
03541  * path.
03542  *
03543  * If @a record_only is TRUE, the merge is performed, but is limited only to
03544  * mergeinfo property changes on existing paths in @a target_wcpath.
03545  *
03546  * If @a dry_run is TRUE, the merge is carried out, and full notification
03547  * feedback is provided, but the working copy is not modified.
03548  *
03549  * If allow_mixed_rev is @c FALSE, and @a merge_target is a mixed-revision
03550  * working copy, raise @c SVN_ERR_CLIENT_MERGE_UPDATE_REQUIRED.
03551  * Because users rarely intend to merge into mixed-revision working copies,
03552  * it is recommended to set this parameter to FALSE by default unless the
03553  * user has explicitly requested a merge into a mixed-revision working copy.
03554  *
03555  * The authentication baton cached in @a ctx is used to communicate with the
03556  * repository.
03557  *
03558  * @since New in 1.8.
03559  */
03560 svn_error_t *
03561 svn_client_merge5(const char *source1,
03562                   const svn_opt_revision_t *revision1,
03563                   const char *source2,
03564                   const svn_opt_revision_t *revision2,
03565                   const char *target_wcpath,
03566                   svn_depth_t depth,
03567                   svn_boolean_t ignore_mergeinfo,
03568                   svn_boolean_t diff_ignore_ancestry,
03569                   svn_boolean_t force_delete,
03570                   svn_boolean_t record_only,
03571                   svn_boolean_t dry_run,
03572                   svn_boolean_t allow_mixed_rev,
03573                   const apr_array_header_t *merge_options,
03574                   svn_client_ctx_t *ctx,
03575                   apr_pool_t *pool);
03576 
03577 /**
03578  * Similar to svn_client_merge5(), but the single @a ignore_ancestry
03579  * parameter maps to both @c ignore_mergeinfo and @c diff_ignore_ancestry.
03580  *
03581  * @deprecated Provided for backward compatibility with the 1.7 API.
03582  * @since New in 1.7.
03583  */
03584 SVN_DEPRECATED
03585 svn_error_t *
03586 svn_client_merge4(const char *source1,
03587                   const svn_opt_revision_t *revision1,
03588                   const char *source2,
03589                   const svn_opt_revision_t *revision2,
03590                   const char *target_wcpath,
03591                   svn_depth_t depth,
03592                   svn_boolean_t ignore_ancestry,
03593                   svn_boolean_t force_delete,
03594                   svn_boolean_t record_only,
03595                   svn_boolean_t dry_run,
03596                   svn_boolean_t allow_mixed_rev,
03597                   const apr_array_header_t *merge_options,
03598                   svn_client_ctx_t *ctx,
03599                   apr_pool_t *pool);
03600 
03601 /**
03602  * Similar to svn_client_merge4(), but with @a allow_mixed_rev set to
03603  * @c TRUE.  The @a force parameter maps to the @c force_delete parameter
03604  * of svn_client_merge4().
03605  *
03606  * @deprecated Provided for backward compatibility with the 1.6 API.
03607  *
03608  * @since New in 1.5.
03609  */
03610 SVN_DEPRECATED
03611 svn_error_t *
03612 svn_client_merge3(const char *source1,
03613                   const svn_opt_revision_t *revision1,
03614                   const char *source2,
03615                   const svn_opt_revision_t *revision2,
03616                   const char *target_wcpath,
03617                   svn_depth_t depth,
03618                   svn_boolean_t ignore_ancestry,
03619                   svn_boolean_t force,
03620                   svn_boolean_t record_only,
03621                   svn_boolean_t dry_run,
03622                   const apr_array_header_t *merge_options,
03623                   svn_client_ctx_t *ctx,
03624                   apr_pool_t *pool);
03625 
03626 /**
03627  * Similar to svn_client_merge3(), but with @a record_only set to @c
03628  * FALSE, and @a depth set according to @a recurse: if @a recurse is
03629  * TRUE, set @a depth to #svn_depth_infinity, if @a recurse is
03630  * FALSE, set @a depth to #svn_depth_files.
03631  *
03632  * @deprecated Provided for backward compatibility with the 1.4 API.
03633  *
03634  * @since New in 1.4.
03635  */
03636 SVN_DEPRECATED
03637 svn_error_t *
03638 svn_client_merge2(const char *source1,
03639                   const svn_opt_revision_t *revision1,
03640                   const char *source2,
03641                   const svn_opt_revision_t *revision2,
03642                   const char *target_wcpath,
03643                   svn_boolean_t recurse,
03644                   svn_boolean_t ignore_ancestry,
03645                   svn_boolean_t force,
03646                   svn_boolean_t dry_run,
03647                   const apr_array_header_t *merge_options,
03648                   svn_client_ctx_t *ctx,
03649                   apr_pool_t *pool);
03650 
03651 
03652 /**
03653  * Similar to svn_client_merge2(), but with @a merge_options set to NULL.
03654  *
03655  * @deprecated Provided for backwards compatibility with the 1.3 API.
03656  */
03657 SVN_DEPRECATED
03658 svn_error_t *
03659 svn_client_merge(const char *source1,
03660                  const svn_opt_revision_t *revision1,
03661                  const char *source2,
03662                  const svn_opt_revision_t *revision2,
03663                  const char *target_wcpath,
03664                  svn_boolean_t recurse,
03665                  svn_boolean_t ignore_ancestry,
03666                  svn_boolean_t force,
03667                  svn_boolean_t dry_run,
03668                  svn_client_ctx_t *ctx,
03669                  apr_pool_t *pool);
03670 
03671 
03672 /**
03673  * Perform a reintegration merge of @a source_path_or_url at @a source_peg_revision
03674  * into @a target_wcpath.
03675  * @a target_wcpath must be a single-revision, #svn_depth_infinity,
03676  * pristine, unswitched working copy -- in other words, it must
03677  * reflect a single revision tree, the "target".  The mergeinfo on @a
03678  * source_path_or_url must reflect that all of the target has been merged into it.
03679  * Then this behaves like a merge with svn_client_merge5() from the
03680  * target's URL to the source.
03681  *
03682  * All other options are handled identically to svn_client_merge5().
03683  * The depth of the merge is always #svn_depth_infinity.
03684  *
03685  * @since New in 1.5.
03686  * @deprecated Provided for backwards compatibility with the 1.7 API.
03687  */
03688 SVN_DEPRECATED
03689 svn_error_t *
03690 svn_client_merge_reintegrate(const char *source_path_or_url,
03691                              const svn_opt_revision_t *source_peg_revision,
03692                              const char *target_wcpath,
03693                              svn_boolean_t dry_run,
03694                              const apr_array_header_t *merge_options,
03695                              svn_client_ctx_t *ctx,
03696                              apr_pool_t *pool);
03697 
03698 /**
03699  * Merge changes from the source branch identified by
03700  * @a source_path_or_url in peg revision @a source_peg_revision,
03701  * into the target branch working copy at @a target_wcpath.
03702  *
03703  * If @a ranges_to_merge is NULL then perform an automatic merge of
03704  * all the eligible changes up to @a source_peg_revision.  If the merge
03705  * required is a reintegrate merge, then return an error if the WC has
03706  * mixed revisions, local modifications and/or switched subtrees; if
03707  * the merge is determined to be of the non-reintegrate kind, then
03708  * return an error if @a allow_mixed_rev is false and the WC contains
03709  * mixed revisions.
03710  *
03711  * If @a ranges_to_merge is not NULL then merge the changes specified
03712  * by the revision ranges in @a ranges_to_merge, or, when honouring
03713  * mergeinfo, only the eligible parts of those revision ranges.
03714  * @a ranges_to_merge is an array of <tt>svn_opt_revision_range_t
03715  * *</tt> ranges.  These ranges may describe additive and/or
03716  * subtractive merge ranges, they may overlap fully or partially,
03717  * and/or they may partially or fully negate each other.  This
03718  * rangelist is not required to be sorted.  If any revision in the
03719  * list of provided ranges has an `unspecified' or unrecognized
03720  * `kind', return #SVN_ERR_CLIENT_BAD_REVISION.
03721  *
03722  * If @a ranges_to_merge is an empty array, then do nothing.
03723  *
03724  * All other options are handled identically to svn_client_merge5().
03725  *
03726  * @since New in 1.8.
03727  */
03728 svn_error_t *
03729 svn_client_merge_peg5(const char *source_path_or_url,
03730                       const apr_array_header_t *ranges_to_merge,
03731                       const svn_opt_revision_t *source_peg_revision,
03732                       const char *target_wcpath,
03733                       svn_depth_t depth,
03734                       svn_boolean_t ignore_mergeinfo,
03735                       svn_boolean_t diff_ignore_ancestry,
03736                       svn_boolean_t force_delete,
03737                       svn_boolean_t record_only,
03738                       svn_boolean_t dry_run,
03739                       svn_boolean_t allow_mixed_rev,
03740                       const apr_array_header_t *merge_options,
03741                       svn_client_ctx_t *ctx,
03742                       apr_pool_t *pool);
03743 
03744 /**
03745  * Similar to svn_client_merge_peg5(), but automatic merge is not available
03746  * (@a ranges_to_merge must not be NULL), and the single @a ignore_ancestry
03747  * parameter maps to both @c ignore_mergeinfo and @c diff_ignore_ancestry.
03748  *
03749  * @deprecated Provided for backward compatibility with the 1.7 API.
03750  * @since New in 1.7.
03751  */
03752 SVN_DEPRECATED
03753 svn_error_t *
03754 svn_client_merge_peg4(const char *source_path_or_url,
03755                       const apr_array_header_t *ranges_to_merge,
03756                       const svn_opt_revision_t *source_peg_revision,
03757                       const char *target_wcpath,
03758                       svn_depth_t depth,
03759                       svn_boolean_t ignore_ancestry,
03760                       svn_boolean_t force_delete,
03761                       svn_boolean_t record_only,
03762                       svn_boolean_t dry_run,
03763                       svn_boolean_t allow_mixed_rev,
03764                       const apr_array_header_t *merge_options,
03765                       svn_client_ctx_t *ctx,
03766                       apr_pool_t *pool);
03767 
03768 /**
03769  * Similar to svn_client_merge_peg4(), but with @a allow_mixed_rev set to
03770  * @c TRUE.  The @a force parameter maps to the @c force_delete parameter
03771  * of svn_client_merge_peg4().
03772  *
03773  * @deprecated Provided for backward compatibility with the 1.6 API.
03774  *
03775  * @since New in 1.5.
03776  */
03777 SVN_DEPRECATED
03778 svn_error_t *
03779 svn_client_merge_peg3(const char *source,
03780                       const apr_array_header_t *ranges_to_merge,
03781                       const svn_opt_revision_t *peg_revision,
03782                       const char *target_wcpath,
03783                       svn_depth_t depth,
03784                       svn_boolean_t ignore_ancestry,
03785                       svn_boolean_t force,
03786                       svn_boolean_t record_only,
03787                       svn_boolean_t dry_run,
03788                       const apr_array_header_t *merge_options,
03789                       svn_client_ctx_t *ctx,
03790                       apr_pool_t *pool);
03791 
03792 /**
03793  * Similar to svn_client_merge_peg3(), but with @a record_only set to
03794  * @c FALSE, and @a depth set according to @a recurse: if @a recurse
03795  * is TRUE, set @a depth to #svn_depth_infinity, if @a recurse is
03796  * FALSE, set @a depth to #svn_depth_files.
03797  *
03798  * @deprecated Provided for backwards compatibility with the 1.4 API.
03799  *
03800  * @since New in 1.4.
03801  */
03802 SVN_DEPRECATED
03803 svn_error_t *
03804 svn_client_merge_peg2(const char *source,
03805                       const svn_opt_revision_t *revision1,
03806                       const svn_opt_revision_t *revision2,
03807                       const svn_opt_revision_t *peg_revision,
03808                       const char *target_wcpath,
03809                       svn_boolean_t recurse,
03810                       svn_boolean_t ignore_ancestry,
03811                       svn_boolean_t force,
03812                       svn_boolean_t dry_run,
03813                       const apr_array_header_t *merge_options,
03814                       svn_client_ctx_t *ctx,
03815                       apr_pool_t *pool);
03816 
03817 /**
03818  * Similar to svn_client_merge_peg2(), but with @a merge_options set to
03819  * NULL.
03820  *
03821  * @deprecated Provided for backwards compatibility with the 1.3 API.
03822  *
03823  * @since New in 1.1.
03824  */
03825 SVN_DEPRECATED
03826 svn_error_t *
03827 svn_client_merge_peg(const char *source,
03828                      const svn_opt_revision_t *revision1,
03829                      const svn_opt_revision_t *revision2,
03830                      const svn_opt_revision_t *peg_revision,
03831                      const char *target_wcpath,
03832                      svn_boolean_t recurse,
03833                      svn_boolean_t ignore_ancestry,
03834                      svn_boolean_t force,
03835                      svn_boolean_t dry_run,
03836                      svn_client_ctx_t *ctx,
03837                      apr_pool_t *pool);
03838 
03839 
03840 /** Set @a suggestions to an ordered array of @c const char *
03841  * potential merge sources (expressed as full repository URLs) for @a
03842  * path_or_url at @a peg_revision.  @a path_or_url is a working copy
03843  * path or repository URL.  @a ctx is a context used for
03844  * authentication in the repository case.  Use @a pool for all
03845  * allocations.
03846  *
03847  * @since New in 1.5.
03848  */
03849 svn_error_t *
03850 svn_client_suggest_merge_sources(apr_array_header_t **suggestions,
03851                                  const char *path_or_url,
03852                                  const svn_opt_revision_t *peg_revision,
03853                                  svn_client_ctx_t *ctx,
03854                                  apr_pool_t *pool);
03855 
03856 
03857 /**
03858  * Get the mergeinfo for a single target node (ignoring any subtrees).
03859  *
03860  * Set @a *mergeinfo to a hash mapping <tt>const char *</tt> merge source
03861  * URLs to <tt>svn_rangelist_t *</tt> rangelists describing the ranges which
03862  * have been merged into @a path_or_url as of @a peg_revision, per
03863  * @a path_or_url's explicit mergeinfo or inherited mergeinfo if no
03864  * explicit mergeinfo if found.  If no explicit or inherited mergeinfo
03865  * is found, then set @a *mergeinfo to NULL.
03866  *
03867  * Use @a pool for all necessary allocations.
03868  *
03869  * If the server doesn't support retrieval of mergeinfo (which will
03870  * never happen for file:// URLs), return an
03871  * #SVN_ERR_UNSUPPORTED_FEATURE error.
03872  *
03873  * @note Unlike most APIs which deal with mergeinfo, this one returns
03874  * data where the keys of the hash are absolute repository URLs rather
03875  * than repository filesystem paths.
03876  *
03877  * @since New in 1.5.
03878  */
03879 svn_error_t *
03880 svn_client_mergeinfo_get_merged(apr_hash_t **mergeinfo,
03881                                 const char *path_or_url,
03882                                 const svn_opt_revision_t *peg_revision,
03883                                 svn_client_ctx_t *ctx,
03884                                 apr_pool_t *pool);
03885 
03886 
03887 /**
03888  * Describe the revisions that either have or have not been merged from
03889  * one source branch (or subtree) into another.
03890  *
03891  * If @a finding_merged is TRUE, then drive log entry callbacks
03892  * @a receiver / @a receiver_baton with the revisions merged from
03893  * @a source_path_or_url (as of @a source_peg_revision) into
03894  * @a target_path_or_url (as of @a target_peg_revision).  If @a
03895  * finding_merged is FALSE then find the revisions eligible for merging.
03896  *
03897  * If both @a source_start_revision and @a source_end_revision are
03898  * unspecified (that is, of kind @c svn_opt_revision_unspecified),
03899  * @a receiver will be called the requested revisions from 0 to
03900  * @a source_peg_revision and in that order (that is, oldest to
03901  * youngest).  Otherwise, both @a source_start_revision and
03902  * @a source_end_revision must be specified, which has two effects:
03903  *
03904  *   - @a receiver will be called only with revisions which fall
03905  *     within range of @a source_start_revision to
03906  *     @a source_end_revision, inclusive, and
03907  *
03908  *   - those revisions will be ordered in the same "direction" as the
03909  *     walk from @a source_start_revision to @a source_end_revision.
03910  *     (If @a source_start_revision is the younger of the two, @a
03911  *     receiver will be called with revisions in youngest-to-oldest
03912  *     order; otherwise, the reverse occurs.)
03913  *
03914  * If @a depth is #svn_depth_empty consider only the explicit or
03915  * inherited mergeinfo on @a target_path_or_url when calculating merged
03916  * revisions from @a source_path_or_url.  If @a depth is #svn_depth_infinity
03917  * then also consider the explicit subtree mergeinfo under @a
03918  * target_path_or_url.
03919  * If a depth other than #svn_depth_empty or #svn_depth_infinity is
03920  * requested then return a #SVN_ERR_UNSUPPORTED_FEATURE error.
03921  *
03922  * @a discover_changed_paths and @a revprops are the same as for
03923  * svn_client_log5().  Use @a scratch_pool for all temporary allocations.
03924  *
03925  * @a ctx is a context used for authentication.
03926  *
03927  * If the server doesn't support retrieval of mergeinfo, return an
03928  * #SVN_ERR_UNSUPPORTED_FEATURE error.
03929  *
03930  * @since New in 1.8.
03931  */
03932 svn_error_t *
03933 svn_client_mergeinfo_log2(svn_boolean_t finding_merged,
03934                           const char *target_path_or_url,
03935                           const svn_opt_revision_t *target_peg_revision,
03936                           const char *source_path_or_url,
03937                           const svn_opt_revision_t *source_peg_revision,
03938                           const svn_opt_revision_t *source_start_revision,
03939                           const svn_opt_revision_t *source_end_revision,
03940                           svn_log_entry_receiver_t receiver,
03941                           void *receiver_baton,
03942                           svn_boolean_t discover_changed_paths,
03943                           svn_depth_t depth,
03944                           const apr_array_header_t *revprops,
03945                           svn_client_ctx_t *ctx,
03946                           apr_pool_t *scratch_pool);
03947 
03948 /**
03949  * Similar to svn_client_mergeinfo_log2(), but with @a source_start_revision
03950  * and @a source_end_revision always of kind @c svn_opt_revision_unspecified;
03951  *
03952  * @deprecated Provided for backwards compatibility with the 1.7 API.
03953  * @since New in 1.7.
03954  */
03955 SVN_DEPRECATED
03956 svn_error_t *
03957 svn_client_mergeinfo_log(svn_boolean_t finding_merged,
03958                          const char *target_path_or_url,
03959                          const svn_opt_revision_t *target_peg_revision,
03960                          const char *source_path_or_url,
03961                          const svn_opt_revision_t *source_peg_revision,
03962                          svn_log_entry_receiver_t receiver,
03963                          void *receiver_baton,
03964                          svn_boolean_t discover_changed_paths,
03965                          svn_depth_t depth,
03966                          const apr_array_header_t *revprops,
03967                          svn_client_ctx_t *ctx,
03968                          apr_pool_t *scratch_pool);
03969 
03970 /**
03971  * Similar to svn_client_mergeinfo_log(), but finds only merged revisions
03972  * and always operates at @a depth #svn_depth_empty.
03973  *
03974  * @deprecated Provided for backwards compatibility with the 1.6 API. Use
03975  * svn_client_mergeinfo_log() instead.
03976  * @since New in 1.5.
03977  */
03978 SVN_DEPRECATED
03979 svn_error_t *
03980 svn_client_mergeinfo_log_merged(const char *path_or_url,
03981                                 const svn_opt_revision_t *peg_revision,
03982                                 const char *merge_source_path_or_url,
03983                                 const svn_opt_revision_t *src_peg_revision,
03984                                 svn_log_entry_receiver_t receiver,
03985                                 void *receiver_baton,
03986                                 svn_boolean_t discover_changed_paths,
03987                                 const apr_array_header_t *revprops,
03988                                 svn_client_ctx_t *ctx,
03989                                 apr_pool_t *pool);
03990 
03991 /**
03992  * Similar to svn_client_mergeinfo_log(), but finds only eligible revisions
03993  * and always operates at @a depth #svn_depth_empty.
03994  *
03995  * @deprecated Provided for backwards compatibility with the 1.6 API. Use
03996  * svn_client_mergeinfo_log() instead.
03997  * @since New in 1.5.
03998  */
03999 SVN_DEPRECATED
04000 svn_error_t *
04001 svn_client_mergeinfo_log_eligible(const char *path_or_url,
04002                                   const svn_opt_revision_t *peg_revision,
04003                                   const char *merge_source_path_or_url,
04004                                   const svn_opt_revision_t *src_peg_revision,
04005                                   svn_log_entry_receiver_t receiver,
04006                                   void *receiver_baton,
04007                                   svn_boolean_t discover_changed_paths,
04008                                   const apr_array_header_t *revprops,
04009                                   svn_client_ctx_t *ctx,
04010                                   apr_pool_t *pool);
04011 
04012 /** @} */
04013 
04014 /**
04015  * @defgroup Cleanup Cleanup an abnormally terminated working copy.
04016  *
04017  * @{
04018  */
04019 
04020 /** Recursively cleanup a working copy directory @a dir, finishing any
04021  * incomplete operations, removing lockfiles, etc.
04022  *
04023  * If @a ctx->cancel_func is non-NULL, invoke it with @a
04024  * ctx->cancel_baton at various points during the operation.  If it
04025  * returns an error (typically #SVN_ERR_CANCELLED), return that error
04026  * immediately.
04027  *
04028  * Use @a scratch_pool for any temporary allocations.
04029  */
04030 svn_error_t *
04031 svn_client_cleanup(const char *dir,
04032                    svn_client_ctx_t *ctx,
04033                    apr_pool_t *scratch_pool);
04034 
04035 
04036 /** @} */
04037 
04038 /**
04039  * @defgroup Upgrade Upgrade a working copy.
04040  *
04041  * @{
04042  */
04043 
04044 /** Recursively upgrade a working copy from any older format to the current
04045  * WC metadata storage format.  @a wcroot_dir is the path to the WC root.
04046  *
04047  * Use @a scratch_pool for any temporary allocations.
04048  *
04049  * @since New in 1.7.
04050  */
04051 svn_error_t *
04052 svn_client_upgrade(const char *wcroot_dir,
04053                    svn_client_ctx_t *ctx,
04054                    apr_pool_t *scratch_pool);
04055 
04056 
04057 /** @} */
04058 
04059 /**
04060  * @defgroup Relocate Switch a working copy to a different repository.
04061  *
04062  * @{
04063  */
04064 
04065 /**
04066  * Recursively modify a working copy rooted at @a wcroot_dir, changing
04067  * any repository URLs that begin with @a from_prefix to begin with @a
04068  * to_prefix instead.
04069  *
04070  * @param wcroot_dir Working copy root directory
04071  * @param from_prefix Original URL
04072  * @param to_prefix New URL
04073  * @param ignore_externals If not set, recurse into external working
04074  *        copies after relocating the primary working copy
04075  * @param ctx svn_client_ctx_t
04076  * @param pool The pool from which to perform memory allocations
04077  *
04078  * @since New in 1.7
04079  */
04080 svn_error_t *
04081 svn_client_relocate2(const char *wcroot_dir,
04082                      const char *from_prefix,
04083                      const char *to_prefix,
04084                      svn_boolean_t ignore_externals,
04085                      svn_client_ctx_t *ctx,
04086                      apr_pool_t *pool);
04087 
04088 /**
04089  * Similar to svn_client_relocate2(), but with @a ignore_externals
04090  * always TRUE.
04091  *
04092  * @note As of the 1.7 API, @a dir is required to be a working copy
04093  * root directory, and @a recurse is required to be TRUE.
04094  *
04095  * @deprecated Provided for limited backwards compatibility with the
04096  * 1.6 API.
04097  */
04098 SVN_DEPRECATED
04099 svn_error_t *
04100 svn_client_relocate(const char *dir,
04101                     const char *from_prefix,
04102                     const char *to_prefix,
04103                     svn_boolean_t recurse,
04104                     svn_client_ctx_t *ctx,
04105                     apr_pool_t *pool);
04106 
04107 /** @} */
04108 
04109 /**
04110  * @defgroup Revert Remove local changes in a repository.
04111  *
04112  * @{
04113  */
04114 
04115 /**
04116  * Restore the pristine version of working copy @a paths,
04117  * effectively undoing any local mods.  For each path in @a paths,
04118  * revert it if it is a file.  Else if it is a directory, revert
04119  * according to @a depth:
04120  *
04121  * @a paths is an array of (const char *) local WC paths.
04122  *
04123  * If @a depth is #svn_depth_empty, revert just the properties on
04124  * the directory; else if #svn_depth_files, revert the properties
04125  * and any files immediately under the directory; else if
04126  * #svn_depth_immediates, revert all of the preceding plus
04127  * properties on immediate subdirectories; else if #svn_depth_infinity,
04128  * revert path and everything under it fully recursively.
04129  *
04130  * @a changelists is an array of <tt>const char *</tt> changelist
04131  * names, used as a restrictive filter on items reverted; that is,
04132  * don't revert any item unless it's a member of one of those
04133  * changelists.  If @a changelists is empty (or altogether @c NULL),
04134  * no changelist filtering occurs.
04135  *
04136  * If @a ctx->notify_func2 is non-NULL, then for each item reverted,
04137  * call @a ctx->notify_func2 with @a ctx->notify_baton2 and the path of
04138  * the reverted item.
04139  *
04140  * If an item specified for reversion is not under version control,
04141  * then do not error, just invoke @a ctx->notify_func2 with @a
04142  * ctx->notify_baton2, using notification code #svn_wc_notify_skip.
04143  *
04144  * @since New in 1.5.
04145  */
04146 svn_error_t *
04147 svn_client_revert2(const apr_array_header_t *paths,
04148                    svn_depth_t depth,
04149                    const apr_array_header_t *changelists,
04150                    svn_client_ctx_t *ctx,
04151                    apr_pool_t *pool);
04152 
04153 
04154 /**
04155  * Similar to svn_client_revert2(), but with @a changelists passed as
04156  * @c NULL, and @a depth set according to @a recurse: if @a recurse is
04157  * TRUE, @a depth is #svn_depth_infinity, else if @a recurse is
04158  * FALSE, @a depth is #svn_depth_empty.
04159  *
04160  * @note Most APIs map @a recurse==FALSE to @a depth==svn_depth_files;
04161  * revert is deliberately different.
04162  *
04163  * @deprecated Provided for backwards compatibility with the 1.0 API.
04164  */
04165 SVN_DEPRECATED
04166 svn_error_t *
04167 svn_client_revert(const apr_array_header_t *paths,
04168                   svn_boolean_t recursive,
04169                   svn_client_ctx_t *ctx,
04170                   apr_pool_t *pool);
04171 
04172 
04173 /** @} */
04174 
04175 /**
04176  * @defgroup Resolved Mark conflicted paths as resolved.
04177  *
04178  * @{
04179  */
04180 
04181 /**
04182  * Similar to svn_client_resolve(), but without automatic conflict
04183  * resolution support.
04184  *
04185  * @deprecated Provided for backward compatibility with the 1.4 API.
04186  * Use svn_client_resolve() with @a conflict_choice == @c
04187  * svn_wc_conflict_choose_merged instead.
04188  */
04189 SVN_DEPRECATED
04190 svn_error_t *
04191 svn_client_resolved(const char *path,
04192                     svn_boolean_t recursive,
04193                     svn_client_ctx_t *ctx,
04194                     apr_pool_t *pool);
04195 
04196 /** Perform automatic conflict resolution on a working copy @a path.
04197  *
04198  * If @a conflict_choice is
04199  *
04200  *   - #svn_wc_conflict_choose_base:
04201  *     resolve the conflict with the old file contents
04202  *
04203  *   - #svn_wc_conflict_choose_mine_full:
04204  *     use the original working contents
04205  *
04206  *   - #svn_wc_conflict_choose_theirs_full:
04207  *     use the new contents
04208  *
04209  *   - #svn_wc_conflict_choose_merged:
04210  *     don't change the contents at all, just remove the conflict
04211  *     status, which is the pre-1.5 behavior.
04212  *
04213  *   - #svn_wc_conflict_choose_theirs_conflict
04214  *     ###...
04215  *
04216  *   - #svn_wc_conflict_choose_mine_conflict
04217  *     ###...
04218  *
04219  *   - svn_wc_conflict_choose_unspecified
04220  *     invoke @a ctx->conflict_func2 with @a ctx->conflict_baton2 to obtain
04221  *     a resolution decision for each conflict.  This can be used to
04222  *     implement interactive conflict resolution.
04223  *
04224  * #svn_wc_conflict_choose_theirs_conflict and
04225  * #svn_wc_conflict_choose_mine_conflict are not legal for binary
04226  * files or properties.
04227  *
04228  * If @a path is not in a state of conflict to begin with, do nothing.
04229  * If @a path's conflict state is removed and @a ctx->notify_func2 is non-NULL,
04230  * call @a ctx->notify_func2 with @a ctx->notify_baton2 and @a path.
04231  * ### with what notification parameters?
04232  *
04233  * If @a depth is #svn_depth_empty, act only on @a path; if
04234  * #svn_depth_files, resolve @a path and its conflicted file
04235  * children (if any); if #svn_depth_immediates, resolve @a path and
04236  * all its immediate conflicted children (both files and directories,
04237  * if any); if #svn_depth_infinity, resolve @a path and every
04238  * conflicted file or directory anywhere beneath it.
04239  *
04240  * Note that this operation will try to lock the parent directory of
04241  * @a path in order to be able to resolve tree-conflicts on @a path.
04242  *
04243  * @since New in 1.5.
04244  */
04245 svn_error_t *
04246 svn_client_resolve(const char *path,
04247                    svn_depth_t depth,
04248                    svn_wc_conflict_choice_t conflict_choice,
04249                    svn_client_ctx_t *ctx,
04250                    apr_pool_t *pool);
04251 
04252 
04253 /** @} */
04254 
04255 /**
04256  * @defgroup Copy Copy paths in the working copy and repository.
04257  *
04258  * @{
04259  */
04260 
04261 /**
04262  * A structure which describes the source of a copy operation--its path,
04263  * revision, and peg revision.
04264  *
04265  * @since New in 1.5.
04266  */
04267 typedef struct svn_client_copy_source_t
04268 {
04269     /** The source path or URL. */
04270     const char *path;
04271 
04272     /** The source operational revision. */
04273     const svn_opt_revision_t *revision;
04274 
04275     /** The source peg revision. */
04276     const svn_opt_revision_t *peg_revision;
04277 } svn_client_copy_source_t;
04278 
04279 /** Copy each source in @a sources to @a dst_path.
04280  *
04281  * If multiple @a sources are given, @a dst_path must be a directory,
04282  * and @a sources will be copied as children of @a dst_path.
04283  *
04284  * @a sources is an array of <tt>svn_client_copy_source_t *</tt> elements,
04285  * either all referring to local WC items or all referring to versioned
04286  * items in the repository.
04287  *
04288  * If @a sources has only one item, attempt to copy it to @a dst_path.  If
04289  * @a copy_as_child is TRUE and @a dst_path already exists, attempt to copy the
04290  * item as a child of @a dst_path.  If @a copy_as_child is FALSE and
04291  * @a dst_path already exists, fail with #SVN_ERR_ENTRY_EXISTS if @a dst_path
04292  * is a working copy path and #SVN_ERR_FS_ALREADY_EXISTS if @a dst_path is a
04293  * URL.
04294  *
04295  * If @a sources has multiple items, and @a copy_as_child is TRUE, all
04296  * @a sources are copied as children of @a dst_path.  If any child of
04297  * @a dst_path already exists with the same name any item in @a sources,
04298  * fail with #SVN_ERR_ENTRY_EXISTS if @a dst_path is a working copy path and
04299  * #SVN_ERR_FS_ALREADY_EXISTS if @a dst_path is a URL.
04300  *
04301  * If @a sources has multiple items, and @a copy_as_child is FALSE, fail
04302  * with #SVN_ERR_CLIENT_MULTIPLE_SOURCES_DISALLOWED.
04303  *
04304  * If @a dst_path is a URL, use the authentication baton
04305  * in @a ctx and @a ctx->log_msg_func3/@a ctx->log_msg_baton3 to immediately
04306  * attempt to commit the copy action in the repository.
04307  *
04308  * If @a dst_path is not a URL, then this is just a variant of
04309  * svn_client_add(), where the @a sources are scheduled for addition
04310  * as copies.  No changes will happen to the repository until a commit occurs.
04311  * This scheduling can be removed with svn_client_revert2().
04312  *
04313  * If @a make_parents is TRUE, create any non-existent parent directories
04314  * also.  Otherwise the parent of @a dst_path must already exist.
04315  *
04316  * If @a ignore_externals is set, don't process externals definitions
04317  * as part of this operation.
04318  *
04319  * If non-NULL, @a revprop_table is a hash table holding additional,
04320  * custom revision properties (<tt>const char *</tt> names mapped to
04321  * <tt>svn_string_t *</tt> values) to be set on the new revision in
04322  * the event that this is a committing operation.  This table cannot
04323  * contain any standard Subversion properties.
04324  *
04325  * @a ctx->log_msg_func3/@a ctx->log_msg_baton3 are a callback/baton combo
04326  * that this function can use to query for a commit log message when one is
04327  * needed.
04328  *
04329  * If @a ctx->notify_func2 is non-NULL, invoke it with @a ctx->notify_baton2
04330  * for each item added at the new location, passing the new, relative path of
04331  * the added item.
04332  *
04333  * If @a commit_callback is non-NULL, then for each successful commit, call
04334  * @a commit_callback with @a commit_baton and a #svn_commit_info_t for
04335  * the commit.
04336  *
04337  * @since New in 1.7.
04338  */
04339 svn_error_t *
04340 svn_client_copy6(const apr_array_header_t *sources,
04341                  const char *dst_path,
04342                  svn_boolean_t copy_as_child,
04343                  svn_boolean_t make_parents,
04344                  svn_boolean_t ignore_externals,
04345                  const apr_hash_t *revprop_table,
04346                  svn_commit_callback2_t commit_callback,
04347                  void *commit_baton,
04348                  svn_client_ctx_t *ctx,
04349                  apr_pool_t *pool);
04350 
04351 /**
04352  * Similar to svn_client_copy6(), but returns the commit info in
04353  * @a *commit_info_p rather than through a callback function.
04354  *
04355  * @since New in 1.6.
04356  * @deprecated Provided for backward compatibility with the 1.6 API.
04357  */
04358 SVN_DEPRECATED
04359 svn_error_t *
04360 svn_client_copy5(svn_commit_info_t **commit_info_p,
04361                  const apr_array_header_t *sources,
04362                  const char *dst_path,
04363                  svn_boolean_t copy_as_child,
04364                  svn_boolean_t make_parents,
04365                  svn_boolean_t ignore_externals,
04366                  const apr_hash_t *revprop_table,
04367                  svn_client_ctx_t *ctx,
04368                  apr_pool_t *pool);
04369 
04370 /**
04371  * Similar to svn_client_copy5(), with @a ignore_externals set to @c FALSE.
04372  *
04373  * @since New in 1.5.
04374  *
04375  * @deprecated Provided for backward compatibility with the 1.5 API.
04376  */
04377 SVN_DEPRECATED
04378 svn_error_t *
04379 svn_client_copy4(svn_commit_info_t **commit_info_p,
04380                  const apr_array_header_t *sources,
04381                  const char *dst_path,
04382                  svn_boolean_t copy_as_child,
04383                  svn_boolean_t make_parents,
04384                  const apr_hash_t *revprop_table,
04385                  svn_client_ctx_t *ctx,
04386                  apr_pool_t *pool);
04387 
04388 /**
04389  * Similar to svn_client_copy4(), with only one @a src_path, @a
04390  * copy_as_child set to @c FALSE, @a revprop_table passed as NULL, and
04391  * @a make_parents set to @c FALSE.  Also, use @a src_revision as both
04392  * the operational and peg revision.
04393  *
04394  * @since New in 1.4.
04395  *
04396  * @deprecated Provided for backward compatibility with the 1.4 API.
04397  */
04398 SVN_DEPRECATED
04399 svn_error_t *
04400 svn_client_copy3(svn_commit_info_t **commit_info_p,
04401                  const char *src_path,
04402                  const svn_opt_revision_t *src_revision,
04403                  const char *dst_path,
04404                  svn_client_ctx_t *ctx,
04405                  apr_pool_t *pool);
04406 
04407 
04408 /**
04409  * Similar to svn_client_copy3(), with the difference that if @a dst_path
04410  * already exists and is a directory, copy the item into that directory,
04411  * keeping its name (the last component of @a src_path).
04412  *
04413  * @since New in 1.3.
04414  *
04415  * @deprecated Provided for backward compatibility with the 1.3 API.
04416  */
04417 SVN_DEPRECATED
04418 svn_error_t *
04419 svn_client_copy2(svn_commit_info_t **commit_info_p,
04420                  const char *src_path,
04421                  const svn_opt_revision_t *src_revision,
04422                  const char *dst_path,
04423                  svn_client_ctx_t *ctx,
04424                  apr_pool_t *pool);
04425 
04426 
04427 /**
04428  * Similar to svn_client_copy2(), but uses #svn_client_commit_info_t
04429  * for @a commit_info_p.
04430  *
04431  * @deprecated Provided for backward compatibility with the 1.2 API.
04432  */
04433 SVN_DEPRECATED
04434 svn_error_t *
04435 svn_client_copy(svn_client_commit_info_t **commit_info_p,
04436                 const char *src_path,
04437                 const svn_opt_revision_t *src_revision,
04438                 const char *dst_path,
04439                 svn_client_ctx_t *ctx,
04440                 apr_pool_t *pool);
04441 
04442 
04443 /** @} */
04444 
04445 /**
04446  * @defgroup Move Move paths in the working copy or repository.
04447  *
04448  * @{
04449  */
04450 
04451 /**
04452  * Move @a src_paths to @a dst_path.
04453  *
04454  * @a src_paths is an array of (const char *) paths -- either all WC paths
04455  * or all URLs -- of versioned items.  If multiple @a src_paths are given,
04456  * @a dst_path must be a directory and @a src_paths will be moved as
04457  * children of @a dst_path.
04458  *
04459  * If @a src_paths are repository URLs:
04460  *
04461  *   - @a dst_path must also be a repository URL.
04462  *
04463  *   - The authentication baton in @a ctx and @a ctx->log_msg_func/@a
04464  *     ctx->log_msg_baton are used to commit the move.
04465  *
04466  *   - The move operation will be immediately committed.
04467  *
04468  * If @a src_paths are working copy paths:
04469  *
04470  *   - @a dst_path must also be a working copy path.
04471  *
04472  *   - @a ctx->log_msg_func3 and @a ctx->log_msg_baton3 are ignored.
04473  *
04474  *   - This is a scheduling operation.  No changes will happen to the
04475  *     repository until a commit occurs.  This scheduling can be removed
04476  *     with svn_client_revert2().  If one of @a src_paths is a file it is
04477  *     removed from the working copy immediately.  If one of @a src_path
04478  *     is a directory it will remain in the working copy but all the files,
04479  *     and unversioned items, it contains will be removed.
04480  *
04481  * If @a src_paths has only one item, attempt to move it to @a dst_path.  If
04482  * @a move_as_child is TRUE and @a dst_path already exists, attempt to move the
04483  * item as a child of @a dst_path.  If @a move_as_child is FALSE and
04484  * @a dst_path already exists, fail with #SVN_ERR_ENTRY_EXISTS if @a dst_path
04485  * is a working copy path and #SVN_ERR_FS_ALREADY_EXISTS if @a dst_path is a
04486  * URL.
04487  *
04488  * If @a src_paths has multiple items, and @a move_as_child is TRUE, all
04489  * @a src_paths are moved as children of @a dst_path.  If any child of
04490  * @a dst_path already exists with the same name any item in @a src_paths,
04491  * fail with #SVN_ERR_ENTRY_EXISTS if @a dst_path is a working copy path and
04492  * #SVN_ERR_FS_ALREADY_EXISTS if @a dst_path is a URL.
04493  *
04494  * If @a src_paths has multiple items, and @a move_as_child is FALSE, fail
04495  * with #SVN_ERR_CLIENT_MULTIPLE_SOURCES_DISALLOWED.
04496  *
04497  * If @a make_parents is TRUE, create any non-existent parent directories
04498  * also.  Otherwise, the parent of @a dst_path must already exist.
04499  *
04500  * If @a allow_mixed_revisions is @c FALSE, #SVN_ERR_WC_MIXED_REVISIONS
04501  * will be raised if the move source is a mixed-revision subtree.
04502  * If @a allow_mixed_revisions is TRUE, a mixed-revision move source is
04503  * allowed but the move will degrade to a copy and a delete without local
04504  * move tracking. This parameter should be set to FALSE except where backwards
04505  * compatibility to svn_client_move6() is required.
04506  *
04507  * If @a metadata_only is @c TRUE and moving a file in a working copy,
04508  * everything in the metadata is updated as if the node is moved, but the
04509  * actual disk move operation is not performed. This feature is useful for
04510  * clients that want to keep the working copy in sync while the actual working
04511  * copy is updated by some other task.
04512  *
04513  * If non-NULL, @a revprop_table is a hash table holding additional,
04514  * custom revision properties (<tt>const char *</tt> names mapped to
04515  * <tt>svn_string_t *</tt> values) to be set on the new revision in
04516  * the event that this is a committing operation.  This table cannot
04517  * contain any standard Subversion properties.
04518  *
04519  * @a ctx->log_msg_func3/@a ctx->log_msg_baton3 are a callback/baton combo that
04520  * this function can use to query for a commit log message when one is needed.
04521  *
04522  * If @a ctx->notify_func2 is non-NULL, then for each item moved, call
04523  * @a ctx->notify_func2 with the @a ctx->notify_baton2 twice, once to indicate
04524  * the deletion of the moved thing, and once to indicate the addition of
04525  * the new location of the thing.
04526  *
04527  * ### Is this really true?  What about svn_wc_notify_commit_replaced()? ###
04528  *
04529  * If @a commit_callback is non-NULL, then for each successful commit, call
04530  * @a commit_callback with @a commit_baton and a #svn_commit_info_t for
04531  * the commit.
04532  *
04533  * @since New in 1.8.
04534  */
04535 svn_error_t *
04536 svn_client_move7(const apr_array_header_t *src_paths,
04537                  const char *dst_path,
04538                  svn_boolean_t move_as_child,
04539                  svn_boolean_t make_parents,
04540                  svn_boolean_t allow_mixed_revisions,
04541                  svn_boolean_t metadata_only,
04542                  const apr_hash_t *revprop_table,
04543                  svn_commit_callback2_t commit_callback,
04544                  void *commit_baton,
04545                  svn_client_ctx_t *ctx,
04546                  apr_pool_t *pool);
04547 
04548 /**
04549  * Similar to svn_client_move7(), but with @a allow_mixed_revisions always
04550  * set to @c TRUE and @a metadata_only always to @c FALSE.
04551  *
04552  * @since New in 1.7.
04553  * @deprecated Provided for backward compatibility with the 1.7 API.
04554  */
04555 SVN_DEPRECATED
04556 svn_error_t *
04557 svn_client_move6(const apr_array_header_t *src_paths,
04558                  const char *dst_path,
04559                  svn_boolean_t move_as_child,
04560                  svn_boolean_t make_parents,
04561                  const apr_hash_t *revprop_table,
04562                  svn_commit_callback2_t commit_callback,
04563                  void *commit_baton,
04564                  svn_client_ctx_t *ctx,
04565                  apr_pool_t *pool);
04566 
04567 /**
04568  * Similar to svn_client_move6(), but returns the commit info in
04569  * @a *commit_info_p rather than through a callback function.
04570  *
04571  * A WC-to-WC move will include any modified and/or unversioned children.
04572  * @a force is ignored.
04573  *
04574  * @since New in 1.5.
04575  * @deprecated Provided for backward compatibility with the 1.6 API.
04576  */
04577 SVN_DEPRECATED
04578 svn_error_t *
04579 svn_client_move5(svn_commit_info_t **commit_info_p,
04580                  const apr_array_header_t *src_paths,
04581                  const char *dst_path,
04582                  svn_boolean_t force,
04583                  svn_boolean_t move_as_child,
04584                  svn_boolean_t make_parents,
04585                  const apr_hash_t *revprop_table,
04586                  svn_client_ctx_t *ctx,
04587                  apr_pool_t *pool);
04588 
04589 /**
04590  * Similar to svn_client_move5(), with only one @a src_path, @a
04591  * move_as_child set to @c FALSE, @a revprop_table passed as NULL, and
04592  * @a make_parents set to @c FALSE.
04593  *
04594  * Note: The behaviour of @a force changed in 1.5 (r860885 and r861421), when
04595  * the 'move' semantics were improved to just move the source including any
04596  * modified and/or unversioned items in it.  Before that, @a force
04597  * controlled what happened to such items, but now @a force is ignored.
04598  *
04599  * @since New in 1.4.
04600  *
04601  * @deprecated Provided for backward compatibility with the 1.4 API.
04602  */
04603 SVN_DEPRECATED
04604 svn_error_t *
04605 svn_client_move4(svn_commit_info_t **commit_info_p,
04606                  const char *src_path,
04607                  const char *dst_path,
04608                  svn_boolean_t force,
04609                  svn_client_ctx_t *ctx,
04610                  apr_pool_t *pool);
04611 
04612 /**
04613  * Similar to svn_client_move4(), with the difference that if @a dst_path
04614  * already exists and is a directory, move the item into that directory,
04615  * keeping its name (the last component of @a src_path).
04616  *
04617  * @since New in 1.3.
04618  *
04619  * @deprecated Provided for backward compatibility with the 1.3 API.
04620  */
04621 SVN_DEPRECATED
04622 svn_error_t *
04623 svn_client_move3(svn_commit_info_t **commit_info_p,
04624                  const char *src_path,
04625                  const char *dst_path,
04626                  svn_boolean_t force,
04627                  svn_client_ctx_t *ctx,
04628                  apr_pool_t *pool);
04629 
04630 /**
04631  * Similar to svn_client_move3(), but uses #svn_client_commit_info_t
04632  * for @a commit_info_p.
04633  *
04634  * @deprecated Provided for backward compatibility with the 1.2 API.
04635  *
04636  * @since New in 1.2.
04637  */
04638 SVN_DEPRECATED
04639 svn_error_t *
04640 svn_client_move2(svn_client_commit_info_t **commit_info_p,
04641                  const char *src_path,
04642                  const char *dst_path,
04643                  svn_boolean_t force,
04644                  svn_client_ctx_t *ctx,
04645                  apr_pool_t *pool);
04646 
04647 /**
04648  * Similar to svn_client_move2(), but an extra argument @a src_revision
04649  * must be passed.  This has no effect, but must be of kind
04650  * #svn_opt_revision_unspecified or #svn_opt_revision_head,
04651  * otherwise error #SVN_ERR_UNSUPPORTED_FEATURE is returned.
04652  *
04653  * @deprecated Provided for backward compatibility with the 1.1 API.
04654  */
04655 SVN_DEPRECATED
04656 svn_error_t *
04657 svn_client_move(svn_client_commit_info_t **commit_info_p,
04658                 const char *src_path,
04659                 const svn_opt_revision_t *src_revision,
04660                 const char *dst_path,
04661                 svn_boolean_t force,
04662                 svn_client_ctx_t *ctx,
04663                 apr_pool_t *pool);
04664 
04665 /** @} */
04666 
04667 
04668 /** Properties
04669  *
04670  * Note that certain svn-controlled properties must always have their
04671  * values set and stored in UTF8 with LF line endings.  When
04672  * retrieving these properties, callers must convert the values back
04673  * to native locale and native line-endings before displaying them to
04674  * the user.  For help with this task, see
04675  * svn_prop_needs_translation(), svn_subst_translate_string(),  and
04676  * svn_subst_detranslate_string().
04677  *
04678  * @defgroup svn_client_prop_funcs Property functions
04679  * @{
04680  */
04681 
04682 
04683 /**
04684  * Set @a propname to @a propval on @a url.  A @a propval of @c NULL will
04685  * delete the property.
04686  *
04687  * Immediately attempt to commit the property change in the repository,
04688  * using the authentication baton in @a ctx and @a
04689  * ctx->log_msg_func3/@a ctx->log_msg_baton3.
04690  *
04691  * If the property has changed on @a url since revision
04692  * @a base_revision_for_url (which must not be #SVN_INVALID_REVNUM), no
04693  * change will be made and an error will be returned.
04694  *
04695  * If non-NULL, @a revprop_table is a hash table holding additional,
04696  * custom revision properties (<tt>const char *</tt> names mapped to
04697  * <tt>svn_string_t *</tt> values) to be set on the new revision.  This
04698  * table cannot contain any standard Subversion properties.
04699  *
04700  * If @a commit_callback is non-NULL, then call @a commit_callback with
04701  * @a commit_baton and a #svn_commit_info_t for the commit.
04702  *
04703  * If @a propname is an svn-controlled property (i.e. prefixed with
04704  * #SVN_PROP_PREFIX), then the caller is responsible for ensuring that
04705  * the value is UTF8-encoded and uses LF line-endings.
04706  *
04707  * If @a skip_checks is TRUE, do no validity checking.  But if @a
04708  * skip_checks is FALSE, and @a propname is not a valid property for @a
04709  * url, return an error, either #SVN_ERR_ILLEGAL_TARGET (if the property is
04710  * not appropriate for @a url), or * #SVN_ERR_BAD_MIME_TYPE (if @a propname
04711  * is "svn:mime-type", but @a propval is not a valid mime-type).
04712  *
04713  * Use @a scratch_pool for all memory allocation.
04714  *
04715  * @since New in 1.7.
04716  */
04717 svn_error_t *
04718 svn_client_propset_remote(const char *propname,
04719                           const svn_string_t *propval,
04720                           const char *url,
04721                           svn_boolean_t skip_checks,
04722                           svn_revnum_t base_revision_for_url,
04723                           const apr_hash_t *revprop_table,
04724                           svn_commit_callback2_t commit_callback,
04725                           void *commit_baton,
04726                           svn_client_ctx_t *ctx,
04727                           apr_pool_t *scratch_pool);
04728 
04729 /**
04730  * Set @a propname to @a propval on each (const char *) target in @a
04731  * targets.  The targets must be all working copy paths.  A @a propval
04732  * of @c NULL will delete the property.
04733  *
04734  * If @a depth is #svn_depth_empty, set the property on each member of
04735  * @a targets only; if #svn_depth_files, set it on @a targets and their
04736  * file children (if any); if #svn_depth_immediates, on @a targets and all
04737  * of their immediate children (both files and directories); if
04738  * #svn_depth_infinity, on @a targets and everything beneath them.
04739  *
04740  * @a changelists is an array of <tt>const char *</tt> changelist
04741  * names, used as a restrictive filter on items whose properties are
04742  * set; that is, don't set properties on any item unless it's a member
04743  * of one of those changelists.  If @a changelists is empty (or
04744  * altogether @c NULL), no changelist filtering occurs.
04745  *
04746  * If @a propname is an svn-controlled property (i.e. prefixed with
04747  * #SVN_PROP_PREFIX), then the caller is responsible for ensuring that
04748  * the value is UTF8-encoded and uses LF line-endings.
04749  *
04750  * If @a skip_checks is TRUE, do no validity checking.  But if @a
04751  * skip_checks is FALSE, and @a propname is not a valid property for @a
04752  * targets, return an error, either #SVN_ERR_ILLEGAL_TARGET (if the
04753  * property is not appropriate for @a targets), or
04754  * #SVN_ERR_BAD_MIME_TYPE (if @a propname is "svn:mime-type", but @a
04755  * propval is not a valid mime-type).
04756  *
04757  * If @a ctx->cancel_func is non-NULL, invoke it passing @a
04758  * ctx->cancel_baton at various places during the operation.
04759  *
04760  * Use @a scratch_pool for all memory allocation.
04761  *
04762  * @since New in 1.7.
04763  */
04764 svn_error_t *
04765 svn_client_propset_local(const char *propname,
04766                          const svn_string_t *propval,
04767                          const apr_array_header_t *targets,
04768                          svn_depth_t depth,
04769                          svn_boolean_t skip_checks,
04770                          const apr_array_header_t *changelists,
04771                          svn_client_ctx_t *ctx,
04772                          apr_pool_t *scratch_pool);
04773 
04774 /**
04775  * An amalgamation of svn_client_propset_local() and
04776  * svn_client_propset_remote() that takes only a single target, and
04777  * returns the commit info in @a *commit_info_p rather than through a
04778  * callback function.
04779  *
04780  * @since New in 1.5.
04781  * @deprecated Provided for backward compatibility with the 1.6 API.
04782  */
04783 SVN_DEPRECATED
04784 svn_error_t *
04785 svn_client_propset3(svn_commit_info_t **commit_info_p,
04786                     const char *propname,
04787                     const svn_string_t *propval,
04788                     const char *target,
04789                     svn_depth_t depth,
04790                     svn_boolean_t skip_checks,
04791                     svn_revnum_t base_revision_for_url,
04792                     const apr_array_header_t *changelists,
04793                     const apr_hash_t *revprop_table,
04794                     svn_client_ctx_t *ctx,
04795                     apr_pool_t *pool);
04796 
04797 /**
04798  * Like svn_client_propset3(), but with @a base_revision_for_url
04799  * always #SVN_INVALID_REVNUM; @a commit_info_p always @c NULL; @a
04800  * changelists always @c NULL; @a revprop_table always @c NULL; and @a
04801  * depth set according to @a recurse: if @a recurse is TRUE, @a depth
04802  * is #svn_depth_infinity, else #svn_depth_empty.
04803  *
04804  * @deprecated Provided for backward compatibility with the 1.4 API.
04805  */
04806 SVN_DEPRECATED
04807 svn_error_t *
04808 svn_client_propset2(const char *propname,
04809                     const svn_string_t *propval,
04810                     const char *target,
04811                     svn_boolean_t recurse,
04812                     svn_boolean_t skip_checks,
04813                     svn_client_ctx_t *ctx,
04814                     apr_pool_t *pool);
04815 
04816 /**
04817  * Like svn_client_propset2(), but with @a skip_checks always FALSE and a
04818  * newly created @a ctx.
04819  *
04820  * @deprecated Provided for backward compatibility with the 1.1 API.
04821  */
04822 SVN_DEPRECATED
04823 svn_error_t *
04824 svn_client_propset(const char *propname,
04825                    const svn_string_t *propval,
04826                    const char *target,
04827                    svn_boolean_t recurse,
04828                    apr_pool_t *pool);
04829 
04830 /** Set @a propname to @a propval on revision @a revision in the repository
04831  * represented by @a URL.  Use the authentication baton in @a ctx for
04832  * authentication, and @a pool for all memory allocation.  Return the actual
04833  * rev affected in @a *set_rev.  A @a propval of @c NULL will delete the
04834  * property.
04835  *
04836  * If @a original_propval is non-NULL, then just before setting the
04837  * new value, check that the old value matches @a original_propval;
04838  * if they do not match, return the error #SVN_ERR_RA_OUT_OF_DATE.
04839  * This is to help clients support interactive editing of revprops:
04840  * without this check, the window during which the property may change
04841  * underneath the user is as wide as the amount of time the user
04842  * spends editing the property.  With this check, the window is
04843  * reduced to a small, constant amount of time right before we set the
04844  * new value.  (To check that an old value is still non-existent, set
04845  * @a original_propval->data to NULL, and @a original_propval->len is
04846  * ignored.)
04847  * If the server advertises #SVN_RA_CAPABILITY_ATOMIC_REVPROPS, the
04848  * check of @a original_propval is done atomically.
04849  *
04850  * Note: the representation of "property is not set" in @a
04851  * original_propval differs from the representation in other APIs
04852  * (such as svn_fs_change_rev_prop2() and svn_ra_change_rev_prop2()).
04853  *
04854  * If @a force is TRUE, allow newlines in the author property.
04855  *
04856  * If @a propname is an svn-controlled property (i.e. prefixed with
04857  * #SVN_PROP_PREFIX), then the caller is responsible for ensuring that
04858  * the value UTF8-encoded and uses LF line-endings.
04859  *
04860  * Note that unlike its cousin svn_client_propset3(), this routine
04861  * doesn't affect the working copy at all;  it's a pure network
04862  * operation that changes an *unversioned* property attached to a
04863  * revision.  This can be used to tweak log messages, dates, authors,
04864  * and the like.  Be careful:  it's a lossy operation.
04865 
04866  * @a ctx->notify_func2 and @a ctx->notify_baton2 are the notification
04867  * functions and baton which are called upon successful setting of the
04868  * property.
04869  *
04870  * Also note that unless the administrator creates a
04871  * pre-revprop-change hook in the repository, this feature will fail.
04872  *
04873  * @since New in 1.6.
04874  */
04875 svn_error_t *
04876 svn_client_revprop_set2(const char *propname,
04877                         const svn_string_t *propval,
04878                         const svn_string_t *original_propval,
04879                         const char *URL,
04880                         const svn_opt_revision_t *revision,
04881                         svn_revnum_t *set_rev,
04882                         svn_boolean_t force,
04883                         svn_client_ctx_t *ctx,
04884                         apr_pool_t *pool);
04885 
04886 /**
04887  * Similar to svn_client_revprop_set2(), but with @a original_propval
04888  * always @c NULL.
04889  *
04890  * @deprecated Provided for backward compatibility with the 1.5 API.
04891  */
04892 SVN_DEPRECATED
04893 svn_error_t *
04894 svn_client_revprop_set(const char *propname,
04895                        const svn_string_t *propval,
04896                        const char *URL,
04897                        const svn_opt_revision_t *revision,
04898                        svn_revnum_t *set_rev,
04899                        svn_boolean_t force,
04900                        svn_client_ctx_t *ctx,
04901                        apr_pool_t *pool);
04902 
04903 /**
04904  * Set @a *props to a hash table whose keys are absolute paths or URLs
04905  * of items on which property @a propname is explicitly set, and whose
04906  * values are <tt>svn_string_t *</tt> representing the property value for
04907  * @a propname at that path.
04908  *
04909  * If @a inherited_props is not @c NULL, then set @a *inherited_props to a
04910  * depth-first ordered array of #svn_prop_inherited_item_t * structures
04911  * representing the properties inherited by @a target.  If @a target is a
04912  * working copy path, then properties inherited by @a target as far as the
04913  * root of the working copy are obtained from the working copy's actual
04914  * property values.  Properties inherited from above the working copy root
04915  * come from the inherited properties cache.  If @a target is a URL, then
04916  * the inherited properties come from the repository.  If @a inherited_props
04917  * is not @c NULL and no inheritable properties are found, then set
04918  * @a *inherited_props to an empty array.
04919  *
04920  * The #svn_prop_inherited_item_t->path_or_url members of the
04921  * #svn_prop_inherited_item_t * structures in @a *inherited_props are
04922  * URLs if @a target is a URL or if @a target is a working copy path but the
04923  * property represented by the structure is above the working copy root (i.e.
04924  * the inherited property is from the cache).  In all other cases the
04925  * #svn_prop_inherited_item_t->path_or_url members are absolute working copy
04926  * paths.
04927  *
04928  * Allocate @a *props (including keys and values) and @a *inherited_props
04929  * (including its elements) in @a result_pool, use @a scratch_pool for
04930  * temporary allocations.
04931  *
04932  * @a target is a WC absolute path or a URL.
04933  *
04934  * Don't store any path, not even @a target, if it does not have a
04935  * property named @a propname.
04936  *
04937  * If @a revision->kind is #svn_opt_revision_unspecified, then: get
04938  * properties from the working copy if @a target is a working copy
04939  * path, or from the repository head if @a target is a URL.  Else get
04940  * the properties as of @a revision.  The actual node revision
04941  * selected is determined by the path as it exists in @a peg_revision.
04942  * If @a peg_revision->kind is #svn_opt_revision_unspecified, then
04943  * it defaults to #svn_opt_revision_head for URLs or
04944  * #svn_opt_revision_working for WC targets.  Use the authentication
04945  * baton in @a ctx for authentication if contacting the repository.
04946  * If @a actual_revnum is not @c NULL, the actual revision number used
04947  * for the fetch is stored in @a *actual_revnum.
04948  *
04949  * If @a depth is #svn_depth_empty, fetch the property from
04950  * @a target only; if #svn_depth_files, fetch from @a target and its
04951  * file children (if any); if #svn_depth_immediates, from @a target
04952  * and all of its immediate children (both files and directories); if
04953  * #svn_depth_infinity, from @a target and everything beneath it.
04954  *
04955  * @a changelists is an array of <tt>const char *</tt> changelist
04956  * names, used as a restrictive filter on items whose properties are
04957  * gotten; that is, don't get @a propname on any item unless it's a member
04958  * of one of those changelists.  If @a changelists is empty (or
04959  * altogether @c NULL), no changelist filtering occurs.
04960  *
04961  * If error, don't touch @a *props, otherwise @a *props is a hash table
04962  * even if empty.
04963  *
04964  * This function returns SVN_ERR_UNVERSIONED_RESOURCE when it is called on
04965  * unversioned nodes.
04966  *
04967  * @since New in 1.8.
04968  */
04969 svn_error_t *
04970 svn_client_propget5(apr_hash_t **props,
04971                     apr_array_header_t **inherited_props,
04972                     const char *propname,
04973                     const char *target,  /* abspath or URL */
04974                     const svn_opt_revision_t *peg_revision,
04975                     const svn_opt_revision_t *revision,
04976                     svn_revnum_t *actual_revnum,
04977                     svn_depth_t depth,
04978                     const apr_array_header_t *changelists,
04979                     svn_client_ctx_t *ctx,
04980                     apr_pool_t *result_pool,
04981                     apr_pool_t *scratch_pool);
04982 
04983 /**
04984  * Similar to svn_client_propget5 but with @a inherited_props always
04985  * passed as NULL.
04986  *
04987  * @since New in 1.7.
04988  * @deprecated Provided for backward compatibility with the 1.7 API.
04989  */
04990 SVN_DEPRECATED
04991 svn_error_t *
04992 svn_client_propget4(apr_hash_t **props,
04993                     const char *propname,
04994                     const char *target,  /* abspath or URL */
04995                     const svn_opt_revision_t *peg_revision,
04996                     const svn_opt_revision_t *revision,
04997                     svn_revnum_t *actual_revnum,
04998                     svn_depth_t depth,
04999                     const apr_array_header_t *changelists,
05000                     svn_client_ctx_t *ctx,
05001                     apr_pool_t *result_pool,
05002                     apr_pool_t *scratch_pool);
05003 
05004 /**
05005  * Similar to svn_client_propget4(), but with the following change to the
05006  * output hash keys:  keys are `<tt>char *</tt>' paths, prefixed by
05007  * @a target, which is a working copy path or a URL.
05008  *
05009  * This function returns SVN_ERR_ENTRY_NOT_FOUND where svn_client_propget4
05010  * would return SVN_ERR_UNVERSIONED_RESOURCE.
05011  *
05012  * @since New in 1.5.
05013  * @deprecated Provided for backward compatibility with the 1.6 API.
05014  */
05015 SVN_DEPRECATED
05016 svn_error_t *
05017 svn_client_propget3(apr_hash_t **props,
05018                     const char *propname,
05019                     const char *target,
05020                     const svn_opt_revision_t *peg_revision,
05021                     const svn_opt_revision_t *revision,
05022                     svn_revnum_t *actual_revnum,
05023                     svn_depth_t depth,
05024                     const apr_array_header_t *changelists,
05025                     svn_client_ctx_t *ctx,
05026                     apr_pool_t *pool);
05027 
05028 /**
05029  * Similar to svn_client_propget3(), except that @a actual_revnum and
05030  * @a changelists are always @c NULL, and @a depth is set according to
05031  * @a recurse: if @a recurse is TRUE, then @a depth is
05032  * #svn_depth_infinity, else #svn_depth_empty.
05033  *
05034  * @deprecated Provided for backward compatibility with the 1.4 API.
05035  */
05036 SVN_DEPRECATED
05037 svn_error_t *
05038 svn_client_propget2(apr_hash_t **props,
05039                     const char *propname,
05040                     const char *target,
05041                     const svn_opt_revision_t *peg_revision,
05042                     const svn_opt_revision_t *revision,
05043                     svn_boolean_t recurse,
05044                     svn_client_ctx_t *ctx,
05045                     apr_pool_t *pool);
05046 
05047 /**
05048  * Similar to svn_client_propget2(), except that @a peg_revision is
05049  * always the same as @a revision.
05050  *
05051  * @deprecated Provided for backward compatibility with the 1.1 API.
05052  */
05053 SVN_DEPRECATED
05054 svn_error_t *
05055 svn_client_propget(apr_hash_t **props,
05056                    const char *propname,
05057                    const char *target,
05058                    const svn_opt_revision_t *revision,
05059                    svn_boolean_t recurse,
05060                    svn_client_ctx_t *ctx,
05061                    apr_pool_t *pool);
05062 
05063 /** Set @a *propval to the value of @a propname on revision @a revision
05064  * in the repository represented by @a URL.  Use the authentication baton
05065  * in @a ctx for authentication, and @a pool for all memory allocation.
05066  * Return the actual rev queried in @a *set_rev.
05067  *
05068  * Note that unlike its cousin svn_client_propget(), this routine
05069  * doesn't affect the working copy at all; it's a pure network
05070  * operation that queries an *unversioned* property attached to a
05071  * revision.  This can query log messages, dates, authors, and the
05072  * like.
05073  */
05074 svn_error_t *
05075 svn_client_revprop_get(const char *propname,
05076                        svn_string_t **propval,
05077                        const char *URL,
05078                        const svn_opt_revision_t *revision,
05079                        svn_revnum_t *set_rev,
05080                        svn_client_ctx_t *ctx,
05081                        apr_pool_t *pool);
05082 
05083 /**
05084  * Invoke @a receiver with @a receiver_baton to return the regular explicit, and
05085  * possibly the inherited, properties of @a target, a URL or working copy path.
05086  * @a receiver will be called for each path encountered.
05087  *
05088  * @a target is a WC path or a URL.
05089  *
05090  * If @a revision->kind is #svn_opt_revision_unspecified, then get the
05091  * explicit (and possibly the inherited) properties from the working copy,
05092  * if @a target is a working copy path, or from the repository head if
05093  * @a target is a URL.  Else get the properties as of @a revision.
05094  * The actual node revision selected is determined by the path as it exists
05095  * in @a peg_revision.  If @a peg_revision->kind is
05096  * #svn_opt_revision_unspecified, then it defaults to #svn_opt_revision_head
05097  * for URLs or #svn_opt_revision_working for WC targets.  Use the
05098  * authentication baton cached in @a ctx for authentication if contacting
05099  * the repository.
05100  *
05101  * If @a depth is #svn_depth_empty, list only the properties of
05102  * @a target itself.  If @a depth is #svn_depth_files, and
05103  * @a target is a directory, list the properties of @a target
05104  * and its file entries.  If #svn_depth_immediates, list the properties
05105  * of its immediate file and directory entries.  If #svn_depth_infinity,
05106  * list the properties of its file entries and recurse (with
05107  * #svn_depth_infinity) on directory entries.  #svn_depth_unknown is
05108  * equivalent to #svn_depth_empty.  All other values produce undefined
05109  * results.
05110  *
05111  * @a changelists is an array of <tt>const char *</tt> changelist
05112  * names, used as a restrictive filter on items whose properties are
05113  * listed; that is, don't list properties on any item unless it's a member
05114  * of one of those changelists.  If @a changelists is empty (or
05115  * altogether @c NULL), no changelist filtering occurs.
05116  *
05117  * If @a get_target_inherited_props is true, then also return any inherited
05118  * properties when @a receiver is called for @a target.  If @a target is a
05119  * working copy path, then properties inherited by @a target as far as the
05120  * root of the working copy are obtained from the working copy's actual
05121  * property values.  Properties inherited from above the working copy
05122  * root come from the inherited properties cache.  If @a target is a URL,
05123  * then the inherited properties come from the repository.
05124  * If @a get_target_inherited_props is false, then no inherited properties
05125  * are returned to @a receiver.
05126  *
05127  * If @a target is not found, return the error #SVN_ERR_ENTRY_NOT_FOUND.
05128  *
05129  * @since New in 1.8.
05130  */
05131 svn_error_t *
05132 svn_client_proplist4(const char *target,
05133                      const svn_opt_revision_t *peg_revision,
05134                      const svn_opt_revision_t *revision,
05135                      svn_depth_t depth,
05136                      const apr_array_header_t *changelists,
05137                      svn_boolean_t get_target_inherited_props,
05138                      svn_proplist_receiver2_t receiver,
05139                      void *receiver_baton,
05140                      svn_client_ctx_t *ctx,
05141                      apr_pool_t *scratch_pool);
05142 
05143 /**
05144  * Similar to svn_client_proplist4(), except that the @a receiver type
05145  * is a #svn_proplist_receiver_t, @a get_target_inherited_props is
05146  * always passed NULL, and there is no separate scratch pool.
05147  *
05148  * @since New in 1.5.
05149  * @deprecated Provided for backward compatibility with the 1.7 API.
05150  */
05151 SVN_DEPRECATED
05152 svn_error_t *
05153 svn_client_proplist3(const char *target,
05154                      const svn_opt_revision_t *peg_revision,
05155                      const svn_opt_revision_t *revision,
05156                      svn_depth_t depth,
05157                      const apr_array_header_t *changelists,
05158                      svn_proplist_receiver_t receiver,
05159                      void *receiver_baton,
05160                      svn_client_ctx_t *ctx,
05161                      apr_pool_t *pool);
05162 
05163 /**
05164  * Similar to svn_client_proplist3(), except the properties are
05165  * returned as an array of #svn_client_proplist_item_t * structures
05166  * instead of by invoking the receiver function, there's no support
05167  * for @a changelists filtering, and @a recurse is used instead of a
05168  * #svn_depth_t parameter (FALSE corresponds to #svn_depth_empty,
05169  * and TRUE to #svn_depth_infinity).
05170  *
05171  * @since New in 1.2.
05172  *
05173  * @deprecated Provided for backward compatibility with the 1.4 API.
05174  */
05175 SVN_DEPRECATED
05176 svn_error_t *
05177 svn_client_proplist2(apr_array_header_t **props,
05178                      const char *target,
05179                      const svn_opt_revision_t *peg_revision,
05180                      const svn_opt_revision_t *revision,
05181                      svn_boolean_t recurse,
05182                      svn_client_ctx_t *ctx,
05183                      apr_pool_t *pool);
05184 
05185 /**
05186  * Similar to svn_client_proplist2(), except that @a peg_revision is
05187  * always the same as @a revision.
05188  *
05189  * @deprecated Provided for backward compatibility with the 1.1 API.
05190  */
05191 SVN_DEPRECATED
05192 svn_error_t *
05193 svn_client_proplist(apr_array_header_t **props,
05194                     const char *target,
05195                     const svn_opt_revision_t *revision,
05196                     svn_boolean_t recurse,
05197                     svn_client_ctx_t *ctx,
05198                     apr_pool_t *pool);
05199 
05200 /** Set @a *props to a hash of the revision props attached to @a revision in
05201  * the repository represented by @a URL.  Use the authentication baton cached
05202  * in @a ctx for authentication, and @a pool for all memory allocation.
05203  * Return the actual rev queried in @a *set_rev.
05204  *
05205  * The allocated hash maps (<tt>const char *</tt>) property names to
05206  * (#svn_string_t *) property values.
05207  *
05208  * Note that unlike its cousin svn_client_proplist(), this routine
05209  * doesn't read a working copy at all; it's a pure network operation
05210  * that reads *unversioned* properties attached to a revision.
05211  */
05212 svn_error_t *
05213 svn_client_revprop_list(apr_hash_t **props,
05214                         const char *URL,
05215                         const svn_opt_revision_t *revision,
05216                         svn_revnum_t *set_rev,
05217                         svn_client_ctx_t *ctx,
05218                         apr_pool_t *pool);
05219 /** @} */
05220 
05221 
05222 /**
05223  * @defgroup Export Export a tree from version control.
05224  *
05225  * @{
05226  */
05227 
05228 /**
05229  * Export the contents of either a subversion repository or a
05230  * subversion working copy into a 'clean' directory (meaning a
05231  * directory with no administrative directories).  If @a result_rev
05232  * is not @c NULL and the path being exported is a repository URL, set
05233  * @a *result_rev to the value of the revision actually exported (set
05234  * it to #SVN_INVALID_REVNUM for local exports).
05235  *
05236  * @a from_path_or_url is either the path the working copy on disk, or
05237  * a URL to the repository you wish to export.
05238  *
05239  * When exporting a directory, @a to_path is the path to the directory
05240  * where you wish to create the exported tree; when exporting a file, it
05241  * is the path of the file that will be created.  If @a to_path is the
05242  * empty path, then the basename of the export file/directory in the repository
05243  * will be used.  If @a to_path represents an existing directory, and a
05244  * file is being exported, then a file with the that basename will be
05245  * created under that directory (as with 'copy' operations).
05246  *
05247  * @a peg_revision is the revision where the path is first looked up
05248  * when exporting from a repository.  If @a peg_revision->kind is
05249  * #svn_opt_revision_unspecified, then it defaults to #svn_opt_revision_head
05250  * for URLs or #svn_opt_revision_working for WC targets.
05251  *
05252  * @a revision is the revision that should be exported, which is only used
05253  * when exporting from a repository.
05254  *
05255  * @a peg_revision and @a revision must not be @c NULL.
05256  *
05257  * @a ctx->notify_func2 and @a ctx->notify_baton2 are the notification
05258  * functions and baton which are passed to svn_client_checkout() when
05259  * exporting from a repository.
05260  *
05261  * @a ctx is a context used for authentication in the repository case.
05262  *
05263  * @a overwrite if TRUE will cause the export to overwrite files or
05264  * directories.
05265  *
05266  * If @a ignore_externals is set, don't process externals definitions
05267  * as part of this operation.
05268  *
05269  * If @a ignore_keywords is set, don't expand keywords as part of this
05270  * operation.
05271  *
05272  * @a native_eol allows you to override the standard eol marker on the
05273  * platform you are running on.  Can be either "LF", "CR" or "CRLF" or
05274  * NULL.  If NULL will use the standard eol marker.  Any other value
05275  * will cause the #SVN_ERR_IO_UNKNOWN_EOL error to be returned.
05276  *
05277  * If @a depth is #svn_depth_infinity, export fully recursively.  Else
05278  * if it is #svn_depth_immediates, export @a from_path_or_url and its
05279  * immediate children (if any), but with subdirectories empty and at
05280  * #svn_depth_empty.  Else if #svn_depth_files, export @a
05281  * from_path_or_url and its immediate file children (if any) only.  If
05282  * @a depth is #svn_depth_empty, then export exactly @a
05283  * from_path_or_url and none of its children.
05284  *
05285  * All allocations are done in @a pool.
05286  *
05287  * @since New in 1.7.
05288  */
05289 svn_error_t *
05290 svn_client_export5(svn_revnum_t *result_rev,
05291                    const char *from_path_or_url,
05292                    const char *to_path,
05293                    const svn_opt_revision_t *peg_revision,
05294                    const svn_opt_revision_t *revision,
05295                    svn_boolean_t overwrite,
05296                    svn_boolean_t ignore_externals,
05297                    svn_boolean_t ignore_keywords,
05298                    svn_depth_t depth,
05299                    const char *native_eol,
05300                    svn_client_ctx_t *ctx,
05301                    apr_pool_t *pool);
05302 
05303 /**
05304  * Similar to svn_client_export5(), but with @a ignore_keywords set
05305  * to FALSE.
05306  *
05307  * @deprecated Provided for backward compatibility with the 1.6 API.
05308  * @since New in 1.5.
05309  */
05310 SVN_DEPRECATED
05311 svn_error_t *
05312 svn_client_export4(svn_revnum_t *result_rev,
05313                    const char *from_path_or_url,
05314                    const char *to_path,
05315                    const svn_opt_revision_t *peg_revision,
05316                    const svn_opt_revision_t *revision,
05317                    svn_boolean_t overwrite,
05318                    svn_boolean_t ignore_externals,
05319                    svn_depth_t depth,
05320                    const char *native_eol,
05321                    svn_client_ctx_t *ctx,
05322                    apr_pool_t *pool);
05323 
05324 
05325 /**
05326  * Similar to svn_client_export4(), but with @a depth set according to
05327  * @a recurse: if @a recurse is TRUE, set @a depth to
05328  * #svn_depth_infinity, if @a recurse is FALSE, set @a depth to
05329  * #svn_depth_files.
05330  *
05331  * @deprecated Provided for backward compatibility with the 1.4 API.
05332  *
05333  * @since New in 1.2.
05334  */
05335 SVN_DEPRECATED
05336 svn_error_t *
05337 svn_client_export3(svn_revnum_t *result_rev,
05338                    const char *from_path_or_url,
05339                    const char *to_path,
05340                    const svn_opt_revision_t *peg_revision,
05341                    const svn_opt_revision_t *revision,
05342                    svn_boolean_t overwrite,
05343                    svn_boolean_t ignore_externals,
05344                    svn_boolean_t recurse,
05345                    const char *native_eol,
05346                    svn_client_ctx_t *ctx,
05347                    apr_pool_t *pool);
05348 
05349 
05350 /**
05351  * Similar to svn_client_export3(), but with @a peg_revision
05352  * always set to #svn_opt_revision_unspecified, @a overwrite set to
05353  * the value of @a force, @a ignore_externals always FALSE, and
05354  * @a recurse always TRUE.
05355  *
05356  * @since New in 1.1.
05357  * @deprecated Provided for backward compatibility with the 1.1 API.
05358  */
05359 SVN_DEPRECATED
05360 svn_error_t *
05361 svn_client_export2(svn_revnum_t *result_rev,
05362                    const char *from_path_or_url,
05363                    const char *to_path,
05364                    svn_opt_revision_t *revision,
05365                    svn_boolean_t force,
05366                    const char *native_eol,
05367                    svn_client_ctx_t *ctx,
05368                    apr_pool_t *pool);
05369 
05370 
05371 /**
05372  * Similar to svn_client_export2(), but with @a native_eol always set
05373  * to NULL.
05374  *
05375  * @deprecated Provided for backward compatibility with the 1.0 API.
05376  */
05377 SVN_DEPRECATED
05378 svn_error_t *
05379 svn_client_export(svn_revnum_t *result_rev,
05380                   const char *from_path_or_url,
05381                   const char *to_path,
05382                   svn_opt_revision_t *revision,
05383                   svn_boolean_t force,
05384                   svn_client_ctx_t *ctx,
05385                   apr_pool_t *pool);
05386 
05387 /** @} */
05388 
05389 /**
05390  * @defgroup List List / ls
05391  *
05392  * @{
05393  */
05394 
05395 /** The type of function invoked by svn_client_list3() to report the details
05396  * of each directory entry being listed.
05397  *
05398  * @a baton is the baton that was passed to the caller.  @a path is the
05399  * entry's path relative to @a abs_path; it is the empty path when reporting
05400  * the top node of the list operation.  @a dirent contains some or all of
05401  * the directory entry's details, as determined by the caller.  @a lock is
05402  * the entry's lock, if it is locked and if lock information is being
05403  * reported by the caller; otherwise @a lock is NULL.  @a abs_path is the
05404  * repository path of the top node of the list operation; it is relative to
05405  * the repository root and begins with "/".
05406  *
05407  * If svn_client_list3() was called with @a include_externals set to TRUE,
05408  * @a external_parent_url and @a external_target will be set.
05409  * @a external_parent_url is url of the directory which has the
05410  * externals definitions. @a external_target is the target subdirectory of
05411  * externals definitions which is relative to the parent directory that holds
05412  * the external item.
05413  *
05414  * If external_parent_url and external_target are defined, the item being
05415  * listed is part of the external described by external_parent_url and
05416  * external_target. Else, the item is not part of any external.
05417  * Moreover, we will never mix items which are part of separate
05418  * externals, and will always finish listing an external before listing
05419  * the next one.
05420  *
05421  * @a scratch_pool may be used for temporary allocations.
05422  *
05423  * @since New in 1.8.
05424  */
05425 typedef svn_error_t *(*svn_client_list_func2_t)(
05426   void *baton,
05427   const char *path,
05428   const svn_dirent_t *dirent,
05429   const svn_lock_t *lock,
05430   const char *abs_path,
05431   const char *external_parent_url,
05432   const char *external_target,
05433   apr_pool_t *scratch_pool);
05434 
05435 /**
05436  * Similar to #svn_client_list_func2_t, but without any information about
05437  * externals definitions.
05438  *
05439  * @deprecated Provided for backward compatibility with the 1.7 API.
05440  *
05441  * @since New in 1.4
05442  *
05443  * */
05444 typedef svn_error_t *(*svn_client_list_func_t)(void *baton,
05445                                                const char *path,
05446                                                const svn_dirent_t *dirent,
05447                                                const svn_lock_t *lock,
05448                                                const char *abs_path,
05449                                                apr_pool_t *pool);
05450 
05451 /**
05452  * Report the directory entry, and possibly children, for @a
05453  * path_or_url at @a revision.  The actual node revision selected is
05454  * determined by the path as it exists in @a peg_revision.  If @a
05455  * peg_revision->kind is #svn_opt_revision_unspecified, then it defaults
05456  * to #svn_opt_revision_head for URLs or #svn_opt_revision_working
05457  * for WC targets.
05458  *
05459  * Report directory entries by invoking @a list_func/@a baton with @a path
05460  * relative to @a path_or_url.  The dirent for @a path_or_url is reported
05461  * using an empty @a path.  If @a path_or_url is a directory, also report
05462  * its children.  If @a path_or_url is non-existent, return
05463  * #SVN_ERR_FS_NOT_FOUND.
05464  *
05465  * If @a fetch_locks is TRUE, include locks when reporting directory entries.
05466  *
05467  * If @a include_externals is TRUE, also list all external items
05468  * reached by recursion. @a depth value passed to the original list target
05469  * applies for the externals also.
05470  *
05471  * Use @a pool for temporary allocations.
05472  *
05473  * Use authentication baton cached in @a ctx to authenticate against the
05474  * repository.
05475  *
05476  * If @a depth is #svn_depth_empty, list just @a path_or_url itself.
05477  * If @a depth is #svn_depth_files, list @a path_or_url and its file
05478  * entries.  If #svn_depth_immediates, list its immediate file and
05479  * directory entries.  If #svn_depth_infinity, list file entries and
05480  * recurse (with #svn_depth_infinity) on directory entries.
05481  *
05482  * @a dirent_fields controls which fields in the #svn_dirent_t's are
05483  * filled in.  To have them totally filled in use #SVN_DIRENT_ALL,
05484  * otherwise simply bitwise OR together the combination of @c SVN_DIRENT_
05485  * fields you care about.
05486  *
05487  * @since New in 1.8.
05488  */
05489 svn_error_t *
05490 svn_client_list3(const char *path_or_url,
05491                  const svn_opt_revision_t *peg_revision,
05492                  const svn_opt_revision_t *revision,
05493                  svn_depth_t depth,
05494                  apr_uint32_t dirent_fields,
05495                  svn_boolean_t fetch_locks,
05496                  svn_boolean_t include_externals,
05497                  svn_client_list_func2_t list_func,
05498                  void *baton,
05499                  svn_client_ctx_t *ctx,
05500                  apr_pool_t *pool);
05501 
05502 
05503 /** Similar to svn_client_list3(), but with @a include_externals set
05504  * to FALSE, and using a #svn_client_list_func_t as callback.
05505  *
05506  * @deprecated Provided for backwards compatibility with the 1.7 API.
05507  *
05508  * @since New in 1.5.
05509  */
05510 SVN_DEPRECATED
05511 svn_error_t *
05512 svn_client_list2(const char *path_or_url,
05513                  const svn_opt_revision_t *peg_revision,
05514                  const svn_opt_revision_t *revision,
05515                  svn_depth_t depth,
05516                  apr_uint32_t dirent_fields,
05517                  svn_boolean_t fetch_locks,
05518                  svn_client_list_func_t list_func,
05519                  void *baton,
05520                  svn_client_ctx_t *ctx,
05521                  apr_pool_t *pool);
05522 
05523 /**
05524  * Similar to svn_client_list2(), but with @a recurse instead of @a depth.
05525  * If @a recurse is TRUE, pass #svn_depth_files for @a depth; else
05526  * pass #svn_depth_infinity.
05527  *
05528  * @since New in 1.4.
05529  *
05530  * @deprecated Provided for backward compatibility with the 1.4 API.
05531  */
05532 SVN_DEPRECATED
05533 svn_error_t *
05534 svn_client_list(const char *path_or_url,
05535                 const svn_opt_revision_t *peg_revision,
05536                 const svn_opt_revision_t *revision,
05537                 svn_boolean_t recurse,
05538                 apr_uint32_t dirent_fields,
05539                 svn_boolean_t fetch_locks,
05540                 svn_client_list_func_t list_func,
05541                 void *baton,
05542                 svn_client_ctx_t *ctx,
05543                 apr_pool_t *pool);
05544 
05545 /**
05546  * Same as svn_client_list(), but always passes #SVN_DIRENT_ALL for
05547  * the @a dirent_fields argument and returns all information in two
05548  * hash tables instead of invoking a callback.
05549  *
05550  * Set @a *dirents to a newly allocated hash of directory entries.
05551  * The @a dirents hash maps entry names (<tt>const char *</tt>) to
05552  * #svn_dirent_t *'s.
05553  *
05554  * If @a locks is not @c NULL, set @a *locks to a hash table mapping
05555  * entry names (<tt>const char *</tt>) to #svn_lock_t *'s.
05556  *
05557  * @since New in 1.3.
05558  *
05559  * @deprecated Provided for backward compatibility with the 1.3 API.
05560  * Use svn_client_list2() instead.
05561  */
05562 SVN_DEPRECATED
05563 svn_error_t *
05564 svn_client_ls3(apr_hash_t **dirents,
05565                apr_hash_t **locks,
05566                const char *path_or_url,
05567                const svn_opt_revision_t *peg_revision,
05568                const svn_opt_revision_t *revision,
05569                svn_boolean_t recurse,
05570                svn_client_ctx_t *ctx,
05571                apr_pool_t *pool);
05572 
05573 /**
05574  * Same as svn_client_ls3(), but without the ability to get locks.
05575  *
05576  * @since New in 1.2.
05577  *
05578  * @deprecated Provided for backward compatibility with the 1.2 API.
05579  * Use svn_client_list2() instead.
05580  */
05581 SVN_DEPRECATED
05582 svn_error_t *
05583 svn_client_ls2(apr_hash_t **dirents,
05584                const char *path_or_url,
05585                const svn_opt_revision_t *peg_revision,
05586                const svn_opt_revision_t *revision,
05587                svn_boolean_t recurse,
05588                svn_client_ctx_t *ctx,
05589                apr_pool_t *pool);
05590 
05591 /**
05592  * Similar to svn_client_ls2() except that @a peg_revision is always
05593  * the same as @a revision.
05594  *
05595  * @deprecated Provided for backward compatibility with the 1.1 API.
05596  * Use svn_client_list2() instead.
05597  */
05598 SVN_DEPRECATED
05599 svn_error_t *
05600 svn_client_ls(apr_hash_t **dirents,
05601               const char *path_or_url,
05602               svn_opt_revision_t *revision,
05603               svn_boolean_t recurse,
05604               svn_client_ctx_t *ctx,
05605               apr_pool_t *pool);
05606 
05607 
05608 /** @} */
05609 
05610 /**
05611  * @defgroup Cat View the contents of a file in the repository.
05612  *
05613  * @{
05614  */
05615 
05616 /**
05617  * Output the content of a file.
05618  *
05619  * @param[in] out           The stream to which the content will be written.
05620  * @param[in] path_or_url   The path or URL of the file.
05621  * @param[in] peg_revision  The peg revision.
05622  * @param[in] revision  The operative revision.
05623  * @param[in] ctx   The standard client context, used for possible
05624  *                  authentication.
05625  * @param[in] pool  Used for any temporary allocation.
05626  *
05627  * @todo Add an expansion/translation flag?
05628  *
05629  * @return A pointer to an #svn_error_t of the type (this list is not
05630  *         exhaustive): <br>
05631  *         An unspecified error if @a revision is of kind
05632  *         #svn_opt_revision_previous (or some other kind that requires
05633  *         a local path), because the desired revision cannot be
05634  *         determined. <br>
05635  *         If no error occurred, return #SVN_NO_ERROR.
05636  *
05637  * @since New in 1.2.
05638  *
05639  * @see #svn_client_ctx_t <br> @ref clnt_revisions for
05640  *      a discussion of operative and peg revisions.
05641  */
05642 svn_error_t *
05643 svn_client_cat2(svn_stream_t *out,
05644                 const char *path_or_url,
05645                 const svn_opt_revision_t *peg_revision,
05646                 const svn_opt_revision_t *revision,
05647                 svn_client_ctx_t *ctx,
05648                 apr_pool_t *pool);
05649 
05650 
05651 /**
05652  * Similar to svn_client_cat2() except that the peg revision is always
05653  * the same as @a revision.
05654  *
05655  * @deprecated Provided for backward compatibility with the 1.1 API.
05656  */
05657 SVN_DEPRECATED
05658 svn_error_t *
05659 svn_client_cat(svn_stream_t *out,
05660                const char *path_or_url,
05661                const svn_opt_revision_t *revision,
05662                svn_client_ctx_t *ctx,
05663                apr_pool_t *pool);
05664 
05665 /** @} end group: cat */
05666 
05667 
05668 
05669 /** Changelist commands
05670  *
05671  * @defgroup svn_client_changelist_funcs Client Changelist Functions
05672  * @{
05673  */
05674 
05675 /** Implementation note:
05676  *
05677  *  For now, changelists are implemented by scattering the
05678  *  associations across multiple .svn/entries files in a working copy.
05679  *  However, this client API was written so that we have the option of
05680  *  changing the underlying implementation -- we may someday want to
05681  *  store changelist definitions in a centralized database.
05682  */
05683 
05684 /**
05685  * Add each path in @a paths (recursing to @a depth as necessary) to
05686  * @a changelist.  If a path is already a member of another
05687  * changelist, then remove it from the other changelist and add it to
05688  * @a changelist.  (For now, a path cannot belong to two changelists
05689  * at once.)
05690  *
05691  * @a paths is an array of (const char *) local WC paths.
05692  *
05693  * @a changelists is an array of <tt>const char *</tt> changelist
05694  * names, used as a restrictive filter on items whose changelist
05695  * assignments are adjusted; that is, don't tweak the changeset of any
05696  * item unless it's currently a member of one of those changelists.
05697  * If @a changelists is empty (or altogether @c NULL), no changelist
05698  * filtering occurs.
05699  *
05700  * @note This metadata is purely a client-side "bookkeeping"
05701  * convenience, and is entirely managed by the working copy.
05702  *
05703  * @since New in 1.5.
05704  */
05705 svn_error_t *
05706 svn_client_add_to_changelist(const apr_array_header_t *paths,
05707                              const char *changelist,
05708                              svn_depth_t depth,
05709                              const apr_array_header_t *changelists,
05710                              svn_client_ctx_t *ctx,
05711                              apr_pool_t *pool);
05712 
05713 /**
05714  * Remove each path in @a paths (recursing to @a depth as necessary)
05715  * from changelists to which they are currently assigned.
05716  *
05717  * @a paths is an array of (const char *) local WC paths.
05718  *
05719  * @a changelists is an array of <tt>const char *</tt> changelist
05720  * names, used as a restrictive filter on items whose changelist
05721  * assignments are removed; that is, don't remove from a changeset any
05722  * item unless it's currently a member of one of those changelists.
05723  * If @a changelists is empty (or altogether @c NULL), all changelist
05724  * assignments in and under each path in @a paths (to @a depth) will
05725  * be removed.
05726  *
05727  * @note This metadata is purely a client-side "bookkeeping"
05728  * convenience, and is entirely managed by the working copy.
05729  *
05730  * @since New in 1.5.
05731  */
05732 svn_error_t *
05733 svn_client_remove_from_changelists(const apr_array_header_t *paths,
05734                                    svn_depth_t depth,
05735                                    const apr_array_header_t *changelists,
05736                                    svn_client_ctx_t *ctx,
05737                                    apr_pool_t *pool);
05738 
05739 
05740 /**
05741  * Beginning at @a path, crawl to @a depth to discover every path in
05742  * or under @a path which belongs to one of the changelists in @a
05743  * changelists (an array of <tt>const char *</tt> changelist names).
05744  * If @a changelists is @c NULL, discover paths with any changelist.
05745  * Call @a callback_func (with @a callback_baton) each time a
05746  * changelist-having path is discovered.
05747  *
05748  * @a path is a local WC path.
05749  *
05750  * If @a ctx->cancel_func is not @c NULL, invoke it passing @a
05751  * ctx->cancel_baton during the recursive walk.
05752  *
05753  * @since New in 1.5.
05754  */
05755 svn_error_t *
05756 svn_client_get_changelists(const char *path,
05757                            const apr_array_header_t *changelists,
05758                            svn_depth_t depth,
05759                            svn_changelist_receiver_t callback_func,
05760                            void *callback_baton,
05761                            svn_client_ctx_t *ctx,
05762                            apr_pool_t *pool);
05763 
05764 /** @} */
05765 
05766 
05767 
05768 /** Locking commands
05769  *
05770  * @defgroup svn_client_locking_funcs Client Locking Functions
05771  * @{
05772  */
05773 
05774 /**
05775  * Lock @a targets in the repository.  @a targets is an array of
05776  * <tt>const char *</tt> paths - either all working copy paths or all URLs.
05777  * All targets must be in the same repository.
05778  *
05779  * If a target is already locked in the repository, no lock will be
05780  * acquired unless @a steal_lock is TRUE, in which case the locks are
05781  * stolen.  @a comment, if non-NULL, is an xml-escapable description
05782  * stored with each lock in the repository.  Each acquired lock will
05783  * be stored in the working copy if the targets are WC paths.
05784  *
05785  * For each target @a ctx->notify_func2/notify_baton2 will be used to indicate
05786  * whether it was locked.  An action of #svn_wc_notify_locked
05787  * means that the path was locked.  If the path was not locked because
05788  * it was out of date or there was already a lock in the repository,
05789  * the notification function will be called with
05790  * #svn_wc_notify_failed_lock, and the error passed in the notification
05791  * structure.
05792  *
05793  * Use @a pool for temporary allocations.
05794  *
05795  * @since New in 1.2.
05796  */
05797 svn_error_t *
05798 svn_client_lock(const apr_array_header_t *targets,
05799                 const char *comment,
05800                 svn_boolean_t steal_lock,
05801                 svn_client_ctx_t *ctx,
05802                 apr_pool_t *pool);
05803 
05804 /**
05805  * Unlock @a targets in the repository.  @a targets is an array of
05806  * <tt>const char *</tt> paths - either all working copy paths or all URLs.
05807  * All targets must be in the same repository.
05808  *
05809  * If the targets are WC paths, and @a break_lock is FALSE, the working
05810  * copy must contain a lock for each target.
05811  * If this is not the case, or the working copy lock doesn't match the
05812  * lock token in the repository, an error will be signaled.
05813  *
05814  * If the targets are URLs, the locks may be broken even if @a break_lock
05815  * is FALSE, but only if the lock owner is the same as the
05816  * authenticated user.
05817  *
05818  * If @a break_lock is TRUE, the locks will be broken in the
05819  * repository.  In both cases, the locks, if any, will be removed from
05820  * the working copy if the targets are WC paths.
05821  *
05822  * The notification functions in @a ctx will be called for each
05823  * target.  If the target was successfully unlocked,
05824  * #svn_wc_notify_unlocked will be used.  Else, if the error is
05825  * directly related to unlocking the path (see
05826  * #SVN_ERR_IS_UNLOCK_ERROR), #svn_wc_notify_failed_unlock will be
05827  * used and the error will be passed in the notification structure.
05828 
05829  * Use @a pool for temporary allocations.
05830  *
05831  * @since New in 1.2.
05832  */
05833 svn_error_t *
05834 svn_client_unlock(const apr_array_header_t *targets,
05835                   svn_boolean_t break_lock,
05836                   svn_client_ctx_t *ctx,
05837                   apr_pool_t *pool);
05838 
05839 /** @} */
05840 
05841 /**
05842  * @defgroup Info Show repository information about a working copy.
05843  *
05844  * @{
05845  */
05846 
05847 /** The size of the file is unknown.
05848  * Used as value in fields of type @c apr_size_t in #svn_info_t.
05849  *
05850  * @since New in 1.5
05851  * @deprecated Provided for backward compatibility with the 1.6 API.
05852  */
05853 #define SVN_INFO_SIZE_UNKNOWN ((apr_size_t) -1)
05854 
05855 /**
05856  * A structure which describes various system-generated metadata about
05857  * a working-copy path or URL.
05858  *
05859  * @note Fields may be added to the end of this structure in future
05860  * versions.  Therefore, users shouldn't allocate structures of this
05861  * type, to preserve binary compatibility.
05862  *
05863  * @since New in 1.2.
05864  * @deprecated Provided for backward compatibility with the 1.6 API.  The new
05865  * API is #svn_client_info2_t.
05866  */
05867 typedef struct svn_info_t
05868 {
05869   /** Where the item lives in the repository. */
05870   const char *URL;
05871 
05872   /** The revision of the object.  If path_or_url is a working-copy
05873    * path, then this is its current working revnum.  If path_or_url
05874    * is a URL, then this is the repos revision that path_or_url lives in. */
05875   svn_revnum_t rev;
05876 
05877   /** The node's kind. */
05878   svn_node_kind_t kind;
05879 
05880   /** The root URL of the repository. */
05881   const char *repos_root_URL;
05882 
05883   /** The repository's UUID. */
05884   const char *repos_UUID;
05885 
05886   /** The last revision in which this object changed. */
05887   svn_revnum_t last_changed_rev;
05888 
05889   /** The date of the last_changed_rev. */
05890   apr_time_t last_changed_date;
05891 
05892   /** The author of the last_changed_rev. */
05893   const char *last_changed_author;
05894 
05895   /** An exclusive lock, if present.  Could be either local or remote. */
05896   svn_lock_t *lock;
05897 
05898   /** Whether or not to ignore the next 10 wc-specific fields. */
05899   svn_boolean_t has_wc_info;
05900 
05901   /**
05902    * @name Working-copy path fields
05903    * These things only apply to a working-copy path.
05904    * See svn_wc_entry_t for explanations.
05905    * @{
05906    */
05907   svn_wc_schedule_t schedule;
05908   const char *copyfrom_url;
05909   svn_revnum_t copyfrom_rev;
05910   apr_time_t text_time;
05911   apr_time_t prop_time;  /* will always be 0 for svn 1.4 and later */
05912   const char *checksum;
05913   const char *conflict_old;
05914   const char *conflict_new;
05915   const char *conflict_wrk;
05916   const char *prejfile;
05917   /** @since New in 1.5. */
05918   const char *changelist;
05919   /** @since New in 1.5. */
05920   svn_depth_t depth;
05921 
05922   /**
05923    * Similar to working_size64, but will be #SVN_INFO_SIZE_UNKNOWN when
05924    * its value would overflow apr_size_t (so when size >= 4 GB - 1 byte).
05925    *
05926    * @deprecated Provided for backward compatibility with the 1.5 API.
05927    */
05928   apr_size_t working_size;
05929 
05930   /** @} */
05931 
05932   /**
05933    * Similar to size64, but size will be #SVN_INFO_SIZE_UNKNOWN when
05934    * its value would overflow apr_size_t (so when size >= 4 GB - 1 byte).
05935    *
05936    * @deprecated Provided for backward compatibility with the 1.5 API.
05937    */
05938   apr_size_t size;
05939 
05940   /**
05941    * The size of the file in the repository (untranslated,
05942    * e.g. without adjustment of line endings and keyword
05943    * expansion). Only applicable for file -- not directory -- URLs.
05944    * For working copy paths, size64 will be #SVN_INVALID_FILESIZE.
05945    * @since New in 1.6.
05946    */
05947   svn_filesize_t size64;
05948 
05949   /**
05950    * The size of the file after being translated into its local
05951    * representation, or #SVN_INVALID_FILESIZE if unknown.
05952    * Not applicable for directories.
05953    * @since New in 1.6.
05954    * @name Working-copy path fields
05955    * @{
05956    */
05957   svn_filesize_t working_size64;
05958 
05959   /**
05960    * Info on any tree conflict of which this node is a victim. Otherwise NULL.
05961    * @since New in 1.6.
05962    */
05963   svn_wc_conflict_description_t *tree_conflict;
05964 
05965   /** @} */
05966 
05967 } svn_info_t;
05968 
05969 
05970 /**
05971  * The callback invoked by svn_client_info2().  Each invocation
05972  * describes @a path with the information present in @a info.  Note
05973  * that any fields within @a info may be NULL if information is
05974  * unavailable.  Use @a pool for all temporary allocation.
05975  *
05976  * @since New in 1.2.
05977  * @deprecated Provided for backward compatibility with the 1.6 API.  The new
05978  * API is #svn_client_info_receiver2_t.
05979  */
05980 typedef svn_error_t *(*svn_info_receiver_t)(
05981   void *baton,
05982   const char *path,
05983   const svn_info_t *info,
05984   apr_pool_t *pool);
05985 
05986 /**
05987  * Return a duplicate of @a info, allocated in @a pool. No part of the new
05988  * structure will be shared with @a info.
05989  *
05990  * @since New in 1.3.
05991  * @deprecated Provided for backward compatibility with the 1.6 API.  The new
05992  * API is #svn_client_info2_dup().
05993  */
05994 SVN_DEPRECATED
05995 svn_info_t *
05996 svn_info_dup(const svn_info_t *info,
05997              apr_pool_t *pool);
05998 
05999 /**
06000  * A structure which describes various system-generated metadata about
06001  * a working-copy path or URL.
06002  *
06003  * @note Fields may be added to the end of this structure in future
06004  * versions.  Therefore, users shouldn't allocate structures of this
06005  * type, to preserve binary compatibility.
06006  *
06007  * @since New in 1.7.
06008  */
06009 typedef struct svn_client_info2_t
06010 {
06011   /** Where the item lives in the repository. */
06012   const char *URL;
06013 
06014   /** The revision of the object.  If the target is a working-copy
06015    * path, then this is its current working revnum.  If the target
06016    * is a URL, then this is the repos revision that it lives in. */
06017   svn_revnum_t rev;
06018 
06019   /** The root URL of the repository. */
06020   const char *repos_root_URL;
06021 
06022   /** The repository's UUID. */
06023   const char *repos_UUID;
06024 
06025   /** The node's kind. */
06026   svn_node_kind_t kind;
06027 
06028   /** The size of the file in the repository (untranslated,
06029    * e.g. without adjustment of line endings and keyword
06030    * expansion). Only applicable for file -- not directory -- URLs.
06031    * For working copy paths, @a size will be #SVN_INVALID_FILESIZE. */
06032   svn_filesize_t size;
06033 
06034   /** The last revision in which this object changed. */
06035   svn_revnum_t last_changed_rev;
06036 
06037   /** The date of the last_changed_rev. */
06038   apr_time_t last_changed_date;
06039 
06040   /** The author of the last_changed_rev. */
06041   const char *last_changed_author;
06042 
06043   /** An exclusive lock, if present.  Could be either local or remote. */
06044   const svn_lock_t *lock;
06045 
06046   /** Possible information about the working copy, NULL if not valid. */
06047   const svn_wc_info_t *wc_info;
06048 
06049 } svn_client_info2_t;
06050 
06051 /**
06052  * Return a duplicate of @a info, allocated in @a pool. No part of the new
06053  * structure will be shared with @a info.
06054  *
06055  * @since New in 1.7.
06056  */
06057 svn_client_info2_t *
06058 svn_client_info2_dup(const svn_client_info2_t *info,
06059                      apr_pool_t *pool);
06060 
06061 /**
06062  * The callback invoked by info retrievers.  Each invocation
06063  * describes @a abspath_or_url with the information present in @a info.
06064  * Use @a scratch_pool for all temporary allocation.
06065  *
06066  * @since New in 1.7.
06067  */
06068 typedef svn_error_t *(*svn_client_info_receiver2_t)(
06069                          void *baton,
06070                          const char *abspath_or_url,
06071                          const svn_client_info2_t *info,
06072                          apr_pool_t *scratch_pool);
06073 
06074 /**
06075  * Invoke @a receiver with @a receiver_baton to return information
06076  * about @a abspath_or_url in @a revision.  The information returned is
06077  * system-generated metadata, not the sort of "property" metadata
06078  * created by users.  See #svn_client_info2_t.
06079  *
06080  * If both revision arguments are either #svn_opt_revision_unspecified
06081  * or @c NULL, then information will be pulled solely from the working copy;
06082  * no network connections will be made.
06083  *
06084  * Otherwise, information will be pulled from a repository.  The
06085  * actual node revision selected is determined by the @a abspath_or_url
06086  * as it exists in @a peg_revision.  If @a peg_revision->kind is
06087  * #svn_opt_revision_unspecified, then it defaults to
06088  * #svn_opt_revision_head for URLs or #svn_opt_revision_working for
06089  * WC targets.
06090  *
06091  * If @a abspath_or_url is not a local path, then if @a revision is of
06092  * kind #svn_opt_revision_previous (or some other kind that requires
06093  * a local path), an error will be returned, because the desired
06094  * revision cannot be determined.
06095  *
06096  * Use the authentication baton cached in @a ctx to authenticate
06097  * against the repository.
06098  *
06099  * If @a abspath_or_url is a file, just invoke @a receiver on it.  If it
06100  * is a directory, then descend according to @a depth.  If @a depth is
06101  * #svn_depth_empty, invoke @a receiver on @a abspath_or_url and
06102  * nothing else; if #svn_depth_files, on @a abspath_or_url and its
06103  * immediate file children; if #svn_depth_immediates, the preceding
06104  * plus on each immediate subdirectory; if #svn_depth_infinity, then
06105  * recurse fully, invoking @a receiver on @a abspath_or_url and
06106  * everything beneath it.
06107  *
06108  * If @a fetch_excluded is TRUE, also also send excluded nodes in the working
06109  * copy to @a receiver, otherwise these are skipped. If @a fetch_actual_only
06110  * is TRUE also send nodes that don't exist as versioned but are still
06111  * tree conflicted.
06112  *
06113  * @a changelists is an array of <tt>const char *</tt> changelist
06114  * names, used as a restrictive filter on items whose info is
06115  * reported; that is, don't report info about any item unless
06116  * it's a member of one of those changelists.  If @a changelists is
06117  * empty (or altogether @c NULL), no changelist filtering occurs.
06118  *
06119  * @since New in 1.7.
06120  */
06121 svn_error_t *
06122 svn_client_info3(const char *abspath_or_url,
06123                  const svn_opt_revision_t *peg_revision,
06124                  const svn_opt_revision_t *revision,
06125                  svn_depth_t depth,
06126                  svn_boolean_t fetch_excluded,
06127                  svn_boolean_t fetch_actual_only,
06128                  const apr_array_header_t *changelists,
06129                  svn_client_info_receiver2_t receiver,
06130                  void *receiver_baton,
06131                  svn_client_ctx_t *ctx,
06132                  apr_pool_t *scratch_pool);
06133 
06134 /** Similar to svn_client_info3, but uses an svn_info_receiver_t instead of
06135  * a #svn_client_info_receiver2_t, and @a path_or_url may be a relative path.
06136  *
06137  * @since New in 1.5.
06138  * @deprecated Provided for backward compatibility with the 1.6 API.
06139  */
06140 SVN_DEPRECATED
06141 svn_error_t *
06142 svn_client_info2(const char *path_or_url,
06143                  const svn_opt_revision_t *peg_revision,
06144                  const svn_opt_revision_t *revision,
06145                  svn_info_receiver_t receiver,
06146                  void *receiver_baton,
06147                  svn_depth_t depth,
06148                  const apr_array_header_t *changelists,
06149                  svn_client_ctx_t *ctx,
06150                  apr_pool_t *pool);
06151 
06152 /**
06153  * Similar to svn_client_info2() but with @a changelists passed as @c
06154  * NULL, and @a depth set according to @a recurse: if @a recurse is
06155  * TRUE, @a depth is #svn_depth_infinity, else #svn_depth_empty.
06156  *
06157  * @deprecated Provided for backward compatibility with the 1.4 API.
06158  */
06159 SVN_DEPRECATED
06160 svn_error_t *
06161 svn_client_info(const char *path_or_url,
06162                 const svn_opt_revision_t *peg_revision,
06163                 const svn_opt_revision_t *revision,
06164                 svn_info_receiver_t receiver,
06165                 void *receiver_baton,
06166                 svn_boolean_t recurse,
06167                 svn_client_ctx_t *ctx,
06168                 apr_pool_t *pool);
06169 
06170 /**
06171  * Set @a *wcroot_abspath to the local abspath of the root of the
06172  * working copy in which @a local_abspath resides.
06173  *
06174  * @since New in 1.7.
06175  */
06176 svn_error_t *
06177 svn_client_get_wc_root(const char **wcroot_abspath,
06178                        const char *local_abspath,
06179                        svn_client_ctx_t *ctx,
06180                        apr_pool_t *result_pool,
06181                        apr_pool_t *scratch_pool);
06182 
06183 /**
06184  * Set @a *min_revision and @a *max_revision to the lowest and highest
06185  * revision numbers found within @a local_abspath.  If @a committed is
06186  * TRUE, set @a *min_revision and @a *max_revision to the lowest and
06187  * highest comitted (i.e. "last changed") revision numbers,
06188  * respectively.  NULL may be passed for either of @a min_revision and
06189  * @a max_revision to indicate the caller's lack of interest in the
06190  * value.  Use @a scratch_pool for temporary allocations.
06191  *
06192  * @since New in 1.7.
06193  */
06194 svn_error_t *
06195 svn_client_min_max_revisions(svn_revnum_t *min_revision,
06196                              svn_revnum_t *max_revision,
06197                              const char *local_abspath,
06198                              svn_boolean_t committed,
06199                              svn_client_ctx_t *ctx,
06200                              apr_pool_t *scratch_pool);
06201 
06202 /** @} */
06203 
06204 
06205 /**
06206  * @defgroup Patch Apply a patch to the working copy
06207  *
06208  * @{
06209  */
06210 
06211 /**
06212  * The callback invoked by svn_client_patch() before attempting to patch
06213  * the target file at @a canon_path_from_patchfile (the path as parsed from
06214  * the patch file, but in canonicalized form). The callback can set
06215  * @a *filtered to @c TRUE to prevent the file from being patched, or else
06216  * must set it to @c FALSE.
06217  *
06218  * The callback is also provided with @a patch_abspath, the path of a
06219  * temporary file containing the patched result, and with @a reject_abspath,
06220  * the path to a temporary file containing the diff text of any hunks
06221  * which were rejected during patching.
06222  *
06223  * Because the callback is invoked before the patching attempt is made,
06224  * there is no guarantee that the target file will actually be patched
06225  * successfully. Client implementations must pay attention to notification
06226  * feedback provided by svn_client_patch() to find out which paths were
06227  * patched successfully.
06228  *
06229  * Note also that the files at @a patch_abspath and @a reject_abspath are
06230  * guaranteed to remain on disk after patching only if the
06231  * @a remove_tempfiles parameter for svn_client_patch() is @c FALSE.
06232  *
06233  * The const char * parameters may be allocated in @a scratch_pool which
06234  * will be cleared after each invocation.
06235  *
06236  * @since New in 1.7.
06237  */
06238 typedef svn_error_t *(*svn_client_patch_func_t)(
06239   void *baton,
06240   svn_boolean_t *filtered,
06241   const char *canon_path_from_patchfile,
06242   const char *patch_abspath,
06243   const char *reject_abspath,
06244   apr_pool_t *scratch_pool);
06245 
06246 /**
06247  * Apply a unidiff patch that's located at absolute path
06248  * @a patch_abspath to the working copy directory at @a wc_dir_abspath.
06249  *
06250  * This function makes a best-effort attempt at applying the patch.
06251  * It might skip patch targets which cannot be patched (e.g. targets
06252  * that are outside of the working copy). It will also reject hunks
06253  * which cannot be applied to a target in case the hunk's context
06254  * does not match anywhere in the patch target.
06255  *
06256  * If @a dry_run is TRUE, the patching process is carried out, and full
06257  * notification feedback is provided, but the working copy is not modified.
06258  *
06259  * @a strip_count specifies how many leading path components should be
06260  * stripped from paths obtained from the patch. It is an error if a
06261  * negative strip count is passed.
06262  *
06263  * If @a reverse is @c TRUE, apply patches in reverse, deleting lines
06264  * the patch would add and adding lines the patch would delete.
06265  *
06266  * If @a ignore_whitespace is TRUE, allow patches to be applied if they
06267  * only differ from the target by whitespace.
06268  *
06269  * If @a remove_tempfiles is TRUE, lifetimes of temporary files created
06270  * during patching will be managed internally. Otherwise, the caller should
06271  * take ownership of these files, the names of which can be obtained by
06272  * passing a @a patch_func callback.
06273  *
06274  * If @a patch_func is non-NULL, invoke @a patch_func with @a patch_baton
06275  * for each patch target processed.
06276  *
06277  * If @a ctx->notify_func2 is non-NULL, invoke @a ctx->notify_func2 with
06278  * @a ctx->notify_baton2 as patching progresses.
06279  *
06280  * If @a ctx->cancel_func is non-NULL, invoke it passing @a
06281  * ctx->cancel_baton at various places during the operation.
06282  *
06283  * Use @a scratch_pool for temporary allocations.
06284  *
06285  * @since New in 1.7.
06286  */
06287 svn_error_t *
06288 svn_client_patch(const char *patch_abspath,
06289                  const char *wc_dir_abspath,
06290                  svn_boolean_t dry_run,
06291                  int strip_count,
06292                  svn_boolean_t reverse,
06293                  svn_boolean_t ignore_whitespace,
06294                  svn_boolean_t remove_tempfiles,
06295                  svn_client_patch_func_t patch_func,
06296                  void *patch_baton,
06297                  svn_client_ctx_t *ctx,
06298                  apr_pool_t *scratch_pool);
06299 
06300 /** @} */
06301 
06302 /** @} end group: Client working copy management */
06303 
06304 /**
06305  *
06306  * @defgroup clnt_sessions Client session related functions
06307  *
06308  * @{
06309  *
06310  */
06311 
06312 
06313 /* Converting paths to URLs. */
06314 
06315 /** Set @a *url to the URL for @a path_or_url allocated in result_pool.
06316  *
06317  * If @a path_or_url is already a URL, set @a *url to @a path_or_url.
06318  *
06319  * If @a path_or_url is a versioned item, set @a *url to @a
06320  * path_or_url's entry URL.  If @a path_or_url is unversioned (has
06321  * no entry), set @a *url to NULL.
06322  *
06323  * Use @a ctx->wc_ctx to retrieve the information. Use
06324  ** @a scratch_pool for temporary allocations.
06325  *
06326  * @since New in 1.7.
06327  */
06328 svn_error_t *
06329 svn_client_url_from_path2(const char **url,
06330                           const char *path_or_url,
06331                           svn_client_ctx_t *ctx,
06332                           apr_pool_t *result_pool,
06333                           apr_pool_t *scratch_pool);
06334 
06335 /** Similar to svn_client_url_from_path2(), but without a context argument.
06336  *
06337  * @since New in 1.5.
06338  * @deprecated Provided for backward compatibility with the 1.6 API.
06339  */
06340 SVN_DEPRECATED
06341 svn_error_t *
06342 svn_client_url_from_path(const char **url,
06343                          const char *path_or_url,
06344                          apr_pool_t *pool);
06345 
06346 
06347 
06348 /* Fetching a repository's root URL and UUID. */
06349 
06350 /** Set @a *repos_root_url and @a *repos_uuid, to the root URL and UUID of
06351  * the repository in which @a abspath_or_url is versioned. Use the
06352  * authentication baton and working copy context cached in @a ctx as
06353  * necessary. @a repos_root_url and/or @a repos_uuid may be NULL if not
06354  * wanted.
06355  *
06356  * This function will open a temporary RA session to the repository if
06357  * necessary to get the information.
06358  *
06359  * Allocate @a *repos_root_url and @a *repos_uuid in @a result_pool.
06360  * Use @a scratch_pool for temporary allocations.
06361  *
06362  * @since New in 1.8.
06363  */
06364 svn_error_t *
06365 svn_client_get_repos_root(const char **repos_root_url,
06366                           const char **repos_uuid,
06367                           const char *abspath_or_url,
06368                           svn_client_ctx_t *ctx,
06369                           apr_pool_t *result_pool,
06370                           apr_pool_t *scratch_pool);
06371 
06372 /** Set @a *url to the repository root URL of the repository in which
06373  * @a path_or_url is versioned (or scheduled to be versioned),
06374  * allocated in @a pool.  @a ctx is required for possible repository
06375  * authentication.
06376  *
06377  * @since New in 1.5.
06378  * @deprecated Provided for backward compatibility with the 1.7 API. Use
06379  * svn_client_get_repos_root() instead, with an absolute path.
06380  */
06381 SVN_DEPRECATED
06382 svn_error_t *
06383 svn_client_root_url_from_path(const char **url,
06384                               const char *path_or_url,
06385                               svn_client_ctx_t *ctx,
06386                               apr_pool_t *pool);
06387 
06388 /** Get repository @a uuid for @a url.
06389  *
06390  * Use a @a pool to open a temporary RA session to @a url, discover the
06391  * repository uuid, and free the session.  Return the uuid in @a uuid,
06392  * allocated in @a pool.  @a ctx is required for possible repository
06393  * authentication.
06394  *
06395  * @deprecated Provided for backward compatibility with the 1.7 API. Use
06396  * svn_client_get_repos_root() instead.
06397  */
06398 SVN_DEPRECATED
06399 svn_error_t *
06400 svn_client_uuid_from_url(const char **uuid,
06401                          const char *url,
06402                          svn_client_ctx_t *ctx,
06403                          apr_pool_t *pool);
06404 
06405 
06406 /** Return the repository @a uuid for working-copy @a local_abspath,
06407  * allocated in @a result_pool.  Use @a ctx->wc_ctx to retrieve the
06408  * information.
06409  *
06410  * Use @a scratch_pool for temporary allocations.
06411  *
06412  * @since New in 1.7.
06413  * @deprecated Provided for backward compatibility with the 1.7 API. Use
06414  * svn_client_get_repos_root() instead.
06415  */
06416 SVN_DEPRECATED
06417 svn_error_t *
06418 svn_client_uuid_from_path2(const char **uuid,
06419                            const char *local_abspath,
06420                            svn_client_ctx_t *ctx,
06421                            apr_pool_t *result_pool,
06422                            apr_pool_t *scratch_pool);
06423 
06424 /** Similar to svn_client_uuid_from_path2(), but with a relative path and
06425  * an access baton.
06426  *
06427  * @deprecated Provided for backward compatibility with the 1.6 API.
06428  */
06429 SVN_DEPRECATED
06430 svn_error_t *
06431 svn_client_uuid_from_path(const char **uuid,
06432                           const char *path,
06433                           svn_wc_adm_access_t *adm_access,
06434                           svn_client_ctx_t *ctx,
06435                           apr_pool_t *pool);
06436 
06437 
06438 /* Opening RA sessions. */
06439 
06440 /** Open an RA session rooted at @a url, and return it in @a *session.
06441  *
06442  * Use the authentication baton stored in @a ctx for authentication.
06443  * @a *session is allocated in @a result_pool.
06444  *
06445  * If @a wri_abspath is not NULL, use the working copy identified by @a
06446  * wri_abspath to potentially avoid transferring unneeded data.
06447  *
06448  * @note This function is similar to svn_ra_open4(), but the caller avoids
06449  * having to providing its own callback functions.
06450  * @since New in 1.8.
06451  */
06452 svn_error_t *
06453 svn_client_open_ra_session2(svn_ra_session_t **session,
06454                            const char *url,
06455                            const char *wri_abspath,
06456                            svn_client_ctx_t *ctx,
06457                            apr_pool_t *result_pool,
06458                            apr_pool_t *scratch_pool);
06459 
06460 /** Similar to svn_client_open_ra_session2(), but with @ wri_abspath
06461  * always passed as NULL, and with the same pool used as both @a
06462  * result_pool and @a scratch_pool.
06463  *
06464  * @since New in 1.3.
06465  * @deprecated Provided for backward compatibility with the 1.7 API.
06466  */
06467 SVN_DEPRECATED
06468 svn_error_t *
06469 svn_client_open_ra_session(svn_ra_session_t **session,
06470                            const char *url,
06471                            svn_client_ctx_t *ctx,
06472                            apr_pool_t *pool);
06473 
06474 
06475 /** @} end group: Client session related functions */
06476 
06477 /** @} */
06478 
06479 #ifdef __cplusplus
06480 }
06481 #endif /* __cplusplus */
06482 
06483 #endif  /* SVN_CLIENT_H */

Generated on Thu Apr 2 16:10:40 2015 for Subversion by  doxygen 1.4.7