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