1251881Speter/** 2251881Speter * @copyright 3251881Speter * ==================================================================== 4251881Speter * Licensed to the Apache Software Foundation (ASF) under one 5251881Speter * or more contributor license agreements. See the NOTICE file 6251881Speter * distributed with this work for additional information 7251881Speter * regarding copyright ownership. The ASF licenses this file 8251881Speter * to you under the Apache License, Version 2.0 (the 9251881Speter * "License"); you may not use this file except in compliance 10251881Speter * with the License. You may obtain a copy of the License at 11251881Speter * 12251881Speter * http://www.apache.org/licenses/LICENSE-2.0 13251881Speter * 14251881Speter * Unless required by applicable law or agreed to in writing, 15251881Speter * software distributed under the License is distributed on an 16251881Speter * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 17251881Speter * KIND, either express or implied. See the License for the 18251881Speter * specific language governing permissions and limitations 19251881Speter * under the License. 20251881Speter * ==================================================================== 21251881Speter * @endcopyright 22251881Speter * 23251881Speter * @file svn_client.h 24251881Speter * @brief Subversion's client library 25251881Speter * 26251881Speter * Requires: The working copy library and repository access library. 27251881Speter * Provides: Broad wrappers around working copy library functionality. 28251881Speter * Used By: Client programs. 29251881Speter */ 30251881Speter 31251881Speter#ifndef SVN_CLIENT_H 32251881Speter#define SVN_CLIENT_H 33251881Speter 34251881Speter#include <apr.h> 35251881Speter#include <apr_pools.h> 36251881Speter#include <apr_hash.h> 37251881Speter#include <apr_tables.h> 38251881Speter#include <apr_getopt.h> 39251881Speter#include <apr_file_io.h> 40251881Speter#include <apr_time.h> 41251881Speter 42251881Speter#include "svn_types.h" 43251881Speter#include "svn_string.h" 44251881Speter#include "svn_wc.h" 45251881Speter#include "svn_opt.h" 46251881Speter#include "svn_ra.h" 47251881Speter#include "svn_diff.h" 48251881Speter#include "svn_auth.h" 49251881Speter 50251881Speter#ifdef __cplusplus 51251881Speterextern "C" { 52251881Speter#endif /* __cplusplus */ 53251881Speter 54251881Speter 55251881Speter 56251881Speter/** 57251881Speter * Get libsvn_client version information. 58251881Speter * 59251881Speter * @since New in 1.1. 60251881Speter */ 61251881Speterconst svn_version_t * 62251881Spetersvn_client_version(void); 63251881Speter 64251881Speter/** Client supporting functions 65251881Speter * 66251881Speter * @defgroup clnt_support Client supporting subsystem 67251881Speter * 68251881Speter * @{ 69251881Speter */ 70251881Speter 71251881Speter 72251881Speter/*** Authentication stuff ***/ 73251881Speter 74251881Speter/** The new authentication system allows the RA layer to "pull" 75251881Speter * information as needed from libsvn_client. 76251881Speter * 77251881Speter * @deprecated Replaced by the svn_auth_* functions. 78251881Speter * @see auth_fns 79251881Speter * 80251881Speter * @defgroup auth_fns_depr (deprecated) AuthZ client subsystem 81251881Speter * 82251881Speter * @{ 83251881Speter */ 84251881Speter 85251881Speter/** Create and return @a *provider, an authentication provider of type 86251881Speter * svn_auth_cred_simple_t that gets information by prompting the user 87251881Speter * with @a prompt_func and @a prompt_baton. Allocate @a *provider in 88251881Speter * @a pool. 89251881Speter * 90251881Speter * If both #SVN_AUTH_PARAM_DEFAULT_USERNAME and 91251881Speter * #SVN_AUTH_PARAM_DEFAULT_PASSWORD are defined as runtime 92251881Speter * parameters in the @c auth_baton, then @a *provider will return the 93251881Speter * default arguments when svn_auth_first_credentials() is called. If 94251881Speter * svn_auth_first_credentials() fails, then @a *provider will 95251881Speter * re-prompt @a retry_limit times (via svn_auth_next_credentials()). 96251881Speter * For infinite retries, set @a retry_limit to value less than 0. 97251881Speter * 98251881Speter * @deprecated Provided for backward compatibility with the 1.3 API. 99251881Speter * Use svn_auth_get_simple_prompt_provider() instead. 100251881Speter */ 101251881SpeterSVN_DEPRECATED 102251881Spetervoid 103251881Spetersvn_client_get_simple_prompt_provider( 104251881Speter svn_auth_provider_object_t **provider, 105251881Speter svn_auth_simple_prompt_func_t prompt_func, 106251881Speter void *prompt_baton, 107251881Speter int retry_limit, 108251881Speter apr_pool_t *pool); 109251881Speter 110251881Speter 111251881Speter/** Create and return @a *provider, an authentication provider of type 112251881Speter * #svn_auth_cred_username_t that gets information by prompting the 113251881Speter * user with @a prompt_func and @a prompt_baton. Allocate @a *provider 114251881Speter * in @a pool. 115251881Speter * 116251881Speter * If #SVN_AUTH_PARAM_DEFAULT_USERNAME is defined as a runtime 117251881Speter * parameter in the @c auth_baton, then @a *provider will return the 118251881Speter * default argument when svn_auth_first_credentials() is called. If 119251881Speter * svn_auth_first_credentials() fails, then @a *provider will 120251881Speter * re-prompt @a retry_limit times (via svn_auth_next_credentials()). 121251881Speter * For infinite retries, set @a retry_limit to value less than 0. 122251881Speter * 123251881Speter * @deprecated Provided for backward compatibility with the 1.3 API. 124251881Speter * Use svn_auth_get_username_prompt_provider() instead. 125251881Speter */ 126251881SpeterSVN_DEPRECATED 127251881Spetervoid 128251881Spetersvn_client_get_username_prompt_provider( 129251881Speter svn_auth_provider_object_t **provider, 130251881Speter svn_auth_username_prompt_func_t prompt_func, 131251881Speter void *prompt_baton, 132251881Speter int retry_limit, 133251881Speter apr_pool_t *pool); 134251881Speter 135251881Speter 136251881Speter/** Create and return @a *provider, an authentication provider of type 137251881Speter * #svn_auth_cred_simple_t that gets/sets information from the user's 138251881Speter * ~/.subversion configuration directory. Allocate @a *provider in 139251881Speter * @a pool. 140251881Speter * 141251881Speter * If a default username or password is available, @a *provider will 142251881Speter * honor them as well, and return them when 143251881Speter * svn_auth_first_credentials() is called. (see 144251881Speter * #SVN_AUTH_PARAM_DEFAULT_USERNAME and #SVN_AUTH_PARAM_DEFAULT_PASSWORD). 145251881Speter * 146251881Speter * @deprecated Provided for backward compatibility with the 1.3 API. 147251881Speter * Use svn_auth_get_simple_provider2() instead. 148251881Speter */ 149251881SpeterSVN_DEPRECATED 150251881Spetervoid 151251881Spetersvn_client_get_simple_provider(svn_auth_provider_object_t **provider, 152251881Speter apr_pool_t *pool); 153251881Speter 154251881Speter 155251881Speter#if (defined(WIN32) && !defined(__MINGW32__)) || defined(DOXYGEN) || defined(CTYPESGEN) || defined(SWIG) 156251881Speter/** 157251881Speter * Create and return @a *provider, an authentication provider of type 158251881Speter * #svn_auth_cred_simple_t that gets/sets information from the user's 159251881Speter * ~/.subversion configuration directory. Allocate @a *provider in 160251881Speter * @a pool. 161251881Speter * 162251881Speter * This is like svn_client_get_simple_provider(), except that, when 163251881Speter * running on Window 2000 or newer (or any other Windows version that 164251881Speter * includes the CryptoAPI), the provider encrypts the password before 165251881Speter * storing it to disk. On earlier versions of Windows, the provider 166251881Speter * does nothing. 167251881Speter * 168251881Speter * @since New in 1.2. 169251881Speter * @note This function is only available on Windows. 170251881Speter * 171251881Speter * @note An administrative password reset may invalidate the account's 172251881Speter * secret key. This function will detect that situation and behave as 173251881Speter * if the password were not cached at all. 174251881Speter * 175251881Speter * @deprecated Provided for backward compatibility with the 1.3 API. 176251881Speter * Use svn_auth_get_windows_simple_provider() instead. 177251881Speter */ 178251881SpeterSVN_DEPRECATED 179251881Spetervoid 180251881Spetersvn_client_get_windows_simple_provider(svn_auth_provider_object_t **provider, 181251881Speter apr_pool_t *pool); 182251881Speter#endif /* WIN32 && !__MINGW32__ || DOXYGEN || CTYPESGEN || SWIG */ 183251881Speter 184251881Speter/** Create and return @a *provider, an authentication provider of type 185251881Speter * #svn_auth_cred_username_t that gets/sets information from a user's 186251881Speter * ~/.subversion configuration directory. Allocate @a *provider in 187251881Speter * @a pool. 188251881Speter * 189251881Speter * If a default username is available, @a *provider will honor it, 190251881Speter * and return it when svn_auth_first_credentials() is called. (see 191251881Speter * #SVN_AUTH_PARAM_DEFAULT_USERNAME). 192251881Speter * 193251881Speter * @deprecated Provided for backward compatibility with the 1.3 API. 194251881Speter * Use svn_auth_get_username_provider() instead. 195251881Speter */ 196251881SpeterSVN_DEPRECATED 197251881Spetervoid 198251881Spetersvn_client_get_username_provider(svn_auth_provider_object_t **provider, 199251881Speter apr_pool_t *pool); 200251881Speter 201251881Speter 202251881Speter/** Create and return @a *provider, an authentication provider of type 203251881Speter * #svn_auth_cred_ssl_server_trust_t, allocated in @a pool. 204251881Speter * 205251881Speter * @a *provider retrieves its credentials from the configuration 206251881Speter * mechanism. The returned credential is used to override SSL 207251881Speter * security on an error. 208251881Speter * 209251881Speter * @deprecated Provided for backward compatibility with the 1.3 API. 210251881Speter * Use svn_auth_get_ssl_server_trust_file_provider() instead. 211251881Speter */ 212251881SpeterSVN_DEPRECATED 213251881Spetervoid 214251881Spetersvn_client_get_ssl_server_trust_file_provider( 215251881Speter svn_auth_provider_object_t **provider, 216251881Speter apr_pool_t *pool); 217251881Speter 218251881Speter 219251881Speter/** Create and return @a *provider, an authentication provider of type 220251881Speter * #svn_auth_cred_ssl_client_cert_t, allocated in @a pool. 221251881Speter * 222251881Speter * @a *provider retrieves its credentials from the configuration 223251881Speter * mechanism. The returned credential is used to load the appropriate 224251881Speter * client certificate for authentication when requested by a server. 225251881Speter * 226251881Speter * @deprecated Provided for backward compatibility with the 1.3 API. 227251881Speter * Use svn_auth_get_ssl_client_cert_file_provider() instead. 228251881Speter */ 229251881SpeterSVN_DEPRECATED 230251881Spetervoid 231251881Spetersvn_client_get_ssl_client_cert_file_provider( 232251881Speter svn_auth_provider_object_t **provider, 233251881Speter apr_pool_t *pool); 234251881Speter 235251881Speter 236251881Speter/** Create and return @a *provider, an authentication provider of type 237251881Speter * #svn_auth_cred_ssl_client_cert_pw_t, allocated in @a pool. 238251881Speter * 239251881Speter * @a *provider retrieves its credentials from the configuration 240251881Speter * mechanism. The returned credential is used when a loaded client 241251881Speter * certificate is protected by a passphrase. 242251881Speter * 243251881Speter * @deprecated Provided for backward compatibility with the 1.3 API. 244251881Speter * Use svn_auth_get_ssl_client_cert_pw_file_provider2() instead. 245251881Speter */ 246251881SpeterSVN_DEPRECATED 247251881Spetervoid 248251881Spetersvn_client_get_ssl_client_cert_pw_file_provider( 249251881Speter svn_auth_provider_object_t **provider, 250251881Speter apr_pool_t *pool); 251251881Speter 252251881Speter 253251881Speter/** Create and return @a *provider, an authentication provider of type 254251881Speter * #svn_auth_cred_ssl_server_trust_t, allocated in @a pool. 255251881Speter * 256251881Speter * @a *provider retrieves its credentials by using the @a prompt_func 257251881Speter * and @a prompt_baton. The returned credential is used to override 258251881Speter * SSL security on an error. 259251881Speter * 260251881Speter * @deprecated Provided for backward compatibility with the 1.3 API. 261251881Speter * Use svn_auth_get_ssl_server_trust_prompt_provider() instead. 262251881Speter */ 263251881SpeterSVN_DEPRECATED 264251881Spetervoid 265251881Spetersvn_client_get_ssl_server_trust_prompt_provider( 266251881Speter svn_auth_provider_object_t **provider, 267251881Speter svn_auth_ssl_server_trust_prompt_func_t prompt_func, 268251881Speter void *prompt_baton, 269251881Speter apr_pool_t *pool); 270251881Speter 271251881Speter 272251881Speter/** Create and return @a *provider, an authentication provider of type 273251881Speter * #svn_auth_cred_ssl_client_cert_t, allocated in @a pool. 274251881Speter * 275251881Speter * @a *provider retrieves its credentials by using the @a prompt_func 276251881Speter * and @a prompt_baton. The returned credential is used to load the 277251881Speter * appropriate client certificate for authentication when requested by 278251881Speter * a server. The prompt will be retried @a retry_limit times. 279251881Speter * For infinite retries, set @a retry_limit to value less than 0. 280251881Speter * 281251881Speter * @deprecated Provided for backward compatibility with the 1.3 API. 282251881Speter * Use svn_auth_get_ssl_client_cert_prompt_provider() instead. 283251881Speter */ 284251881SpeterSVN_DEPRECATED 285251881Spetervoid 286251881Spetersvn_client_get_ssl_client_cert_prompt_provider( 287251881Speter svn_auth_provider_object_t **provider, 288251881Speter svn_auth_ssl_client_cert_prompt_func_t prompt_func, 289251881Speter void *prompt_baton, 290251881Speter int retry_limit, 291251881Speter apr_pool_t *pool); 292251881Speter 293251881Speter 294251881Speter/** Create and return @a *provider, an authentication provider of type 295251881Speter * #svn_auth_cred_ssl_client_cert_pw_t, allocated in @a pool. 296251881Speter * 297251881Speter * @a *provider retrieves its credentials by using the @a prompt_func 298251881Speter * and @a prompt_baton. The returned credential is used when a loaded 299251881Speter * client certificate is protected by a passphrase. The prompt will 300251881Speter * be retried @a retry_limit times. For infinite retries, set @a retry_limit 301251881Speter * to value less than 0. 302251881Speter * 303251881Speter * @deprecated Provided for backward compatibility with the 1.3 API. 304251881Speter * Use svn_auth_get_ssl_client_cert_pw_prompt_provider() instead. 305251881Speter */ 306251881SpeterSVN_DEPRECATED 307251881Spetervoid 308251881Spetersvn_client_get_ssl_client_cert_pw_prompt_provider( 309251881Speter svn_auth_provider_object_t **provider, 310251881Speter svn_auth_ssl_client_cert_pw_prompt_func_t prompt_func, 311251881Speter void *prompt_baton, 312251881Speter int retry_limit, 313251881Speter apr_pool_t *pool); 314251881Speter 315251881Speter/** @} */ 316251881Speter 317251881Speter/** 318251881Speter * Revisions and Peg Revisions 319251881Speter * 320251881Speter * @defgroup clnt_revisions Revisions and Peg Revisions 321251881Speter * 322251881Speter * A brief word on operative and peg revisions. 323251881Speter * 324251881Speter * If the kind of the peg revision is #svn_opt_revision_unspecified, then it 325251881Speter * defaults to #svn_opt_revision_head for URLs and #svn_opt_revision_working 326251881Speter * for local paths. 327251881Speter * 328251881Speter * For deeper insight, please see the 329251881Speter * <a href="http://svnbook.red-bean.com/nightly/en/svn.advanced.pegrevs.html"> 330251881Speter * Peg and Operative Revisions</a> section of the Subversion Book. 331251881Speter */ 332251881Speter 333251881Speter/** 334251881Speter * Commit operations 335251881Speter * 336251881Speter * @defgroup clnt_commit Client commit subsystem 337251881Speter * 338251881Speter * @{ 339251881Speter */ 340251881Speter 341251881Speter/** This is a structure which stores a filename and a hash of property 342251881Speter * names and values. 343251881Speter * 344251881Speter * @deprecated Provided for backward compatibility with the 1.4 API. 345251881Speter */ 346251881Spetertypedef struct svn_client_proplist_item_t 347251881Speter{ 348251881Speter /** The name of the node on which these properties are set. */ 349251881Speter svn_stringbuf_t *node_name; 350251881Speter 351251881Speter /** A hash of (const char *) property names, and (svn_string_t *) property 352251881Speter * values. */ 353251881Speter apr_hash_t *prop_hash; 354251881Speter 355251881Speter} svn_client_proplist_item_t; 356251881Speter 357251881Speter/** 358251881Speter * The callback invoked by svn_client_proplist4(). Each invocation 359251881Speter * provides the regular and/or inherited properties of @a path, which is 360251881Speter * either a working copy path or a URL. If @a prop_hash is not @c NULL, then 361251881Speter * it maps explicit <tt>const char *</tt> property names to 362251881Speter * <tt>svn_string_t *</tt> explicit property values. If @a inherited_props 363251881Speter * is not @c NULL, then it is a depth-first ordered array of 364251881Speter * #svn_prop_inherited_item_t * structures representing the 365251881Speter * properties inherited by @a path. Use @a scratch_pool for all temporary 366251881Speter * allocations. 367251881Speter * 368251881Speter * The #svn_prop_inherited_item_t->path_or_url members of the 369251881Speter * #svn_prop_inherited_item_t * structures in @a inherited_props are 370251881Speter * URLs if @a path is a URL or if @a path is a working copy path but the 371251881Speter * property represented by the structure is above the working copy root (i.e. 372251881Speter * the inherited property is from the cache). In all other cases the 373251881Speter * #svn_prop_inherited_item_t->path_or_url members are absolute working copy 374251881Speter * paths. 375251881Speter * 376251881Speter * @since New in 1.8. 377251881Speter */ 378251881Spetertypedef svn_error_t *(*svn_proplist_receiver2_t)( 379251881Speter void *baton, 380251881Speter const char *path, 381251881Speter apr_hash_t *prop_hash, 382251881Speter apr_array_header_t *inherited_props, 383251881Speter apr_pool_t *scratch_pool); 384251881Speter 385251881Speter/** 386251881Speter * Similar to #svn_proplist_receiver2_t, but doesn't return inherited 387251881Speter * properties. 388251881Speter * 389251881Speter * @deprecated Provided for backward compatibility with the 1.7 API. 390251881Speter * 391251881Speter * @since New in 1.5. 392251881Speter */ 393251881Spetertypedef svn_error_t *(*svn_proplist_receiver_t)( 394251881Speter void *baton, 395251881Speter const char *path, 396251881Speter apr_hash_t *prop_hash, 397251881Speter apr_pool_t *pool); 398251881Speter 399251881Speter/** 400251881Speter * Return a duplicate of @a item, allocated in @a pool. No part of the new 401251881Speter * structure will be shared with @a item. 402251881Speter * 403251881Speter * @since New in 1.3. 404251881Speter * 405251881Speter * @deprecated Provided for backward compatibility with the 1.4 API. 406251881Speter */ 407251881SpeterSVN_DEPRECATED 408251881Spetersvn_client_proplist_item_t * 409251881Spetersvn_client_proplist_item_dup(const svn_client_proplist_item_t *item, 410251881Speter apr_pool_t *pool); 411251881Speter 412251881Speter/** Information about commits passed back to client from this module. 413251881Speter * 414251881Speter * @deprecated Provided for backward compatibility with the 1.2 API. 415251881Speter */ 416251881Spetertypedef struct svn_client_commit_info_t 417251881Speter{ 418251881Speter /** just-committed revision. */ 419251881Speter svn_revnum_t revision; 420251881Speter 421251881Speter /** server-side date of the commit. */ 422251881Speter const char *date; 423251881Speter 424251881Speter /** author of the commit. */ 425251881Speter const char *author; 426251881Speter 427251881Speter} svn_client_commit_info_t; 428251881Speter 429251881Speter 430251881Speter/** 431251881Speter * @name Commit state flags 432251881Speter * @brief State flags for use with the #svn_client_commit_item3_t structure 433251881Speter * (see the note about the namespace for that structure, which also 434251881Speter * applies to these flags). 435251881Speter * @{ 436251881Speter */ 437251881Speter#define SVN_CLIENT_COMMIT_ITEM_ADD 0x01 438251881Speter#define SVN_CLIENT_COMMIT_ITEM_DELETE 0x02 439251881Speter#define SVN_CLIENT_COMMIT_ITEM_TEXT_MODS 0x04 440251881Speter#define SVN_CLIENT_COMMIT_ITEM_PROP_MODS 0x08 441251881Speter#define SVN_CLIENT_COMMIT_ITEM_IS_COPY 0x10 442251881Speter/** @since New in 1.2. */ 443251881Speter#define SVN_CLIENT_COMMIT_ITEM_LOCK_TOKEN 0x20 444251881Speter/** @since New in 1.8. */ 445251881Speter#define SVN_CLIENT_COMMIT_ITEM_MOVED_HERE 0x40 446251881Speter/** @} */ 447251881Speter 448251881Speter/** The commit candidate structure. 449251881Speter * 450251881Speter * In order to avoid backwards compatibility problems clients should use 451251881Speter * svn_client_commit_item3_create() to allocate and initialize this 452251881Speter * structure instead of doing so themselves. 453251881Speter * 454251881Speter * @since New in 1.5. 455251881Speter */ 456251881Spetertypedef struct svn_client_commit_item3_t 457251881Speter{ 458251881Speter /* IMPORTANT: If you extend this structure, add new fields to the end. */ 459251881Speter 460251881Speter /** absolute working-copy path of item */ 461251881Speter const char *path; 462251881Speter 463251881Speter /** node kind (dir, file) */ 464251881Speter svn_node_kind_t kind; 465251881Speter 466251881Speter /** commit URL for this item */ 467251881Speter const char *url; 468251881Speter 469251881Speter /** revision of textbase */ 470251881Speter svn_revnum_t revision; 471251881Speter 472251881Speter /** copyfrom-url or NULL if not a copied item */ 473251881Speter const char *copyfrom_url; 474251881Speter 475251881Speter /** copyfrom-rev, valid when copyfrom_url != NULL */ 476251881Speter svn_revnum_t copyfrom_rev; 477251881Speter 478251881Speter /** state flags */ 479251881Speter apr_byte_t state_flags; 480251881Speter 481251881Speter /** An array of #svn_prop_t *'s, which are incoming changes from 482251881Speter * the repository to WC properties. These changes are applied 483251881Speter * post-commit. 484251881Speter * 485251881Speter * When adding to this array, allocate the #svn_prop_t and its 486251881Speter * contents in @c incoming_prop_changes->pool, so that it has the 487251881Speter * same lifetime as this data structure. 488251881Speter * 489251881Speter * See http://subversion.tigris.org/issues/show_bug.cgi?id=806 for a 490251881Speter * description of what would happen if the post-commit process 491251881Speter * didn't group these changes together with all other changes to the 492251881Speter * item. 493251881Speter */ 494251881Speter apr_array_header_t *incoming_prop_changes; 495251881Speter 496251881Speter /** An array of #svn_prop_t *'s, which are outgoing changes to 497251881Speter * make to properties in the repository. These extra property 498251881Speter * changes are declared pre-commit, and applied to the repository as 499251881Speter * part of a commit. 500251881Speter * 501251881Speter * When adding to this array, allocate the #svn_prop_t and its 502251881Speter * contents in @c outgoing_prop_changes->pool, so that it has the 503251881Speter * same lifetime as this data structure. 504251881Speter */ 505251881Speter apr_array_header_t *outgoing_prop_changes; 506251881Speter 507251881Speter /** 508251881Speter * When processing the commit this contains the relative path for 509251881Speter * the commit session. #NULL until the commit item is preprocessed. 510251881Speter * @since New in 1.7. 511251881Speter */ 512251881Speter const char *session_relpath; 513251881Speter 514251881Speter /** 515251881Speter * When committing a move, this contains the absolute path where 516251881Speter * the node was directly moved from. (If an ancestor at the original 517251881Speter * location was moved then it points to where the node itself was 518251881Speter * moved from; not the original location.) 519251881Speter * @since New in 1.8. 520251881Speter */ 521251881Speter const char *moved_from_abspath; 522251881Speter 523251881Speter} svn_client_commit_item3_t; 524251881Speter 525251881Speter/** The commit candidate structure. 526251881Speter * 527251881Speter * @deprecated Provided for backward compatibility with the 1.4 API. 528251881Speter */ 529251881Spetertypedef struct svn_client_commit_item2_t 530251881Speter{ 531251881Speter /** absolute working-copy path of item */ 532251881Speter const char *path; 533251881Speter 534251881Speter /** node kind (dir, file) */ 535251881Speter svn_node_kind_t kind; 536251881Speter 537251881Speter /** commit URL for this item */ 538251881Speter const char *url; 539251881Speter 540251881Speter /** revision of textbase */ 541251881Speter svn_revnum_t revision; 542251881Speter 543251881Speter /** copyfrom-url or NULL if not a copied item */ 544251881Speter const char *copyfrom_url; 545251881Speter 546251881Speter /** copyfrom-rev, valid when copyfrom_url != NULL */ 547251881Speter svn_revnum_t copyfrom_rev; 548251881Speter 549251881Speter /** state flags */ 550251881Speter apr_byte_t state_flags; 551251881Speter 552251881Speter /** Analogous to the #svn_client_commit_item3_t.incoming_prop_changes 553251881Speter * field. 554251881Speter */ 555251881Speter apr_array_header_t *wcprop_changes; 556251881Speter} svn_client_commit_item2_t; 557251881Speter 558251881Speter/** The commit candidate structure. 559251881Speter * 560251881Speter * @deprecated Provided for backward compatibility with the 1.2 API. 561251881Speter */ 562251881Spetertypedef struct svn_client_commit_item_t 563251881Speter{ 564251881Speter /** absolute working-copy path of item */ 565251881Speter const char *path; 566251881Speter 567251881Speter /** node kind (dir, file) */ 568251881Speter svn_node_kind_t kind; 569251881Speter 570251881Speter /** commit URL for this item */ 571251881Speter const char *url; 572251881Speter 573251881Speter /** revision (copyfrom-rev if _IS_COPY) */ 574251881Speter svn_revnum_t revision; 575251881Speter 576251881Speter /** copyfrom-url */ 577251881Speter const char *copyfrom_url; 578251881Speter 579251881Speter /** state flags */ 580251881Speter apr_byte_t state_flags; 581251881Speter 582251881Speter /** Analogous to the #svn_client_commit_item3_t.incoming_prop_changes 583251881Speter * field. 584251881Speter */ 585251881Speter apr_array_header_t *wcprop_changes; 586251881Speter 587251881Speter} svn_client_commit_item_t; 588251881Speter 589251881Speter/** Return a new commit item object, allocated in @a pool. 590251881Speter * 591251881Speter * In order to avoid backwards compatibility problems, this function 592251881Speter * is used to initialize and allocate the #svn_client_commit_item3_t 593251881Speter * structure rather than doing so explicitly, as the size of this 594251881Speter * structure may change in the future. 595251881Speter * 596251881Speter * @since New in 1.6. 597251881Speter */ 598251881Spetersvn_client_commit_item3_t * 599251881Spetersvn_client_commit_item3_create(apr_pool_t *pool); 600251881Speter 601251881Speter/** Like svn_client_commit_item3_create() but with a stupid "const" 602251881Speter * qualifier on the returned structure, and it returns an error that 603251881Speter * will never happen. 604251881Speter * 605251881Speter * @deprecated Provided for backward compatibility with the 1.5 API. 606251881Speter */ 607251881SpeterSVN_DEPRECATED 608251881Spetersvn_error_t * 609251881Spetersvn_client_commit_item_create(const svn_client_commit_item3_t **item, 610251881Speter apr_pool_t *pool); 611251881Speter 612251881Speter/** 613251881Speter * Return a duplicate of @a item, allocated in @a pool. No part of the 614251881Speter * new structure will be shared with @a item, except for the adm_access 615251881Speter * member. 616251881Speter * 617251881Speter * @since New in 1.5. 618251881Speter */ 619251881Spetersvn_client_commit_item3_t * 620251881Spetersvn_client_commit_item3_dup(const svn_client_commit_item3_t *item, 621251881Speter apr_pool_t *pool); 622251881Speter 623251881Speter/** 624251881Speter * Return a duplicate of @a item, allocated in @a pool. No part of the new 625251881Speter * structure will be shared with @a item. 626251881Speter * 627251881Speter * @deprecated Provided for backward compatibility with the 1.4 API. 628251881Speter */ 629251881SpeterSVN_DEPRECATED 630251881Spetersvn_client_commit_item2_t * 631251881Spetersvn_client_commit_item2_dup(const svn_client_commit_item2_t *item, 632251881Speter apr_pool_t *pool); 633251881Speter 634251881Speter/** Callback type used by commit-y operations to get a commit log message 635251881Speter * from the caller. 636251881Speter * 637251881Speter * Set @a *log_msg to the log message for the commit, allocated in @a 638251881Speter * pool, or @c NULL if wish to abort the commit process. Set @a *tmp_file 639251881Speter * to the path of any temporary file which might be holding that log 640251881Speter * message, or @c NULL if no such file exists (though, if @a *log_msg is 641251881Speter * @c NULL, this value is undefined). The log message MUST be a UTF8 642251881Speter * string with LF line separators. 643251881Speter * 644251881Speter * @a commit_items is a read-only array of #svn_client_commit_item3_t 645251881Speter * structures, which may be fully or only partially filled-in, 646251881Speter * depending on the type of commit operation. 647251881Speter * 648251881Speter * @a baton is provided along with the callback for use by the handler. 649251881Speter * 650251881Speter * All allocations should be performed in @a pool. 651251881Speter * 652251881Speter * @since New in 1.5. 653251881Speter */ 654251881Spetertypedef svn_error_t *(*svn_client_get_commit_log3_t)( 655251881Speter const char **log_msg, 656251881Speter const char **tmp_file, 657251881Speter const apr_array_header_t *commit_items, 658251881Speter void *baton, 659251881Speter apr_pool_t *pool); 660251881Speter 661251881Speter/** Callback type used by commit-y operations to get a commit log message 662251881Speter * from the caller. 663251881Speter * 664251881Speter * Set @a *log_msg to the log message for the commit, allocated in @a 665251881Speter * pool, or @c NULL if wish to abort the commit process. Set @a *tmp_file 666251881Speter * to the path of any temporary file which might be holding that log 667251881Speter * message, or @c NULL if no such file exists (though, if @a *log_msg is 668251881Speter * @c NULL, this value is undefined). The log message MUST be a UTF8 669251881Speter * string with LF line separators. 670251881Speter * 671251881Speter * @a commit_items is a read-only array of #svn_client_commit_item2_t 672251881Speter * structures, which may be fully or only partially filled-in, 673251881Speter * depending on the type of commit operation. 674251881Speter * 675251881Speter * @a baton is provided along with the callback for use by the handler. 676251881Speter * 677251881Speter * All allocations should be performed in @a pool. 678251881Speter * 679251881Speter * @deprecated Provided for backward compatibility with the 1.3 API. 680251881Speter */ 681251881Spetertypedef svn_error_t *(*svn_client_get_commit_log2_t)( 682251881Speter const char **log_msg, 683251881Speter const char **tmp_file, 684251881Speter const apr_array_header_t *commit_items, 685251881Speter void *baton, 686251881Speter apr_pool_t *pool); 687251881Speter 688251881Speter/** Callback type used by commit-y operations to get a commit log message 689251881Speter * from the caller. 690251881Speter * 691251881Speter * Set @a *log_msg to the log message for the commit, allocated in @a 692251881Speter * pool, or @c NULL if wish to abort the commit process. Set @a *tmp_file 693251881Speter * to the path of any temporary file which might be holding that log 694251881Speter * message, or @c NULL if no such file exists (though, if @a *log_msg is 695251881Speter * @c NULL, this value is undefined). The log message MUST be a UTF8 696251881Speter * string with LF line separators. 697251881Speter * 698251881Speter * @a commit_items is a read-only array of #svn_client_commit_item_t 699251881Speter * structures, which may be fully or only partially filled-in, 700251881Speter * depending on the type of commit operation. 701251881Speter * 702251881Speter * @a baton is provided along with the callback for use by the handler. 703251881Speter * 704251881Speter * All allocations should be performed in @a pool. 705251881Speter * 706251881Speter * @deprecated Provided for backward compatibility with the 1.2 API. 707251881Speter */ 708251881Spetertypedef svn_error_t *(*svn_client_get_commit_log_t)( 709251881Speter const char **log_msg, 710251881Speter const char **tmp_file, 711251881Speter apr_array_header_t *commit_items, 712251881Speter void *baton, 713251881Speter apr_pool_t *pool); 714251881Speter 715251881Speter/** @} */ 716251881Speter 717251881Speter/** 718251881Speter * Client blame 719251881Speter * 720251881Speter * @defgroup clnt_blame Client blame functionality 721251881Speter * 722251881Speter * @{ 723251881Speter */ 724251881Speter 725251881Speter/** Callback type used by svn_client_blame5() to notify the caller 726251881Speter * that line @a line_no of the blamed file was last changed in @a revision 727251881Speter * which has the revision properties @a rev_props, and that the contents were 728251881Speter * @a line. 729251881Speter * 730251881Speter * @a start_revnum and @a end_revnum contain the start and end revision 731251881Speter * number of the entire blame operation, as determined from the repository 732251881Speter * inside svn_client_blame5(). This can be useful for the blame receiver 733251881Speter * to format the blame output. 734251881Speter * 735251881Speter * If svn_client_blame5() was called with @a include_merged_revisions set to 736251881Speter * TRUE, @a merged_revision, @a merged_rev_props and @a merged_path will be 737251881Speter * set, otherwise they will be NULL. @a merged_path will be set to the 738251881Speter * absolute repository path. 739251881Speter * 740251881Speter * All allocations should be performed in @a pool. 741251881Speter * 742251881Speter * @note If there is no blame information for this line, @a revision will be 743251881Speter * invalid and @a rev_props will be NULL. In this case @a local_change 744251881Speter * will be true if the reason there is no blame information is that the line 745251881Speter * was modified locally. In all other cases @a local_change will be false. 746251881Speter * 747251881Speter * @since New in 1.7. 748251881Speter */ 749251881Spetertypedef svn_error_t *(*svn_client_blame_receiver3_t)( 750251881Speter void *baton, 751251881Speter svn_revnum_t start_revnum, 752251881Speter svn_revnum_t end_revnum, 753251881Speter apr_int64_t line_no, 754251881Speter svn_revnum_t revision, 755251881Speter apr_hash_t *rev_props, 756251881Speter svn_revnum_t merged_revision, 757251881Speter apr_hash_t *merged_rev_props, 758251881Speter const char *merged_path, 759251881Speter const char *line, 760251881Speter svn_boolean_t local_change, 761251881Speter apr_pool_t *pool); 762251881Speter 763251881Speter/** 764251881Speter * Similar to #svn_client_blame_receiver3_t, but with separate author and 765251881Speter * date revision properties instead of all revision properties, and without 766251881Speter * information about local changes. 767251881Speter * 768251881Speter * @deprecated Provided for backward compatibility with the 1.6 API. 769251881Speter * 770251881Speter * @since New in 1.5. 771251881Speter */ 772251881Spetertypedef svn_error_t *(*svn_client_blame_receiver2_t)( 773251881Speter void *baton, 774251881Speter apr_int64_t line_no, 775251881Speter svn_revnum_t revision, 776251881Speter const char *author, 777251881Speter const char *date, 778251881Speter svn_revnum_t merged_revision, 779251881Speter const char *merged_author, 780251881Speter const char *merged_date, 781251881Speter const char *merged_path, 782251881Speter const char *line, 783251881Speter apr_pool_t *pool); 784251881Speter 785251881Speter/** 786251881Speter * Similar to #svn_client_blame_receiver2_t, but without @a merged_revision, 787251881Speter * @a merged_author, @a merged_date, or @a merged_path members. 788251881Speter * 789251881Speter * @note New in 1.4 is that the line is defined to contain only the line 790251881Speter * content (and no [partial] EOLs; which was undefined in older versions). 791251881Speter * Using this callback with svn_client_blame() or svn_client_blame2() 792251881Speter * will still give you the old behaviour. 793251881Speter * 794251881Speter * @deprecated Provided for backward compatibility with the 1.4 API. 795251881Speter */ 796251881Spetertypedef svn_error_t *(*svn_client_blame_receiver_t)( 797251881Speter void *baton, 798251881Speter apr_int64_t line_no, 799251881Speter svn_revnum_t revision, 800251881Speter const char *author, 801251881Speter const char *date, 802251881Speter const char *line, 803251881Speter apr_pool_t *pool); 804251881Speter 805251881Speter 806251881Speter/** @} */ 807251881Speter 808251881Speter/** 809251881Speter * Client diff 810251881Speter * 811251881Speter * @defgroup clnt_diff Client diff functionality 812251881Speter * 813251881Speter * @{ 814251881Speter */ 815251881Speter/** The difference type in an svn_diff_summarize_t structure. 816251881Speter * 817251881Speter * @since New in 1.4. 818251881Speter */ 819251881Spetertypedef enum svn_client_diff_summarize_kind_t 820251881Speter{ 821251881Speter /** An item with no text modifications */ 822251881Speter svn_client_diff_summarize_kind_normal, 823251881Speter 824251881Speter /** An added item */ 825251881Speter svn_client_diff_summarize_kind_added, 826251881Speter 827251881Speter /** An item with text modifications */ 828251881Speter svn_client_diff_summarize_kind_modified, 829251881Speter 830251881Speter /** A deleted item */ 831251881Speter svn_client_diff_summarize_kind_deleted 832251881Speter} svn_client_diff_summarize_kind_t; 833251881Speter 834251881Speter 835251881Speter/** A struct that describes the diff of an item. Passed to 836251881Speter * #svn_client_diff_summarize_func_t. 837251881Speter * 838251881Speter * @note Fields may be added to the end of this structure in future 839251881Speter * versions. Therefore, users shouldn't allocate structures of this 840251881Speter * type, to preserve binary compatibility. 841251881Speter * 842251881Speter * @since New in 1.4. 843251881Speter */ 844251881Spetertypedef struct svn_client_diff_summarize_t 845251881Speter{ 846251881Speter /** Path relative to the target. If the target is a file, path is 847251881Speter * the empty string. */ 848251881Speter const char *path; 849251881Speter 850251881Speter /** Change kind */ 851251881Speter svn_client_diff_summarize_kind_t summarize_kind; 852251881Speter 853251881Speter /** Properties changed? For consistency with 'svn status' output, 854251881Speter * this should be false if summarize_kind is _added or _deleted. */ 855251881Speter svn_boolean_t prop_changed; 856251881Speter 857251881Speter /** File or dir */ 858251881Speter svn_node_kind_t node_kind; 859251881Speter} svn_client_diff_summarize_t; 860251881Speter 861251881Speter/** 862251881Speter * Return a duplicate of @a diff, allocated in @a pool. No part of the new 863251881Speter * structure will be shared with @a diff. 864251881Speter * 865251881Speter * @since New in 1.4. 866251881Speter */ 867251881Spetersvn_client_diff_summarize_t * 868251881Spetersvn_client_diff_summarize_dup(const svn_client_diff_summarize_t *diff, 869251881Speter apr_pool_t *pool); 870251881Speter 871251881Speter 872251881Speter/** A callback used in svn_client_diff_summarize2() and 873251881Speter * svn_client_diff_summarize_peg2() for reporting a @a diff summary. 874251881Speter * 875251881Speter * All allocations should be performed in @a pool. 876251881Speter * 877251881Speter * @a baton is a closure object; it should be provided by the implementation, 878251881Speter * and passed by the caller. 879251881Speter * 880251881Speter * @since New in 1.4. 881251881Speter */ 882251881Spetertypedef svn_error_t *(*svn_client_diff_summarize_func_t)( 883251881Speter const svn_client_diff_summarize_t *diff, 884251881Speter void *baton, 885251881Speter apr_pool_t *pool); 886251881Speter 887251881Speter 888251881Speter 889251881Speter/** @} */ 890251881Speter 891251881Speter 892251881Speter/** 893251881Speter * Client context 894251881Speter * 895251881Speter * @defgroup clnt_ctx Client context management 896251881Speter * 897251881Speter * @{ 898251881Speter */ 899251881Speter 900251881Speter/** A client context structure, which holds client specific callbacks, 901251881Speter * batons, serves as a cache for configuration options, and other various 902251881Speter * and sundry things. In order to avoid backwards compatibility problems 903251881Speter * clients should use svn_client_create_context() to allocate and 904251881Speter * initialize this structure instead of doing so themselves. 905251881Speter */ 906251881Spetertypedef struct svn_client_ctx_t 907251881Speter{ 908251881Speter /** main authentication baton. */ 909251881Speter svn_auth_baton_t *auth_baton; 910251881Speter 911251881Speter /** notification callback function. 912251881Speter * This will be called by notify_func2() by default. 913251881Speter * @deprecated Provided for backward compatibility with the 1.1 API. 914251881Speter * Use @c notify_func2 instead. */ 915251881Speter svn_wc_notify_func_t notify_func; 916251881Speter 917251881Speter /** notification callback baton for notify_func() 918251881Speter * @deprecated Provided for backward compatibility with the 1.1 API. 919251881Speter * Use @c notify_baton2 instead */ 920251881Speter void *notify_baton; 921251881Speter 922251881Speter /** Log message callback function. NULL means that Subversion 923251881Speter * should try not attempt to fetch a log message. 924251881Speter * @deprecated Provided for backward compatibility with the 1.2 API. 925251881Speter * Use @c log_msg_func2 instead. */ 926251881Speter svn_client_get_commit_log_t log_msg_func; 927251881Speter 928251881Speter /** log message callback baton 929251881Speter * @deprecated Provided for backward compatibility with the 1.2 API. 930251881Speter * Use @c log_msg_baton2 instead. */ 931251881Speter void *log_msg_baton; 932251881Speter 933251881Speter /** a hash mapping of <tt>const char *</tt> configuration file names to 934251881Speter * #svn_config_t *'s. For example, the '~/.subversion/config' file's 935251881Speter * contents should have the key "config". May be left unset (or set to 936251881Speter * NULL) to use the built-in default settings and not use any configuration. 937251881Speter */ 938251881Speter apr_hash_t *config; 939251881Speter 940251881Speter /** a callback to be used to see if the client wishes to cancel the running 941251881Speter * operation. */ 942251881Speter svn_cancel_func_t cancel_func; 943251881Speter 944251881Speter /** a baton to pass to the cancellation callback. */ 945251881Speter void *cancel_baton; 946251881Speter 947251881Speter /** notification function, defaulting to a function that forwards 948251881Speter * to notify_func(). If @c NULL, it will not be invoked. 949251881Speter * @since New in 1.2. */ 950251881Speter svn_wc_notify_func2_t notify_func2; 951251881Speter 952251881Speter /** notification baton for notify_func2(). 953251881Speter * @since New in 1.2. */ 954251881Speter void *notify_baton2; 955251881Speter 956251881Speter /** Log message callback function. NULL means that Subversion 957251881Speter * should try log_msg_func. 958251881Speter * @since New in 1.3. */ 959251881Speter svn_client_get_commit_log2_t log_msg_func2; 960251881Speter 961251881Speter /** callback baton for log_msg_func2 962251881Speter * @since New in 1.3. */ 963251881Speter void *log_msg_baton2; 964251881Speter 965251881Speter /** Notification callback for network progress information. 966251881Speter * May be NULL if not used. 967251881Speter * @since New in 1.3. */ 968251881Speter svn_ra_progress_notify_func_t progress_func; 969251881Speter 970251881Speter /** Callback baton for progress_func. 971251881Speter * @since New in 1.3. */ 972251881Speter void *progress_baton; 973251881Speter 974251881Speter /** Log message callback function. NULL means that Subversion 975251881Speter * should try @c log_msg_func2, then @c log_msg_func. 976251881Speter * @since New in 1.5. */ 977251881Speter svn_client_get_commit_log3_t log_msg_func3; 978251881Speter 979251881Speter /** The callback baton for @c log_msg_func3. 980251881Speter * @since New in 1.5. */ 981251881Speter void *log_msg_baton3; 982251881Speter 983251881Speter /** MIME types map. 984251881Speter * @since New in 1.5. */ 985251881Speter apr_hash_t *mimetypes_map; 986251881Speter 987251881Speter /** Conflict resolution callback and baton, if available. 988251881Speter * @since New in 1.5. */ 989251881Speter svn_wc_conflict_resolver_func_t conflict_func; 990251881Speter void *conflict_baton; 991251881Speter 992251881Speter /** Custom client name string, or @c NULL. 993251881Speter * @since New in 1.5. */ 994251881Speter const char *client_name; 995251881Speter 996251881Speter /** Conflict resolution callback and baton, if available. NULL means that 997251881Speter * subversion should try @c conflict_func. 998251881Speter * @since New in 1.7. */ 999251881Speter svn_wc_conflict_resolver_func2_t conflict_func2; 1000251881Speter void *conflict_baton2; 1001251881Speter 1002251881Speter /** A working copy context for the client operation to use. 1003251881Speter * This is initialized by svn_client_create_context() and should never 1004251881Speter * be @c NULL. 1005251881Speter * 1006251881Speter * @since New in 1.7. */ 1007251881Speter svn_wc_context_t *wc_ctx; 1008251881Speter 1009251881Speter} svn_client_ctx_t; 1010251881Speter 1011251881Speter/** Initialize a client context. 1012251881Speter * Set @a *ctx to a client context object, allocated in @a pool, that 1013251881Speter * represents a particular instance of an svn client. @a cfg_hash is used 1014251881Speter * to initialise the config member of the returned context object and should 1015251881Speter * remain valid for the lifetime of the object. @a cfg_hash may be @c NULL, 1016251881Speter * in which case it is ignored. 1017251881Speter * 1018251881Speter * In order to avoid backwards compatibility problems, clients must 1019251881Speter * use this function to initialize and allocate the 1020251881Speter * #svn_client_ctx_t structure rather than doing so themselves, as 1021251881Speter * the size of this structure may change in the future. 1022251881Speter * 1023251881Speter * The current implementation never returns error, but callers should 1024251881Speter * still check for error, for compatibility with future versions. 1025251881Speter * 1026251881Speter * @since New in 1.8. 1027251881Speter */ 1028251881Spetersvn_error_t * 1029251881Spetersvn_client_create_context2(svn_client_ctx_t **ctx, 1030251881Speter apr_hash_t *cfg_hash, 1031251881Speter apr_pool_t *pool); 1032251881Speter 1033251881Speter 1034251881Speter/** Similar to svn_client_create_context2 but passes a NULL @a cfg_hash. 1035251881Speter * 1036251881Speter * @deprecated Provided for backward compatibility with the 1.7 API. 1037251881Speter */ 1038251881SpeterSVN_DEPRECATED 1039251881Spetersvn_error_t * 1040251881Spetersvn_client_create_context(svn_client_ctx_t **ctx, 1041251881Speter apr_pool_t *pool); 1042251881Speter 1043251881Speter/** @} end group: Client context management */ 1044251881Speter 1045251881Speter/** 1046251881Speter * @name Authentication information file names 1047251881Speter * 1048251881Speter * Names of files that contain authentication information. 1049251881Speter * 1050251881Speter * These filenames are decided by libsvn_client, since this library 1051251881Speter * implements all the auth-protocols; libsvn_wc does nothing but 1052251881Speter * blindly store and retrieve these files from protected areas. 1053251881Speter * 1054251881Speter * @defgroup clnt_auth_filenames Client authentication file names 1055251881Speter * @{ 1056251881Speter */ 1057251881Speter#define SVN_CLIENT_AUTH_USERNAME "username" 1058251881Speter#define SVN_CLIENT_AUTH_PASSWORD "password" 1059251881Speter/** @} group end: Authentication information file names */ 1060251881Speter 1061251881Speter/** Client argument processing 1062251881Speter * 1063251881Speter * @defgroup clnt_cmdline Client command-line processing 1064251881Speter * 1065251881Speter * @{ 1066251881Speter */ 1067251881Speter 1068251881Speter/** 1069251881Speter * Pull remaining target arguments from @a os into @a *targets_p, 1070251881Speter * converting them to UTF-8, followed by targets from @a known_targets 1071251881Speter * (which might come from, for example, the "--targets" command line option). 1072251881Speter * 1073251881Speter * Process each target in one of the following ways. For a repository- 1074251881Speter * relative URL: resolve to a full URL, contacting the repository if 1075251881Speter * necessary to do so, and then treat as a full URL. For a URL: do some 1076251881Speter * IRI-to-URI encoding and some auto-escaping, and canonicalize. For a 1077251881Speter * local path: canonicalize case and path separators. 1078251881Speter * 1079251881Speter * If @a keep_last_origpath_on_truepath_collision is TRUE, and there are 1080251881Speter * exactly two targets which both case-canonicalize to the same path, the last 1081251881Speter * target will be returned in the original non-case-canonicalized form. 1082251881Speter * 1083251881Speter * Allocate @a *targets_p and its elements in @a pool. 1084251881Speter * 1085251881Speter * @a ctx is required for possible repository authentication. 1086251881Speter * 1087251881Speter * If a path has the same name as a Subversion working copy 1088251881Speter * administrative directory, return #SVN_ERR_RESERVED_FILENAME_SPECIFIED; 1089251881Speter * if multiple reserved paths are encountered, return a chain of 1090251881Speter * errors, all of which are #SVN_ERR_RESERVED_FILENAME_SPECIFIED. Do 1091251881Speter * not return this type of error in a chain with any other type of 1092251881Speter * error, and if this is the only type of error encountered, complete 1093251881Speter * the operation before returning the error(s). 1094251881Speter * 1095251881Speter * @since New in 1.7 1096251881Speter */ 1097251881Spetersvn_error_t * 1098251881Spetersvn_client_args_to_target_array2(apr_array_header_t **targets_p, 1099251881Speter apr_getopt_t *os, 1100251881Speter const apr_array_header_t *known_targets, 1101251881Speter svn_client_ctx_t *ctx, 1102251881Speter svn_boolean_t keep_last_origpath_on_truepath_collision, 1103251881Speter apr_pool_t *pool); 1104251881Speter 1105251881Speter/** 1106251881Speter * Similar to svn_client_args_to_target_array2() but with 1107251881Speter * @a keep_last_origpath_on_truepath_collision always set to FALSE. 1108251881Speter * 1109251881Speter * @deprecated Provided for backward compatibility with the 1.6 API. 1110251881Speter */ 1111251881SpeterSVN_DEPRECATED 1112251881Spetersvn_error_t * 1113251881Spetersvn_client_args_to_target_array(apr_array_header_t **targets_p, 1114251881Speter apr_getopt_t *os, 1115251881Speter const apr_array_header_t *known_targets, 1116251881Speter svn_client_ctx_t *ctx, 1117251881Speter apr_pool_t *pool); 1118251881Speter 1119251881Speter/** @} group end: Client command-line processing */ 1120251881Speter 1121251881Speter/** @} */ 1122251881Speter 1123251881Speter/** 1124251881Speter * Client working copy management functions 1125251881Speter * 1126251881Speter * @defgroup clnt_wc Client working copy management 1127251881Speter * 1128251881Speter * @{ 1129251881Speter */ 1130251881Speter 1131251881Speter/** 1132251881Speter * @defgroup clnt_wc_checkout Checkout 1133251881Speter * 1134251881Speter * @{ 1135251881Speter */ 1136251881Speter 1137251881Speter 1138251881Speter/** 1139251881Speter * Checkout a working copy from a repository. 1140251881Speter * 1141251881Speter * @param[out] result_rev If non-NULL, the value of the revision checked 1142251881Speter * out from the repository. 1143251881Speter * @param[in] URL The repository URL of the checkout source. 1144251881Speter * @param[in] path The root of the new working copy. 1145251881Speter * @param[in] peg_revision The peg revision. 1146251881Speter * @param[in] revision The operative revision. 1147251881Speter * @param[in] depth The depth of the operation. If #svn_depth_unknown, 1148251881Speter * then behave as if for #svn_depth_infinity, except in the case 1149251881Speter * of resuming a previous checkout of @a path (i.e., updating), 1150251881Speter * in which case use the depth of the existing working copy. 1151251881Speter * @param[in] ignore_externals If @c TRUE, don't process externals 1152251881Speter * definitions as part of this operation. 1153251881Speter * @param[in] allow_unver_obstructions If @c TRUE, then tolerate existing 1154251881Speter * unversioned items that obstruct incoming paths. Only 1155251881Speter * obstructions of the same type (file or dir) as the added 1156251881Speter * item are tolerated. The text of obstructing files is left 1157251881Speter * as-is, effectively treating it as a user modification after 1158251881Speter * the checkout. Working properties of obstructing items are 1159251881Speter * set equal to the base properties. <br> 1160251881Speter * If @c FALSE, then abort if there are any unversioned 1161251881Speter * obstructing items. 1162251881Speter * @param[in] ctx The standard client context, used for authentication and 1163251881Speter * notification. 1164251881Speter * @param[in] pool Used for any temporary allocation. 1165251881Speter * 1166251881Speter * @return A pointer to an #svn_error_t of the type (this list is not 1167251881Speter * exhaustive): <br> 1168251881Speter * #SVN_ERR_UNSUPPORTED_FEATURE if @a URL refers to a file rather 1169251881Speter * than a directory; <br> 1170251881Speter * #SVN_ERR_RA_ILLEGAL_URL if @a URL does not exist; <br> 1171251881Speter * #SVN_ERR_CLIENT_BAD_REVISION if @a revision is not one of 1172251881Speter * #svn_opt_revision_number, #svn_opt_revision_head, or 1173251881Speter * #svn_opt_revision_date. <br> 1174251881Speter * If no error occurred, return #SVN_NO_ERROR. 1175251881Speter * 1176251881Speter * @since New in 1.5. 1177251881Speter * 1178251881Speter * @see #svn_depth_t <br> #svn_client_ctx_t <br> @ref clnt_revisions for 1179251881Speter * a discussion of operative and peg revisions. 1180251881Speter */ 1181251881Spetersvn_error_t * 1182251881Spetersvn_client_checkout3(svn_revnum_t *result_rev, 1183251881Speter const char *URL, 1184251881Speter const char *path, 1185251881Speter const svn_opt_revision_t *peg_revision, 1186251881Speter const svn_opt_revision_t *revision, 1187251881Speter svn_depth_t depth, 1188251881Speter svn_boolean_t ignore_externals, 1189251881Speter svn_boolean_t allow_unver_obstructions, 1190251881Speter svn_client_ctx_t *ctx, 1191251881Speter apr_pool_t *pool); 1192251881Speter 1193251881Speter 1194251881Speter/** 1195251881Speter * Similar to svn_client_checkout3() but with @a allow_unver_obstructions 1196251881Speter * always set to FALSE, and @a depth set according to @a recurse: if 1197251881Speter * @a recurse is TRUE, @a depth is #svn_depth_infinity, if @a recurse 1198251881Speter * is FALSE, @a depth is #svn_depth_files. 1199251881Speter * 1200251881Speter * @deprecated Provided for backward compatibility with the 1.4 API. 1201251881Speter */ 1202251881SpeterSVN_DEPRECATED 1203251881Spetersvn_error_t * 1204251881Spetersvn_client_checkout2(svn_revnum_t *result_rev, 1205251881Speter const char *URL, 1206251881Speter const char *path, 1207251881Speter const svn_opt_revision_t *peg_revision, 1208251881Speter const svn_opt_revision_t *revision, 1209251881Speter svn_boolean_t recurse, 1210251881Speter svn_boolean_t ignore_externals, 1211251881Speter svn_client_ctx_t *ctx, 1212251881Speter apr_pool_t *pool); 1213251881Speter 1214251881Speter 1215251881Speter/** 1216251881Speter * Similar to svn_client_checkout2(), but with @a peg_revision 1217251881Speter * always set to #svn_opt_revision_unspecified and 1218251881Speter * @a ignore_externals always set to FALSE. 1219251881Speter * 1220251881Speter * @deprecated Provided for backward compatibility with the 1.1 API. 1221251881Speter */ 1222251881SpeterSVN_DEPRECATED 1223251881Spetersvn_error_t * 1224251881Spetersvn_client_checkout(svn_revnum_t *result_rev, 1225251881Speter const char *URL, 1226251881Speter const char *path, 1227251881Speter const svn_opt_revision_t *revision, 1228251881Speter svn_boolean_t recurse, 1229251881Speter svn_client_ctx_t *ctx, 1230251881Speter apr_pool_t *pool); 1231251881Speter/** @} */ 1232251881Speter 1233251881Speter/** 1234251881Speter * @defgroup Update Bring a working copy up-to-date with a repository 1235251881Speter * 1236251881Speter * @{ 1237251881Speter * 1238251881Speter */ 1239251881Speter 1240251881Speter/** 1241251881Speter * Update working trees @a paths to @a revision, authenticating with the 1242251881Speter * authentication baton cached in @a ctx. @a paths is an array of const 1243251881Speter * char * paths to be updated. Unversioned paths that are direct children 1244251881Speter * of a versioned path will cause an update that attempts to add that path; 1245251881Speter * other unversioned paths are skipped. If @a result_revs is not NULL, 1246251881Speter * @a *result_revs will be set to an array of svn_revnum_t with each 1247251881Speter * element set to the revision to which @a revision was resolved for the 1248251881Speter * corresponding element of @a paths. 1249251881Speter * 1250251881Speter * @a revision must be of kind #svn_opt_revision_number, 1251251881Speter * #svn_opt_revision_head, or #svn_opt_revision_date. If @a 1252251881Speter * revision does not meet these requirements, return the error 1253251881Speter * #SVN_ERR_CLIENT_BAD_REVISION. 1254251881Speter * 1255251881Speter * The paths in @a paths can be from multiple working copies from multiple 1256251881Speter * repositories, but even if they all come from the same repository there 1257251881Speter * is no guarantee that revision represented by #svn_opt_revision_head 1258251881Speter * will remain the same as each path is updated. 1259251881Speter * 1260251881Speter * If @a ignore_externals is set, don't process externals definitions 1261251881Speter * as part of this operation. 1262251881Speter * 1263251881Speter * If @a depth is #svn_depth_infinity, update fully recursively. 1264251881Speter * Else if it is #svn_depth_immediates or #svn_depth_files, update 1265251881Speter * each target and its file entries, but not its subdirectories. Else 1266251881Speter * if #svn_depth_empty, update exactly each target, nonrecursively 1267251881Speter * (essentially, update the target's properties). 1268251881Speter * 1269251881Speter * If @a depth is #svn_depth_unknown, take the working depth from 1270251881Speter * @a paths and then behave as described above. 1271251881Speter * 1272251881Speter * If @a depth_is_sticky is set and @a depth is not 1273251881Speter * #svn_depth_unknown, then in addition to updating PATHS, also set 1274251881Speter * their sticky ambient depth value to @a depth. 1275251881Speter * 1276251881Speter * If @a allow_unver_obstructions is TRUE then the update tolerates 1277251881Speter * existing unversioned items that obstruct added paths. Only 1278251881Speter * obstructions of the same type (file or dir) as the added item are 1279251881Speter * tolerated. The text of obstructing files is left as-is, effectively 1280251881Speter * treating it as a user modification after the update. Working 1281251881Speter * properties of obstructing items are set equal to the base properties. 1282251881Speter * If @a allow_unver_obstructions is FALSE then the update will abort 1283251881Speter * if there are any unversioned obstructing items. 1284251881Speter * 1285251881Speter * If @a adds_as_modification is TRUE, a local addition at the same path 1286251881Speter * as an incoming addition of the same node kind results in a normal node 1287251881Speter * with a possible local modification, instead of a tree conflict. 1288251881Speter * 1289251881Speter * If @a make_parents is TRUE, create any non-existent parent 1290251881Speter * directories also by checking them out at depth=empty. 1291251881Speter * 1292251881Speter * If @a ctx->notify_func2 is non-NULL, invoke @a ctx->notify_func2 with 1293251881Speter * @a ctx->notify_baton2 for each item handled by the update, and also for 1294251881Speter * files restored from text-base. If @a ctx->cancel_func is non-NULL, invoke 1295251881Speter * it passing @a ctx->cancel_baton at various places during the update. 1296251881Speter * 1297251881Speter * Use @a pool for any temporary allocation. 1298251881Speter * 1299251881Speter * @todo Multiple Targets 1300251881Speter * - Up for debate: an update on multiple targets is *not* atomic. 1301251881Speter * Right now, svn_client_update only takes one path. What's 1302251881Speter * debatable is whether this should ever change. On the one hand, 1303251881Speter * it's kind of losing to have the client application loop over 1304251881Speter * targets and call svn_client_update() on each one; each call to 1305251881Speter * update initializes a whole new repository session (network 1306251881Speter * overhead, etc.) On the other hand, it's a very simple 1307251881Speter * implementation, and allows for the possibility that different 1308251881Speter * targets may come from different repositories. 1309251881Speter * 1310251881Speter * @since New in 1.7. 1311251881Speter */ 1312251881Spetersvn_error_t * 1313251881Spetersvn_client_update4(apr_array_header_t **result_revs, 1314251881Speter const apr_array_header_t *paths, 1315251881Speter const svn_opt_revision_t *revision, 1316251881Speter svn_depth_t depth, 1317251881Speter svn_boolean_t depth_is_sticky, 1318251881Speter svn_boolean_t ignore_externals, 1319251881Speter svn_boolean_t allow_unver_obstructions, 1320251881Speter svn_boolean_t adds_as_modification, 1321251881Speter svn_boolean_t make_parents, 1322251881Speter svn_client_ctx_t *ctx, 1323251881Speter apr_pool_t *pool); 1324251881Speter 1325251881Speter/** 1326251881Speter * Similar to svn_client_update4() but with @a make_parents always set 1327251881Speter * to FALSE and @a adds_as_modification set to TRUE. 1328251881Speter * 1329251881Speter * @deprecated Provided for backward compatibility with the 1.6 API. 1330251881Speter * @since New in 1.5. 1331251881Speter */ 1332251881SpeterSVN_DEPRECATED 1333251881Spetersvn_error_t * 1334251881Spetersvn_client_update3(apr_array_header_t **result_revs, 1335251881Speter const apr_array_header_t *paths, 1336251881Speter const svn_opt_revision_t *revision, 1337251881Speter svn_depth_t depth, 1338251881Speter svn_boolean_t depth_is_sticky, 1339251881Speter svn_boolean_t ignore_externals, 1340251881Speter svn_boolean_t allow_unver_obstructions, 1341251881Speter svn_client_ctx_t *ctx, 1342251881Speter apr_pool_t *pool); 1343251881Speter 1344251881Speter/** 1345251881Speter * Similar to svn_client_update3() but with @a allow_unver_obstructions 1346251881Speter * always set to FALSE, @a depth_is_sticky to FALSE, and @a depth set 1347251881Speter * according to @a recurse: if @a recurse is TRUE, set @a depth to 1348251881Speter * #svn_depth_infinity, if @a recurse is FALSE, set @a depth to 1349251881Speter * #svn_depth_files. 1350251881Speter * 1351251881Speter * @deprecated Provided for backward compatibility with the 1.4 API. 1352251881Speter */ 1353251881SpeterSVN_DEPRECATED 1354251881Spetersvn_error_t * 1355251881Spetersvn_client_update2(apr_array_header_t **result_revs, 1356251881Speter const apr_array_header_t *paths, 1357251881Speter const svn_opt_revision_t *revision, 1358251881Speter svn_boolean_t recurse, 1359251881Speter svn_boolean_t ignore_externals, 1360251881Speter svn_client_ctx_t *ctx, 1361251881Speter apr_pool_t *pool); 1362251881Speter 1363251881Speter/** 1364251881Speter * Similar to svn_client_update2() except that it accepts only a single 1365251881Speter * target in @a path, returns a single revision if @a result_rev is 1366251881Speter * not NULL, and @a ignore_externals is always set to FALSE. 1367251881Speter * 1368251881Speter * @deprecated Provided for backward compatibility with the 1.1 API. 1369251881Speter */ 1370251881SpeterSVN_DEPRECATED 1371251881Spetersvn_error_t * 1372251881Spetersvn_client_update(svn_revnum_t *result_rev, 1373251881Speter const char *path, 1374251881Speter const svn_opt_revision_t *revision, 1375251881Speter svn_boolean_t recurse, 1376251881Speter svn_client_ctx_t *ctx, 1377251881Speter apr_pool_t *pool); 1378251881Speter/** @} */ 1379251881Speter 1380251881Speter/** 1381251881Speter * @defgroup Switch Switch a working copy to another location. 1382251881Speter * 1383251881Speter * @{ 1384251881Speter */ 1385251881Speter 1386251881Speter/** 1387251881Speter * Switch an existing working copy directory to a different repository 1388251881Speter * location. 1389251881Speter * 1390251881Speter * This is normally used to switch a working copy directory over to another 1391251881Speter * line of development, such as a branch or a tag. Switching an existing 1392251881Speter * working copy directory is more efficient than checking out @a url from 1393251881Speter * scratch. 1394251881Speter * 1395251881Speter * @param[out] result_rev If non-NULL, the value of the revision to which 1396251881Speter * the working copy was actually switched. 1397251881Speter * @param[in] path The directory to be switched. This need not be the 1398251881Speter * root of a working copy. 1399251881Speter * @param[in] url The repository URL to switch to. 1400251881Speter * @param[in] peg_revision The peg revision. 1401251881Speter * @param[in] revision The operative revision. 1402251881Speter * @param[in] depth The depth of the operation. If #svn_depth_infinity, 1403251881Speter * switch fully recursively. Else if #svn_depth_immediates, 1404251881Speter * switch @a path and its file children (if any), and 1405251881Speter * switch subdirectories but do not update them. Else if 1406251881Speter * #svn_depth_files, switch just file children, ignoring 1407251881Speter * subdirectories completely. Else if #svn_depth_empty, 1408251881Speter * switch just @a path and touch nothing underneath it. 1409251881Speter * @param[in] depth_is_sticky If @c TRUE, and @a depth is not 1410251881Speter * #svn_depth_unknown, then in addition to switching @a path, also 1411251881Speter * set its sticky ambient depth value to @a depth. 1412251881Speter * @param[in] ignore_externals If @c TRUE, don't process externals 1413251881Speter * definitions as part of this operation. 1414251881Speter * @param[in] allow_unver_obstructions If @c TRUE, then tolerate existing 1415251881Speter * unversioned items that obstruct incoming paths. Only 1416251881Speter * obstructions of the same type (file or dir) as the added 1417251881Speter * item are tolerated. The text of obstructing files is left 1418251881Speter * as-is, effectively treating it as a user modification after 1419251881Speter * the checkout. Working properties of obstructing items are 1420251881Speter * set equal to the base properties. <br> 1421251881Speter * If @c FALSE, then abort if there are any unversioned 1422251881Speter * obstructing items. 1423251881Speter * @param[in] ignore_ancestry If @c FALSE, then verify that the file 1424251881Speter * or directory at @a path shares some common version control 1425251881Speter * ancestry with the switch URL location (represented by the 1426251881Speter * combination of @a url, @a peg_revision, and @a revision), 1427251881Speter * and returning #SVN_ERR_CLIENT_UNRELATED_RESOURCES if they 1428251881Speter * do not. If @c TRUE, no such sanity checks are performed. 1429251881Speter * 1430251881Speter * @param[in] ctx The standard client context, used for authentication and 1431251881Speter * notification. The notifier is invoked for paths affected by 1432251881Speter * the switch, and also for files which may be restored from the 1433251881Speter * pristine store after being previously removed from the working 1434251881Speter * copy. 1435251881Speter * @param[in] pool Used for any temporary allocation. 1436251881Speter * 1437251881Speter * @return A pointer to an #svn_error_t of the type (this list is not 1438251881Speter * exhaustive): <br> 1439251881Speter * #SVN_ERR_CLIENT_BAD_REVISION if @a revision is not one of 1440251881Speter * #svn_opt_revision_number, #svn_opt_revision_head, or 1441251881Speter * #svn_opt_revision_date. <br> 1442251881Speter * If no error occurred, return #SVN_NO_ERROR. 1443251881Speter * 1444251881Speter * @since New in 1.7. 1445251881Speter * 1446251881Speter * @see #svn_depth_t <br> #svn_client_ctx_t <br> @ref clnt_revisions for 1447251881Speter * a discussion of operative and peg revisions. 1448251881Speter */ 1449251881Spetersvn_error_t * 1450251881Spetersvn_client_switch3(svn_revnum_t *result_rev, 1451251881Speter const char *path, 1452251881Speter const char *url, 1453251881Speter const svn_opt_revision_t *peg_revision, 1454251881Speter const svn_opt_revision_t *revision, 1455251881Speter svn_depth_t depth, 1456251881Speter svn_boolean_t depth_is_sticky, 1457251881Speter svn_boolean_t ignore_externals, 1458251881Speter svn_boolean_t allow_unver_obstructions, 1459251881Speter svn_boolean_t ignore_ancestry, 1460251881Speter svn_client_ctx_t *ctx, 1461251881Speter apr_pool_t *pool); 1462251881Speter 1463251881Speter 1464251881Speter/** 1465251881Speter * Similar to svn_client_switch3() but with @a ignore_ancestry always 1466251881Speter * set to TRUE. 1467251881Speter * 1468251881Speter * @since New in 1.5. 1469251881Speter * @deprecated Provided for backward compatibility with the 1.4 API. 1470251881Speter */ 1471251881SpeterSVN_DEPRECATED 1472251881Spetersvn_error_t * 1473251881Spetersvn_client_switch2(svn_revnum_t *result_rev, 1474251881Speter const char *path, 1475251881Speter const char *url, 1476251881Speter const svn_opt_revision_t *peg_revision, 1477251881Speter const svn_opt_revision_t *revision, 1478251881Speter svn_depth_t depth, 1479251881Speter svn_boolean_t depth_is_sticky, 1480251881Speter svn_boolean_t ignore_externals, 1481251881Speter svn_boolean_t allow_unver_obstructions, 1482251881Speter svn_client_ctx_t *ctx, 1483251881Speter apr_pool_t *pool); 1484251881Speter 1485251881Speter 1486251881Speter/** 1487251881Speter * Similar to svn_client_switch2() but with @a allow_unver_obstructions, 1488251881Speter * @a ignore_externals, and @a depth_is_sticky always set to FALSE, 1489251881Speter * and @a depth set according to @a recurse: if @a recurse is TRUE, 1490251881Speter * set @a depth to #svn_depth_infinity, if @a recurse is FALSE, set 1491251881Speter * @a depth to #svn_depth_files. 1492251881Speter * 1493251881Speter * @deprecated Provided for backward compatibility with the 1.4 API. 1494251881Speter */ 1495251881SpeterSVN_DEPRECATED 1496251881Spetersvn_error_t * 1497251881Spetersvn_client_switch(svn_revnum_t *result_rev, 1498251881Speter const char *path, 1499251881Speter const char *url, 1500251881Speter const svn_opt_revision_t *revision, 1501251881Speter svn_boolean_t recurse, 1502251881Speter svn_client_ctx_t *ctx, 1503251881Speter apr_pool_t *pool); 1504251881Speter 1505251881Speter/** @} */ 1506251881Speter 1507251881Speter/** 1508251881Speter * @defgroup Add Begin versioning files/directories in a working copy. 1509251881Speter * 1510251881Speter * @{ 1511251881Speter */ 1512251881Speter 1513251881Speter/** 1514251881Speter * Schedule a working copy @a path for addition to the repository. 1515251881Speter * 1516251881Speter * If @a depth is #svn_depth_empty, add just @a path and nothing 1517251881Speter * below it. If #svn_depth_files, add @a path and any file 1518251881Speter * children of @a path. If #svn_depth_immediates, add @a path, any 1519251881Speter * file children, and any immediate subdirectories (but nothing 1520251881Speter * underneath those subdirectories). If #svn_depth_infinity, add 1521251881Speter * @a path and everything under it fully recursively. 1522251881Speter * 1523251881Speter * @a path's parent must be under revision control already (unless 1524251881Speter * @a add_parents is TRUE), but @a path is not. 1525251881Speter * 1526251881Speter * If @a force is not set and @a path is already under version 1527251881Speter * control, return the error #SVN_ERR_ENTRY_EXISTS. If @a force is 1528251881Speter * set, do not error on already-versioned items. When used on a 1529251881Speter * directory in conjunction with a @a depth value greater than 1530251881Speter * #svn_depth_empty, this has the effect of scheduling for addition 1531251881Speter * any unversioned files and directories scattered within even a 1532251881Speter * versioned tree (up to @a depth). 1533251881Speter * 1534251881Speter * If @a ctx->notify_func2 is non-NULL, then for each added item, call 1535251881Speter * @a ctx->notify_func2 with @a ctx->notify_baton2 and the path of the 1536251881Speter * added item. 1537251881Speter * 1538251881Speter * If @a no_ignore is FALSE, don't add any file or directory (or recurse 1539251881Speter * into any directory) that is unversioned and found by recursion (as 1540251881Speter * opposed to being the explicit target @a path) and whose name matches the 1541251881Speter * svn:ignore property on its parent directory or the global-ignores list in 1542251881Speter * @a ctx->config. If @a no_ignore is TRUE, do include such files and 1543251881Speter * directories. (Note that an svn:ignore property can influence this 1544251881Speter * behaviour only when recursing into an already versioned directory with @a 1545251881Speter * force.) 1546251881Speter * 1547251881Speter * If @a no_autoprops is TRUE, don't set any autoprops on added files. If 1548251881Speter * @a no_autoprops is FALSE then all added files have autprops set as per 1549251881Speter * the auto-props list in @a ctx->config and the value of any 1550251881Speter * @c SVN_PROP_INHERITABLE_AUTO_PROPS properties inherited by the nearest 1551251881Speter * parents of @a path which are already under version control. 1552251881Speter * 1553251881Speter * If @a add_parents is TRUE, recurse up @a path's directory and look for 1554251881Speter * a versioned directory. If found, add all intermediate paths between it 1555251881Speter * and @a path. If not found, return #SVN_ERR_CLIENT_NO_VERSIONED_PARENT. 1556251881Speter * 1557251881Speter * @a scratch_pool is used for temporary allocations only. 1558251881Speter * 1559251881Speter * @par Important: 1560251881Speter * This is a *scheduling* operation. No changes will 1561251881Speter * happen to the repository until a commit occurs. This scheduling 1562251881Speter * can be removed with svn_client_revert2(). 1563251881Speter * 1564251881Speter * @since New in 1.8. 1565251881Speter */ 1566251881Spetersvn_error_t * 1567251881Spetersvn_client_add5(const char *path, 1568251881Speter svn_depth_t depth, 1569251881Speter svn_boolean_t force, 1570251881Speter svn_boolean_t no_ignore, 1571251881Speter svn_boolean_t no_autoprops, 1572251881Speter svn_boolean_t add_parents, 1573251881Speter svn_client_ctx_t *ctx, 1574251881Speter apr_pool_t *scratch_pool); 1575251881Speter 1576251881Speter/** 1577251881Speter * Similar to svn_client_add5(), but with @a no_autoprops always set to 1578251881Speter * FALSE. 1579251881Speter * 1580251881Speter * @deprecated Provided for backward compatibility with the 1.7 API. 1581251881Speter */ 1582251881SpeterSVN_DEPRECATED 1583251881Spetersvn_error_t * 1584251881Spetersvn_client_add4(const char *path, 1585251881Speter svn_depth_t depth, 1586251881Speter svn_boolean_t force, 1587251881Speter svn_boolean_t no_ignore, 1588251881Speter svn_boolean_t add_parents, 1589251881Speter svn_client_ctx_t *ctx, 1590251881Speter apr_pool_t *pool); 1591251881Speter 1592251881Speter/** 1593251881Speter * Similar to svn_client_add4(), but with @a add_parents always set to 1594251881Speter * FALSE and @a depth set according to @a recursive: if TRUE, then 1595251881Speter * @a depth is #svn_depth_infinity, if FALSE, then #svn_depth_empty. 1596251881Speter * 1597251881Speter * @deprecated Provided for backward compatibility with the 1.4 API. 1598251881Speter */ 1599251881SpeterSVN_DEPRECATED 1600251881Spetersvn_error_t * 1601251881Spetersvn_client_add3(const char *path, 1602251881Speter svn_boolean_t recursive, 1603251881Speter svn_boolean_t force, 1604251881Speter svn_boolean_t no_ignore, 1605251881Speter svn_client_ctx_t *ctx, 1606251881Speter apr_pool_t *pool); 1607251881Speter 1608251881Speter/** 1609251881Speter * Similar to svn_client_add3(), but with @a no_ignore always set to 1610251881Speter * FALSE. 1611251881Speter * 1612251881Speter * @deprecated Provided for backward compatibility with the 1.2 API. 1613251881Speter */ 1614251881SpeterSVN_DEPRECATED 1615251881Spetersvn_error_t * 1616251881Spetersvn_client_add2(const char *path, 1617251881Speter svn_boolean_t recursive, 1618251881Speter svn_boolean_t force, 1619251881Speter svn_client_ctx_t *ctx, 1620251881Speter apr_pool_t *pool); 1621251881Speter 1622251881Speter/** 1623251881Speter * Similar to svn_client_add2(), but with @a force always set to FALSE. 1624251881Speter * 1625251881Speter * @deprecated Provided for backward compatibility with the 1.0 API. 1626251881Speter */ 1627251881SpeterSVN_DEPRECATED 1628251881Spetersvn_error_t * 1629251881Spetersvn_client_add(const char *path, 1630251881Speter svn_boolean_t recursive, 1631251881Speter svn_client_ctx_t *ctx, 1632251881Speter apr_pool_t *pool); 1633251881Speter 1634251881Speter/** @} */ 1635251881Speter 1636251881Speter/** 1637251881Speter * @defgroup Mkdir Create directories in a working copy or repository. 1638251881Speter * 1639251881Speter * @{ 1640251881Speter */ 1641251881Speter 1642251881Speter/** Create a directory, either in a repository or a working copy. 1643251881Speter * 1644251881Speter * @a paths is an array of (const char *) paths, either all local WC paths 1645251881Speter * or all URLs. 1646251881Speter * 1647251881Speter * If @a paths contains URLs, use the authentication baton in @a ctx 1648251881Speter * and @a message to immediately attempt to commit the creation of the 1649251881Speter * directories in @a paths in the repository. 1650251881Speter * 1651251881Speter * Else, create the directories on disk, and attempt to schedule them 1652251881Speter * for addition (using svn_client_add(), whose docstring you should 1653251881Speter * read). 1654251881Speter * 1655251881Speter * If @a make_parents is TRUE, create any non-existent parent directories 1656251881Speter * also. 1657251881Speter * 1658251881Speter * If non-NULL, @a revprop_table is a hash table holding additional, 1659251881Speter * custom revision properties (<tt>const char *</tt> names mapped to 1660251881Speter * <tt>svn_string_t *</tt> values) to be set on the new revision in 1661251881Speter * the event that this is a committing operation. This table cannot 1662251881Speter * contain any standard Subversion properties. 1663251881Speter * 1664251881Speter * @a ctx->log_msg_func3/@a ctx->log_msg_baton3 are a callback/baton 1665251881Speter * combo that this function can use to query for a commit log message 1666251881Speter * when one is needed. 1667251881Speter * 1668251881Speter * If @a ctx->notify_func2 is non-NULL, when the directory has been created 1669251881Speter * (successfully) in the working copy, call @a ctx->notify_func2 with 1670251881Speter * @a ctx->notify_baton2 and the path of the new directory. Note that this is 1671251881Speter * only called for items added to the working copy. 1672251881Speter * 1673251881Speter * If @a commit_callback is non-NULL, then for each successful commit, call 1674251881Speter * @a commit_callback with @a commit_baton and a #svn_commit_info_t for 1675251881Speter * the commit. 1676251881Speter * 1677251881Speter * @since New in 1.7. 1678251881Speter */ 1679251881Spetersvn_error_t * 1680251881Spetersvn_client_mkdir4(const apr_array_header_t *paths, 1681251881Speter svn_boolean_t make_parents, 1682251881Speter const apr_hash_t *revprop_table, 1683251881Speter svn_commit_callback2_t commit_callback, 1684251881Speter void *commit_baton, 1685251881Speter svn_client_ctx_t *ctx, 1686251881Speter apr_pool_t *pool); 1687251881Speter 1688251881Speter/** 1689251881Speter * Similar to svn_client_mkdir4(), but returns the commit info in 1690251881Speter * @a *commit_info_p rather than through a callback function. 1691251881Speter * 1692251881Speter * @since New in 1.5. 1693251881Speter * @deprecated Provided for backward compatibility with the 1.6 API. 1694251881Speter */ 1695251881SpeterSVN_DEPRECATED 1696251881Spetersvn_error_t * 1697251881Spetersvn_client_mkdir3(svn_commit_info_t **commit_info_p, 1698251881Speter const apr_array_header_t *paths, 1699251881Speter svn_boolean_t make_parents, 1700251881Speter const apr_hash_t *revprop_table, 1701251881Speter svn_client_ctx_t *ctx, 1702251881Speter apr_pool_t *pool); 1703251881Speter 1704251881Speter 1705251881Speter/** 1706251881Speter * Same as svn_client_mkdir3(), but with @a make_parents always FALSE, 1707251881Speter * and @a revprop_table always NULL. 1708251881Speter * 1709251881Speter * @since New in 1.3. 1710251881Speter * @deprecated Provided for backward compatibility with the 1.4 API. 1711251881Speter */ 1712251881SpeterSVN_DEPRECATED 1713251881Spetersvn_error_t * 1714251881Spetersvn_client_mkdir2(svn_commit_info_t **commit_info_p, 1715251881Speter const apr_array_header_t *paths, 1716251881Speter svn_client_ctx_t *ctx, 1717251881Speter apr_pool_t *pool); 1718251881Speter 1719251881Speter/** 1720251881Speter * Same as svn_client_mkdir2(), but takes the #svn_client_commit_info_t 1721251881Speter * type for @a commit_info_p. 1722251881Speter * 1723251881Speter * @deprecated Provided for backward compatibility with the 1.2 API. 1724251881Speter */ 1725251881SpeterSVN_DEPRECATED 1726251881Spetersvn_error_t * 1727251881Spetersvn_client_mkdir(svn_client_commit_info_t **commit_info_p, 1728251881Speter const apr_array_header_t *paths, 1729251881Speter svn_client_ctx_t *ctx, 1730251881Speter apr_pool_t *pool); 1731251881Speter 1732251881Speter/** @} */ 1733251881Speter 1734251881Speter/** 1735251881Speter * @defgroup Delete Remove files/directories from a working copy or repository. 1736251881Speter * 1737251881Speter * @{ 1738251881Speter */ 1739251881Speter 1740251881Speter/** Delete items from a repository or working copy. 1741251881Speter * 1742251881Speter * @a paths is an array of (const char *) paths, either all local WC paths 1743251881Speter * or all URLs. 1744251881Speter * 1745251881Speter * If the paths in @a paths are URLs, use the authentication baton in 1746251881Speter * @a ctx and @a ctx->log_msg_func3/@a ctx->log_msg_baton3 to 1747251881Speter * immediately attempt to commit a deletion of the URLs from the 1748251881Speter * repository. Every path must belong to the same repository. 1749251881Speter * 1750251881Speter * Else, schedule the working copy paths in @a paths for removal from 1751251881Speter * the repository. Each path's parent must be under revision control. 1752251881Speter * This is just a *scheduling* operation. No changes will happen to 1753251881Speter * the repository until a commit occurs. This scheduling can be 1754251881Speter * removed with svn_client_revert2(). If a path is a file it is 1755251881Speter * immediately removed from the working copy. If the path is a 1756251881Speter * directory it will remain in the working copy but all the files, and 1757251881Speter * all unversioned items, it contains will be removed. If @a force is 1758251881Speter * not set then this operation will fail if any path contains locally 1759251881Speter * modified and/or unversioned items. If @a force is set such items 1760251881Speter * will be deleted. 1761251881Speter * 1762251881Speter * If the paths are working copy paths and @a keep_local is TRUE then 1763251881Speter * the paths will not be removed from the working copy, only scheduled 1764251881Speter * for removal from the repository. Once the scheduled deletion is 1765251881Speter * committed, they will appear as unversioned paths in the working copy. 1766251881Speter * 1767251881Speter * If non-NULL, @a revprop_table is a hash table holding additional, 1768251881Speter * custom revision properties (<tt>const char *</tt> names mapped to 1769251881Speter * <tt>svn_string_t *</tt> values) to be set on the new revision in 1770251881Speter * the event that this is a committing operation. This table cannot 1771251881Speter * contain any standard Subversion properties. 1772251881Speter * 1773251881Speter * @a ctx->log_msg_func3/@a ctx->log_msg_baton3 are a callback/baton 1774251881Speter * combo that this function can use to query for a commit log message 1775251881Speter * when one is needed. 1776251881Speter * 1777251881Speter * If @a ctx->notify_func2 is non-NULL, then for each item deleted, call 1778251881Speter * @a ctx->notify_func2 with @a ctx->notify_baton2 and the path of the deleted 1779251881Speter * item. 1780251881Speter * 1781251881Speter * If @a commit_callback is non-NULL, then for each successful commit, call 1782251881Speter * @a commit_callback with @a commit_baton and a #svn_commit_info_t for 1783251881Speter * the commit. 1784251881Speter * 1785251881Speter * @since New in 1.7. 1786251881Speter */ 1787251881Spetersvn_error_t * 1788251881Spetersvn_client_delete4(const apr_array_header_t *paths, 1789251881Speter svn_boolean_t force, 1790251881Speter svn_boolean_t keep_local, 1791251881Speter const apr_hash_t *revprop_table, 1792251881Speter svn_commit_callback2_t commit_callback, 1793251881Speter void *commit_baton, 1794251881Speter svn_client_ctx_t *ctx, 1795251881Speter apr_pool_t *pool); 1796251881Speter 1797251881Speter/** 1798251881Speter * Similar to svn_client_delete4(), but returns the commit info in 1799251881Speter * @a *commit_info_p rather than through a callback function. 1800251881Speter * 1801251881Speter * @since New in 1.5. 1802251881Speter * @deprecated Provided for backward compatibility with the 1.6 API. 1803251881Speter */ 1804251881SpeterSVN_DEPRECATED 1805251881Spetersvn_error_t * 1806251881Spetersvn_client_delete3(svn_commit_info_t **commit_info_p, 1807251881Speter const apr_array_header_t *paths, 1808251881Speter svn_boolean_t force, 1809251881Speter svn_boolean_t keep_local, 1810251881Speter const apr_hash_t *revprop_table, 1811251881Speter svn_client_ctx_t *ctx, 1812251881Speter apr_pool_t *pool); 1813251881Speter 1814251881Speter/** 1815251881Speter * Similar to svn_client_delete3(), but with @a keep_local always set 1816251881Speter * to FALSE, and @a revprop_table passed as NULL. 1817251881Speter * 1818251881Speter * @deprecated Provided for backward compatibility with the 1.4 API. 1819251881Speter */ 1820251881SpeterSVN_DEPRECATED 1821251881Spetersvn_error_t * 1822251881Spetersvn_client_delete2(svn_commit_info_t **commit_info_p, 1823251881Speter const apr_array_header_t *paths, 1824251881Speter svn_boolean_t force, 1825251881Speter svn_client_ctx_t *ctx, 1826251881Speter apr_pool_t *pool); 1827251881Speter 1828251881Speter/** 1829251881Speter * Similar to svn_client_delete2(), but takes the #svn_client_commit_info_t 1830251881Speter * type for @a commit_info_p. 1831251881Speter * 1832251881Speter * @deprecated Provided for backward compatibility with the 1.2 API. 1833251881Speter */ 1834251881SpeterSVN_DEPRECATED 1835251881Spetersvn_error_t * 1836251881Spetersvn_client_delete(svn_client_commit_info_t **commit_info_p, 1837251881Speter const apr_array_header_t *paths, 1838251881Speter svn_boolean_t force, 1839251881Speter svn_client_ctx_t *ctx, 1840251881Speter apr_pool_t *pool); 1841251881Speter 1842251881Speter 1843251881Speter/** @} */ 1844251881Speter 1845251881Speter/** 1846251881Speter * @defgroup Import Import files into the repository. 1847251881Speter * 1848251881Speter * @{ 1849251881Speter */ 1850251881Speter 1851251881Speter/** 1852251881Speter * The callback invoked by svn_client_import5() before adding a node to the 1853251881Speter * list of nodes to be imported. 1854251881Speter * 1855251881Speter * @a baton is the value passed to @a svn_client_import5 as filter_baton. 1856251881Speter * 1857251881Speter * The callback receives the @a local_abspath for each node and the @a dirent 1858251881Speter * for it when walking the directory tree. Only the kind of node, including 1859251881Speter * special status is available in @a dirent. 1860251881Speter * 1861251881Speter * Implementations can set @a *filtered to TRUE, to make the import 1862251881Speter * process omit the node and (if the node is a directory) all its 1863251881Speter * descendants. 1864251881Speter * 1865251881Speter * @a scratch_pool can be used for temporary allocations. 1866251881Speter * 1867251881Speter * @since New in 1.8. 1868251881Speter */ 1869251881Spetertypedef svn_error_t *(*svn_client_import_filter_func_t)( 1870251881Speter void *baton, 1871251881Speter svn_boolean_t *filtered, 1872251881Speter const char *local_abspath, 1873251881Speter const svn_io_dirent2_t *dirent, 1874251881Speter apr_pool_t *scratch_pool); 1875251881Speter 1876251881Speter/** Import file or directory @a path into repository directory @a url at 1877251881Speter * head, authenticating with the authentication baton cached in @a ctx, 1878251881Speter * and using @a ctx->log_msg_func3/@a ctx->log_msg_baton3 to get a log message 1879251881Speter * for the (implied) commit. If some components of @a url do not exist 1880251881Speter * then create parent directories as necessary. 1881251881Speter * 1882251881Speter * This function reads an unversioned tree from disk and skips any ".svn" 1883251881Speter * directories. Even if a file or directory being imported is part of an 1884251881Speter * existing WC, this function sees it as unversioned and does not notice any 1885251881Speter * existing Subversion properties in it. 1886251881Speter * 1887251881Speter * If @a path is a directory, the contents of that directory are 1888251881Speter * imported directly into the directory identified by @a url. Note that the 1889251881Speter * directory @a path itself is not imported -- that is, the basename of 1890251881Speter * @a path is not part of the import. 1891251881Speter * 1892251881Speter * If @a path is a file, then the dirname of @a url is the directory 1893251881Speter * receiving the import. The basename of @a url is the filename in the 1894251881Speter * repository. In this case if @a url already exists, return error. 1895251881Speter * 1896251881Speter * If @a ctx->notify_func2 is non-NULL, then call @a ctx->notify_func2 with 1897251881Speter * @a ctx->notify_baton2 as the import progresses, with any of the following 1898251881Speter * actions: #svn_wc_notify_commit_added, 1899251881Speter * #svn_wc_notify_commit_postfix_txdelta. 1900251881Speter * 1901251881Speter * Use @a scratch_pool for any temporary allocation. 1902251881Speter * 1903251881Speter * If non-NULL, @a revprop_table is a hash table holding additional, 1904251881Speter * custom revision properties (<tt>const char *</tt> names mapped to 1905251881Speter * <tt>svn_string_t *</tt> values) to be set on the new revision. 1906251881Speter * This table cannot contain any standard Subversion properties. 1907251881Speter * 1908251881Speter * @a ctx->log_msg_func3/@a ctx->log_msg_baton3 are a callback/baton 1909251881Speter * combo that this function can use to query for a commit log message 1910251881Speter * when one is needed. 1911251881Speter * 1912251881Speter * If @a depth is #svn_depth_empty, import just @a path and nothing 1913251881Speter * below it. If #svn_depth_files, import @a path and any file 1914251881Speter * children of @a path. If #svn_depth_immediates, import @a path, any 1915251881Speter * file children, and any immediate subdirectories (but nothing 1916251881Speter * underneath those subdirectories). If #svn_depth_infinity, import 1917251881Speter * @a path and everything under it fully recursively. 1918251881Speter * 1919251881Speter * If @a no_ignore is @c FALSE, don't import any file or directory (or 1920251881Speter * recurse into any directory) that is found by recursion (as opposed to 1921251881Speter * being the explicit target @a path) and whose name matches the 1922251881Speter * global-ignores list in @a ctx->config. If @a no_ignore is @c TRUE, do 1923251881Speter * include such files and directories. (Note that svn:ignore properties are 1924251881Speter * not involved, as auto-props cannot set properties on directories and even 1925251881Speter * if the target is part of a WC the import ignores any existing 1926251881Speter * properties.) 1927251881Speter * 1928251881Speter * If @a no_autoprops is TRUE, don't set any autoprops on imported files. If 1929251881Speter * @a no_autoprops is FALSE then all imported files have autprops set as per 1930251881Speter * the auto-props list in @a ctx->config and the value of any 1931251881Speter * @c SVN_PROP_INHERITABLE_AUTO_PROPS properties inherited by and explicitly set 1932251881Speter * on @a url if @a url is already under versioned control, or the nearest parents 1933251881Speter * of @a path which are already under version control if not. 1934251881Speter * 1935251881Speter * If @a ignore_unknown_node_types is @c FALSE, ignore files of which the 1936251881Speter * node type is unknown, such as device files and pipes. 1937251881Speter * 1938251881Speter * If @a filter_callback is non-NULL, call it for each node that isn't ignored 1939251881Speter * for other reasons with @a filter_baton, to allow third party to ignore 1940251881Speter * specific nodes during importing. 1941251881Speter * 1942251881Speter * If @a commit_callback is non-NULL, then for each successful commit, call 1943251881Speter * @a commit_callback with @a commit_baton and a #svn_commit_info_t for 1944251881Speter * the commit. 1945251881Speter * 1946251881Speter * @since New in 1.8. 1947251881Speter */ 1948251881Spetersvn_error_t * 1949251881Spetersvn_client_import5(const char *path, 1950251881Speter const char *url, 1951251881Speter svn_depth_t depth, 1952251881Speter svn_boolean_t no_ignore, 1953251881Speter svn_boolean_t no_autoprops, 1954251881Speter svn_boolean_t ignore_unknown_node_types, 1955251881Speter const apr_hash_t *revprop_table, 1956251881Speter svn_client_import_filter_func_t filter_callback, 1957251881Speter void *filter_baton, 1958251881Speter svn_commit_callback2_t commit_callback, 1959251881Speter void *commit_baton, 1960251881Speter svn_client_ctx_t *ctx, 1961251881Speter apr_pool_t *scratch_pool); 1962251881Speter 1963251881Speter/** 1964251881Speter * Similar to svn_client_import5(), but without support for an optional 1965251881Speter * @a filter_callback and @a no_autoprops always set to FALSE. 1966251881Speter * 1967251881Speter * @since New in 1.7. 1968251881Speter * @deprecated Provided for backward compatibility with the 1.7 API. 1969251881Speter */ 1970251881SpeterSVN_DEPRECATED 1971251881Spetersvn_error_t * 1972251881Spetersvn_client_import4(const char *path, 1973251881Speter const char *url, 1974251881Speter svn_depth_t depth, 1975251881Speter svn_boolean_t no_ignore, 1976251881Speter svn_boolean_t ignore_unknown_node_types, 1977251881Speter const apr_hash_t *revprop_table, 1978251881Speter svn_commit_callback2_t commit_callback, 1979251881Speter void *commit_baton, 1980251881Speter svn_client_ctx_t *ctx, 1981251881Speter apr_pool_t *pool); 1982251881Speter 1983251881Speter/** 1984251881Speter * Similar to svn_client_import4(), but returns the commit info in 1985251881Speter * @a *commit_info_p rather than through a callback function. 1986251881Speter * 1987251881Speter * @since New in 1.5. 1988251881Speter * @deprecated Provided for backward compatibility with the 1.6 API. 1989251881Speter */ 1990251881SpeterSVN_DEPRECATED 1991251881Spetersvn_error_t * 1992251881Spetersvn_client_import3(svn_commit_info_t **commit_info_p, 1993251881Speter const char *path, 1994251881Speter const char *url, 1995251881Speter svn_depth_t depth, 1996251881Speter svn_boolean_t no_ignore, 1997251881Speter svn_boolean_t ignore_unknown_node_types, 1998251881Speter const apr_hash_t *revprop_table, 1999251881Speter svn_client_ctx_t *ctx, 2000251881Speter apr_pool_t *pool); 2001251881Speter 2002251881Speter/** 2003251881Speter * Similar to svn_client_import3(), but with @a ignore_unknown_node_types 2004251881Speter * always set to @c FALSE, @a revprop_table passed as NULL, and @a 2005251881Speter * depth set according to @a nonrecursive: if TRUE, then @a depth is 2006251881Speter * #svn_depth_files, else #svn_depth_infinity. 2007251881Speter * 2008251881Speter * @since New in 1.3. 2009251881Speter * 2010251881Speter * @deprecated Provided for backward compatibility with the 1.4 API 2011251881Speter */ 2012251881SpeterSVN_DEPRECATED 2013251881Spetersvn_error_t * 2014251881Spetersvn_client_import2(svn_commit_info_t **commit_info_p, 2015251881Speter const char *path, 2016251881Speter const char *url, 2017251881Speter svn_boolean_t nonrecursive, 2018251881Speter svn_boolean_t no_ignore, 2019251881Speter svn_client_ctx_t *ctx, 2020251881Speter apr_pool_t *pool); 2021251881Speter 2022251881Speter/** 2023251881Speter * Similar to svn_client_import2(), but with @a no_ignore always set 2024251881Speter * to FALSE and using the #svn_client_commit_info_t type for 2025251881Speter * @a commit_info_p. 2026251881Speter * 2027251881Speter * @deprecated Provided for backward compatibility with the 1.2 API. 2028251881Speter */ 2029251881SpeterSVN_DEPRECATED 2030251881Spetersvn_error_t * 2031251881Spetersvn_client_import(svn_client_commit_info_t **commit_info_p, 2032251881Speter const char *path, 2033251881Speter const char *url, 2034251881Speter svn_boolean_t nonrecursive, 2035251881Speter svn_client_ctx_t *ctx, 2036251881Speter apr_pool_t *pool); 2037251881Speter 2038251881Speter/** @} */ 2039251881Speter 2040251881Speter/** 2041251881Speter * @defgroup Commit Commit local modifications to the repository. 2042251881Speter * 2043251881Speter * @{ 2044251881Speter */ 2045251881Speter 2046251881Speter/** 2047251881Speter * Commit files or directories into repository, authenticating with 2048251881Speter * the authentication baton cached in @a ctx, and using 2049251881Speter * @a ctx->log_msg_func3/@a ctx->log_msg_baton3 to obtain the log message. 2050251881Speter * Set @a *commit_info_p to the results of the commit, allocated in @a pool. 2051251881Speter * 2052251881Speter * @a targets is an array of <tt>const char *</tt> paths to commit. They 2053251881Speter * need not be canonicalized nor condensed; this function will take care of 2054251881Speter * that. If @a targets has zero elements, then do nothing and return 2055251881Speter * immediately without error. 2056251881Speter * 2057251881Speter * If non-NULL, @a revprop_table is a hash table holding additional, 2058251881Speter * custom revision properties (<tt>const char *</tt> names mapped to 2059251881Speter * <tt>svn_string_t *</tt> values) to be set on the new revision. 2060251881Speter * This table cannot contain any standard Subversion properties. 2061251881Speter * 2062251881Speter * If @a ctx->notify_func2 is non-NULL, then call @a ctx->notify_func2 with 2063251881Speter * @a ctx->notify_baton2 as the commit progresses, with any of the following 2064251881Speter * actions: #svn_wc_notify_commit_modified, #svn_wc_notify_commit_added, 2065251881Speter * #svn_wc_notify_commit_deleted, #svn_wc_notify_commit_replaced, 2066251881Speter * #svn_wc_notify_commit_copied, #svn_wc_notify_commit_copied_replaced, 2067251881Speter * #svn_wc_notify_commit_postfix_txdelta. 2068251881Speter * 2069251881Speter * If @a depth is #svn_depth_infinity, commit all changes to and 2070251881Speter * below named targets. If @a depth is #svn_depth_empty, commit 2071251881Speter * only named targets (that is, only property changes on named 2072251881Speter * directory targets, and property and content changes for named file 2073251881Speter * targets). If @a depth is #svn_depth_files, behave as above for 2074251881Speter * named file targets, and for named directory targets, commit 2075251881Speter * property changes on a named directory and all changes to files 2076251881Speter * directly inside that directory. If #svn_depth_immediates, behave 2077251881Speter * as for #svn_depth_files, and for subdirectories of any named 2078251881Speter * directory target commit as though for #svn_depth_empty. 2079251881Speter * 2080251881Speter * Unlock paths in the repository, unless @a keep_locks is TRUE. 2081251881Speter * 2082251881Speter * @a changelists is an array of <tt>const char *</tt> changelist 2083251881Speter * names, used as a restrictive filter on items that are committed; 2084251881Speter * that is, don't commit anything unless it's a member of one of those 2085251881Speter * changelists. After the commit completes successfully, remove 2086251881Speter * changelist associations from the targets, unless @a 2087251881Speter * keep_changelists is set. If @a changelists is 2088251881Speter * empty (or altogether @c NULL), no changelist filtering occurs. 2089251881Speter * 2090251881Speter * If @a commit_as_operations is set to FALSE, when a copy is committed 2091251881Speter * all changes below the copy are always committed at the same time 2092251881Speter * (independent of the value of @a depth). If @a commit_as_operations is 2093251881Speter * #TRUE, changes to descendants are only committed if they are itself 2094251881Speter * included via @a depth and targets. 2095251881Speter * 2096251881Speter * If @a include_file_externals and/or @a include_dir_externals are #TRUE, 2097251881Speter * also commit all file and/or dir externals (respectively) that are reached 2098251881Speter * by recursion, except for those externals which: 2099251881Speter * - have a fixed revision, or 2100251881Speter * - come from a different repository root URL (dir externals). 2101251881Speter * These flags affect only recursion; externals that directly appear in @a 2102251881Speter * targets are always included in the commit. 2103251881Speter * 2104251881Speter * ### TODO: currently, file externals hidden inside an unversioned dir are 2105251881Speter * skipped deliberately, because we can't commit those yet. 2106251881Speter * See STMT_SELECT_COMMITTABLE_EXTERNALS_BELOW. 2107251881Speter * 2108251881Speter * ### TODO: With @c depth_immediates, this function acts as if 2109251881Speter * @a include_dir_externals was passed #FALSE, but caller expects 2110251881Speter * immediate child dir externals to be included @c depth_empty. 2111251881Speter * 2112251881Speter * When @a commit_as_operations is #TRUE it is possible to delete a node and 2113251881Speter * all its descendants by selecting just the root of the deletion. If it is 2114251881Speter * set to #FALSE this will raise an error. 2115251881Speter * 2116251881Speter * If @a commit_callback is non-NULL, then for each successful commit, call 2117251881Speter * @a commit_callback with @a commit_baton and a #svn_commit_info_t for 2118251881Speter * the commit. 2119251881Speter * 2120251881Speter * @note #svn_depth_unknown and #svn_depth_exclude must not be passed 2121251881Speter * for @a depth. 2122251881Speter * 2123251881Speter * Use @a pool for any temporary allocations. 2124251881Speter * 2125251881Speter * @since New in 1.8. 2126251881Speter */ 2127251881Spetersvn_error_t * 2128251881Spetersvn_client_commit6(const apr_array_header_t *targets, 2129251881Speter svn_depth_t depth, 2130251881Speter svn_boolean_t keep_locks, 2131251881Speter svn_boolean_t keep_changelists, 2132251881Speter svn_boolean_t commit_as_operations, 2133251881Speter svn_boolean_t include_file_externals, 2134251881Speter svn_boolean_t include_dir_externals, 2135251881Speter const apr_array_header_t *changelists, 2136251881Speter const apr_hash_t *revprop_table, 2137251881Speter svn_commit_callback2_t commit_callback, 2138251881Speter void *commit_baton, 2139251881Speter svn_client_ctx_t *ctx, 2140251881Speter apr_pool_t *pool); 2141251881Speter 2142251881Speter/** 2143251881Speter * Similar to svn_client_commit6(), but passes @a include_file_externals as 2144251881Speter * FALSE and @a include_dir_externals as FALSE. 2145251881Speter * 2146251881Speter * @since New in 1.7. 2147251881Speter * @deprecated Provided for backward compatibility with the 1.7 API. 2148251881Speter */ 2149251881SpeterSVN_DEPRECATED 2150251881Spetersvn_error_t * 2151251881Spetersvn_client_commit5(const apr_array_header_t *targets, 2152251881Speter svn_depth_t depth, 2153251881Speter svn_boolean_t keep_locks, 2154251881Speter svn_boolean_t keep_changelists, 2155251881Speter svn_boolean_t commit_as_operations, 2156251881Speter const apr_array_header_t *changelists, 2157251881Speter const apr_hash_t *revprop_table, 2158251881Speter svn_commit_callback2_t commit_callback, 2159251881Speter void *commit_baton, 2160251881Speter svn_client_ctx_t *ctx, 2161251881Speter apr_pool_t *pool); 2162251881Speter 2163251881Speter/** 2164251881Speter * Similar to svn_client_commit5(), but returns the commit info in 2165251881Speter * @a *commit_info_p rather than through a callback function. Does not use 2166251881Speter * #svn_wc_notify_commit_copied or #svn_wc_notify_commit_copied_replaced 2167251881Speter * (preferring #svn_wc_notify_commit_added and 2168251881Speter * #svn_wc_notify_commit_replaced, respectively, instead). 2169251881Speter * 2170251881Speter * Also, if no error is returned and @a (*commit_info_p)->revision is set to 2171251881Speter * #SVN_INVALID_REVNUM, then the commit was a no-op; nothing needed to 2172251881Speter * be committed. 2173251881Speter * 2174251881Speter * Sets @a commit_as_operations to FALSE to match Subversion 1.6's behavior. 2175251881Speter * 2176251881Speter * @since New in 1.5. 2177251881Speter * @deprecated Provided for backward compatibility with the 1.6 API. 2178251881Speter */ 2179251881SpeterSVN_DEPRECATED 2180251881Spetersvn_error_t * 2181251881Spetersvn_client_commit4(svn_commit_info_t **commit_info_p, 2182251881Speter const apr_array_header_t *targets, 2183251881Speter svn_depth_t depth, 2184251881Speter svn_boolean_t keep_locks, 2185251881Speter svn_boolean_t keep_changelists, 2186251881Speter const apr_array_header_t *changelists, 2187251881Speter const apr_hash_t *revprop_table, 2188251881Speter svn_client_ctx_t *ctx, 2189251881Speter apr_pool_t *pool); 2190251881Speter 2191251881Speter/** 2192251881Speter * Similar to svn_client_commit4(), but always with NULL for 2193251881Speter * @a changelist_name, FALSE for @a keep_changelist, NULL for @a 2194251881Speter * revprop_table, and @a depth set according to @a recurse: if @a 2195251881Speter * recurse is TRUE, use #svn_depth_infinity, else #svn_depth_empty. 2196251881Speter * 2197251881Speter * @deprecated Provided for backward compatibility with the 1.4 API. 2198251881Speter * 2199251881Speter * @since New in 1.3. 2200251881Speter */ 2201251881SpeterSVN_DEPRECATED 2202251881Spetersvn_error_t * 2203251881Spetersvn_client_commit3(svn_commit_info_t **commit_info_p, 2204251881Speter const apr_array_header_t *targets, 2205251881Speter svn_boolean_t recurse, 2206251881Speter svn_boolean_t keep_locks, 2207251881Speter svn_client_ctx_t *ctx, 2208251881Speter apr_pool_t *pool); 2209251881Speter 2210251881Speter/** 2211251881Speter * Similar to svn_client_commit3(), but uses #svn_client_commit_info_t 2212251881Speter * for @a commit_info_p. 2213251881Speter * 2214251881Speter * @deprecated Provided for backward compatibility with the 1.2 API. 2215251881Speter * 2216251881Speter * @since New in 1.2. 2217251881Speter */ 2218251881SpeterSVN_DEPRECATED 2219251881Spetersvn_error_t * 2220251881Spetersvn_client_commit2(svn_client_commit_info_t **commit_info_p, 2221251881Speter const apr_array_header_t *targets, 2222251881Speter svn_boolean_t recurse, 2223251881Speter svn_boolean_t keep_locks, 2224251881Speter svn_client_ctx_t *ctx, 2225251881Speter apr_pool_t *pool); 2226251881Speter 2227251881Speter/** 2228251881Speter * Similar to svn_client_commit2(), but with @a keep_locks set to 2229251881Speter * TRUE and @a nonrecursive instead of @a recurse. 2230251881Speter * 2231251881Speter * @deprecated Provided for backward compatibility with the 1.1 API. 2232251881Speter */ 2233251881SpeterSVN_DEPRECATED 2234251881Spetersvn_error_t * 2235251881Spetersvn_client_commit(svn_client_commit_info_t **commit_info_p, 2236251881Speter const apr_array_header_t *targets, 2237251881Speter svn_boolean_t nonrecursive, 2238251881Speter svn_client_ctx_t *ctx, 2239251881Speter apr_pool_t *pool); 2240251881Speter 2241251881Speter/** @} */ 2242251881Speter 2243251881Speter/** 2244251881Speter * @defgroup Status Report interesting information about paths in the \ 2245251881Speter * working copy. 2246251881Speter * 2247251881Speter * @{ 2248251881Speter */ 2249251881Speter 2250251881Speter/** 2251251881Speter * Structure for holding the "status" of a working copy item. 2252251881Speter * 2253251881Speter * @note Fields may be added to the end of this structure in future 2254251881Speter * versions. Therefore, to preserve binary compatibility, users 2255251881Speter * should not directly allocate structures of this type. 2256251881Speter * 2257251881Speter * @since New in 1.7. 2258251881Speter */ 2259251881Spetertypedef struct svn_client_status_t 2260251881Speter{ 2261251881Speter /** The kind of node as recorded in the working copy */ 2262251881Speter svn_node_kind_t kind; 2263251881Speter 2264251881Speter /** The absolute path to the node */ 2265251881Speter const char *local_abspath; 2266251881Speter 2267251881Speter /** The actual size of the working file on disk, or SVN_INVALID_FILESIZE 2268251881Speter * if unknown (or if the item isn't a file at all). */ 2269251881Speter svn_filesize_t filesize; 2270251881Speter 2271251881Speter /** If the path is under version control, versioned is TRUE, otherwise 2272251881Speter * FALSE. */ 2273251881Speter svn_boolean_t versioned; 2274251881Speter 2275251881Speter /** Set to TRUE if the node is the victim of some kind of conflict. */ 2276251881Speter svn_boolean_t conflicted; 2277251881Speter 2278251881Speter /** The status of the node, based on the restructuring changes and if the 2279251881Speter * node has no restructuring changes the text and prop status. */ 2280251881Speter enum svn_wc_status_kind node_status; 2281251881Speter 2282251881Speter /** The status of the text of the node, not including restructuring changes. 2283251881Speter * Valid values are: svn_wc_status_none, svn_wc_status_normal, 2284251881Speter * svn_wc_status_modified and svn_wc_status_conflicted. */ 2285251881Speter enum svn_wc_status_kind text_status; 2286251881Speter 2287251881Speter /** The status of the node's properties. 2288251881Speter * Valid values are: svn_wc_status_none, svn_wc_status_normal, 2289251881Speter * svn_wc_status_modified and svn_wc_status_conflicted. */ 2290251881Speter enum svn_wc_status_kind prop_status; 2291251881Speter 2292251881Speter /** A node can be 'locked' if a working copy update is in progress or 2293251881Speter * was interrupted. */ 2294251881Speter svn_boolean_t wc_is_locked; 2295251881Speter 2296251881Speter /** A file or directory can be 'copied' if it's scheduled for 2297251881Speter * addition-with-history (or part of a subtree that is scheduled as such.). 2298251881Speter */ 2299251881Speter svn_boolean_t copied; 2300251881Speter 2301251881Speter /** The URL of the repository root. */ 2302251881Speter const char *repos_root_url; 2303251881Speter 2304251881Speter /** The UUID of the repository */ 2305251881Speter const char *repos_uuid; 2306251881Speter 2307251881Speter /** The in-repository path relative to the repository root. */ 2308251881Speter const char *repos_relpath; 2309251881Speter 2310251881Speter /** Base revision. */ 2311251881Speter svn_revnum_t revision; 2312251881Speter 2313251881Speter /** Last revision this was changed */ 2314251881Speter svn_revnum_t changed_rev; 2315251881Speter 2316251881Speter /** Date of last commit. */ 2317251881Speter apr_time_t changed_date; 2318251881Speter 2319251881Speter /** Last commit author of this item */ 2320251881Speter const char *changed_author; 2321251881Speter 2322251881Speter /** A file or directory can be 'switched' if the switch command has been 2323251881Speter * used. If this is TRUE, then file_external will be FALSE. 2324251881Speter */ 2325251881Speter svn_boolean_t switched; 2326251881Speter 2327251881Speter /** If the item is a file that was added to the working copy with an 2328251881Speter * svn:externals; if file_external is TRUE, then switched is always 2329251881Speter * FALSE. 2330251881Speter */ 2331251881Speter svn_boolean_t file_external; 2332251881Speter 2333251881Speter /** The locally present lock. (Values of path, token, owner, comment and 2334251881Speter * are available if a lock is present) */ 2335251881Speter const svn_lock_t *lock; 2336251881Speter 2337251881Speter /** Which changelist this item is part of, or NULL if not part of any. */ 2338251881Speter const char *changelist; 2339251881Speter 2340251881Speter /** The depth of the node as recorded in the working copy 2341251881Speter * (#svn_depth_unknown for files or when no depth is recorded) */ 2342251881Speter svn_depth_t depth; 2343251881Speter 2344251881Speter /** 2345251881Speter * @defgroup svn_wc_status_ood WC out-of-date info from the repository 2346251881Speter * @{ 2347251881Speter * 2348251881Speter * When the working copy item is out-of-date compared to the 2349251881Speter * repository, the following fields represent the state of the 2350251881Speter * youngest revision of the item in the repository. If the working 2351251881Speter * copy is not out of date, the fields are initialized as described 2352251881Speter * below. 2353251881Speter */ 2354251881Speter 2355251881Speter /** Set to the node kind of the youngest commit, or #svn_node_none 2356251881Speter * if not out of date. */ 2357251881Speter svn_node_kind_t ood_kind; 2358251881Speter 2359251881Speter /** The status of the node, based on the text status if the node has no 2360251881Speter * restructuring changes */ 2361251881Speter enum svn_wc_status_kind repos_node_status; 2362251881Speter 2363251881Speter /** The node's text status in the repository. */ 2364251881Speter enum svn_wc_status_kind repos_text_status; 2365251881Speter 2366251881Speter /** The node's property status in the repository. */ 2367251881Speter enum svn_wc_status_kind repos_prop_status; 2368251881Speter 2369251881Speter /** The node's lock in the repository, if any. */ 2370251881Speter const svn_lock_t *repos_lock; 2371251881Speter 2372251881Speter /** Set to the youngest committed revision, or #SVN_INVALID_REVNUM 2373251881Speter * if not out of date. */ 2374251881Speter svn_revnum_t ood_changed_rev; 2375251881Speter 2376251881Speter /** Set to the most recent commit date, or @c 0 if not out of date. */ 2377251881Speter apr_time_t ood_changed_date; 2378251881Speter 2379251881Speter /** Set to the user name of the youngest commit, or @c NULL if not 2380251881Speter * out of date or non-existent. Because a non-existent @c 2381251881Speter * svn:author property has the same behavior as an out-of-date 2382251881Speter * working copy, examine @c ood_changed_rev to determine whether 2383251881Speter * the working copy is out of date. */ 2384251881Speter const char *ood_changed_author; 2385251881Speter 2386251881Speter /** @} */ 2387251881Speter 2388251881Speter /** Reserved for libsvn_client's internal use; this value is only to be used 2389251881Speter * for libsvn_client backwards compatibility wrappers. This value may be NULL 2390251881Speter * or to other data in future versions. */ 2391251881Speter const void *backwards_compatibility_baton; 2392251881Speter 2393251881Speter /** Set to the local absolute path that this node was moved from, if this 2394251881Speter * file or directory has been moved here locally and is the root of that 2395251881Speter * move. Otherwise set to NULL. 2396251881Speter * 2397251881Speter * This will be NULL for moved-here nodes that are just part of a subtree 2398251881Speter * that was moved along (and are not themselves a root of a different move 2399251881Speter * operation). 2400251881Speter * 2401251881Speter * @since New in 1.8. */ 2402251881Speter const char *moved_from_abspath; 2403251881Speter 2404251881Speter /** Set to the local absolute path that this node was moved to, if this file 2405251881Speter * or directory has been moved away locally and corresponds to the root 2406251881Speter * of the destination side of the move. Otherwise set to NULL. 2407251881Speter * 2408251881Speter * Note: Saying just "root" here could be misleading. For example: 2409251881Speter * svn mv A AA; 2410251881Speter * svn mv AA/B BB; 2411251881Speter * creates a situation where A/B is moved-to BB, but one could argue that 2412251881Speter * the move source's root actually was AA/B. Note that, as far as the 2413251881Speter * working copy is concerned, above case is exactly identical to: 2414251881Speter * svn mv A/B BB; 2415251881Speter * svn mv A AA; 2416251881Speter * In both situations, @a moved_to_abspath would be set for nodes A (moved 2417251881Speter * to AA) and A/B (moved to BB), only. 2418251881Speter * 2419251881Speter * This will be NULL for moved-away nodes that were just part of a subtree 2420251881Speter * that was moved along (and are not themselves a root of a different move 2421251881Speter * operation). 2422251881Speter * 2423251881Speter * @since New in 1.8. */ 2424251881Speter const char *moved_to_abspath; 2425251881Speter 2426251881Speter /* NOTE! Please update svn_client_status_dup() when adding new fields here. */ 2427251881Speter} svn_client_status_t; 2428251881Speter 2429251881Speter/** 2430251881Speter * Return a duplicate of @a status, allocated in @a result_pool. No part of the new 2431251881Speter * structure will be shared with @a status. 2432251881Speter * 2433251881Speter * @since New in 1.7. 2434251881Speter */ 2435251881Spetersvn_client_status_t * 2436251881Spetersvn_client_status_dup(const svn_client_status_t *status, 2437251881Speter apr_pool_t *result_pool); 2438251881Speter 2439251881Speter/** 2440251881Speter * A callback for reporting a @a status about @a path (which may be an 2441251881Speter * absolute or relative path). 2442251881Speter * 2443251881Speter * @a baton is a closure object; it should be provided by the 2444251881Speter * implementation, and passed by the caller. 2445251881Speter * 2446251881Speter * @a scratch_pool will be cleared between invocations to the callback. 2447251881Speter * 2448251881Speter * @since New in 1.7. 2449251881Speter */ 2450251881Spetertypedef svn_error_t *(*svn_client_status_func_t)( 2451251881Speter void *baton, 2452251881Speter const char *path, 2453251881Speter const svn_client_status_t *status, 2454251881Speter apr_pool_t *scratch_pool); 2455251881Speter 2456251881Speter/** 2457251881Speter * Given @a path to a working copy directory (or single file), call 2458251881Speter * @a status_func/status_baton with a set of #svn_wc_status_t * 2459251881Speter * structures which describe the status of @a path, and its children 2460251881Speter * (recursing according to @a depth). 2461251881Speter * 2462251881Speter * - If @a get_all is set, retrieve all entries; otherwise, 2463251881Speter * retrieve only "interesting" entries (local mods and/or 2464251881Speter * out of date). 2465251881Speter * 2466251881Speter * - If @a update is set, contact the repository and augment the 2467251881Speter * status structures with information about out-of-dateness (with 2468251881Speter * respect to @a revision). Also, if @a result_rev is not @c NULL, 2469251881Speter * set @a *result_rev to the actual revision against which the 2470251881Speter * working copy was compared (@a *result_rev is not meaningful unless 2471251881Speter * @a update is set). 2472251881Speter * 2473251881Speter * If @a no_ignore is @c FALSE, don't report any file or directory (or 2474251881Speter * recurse into any directory) that is found by recursion (as opposed to 2475251881Speter * being the explicit target @a path) and whose name matches the 2476251881Speter * svn:ignore property on its parent directory or the global-ignores 2477251881Speter * list in @a ctx->config. If @a no_ignore is @c TRUE, report each such 2478251881Speter * file or directory with the status code #svn_wc_status_ignored. 2479251881Speter * 2480251881Speter * If @a ignore_externals is not set, then recurse into externals 2481251881Speter * definitions (if any exist) after handling the main target. This 2482251881Speter * calls the client notification function (in @a ctx) with the 2483251881Speter * #svn_wc_notify_status_external action before handling each externals 2484251881Speter * definition, and with #svn_wc_notify_status_completed 2485251881Speter * after each. 2486251881Speter * 2487251881Speter * If @a depth_as_sticky is set and @a depth is not 2488251881Speter * #svn_depth_unknown, then the status is calculated as if depth_is_sticky 2489251881Speter * was passed to an equivalent update command. 2490251881Speter * 2491251881Speter * @a changelists is an array of <tt>const char *</tt> changelist 2492251881Speter * names, used as a restrictive filter on items whose statuses are 2493251881Speter * reported; that is, don't report status about any item unless 2494251881Speter * it's a member of one of those changelists. If @a changelists is 2495251881Speter * empty (or altogether @c NULL), no changelist filtering occurs. 2496251881Speter * 2497251881Speter * If @a path is an absolute path then the @c path parameter passed in each 2498251881Speter * call to @a status_func will be an absolute path. 2499251881Speter * 2500251881Speter * All temporary allocations are performed in @a scratch_pool. 2501251881Speter * 2502251881Speter * @since New in 1.7. 2503251881Speter */ 2504251881Spetersvn_error_t * 2505251881Spetersvn_client_status5(svn_revnum_t *result_rev, 2506251881Speter svn_client_ctx_t *ctx, 2507251881Speter const char *path, 2508251881Speter const svn_opt_revision_t *revision, 2509251881Speter svn_depth_t depth, 2510251881Speter svn_boolean_t get_all, 2511251881Speter svn_boolean_t update, 2512251881Speter svn_boolean_t no_ignore, 2513251881Speter svn_boolean_t ignore_externals, 2514251881Speter svn_boolean_t depth_as_sticky, 2515251881Speter const apr_array_header_t *changelists, 2516251881Speter svn_client_status_func_t status_func, 2517251881Speter void *status_baton, 2518251881Speter apr_pool_t *scratch_pool); 2519251881Speter 2520251881Speter/** 2521251881Speter * Same as svn_client_status5(), but using #svn_wc_status_func3_t 2522251881Speter * instead of #svn_client_status_func_t and depth_as_sticky set to TRUE. 2523251881Speter * 2524251881Speter * @since New in 1.6. 2525251881Speter * @deprecated Provided for backward compatibility with the 1.6 API. 2526251881Speter */ 2527251881SpeterSVN_DEPRECATED 2528251881Spetersvn_error_t * 2529251881Spetersvn_client_status4(svn_revnum_t *result_rev, 2530251881Speter const char *path, 2531251881Speter const svn_opt_revision_t *revision, 2532251881Speter svn_wc_status_func3_t status_func, 2533251881Speter void *status_baton, 2534251881Speter svn_depth_t depth, 2535251881Speter svn_boolean_t get_all, 2536251881Speter svn_boolean_t update, 2537251881Speter svn_boolean_t no_ignore, 2538251881Speter svn_boolean_t ignore_externals, 2539251881Speter const apr_array_header_t *changelists, 2540251881Speter svn_client_ctx_t *ctx, 2541251881Speter apr_pool_t *pool); 2542251881Speter 2543251881Speter/** 2544251881Speter * Same as svn_client_status4(), but using an #svn_wc_status_func2_t 2545251881Speter * instead of an #svn_wc_status_func3_t. 2546251881Speter * 2547251881Speter * @since New in 1.5. 2548251881Speter * @deprecated Provided for backward compatibility with the 1.5 API. 2549251881Speter */ 2550251881SpeterSVN_DEPRECATED 2551251881Spetersvn_error_t * 2552251881Spetersvn_client_status3(svn_revnum_t *result_rev, 2553251881Speter const char *path, 2554251881Speter const svn_opt_revision_t *revision, 2555251881Speter svn_wc_status_func2_t status_func, 2556251881Speter void *status_baton, 2557251881Speter svn_depth_t depth, 2558251881Speter svn_boolean_t get_all, 2559251881Speter svn_boolean_t update, 2560251881Speter svn_boolean_t no_ignore, 2561251881Speter svn_boolean_t ignore_externals, 2562251881Speter const apr_array_header_t *changelists, 2563251881Speter svn_client_ctx_t *ctx, 2564251881Speter apr_pool_t *pool); 2565251881Speter 2566251881Speter/** 2567251881Speter * Like svn_client_status3(), except with @a changelists passed as @c 2568251881Speter * NULL, and with @a recurse instead of @a depth. If @a recurse is 2569251881Speter * TRUE, behave as if for #svn_depth_infinity; else if @a recurse is 2570251881Speter * FALSE, behave as if for #svn_depth_immediates. 2571251881Speter * 2572251881Speter * @since New in 1.2. 2573251881Speter * @deprecated Provided for backward compatibility with the 1.4 API. 2574251881Speter */ 2575251881SpeterSVN_DEPRECATED 2576251881Spetersvn_error_t * 2577251881Spetersvn_client_status2(svn_revnum_t *result_rev, 2578251881Speter const char *path, 2579251881Speter const svn_opt_revision_t *revision, 2580251881Speter svn_wc_status_func2_t status_func, 2581251881Speter void *status_baton, 2582251881Speter svn_boolean_t recurse, 2583251881Speter svn_boolean_t get_all, 2584251881Speter svn_boolean_t update, 2585251881Speter svn_boolean_t no_ignore, 2586251881Speter svn_boolean_t ignore_externals, 2587251881Speter svn_client_ctx_t *ctx, 2588251881Speter apr_pool_t *pool); 2589251881Speter 2590251881Speter 2591251881Speter/** 2592251881Speter * Similar to svn_client_status2(), but with @a ignore_externals 2593251881Speter * always set to FALSE, taking the #svn_wc_status_func_t type 2594251881Speter * instead of the #svn_wc_status_func2_t type for @a status_func, 2595251881Speter * and requiring @a *revision to be non-const even though it is 2596251881Speter * treated as constant. 2597251881Speter * 2598251881Speter * @deprecated Provided for backward compatibility with the 1.1 API. 2599251881Speter */ 2600251881SpeterSVN_DEPRECATED 2601251881Spetersvn_error_t * 2602251881Spetersvn_client_status(svn_revnum_t *result_rev, 2603251881Speter const char *path, 2604251881Speter svn_opt_revision_t *revision, 2605251881Speter svn_wc_status_func_t status_func, 2606251881Speter void *status_baton, 2607251881Speter svn_boolean_t recurse, 2608251881Speter svn_boolean_t get_all, 2609251881Speter svn_boolean_t update, 2610251881Speter svn_boolean_t no_ignore, 2611251881Speter svn_client_ctx_t *ctx, 2612251881Speter apr_pool_t *pool); 2613251881Speter 2614251881Speter/** @} */ 2615251881Speter 2616251881Speter/** 2617251881Speter * @defgroup Log View information about previous revisions of an object. 2618251881Speter * 2619251881Speter * @{ 2620251881Speter */ 2621251881Speter 2622251881Speter/** 2623251881Speter * Invoke @a receiver with @a receiver_baton on each log message from 2624251881Speter * each (#svn_opt_revision_range_t *) range in @a revision_ranges in turn, 2625251881Speter * inclusive (but never invoke @a receiver on a given log message more 2626251881Speter * than once). 2627251881Speter * 2628251881Speter * @a targets contains either a URL followed by zero or more relative 2629251881Speter * paths, or 1 working copy path, as <tt>const char *</tt>, for which log 2630251881Speter * messages are desired. @a receiver is invoked only on messages whose 2631251881Speter * revisions involved a change to some path in @a targets. @a peg_revision 2632251881Speter * indicates in which revision @a targets are valid. If @a peg_revision is 2633251881Speter * #svn_opt_revision_unspecified, it defaults to #svn_opt_revision_head 2634251881Speter * for URLs or #svn_opt_revision_working for WC paths. 2635251881Speter * 2636251881Speter * If @a limit is non-zero only invoke @a receiver on the first @a limit 2637251881Speter * logs. 2638251881Speter * 2639251881Speter * If @a discover_changed_paths is set, then the @c changed_paths and @c 2640251881Speter * changed_paths2 fields in the @c log_entry argument to @a receiver will be 2641251881Speter * populated on each invocation. @note The @c text_modified and @c 2642251881Speter * props_modified fields of the changed paths structure may have the value 2643251881Speter * #svn_tristate_unknown if the repository does not report that information. 2644251881Speter * 2645251881Speter * If @a strict_node_history is set, copy history (if any exists) will 2646251881Speter * not be traversed while harvesting revision logs for each target. 2647251881Speter * 2648251881Speter * If @a include_merged_revisions is set, log information for revisions 2649251881Speter * which have been merged to @a targets will also be returned. 2650251881Speter * 2651251881Speter * If @a revprops is NULL, retrieve all revision properties; else, retrieve 2652251881Speter * only the revision properties named by the (const char *) array elements 2653251881Speter * (i.e. retrieve none if the array is empty). 2654251881Speter * 2655251881Speter * Use @a pool for any temporary allocation. 2656251881Speter * 2657251881Speter * If @a ctx->notify_func2 is non-NULL, then call @a ctx->notify_func2/baton2 2658251881Speter * with a 'skip' signal on any unversioned targets. 2659251881Speter * 2660251881Speter * @since New in 1.6. 2661251881Speter */ 2662251881Spetersvn_error_t * 2663251881Spetersvn_client_log5(const apr_array_header_t *targets, 2664251881Speter const svn_opt_revision_t *peg_revision, 2665251881Speter const apr_array_header_t *revision_ranges, 2666251881Speter int limit, 2667251881Speter svn_boolean_t discover_changed_paths, 2668251881Speter svn_boolean_t strict_node_history, 2669251881Speter svn_boolean_t include_merged_revisions, 2670251881Speter const apr_array_header_t *revprops, 2671251881Speter svn_log_entry_receiver_t receiver, 2672251881Speter void *receiver_baton, 2673251881Speter svn_client_ctx_t *ctx, 2674251881Speter apr_pool_t *pool); 2675251881Speter 2676251881Speter/** 2677251881Speter * Similar to svn_client_log5(), but takes explicit start and end parameters 2678251881Speter * instead of an array of revision ranges. 2679251881Speter * 2680251881Speter * @deprecated Provided for compatibility with the 1.5 API. 2681251881Speter * @since New in 1.5. 2682251881Speter */ 2683251881SpeterSVN_DEPRECATED 2684251881Spetersvn_error_t * 2685251881Spetersvn_client_log4(const apr_array_header_t *targets, 2686251881Speter const svn_opt_revision_t *peg_revision, 2687251881Speter const svn_opt_revision_t *start, 2688251881Speter const svn_opt_revision_t *end, 2689251881Speter int limit, 2690251881Speter svn_boolean_t discover_changed_paths, 2691251881Speter svn_boolean_t strict_node_history, 2692251881Speter svn_boolean_t include_merged_revisions, 2693251881Speter const apr_array_header_t *revprops, 2694251881Speter svn_log_entry_receiver_t receiver, 2695251881Speter void *receiver_baton, 2696251881Speter svn_client_ctx_t *ctx, 2697251881Speter apr_pool_t *pool); 2698251881Speter 2699251881Speter/** 2700251881Speter * Similar to svn_client_log4(), but using #svn_log_message_receiver_t 2701251881Speter * instead of #svn_log_entry_receiver_t. Also, @a 2702251881Speter * include_merged_revisions is set to @c FALSE and @a revprops is 2703251881Speter * svn:author, svn:date, and svn:log. 2704251881Speter * 2705251881Speter * @deprecated Provided for compatibility with the 1.4 API. 2706251881Speter * @since New in 1.4. 2707251881Speter */ 2708251881SpeterSVN_DEPRECATED 2709251881Spetersvn_error_t * 2710251881Spetersvn_client_log3(const apr_array_header_t *targets, 2711251881Speter const svn_opt_revision_t *peg_revision, 2712251881Speter const svn_opt_revision_t *start, 2713251881Speter const svn_opt_revision_t *end, 2714251881Speter int limit, 2715251881Speter svn_boolean_t discover_changed_paths, 2716251881Speter svn_boolean_t strict_node_history, 2717251881Speter svn_log_message_receiver_t receiver, 2718251881Speter void *receiver_baton, 2719251881Speter svn_client_ctx_t *ctx, 2720251881Speter apr_pool_t *pool); 2721251881Speter 2722251881Speter 2723251881Speter/** 2724251881Speter * Similar to svn_client_log3(), but with the @c kind field of 2725251881Speter * @a peg_revision set to #svn_opt_revision_unspecified. 2726251881Speter * 2727251881Speter * @par Important: 2728251881Speter * A special case for the revision range HEAD:1, which was present 2729251881Speter * in svn_client_log(), has been removed from svn_client_log2(). Instead, it 2730251881Speter * is expected that callers will specify the range HEAD:0, to avoid a 2731251881Speter * #SVN_ERR_FS_NO_SUCH_REVISION error when invoked against an empty repository 2732251881Speter * (i.e. one not containing a revision 1). 2733251881Speter * 2734251881Speter * @deprecated Provided for compatibility with the 1.3 API. 2735251881Speter * @since New in 1.2. 2736251881Speter */ 2737251881SpeterSVN_DEPRECATED 2738251881Spetersvn_error_t * 2739251881Spetersvn_client_log2(const apr_array_header_t *targets, 2740251881Speter const svn_opt_revision_t *start, 2741251881Speter const svn_opt_revision_t *end, 2742251881Speter int limit, 2743251881Speter svn_boolean_t discover_changed_paths, 2744251881Speter svn_boolean_t strict_node_history, 2745251881Speter svn_log_message_receiver_t receiver, 2746251881Speter void *receiver_baton, 2747251881Speter svn_client_ctx_t *ctx, 2748251881Speter apr_pool_t *pool); 2749251881Speter 2750251881Speter 2751251881Speter/** 2752251881Speter * Similar to svn_client_log2(), but with @a limit set to 0, and the 2753251881Speter * following special case: 2754251881Speter * 2755251881Speter * Special case for repositories at revision 0: 2756251881Speter * 2757251881Speter * If @a start->kind is #svn_opt_revision_head, and @a end->kind is 2758251881Speter * #svn_opt_revision_number && @a end->number is @c 1, then handle an 2759251881Speter * empty (no revisions) repository specially: instead of erroring 2760251881Speter * because requested revision 1 when the highest revision is 0, just 2761251881Speter * invoke @a receiver on revision 0, passing @c NULL for changed paths and 2762251881Speter * empty strings for the author and date. This is because that 2763251881Speter * particular combination of @a start and @a end usually indicates the 2764251881Speter * common case of log invocation -- the user wants to see all log 2765251881Speter * messages from youngest to oldest, where the oldest commit is 2766251881Speter * revision 1. That works fine, except when there are no commits in 2767251881Speter * the repository, hence this special case. 2768251881Speter * 2769251881Speter * @deprecated Provided for backward compatibility with the 1.1 API. 2770251881Speter */ 2771251881SpeterSVN_DEPRECATED 2772251881Spetersvn_error_t * 2773251881Spetersvn_client_log(const apr_array_header_t *targets, 2774251881Speter const svn_opt_revision_t *start, 2775251881Speter const svn_opt_revision_t *end, 2776251881Speter svn_boolean_t discover_changed_paths, 2777251881Speter svn_boolean_t strict_node_history, 2778251881Speter svn_log_message_receiver_t receiver, 2779251881Speter void *receiver_baton, 2780251881Speter svn_client_ctx_t *ctx, 2781251881Speter apr_pool_t *pool); 2782251881Speter 2783251881Speter/** @} */ 2784251881Speter 2785251881Speter/** 2786251881Speter * @defgroup Blame Show modification information about lines in a file. 2787251881Speter * 2788251881Speter * @{ 2789251881Speter */ 2790251881Speter 2791251881Speter/** 2792251881Speter * Invoke @a receiver with @a receiver_baton on each line-blame item 2793251881Speter * associated with revision @a end of @a path_or_url, using @a start 2794251881Speter * as the default source of all blame. @a peg_revision indicates in 2795251881Speter * which revision @a path_or_url is valid. If @a peg_revision->kind 2796251881Speter * is #svn_opt_revision_unspecified, then it defaults to 2797251881Speter * #svn_opt_revision_head for URLs or #svn_opt_revision_working for 2798251881Speter * WC targets. 2799251881Speter * 2800251881Speter * If @a start->kind or @a end->kind is #svn_opt_revision_unspecified, 2801251881Speter * return the error #SVN_ERR_CLIENT_BAD_REVISION. If either are 2802251881Speter * #svn_opt_revision_working, return the error 2803251881Speter * #SVN_ERR_UNSUPPORTED_FEATURE. If any of the revisions of @a 2804251881Speter * path_or_url have a binary mime-type, return the error 2805251881Speter * #SVN_ERR_CLIENT_IS_BINARY_FILE, unless @a ignore_mime_type is TRUE, 2806251881Speter * in which case blame information will be generated regardless of the 2807251881Speter * MIME types of the revisions. 2808251881Speter * 2809251881Speter * Use @a diff_options to determine how to compare different revisions of the 2810251881Speter * target. 2811251881Speter * 2812251881Speter * If @a include_merged_revisions is TRUE, also return data based upon 2813251881Speter * revisions which have been merged to @a path_or_url. 2814251881Speter * 2815251881Speter * Use @a pool for any temporary allocation. 2816251881Speter * 2817251881Speter * @since New in 1.7. 2818251881Speter */ 2819251881Spetersvn_error_t * 2820251881Spetersvn_client_blame5(const char *path_or_url, 2821251881Speter const svn_opt_revision_t *peg_revision, 2822251881Speter const svn_opt_revision_t *start, 2823251881Speter const svn_opt_revision_t *end, 2824251881Speter const svn_diff_file_options_t *diff_options, 2825251881Speter svn_boolean_t ignore_mime_type, 2826251881Speter svn_boolean_t include_merged_revisions, 2827251881Speter svn_client_blame_receiver3_t receiver, 2828251881Speter void *receiver_baton, 2829251881Speter svn_client_ctx_t *ctx, 2830251881Speter apr_pool_t *pool); 2831251881Speter 2832251881Speter 2833251881Speter/** 2834251881Speter * Similar to svn_client_blame5(), but with #svn_client_blame_receiver3_t 2835251881Speter * as the receiver. 2836251881Speter * 2837251881Speter * @deprecated Provided for backwards compatibility with the 1.6 API. 2838251881Speter * 2839251881Speter * @since New in 1.5. 2840251881Speter */ 2841251881SpeterSVN_DEPRECATED 2842251881Spetersvn_error_t * 2843251881Spetersvn_client_blame4(const char *path_or_url, 2844251881Speter const svn_opt_revision_t *peg_revision, 2845251881Speter const svn_opt_revision_t *start, 2846251881Speter const svn_opt_revision_t *end, 2847251881Speter const svn_diff_file_options_t *diff_options, 2848251881Speter svn_boolean_t ignore_mime_type, 2849251881Speter svn_boolean_t include_merged_revisions, 2850251881Speter svn_client_blame_receiver2_t receiver, 2851251881Speter void *receiver_baton, 2852251881Speter svn_client_ctx_t *ctx, 2853251881Speter apr_pool_t *pool); 2854251881Speter 2855251881Speter/** 2856251881Speter * Similar to svn_client_blame4(), but with @a include_merged_revisions set 2857251881Speter * to FALSE, and using a #svn_client_blame_receiver2_t as the receiver. 2858251881Speter * 2859251881Speter * @deprecated Provided for backwards compatibility with the 1.4 API. 2860251881Speter * 2861251881Speter * @since New in 1.4. 2862251881Speter */ 2863251881SpeterSVN_DEPRECATED 2864251881Spetersvn_error_t * 2865251881Spetersvn_client_blame3(const char *path_or_url, 2866251881Speter const svn_opt_revision_t *peg_revision, 2867251881Speter const svn_opt_revision_t *start, 2868251881Speter const svn_opt_revision_t *end, 2869251881Speter const svn_diff_file_options_t *diff_options, 2870251881Speter svn_boolean_t ignore_mime_type, 2871251881Speter svn_client_blame_receiver_t receiver, 2872251881Speter void *receiver_baton, 2873251881Speter svn_client_ctx_t *ctx, 2874251881Speter apr_pool_t *pool); 2875251881Speter 2876251881Speter/** 2877251881Speter * Similar to svn_client_blame3(), but with @a diff_options set to 2878251881Speter * default options as returned by svn_diff_file_options_parse() and 2879251881Speter * @a ignore_mime_type set to FALSE. 2880251881Speter * 2881251881Speter * @deprecated Provided for backwards compatibility with the 1.3 API. 2882251881Speter * 2883251881Speter * @since New in 1.2. 2884251881Speter */ 2885251881SpeterSVN_DEPRECATED 2886251881Spetersvn_error_t * 2887251881Spetersvn_client_blame2(const char *path_or_url, 2888251881Speter const svn_opt_revision_t *peg_revision, 2889251881Speter const svn_opt_revision_t *start, 2890251881Speter const svn_opt_revision_t *end, 2891251881Speter svn_client_blame_receiver_t receiver, 2892251881Speter void *receiver_baton, 2893251881Speter svn_client_ctx_t *ctx, 2894251881Speter apr_pool_t *pool); 2895251881Speter 2896251881Speter/** 2897251881Speter * Similar to svn_client_blame2() except that @a peg_revision is always 2898251881Speter * the same as @a end. 2899251881Speter * 2900251881Speter * @deprecated Provided for backward compatibility with the 1.1 API. 2901251881Speter */ 2902251881SpeterSVN_DEPRECATED 2903251881Spetersvn_error_t * 2904251881Spetersvn_client_blame(const char *path_or_url, 2905251881Speter const svn_opt_revision_t *start, 2906251881Speter const svn_opt_revision_t *end, 2907251881Speter svn_client_blame_receiver_t receiver, 2908251881Speter void *receiver_baton, 2909251881Speter svn_client_ctx_t *ctx, 2910251881Speter apr_pool_t *pool); 2911251881Speter 2912251881Speter/** @} */ 2913251881Speter 2914251881Speter/** 2915251881Speter * @defgroup Diff Generate differences between paths. 2916251881Speter * 2917251881Speter * @{ 2918251881Speter */ 2919251881Speter 2920251881Speter/** 2921251881Speter * Produce diff output which describes the delta between 2922251881Speter * @a path_or_url1/@a revision1 and @a path_or_url2/@a revision2. Print 2923251881Speter * the output of the diff to @a outstream, and any errors to @a 2924251881Speter * errstream. @a path_or_url1 and @a path_or_url2 can be either 2925251881Speter * working-copy paths or URLs. 2926251881Speter * 2927251881Speter * If @a relative_to_dir is not @c NULL, the original path and 2928251881Speter * modified path will have the @a relative_to_dir stripped from the 2929251881Speter * front of the respective paths. If @a relative_to_dir is @c NULL, 2930251881Speter * paths will not be modified. If @a relative_to_dir is not 2931251881Speter * @c NULL but @a relative_to_dir is not a parent path of the target, 2932251881Speter * an error is returned. Finally, if @a relative_to_dir is a URL, an 2933251881Speter * error will be returned. 2934251881Speter * 2935251881Speter * If either @a revision1 or @a revision2 has an `unspecified' or 2936251881Speter * unrecognized `kind', return #SVN_ERR_CLIENT_BAD_REVISION. 2937251881Speter * 2938251881Speter * @a path_or_url1 and @a path_or_url2 must both represent the same node 2939251881Speter * kind -- that is, if @a path_or_url1 is a directory, @a path_or_url2 2940251881Speter * must also be, and if @a path_or_url1 is a file, @a path_or_url2 must 2941251881Speter * also be. 2942251881Speter * 2943251881Speter * If @a depth is #svn_depth_infinity, diff fully recursively. 2944251881Speter * Else if it is #svn_depth_immediates, diff the named paths and 2945251881Speter * their file children (if any), and diff properties of 2946251881Speter * subdirectories, but do not descend further into the subdirectories. 2947251881Speter * Else if #svn_depth_files, behave as if for #svn_depth_immediates 2948251881Speter * except don't diff properties of subdirectories. If 2949251881Speter * #svn_depth_empty, diff exactly the named paths but nothing 2950251881Speter * underneath them. 2951251881Speter * 2952251881Speter * Use @a ignore_ancestry to control whether or not items being 2953251881Speter * diffed will be checked for relatedness first. Unrelated items 2954251881Speter * are typically transmitted to the editor as a deletion of one thing 2955251881Speter * and the addition of another, but if this flag is TRUE, unrelated 2956251881Speter * items will be diffed as if they were related. 2957251881Speter * 2958251881Speter * If @a no_diff_added is TRUE, then no diff output will be generated 2959251881Speter * on added files. 2960251881Speter * 2961251881Speter * If @a no_diff_deleted is TRUE, then no diff output will be 2962251881Speter * generated on deleted files. 2963251881Speter * 2964251881Speter * If @a show_copies_as_adds is TRUE, then copied files will not be diffed 2965251881Speter * against their copyfrom source, and will appear in the diff output 2966251881Speter * in their entirety, as if they were newly added. 2967251881Speter * ### BUGS: For a repos-repos diff, this is ignored. Instead, a file is 2968251881Speter * diffed against its copyfrom source iff the file is the diff target 2969251881Speter * and not if some parent directory is the diff target. For a repos-WC 2970251881Speter * diff, this is ignored if the file is the diff target. 2971251881Speter * 2972251881Speter * If @a use_git_diff_format is TRUE, then the git's extended diff format 2973251881Speter * will be used. 2974251881Speter * ### Do we need to say more about the format? A reference perhaps? 2975251881Speter * 2976251881Speter * If @a ignore_properties is TRUE, do not show property differences. 2977251881Speter * If @a properties_only is TRUE, show only property changes. 2978251881Speter * The above two options are mutually exclusive. It is an error to set 2979251881Speter * both to TRUE. 2980251881Speter * 2981251881Speter * Generated headers are encoded using @a header_encoding. 2982251881Speter * 2983251881Speter * Diff output will not be generated for binary files, unless @a 2984251881Speter * ignore_content_type is TRUE, in which case diffs will be shown 2985251881Speter * regardless of the content types. 2986251881Speter * 2987251881Speter * @a diff_options (an array of <tt>const char *</tt>) is used to pass 2988251881Speter * additional command line options to the diff processes invoked to compare 2989251881Speter * files. @a diff_options is allowed to be @c NULL, in which case a value 2990251881Speter * for this option might still be obtained from the Subversion configuration 2991251881Speter * file via client context @a ctx. 2992251881Speter * 2993251881Speter * The authentication baton cached in @a ctx is used to communicate with 2994251881Speter * the repository. 2995251881Speter * 2996251881Speter * @a changelists is an array of <tt>const char *</tt> changelist 2997251881Speter * names, used as a restrictive filter on items whose differences are 2998251881Speter * reported; that is, don't generate diffs about any item unless 2999251881Speter * it's a member of one of those changelists. If @a changelists is 3000251881Speter * empty (or altogether @c NULL), no changelist filtering occurs. 3001251881Speter * 3002251881Speter * @note Changelist filtering only applies to diffs in which at least 3003251881Speter * one side of the diff represents working copy data. 3004251881Speter * 3005251881Speter * @note @a header_encoding doesn't affect headers generated by external 3006251881Speter * diff programs. 3007251881Speter * 3008251881Speter * @note @a relative_to_dir doesn't affect the path index generated by 3009251881Speter * external diff programs. 3010251881Speter * 3011251881Speter * @since New in 1.8. 3012251881Speter */ 3013251881Spetersvn_error_t * 3014251881Spetersvn_client_diff6(const apr_array_header_t *diff_options, 3015251881Speter const char *path_or_url1, 3016251881Speter const svn_opt_revision_t *revision1, 3017251881Speter const char *path_or_url2, 3018251881Speter const svn_opt_revision_t *revision2, 3019251881Speter const char *relative_to_dir, 3020251881Speter svn_depth_t depth, 3021251881Speter svn_boolean_t ignore_ancestry, 3022251881Speter svn_boolean_t no_diff_added, 3023251881Speter svn_boolean_t no_diff_deleted, 3024251881Speter svn_boolean_t show_copies_as_adds, 3025251881Speter svn_boolean_t ignore_content_type, 3026251881Speter svn_boolean_t ignore_properties, 3027251881Speter svn_boolean_t properties_only, 3028251881Speter svn_boolean_t use_git_diff_format, 3029251881Speter const char *header_encoding, 3030251881Speter svn_stream_t *outstream, 3031251881Speter svn_stream_t *errstream, 3032251881Speter const apr_array_header_t *changelists, 3033251881Speter svn_client_ctx_t *ctx, 3034251881Speter apr_pool_t *pool); 3035251881Speter 3036251881Speter/** Similar to svn_client_diff6(), but with @a outfile and @a errfile, 3037251881Speter * instead of @a outstream and @a errstream, and with @a 3038251881Speter * no_diff_added, @a ignore_properties, and @a properties_only always 3039251881Speter * passed as @c FALSE (which means that additions and property changes 3040251881Speter * are always transmitted). 3041251881Speter * 3042251881Speter * @deprecated Provided for backward compatibility with the 1.7 API. 3043251881Speter * @since New in 1.7. 3044251881Speter */ 3045251881SpeterSVN_DEPRECATED 3046251881Spetersvn_error_t * 3047251881Spetersvn_client_diff5(const apr_array_header_t *diff_options, 3048251881Speter const char *path1, 3049251881Speter const svn_opt_revision_t *revision1, 3050251881Speter const char *path2, 3051251881Speter const svn_opt_revision_t *revision2, 3052251881Speter const char *relative_to_dir, 3053251881Speter svn_depth_t depth, 3054251881Speter svn_boolean_t ignore_ancestry, 3055251881Speter svn_boolean_t no_diff_deleted, 3056251881Speter svn_boolean_t show_copies_as_adds, 3057251881Speter svn_boolean_t ignore_content_type, 3058251881Speter svn_boolean_t use_git_diff_format, 3059251881Speter const char *header_encoding, 3060251881Speter apr_file_t *outfile, 3061251881Speter apr_file_t *errfile, 3062251881Speter const apr_array_header_t *changelists, 3063251881Speter svn_client_ctx_t *ctx, 3064251881Speter apr_pool_t *pool); 3065251881Speter 3066251881Speter/** 3067251881Speter * Similar to svn_client_diff5(), but with @a show_copies_as_adds set to 3068251881Speter * @c FALSE and @a use_git_diff_format set to @c FALSE. 3069251881Speter * 3070251881Speter * @deprecated Provided for backward compatibility with the 1.6 API. 3071251881Speter * @since New in 1.5. 3072251881Speter */ 3073251881SpeterSVN_DEPRECATED 3074251881Spetersvn_error_t * 3075251881Spetersvn_client_diff4(const apr_array_header_t *diff_options, 3076251881Speter const char *path1, 3077251881Speter const svn_opt_revision_t *revision1, 3078251881Speter const char *path2, 3079251881Speter const svn_opt_revision_t *revision2, 3080251881Speter const char *relative_to_dir, 3081251881Speter svn_depth_t depth, 3082251881Speter svn_boolean_t ignore_ancestry, 3083251881Speter svn_boolean_t no_diff_deleted, 3084251881Speter svn_boolean_t ignore_content_type, 3085251881Speter const char *header_encoding, 3086251881Speter apr_file_t *outfile, 3087251881Speter apr_file_t *errfile, 3088251881Speter const apr_array_header_t *changelists, 3089251881Speter svn_client_ctx_t *ctx, 3090251881Speter apr_pool_t *pool); 3091251881Speter 3092251881Speter/** 3093251881Speter * Similar to svn_client_diff4(), but with @a changelists passed as @c 3094251881Speter * NULL, and @a depth set according to @a recurse: if @a recurse is 3095251881Speter * TRUE, set @a depth to #svn_depth_infinity, if @a recurse is 3096251881Speter * FALSE, set @a depth to #svn_depth_empty. 3097251881Speter * 3098251881Speter * @deprecated Provided for backward compatibility with the 1.4 API. 3099251881Speter * @since New in 1.3. 3100251881Speter */ 3101251881SpeterSVN_DEPRECATED 3102251881Spetersvn_error_t * 3103251881Spetersvn_client_diff3(const apr_array_header_t *diff_options, 3104251881Speter const char *path1, 3105251881Speter const svn_opt_revision_t *revision1, 3106251881Speter const char *path2, 3107251881Speter const svn_opt_revision_t *revision2, 3108251881Speter svn_boolean_t recurse, 3109251881Speter svn_boolean_t ignore_ancestry, 3110251881Speter svn_boolean_t no_diff_deleted, 3111251881Speter svn_boolean_t ignore_content_type, 3112251881Speter const char *header_encoding, 3113251881Speter apr_file_t *outfile, 3114251881Speter apr_file_t *errfile, 3115251881Speter svn_client_ctx_t *ctx, 3116251881Speter apr_pool_t *pool); 3117251881Speter 3118251881Speter 3119251881Speter/** 3120251881Speter * Similar to svn_client_diff3(), but with @a header_encoding set to 3121251881Speter * @c APR_LOCALE_CHARSET. 3122251881Speter * 3123251881Speter * @deprecated Provided for backward compatibility with the 1.2 API. 3124251881Speter * @since New in 1.2. 3125251881Speter */ 3126251881SpeterSVN_DEPRECATED 3127251881Spetersvn_error_t * 3128251881Spetersvn_client_diff2(const apr_array_header_t *diff_options, 3129251881Speter const char *path1, 3130251881Speter const svn_opt_revision_t *revision1, 3131251881Speter const char *path2, 3132251881Speter const svn_opt_revision_t *revision2, 3133251881Speter svn_boolean_t recurse, 3134251881Speter svn_boolean_t ignore_ancestry, 3135251881Speter svn_boolean_t no_diff_deleted, 3136251881Speter svn_boolean_t ignore_content_type, 3137251881Speter apr_file_t *outfile, 3138251881Speter apr_file_t *errfile, 3139251881Speter svn_client_ctx_t *ctx, 3140251881Speter apr_pool_t *pool); 3141251881Speter 3142251881Speter/** 3143251881Speter * Similar to svn_client_diff2(), but with @a ignore_content_type 3144251881Speter * always set to FALSE. 3145251881Speter * 3146251881Speter * @deprecated Provided for backward compatibility with the 1.1 API. 3147251881Speter */ 3148251881SpeterSVN_DEPRECATED 3149251881Spetersvn_error_t * 3150251881Spetersvn_client_diff(const apr_array_header_t *diff_options, 3151251881Speter const char *path1, 3152251881Speter const svn_opt_revision_t *revision1, 3153251881Speter const char *path2, 3154251881Speter const svn_opt_revision_t *revision2, 3155251881Speter svn_boolean_t recurse, 3156251881Speter svn_boolean_t ignore_ancestry, 3157251881Speter svn_boolean_t no_diff_deleted, 3158251881Speter apr_file_t *outfile, 3159251881Speter apr_file_t *errfile, 3160251881Speter svn_client_ctx_t *ctx, 3161251881Speter apr_pool_t *pool); 3162251881Speter 3163251881Speter/** 3164251881Speter * Produce diff output which describes the delta between the filesystem 3165251881Speter * object @a path_or_url in peg revision @a peg_revision, as it changed 3166251881Speter * between @a start_revision and @a end_revision. @a path_or_url can 3167251881Speter * be either a working-copy path or URL. 3168251881Speter * 3169251881Speter * If @a peg_revision is #svn_opt_revision_unspecified, behave 3170251881Speter * identically to svn_client_diff6(), using @a path_or_url for both of that 3171251881Speter * function's @a path_or_url1 and @a path_or_url2 arguments. 3172251881Speter * 3173251881Speter * All other options are handled identically to svn_client_diff6(). 3174251881Speter * 3175251881Speter * @since New in 1.8. 3176251881Speter */ 3177251881Spetersvn_error_t * 3178251881Spetersvn_client_diff_peg6(const apr_array_header_t *diff_options, 3179251881Speter const char *path_or_url, 3180251881Speter const svn_opt_revision_t *peg_revision, 3181251881Speter const svn_opt_revision_t *start_revision, 3182251881Speter const svn_opt_revision_t *end_revision, 3183251881Speter const char *relative_to_dir, 3184251881Speter svn_depth_t depth, 3185251881Speter svn_boolean_t ignore_ancestry, 3186251881Speter svn_boolean_t no_diff_added, 3187251881Speter svn_boolean_t no_diff_deleted, 3188251881Speter svn_boolean_t show_copies_as_adds, 3189251881Speter svn_boolean_t ignore_content_type, 3190251881Speter svn_boolean_t ignore_properties, 3191251881Speter svn_boolean_t properties_only, 3192251881Speter svn_boolean_t use_git_diff_format, 3193251881Speter const char *header_encoding, 3194251881Speter svn_stream_t *outstream, 3195251881Speter svn_stream_t *errstream, 3196251881Speter const apr_array_header_t *changelists, 3197251881Speter svn_client_ctx_t *ctx, 3198251881Speter apr_pool_t *pool); 3199251881Speter 3200251881Speter/** Similar to svn_client_diff6_peg6(), but with @a outfile and @a errfile, 3201251881Speter * instead of @a outstream and @a errstream, and with @a 3202251881Speter * no_diff_added, @a ignore_properties, and @a properties_only always 3203251881Speter * passed as @c FALSE (which means that additions and property changes 3204251881Speter * are always transmitted). 3205251881Speter * 3206251881Speter * @deprecated Provided for backward compatibility with the 1.7 API. 3207251881Speter * @since New in 1.7. 3208251881Speter */ 3209251881SpeterSVN_DEPRECATED 3210251881Spetersvn_error_t * 3211251881Spetersvn_client_diff_peg5(const apr_array_header_t *diff_options, 3212251881Speter const char *path, 3213251881Speter const svn_opt_revision_t *peg_revision, 3214251881Speter const svn_opt_revision_t *start_revision, 3215251881Speter const svn_opt_revision_t *end_revision, 3216251881Speter const char *relative_to_dir, 3217251881Speter svn_depth_t depth, 3218251881Speter svn_boolean_t ignore_ancestry, 3219251881Speter svn_boolean_t no_diff_deleted, 3220251881Speter svn_boolean_t show_copies_as_adds, 3221251881Speter svn_boolean_t ignore_content_type, 3222251881Speter svn_boolean_t use_git_diff_format, 3223251881Speter const char *header_encoding, 3224251881Speter apr_file_t *outfile, 3225251881Speter apr_file_t *errfile, 3226251881Speter const apr_array_header_t *changelists, 3227251881Speter svn_client_ctx_t *ctx, 3228251881Speter apr_pool_t *pool); 3229251881Speter 3230251881Speter/** 3231251881Speter * Similar to svn_client_diff_peg5(), but with @a show_copies_as_adds set to 3232251881Speter * @c FALSE and @a use_git_diff_format set to @c FALSE. 3233251881Speter * 3234251881Speter * @since New in 1.5. 3235251881Speter * @deprecated Provided for backward compatibility with the 1.6 API. 3236251881Speter */ 3237251881SpeterSVN_DEPRECATED 3238251881Spetersvn_error_t * 3239251881Spetersvn_client_diff_peg4(const apr_array_header_t *diff_options, 3240251881Speter const char *path, 3241251881Speter const svn_opt_revision_t *peg_revision, 3242251881Speter const svn_opt_revision_t *start_revision, 3243251881Speter const svn_opt_revision_t *end_revision, 3244251881Speter const char *relative_to_dir, 3245251881Speter svn_depth_t depth, 3246251881Speter svn_boolean_t ignore_ancestry, 3247251881Speter svn_boolean_t no_diff_deleted, 3248251881Speter svn_boolean_t ignore_content_type, 3249251881Speter const char *header_encoding, 3250251881Speter apr_file_t *outfile, 3251251881Speter apr_file_t *errfile, 3252251881Speter const apr_array_header_t *changelists, 3253251881Speter svn_client_ctx_t *ctx, 3254251881Speter apr_pool_t *pool); 3255251881Speter 3256251881Speter/** 3257251881Speter * Similar to svn_client_diff_peg4(), but with @a changelists passed 3258251881Speter * as @c NULL, and @a depth set according to @a recurse: if @a recurse 3259251881Speter * is TRUE, set @a depth to #svn_depth_infinity, if @a recurse is 3260251881Speter * FALSE, set @a depth to #svn_depth_files. 3261251881Speter * 3262251881Speter * @deprecated Provided for backward compatibility with the 1.4 API. 3263251881Speter * @since New in 1.3. 3264251881Speter */ 3265251881SpeterSVN_DEPRECATED 3266251881Spetersvn_error_t * 3267251881Spetersvn_client_diff_peg3(const apr_array_header_t *diff_options, 3268251881Speter const char *path, 3269251881Speter const svn_opt_revision_t *peg_revision, 3270251881Speter const svn_opt_revision_t *start_revision, 3271251881Speter const svn_opt_revision_t *end_revision, 3272251881Speter svn_boolean_t recurse, 3273251881Speter svn_boolean_t ignore_ancestry, 3274251881Speter svn_boolean_t no_diff_deleted, 3275251881Speter svn_boolean_t ignore_content_type, 3276251881Speter const char *header_encoding, 3277251881Speter apr_file_t *outfile, 3278251881Speter apr_file_t *errfile, 3279251881Speter svn_client_ctx_t *ctx, 3280251881Speter apr_pool_t *pool); 3281251881Speter 3282251881Speter/** 3283251881Speter * Similar to svn_client_diff_peg3(), but with @a header_encoding set to 3284251881Speter * @c APR_LOCALE_CHARSET. 3285251881Speter * 3286251881Speter * @deprecated Provided for backward compatibility with the 1.2 API. 3287251881Speter * @since New in 1.2. 3288251881Speter */ 3289251881SpeterSVN_DEPRECATED 3290251881Spetersvn_error_t * 3291251881Spetersvn_client_diff_peg2(const apr_array_header_t *diff_options, 3292251881Speter const char *path, 3293251881Speter const svn_opt_revision_t *peg_revision, 3294251881Speter const svn_opt_revision_t *start_revision, 3295251881Speter const svn_opt_revision_t *end_revision, 3296251881Speter svn_boolean_t recurse, 3297251881Speter svn_boolean_t ignore_ancestry, 3298251881Speter svn_boolean_t no_diff_deleted, 3299251881Speter svn_boolean_t ignore_content_type, 3300251881Speter apr_file_t *outfile, 3301251881Speter apr_file_t *errfile, 3302251881Speter svn_client_ctx_t *ctx, 3303251881Speter apr_pool_t *pool); 3304251881Speter 3305251881Speter/** 3306251881Speter * Similar to svn_client_diff_peg2(), but with @a ignore_content_type 3307251881Speter * always set to FALSE. 3308251881Speter * 3309251881Speter * @since New in 1.1. 3310251881Speter * @deprecated Provided for backward compatibility with the 1.1 API. 3311251881Speter */ 3312251881SpeterSVN_DEPRECATED 3313251881Spetersvn_error_t * 3314251881Spetersvn_client_diff_peg(const apr_array_header_t *diff_options, 3315251881Speter const char *path, 3316251881Speter const svn_opt_revision_t *peg_revision, 3317251881Speter const svn_opt_revision_t *start_revision, 3318251881Speter const svn_opt_revision_t *end_revision, 3319251881Speter svn_boolean_t recurse, 3320251881Speter svn_boolean_t ignore_ancestry, 3321251881Speter svn_boolean_t no_diff_deleted, 3322251881Speter apr_file_t *outfile, 3323251881Speter apr_file_t *errfile, 3324251881Speter svn_client_ctx_t *ctx, 3325251881Speter apr_pool_t *pool); 3326251881Speter 3327251881Speter/** 3328251881Speter * Produce a diff summary which lists the changed items between 3329251881Speter * @a path_or_url1/@a revision1 and @a path_or_url2/@a revision2 without 3330251881Speter * creating text deltas. @a path_or_url1 and @a path_or_url2 can be 3331251881Speter * either working-copy paths or URLs. 3332251881Speter * 3333251881Speter * The function may report false positives if @a ignore_ancestry is false, 3334251881Speter * since a file might have been modified between two revisions, but still 3335251881Speter * have the same contents. 3336251881Speter * 3337251881Speter * Calls @a summarize_func with @a summarize_baton for each difference 3338251881Speter * with a #svn_client_diff_summarize_t structure describing the difference. 3339251881Speter * 3340251881Speter * See svn_client_diff6() for a description of the other parameters. 3341251881Speter * 3342251881Speter * @since New in 1.5. 3343251881Speter */ 3344251881Spetersvn_error_t * 3345251881Spetersvn_client_diff_summarize2(const char *path_or_url1, 3346251881Speter const svn_opt_revision_t *revision1, 3347251881Speter const char *path_or_url2, 3348251881Speter const svn_opt_revision_t *revision2, 3349251881Speter svn_depth_t depth, 3350251881Speter svn_boolean_t ignore_ancestry, 3351251881Speter const apr_array_header_t *changelists, 3352251881Speter svn_client_diff_summarize_func_t summarize_func, 3353251881Speter void *summarize_baton, 3354251881Speter svn_client_ctx_t *ctx, 3355251881Speter apr_pool_t *pool); 3356251881Speter 3357251881Speter/** 3358251881Speter * Similar to svn_client_diff_summarize2(), but with @a changelists 3359251881Speter * passed as @c NULL, and @a depth set according to @a recurse: if @a 3360251881Speter * recurse is TRUE, set @a depth to #svn_depth_infinity, if @a 3361251881Speter * recurse is FALSE, set @a depth to #svn_depth_files. 3362251881Speter * 3363251881Speter * @deprecated Provided for backward compatibility with the 1.4 API. 3364251881Speter * 3365251881Speter * @since New in 1.4. 3366251881Speter */ 3367251881SpeterSVN_DEPRECATED 3368251881Spetersvn_error_t * 3369251881Spetersvn_client_diff_summarize(const char *path1, 3370251881Speter const svn_opt_revision_t *revision1, 3371251881Speter const char *path2, 3372251881Speter const svn_opt_revision_t *revision2, 3373251881Speter svn_boolean_t recurse, 3374251881Speter svn_boolean_t ignore_ancestry, 3375251881Speter svn_client_diff_summarize_func_t summarize_func, 3376251881Speter void *summarize_baton, 3377251881Speter svn_client_ctx_t *ctx, 3378251881Speter apr_pool_t *pool); 3379251881Speter 3380251881Speter/** 3381251881Speter * Produce a diff summary which lists the changed items between the 3382251881Speter * filesystem object @a path_or_url in peg revision @a peg_revision, as it 3383251881Speter * changed between @a start_revision and @a end_revision. @a path_or_url can 3384251881Speter * be either a working-copy path or URL. 3385251881Speter * 3386251881Speter * If @a peg_revision is #svn_opt_revision_unspecified, behave 3387251881Speter * identically to svn_client_diff_summarize2(), using @a path_or_url for 3388251881Speter * both of that function's @a path_or_url1 and @a path_or_url2 arguments. 3389251881Speter * 3390251881Speter * The function may report false positives if @a ignore_ancestry is false, 3391251881Speter * as described in the documentation for svn_client_diff_summarize2(). 3392251881Speter * 3393251881Speter * Call @a summarize_func with @a summarize_baton for each difference 3394251881Speter * with a #svn_client_diff_summarize_t structure describing the difference. 3395251881Speter * 3396251881Speter * See svn_client_diff_peg5() for a description of the other parameters. 3397251881Speter * 3398251881Speter * @since New in 1.5. 3399251881Speter */ 3400251881Spetersvn_error_t * 3401251881Spetersvn_client_diff_summarize_peg2(const char *path_or_url, 3402251881Speter const svn_opt_revision_t *peg_revision, 3403251881Speter const svn_opt_revision_t *start_revision, 3404251881Speter const svn_opt_revision_t *end_revision, 3405251881Speter svn_depth_t depth, 3406251881Speter svn_boolean_t ignore_ancestry, 3407251881Speter const apr_array_header_t *changelists, 3408251881Speter svn_client_diff_summarize_func_t summarize_func, 3409251881Speter void *summarize_baton, 3410251881Speter svn_client_ctx_t *ctx, 3411251881Speter apr_pool_t *pool); 3412251881Speter 3413251881Speter/** 3414251881Speter * Similar to svn_client_diff_summarize_peg2(), but with @a 3415251881Speter * changelists passed as @c NULL, and @a depth set according to @a 3416251881Speter * recurse: if @a recurse is TRUE, set @a depth to 3417251881Speter * #svn_depth_infinity, if @a recurse is FALSE, set @a depth to 3418251881Speter * #svn_depth_files. 3419251881Speter * 3420251881Speter * @deprecated Provided for backward compatibility with the 1.4 API. 3421251881Speter * 3422251881Speter * @since New in 1.4. 3423251881Speter */ 3424251881SpeterSVN_DEPRECATED 3425251881Spetersvn_error_t * 3426251881Spetersvn_client_diff_summarize_peg(const char *path, 3427251881Speter const svn_opt_revision_t *peg_revision, 3428251881Speter const svn_opt_revision_t *start_revision, 3429251881Speter const svn_opt_revision_t *end_revision, 3430251881Speter svn_boolean_t recurse, 3431251881Speter svn_boolean_t ignore_ancestry, 3432251881Speter svn_client_diff_summarize_func_t summarize_func, 3433251881Speter void *summarize_baton, 3434251881Speter svn_client_ctx_t *ctx, 3435251881Speter apr_pool_t *pool); 3436251881Speter 3437251881Speter/** @} */ 3438251881Speter 3439251881Speter/** 3440251881Speter * @defgroup Merge Merge changes between branches. 3441251881Speter * 3442251881Speter * @{ 3443251881Speter */ 3444251881Speter 3445251881Speter/** Get information about the state of merging between two branches. 3446251881Speter * 3447251881Speter * The source is specified by @a source_path_or_url at @a source_revision. 3448251881Speter * The target is specified by @a target_path_or_url at @a target_revision, 3449251881Speter * which refers to either a WC or a repository location. 3450251881Speter * 3451251881Speter * Set @a *needs_reintegration to true if an automatic merge from source 3452251881Speter * to target would be a reintegration merge: that is, if the last automatic 3453251881Speter * merge was in the opposite direction; or to false otherwise. 3454251881Speter * 3455251881Speter * Set @a *yca_url, @a *yca_rev, @a *base_url, @a *base_rev, @a *right_url, 3456251881Speter * @a *right_rev, @a *target_url, @a *target_rev to the repository locations 3457251881Speter * of, respectively: the youngest common ancestor of the branches, the base 3458251881Speter * chosen for 3-way merge, the right-hand side of the source diff, and the 3459251881Speter * target. 3460251881Speter * 3461251881Speter * Set @a repos_root_url to the URL of the repository root. This is a 3462251881Speter * common prefix of all four URL outputs. 3463251881Speter * 3464251881Speter * Allocate the results in @a result_pool. Any of the output pointers may 3465251881Speter * be NULL if not wanted. 3466251881Speter * 3467251881Speter * @since New in 1.8. 3468251881Speter */ 3469251881Spetersvn_error_t * 3470251881Spetersvn_client_get_merging_summary(svn_boolean_t *needs_reintegration, 3471251881Speter const char **yca_url, svn_revnum_t *yca_rev, 3472251881Speter const char **base_url, svn_revnum_t *base_rev, 3473251881Speter const char **right_url, svn_revnum_t *right_rev, 3474251881Speter const char **target_url, svn_revnum_t *target_rev, 3475251881Speter const char **repos_root_url, 3476251881Speter const char *source_path_or_url, 3477251881Speter const svn_opt_revision_t *source_revision, 3478251881Speter const char *target_path_or_url, 3479251881Speter const svn_opt_revision_t *target_revision, 3480251881Speter svn_client_ctx_t *ctx, 3481251881Speter apr_pool_t *result_pool, 3482251881Speter apr_pool_t *scratch_pool); 3483251881Speter 3484251881Speter 3485251881Speter/** Merge changes from @a source1/@a revision1 to @a source2/@a revision2 into 3486251881Speter * the working-copy path @a target_wcpath. 3487251881Speter * 3488251881Speter * @a source1 and @a source2 are either URLs that refer to entries in the 3489251881Speter * repository, or paths to entries in the working copy. 3490251881Speter * 3491251881Speter * By "merging", we mean: apply file differences using 3492251881Speter * svn_wc_merge(), and schedule additions & deletions when appropriate. 3493251881Speter * 3494251881Speter * @a source1 and @a source2 must both represent the same node kind -- that 3495251881Speter * is, if @a source1 is a directory, @a source2 must also be, and if @a source1 3496251881Speter * is a file, @a source2 must also be. 3497251881Speter * 3498251881Speter * If either @a revision1 or @a revision2 has an `unspecified' or 3499251881Speter * unrecognized `kind', return #SVN_ERR_CLIENT_BAD_REVISION. 3500251881Speter * 3501251881Speter * If @a depth is #svn_depth_infinity, merge fully recursively. 3502251881Speter * Else if #svn_depth_immediates, merge changes at most to files 3503251881Speter * that are immediate children of @a target_wcpath and to directory 3504251881Speter * properties of @a target_wcpath and its immediate subdirectory children. 3505251881Speter * Else if #svn_depth_files, merge at most to immediate file 3506251881Speter * children of @a target_wcpath and to @a target_wcpath itself. 3507251881Speter * Else if #svn_depth_empty, apply changes only to @a target_wcpath 3508251881Speter * (i.e., directory property changes only) 3509251881Speter * 3510251881Speter * If @a depth is #svn_depth_unknown, use the depth of @a target_wcpath. 3511251881Speter * 3512251881Speter * If @a ignore_mergeinfo is true, disable merge tracking, by treating the 3513251881Speter * two sources as unrelated even if they actually have a common ancestor. 3514251881Speter * 3515251881Speter * If @a diff_ignore_ancestry is true, diff unrelated nodes as if related: 3516251881Speter * that is, diff the 'left' and 'right' versions of a node as if they were 3517251881Speter * related (if they are the same kind) even if they are not related. 3518251881Speter * Otherwise, diff unrelated items as a deletion of one thing and the 3519251881Speter * addition of another. 3520251881Speter * 3521251881Speter * If @a force_delete is false and the merge involves deleting a file whose 3522251881Speter * content differs from the source-left version, or a locally modified 3523251881Speter * directory, or an unversioned item, then the operation will fail. If 3524251881Speter * @a force_delete is true then all such items will be deleted. 3525251881Speter * 3526251881Speter * @a merge_options (an array of <tt>const char *</tt>), if non-NULL, 3527251881Speter * is used to pass additional command line arguments to the merge 3528251881Speter * processes (internal or external). @see 3529251881Speter * svn_diff_file_options_parse(). 3530251881Speter * 3531251881Speter * If @a ctx->notify_func2 is non-NULL, then call @a ctx->notify_func2 with @a 3532251881Speter * ctx->notify_baton2 once for each merged target, passing the target's local 3533251881Speter * path. 3534251881Speter * 3535251881Speter * If @a record_only is TRUE, the merge is performed, but is limited only to 3536251881Speter * mergeinfo property changes on existing paths in @a target_wcpath. 3537251881Speter * 3538251881Speter * If @a dry_run is TRUE, the merge is carried out, and full notification 3539251881Speter * feedback is provided, but the working copy is not modified. 3540251881Speter * 3541251881Speter * If allow_mixed_rev is @c FALSE, and @a merge_target is a mixed-revision 3542251881Speter * working copy, raise @c SVN_ERR_CLIENT_MERGE_UPDATE_REQUIRED. 3543251881Speter * Because users rarely intend to merge into mixed-revision working copies, 3544251881Speter * it is recommended to set this parameter to FALSE by default unless the 3545251881Speter * user has explicitly requested a merge into a mixed-revision working copy. 3546251881Speter * 3547251881Speter * The authentication baton cached in @a ctx is used to communicate with the 3548251881Speter * repository. 3549251881Speter * 3550251881Speter * @since New in 1.8. 3551251881Speter */ 3552251881Spetersvn_error_t * 3553251881Spetersvn_client_merge5(const char *source1, 3554251881Speter const svn_opt_revision_t *revision1, 3555251881Speter const char *source2, 3556251881Speter const svn_opt_revision_t *revision2, 3557251881Speter const char *target_wcpath, 3558251881Speter svn_depth_t depth, 3559251881Speter svn_boolean_t ignore_mergeinfo, 3560251881Speter svn_boolean_t diff_ignore_ancestry, 3561251881Speter svn_boolean_t force_delete, 3562251881Speter svn_boolean_t record_only, 3563251881Speter svn_boolean_t dry_run, 3564251881Speter svn_boolean_t allow_mixed_rev, 3565251881Speter const apr_array_header_t *merge_options, 3566251881Speter svn_client_ctx_t *ctx, 3567251881Speter apr_pool_t *pool); 3568251881Speter 3569251881Speter/** 3570251881Speter * Similar to svn_client_merge5(), but the single @a ignore_ancestry 3571251881Speter * parameter maps to both @c ignore_mergeinfo and @c diff_ignore_ancestry. 3572251881Speter * 3573251881Speter * @deprecated Provided for backward compatibility with the 1.7 API. 3574251881Speter * @since New in 1.7. 3575251881Speter */ 3576251881SpeterSVN_DEPRECATED 3577251881Spetersvn_error_t * 3578251881Spetersvn_client_merge4(const char *source1, 3579251881Speter const svn_opt_revision_t *revision1, 3580251881Speter const char *source2, 3581251881Speter const svn_opt_revision_t *revision2, 3582251881Speter const char *target_wcpath, 3583251881Speter svn_depth_t depth, 3584251881Speter svn_boolean_t ignore_ancestry, 3585251881Speter svn_boolean_t force_delete, 3586251881Speter svn_boolean_t record_only, 3587251881Speter svn_boolean_t dry_run, 3588251881Speter svn_boolean_t allow_mixed_rev, 3589251881Speter const apr_array_header_t *merge_options, 3590251881Speter svn_client_ctx_t *ctx, 3591251881Speter apr_pool_t *pool); 3592251881Speter 3593251881Speter/** 3594251881Speter * Similar to svn_client_merge4(), but with @a allow_mixed_rev set to 3595251881Speter * @c TRUE. The @a force parameter maps to the @c force_delete parameter 3596251881Speter * of svn_client_merge4(). 3597251881Speter * 3598251881Speter * @deprecated Provided for backward compatibility with the 1.6 API. 3599251881Speter * 3600251881Speter * @since New in 1.5. 3601251881Speter */ 3602251881SpeterSVN_DEPRECATED 3603251881Spetersvn_error_t * 3604251881Spetersvn_client_merge3(const char *source1, 3605251881Speter const svn_opt_revision_t *revision1, 3606251881Speter const char *source2, 3607251881Speter const svn_opt_revision_t *revision2, 3608251881Speter const char *target_wcpath, 3609251881Speter svn_depth_t depth, 3610251881Speter svn_boolean_t ignore_ancestry, 3611251881Speter svn_boolean_t force, 3612251881Speter svn_boolean_t record_only, 3613251881Speter svn_boolean_t dry_run, 3614251881Speter const apr_array_header_t *merge_options, 3615251881Speter svn_client_ctx_t *ctx, 3616251881Speter apr_pool_t *pool); 3617251881Speter 3618251881Speter/** 3619251881Speter * Similar to svn_client_merge3(), but with @a record_only set to @c 3620251881Speter * FALSE, and @a depth set according to @a recurse: if @a recurse is 3621251881Speter * TRUE, set @a depth to #svn_depth_infinity, if @a recurse is 3622251881Speter * FALSE, set @a depth to #svn_depth_files. 3623251881Speter * 3624251881Speter * @deprecated Provided for backward compatibility with the 1.4 API. 3625251881Speter * 3626251881Speter * @since New in 1.4. 3627251881Speter */ 3628251881SpeterSVN_DEPRECATED 3629251881Spetersvn_error_t * 3630251881Spetersvn_client_merge2(const char *source1, 3631251881Speter const svn_opt_revision_t *revision1, 3632251881Speter const char *source2, 3633251881Speter const svn_opt_revision_t *revision2, 3634251881Speter const char *target_wcpath, 3635251881Speter svn_boolean_t recurse, 3636251881Speter svn_boolean_t ignore_ancestry, 3637251881Speter svn_boolean_t force, 3638251881Speter svn_boolean_t dry_run, 3639251881Speter const apr_array_header_t *merge_options, 3640251881Speter svn_client_ctx_t *ctx, 3641251881Speter apr_pool_t *pool); 3642251881Speter 3643251881Speter 3644251881Speter/** 3645251881Speter * Similar to svn_client_merge2(), but with @a merge_options set to NULL. 3646251881Speter * 3647251881Speter * @deprecated Provided for backwards compatibility with the 1.3 API. 3648251881Speter */ 3649251881SpeterSVN_DEPRECATED 3650251881Spetersvn_error_t * 3651251881Spetersvn_client_merge(const char *source1, 3652251881Speter const svn_opt_revision_t *revision1, 3653251881Speter const char *source2, 3654251881Speter const svn_opt_revision_t *revision2, 3655251881Speter const char *target_wcpath, 3656251881Speter svn_boolean_t recurse, 3657251881Speter svn_boolean_t ignore_ancestry, 3658251881Speter svn_boolean_t force, 3659251881Speter svn_boolean_t dry_run, 3660251881Speter svn_client_ctx_t *ctx, 3661251881Speter apr_pool_t *pool); 3662251881Speter 3663251881Speter 3664251881Speter/** 3665251881Speter * Perform a reintegration merge of @a source_path_or_url at @a source_peg_revision 3666251881Speter * into @a target_wcpath. 3667251881Speter * @a target_wcpath must be a single-revision, #svn_depth_infinity, 3668251881Speter * pristine, unswitched working copy -- in other words, it must 3669251881Speter * reflect a single revision tree, the "target". The mergeinfo on @a 3670251881Speter * source_path_or_url must reflect that all of the target has been merged into it. 3671251881Speter * Then this behaves like a merge with svn_client_merge5() from the 3672251881Speter * target's URL to the source. 3673251881Speter * 3674251881Speter * All other options are handled identically to svn_client_merge5(). 3675251881Speter * The depth of the merge is always #svn_depth_infinity. 3676251881Speter * 3677251881Speter * @since New in 1.5. 3678251881Speter * @deprecated Provided for backwards compatibility with the 1.7 API. 3679251881Speter */ 3680251881SpeterSVN_DEPRECATED 3681251881Spetersvn_error_t * 3682251881Spetersvn_client_merge_reintegrate(const char *source_path_or_url, 3683251881Speter const svn_opt_revision_t *source_peg_revision, 3684251881Speter const char *target_wcpath, 3685251881Speter svn_boolean_t dry_run, 3686251881Speter const apr_array_header_t *merge_options, 3687251881Speter svn_client_ctx_t *ctx, 3688251881Speter apr_pool_t *pool); 3689251881Speter 3690251881Speter/** 3691251881Speter * Merge changes from the source branch identified by 3692251881Speter * @a source_path_or_url in peg revision @a source_peg_revision, 3693251881Speter * into the target branch working copy at @a target_wcpath. 3694251881Speter * 3695251881Speter * If @a ranges_to_merge is NULL then perform an automatic merge of 3696251881Speter * all the eligible changes up to @a source_peg_revision. If the merge 3697251881Speter * required is a reintegrate merge, then return an error if the WC has 3698251881Speter * mixed revisions, local modifications and/or switched subtrees; if 3699251881Speter * the merge is determined to be of the non-reintegrate kind, then 3700251881Speter * return an error if @a allow_mixed_rev is false and the WC contains 3701251881Speter * mixed revisions. 3702251881Speter * 3703251881Speter * If @a ranges_to_merge is not NULL then merge the changes specified 3704251881Speter * by the revision ranges in @a ranges_to_merge, or, when honouring 3705251881Speter * mergeinfo, only the eligible parts of those revision ranges. 3706251881Speter * @a ranges_to_merge is an array of <tt>svn_opt_revision_range_t 3707251881Speter * *</tt> ranges. These ranges may describe additive and/or 3708251881Speter * subtractive merge ranges, they may overlap fully or partially, 3709251881Speter * and/or they may partially or fully negate each other. This 3710251881Speter * rangelist is not required to be sorted. If any revision in the 3711251881Speter * list of provided ranges has an `unspecified' or unrecognized 3712251881Speter * `kind', return #SVN_ERR_CLIENT_BAD_REVISION. 3713251881Speter * 3714251881Speter * If @a ranges_to_merge is an empty array, then do nothing. 3715251881Speter * 3716251881Speter * All other options are handled identically to svn_client_merge5(). 3717251881Speter * 3718251881Speter * @since New in 1.8. 3719251881Speter */ 3720251881Spetersvn_error_t * 3721251881Spetersvn_client_merge_peg5(const char *source_path_or_url, 3722251881Speter const apr_array_header_t *ranges_to_merge, 3723251881Speter const svn_opt_revision_t *source_peg_revision, 3724251881Speter const char *target_wcpath, 3725251881Speter svn_depth_t depth, 3726251881Speter svn_boolean_t ignore_mergeinfo, 3727251881Speter svn_boolean_t diff_ignore_ancestry, 3728251881Speter svn_boolean_t force_delete, 3729251881Speter svn_boolean_t record_only, 3730251881Speter svn_boolean_t dry_run, 3731251881Speter svn_boolean_t allow_mixed_rev, 3732251881Speter const apr_array_header_t *merge_options, 3733251881Speter svn_client_ctx_t *ctx, 3734251881Speter apr_pool_t *pool); 3735251881Speter 3736251881Speter/** 3737251881Speter * Similar to svn_client_merge_peg5(), but automatic merge is not available 3738251881Speter * (@a ranges_to_merge must not be NULL), and the single @a ignore_ancestry 3739251881Speter * parameter maps to both @c ignore_mergeinfo and @c diff_ignore_ancestry. 3740251881Speter * 3741251881Speter * @deprecated Provided for backward compatibility with the 1.7 API. 3742251881Speter * @since New in 1.7. 3743251881Speter */ 3744251881SpeterSVN_DEPRECATED 3745251881Spetersvn_error_t * 3746251881Spetersvn_client_merge_peg4(const char *source_path_or_url, 3747251881Speter const apr_array_header_t *ranges_to_merge, 3748251881Speter const svn_opt_revision_t *source_peg_revision, 3749251881Speter const char *target_wcpath, 3750251881Speter svn_depth_t depth, 3751251881Speter svn_boolean_t ignore_ancestry, 3752251881Speter svn_boolean_t force_delete, 3753251881Speter svn_boolean_t record_only, 3754251881Speter svn_boolean_t dry_run, 3755251881Speter svn_boolean_t allow_mixed_rev, 3756251881Speter const apr_array_header_t *merge_options, 3757251881Speter svn_client_ctx_t *ctx, 3758251881Speter apr_pool_t *pool); 3759251881Speter 3760251881Speter/** 3761251881Speter * Similar to svn_client_merge_peg4(), but with @a allow_mixed_rev set to 3762251881Speter * @c TRUE. The @a force parameter maps to the @c force_delete parameter 3763251881Speter * of svn_client_merge_peg4(). 3764251881Speter * 3765251881Speter * @deprecated Provided for backward compatibility with the 1.6 API. 3766251881Speter * 3767251881Speter * @since New in 1.5. 3768251881Speter */ 3769251881SpeterSVN_DEPRECATED 3770251881Spetersvn_error_t * 3771251881Spetersvn_client_merge_peg3(const char *source, 3772251881Speter const apr_array_header_t *ranges_to_merge, 3773251881Speter const svn_opt_revision_t *peg_revision, 3774251881Speter const char *target_wcpath, 3775251881Speter svn_depth_t depth, 3776251881Speter svn_boolean_t ignore_ancestry, 3777251881Speter svn_boolean_t force, 3778251881Speter svn_boolean_t record_only, 3779251881Speter svn_boolean_t dry_run, 3780251881Speter const apr_array_header_t *merge_options, 3781251881Speter svn_client_ctx_t *ctx, 3782251881Speter apr_pool_t *pool); 3783251881Speter 3784251881Speter/** 3785251881Speter * Similar to svn_client_merge_peg3(), but with @a record_only set to 3786251881Speter * @c FALSE, and @a depth set according to @a recurse: if @a recurse 3787251881Speter * is TRUE, set @a depth to #svn_depth_infinity, if @a recurse is 3788251881Speter * FALSE, set @a depth to #svn_depth_files. 3789251881Speter * 3790251881Speter * @deprecated Provided for backwards compatibility with the 1.4 API. 3791251881Speter * 3792251881Speter * @since New in 1.4. 3793251881Speter */ 3794251881SpeterSVN_DEPRECATED 3795251881Spetersvn_error_t * 3796251881Spetersvn_client_merge_peg2(const char *source, 3797251881Speter const svn_opt_revision_t *revision1, 3798251881Speter const svn_opt_revision_t *revision2, 3799251881Speter const svn_opt_revision_t *peg_revision, 3800251881Speter const char *target_wcpath, 3801251881Speter svn_boolean_t recurse, 3802251881Speter svn_boolean_t ignore_ancestry, 3803251881Speter svn_boolean_t force, 3804251881Speter svn_boolean_t dry_run, 3805251881Speter const apr_array_header_t *merge_options, 3806251881Speter svn_client_ctx_t *ctx, 3807251881Speter apr_pool_t *pool); 3808251881Speter 3809251881Speter/** 3810251881Speter * Similar to svn_client_merge_peg2(), but with @a merge_options set to 3811251881Speter * NULL. 3812251881Speter * 3813251881Speter * @deprecated Provided for backwards compatibility with the 1.3 API. 3814251881Speter * 3815251881Speter * @since New in 1.1. 3816251881Speter */ 3817251881SpeterSVN_DEPRECATED 3818251881Spetersvn_error_t * 3819251881Spetersvn_client_merge_peg(const char *source, 3820251881Speter const svn_opt_revision_t *revision1, 3821251881Speter const svn_opt_revision_t *revision2, 3822251881Speter const svn_opt_revision_t *peg_revision, 3823251881Speter const char *target_wcpath, 3824251881Speter svn_boolean_t recurse, 3825251881Speter svn_boolean_t ignore_ancestry, 3826251881Speter svn_boolean_t force, 3827251881Speter svn_boolean_t dry_run, 3828251881Speter svn_client_ctx_t *ctx, 3829251881Speter apr_pool_t *pool); 3830251881Speter 3831251881Speter 3832251881Speter/** Set @a suggestions to an ordered array of @c const char * 3833251881Speter * potential merge sources (expressed as full repository URLs) for @a 3834251881Speter * path_or_url at @a peg_revision. @a path_or_url is a working copy 3835251881Speter * path or repository URL. @a ctx is a context used for 3836251881Speter * authentication in the repository case. Use @a pool for all 3837251881Speter * allocations. 3838251881Speter * 3839251881Speter * @since New in 1.5. 3840251881Speter */ 3841251881Spetersvn_error_t * 3842251881Spetersvn_client_suggest_merge_sources(apr_array_header_t **suggestions, 3843251881Speter const char *path_or_url, 3844251881Speter const svn_opt_revision_t *peg_revision, 3845251881Speter svn_client_ctx_t *ctx, 3846251881Speter apr_pool_t *pool); 3847251881Speter 3848251881Speter 3849251881Speter/** 3850251881Speter * Get the mergeinfo for a single target node (ignoring any subtrees). 3851251881Speter * 3852251881Speter * Set @a *mergeinfo to a hash mapping <tt>const char *</tt> merge source 3853251881Speter * URLs to <tt>svn_rangelist_t *</tt> rangelists describing the ranges which 3854251881Speter * have been merged into @a path_or_url as of @a peg_revision, per 3855251881Speter * @a path_or_url's explicit mergeinfo or inherited mergeinfo if no 3856251881Speter * explicit mergeinfo if found. If no explicit or inherited mergeinfo 3857251881Speter * is found, then set @a *mergeinfo to NULL. 3858251881Speter * 3859251881Speter * Use @a pool for all necessary allocations. 3860251881Speter * 3861251881Speter * If the server doesn't support retrieval of mergeinfo (which will 3862251881Speter * never happen for file:// URLs), return an 3863251881Speter * #SVN_ERR_UNSUPPORTED_FEATURE error. 3864251881Speter * 3865251881Speter * @note Unlike most APIs which deal with mergeinfo, this one returns 3866251881Speter * data where the keys of the hash are absolute repository URLs rather 3867251881Speter * than repository filesystem paths. 3868251881Speter * 3869251881Speter * @since New in 1.5. 3870251881Speter */ 3871251881Spetersvn_error_t * 3872251881Spetersvn_client_mergeinfo_get_merged(apr_hash_t **mergeinfo, 3873251881Speter const char *path_or_url, 3874251881Speter const svn_opt_revision_t *peg_revision, 3875251881Speter svn_client_ctx_t *ctx, 3876251881Speter apr_pool_t *pool); 3877251881Speter 3878251881Speter 3879251881Speter/** 3880251881Speter * Describe the revisions that either have or have not been merged from 3881251881Speter * one source branch (or subtree) into another. 3882251881Speter * 3883251881Speter * If @a finding_merged is TRUE, then drive log entry callbacks 3884251881Speter * @a receiver / @a receiver_baton with the revisions merged from 3885251881Speter * @a source_path_or_url (as of @a source_peg_revision) into 3886251881Speter * @a target_path_or_url (as of @a target_peg_revision). If @a 3887251881Speter * finding_merged is FALSE then find the revisions eligible for merging. 3888251881Speter * 3889251881Speter * If both @a source_start_revision and @a source_end_revision are 3890251881Speter * unspecified (that is, of kind @c svn_opt_revision_unspecified), 3891251881Speter * @a receiver will be called the requested revisions from 0 to 3892251881Speter * @a source_peg_revision and in that order (that is, oldest to 3893251881Speter * youngest). Otherwise, both @a source_start_revision and 3894251881Speter * @a source_end_revision must be specified, which has two effects: 3895251881Speter * 3896251881Speter * - @a receiver will be called only with revisions which fall 3897251881Speter * within range of @a source_start_revision to 3898251881Speter * @a source_end_revision, inclusive, and 3899251881Speter * 3900251881Speter * - those revisions will be ordered in the same "direction" as the 3901251881Speter * walk from @a source_start_revision to @a source_end_revision. 3902251881Speter * (If @a source_start_revision is the younger of the two, @a 3903251881Speter * receiver will be called with revisions in youngest-to-oldest 3904251881Speter * order; otherwise, the reverse occurs.) 3905251881Speter * 3906251881Speter * If @a depth is #svn_depth_empty consider only the explicit or 3907251881Speter * inherited mergeinfo on @a target_path_or_url when calculating merged 3908251881Speter * revisions from @a source_path_or_url. If @a depth is #svn_depth_infinity 3909251881Speter * then also consider the explicit subtree mergeinfo under @a 3910251881Speter * target_path_or_url. 3911251881Speter * If a depth other than #svn_depth_empty or #svn_depth_infinity is 3912251881Speter * requested then return a #SVN_ERR_UNSUPPORTED_FEATURE error. 3913251881Speter * 3914251881Speter * @a discover_changed_paths and @a revprops are the same as for 3915251881Speter * svn_client_log5(). Use @a scratch_pool for all temporary allocations. 3916251881Speter * 3917251881Speter * @a ctx is a context used for authentication. 3918251881Speter * 3919251881Speter * If the server doesn't support retrieval of mergeinfo, return an 3920251881Speter * #SVN_ERR_UNSUPPORTED_FEATURE error. 3921251881Speter * 3922251881Speter * @since New in 1.8. 3923251881Speter */ 3924251881Spetersvn_error_t * 3925251881Spetersvn_client_mergeinfo_log2(svn_boolean_t finding_merged, 3926251881Speter const char *target_path_or_url, 3927251881Speter const svn_opt_revision_t *target_peg_revision, 3928251881Speter const char *source_path_or_url, 3929251881Speter const svn_opt_revision_t *source_peg_revision, 3930251881Speter const svn_opt_revision_t *source_start_revision, 3931251881Speter const svn_opt_revision_t *source_end_revision, 3932251881Speter svn_log_entry_receiver_t receiver, 3933251881Speter void *receiver_baton, 3934251881Speter svn_boolean_t discover_changed_paths, 3935251881Speter svn_depth_t depth, 3936251881Speter const apr_array_header_t *revprops, 3937251881Speter svn_client_ctx_t *ctx, 3938251881Speter apr_pool_t *scratch_pool); 3939251881Speter 3940251881Speter/** 3941251881Speter * Similar to svn_client_mergeinfo_log2(), but with @a source_start_revision 3942251881Speter * and @a source_end_revision always of kind @c svn_opt_revision_unspecified; 3943251881Speter * 3944251881Speter * @deprecated Provided for backwards compatibility with the 1.7 API. 3945251881Speter * @since New in 1.7. 3946251881Speter */ 3947251881SpeterSVN_DEPRECATED 3948251881Spetersvn_error_t * 3949251881Spetersvn_client_mergeinfo_log(svn_boolean_t finding_merged, 3950251881Speter const char *target_path_or_url, 3951251881Speter const svn_opt_revision_t *target_peg_revision, 3952251881Speter const char *source_path_or_url, 3953251881Speter const svn_opt_revision_t *source_peg_revision, 3954251881Speter svn_log_entry_receiver_t receiver, 3955251881Speter void *receiver_baton, 3956251881Speter svn_boolean_t discover_changed_paths, 3957251881Speter svn_depth_t depth, 3958251881Speter const apr_array_header_t *revprops, 3959251881Speter svn_client_ctx_t *ctx, 3960251881Speter apr_pool_t *scratch_pool); 3961251881Speter 3962251881Speter/** 3963251881Speter * Similar to svn_client_mergeinfo_log(), but finds only merged revisions 3964251881Speter * and always operates at @a depth #svn_depth_empty. 3965251881Speter * 3966251881Speter * @deprecated Provided for backwards compatibility with the 1.6 API. Use 3967251881Speter * svn_client_mergeinfo_log() instead. 3968251881Speter * @since New in 1.5. 3969251881Speter */ 3970251881SpeterSVN_DEPRECATED 3971251881Spetersvn_error_t * 3972251881Spetersvn_client_mergeinfo_log_merged(const char *path_or_url, 3973251881Speter const svn_opt_revision_t *peg_revision, 3974251881Speter const char *merge_source_path_or_url, 3975251881Speter const svn_opt_revision_t *src_peg_revision, 3976251881Speter svn_log_entry_receiver_t receiver, 3977251881Speter void *receiver_baton, 3978251881Speter svn_boolean_t discover_changed_paths, 3979251881Speter const apr_array_header_t *revprops, 3980251881Speter svn_client_ctx_t *ctx, 3981251881Speter apr_pool_t *pool); 3982251881Speter 3983251881Speter/** 3984251881Speter * Similar to svn_client_mergeinfo_log(), but finds only eligible revisions 3985251881Speter * and always operates at @a depth #svn_depth_empty. 3986251881Speter * 3987251881Speter * @deprecated Provided for backwards compatibility with the 1.6 API. Use 3988251881Speter * svn_client_mergeinfo_log() instead. 3989251881Speter * @since New in 1.5. 3990251881Speter */ 3991251881SpeterSVN_DEPRECATED 3992251881Spetersvn_error_t * 3993251881Spetersvn_client_mergeinfo_log_eligible(const char *path_or_url, 3994251881Speter const svn_opt_revision_t *peg_revision, 3995251881Speter const char *merge_source_path_or_url, 3996251881Speter const svn_opt_revision_t *src_peg_revision, 3997251881Speter svn_log_entry_receiver_t receiver, 3998251881Speter void *receiver_baton, 3999251881Speter svn_boolean_t discover_changed_paths, 4000251881Speter const apr_array_header_t *revprops, 4001251881Speter svn_client_ctx_t *ctx, 4002251881Speter apr_pool_t *pool); 4003251881Speter 4004251881Speter/** @} */ 4005251881Speter 4006251881Speter/** 4007251881Speter * @defgroup Cleanup Cleanup an abnormally terminated working copy. 4008251881Speter * 4009251881Speter * @{ 4010251881Speter */ 4011251881Speter 4012251881Speter/** Recursively cleanup a working copy directory @a dir, finishing any 4013251881Speter * incomplete operations, removing lockfiles, etc. 4014251881Speter * 4015251881Speter * If @a ctx->cancel_func is non-NULL, invoke it with @a 4016251881Speter * ctx->cancel_baton at various points during the operation. If it 4017251881Speter * returns an error (typically #SVN_ERR_CANCELLED), return that error 4018251881Speter * immediately. 4019251881Speter * 4020251881Speter * Use @a scratch_pool for any temporary allocations. 4021251881Speter */ 4022251881Spetersvn_error_t * 4023251881Spetersvn_client_cleanup(const char *dir, 4024251881Speter svn_client_ctx_t *ctx, 4025251881Speter apr_pool_t *scratch_pool); 4026251881Speter 4027251881Speter 4028251881Speter/** @} */ 4029251881Speter 4030251881Speter/** 4031251881Speter * @defgroup Upgrade Upgrade a working copy. 4032251881Speter * 4033251881Speter * @{ 4034251881Speter */ 4035251881Speter 4036251881Speter/** Recursively upgrade a working copy from any older format to the current 4037251881Speter * WC metadata storage format. @a wcroot_dir is the path to the WC root. 4038251881Speter * 4039251881Speter * Use @a scratch_pool for any temporary allocations. 4040251881Speter * 4041251881Speter * @since New in 1.7. 4042251881Speter */ 4043251881Spetersvn_error_t * 4044251881Spetersvn_client_upgrade(const char *wcroot_dir, 4045251881Speter svn_client_ctx_t *ctx, 4046251881Speter apr_pool_t *scratch_pool); 4047251881Speter 4048251881Speter 4049251881Speter/** @} */ 4050251881Speter 4051251881Speter/** 4052251881Speter * @defgroup Relocate Switch a working copy to a different repository. 4053251881Speter * 4054251881Speter * @{ 4055251881Speter */ 4056251881Speter 4057251881Speter/** 4058251881Speter * Recursively modify a working copy rooted at @a wcroot_dir, changing 4059251881Speter * any repository URLs that begin with @a from_prefix to begin with @a 4060251881Speter * to_prefix instead. 4061251881Speter * 4062251881Speter * @param wcroot_dir Working copy root directory 4063251881Speter * @param from_prefix Original URL 4064251881Speter * @param to_prefix New URL 4065251881Speter * @param ignore_externals If not set, recurse into external working 4066251881Speter * copies after relocating the primary working copy 4067251881Speter * @param ctx svn_client_ctx_t 4068251881Speter * @param pool The pool from which to perform memory allocations 4069251881Speter * 4070251881Speter * @since New in 1.7 4071251881Speter */ 4072251881Spetersvn_error_t * 4073251881Spetersvn_client_relocate2(const char *wcroot_dir, 4074251881Speter const char *from_prefix, 4075251881Speter const char *to_prefix, 4076251881Speter svn_boolean_t ignore_externals, 4077251881Speter svn_client_ctx_t *ctx, 4078251881Speter apr_pool_t *pool); 4079251881Speter 4080251881Speter/** 4081251881Speter * Similar to svn_client_relocate2(), but with @a ignore_externals 4082251881Speter * always TRUE. 4083251881Speter * 4084251881Speter * @note As of the 1.7 API, @a dir is required to be a working copy 4085251881Speter * root directory, and @a recurse is required to be TRUE. 4086251881Speter * 4087251881Speter * @deprecated Provided for limited backwards compatibility with the 4088251881Speter * 1.6 API. 4089251881Speter */ 4090251881SpeterSVN_DEPRECATED 4091251881Spetersvn_error_t * 4092251881Spetersvn_client_relocate(const char *dir, 4093251881Speter const char *from_prefix, 4094251881Speter const char *to_prefix, 4095251881Speter svn_boolean_t recurse, 4096251881Speter svn_client_ctx_t *ctx, 4097251881Speter apr_pool_t *pool); 4098251881Speter 4099251881Speter/** @} */ 4100251881Speter 4101251881Speter/** 4102251881Speter * @defgroup Revert Remove local changes in a repository. 4103251881Speter * 4104251881Speter * @{ 4105251881Speter */ 4106251881Speter 4107251881Speter/** 4108251881Speter * Restore the pristine version of working copy @a paths, 4109251881Speter * effectively undoing any local mods. For each path in @a paths, 4110251881Speter * revert it if it is a file. Else if it is a directory, revert 4111251881Speter * according to @a depth: 4112251881Speter * 4113251881Speter * @a paths is an array of (const char *) local WC paths. 4114251881Speter * 4115251881Speter * If @a depth is #svn_depth_empty, revert just the properties on 4116251881Speter * the directory; else if #svn_depth_files, revert the properties 4117251881Speter * and any files immediately under the directory; else if 4118251881Speter * #svn_depth_immediates, revert all of the preceding plus 4119251881Speter * properties on immediate subdirectories; else if #svn_depth_infinity, 4120251881Speter * revert path and everything under it fully recursively. 4121251881Speter * 4122251881Speter * @a changelists is an array of <tt>const char *</tt> changelist 4123251881Speter * names, used as a restrictive filter on items reverted; that is, 4124251881Speter * don't revert any item unless it's a member of one of those 4125251881Speter * changelists. If @a changelists is empty (or altogether @c NULL), 4126251881Speter * no changelist filtering occurs. 4127251881Speter * 4128251881Speter * If @a ctx->notify_func2 is non-NULL, then for each item reverted, 4129251881Speter * call @a ctx->notify_func2 with @a ctx->notify_baton2 and the path of 4130251881Speter * the reverted item. 4131251881Speter * 4132251881Speter * If an item specified for reversion is not under version control, 4133251881Speter * then do not error, just invoke @a ctx->notify_func2 with @a 4134251881Speter * ctx->notify_baton2, using notification code #svn_wc_notify_skip. 4135251881Speter * 4136251881Speter * @since New in 1.5. 4137251881Speter */ 4138251881Spetersvn_error_t * 4139251881Spetersvn_client_revert2(const apr_array_header_t *paths, 4140251881Speter svn_depth_t depth, 4141251881Speter const apr_array_header_t *changelists, 4142251881Speter svn_client_ctx_t *ctx, 4143251881Speter apr_pool_t *pool); 4144251881Speter 4145251881Speter 4146251881Speter/** 4147251881Speter * Similar to svn_client_revert2(), but with @a changelists passed as 4148251881Speter * @c NULL, and @a depth set according to @a recurse: if @a recurse is 4149251881Speter * TRUE, @a depth is #svn_depth_infinity, else if @a recurse is 4150251881Speter * FALSE, @a depth is #svn_depth_empty. 4151251881Speter * 4152251881Speter * @note Most APIs map @a recurse==FALSE to @a depth==svn_depth_files; 4153251881Speter * revert is deliberately different. 4154251881Speter * 4155251881Speter * @deprecated Provided for backwards compatibility with the 1.0 API. 4156251881Speter */ 4157251881SpeterSVN_DEPRECATED 4158251881Spetersvn_error_t * 4159251881Spetersvn_client_revert(const apr_array_header_t *paths, 4160251881Speter svn_boolean_t recursive, 4161251881Speter svn_client_ctx_t *ctx, 4162251881Speter apr_pool_t *pool); 4163251881Speter 4164251881Speter 4165251881Speter/** @} */ 4166251881Speter 4167251881Speter/** 4168251881Speter * @defgroup Resolved Mark conflicted paths as resolved. 4169251881Speter * 4170251881Speter * @{ 4171251881Speter */ 4172251881Speter 4173251881Speter/** 4174251881Speter * Similar to svn_client_resolve(), but without automatic conflict 4175251881Speter * resolution support. 4176251881Speter * 4177251881Speter * @deprecated Provided for backward compatibility with the 1.4 API. 4178251881Speter * Use svn_client_resolve() with @a conflict_choice == @c 4179251881Speter * svn_wc_conflict_choose_merged instead. 4180251881Speter */ 4181251881SpeterSVN_DEPRECATED 4182251881Spetersvn_error_t * 4183251881Spetersvn_client_resolved(const char *path, 4184251881Speter svn_boolean_t recursive, 4185251881Speter svn_client_ctx_t *ctx, 4186251881Speter apr_pool_t *pool); 4187251881Speter 4188251881Speter/** Perform automatic conflict resolution on a working copy @a path. 4189251881Speter * 4190251881Speter * If @a conflict_choice is 4191251881Speter * 4192251881Speter * - #svn_wc_conflict_choose_base: 4193251881Speter * resolve the conflict with the old file contents 4194251881Speter * 4195251881Speter * - #svn_wc_conflict_choose_mine_full: 4196251881Speter * use the original working contents 4197251881Speter * 4198251881Speter * - #svn_wc_conflict_choose_theirs_full: 4199251881Speter * use the new contents 4200251881Speter * 4201251881Speter * - #svn_wc_conflict_choose_merged: 4202251881Speter * don't change the contents at all, just remove the conflict 4203251881Speter * status, which is the pre-1.5 behavior. 4204251881Speter * 4205251881Speter * - #svn_wc_conflict_choose_theirs_conflict 4206251881Speter * ###... 4207251881Speter * 4208251881Speter * - #svn_wc_conflict_choose_mine_conflict 4209251881Speter * ###... 4210251881Speter * 4211251881Speter * - svn_wc_conflict_choose_unspecified 4212251881Speter * invoke @a ctx->conflict_func2 with @a ctx->conflict_baton2 to obtain 4213251881Speter * a resolution decision for each conflict. This can be used to 4214251881Speter * implement interactive conflict resolution. 4215251881Speter * 4216251881Speter * #svn_wc_conflict_choose_theirs_conflict and 4217251881Speter * #svn_wc_conflict_choose_mine_conflict are not legal for binary 4218251881Speter * files or properties. 4219251881Speter * 4220251881Speter * If @a path is not in a state of conflict to begin with, do nothing. 4221251881Speter * If @a path's conflict state is removed and @a ctx->notify_func2 is non-NULL, 4222251881Speter * call @a ctx->notify_func2 with @a ctx->notify_baton2 and @a path. 4223251881Speter * ### with what notification parameters? 4224251881Speter * 4225251881Speter * If @a depth is #svn_depth_empty, act only on @a path; if 4226251881Speter * #svn_depth_files, resolve @a path and its conflicted file 4227251881Speter * children (if any); if #svn_depth_immediates, resolve @a path and 4228251881Speter * all its immediate conflicted children (both files and directories, 4229251881Speter * if any); if #svn_depth_infinity, resolve @a path and every 4230251881Speter * conflicted file or directory anywhere beneath it. 4231251881Speter * 4232251881Speter * Note that this operation will try to lock the parent directory of 4233251881Speter * @a path in order to be able to resolve tree-conflicts on @a path. 4234251881Speter * 4235251881Speter * @since New in 1.5. 4236251881Speter */ 4237251881Spetersvn_error_t * 4238251881Spetersvn_client_resolve(const char *path, 4239251881Speter svn_depth_t depth, 4240251881Speter svn_wc_conflict_choice_t conflict_choice, 4241251881Speter svn_client_ctx_t *ctx, 4242251881Speter apr_pool_t *pool); 4243251881Speter 4244251881Speter 4245251881Speter/** @} */ 4246251881Speter 4247251881Speter/** 4248251881Speter * @defgroup Copy Copy paths in the working copy and repository. 4249251881Speter * 4250251881Speter * @{ 4251251881Speter */ 4252251881Speter 4253251881Speter/** 4254251881Speter * A structure which describes the source of a copy operation--its path, 4255251881Speter * revision, and peg revision. 4256251881Speter * 4257251881Speter * @since New in 1.5. 4258251881Speter */ 4259251881Spetertypedef struct svn_client_copy_source_t 4260251881Speter{ 4261251881Speter /** The source path or URL. */ 4262251881Speter const char *path; 4263251881Speter 4264251881Speter /** The source operational revision. */ 4265251881Speter const svn_opt_revision_t *revision; 4266251881Speter 4267251881Speter /** The source peg revision. */ 4268251881Speter const svn_opt_revision_t *peg_revision; 4269251881Speter} svn_client_copy_source_t; 4270251881Speter 4271251881Speter/** Copy each source in @a sources to @a dst_path. 4272251881Speter * 4273251881Speter * If multiple @a sources are given, @a dst_path must be a directory, 4274251881Speter * and @a sources will be copied as children of @a dst_path. 4275251881Speter * 4276251881Speter * @a sources is an array of <tt>svn_client_copy_source_t *</tt> elements, 4277251881Speter * either all referring to local WC items or all referring to versioned 4278251881Speter * items in the repository. 4279251881Speter * 4280251881Speter * If @a sources has only one item, attempt to copy it to @a dst_path. If 4281251881Speter * @a copy_as_child is TRUE and @a dst_path already exists, attempt to copy the 4282251881Speter * item as a child of @a dst_path. If @a copy_as_child is FALSE and 4283251881Speter * @a dst_path already exists, fail with #SVN_ERR_ENTRY_EXISTS if @a dst_path 4284251881Speter * is a working copy path and #SVN_ERR_FS_ALREADY_EXISTS if @a dst_path is a 4285251881Speter * URL. 4286251881Speter * 4287251881Speter * If @a sources has multiple items, and @a copy_as_child is TRUE, all 4288251881Speter * @a sources are copied as children of @a dst_path. If any child of 4289251881Speter * @a dst_path already exists with the same name any item in @a sources, 4290251881Speter * fail with #SVN_ERR_ENTRY_EXISTS if @a dst_path is a working copy path and 4291251881Speter * #SVN_ERR_FS_ALREADY_EXISTS if @a dst_path is a URL. 4292251881Speter * 4293251881Speter * If @a sources has multiple items, and @a copy_as_child is FALSE, fail 4294251881Speter * with #SVN_ERR_CLIENT_MULTIPLE_SOURCES_DISALLOWED. 4295251881Speter * 4296251881Speter * If @a dst_path is a URL, use the authentication baton 4297251881Speter * in @a ctx and @a ctx->log_msg_func3/@a ctx->log_msg_baton3 to immediately 4298251881Speter * attempt to commit the copy action in the repository. 4299251881Speter * 4300251881Speter * If @a dst_path is not a URL, then this is just a variant of 4301251881Speter * svn_client_add(), where the @a sources are scheduled for addition 4302251881Speter * as copies. No changes will happen to the repository until a commit occurs. 4303251881Speter * This scheduling can be removed with svn_client_revert2(). 4304251881Speter * 4305251881Speter * If @a make_parents is TRUE, create any non-existent parent directories 4306251881Speter * also. Otherwise the parent of @a dst_path must already exist. 4307251881Speter * 4308251881Speter * If @a ignore_externals is set, don't process externals definitions 4309251881Speter * as part of this operation. 4310251881Speter * 4311251881Speter * If non-NULL, @a revprop_table is a hash table holding additional, 4312251881Speter * custom revision properties (<tt>const char *</tt> names mapped to 4313251881Speter * <tt>svn_string_t *</tt> values) to be set on the new revision in 4314251881Speter * the event that this is a committing operation. This table cannot 4315251881Speter * contain any standard Subversion properties. 4316251881Speter * 4317251881Speter * @a ctx->log_msg_func3/@a ctx->log_msg_baton3 are a callback/baton combo 4318251881Speter * that this function can use to query for a commit log message when one is 4319251881Speter * needed. 4320251881Speter * 4321251881Speter * If @a ctx->notify_func2 is non-NULL, invoke it with @a ctx->notify_baton2 4322251881Speter * for each item added at the new location, passing the new, relative path of 4323251881Speter * the added item. 4324251881Speter * 4325251881Speter * If @a commit_callback is non-NULL, then for each successful commit, call 4326251881Speter * @a commit_callback with @a commit_baton and a #svn_commit_info_t for 4327251881Speter * the commit. 4328251881Speter * 4329251881Speter * @since New in 1.7. 4330251881Speter */ 4331251881Spetersvn_error_t * 4332251881Spetersvn_client_copy6(const apr_array_header_t *sources, 4333251881Speter const char *dst_path, 4334251881Speter svn_boolean_t copy_as_child, 4335251881Speter svn_boolean_t make_parents, 4336251881Speter svn_boolean_t ignore_externals, 4337251881Speter const apr_hash_t *revprop_table, 4338251881Speter svn_commit_callback2_t commit_callback, 4339251881Speter void *commit_baton, 4340251881Speter svn_client_ctx_t *ctx, 4341251881Speter apr_pool_t *pool); 4342251881Speter 4343251881Speter/** 4344251881Speter * Similar to svn_client_copy6(), but returns the commit info in 4345251881Speter * @a *commit_info_p rather than through a callback function. 4346251881Speter * 4347251881Speter * @since New in 1.6. 4348251881Speter * @deprecated Provided for backward compatibility with the 1.6 API. 4349251881Speter */ 4350251881SpeterSVN_DEPRECATED 4351251881Spetersvn_error_t * 4352251881Spetersvn_client_copy5(svn_commit_info_t **commit_info_p, 4353251881Speter const apr_array_header_t *sources, 4354251881Speter const char *dst_path, 4355251881Speter svn_boolean_t copy_as_child, 4356251881Speter svn_boolean_t make_parents, 4357251881Speter svn_boolean_t ignore_externals, 4358251881Speter const apr_hash_t *revprop_table, 4359251881Speter svn_client_ctx_t *ctx, 4360251881Speter apr_pool_t *pool); 4361251881Speter 4362251881Speter/** 4363251881Speter * Similar to svn_client_copy5(), with @a ignore_externals set to @c FALSE. 4364251881Speter * 4365251881Speter * @since New in 1.5. 4366251881Speter * 4367251881Speter * @deprecated Provided for backward compatibility with the 1.5 API. 4368251881Speter */ 4369251881SpeterSVN_DEPRECATED 4370251881Spetersvn_error_t * 4371251881Spetersvn_client_copy4(svn_commit_info_t **commit_info_p, 4372251881Speter const apr_array_header_t *sources, 4373251881Speter const char *dst_path, 4374251881Speter svn_boolean_t copy_as_child, 4375251881Speter svn_boolean_t make_parents, 4376251881Speter const apr_hash_t *revprop_table, 4377251881Speter svn_client_ctx_t *ctx, 4378251881Speter apr_pool_t *pool); 4379251881Speter 4380251881Speter/** 4381251881Speter * Similar to svn_client_copy4(), with only one @a src_path, @a 4382251881Speter * copy_as_child set to @c FALSE, @a revprop_table passed as NULL, and 4383251881Speter * @a make_parents set to @c FALSE. Also, use @a src_revision as both 4384251881Speter * the operational and peg revision. 4385251881Speter * 4386251881Speter * @since New in 1.4. 4387251881Speter * 4388251881Speter * @deprecated Provided for backward compatibility with the 1.4 API. 4389251881Speter */ 4390251881SpeterSVN_DEPRECATED 4391251881Spetersvn_error_t * 4392251881Spetersvn_client_copy3(svn_commit_info_t **commit_info_p, 4393251881Speter const char *src_path, 4394251881Speter const svn_opt_revision_t *src_revision, 4395251881Speter const char *dst_path, 4396251881Speter svn_client_ctx_t *ctx, 4397251881Speter apr_pool_t *pool); 4398251881Speter 4399251881Speter 4400251881Speter/** 4401251881Speter * Similar to svn_client_copy3(), with the difference that if @a dst_path 4402251881Speter * already exists and is a directory, copy the item into that directory, 4403251881Speter * keeping its name (the last component of @a src_path). 4404251881Speter * 4405251881Speter * @since New in 1.3. 4406251881Speter * 4407251881Speter * @deprecated Provided for backward compatibility with the 1.3 API. 4408251881Speter */ 4409251881SpeterSVN_DEPRECATED 4410251881Spetersvn_error_t * 4411251881Spetersvn_client_copy2(svn_commit_info_t **commit_info_p, 4412251881Speter const char *src_path, 4413251881Speter const svn_opt_revision_t *src_revision, 4414251881Speter const char *dst_path, 4415251881Speter svn_client_ctx_t *ctx, 4416251881Speter apr_pool_t *pool); 4417251881Speter 4418251881Speter 4419251881Speter/** 4420251881Speter * Similar to svn_client_copy2(), but uses #svn_client_commit_info_t 4421251881Speter * for @a commit_info_p. 4422251881Speter * 4423251881Speter * @deprecated Provided for backward compatibility with the 1.2 API. 4424251881Speter */ 4425251881SpeterSVN_DEPRECATED 4426251881Spetersvn_error_t * 4427251881Spetersvn_client_copy(svn_client_commit_info_t **commit_info_p, 4428251881Speter const char *src_path, 4429251881Speter const svn_opt_revision_t *src_revision, 4430251881Speter const char *dst_path, 4431251881Speter svn_client_ctx_t *ctx, 4432251881Speter apr_pool_t *pool); 4433251881Speter 4434251881Speter 4435251881Speter/** @} */ 4436251881Speter 4437251881Speter/** 4438251881Speter * @defgroup Move Move paths in the working copy or repository. 4439251881Speter * 4440251881Speter * @{ 4441251881Speter */ 4442251881Speter 4443251881Speter/** 4444251881Speter * Move @a src_paths to @a dst_path. 4445251881Speter * 4446251881Speter * @a src_paths is an array of (const char *) paths -- either all WC paths 4447251881Speter * or all URLs -- of versioned items. If multiple @a src_paths are given, 4448251881Speter * @a dst_path must be a directory and @a src_paths will be moved as 4449251881Speter * children of @a dst_path. 4450251881Speter * 4451251881Speter * If @a src_paths are repository URLs: 4452251881Speter * 4453251881Speter * - @a dst_path must also be a repository URL. 4454251881Speter * 4455251881Speter * - The authentication baton in @a ctx and @a ctx->log_msg_func/@a 4456251881Speter * ctx->log_msg_baton are used to commit the move. 4457251881Speter * 4458251881Speter * - The move operation will be immediately committed. 4459251881Speter * 4460251881Speter * If @a src_paths are working copy paths: 4461251881Speter * 4462251881Speter * - @a dst_path must also be a working copy path. 4463251881Speter * 4464251881Speter * - @a ctx->log_msg_func3 and @a ctx->log_msg_baton3 are ignored. 4465251881Speter * 4466251881Speter * - This is a scheduling operation. No changes will happen to the 4467251881Speter * repository until a commit occurs. This scheduling can be removed 4468251881Speter * with svn_client_revert2(). If one of @a src_paths is a file it is 4469251881Speter * removed from the working copy immediately. If one of @a src_path 4470251881Speter * is a directory it will remain in the working copy but all the files, 4471251881Speter * and unversioned items, it contains will be removed. 4472251881Speter * 4473251881Speter * If @a src_paths has only one item, attempt to move it to @a dst_path. If 4474251881Speter * @a move_as_child is TRUE and @a dst_path already exists, attempt to move the 4475251881Speter * item as a child of @a dst_path. If @a move_as_child is FALSE and 4476251881Speter * @a dst_path already exists, fail with #SVN_ERR_ENTRY_EXISTS if @a dst_path 4477251881Speter * is a working copy path and #SVN_ERR_FS_ALREADY_EXISTS if @a dst_path is a 4478251881Speter * URL. 4479251881Speter * 4480251881Speter * If @a src_paths has multiple items, and @a move_as_child is TRUE, all 4481251881Speter * @a src_paths are moved as children of @a dst_path. If any child of 4482251881Speter * @a dst_path already exists with the same name any item in @a src_paths, 4483251881Speter * fail with #SVN_ERR_ENTRY_EXISTS if @a dst_path is a working copy path and 4484251881Speter * #SVN_ERR_FS_ALREADY_EXISTS if @a dst_path is a URL. 4485251881Speter * 4486251881Speter * If @a src_paths has multiple items, and @a move_as_child is FALSE, fail 4487251881Speter * with #SVN_ERR_CLIENT_MULTIPLE_SOURCES_DISALLOWED. 4488251881Speter * 4489251881Speter * If @a make_parents is TRUE, create any non-existent parent directories 4490251881Speter * also. Otherwise, the parent of @a dst_path must already exist. 4491251881Speter * 4492251881Speter * If @a allow_mixed_revisions is @c FALSE, #SVN_ERR_WC_MIXED_REVISIONS 4493251881Speter * will be raised if the move source is a mixed-revision subtree. 4494251881Speter * If @a allow_mixed_revisions is TRUE, a mixed-revision move source is 4495251881Speter * allowed but the move will degrade to a copy and a delete without local 4496251881Speter * move tracking. This parameter should be set to FALSE except where backwards 4497251881Speter * compatibility to svn_client_move6() is required. 4498251881Speter * 4499251881Speter * If @a metadata_only is @c TRUE and moving a file in a working copy, 4500251881Speter * everything in the metadata is updated as if the node is moved, but the 4501251881Speter * actual disk move operation is not performed. This feature is useful for 4502251881Speter * clients that want to keep the working copy in sync while the actual working 4503251881Speter * copy is updated by some other task. 4504251881Speter * 4505251881Speter * If non-NULL, @a revprop_table is a hash table holding additional, 4506251881Speter * custom revision properties (<tt>const char *</tt> names mapped to 4507251881Speter * <tt>svn_string_t *</tt> values) to be set on the new revision in 4508251881Speter * the event that this is a committing operation. This table cannot 4509251881Speter * contain any standard Subversion properties. 4510251881Speter * 4511251881Speter * @a ctx->log_msg_func3/@a ctx->log_msg_baton3 are a callback/baton combo that 4512251881Speter * this function can use to query for a commit log message when one is needed. 4513251881Speter * 4514251881Speter * If @a ctx->notify_func2 is non-NULL, then for each item moved, call 4515251881Speter * @a ctx->notify_func2 with the @a ctx->notify_baton2 twice, once to indicate 4516251881Speter * the deletion of the moved thing, and once to indicate the addition of 4517251881Speter * the new location of the thing. 4518251881Speter * 4519251881Speter * ### Is this really true? What about svn_wc_notify_commit_replaced()? ### 4520251881Speter * 4521251881Speter * If @a commit_callback is non-NULL, then for each successful commit, call 4522251881Speter * @a commit_callback with @a commit_baton and a #svn_commit_info_t for 4523251881Speter * the commit. 4524251881Speter * 4525251881Speter * @since New in 1.8. 4526251881Speter */ 4527251881Spetersvn_error_t * 4528251881Spetersvn_client_move7(const apr_array_header_t *src_paths, 4529251881Speter const char *dst_path, 4530251881Speter svn_boolean_t move_as_child, 4531251881Speter svn_boolean_t make_parents, 4532251881Speter svn_boolean_t allow_mixed_revisions, 4533251881Speter svn_boolean_t metadata_only, 4534251881Speter const apr_hash_t *revprop_table, 4535251881Speter svn_commit_callback2_t commit_callback, 4536251881Speter void *commit_baton, 4537251881Speter svn_client_ctx_t *ctx, 4538251881Speter apr_pool_t *pool); 4539251881Speter 4540251881Speter/** 4541251881Speter * Similar to svn_client_move7(), but with @a allow_mixed_revisions always 4542251881Speter * set to @c TRUE and @a metadata_only always to @c FALSE. 4543251881Speter * 4544251881Speter * @since New in 1.7. 4545251881Speter * @deprecated Provided for backward compatibility with the 1.7 API. 4546251881Speter */ 4547251881SpeterSVN_DEPRECATED 4548251881Spetersvn_error_t * 4549251881Spetersvn_client_move6(const apr_array_header_t *src_paths, 4550251881Speter const char *dst_path, 4551251881Speter svn_boolean_t move_as_child, 4552251881Speter svn_boolean_t make_parents, 4553251881Speter const apr_hash_t *revprop_table, 4554251881Speter svn_commit_callback2_t commit_callback, 4555251881Speter void *commit_baton, 4556251881Speter svn_client_ctx_t *ctx, 4557251881Speter apr_pool_t *pool); 4558251881Speter 4559251881Speter/** 4560251881Speter * Similar to svn_client_move6(), but returns the commit info in 4561251881Speter * @a *commit_info_p rather than through a callback function. 4562251881Speter * 4563251881Speter * A WC-to-WC move will include any modified and/or unversioned children. 4564251881Speter * @a force is ignored. 4565251881Speter * 4566251881Speter * @since New in 1.5. 4567251881Speter * @deprecated Provided for backward compatibility with the 1.6 API. 4568251881Speter */ 4569251881SpeterSVN_DEPRECATED 4570251881Spetersvn_error_t * 4571251881Spetersvn_client_move5(svn_commit_info_t **commit_info_p, 4572251881Speter const apr_array_header_t *src_paths, 4573251881Speter const char *dst_path, 4574251881Speter svn_boolean_t force, 4575251881Speter svn_boolean_t move_as_child, 4576251881Speter svn_boolean_t make_parents, 4577251881Speter const apr_hash_t *revprop_table, 4578251881Speter svn_client_ctx_t *ctx, 4579251881Speter apr_pool_t *pool); 4580251881Speter 4581251881Speter/** 4582251881Speter * Similar to svn_client_move5(), with only one @a src_path, @a 4583251881Speter * move_as_child set to @c FALSE, @a revprop_table passed as NULL, and 4584251881Speter * @a make_parents set to @c FALSE. 4585251881Speter * 4586251881Speter * Note: The behaviour of @a force changed in 1.5 (r860885 and r861421), when 4587251881Speter * the 'move' semantics were improved to just move the source including any 4588251881Speter * modified and/or unversioned items in it. Before that, @a force 4589251881Speter * controlled what happened to such items, but now @a force is ignored. 4590251881Speter * 4591251881Speter * @since New in 1.4. 4592251881Speter * 4593251881Speter * @deprecated Provided for backward compatibility with the 1.4 API. 4594251881Speter */ 4595251881SpeterSVN_DEPRECATED 4596251881Spetersvn_error_t * 4597251881Spetersvn_client_move4(svn_commit_info_t **commit_info_p, 4598251881Speter const char *src_path, 4599251881Speter const char *dst_path, 4600251881Speter svn_boolean_t force, 4601251881Speter svn_client_ctx_t *ctx, 4602251881Speter apr_pool_t *pool); 4603251881Speter 4604251881Speter/** 4605251881Speter * Similar to svn_client_move4(), with the difference that if @a dst_path 4606251881Speter * already exists and is a directory, move the item into that directory, 4607251881Speter * keeping its name (the last component of @a src_path). 4608251881Speter * 4609251881Speter * @since New in 1.3. 4610251881Speter * 4611251881Speter * @deprecated Provided for backward compatibility with the 1.3 API. 4612251881Speter */ 4613251881SpeterSVN_DEPRECATED 4614251881Spetersvn_error_t * 4615251881Spetersvn_client_move3(svn_commit_info_t **commit_info_p, 4616251881Speter const char *src_path, 4617251881Speter const char *dst_path, 4618251881Speter svn_boolean_t force, 4619251881Speter svn_client_ctx_t *ctx, 4620251881Speter apr_pool_t *pool); 4621251881Speter 4622251881Speter/** 4623251881Speter * Similar to svn_client_move3(), but uses #svn_client_commit_info_t 4624251881Speter * for @a commit_info_p. 4625251881Speter * 4626251881Speter * @deprecated Provided for backward compatibility with the 1.2 API. 4627251881Speter * 4628251881Speter * @since New in 1.2. 4629251881Speter */ 4630251881SpeterSVN_DEPRECATED 4631251881Spetersvn_error_t * 4632251881Spetersvn_client_move2(svn_client_commit_info_t **commit_info_p, 4633251881Speter const char *src_path, 4634251881Speter const char *dst_path, 4635251881Speter svn_boolean_t force, 4636251881Speter svn_client_ctx_t *ctx, 4637251881Speter apr_pool_t *pool); 4638251881Speter 4639251881Speter/** 4640251881Speter * Similar to svn_client_move2(), but an extra argument @a src_revision 4641251881Speter * must be passed. This has no effect, but must be of kind 4642251881Speter * #svn_opt_revision_unspecified or #svn_opt_revision_head, 4643251881Speter * otherwise error #SVN_ERR_UNSUPPORTED_FEATURE is returned. 4644251881Speter * 4645251881Speter * @deprecated Provided for backward compatibility with the 1.1 API. 4646251881Speter */ 4647251881SpeterSVN_DEPRECATED 4648251881Spetersvn_error_t * 4649251881Spetersvn_client_move(svn_client_commit_info_t **commit_info_p, 4650251881Speter const char *src_path, 4651251881Speter const svn_opt_revision_t *src_revision, 4652251881Speter const char *dst_path, 4653251881Speter svn_boolean_t force, 4654251881Speter svn_client_ctx_t *ctx, 4655251881Speter apr_pool_t *pool); 4656251881Speter 4657251881Speter/** @} */ 4658251881Speter 4659251881Speter 4660251881Speter/** Properties 4661251881Speter * 4662251881Speter * Note that certain svn-controlled properties must always have their 4663251881Speter * values set and stored in UTF8 with LF line endings. When 4664251881Speter * retrieving these properties, callers must convert the values back 4665251881Speter * to native locale and native line-endings before displaying them to 4666251881Speter * the user. For help with this task, see 4667251881Speter * svn_prop_needs_translation(), svn_subst_translate_string(), and 4668251881Speter * svn_subst_detranslate_string(). 4669251881Speter * 4670251881Speter * @defgroup svn_client_prop_funcs Property functions 4671251881Speter * @{ 4672251881Speter */ 4673251881Speter 4674251881Speter 4675251881Speter/** 4676251881Speter * Set @a propname to @a propval on @a url. A @a propval of @c NULL will 4677251881Speter * delete the property. 4678251881Speter * 4679251881Speter * Immediately attempt to commit the property change in the repository, 4680251881Speter * using the authentication baton in @a ctx and @a 4681251881Speter * ctx->log_msg_func3/@a ctx->log_msg_baton3. 4682251881Speter * 4683251881Speter * If the property has changed on @a url since revision 4684251881Speter * @a base_revision_for_url (which must not be #SVN_INVALID_REVNUM), no 4685251881Speter * change will be made and an error will be returned. 4686251881Speter * 4687251881Speter * If non-NULL, @a revprop_table is a hash table holding additional, 4688251881Speter * custom revision properties (<tt>const char *</tt> names mapped to 4689251881Speter * <tt>svn_string_t *</tt> values) to be set on the new revision. This 4690251881Speter * table cannot contain any standard Subversion properties. 4691251881Speter * 4692251881Speter * If @a commit_callback is non-NULL, then call @a commit_callback with 4693251881Speter * @a commit_baton and a #svn_commit_info_t for the commit. 4694251881Speter * 4695251881Speter * If @a propname is an svn-controlled property (i.e. prefixed with 4696251881Speter * #SVN_PROP_PREFIX), then the caller is responsible for ensuring that 4697251881Speter * the value is UTF8-encoded and uses LF line-endings. 4698251881Speter * 4699251881Speter * If @a skip_checks is TRUE, do no validity checking. But if @a 4700251881Speter * skip_checks is FALSE, and @a propname is not a valid property for @a 4701251881Speter * url, return an error, either #SVN_ERR_ILLEGAL_TARGET (if the property is 4702251881Speter * not appropriate for @a url), or * #SVN_ERR_BAD_MIME_TYPE (if @a propname 4703251881Speter * is "svn:mime-type", but @a propval is not a valid mime-type). 4704251881Speter * 4705251881Speter * Use @a scratch_pool for all memory allocation. 4706251881Speter * 4707251881Speter * @since New in 1.7. 4708251881Speter */ 4709251881Spetersvn_error_t * 4710251881Spetersvn_client_propset_remote(const char *propname, 4711251881Speter const svn_string_t *propval, 4712251881Speter const char *url, 4713251881Speter svn_boolean_t skip_checks, 4714251881Speter svn_revnum_t base_revision_for_url, 4715251881Speter const apr_hash_t *revprop_table, 4716251881Speter svn_commit_callback2_t commit_callback, 4717251881Speter void *commit_baton, 4718251881Speter svn_client_ctx_t *ctx, 4719251881Speter apr_pool_t *scratch_pool); 4720251881Speter 4721251881Speter/** 4722251881Speter * Set @a propname to @a propval on each (const char *) target in @a 4723251881Speter * targets. The targets must be all working copy paths. A @a propval 4724251881Speter * of @c NULL will delete the property. 4725251881Speter * 4726251881Speter * If @a depth is #svn_depth_empty, set the property on each member of 4727251881Speter * @a targets only; if #svn_depth_files, set it on @a targets and their 4728251881Speter * file children (if any); if #svn_depth_immediates, on @a targets and all 4729251881Speter * of their immediate children (both files and directories); if 4730251881Speter * #svn_depth_infinity, on @a targets and everything beneath them. 4731251881Speter * 4732251881Speter * @a changelists is an array of <tt>const char *</tt> changelist 4733251881Speter * names, used as a restrictive filter on items whose properties are 4734251881Speter * set; that is, don't set properties on any item unless it's a member 4735251881Speter * of one of those changelists. If @a changelists is empty (or 4736251881Speter * altogether @c NULL), no changelist filtering occurs. 4737251881Speter * 4738251881Speter * If @a propname is an svn-controlled property (i.e. prefixed with 4739251881Speter * #SVN_PROP_PREFIX), then the caller is responsible for ensuring that 4740251881Speter * the value is UTF8-encoded and uses LF line-endings. 4741251881Speter * 4742251881Speter * If @a skip_checks is TRUE, do no validity checking. But if @a 4743251881Speter * skip_checks is FALSE, and @a propname is not a valid property for @a 4744251881Speter * targets, return an error, either #SVN_ERR_ILLEGAL_TARGET (if the 4745251881Speter * property is not appropriate for @a targets), or 4746251881Speter * #SVN_ERR_BAD_MIME_TYPE (if @a propname is "svn:mime-type", but @a 4747251881Speter * propval is not a valid mime-type). 4748251881Speter * 4749251881Speter * If @a ctx->cancel_func is non-NULL, invoke it passing @a 4750251881Speter * ctx->cancel_baton at various places during the operation. 4751251881Speter * 4752251881Speter * Use @a scratch_pool for all memory allocation. 4753251881Speter * 4754251881Speter * @since New in 1.7. 4755251881Speter */ 4756251881Spetersvn_error_t * 4757251881Spetersvn_client_propset_local(const char *propname, 4758251881Speter const svn_string_t *propval, 4759251881Speter const apr_array_header_t *targets, 4760251881Speter svn_depth_t depth, 4761251881Speter svn_boolean_t skip_checks, 4762251881Speter const apr_array_header_t *changelists, 4763251881Speter svn_client_ctx_t *ctx, 4764251881Speter apr_pool_t *scratch_pool); 4765251881Speter 4766251881Speter/** 4767251881Speter * An amalgamation of svn_client_propset_local() and 4768251881Speter * svn_client_propset_remote() that takes only a single target, and 4769251881Speter * returns the commit info in @a *commit_info_p rather than through a 4770251881Speter * callback function. 4771251881Speter * 4772251881Speter * @since New in 1.5. 4773251881Speter * @deprecated Provided for backward compatibility with the 1.6 API. 4774251881Speter */ 4775251881SpeterSVN_DEPRECATED 4776251881Spetersvn_error_t * 4777251881Spetersvn_client_propset3(svn_commit_info_t **commit_info_p, 4778251881Speter const char *propname, 4779251881Speter const svn_string_t *propval, 4780251881Speter const char *target, 4781251881Speter svn_depth_t depth, 4782251881Speter svn_boolean_t skip_checks, 4783251881Speter svn_revnum_t base_revision_for_url, 4784251881Speter const apr_array_header_t *changelists, 4785251881Speter const apr_hash_t *revprop_table, 4786251881Speter svn_client_ctx_t *ctx, 4787251881Speter apr_pool_t *pool); 4788251881Speter 4789251881Speter/** 4790251881Speter * Like svn_client_propset3(), but with @a base_revision_for_url 4791251881Speter * always #SVN_INVALID_REVNUM; @a commit_info_p always @c NULL; @a 4792251881Speter * changelists always @c NULL; @a revprop_table always @c NULL; and @a 4793251881Speter * depth set according to @a recurse: if @a recurse is TRUE, @a depth 4794251881Speter * is #svn_depth_infinity, else #svn_depth_empty. 4795251881Speter * 4796251881Speter * @deprecated Provided for backward compatibility with the 1.4 API. 4797251881Speter */ 4798251881SpeterSVN_DEPRECATED 4799251881Spetersvn_error_t * 4800251881Spetersvn_client_propset2(const char *propname, 4801251881Speter const svn_string_t *propval, 4802251881Speter const char *target, 4803251881Speter svn_boolean_t recurse, 4804251881Speter svn_boolean_t skip_checks, 4805251881Speter svn_client_ctx_t *ctx, 4806251881Speter apr_pool_t *pool); 4807251881Speter 4808251881Speter/** 4809251881Speter * Like svn_client_propset2(), but with @a skip_checks always FALSE and a 4810251881Speter * newly created @a ctx. 4811251881Speter * 4812251881Speter * @deprecated Provided for backward compatibility with the 1.1 API. 4813251881Speter */ 4814251881SpeterSVN_DEPRECATED 4815251881Spetersvn_error_t * 4816251881Spetersvn_client_propset(const char *propname, 4817251881Speter const svn_string_t *propval, 4818251881Speter const char *target, 4819251881Speter svn_boolean_t recurse, 4820251881Speter apr_pool_t *pool); 4821251881Speter 4822251881Speter/** Set @a propname to @a propval on revision @a revision in the repository 4823251881Speter * represented by @a URL. Use the authentication baton in @a ctx for 4824251881Speter * authentication, and @a pool for all memory allocation. Return the actual 4825251881Speter * rev affected in @a *set_rev. A @a propval of @c NULL will delete the 4826251881Speter * property. 4827251881Speter * 4828251881Speter * If @a original_propval is non-NULL, then just before setting the 4829251881Speter * new value, check that the old value matches @a original_propval; 4830251881Speter * if they do not match, return the error #SVN_ERR_RA_OUT_OF_DATE. 4831251881Speter * This is to help clients support interactive editing of revprops: 4832251881Speter * without this check, the window during which the property may change 4833251881Speter * underneath the user is as wide as the amount of time the user 4834251881Speter * spends editing the property. With this check, the window is 4835251881Speter * reduced to a small, constant amount of time right before we set the 4836251881Speter * new value. (To check that an old value is still non-existent, set 4837251881Speter * @a original_propval->data to NULL, and @a original_propval->len is 4838251881Speter * ignored.) 4839251881Speter * If the server advertises #SVN_RA_CAPABILITY_ATOMIC_REVPROPS, the 4840251881Speter * check of @a original_propval is done atomically. 4841251881Speter * 4842251881Speter * Note: the representation of "property is not set" in @a 4843251881Speter * original_propval differs from the representation in other APIs 4844251881Speter * (such as svn_fs_change_rev_prop2() and svn_ra_change_rev_prop2()). 4845251881Speter * 4846251881Speter * If @a force is TRUE, allow newlines in the author property. 4847251881Speter * 4848251881Speter * If @a propname is an svn-controlled property (i.e. prefixed with 4849251881Speter * #SVN_PROP_PREFIX), then the caller is responsible for ensuring that 4850251881Speter * the value UTF8-encoded and uses LF line-endings. 4851251881Speter * 4852251881Speter * Note that unlike its cousin svn_client_propset3(), this routine 4853251881Speter * doesn't affect the working copy at all; it's a pure network 4854251881Speter * operation that changes an *unversioned* property attached to a 4855251881Speter * revision. This can be used to tweak log messages, dates, authors, 4856251881Speter * and the like. Be careful: it's a lossy operation. 4857251881Speter 4858251881Speter * @a ctx->notify_func2 and @a ctx->notify_baton2 are the notification 4859251881Speter * functions and baton which are called upon successful setting of the 4860251881Speter * property. 4861251881Speter * 4862251881Speter * Also note that unless the administrator creates a 4863251881Speter * pre-revprop-change hook in the repository, this feature will fail. 4864251881Speter * 4865251881Speter * @since New in 1.6. 4866251881Speter */ 4867251881Spetersvn_error_t * 4868251881Spetersvn_client_revprop_set2(const char *propname, 4869251881Speter const svn_string_t *propval, 4870251881Speter const svn_string_t *original_propval, 4871251881Speter const char *URL, 4872251881Speter const svn_opt_revision_t *revision, 4873251881Speter svn_revnum_t *set_rev, 4874251881Speter svn_boolean_t force, 4875251881Speter svn_client_ctx_t *ctx, 4876251881Speter apr_pool_t *pool); 4877251881Speter 4878251881Speter/** 4879251881Speter * Similar to svn_client_revprop_set2(), but with @a original_propval 4880251881Speter * always @c NULL. 4881251881Speter * 4882251881Speter * @deprecated Provided for backward compatibility with the 1.5 API. 4883251881Speter */ 4884251881SpeterSVN_DEPRECATED 4885251881Spetersvn_error_t * 4886251881Spetersvn_client_revprop_set(const char *propname, 4887251881Speter const svn_string_t *propval, 4888251881Speter const char *URL, 4889251881Speter const svn_opt_revision_t *revision, 4890251881Speter svn_revnum_t *set_rev, 4891251881Speter svn_boolean_t force, 4892251881Speter svn_client_ctx_t *ctx, 4893251881Speter apr_pool_t *pool); 4894251881Speter 4895251881Speter/** 4896251881Speter * Set @a *props to a hash table whose keys are absolute paths or URLs 4897251881Speter * of items on which property @a propname is explicitly set, and whose 4898251881Speter * values are <tt>svn_string_t *</tt> representing the property value for 4899251881Speter * @a propname at that path. 4900251881Speter * 4901251881Speter * If @a inherited_props is not @c NULL, then set @a *inherited_props to a 4902251881Speter * depth-first ordered array of #svn_prop_inherited_item_t * structures 4903251881Speter * representing the properties inherited by @a target. If @a target is a 4904251881Speter * working copy path, then properties inherited by @a target as far as the 4905251881Speter * root of the working copy are obtained from the working copy's actual 4906251881Speter * property values. Properties inherited from above the working copy root 4907251881Speter * come from the inherited properties cache. If @a target is a URL, then 4908251881Speter * the inherited properties come from the repository. If @a inherited_props 4909251881Speter * is not @c NULL and no inheritable properties are found, then set 4910251881Speter * @a *inherited_props to an empty array. 4911251881Speter * 4912251881Speter * The #svn_prop_inherited_item_t->path_or_url members of the 4913251881Speter * #svn_prop_inherited_item_t * structures in @a *inherited_props are 4914251881Speter * URLs if @a target is a URL or if @a target is a working copy path but the 4915251881Speter * property represented by the structure is above the working copy root (i.e. 4916251881Speter * the inherited property is from the cache). In all other cases the 4917251881Speter * #svn_prop_inherited_item_t->path_or_url members are absolute working copy 4918251881Speter * paths. 4919251881Speter * 4920251881Speter * Allocate @a *props (including keys and values) and @a *inherited_props 4921251881Speter * (including its elements) in @a result_pool, use @a scratch_pool for 4922251881Speter * temporary allocations. 4923251881Speter * 4924251881Speter * @a target is a WC absolute path or a URL. 4925251881Speter * 4926251881Speter * Don't store any path, not even @a target, if it does not have a 4927251881Speter * property named @a propname. 4928251881Speter * 4929251881Speter * If @a revision->kind is #svn_opt_revision_unspecified, then: get 4930251881Speter * properties from the working copy if @a target is a working copy 4931251881Speter * path, or from the repository head if @a target is a URL. Else get 4932251881Speter * the properties as of @a revision. The actual node revision 4933251881Speter * selected is determined by the path as it exists in @a peg_revision. 4934251881Speter * If @a peg_revision->kind is #svn_opt_revision_unspecified, then 4935251881Speter * it defaults to #svn_opt_revision_head for URLs or 4936251881Speter * #svn_opt_revision_working for WC targets. Use the authentication 4937251881Speter * baton in @a ctx for authentication if contacting the repository. 4938251881Speter * If @a actual_revnum is not @c NULL, the actual revision number used 4939251881Speter * for the fetch is stored in @a *actual_revnum. 4940251881Speter * 4941251881Speter * If @a depth is #svn_depth_empty, fetch the property from 4942251881Speter * @a target only; if #svn_depth_files, fetch from @a target and its 4943251881Speter * file children (if any); if #svn_depth_immediates, from @a target 4944251881Speter * and all of its immediate children (both files and directories); if 4945251881Speter * #svn_depth_infinity, from @a target and everything beneath it. 4946251881Speter * 4947251881Speter * @a changelists is an array of <tt>const char *</tt> changelist 4948251881Speter * names, used as a restrictive filter on items whose properties are 4949251881Speter * gotten; that is, don't get @a propname on any item unless it's a member 4950251881Speter * of one of those changelists. If @a changelists is empty (or 4951251881Speter * altogether @c NULL), no changelist filtering occurs. 4952251881Speter * 4953251881Speter * If error, don't touch @a *props, otherwise @a *props is a hash table 4954251881Speter * even if empty. 4955251881Speter * 4956251881Speter * This function returns SVN_ERR_UNVERSIONED_RESOURCE when it is called on 4957251881Speter * unversioned nodes. 4958251881Speter * 4959251881Speter * @since New in 1.8. 4960251881Speter */ 4961251881Spetersvn_error_t * 4962251881Spetersvn_client_propget5(apr_hash_t **props, 4963251881Speter apr_array_header_t **inherited_props, 4964251881Speter const char *propname, 4965251881Speter const char *target, /* abspath or URL */ 4966251881Speter const svn_opt_revision_t *peg_revision, 4967251881Speter const svn_opt_revision_t *revision, 4968251881Speter svn_revnum_t *actual_revnum, 4969251881Speter svn_depth_t depth, 4970251881Speter const apr_array_header_t *changelists, 4971251881Speter svn_client_ctx_t *ctx, 4972251881Speter apr_pool_t *result_pool, 4973251881Speter apr_pool_t *scratch_pool); 4974251881Speter 4975251881Speter/** 4976251881Speter * Similar to svn_client_propget5 but with @a inherited_props always 4977251881Speter * passed as NULL. 4978251881Speter * 4979251881Speter * @since New in 1.7. 4980251881Speter * @deprecated Provided for backward compatibility with the 1.7 API. 4981251881Speter */ 4982251881SpeterSVN_DEPRECATED 4983251881Spetersvn_error_t * 4984251881Spetersvn_client_propget4(apr_hash_t **props, 4985251881Speter const char *propname, 4986251881Speter const char *target, /* abspath or URL */ 4987251881Speter const svn_opt_revision_t *peg_revision, 4988251881Speter const svn_opt_revision_t *revision, 4989251881Speter svn_revnum_t *actual_revnum, 4990251881Speter svn_depth_t depth, 4991251881Speter const apr_array_header_t *changelists, 4992251881Speter svn_client_ctx_t *ctx, 4993251881Speter apr_pool_t *result_pool, 4994251881Speter apr_pool_t *scratch_pool); 4995251881Speter 4996251881Speter/** 4997251881Speter * Similar to svn_client_propget4(), but with the following change to the 4998251881Speter * output hash keys: keys are `<tt>char *</tt>' paths, prefixed by 4999251881Speter * @a target, which is a working copy path or a URL. 5000251881Speter * 5001251881Speter * This function returns SVN_ERR_ENTRY_NOT_FOUND where svn_client_propget4 5002251881Speter * would return SVN_ERR_UNVERSIONED_RESOURCE. 5003251881Speter * 5004251881Speter * @since New in 1.5. 5005251881Speter * @deprecated Provided for backward compatibility with the 1.6 API. 5006251881Speter */ 5007251881SpeterSVN_DEPRECATED 5008251881Spetersvn_error_t * 5009251881Spetersvn_client_propget3(apr_hash_t **props, 5010251881Speter const char *propname, 5011251881Speter const char *target, 5012251881Speter const svn_opt_revision_t *peg_revision, 5013251881Speter const svn_opt_revision_t *revision, 5014251881Speter svn_revnum_t *actual_revnum, 5015251881Speter svn_depth_t depth, 5016251881Speter const apr_array_header_t *changelists, 5017251881Speter svn_client_ctx_t *ctx, 5018251881Speter apr_pool_t *pool); 5019251881Speter 5020251881Speter/** 5021251881Speter * Similar to svn_client_propget3(), except that @a actual_revnum and 5022251881Speter * @a changelists are always @c NULL, and @a depth is set according to 5023251881Speter * @a recurse: if @a recurse is TRUE, then @a depth is 5024251881Speter * #svn_depth_infinity, else #svn_depth_empty. 5025251881Speter * 5026251881Speter * @deprecated Provided for backward compatibility with the 1.4 API. 5027251881Speter */ 5028251881SpeterSVN_DEPRECATED 5029251881Spetersvn_error_t * 5030251881Spetersvn_client_propget2(apr_hash_t **props, 5031251881Speter const char *propname, 5032251881Speter const char *target, 5033251881Speter const svn_opt_revision_t *peg_revision, 5034251881Speter const svn_opt_revision_t *revision, 5035251881Speter svn_boolean_t recurse, 5036251881Speter svn_client_ctx_t *ctx, 5037251881Speter apr_pool_t *pool); 5038251881Speter 5039251881Speter/** 5040251881Speter * Similar to svn_client_propget2(), except that @a peg_revision is 5041251881Speter * always the same as @a revision. 5042251881Speter * 5043251881Speter * @deprecated Provided for backward compatibility with the 1.1 API. 5044251881Speter */ 5045251881SpeterSVN_DEPRECATED 5046251881Spetersvn_error_t * 5047251881Spetersvn_client_propget(apr_hash_t **props, 5048251881Speter const char *propname, 5049251881Speter const char *target, 5050251881Speter const svn_opt_revision_t *revision, 5051251881Speter svn_boolean_t recurse, 5052251881Speter svn_client_ctx_t *ctx, 5053251881Speter apr_pool_t *pool); 5054251881Speter 5055251881Speter/** Set @a *propval to the value of @a propname on revision @a revision 5056251881Speter * in the repository represented by @a URL. Use the authentication baton 5057251881Speter * in @a ctx for authentication, and @a pool for all memory allocation. 5058251881Speter * Return the actual rev queried in @a *set_rev. 5059251881Speter * 5060251881Speter * Note that unlike its cousin svn_client_propget(), this routine 5061251881Speter * doesn't affect the working copy at all; it's a pure network 5062251881Speter * operation that queries an *unversioned* property attached to a 5063251881Speter * revision. This can query log messages, dates, authors, and the 5064251881Speter * like. 5065251881Speter */ 5066251881Spetersvn_error_t * 5067251881Spetersvn_client_revprop_get(const char *propname, 5068251881Speter svn_string_t **propval, 5069251881Speter const char *URL, 5070251881Speter const svn_opt_revision_t *revision, 5071251881Speter svn_revnum_t *set_rev, 5072251881Speter svn_client_ctx_t *ctx, 5073251881Speter apr_pool_t *pool); 5074251881Speter 5075251881Speter/** 5076251881Speter * Invoke @a receiver with @a receiver_baton to return the regular explicit, and 5077251881Speter * possibly the inherited, properties of @a target, a URL or working copy path. 5078251881Speter * @a receiver will be called for each path encountered. 5079251881Speter * 5080251881Speter * @a target is a WC path or a URL. 5081251881Speter * 5082251881Speter * If @a revision->kind is #svn_opt_revision_unspecified, then get the 5083251881Speter * explicit (and possibly the inherited) properties from the working copy, 5084251881Speter * if @a target is a working copy path, or from the repository head if 5085251881Speter * @a target is a URL. Else get the properties as of @a revision. 5086251881Speter * The actual node revision selected is determined by the path as it exists 5087251881Speter * in @a peg_revision. If @a peg_revision->kind is 5088251881Speter * #svn_opt_revision_unspecified, then it defaults to #svn_opt_revision_head 5089251881Speter * for URLs or #svn_opt_revision_working for WC targets. Use the 5090251881Speter * authentication baton cached in @a ctx for authentication if contacting 5091251881Speter * the repository. 5092251881Speter * 5093251881Speter * If @a depth is #svn_depth_empty, list only the properties of 5094251881Speter * @a target itself. If @a depth is #svn_depth_files, and 5095251881Speter * @a target is a directory, list the properties of @a target 5096251881Speter * and its file entries. If #svn_depth_immediates, list the properties 5097251881Speter * of its immediate file and directory entries. If #svn_depth_infinity, 5098251881Speter * list the properties of its file entries and recurse (with 5099251881Speter * #svn_depth_infinity) on directory entries. #svn_depth_unknown is 5100251881Speter * equivalent to #svn_depth_empty. All other values produce undefined 5101251881Speter * results. 5102251881Speter * 5103251881Speter * @a changelists is an array of <tt>const char *</tt> changelist 5104251881Speter * names, used as a restrictive filter on items whose properties are 5105251881Speter * listed; that is, don't list properties on any item unless it's a member 5106251881Speter * of one of those changelists. If @a changelists is empty (or 5107251881Speter * altogether @c NULL), no changelist filtering occurs. 5108251881Speter * 5109251881Speter * If @a get_target_inherited_props is true, then also return any inherited 5110251881Speter * properties when @a receiver is called for @a target. If @a target is a 5111251881Speter * working copy path, then properties inherited by @a target as far as the 5112251881Speter * root of the working copy are obtained from the working copy's actual 5113251881Speter * property values. Properties inherited from above the working copy 5114251881Speter * root come from the inherited properties cache. If @a target is a URL, 5115251881Speter * then the inherited properties come from the repository. 5116251881Speter * If @a get_target_inherited_props is false, then no inherited properties 5117251881Speter * are returned to @a receiver. 5118251881Speter * 5119251881Speter * If @a target is not found, return the error #SVN_ERR_ENTRY_NOT_FOUND. 5120251881Speter * 5121251881Speter * @since New in 1.8. 5122251881Speter */ 5123251881Spetersvn_error_t * 5124251881Spetersvn_client_proplist4(const char *target, 5125251881Speter const svn_opt_revision_t *peg_revision, 5126251881Speter const svn_opt_revision_t *revision, 5127251881Speter svn_depth_t depth, 5128251881Speter const apr_array_header_t *changelists, 5129251881Speter svn_boolean_t get_target_inherited_props, 5130251881Speter svn_proplist_receiver2_t receiver, 5131251881Speter void *receiver_baton, 5132251881Speter svn_client_ctx_t *ctx, 5133251881Speter apr_pool_t *scratch_pool); 5134251881Speter 5135251881Speter/** 5136251881Speter * Similar to svn_client_proplist4(), except that the @a receiver type 5137251881Speter * is a #svn_proplist_receiver_t, @a get_target_inherited_props is 5138251881Speter * always passed NULL, and there is no separate scratch pool. 5139251881Speter * 5140251881Speter * @since New in 1.5. 5141251881Speter * @deprecated Provided for backward compatibility with the 1.7 API. 5142251881Speter */ 5143251881SpeterSVN_DEPRECATED 5144251881Spetersvn_error_t * 5145251881Spetersvn_client_proplist3(const char *target, 5146251881Speter const svn_opt_revision_t *peg_revision, 5147251881Speter const svn_opt_revision_t *revision, 5148251881Speter svn_depth_t depth, 5149251881Speter const apr_array_header_t *changelists, 5150251881Speter svn_proplist_receiver_t receiver, 5151251881Speter void *receiver_baton, 5152251881Speter svn_client_ctx_t *ctx, 5153251881Speter apr_pool_t *pool); 5154251881Speter 5155251881Speter/** 5156251881Speter * Similar to svn_client_proplist3(), except the properties are 5157251881Speter * returned as an array of #svn_client_proplist_item_t * structures 5158251881Speter * instead of by invoking the receiver function, there's no support 5159251881Speter * for @a changelists filtering, and @a recurse is used instead of a 5160251881Speter * #svn_depth_t parameter (FALSE corresponds to #svn_depth_empty, 5161251881Speter * and TRUE to #svn_depth_infinity). 5162251881Speter * 5163251881Speter * @since New in 1.2. 5164251881Speter * 5165251881Speter * @deprecated Provided for backward compatibility with the 1.4 API. 5166251881Speter */ 5167251881SpeterSVN_DEPRECATED 5168251881Spetersvn_error_t * 5169251881Spetersvn_client_proplist2(apr_array_header_t **props, 5170251881Speter const char *target, 5171251881Speter const svn_opt_revision_t *peg_revision, 5172251881Speter const svn_opt_revision_t *revision, 5173251881Speter svn_boolean_t recurse, 5174251881Speter svn_client_ctx_t *ctx, 5175251881Speter apr_pool_t *pool); 5176251881Speter 5177251881Speter/** 5178251881Speter * Similar to svn_client_proplist2(), except that @a peg_revision is 5179251881Speter * always the same as @a revision. 5180251881Speter * 5181251881Speter * @deprecated Provided for backward compatibility with the 1.1 API. 5182251881Speter */ 5183251881SpeterSVN_DEPRECATED 5184251881Spetersvn_error_t * 5185251881Spetersvn_client_proplist(apr_array_header_t **props, 5186251881Speter const char *target, 5187251881Speter const svn_opt_revision_t *revision, 5188251881Speter svn_boolean_t recurse, 5189251881Speter svn_client_ctx_t *ctx, 5190251881Speter apr_pool_t *pool); 5191251881Speter 5192251881Speter/** Set @a *props to a hash of the revision props attached to @a revision in 5193251881Speter * the repository represented by @a URL. Use the authentication baton cached 5194251881Speter * in @a ctx for authentication, and @a pool for all memory allocation. 5195251881Speter * Return the actual rev queried in @a *set_rev. 5196251881Speter * 5197251881Speter * The allocated hash maps (<tt>const char *</tt>) property names to 5198251881Speter * (#svn_string_t *) property values. 5199251881Speter * 5200251881Speter * Note that unlike its cousin svn_client_proplist(), this routine 5201251881Speter * doesn't read a working copy at all; it's a pure network operation 5202251881Speter * that reads *unversioned* properties attached to a revision. 5203251881Speter */ 5204251881Spetersvn_error_t * 5205251881Spetersvn_client_revprop_list(apr_hash_t **props, 5206251881Speter const char *URL, 5207251881Speter const svn_opt_revision_t *revision, 5208251881Speter svn_revnum_t *set_rev, 5209251881Speter svn_client_ctx_t *ctx, 5210251881Speter apr_pool_t *pool); 5211251881Speter/** @} */ 5212251881Speter 5213251881Speter 5214251881Speter/** 5215251881Speter * @defgroup Export Export a tree from version control. 5216251881Speter * 5217251881Speter * @{ 5218251881Speter */ 5219251881Speter 5220251881Speter/** 5221251881Speter * Export the contents of either a subversion repository or a 5222251881Speter * subversion working copy into a 'clean' directory (meaning a 5223251881Speter * directory with no administrative directories). If @a result_rev 5224251881Speter * is not @c NULL and the path being exported is a repository URL, set 5225251881Speter * @a *result_rev to the value of the revision actually exported (set 5226251881Speter * it to #SVN_INVALID_REVNUM for local exports). 5227251881Speter * 5228251881Speter * @a from_path_or_url is either the path the working copy on disk, or 5229251881Speter * a URL to the repository you wish to export. 5230251881Speter * 5231251881Speter * When exporting a directory, @a to_path is the path to the directory 5232251881Speter * where you wish to create the exported tree; when exporting a file, it 5233251881Speter * is the path of the file that will be created. If @a to_path is the 5234251881Speter * empty path, then the basename of the export file/directory in the repository 5235251881Speter * will be used. If @a to_path represents an existing directory, and a 5236251881Speter * file is being exported, then a file with the that basename will be 5237251881Speter * created under that directory (as with 'copy' operations). 5238251881Speter * 5239251881Speter * @a peg_revision is the revision where the path is first looked up 5240251881Speter * when exporting from a repository. If @a peg_revision->kind is 5241251881Speter * #svn_opt_revision_unspecified, then it defaults to #svn_opt_revision_head 5242251881Speter * for URLs or #svn_opt_revision_working for WC targets. 5243251881Speter * 5244251881Speter * @a revision is the revision that should be exported, which is only used 5245251881Speter * when exporting from a repository. 5246251881Speter * 5247251881Speter * @a peg_revision and @a revision must not be @c NULL. 5248251881Speter * 5249251881Speter * @a ctx->notify_func2 and @a ctx->notify_baton2 are the notification 5250251881Speter * functions and baton which are passed to svn_client_checkout() when 5251251881Speter * exporting from a repository. 5252251881Speter * 5253251881Speter * @a ctx is a context used for authentication in the repository case. 5254251881Speter * 5255251881Speter * @a overwrite if TRUE will cause the export to overwrite files or 5256251881Speter * directories. 5257251881Speter * 5258251881Speter * If @a ignore_externals is set, don't process externals definitions 5259251881Speter * as part of this operation. 5260251881Speter * 5261251881Speter * If @a ignore_keywords is set, don't expand keywords as part of this 5262251881Speter * operation. 5263251881Speter * 5264251881Speter * @a native_eol allows you to override the standard eol marker on the 5265251881Speter * platform you are running on. Can be either "LF", "CR" or "CRLF" or 5266251881Speter * NULL. If NULL will use the standard eol marker. Any other value 5267251881Speter * will cause the #SVN_ERR_IO_UNKNOWN_EOL error to be returned. 5268251881Speter * 5269251881Speter * If @a depth is #svn_depth_infinity, export fully recursively. Else 5270251881Speter * if it is #svn_depth_immediates, export @a from_path_or_url and its 5271251881Speter * immediate children (if any), but with subdirectories empty and at 5272251881Speter * #svn_depth_empty. Else if #svn_depth_files, export @a 5273251881Speter * from_path_or_url and its immediate file children (if any) only. If 5274251881Speter * @a depth is #svn_depth_empty, then export exactly @a 5275251881Speter * from_path_or_url and none of its children. 5276251881Speter * 5277251881Speter * All allocations are done in @a pool. 5278251881Speter * 5279251881Speter * @since New in 1.7. 5280251881Speter */ 5281251881Spetersvn_error_t * 5282251881Spetersvn_client_export5(svn_revnum_t *result_rev, 5283251881Speter const char *from_path_or_url, 5284251881Speter const char *to_path, 5285251881Speter const svn_opt_revision_t *peg_revision, 5286251881Speter const svn_opt_revision_t *revision, 5287251881Speter svn_boolean_t overwrite, 5288251881Speter svn_boolean_t ignore_externals, 5289251881Speter svn_boolean_t ignore_keywords, 5290251881Speter svn_depth_t depth, 5291251881Speter const char *native_eol, 5292251881Speter svn_client_ctx_t *ctx, 5293251881Speter apr_pool_t *pool); 5294251881Speter 5295251881Speter/** 5296251881Speter * Similar to svn_client_export5(), but with @a ignore_keywords set 5297251881Speter * to FALSE. 5298251881Speter * 5299251881Speter * @deprecated Provided for backward compatibility with the 1.6 API. 5300251881Speter * @since New in 1.5. 5301251881Speter */ 5302251881SpeterSVN_DEPRECATED 5303251881Spetersvn_error_t * 5304251881Spetersvn_client_export4(svn_revnum_t *result_rev, 5305251881Speter const char *from_path_or_url, 5306251881Speter const char *to_path, 5307251881Speter const svn_opt_revision_t *peg_revision, 5308251881Speter const svn_opt_revision_t *revision, 5309251881Speter svn_boolean_t overwrite, 5310251881Speter svn_boolean_t ignore_externals, 5311251881Speter svn_depth_t depth, 5312251881Speter const char *native_eol, 5313251881Speter svn_client_ctx_t *ctx, 5314251881Speter apr_pool_t *pool); 5315251881Speter 5316251881Speter 5317251881Speter/** 5318251881Speter * Similar to svn_client_export4(), but with @a depth set according to 5319251881Speter * @a recurse: if @a recurse is TRUE, set @a depth to 5320251881Speter * #svn_depth_infinity, if @a recurse is FALSE, set @a depth to 5321251881Speter * #svn_depth_files. 5322251881Speter * 5323251881Speter * @deprecated Provided for backward compatibility with the 1.4 API. 5324251881Speter * 5325251881Speter * @since New in 1.2. 5326251881Speter */ 5327251881SpeterSVN_DEPRECATED 5328251881Spetersvn_error_t * 5329251881Spetersvn_client_export3(svn_revnum_t *result_rev, 5330251881Speter const char *from_path_or_url, 5331251881Speter const char *to_path, 5332251881Speter const svn_opt_revision_t *peg_revision, 5333251881Speter const svn_opt_revision_t *revision, 5334251881Speter svn_boolean_t overwrite, 5335251881Speter svn_boolean_t ignore_externals, 5336251881Speter svn_boolean_t recurse, 5337251881Speter const char *native_eol, 5338251881Speter svn_client_ctx_t *ctx, 5339251881Speter apr_pool_t *pool); 5340251881Speter 5341251881Speter 5342251881Speter/** 5343251881Speter * Similar to svn_client_export3(), but with @a peg_revision 5344251881Speter * always set to #svn_opt_revision_unspecified, @a overwrite set to 5345251881Speter * the value of @a force, @a ignore_externals always FALSE, and 5346251881Speter * @a recurse always TRUE. 5347251881Speter * 5348251881Speter * @since New in 1.1. 5349251881Speter * @deprecated Provided for backward compatibility with the 1.1 API. 5350251881Speter */ 5351251881SpeterSVN_DEPRECATED 5352251881Spetersvn_error_t * 5353251881Spetersvn_client_export2(svn_revnum_t *result_rev, 5354251881Speter const char *from_path_or_url, 5355251881Speter const char *to_path, 5356251881Speter svn_opt_revision_t *revision, 5357251881Speter svn_boolean_t force, 5358251881Speter const char *native_eol, 5359251881Speter svn_client_ctx_t *ctx, 5360251881Speter apr_pool_t *pool); 5361251881Speter 5362251881Speter 5363251881Speter/** 5364251881Speter * Similar to svn_client_export2(), but with @a native_eol always set 5365251881Speter * to NULL. 5366251881Speter * 5367251881Speter * @deprecated Provided for backward compatibility with the 1.0 API. 5368251881Speter */ 5369251881SpeterSVN_DEPRECATED 5370251881Spetersvn_error_t * 5371251881Spetersvn_client_export(svn_revnum_t *result_rev, 5372251881Speter const char *from_path_or_url, 5373251881Speter const char *to_path, 5374251881Speter svn_opt_revision_t *revision, 5375251881Speter svn_boolean_t force, 5376251881Speter svn_client_ctx_t *ctx, 5377251881Speter apr_pool_t *pool); 5378251881Speter 5379251881Speter/** @} */ 5380251881Speter 5381251881Speter/** 5382251881Speter * @defgroup List List / ls 5383251881Speter * 5384251881Speter * @{ 5385251881Speter */ 5386251881Speter 5387251881Speter/** The type of function invoked by svn_client_list3() to report the details 5388251881Speter * of each directory entry being listed. 5389251881Speter * 5390251881Speter * @a baton is the baton that was passed to the caller. @a path is the 5391251881Speter * entry's path relative to @a abs_path; it is the empty path when reporting 5392251881Speter * the top node of the list operation. @a dirent contains some or all of 5393251881Speter * the directory entry's details, as determined by the caller. @a lock is 5394251881Speter * the entry's lock, if it is locked and if lock information is being 5395251881Speter * reported by the caller; otherwise @a lock is NULL. @a abs_path is the 5396251881Speter * repository path of the top node of the list operation; it is relative to 5397251881Speter * the repository root and begins with "/". 5398251881Speter * 5399251881Speter * If svn_client_list3() was called with @a include_externals set to TRUE, 5400251881Speter * @a external_parent_url and @a external_target will be set. 5401251881Speter * @a external_parent_url is url of the directory which has the 5402251881Speter * externals definitions. @a external_target is the target subdirectory of 5403251881Speter * externals definitions which is relative to the parent directory that holds 5404251881Speter * the external item. 5405251881Speter * 5406251881Speter * If external_parent_url and external_target are defined, the item being 5407251881Speter * listed is part of the external described by external_parent_url and 5408251881Speter * external_target. Else, the item is not part of any external. 5409251881Speter * Moreover, we will never mix items which are part of separate 5410251881Speter * externals, and will always finish listing an external before listing 5411251881Speter * the next one. 5412251881Speter * 5413251881Speter * @a scratch_pool may be used for temporary allocations. 5414251881Speter * 5415251881Speter * @since New in 1.8. 5416251881Speter */ 5417251881Spetertypedef svn_error_t *(*svn_client_list_func2_t)( 5418251881Speter void *baton, 5419251881Speter const char *path, 5420251881Speter const svn_dirent_t *dirent, 5421251881Speter const svn_lock_t *lock, 5422251881Speter const char *abs_path, 5423251881Speter const char *external_parent_url, 5424251881Speter const char *external_target, 5425251881Speter apr_pool_t *scratch_pool); 5426251881Speter 5427251881Speter/** 5428251881Speter * Similar to #svn_client_list_func2_t, but without any information about 5429251881Speter * externals definitions. 5430251881Speter * 5431251881Speter * @deprecated Provided for backward compatibility with the 1.7 API. 5432251881Speter * 5433251881Speter * @since New in 1.4 5434251881Speter * 5435251881Speter * */ 5436251881Spetertypedef svn_error_t *(*svn_client_list_func_t)(void *baton, 5437251881Speter const char *path, 5438251881Speter const svn_dirent_t *dirent, 5439251881Speter const svn_lock_t *lock, 5440251881Speter const char *abs_path, 5441251881Speter apr_pool_t *pool); 5442251881Speter 5443251881Speter/** 5444251881Speter * Report the directory entry, and possibly children, for @a 5445251881Speter * path_or_url at @a revision. The actual node revision selected is 5446251881Speter * determined by the path as it exists in @a peg_revision. If @a 5447251881Speter * peg_revision->kind is #svn_opt_revision_unspecified, then it defaults 5448251881Speter * to #svn_opt_revision_head for URLs or #svn_opt_revision_working 5449251881Speter * for WC targets. 5450251881Speter * 5451251881Speter * Report directory entries by invoking @a list_func/@a baton with @a path 5452251881Speter * relative to @a path_or_url. The dirent for @a path_or_url is reported 5453251881Speter * using an empty @a path. If @a path_or_url is a directory, also report 5454251881Speter * its children. If @a path_or_url is non-existent, return 5455251881Speter * #SVN_ERR_FS_NOT_FOUND. 5456251881Speter * 5457251881Speter * If @a fetch_locks is TRUE, include locks when reporting directory entries. 5458251881Speter * 5459251881Speter * If @a include_externals is TRUE, also list all external items 5460251881Speter * reached by recursion. @a depth value passed to the original list target 5461251881Speter * applies for the externals also. 5462251881Speter * 5463251881Speter * Use @a pool for temporary allocations. 5464251881Speter * 5465251881Speter * Use authentication baton cached in @a ctx to authenticate against the 5466251881Speter * repository. 5467251881Speter * 5468251881Speter * If @a depth is #svn_depth_empty, list just @a path_or_url itself. 5469251881Speter * If @a depth is #svn_depth_files, list @a path_or_url and its file 5470251881Speter * entries. If #svn_depth_immediates, list its immediate file and 5471251881Speter * directory entries. If #svn_depth_infinity, list file entries and 5472251881Speter * recurse (with #svn_depth_infinity) on directory entries. 5473251881Speter * 5474251881Speter * @a dirent_fields controls which fields in the #svn_dirent_t's are 5475251881Speter * filled in. To have them totally filled in use #SVN_DIRENT_ALL, 5476251881Speter * otherwise simply bitwise OR together the combination of @c SVN_DIRENT_ 5477251881Speter * fields you care about. 5478251881Speter * 5479251881Speter * @since New in 1.8. 5480251881Speter */ 5481251881Spetersvn_error_t * 5482251881Spetersvn_client_list3(const char *path_or_url, 5483251881Speter const svn_opt_revision_t *peg_revision, 5484251881Speter const svn_opt_revision_t *revision, 5485251881Speter svn_depth_t depth, 5486251881Speter apr_uint32_t dirent_fields, 5487251881Speter svn_boolean_t fetch_locks, 5488251881Speter svn_boolean_t include_externals, 5489251881Speter svn_client_list_func2_t list_func, 5490251881Speter void *baton, 5491251881Speter svn_client_ctx_t *ctx, 5492251881Speter apr_pool_t *pool); 5493251881Speter 5494251881Speter 5495251881Speter/** Similar to svn_client_list3(), but with @a include_externals set 5496251881Speter * to FALSE, and using a #svn_client_list_func_t as callback. 5497251881Speter * 5498251881Speter * @deprecated Provided for backwards compatibility with the 1.7 API. 5499251881Speter * 5500251881Speter * @since New in 1.5. 5501251881Speter */ 5502251881SpeterSVN_DEPRECATED 5503251881Spetersvn_error_t * 5504251881Spetersvn_client_list2(const char *path_or_url, 5505251881Speter const svn_opt_revision_t *peg_revision, 5506251881Speter const svn_opt_revision_t *revision, 5507251881Speter svn_depth_t depth, 5508251881Speter apr_uint32_t dirent_fields, 5509251881Speter svn_boolean_t fetch_locks, 5510251881Speter svn_client_list_func_t list_func, 5511251881Speter void *baton, 5512251881Speter svn_client_ctx_t *ctx, 5513251881Speter apr_pool_t *pool); 5514251881Speter 5515251881Speter/** 5516251881Speter * Similar to svn_client_list2(), but with @a recurse instead of @a depth. 5517251881Speter * If @a recurse is TRUE, pass #svn_depth_files for @a depth; else 5518251881Speter * pass #svn_depth_infinity. 5519251881Speter * 5520251881Speter * @since New in 1.4. 5521251881Speter * 5522251881Speter * @deprecated Provided for backward compatibility with the 1.4 API. 5523251881Speter */ 5524251881SpeterSVN_DEPRECATED 5525251881Spetersvn_error_t * 5526251881Spetersvn_client_list(const char *path_or_url, 5527251881Speter const svn_opt_revision_t *peg_revision, 5528251881Speter const svn_opt_revision_t *revision, 5529251881Speter svn_boolean_t recurse, 5530251881Speter apr_uint32_t dirent_fields, 5531251881Speter svn_boolean_t fetch_locks, 5532251881Speter svn_client_list_func_t list_func, 5533251881Speter void *baton, 5534251881Speter svn_client_ctx_t *ctx, 5535251881Speter apr_pool_t *pool); 5536251881Speter 5537251881Speter/** 5538251881Speter * Same as svn_client_list(), but always passes #SVN_DIRENT_ALL for 5539251881Speter * the @a dirent_fields argument and returns all information in two 5540251881Speter * hash tables instead of invoking a callback. 5541251881Speter * 5542251881Speter * Set @a *dirents to a newly allocated hash of directory entries. 5543251881Speter * The @a dirents hash maps entry names (<tt>const char *</tt>) to 5544251881Speter * #svn_dirent_t *'s. 5545251881Speter * 5546251881Speter * If @a locks is not @c NULL, set @a *locks to a hash table mapping 5547251881Speter * entry names (<tt>const char *</tt>) to #svn_lock_t *'s. 5548251881Speter * 5549251881Speter * @since New in 1.3. 5550251881Speter * 5551251881Speter * @deprecated Provided for backward compatibility with the 1.3 API. 5552251881Speter * Use svn_client_list2() instead. 5553251881Speter */ 5554251881SpeterSVN_DEPRECATED 5555251881Spetersvn_error_t * 5556251881Spetersvn_client_ls3(apr_hash_t **dirents, 5557251881Speter apr_hash_t **locks, 5558251881Speter const char *path_or_url, 5559251881Speter const svn_opt_revision_t *peg_revision, 5560251881Speter const svn_opt_revision_t *revision, 5561251881Speter svn_boolean_t recurse, 5562251881Speter svn_client_ctx_t *ctx, 5563251881Speter apr_pool_t *pool); 5564251881Speter 5565251881Speter/** 5566251881Speter * Same as svn_client_ls3(), but without the ability to get locks. 5567251881Speter * 5568251881Speter * @since New in 1.2. 5569251881Speter * 5570251881Speter * @deprecated Provided for backward compatibility with the 1.2 API. 5571251881Speter * Use svn_client_list2() instead. 5572251881Speter */ 5573251881SpeterSVN_DEPRECATED 5574251881Spetersvn_error_t * 5575251881Spetersvn_client_ls2(apr_hash_t **dirents, 5576251881Speter const char *path_or_url, 5577251881Speter const svn_opt_revision_t *peg_revision, 5578251881Speter const svn_opt_revision_t *revision, 5579251881Speter svn_boolean_t recurse, 5580251881Speter svn_client_ctx_t *ctx, 5581251881Speter apr_pool_t *pool); 5582251881Speter 5583251881Speter/** 5584251881Speter * Similar to svn_client_ls2() except that @a peg_revision is always 5585251881Speter * the same as @a revision. 5586251881Speter * 5587251881Speter * @deprecated Provided for backward compatibility with the 1.1 API. 5588251881Speter * Use svn_client_list2() instead. 5589251881Speter */ 5590251881SpeterSVN_DEPRECATED 5591251881Spetersvn_error_t * 5592251881Spetersvn_client_ls(apr_hash_t **dirents, 5593251881Speter const char *path_or_url, 5594251881Speter svn_opt_revision_t *revision, 5595251881Speter svn_boolean_t recurse, 5596251881Speter svn_client_ctx_t *ctx, 5597251881Speter apr_pool_t *pool); 5598251881Speter 5599251881Speter 5600251881Speter/** @} */ 5601251881Speter 5602251881Speter/** 5603251881Speter * @defgroup Cat View the contents of a file in the repository. 5604251881Speter * 5605251881Speter * @{ 5606251881Speter */ 5607251881Speter 5608251881Speter/** 5609251881Speter * Output the content of a file. 5610251881Speter * 5611251881Speter * @param[in] out The stream to which the content will be written. 5612251881Speter * @param[in] path_or_url The path or URL of the file. 5613251881Speter * @param[in] peg_revision The peg revision. 5614251881Speter * @param[in] revision The operative revision. 5615251881Speter * @param[in] ctx The standard client context, used for possible 5616251881Speter * authentication. 5617251881Speter * @param[in] pool Used for any temporary allocation. 5618251881Speter * 5619251881Speter * @todo Add an expansion/translation flag? 5620251881Speter * 5621251881Speter * @return A pointer to an #svn_error_t of the type (this list is not 5622251881Speter * exhaustive): <br> 5623251881Speter * An unspecified error if @a revision is of kind 5624251881Speter * #svn_opt_revision_previous (or some other kind that requires 5625251881Speter * a local path), because the desired revision cannot be 5626251881Speter * determined. <br> 5627251881Speter * If no error occurred, return #SVN_NO_ERROR. 5628251881Speter * 5629251881Speter * @since New in 1.2. 5630251881Speter * 5631251881Speter * @see #svn_client_ctx_t <br> @ref clnt_revisions for 5632251881Speter * a discussion of operative and peg revisions. 5633251881Speter */ 5634251881Spetersvn_error_t * 5635251881Spetersvn_client_cat2(svn_stream_t *out, 5636251881Speter const char *path_or_url, 5637251881Speter const svn_opt_revision_t *peg_revision, 5638251881Speter const svn_opt_revision_t *revision, 5639251881Speter svn_client_ctx_t *ctx, 5640251881Speter apr_pool_t *pool); 5641251881Speter 5642251881Speter 5643251881Speter/** 5644251881Speter * Similar to svn_client_cat2() except that the peg revision is always 5645251881Speter * the same as @a revision. 5646251881Speter * 5647251881Speter * @deprecated Provided for backward compatibility with the 1.1 API. 5648251881Speter */ 5649251881SpeterSVN_DEPRECATED 5650251881Spetersvn_error_t * 5651251881Spetersvn_client_cat(svn_stream_t *out, 5652251881Speter const char *path_or_url, 5653251881Speter const svn_opt_revision_t *revision, 5654251881Speter svn_client_ctx_t *ctx, 5655251881Speter apr_pool_t *pool); 5656251881Speter 5657251881Speter/** @} end group: cat */ 5658251881Speter 5659251881Speter 5660251881Speter 5661251881Speter/** Changelist commands 5662251881Speter * 5663251881Speter * @defgroup svn_client_changelist_funcs Client Changelist Functions 5664251881Speter * @{ 5665251881Speter */ 5666251881Speter 5667251881Speter/** Implementation note: 5668251881Speter * 5669251881Speter * For now, changelists are implemented by scattering the 5670251881Speter * associations across multiple .svn/entries files in a working copy. 5671251881Speter * However, this client API was written so that we have the option of 5672251881Speter * changing the underlying implementation -- we may someday want to 5673251881Speter * store changelist definitions in a centralized database. 5674251881Speter */ 5675251881Speter 5676251881Speter/** 5677251881Speter * Add each path in @a paths (recursing to @a depth as necessary) to 5678251881Speter * @a changelist. If a path is already a member of another 5679251881Speter * changelist, then remove it from the other changelist and add it to 5680251881Speter * @a changelist. (For now, a path cannot belong to two changelists 5681251881Speter * at once.) 5682251881Speter * 5683251881Speter * @a paths is an array of (const char *) local WC paths. 5684251881Speter * 5685251881Speter * @a changelists is an array of <tt>const char *</tt> changelist 5686251881Speter * names, used as a restrictive filter on items whose changelist 5687251881Speter * assignments are adjusted; that is, don't tweak the changeset of any 5688251881Speter * item unless it's currently a member of one of those changelists. 5689251881Speter * If @a changelists is empty (or altogether @c NULL), no changelist 5690251881Speter * filtering occurs. 5691251881Speter * 5692251881Speter * @note This metadata is purely a client-side "bookkeeping" 5693251881Speter * convenience, and is entirely managed by the working copy. 5694251881Speter * 5695251881Speter * @since New in 1.5. 5696251881Speter */ 5697251881Spetersvn_error_t * 5698251881Spetersvn_client_add_to_changelist(const apr_array_header_t *paths, 5699251881Speter const char *changelist, 5700251881Speter svn_depth_t depth, 5701251881Speter const apr_array_header_t *changelists, 5702251881Speter svn_client_ctx_t *ctx, 5703251881Speter apr_pool_t *pool); 5704251881Speter 5705251881Speter/** 5706251881Speter * Remove each path in @a paths (recursing to @a depth as necessary) 5707251881Speter * from changelists to which they are currently assigned. 5708251881Speter * 5709251881Speter * @a paths is an array of (const char *) local WC paths. 5710251881Speter * 5711251881Speter * @a changelists is an array of <tt>const char *</tt> changelist 5712251881Speter * names, used as a restrictive filter on items whose changelist 5713251881Speter * assignments are removed; that is, don't remove from a changeset any 5714251881Speter * item unless it's currently a member of one of those changelists. 5715251881Speter * If @a changelists is empty (or altogether @c NULL), all changelist 5716251881Speter * assignments in and under each path in @a paths (to @a depth) will 5717251881Speter * be removed. 5718251881Speter * 5719251881Speter * @note This metadata is purely a client-side "bookkeeping" 5720251881Speter * convenience, and is entirely managed by the working copy. 5721251881Speter * 5722251881Speter * @since New in 1.5. 5723251881Speter */ 5724251881Spetersvn_error_t * 5725251881Spetersvn_client_remove_from_changelists(const apr_array_header_t *paths, 5726251881Speter svn_depth_t depth, 5727251881Speter const apr_array_header_t *changelists, 5728251881Speter svn_client_ctx_t *ctx, 5729251881Speter apr_pool_t *pool); 5730251881Speter 5731251881Speter 5732251881Speter/** 5733251881Speter * Beginning at @a path, crawl to @a depth to discover every path in 5734251881Speter * or under @a path which belongs to one of the changelists in @a 5735251881Speter * changelists (an array of <tt>const char *</tt> changelist names). 5736251881Speter * If @a changelists is @c NULL, discover paths with any changelist. 5737251881Speter * Call @a callback_func (with @a callback_baton) each time a 5738251881Speter * changelist-having path is discovered. 5739251881Speter * 5740251881Speter * @a path is a local WC path. 5741251881Speter * 5742251881Speter * If @a ctx->cancel_func is not @c NULL, invoke it passing @a 5743251881Speter * ctx->cancel_baton during the recursive walk. 5744251881Speter * 5745251881Speter * @since New in 1.5. 5746251881Speter */ 5747251881Spetersvn_error_t * 5748251881Spetersvn_client_get_changelists(const char *path, 5749251881Speter const apr_array_header_t *changelists, 5750251881Speter svn_depth_t depth, 5751251881Speter svn_changelist_receiver_t callback_func, 5752251881Speter void *callback_baton, 5753251881Speter svn_client_ctx_t *ctx, 5754251881Speter apr_pool_t *pool); 5755251881Speter 5756251881Speter/** @} */ 5757251881Speter 5758251881Speter 5759251881Speter 5760251881Speter/** Locking commands 5761251881Speter * 5762251881Speter * @defgroup svn_client_locking_funcs Client Locking Functions 5763251881Speter * @{ 5764251881Speter */ 5765251881Speter 5766251881Speter/** 5767251881Speter * Lock @a targets in the repository. @a targets is an array of 5768251881Speter * <tt>const char *</tt> paths - either all working copy paths or all URLs. 5769251881Speter * All targets must be in the same repository. 5770251881Speter * 5771251881Speter * If a target is already locked in the repository, no lock will be 5772251881Speter * acquired unless @a steal_lock is TRUE, in which case the locks are 5773251881Speter * stolen. @a comment, if non-NULL, is an xml-escapable description 5774251881Speter * stored with each lock in the repository. Each acquired lock will 5775251881Speter * be stored in the working copy if the targets are WC paths. 5776251881Speter * 5777251881Speter * For each target @a ctx->notify_func2/notify_baton2 will be used to indicate 5778251881Speter * whether it was locked. An action of #svn_wc_notify_locked 5779251881Speter * means that the path was locked. If the path was not locked because 5780251881Speter * it was out of date or there was already a lock in the repository, 5781251881Speter * the notification function will be called with 5782251881Speter * #svn_wc_notify_failed_lock, and the error passed in the notification 5783251881Speter * structure. 5784251881Speter * 5785251881Speter * Use @a pool for temporary allocations. 5786251881Speter * 5787251881Speter * @since New in 1.2. 5788251881Speter */ 5789251881Spetersvn_error_t * 5790251881Spetersvn_client_lock(const apr_array_header_t *targets, 5791251881Speter const char *comment, 5792251881Speter svn_boolean_t steal_lock, 5793251881Speter svn_client_ctx_t *ctx, 5794251881Speter apr_pool_t *pool); 5795251881Speter 5796251881Speter/** 5797251881Speter * Unlock @a targets in the repository. @a targets is an array of 5798251881Speter * <tt>const char *</tt> paths - either all working copy paths or all URLs. 5799251881Speter * All targets must be in the same repository. 5800251881Speter * 5801251881Speter * If the targets are WC paths, and @a break_lock is FALSE, the working 5802251881Speter * copy must contain a lock for each target. 5803251881Speter * If this is not the case, or the working copy lock doesn't match the 5804251881Speter * lock token in the repository, an error will be signaled. 5805251881Speter * 5806251881Speter * If the targets are URLs, the locks may be broken even if @a break_lock 5807251881Speter * is FALSE, but only if the lock owner is the same as the 5808251881Speter * authenticated user. 5809251881Speter * 5810251881Speter * If @a break_lock is TRUE, the locks will be broken in the 5811251881Speter * repository. In both cases, the locks, if any, will be removed from 5812251881Speter * the working copy if the targets are WC paths. 5813251881Speter * 5814251881Speter * The notification functions in @a ctx will be called for each 5815251881Speter * target. If the target was successfully unlocked, 5816251881Speter * #svn_wc_notify_unlocked will be used. Else, if the error is 5817251881Speter * directly related to unlocking the path (see 5818251881Speter * #SVN_ERR_IS_UNLOCK_ERROR), #svn_wc_notify_failed_unlock will be 5819251881Speter * used and the error will be passed in the notification structure. 5820251881Speter 5821251881Speter * Use @a pool for temporary allocations. 5822251881Speter * 5823251881Speter * @since New in 1.2. 5824251881Speter */ 5825251881Spetersvn_error_t * 5826251881Spetersvn_client_unlock(const apr_array_header_t *targets, 5827251881Speter svn_boolean_t break_lock, 5828251881Speter svn_client_ctx_t *ctx, 5829251881Speter apr_pool_t *pool); 5830251881Speter 5831251881Speter/** @} */ 5832251881Speter 5833251881Speter/** 5834251881Speter * @defgroup Info Show repository information about a working copy. 5835251881Speter * 5836251881Speter * @{ 5837251881Speter */ 5838251881Speter 5839251881Speter/** The size of the file is unknown. 5840251881Speter * Used as value in fields of type @c apr_size_t in #svn_info_t. 5841251881Speter * 5842251881Speter * @since New in 1.5 5843251881Speter * @deprecated Provided for backward compatibility with the 1.6 API. 5844251881Speter */ 5845251881Speter#define SVN_INFO_SIZE_UNKNOWN ((apr_size_t) -1) 5846251881Speter 5847251881Speter/** 5848251881Speter * A structure which describes various system-generated metadata about 5849251881Speter * a working-copy path or URL. 5850251881Speter * 5851251881Speter * @note Fields may be added to the end of this structure in future 5852251881Speter * versions. Therefore, users shouldn't allocate structures of this 5853251881Speter * type, to preserve binary compatibility. 5854251881Speter * 5855251881Speter * @since New in 1.2. 5856251881Speter * @deprecated Provided for backward compatibility with the 1.6 API. The new 5857251881Speter * API is #svn_client_info2_t. 5858251881Speter */ 5859251881Spetertypedef struct svn_info_t 5860251881Speter{ 5861251881Speter /** Where the item lives in the repository. */ 5862251881Speter const char *URL; 5863251881Speter 5864251881Speter /** The revision of the object. If path_or_url is a working-copy 5865251881Speter * path, then this is its current working revnum. If path_or_url 5866251881Speter * is a URL, then this is the repos revision that path_or_url lives in. */ 5867251881Speter svn_revnum_t rev; 5868251881Speter 5869251881Speter /** The node's kind. */ 5870251881Speter svn_node_kind_t kind; 5871251881Speter 5872251881Speter /** The root URL of the repository. */ 5873251881Speter const char *repos_root_URL; 5874251881Speter 5875251881Speter /** The repository's UUID. */ 5876251881Speter const char *repos_UUID; 5877251881Speter 5878251881Speter /** The last revision in which this object changed. */ 5879251881Speter svn_revnum_t last_changed_rev; 5880251881Speter 5881251881Speter /** The date of the last_changed_rev. */ 5882251881Speter apr_time_t last_changed_date; 5883251881Speter 5884251881Speter /** The author of the last_changed_rev. */ 5885251881Speter const char *last_changed_author; 5886251881Speter 5887251881Speter /** An exclusive lock, if present. Could be either local or remote. */ 5888251881Speter svn_lock_t *lock; 5889251881Speter 5890251881Speter /** Whether or not to ignore the next 10 wc-specific fields. */ 5891251881Speter svn_boolean_t has_wc_info; 5892251881Speter 5893251881Speter /** 5894251881Speter * @name Working-copy path fields 5895251881Speter * These things only apply to a working-copy path. 5896251881Speter * See svn_wc_entry_t for explanations. 5897251881Speter * @{ 5898251881Speter */ 5899251881Speter svn_wc_schedule_t schedule; 5900251881Speter const char *copyfrom_url; 5901251881Speter svn_revnum_t copyfrom_rev; 5902251881Speter apr_time_t text_time; 5903251881Speter apr_time_t prop_time; /* will always be 0 for svn 1.4 and later */ 5904251881Speter const char *checksum; 5905251881Speter const char *conflict_old; 5906251881Speter const char *conflict_new; 5907251881Speter const char *conflict_wrk; 5908251881Speter const char *prejfile; 5909251881Speter /** @since New in 1.5. */ 5910251881Speter const char *changelist; 5911251881Speter /** @since New in 1.5. */ 5912251881Speter svn_depth_t depth; 5913251881Speter 5914251881Speter /** 5915251881Speter * Similar to working_size64, but will be #SVN_INFO_SIZE_UNKNOWN when 5916251881Speter * its value would overflow apr_size_t (so when size >= 4 GB - 1 byte). 5917251881Speter * 5918251881Speter * @deprecated Provided for backward compatibility with the 1.5 API. 5919251881Speter */ 5920251881Speter apr_size_t working_size; 5921251881Speter 5922251881Speter /** @} */ 5923251881Speter 5924251881Speter /** 5925251881Speter * Similar to size64, but size will be #SVN_INFO_SIZE_UNKNOWN when 5926251881Speter * its value would overflow apr_size_t (so when size >= 4 GB - 1 byte). 5927251881Speter * 5928251881Speter * @deprecated Provided for backward compatibility with the 1.5 API. 5929251881Speter */ 5930251881Speter apr_size_t size; 5931251881Speter 5932251881Speter /** 5933251881Speter * The size of the file in the repository (untranslated, 5934251881Speter * e.g. without adjustment of line endings and keyword 5935251881Speter * expansion). Only applicable for file -- not directory -- URLs. 5936251881Speter * For working copy paths, size64 will be #SVN_INVALID_FILESIZE. 5937251881Speter * @since New in 1.6. 5938251881Speter */ 5939251881Speter svn_filesize_t size64; 5940251881Speter 5941251881Speter /** 5942251881Speter * The size of the file after being translated into its local 5943251881Speter * representation, or #SVN_INVALID_FILESIZE if unknown. 5944251881Speter * Not applicable for directories. 5945251881Speter * @since New in 1.6. 5946251881Speter * @name Working-copy path fields 5947251881Speter * @{ 5948251881Speter */ 5949251881Speter svn_filesize_t working_size64; 5950251881Speter 5951251881Speter /** 5952251881Speter * Info on any tree conflict of which this node is a victim. Otherwise NULL. 5953251881Speter * @since New in 1.6. 5954251881Speter */ 5955251881Speter svn_wc_conflict_description_t *tree_conflict; 5956251881Speter 5957251881Speter /** @} */ 5958251881Speter 5959251881Speter} svn_info_t; 5960251881Speter 5961251881Speter 5962251881Speter/** 5963251881Speter * The callback invoked by svn_client_info2(). Each invocation 5964251881Speter * describes @a path with the information present in @a info. Note 5965251881Speter * that any fields within @a info may be NULL if information is 5966251881Speter * unavailable. Use @a pool for all temporary allocation. 5967251881Speter * 5968251881Speter * @since New in 1.2. 5969251881Speter * @deprecated Provided for backward compatibility with the 1.6 API. The new 5970251881Speter * API is #svn_client_info_receiver2_t. 5971251881Speter */ 5972251881Spetertypedef svn_error_t *(*svn_info_receiver_t)( 5973251881Speter void *baton, 5974251881Speter const char *path, 5975251881Speter const svn_info_t *info, 5976251881Speter apr_pool_t *pool); 5977251881Speter 5978251881Speter/** 5979251881Speter * Return a duplicate of @a info, allocated in @a pool. No part of the new 5980251881Speter * structure will be shared with @a info. 5981251881Speter * 5982251881Speter * @since New in 1.3. 5983251881Speter * @deprecated Provided for backward compatibility with the 1.6 API. The new 5984251881Speter * API is #svn_client_info2_dup(). 5985251881Speter */ 5986251881SpeterSVN_DEPRECATED 5987251881Spetersvn_info_t * 5988251881Spetersvn_info_dup(const svn_info_t *info, 5989251881Speter apr_pool_t *pool); 5990251881Speter 5991251881Speter/** 5992251881Speter * A structure which describes various system-generated metadata about 5993251881Speter * a working-copy path or URL. 5994251881Speter * 5995251881Speter * @note Fields may be added to the end of this structure in future 5996251881Speter * versions. Therefore, users shouldn't allocate structures of this 5997251881Speter * type, to preserve binary compatibility. 5998251881Speter * 5999251881Speter * @since New in 1.7. 6000251881Speter */ 6001251881Spetertypedef struct svn_client_info2_t 6002251881Speter{ 6003251881Speter /** Where the item lives in the repository. */ 6004251881Speter const char *URL; 6005251881Speter 6006251881Speter /** The revision of the object. If the target is a working-copy 6007251881Speter * path, then this is its current working revnum. If the target 6008251881Speter * is a URL, then this is the repos revision that it lives in. */ 6009251881Speter svn_revnum_t rev; 6010251881Speter 6011251881Speter /** The root URL of the repository. */ 6012251881Speter const char *repos_root_URL; 6013251881Speter 6014251881Speter /** The repository's UUID. */ 6015251881Speter const char *repos_UUID; 6016251881Speter 6017251881Speter /** The node's kind. */ 6018251881Speter svn_node_kind_t kind; 6019251881Speter 6020251881Speter /** The size of the file in the repository (untranslated, 6021251881Speter * e.g. without adjustment of line endings and keyword 6022251881Speter * expansion). Only applicable for file -- not directory -- URLs. 6023251881Speter * For working copy paths, @a size will be #SVN_INVALID_FILESIZE. */ 6024251881Speter svn_filesize_t size; 6025251881Speter 6026251881Speter /** The last revision in which this object changed. */ 6027251881Speter svn_revnum_t last_changed_rev; 6028251881Speter 6029251881Speter /** The date of the last_changed_rev. */ 6030251881Speter apr_time_t last_changed_date; 6031251881Speter 6032251881Speter /** The author of the last_changed_rev. */ 6033251881Speter const char *last_changed_author; 6034251881Speter 6035251881Speter /** An exclusive lock, if present. Could be either local or remote. */ 6036251881Speter const svn_lock_t *lock; 6037251881Speter 6038251881Speter /** Possible information about the working copy, NULL if not valid. */ 6039251881Speter const svn_wc_info_t *wc_info; 6040251881Speter 6041251881Speter} svn_client_info2_t; 6042251881Speter 6043251881Speter/** 6044251881Speter * Return a duplicate of @a info, allocated in @a pool. No part of the new 6045251881Speter * structure will be shared with @a info. 6046251881Speter * 6047251881Speter * @since New in 1.7. 6048251881Speter */ 6049251881Spetersvn_client_info2_t * 6050251881Spetersvn_client_info2_dup(const svn_client_info2_t *info, 6051251881Speter apr_pool_t *pool); 6052251881Speter 6053251881Speter/** 6054251881Speter * The callback invoked by info retrievers. Each invocation 6055251881Speter * describes @a abspath_or_url with the information present in @a info. 6056251881Speter * Use @a scratch_pool for all temporary allocation. 6057251881Speter * 6058251881Speter * @since New in 1.7. 6059251881Speter */ 6060251881Spetertypedef svn_error_t *(*svn_client_info_receiver2_t)( 6061251881Speter void *baton, 6062251881Speter const char *abspath_or_url, 6063251881Speter const svn_client_info2_t *info, 6064251881Speter apr_pool_t *scratch_pool); 6065251881Speter 6066251881Speter/** 6067251881Speter * Invoke @a receiver with @a receiver_baton to return information 6068251881Speter * about @a abspath_or_url in @a revision. The information returned is 6069251881Speter * system-generated metadata, not the sort of "property" metadata 6070251881Speter * created by users. See #svn_client_info2_t. 6071251881Speter * 6072251881Speter * If both revision arguments are either #svn_opt_revision_unspecified 6073251881Speter * or @c NULL, then information will be pulled solely from the working copy; 6074251881Speter * no network connections will be made. 6075251881Speter * 6076251881Speter * Otherwise, information will be pulled from a repository. The 6077251881Speter * actual node revision selected is determined by the @a abspath_or_url 6078251881Speter * as it exists in @a peg_revision. If @a peg_revision->kind is 6079251881Speter * #svn_opt_revision_unspecified, then it defaults to 6080251881Speter * #svn_opt_revision_head for URLs or #svn_opt_revision_working for 6081251881Speter * WC targets. 6082251881Speter * 6083251881Speter * If @a abspath_or_url is not a local path, then if @a revision is of 6084251881Speter * kind #svn_opt_revision_previous (or some other kind that requires 6085251881Speter * a local path), an error will be returned, because the desired 6086251881Speter * revision cannot be determined. 6087251881Speter * 6088251881Speter * Use the authentication baton cached in @a ctx to authenticate 6089251881Speter * against the repository. 6090251881Speter * 6091251881Speter * If @a abspath_or_url is a file, just invoke @a receiver on it. If it 6092251881Speter * is a directory, then descend according to @a depth. If @a depth is 6093251881Speter * #svn_depth_empty, invoke @a receiver on @a abspath_or_url and 6094251881Speter * nothing else; if #svn_depth_files, on @a abspath_or_url and its 6095251881Speter * immediate file children; if #svn_depth_immediates, the preceding 6096251881Speter * plus on each immediate subdirectory; if #svn_depth_infinity, then 6097251881Speter * recurse fully, invoking @a receiver on @a abspath_or_url and 6098251881Speter * everything beneath it. 6099251881Speter * 6100251881Speter * If @a fetch_excluded is TRUE, also also send excluded nodes in the working 6101251881Speter * copy to @a receiver, otherwise these are skipped. If @a fetch_actual_only 6102251881Speter * is TRUE also send nodes that don't exist as versioned but are still 6103251881Speter * tree conflicted. 6104251881Speter * 6105251881Speter * @a changelists is an array of <tt>const char *</tt> changelist 6106251881Speter * names, used as a restrictive filter on items whose info is 6107251881Speter * reported; that is, don't report info about any item unless 6108251881Speter * it's a member of one of those changelists. If @a changelists is 6109251881Speter * empty (or altogether @c NULL), no changelist filtering occurs. 6110251881Speter * 6111251881Speter * @since New in 1.7. 6112251881Speter */ 6113251881Spetersvn_error_t * 6114251881Spetersvn_client_info3(const char *abspath_or_url, 6115251881Speter const svn_opt_revision_t *peg_revision, 6116251881Speter const svn_opt_revision_t *revision, 6117251881Speter svn_depth_t depth, 6118251881Speter svn_boolean_t fetch_excluded, 6119251881Speter svn_boolean_t fetch_actual_only, 6120251881Speter const apr_array_header_t *changelists, 6121251881Speter svn_client_info_receiver2_t receiver, 6122251881Speter void *receiver_baton, 6123251881Speter svn_client_ctx_t *ctx, 6124251881Speter apr_pool_t *scratch_pool); 6125251881Speter 6126251881Speter/** Similar to svn_client_info3, but uses an svn_info_receiver_t instead of 6127251881Speter * a #svn_client_info_receiver2_t, and @a path_or_url may be a relative path. 6128251881Speter * 6129251881Speter * @since New in 1.5. 6130251881Speter * @deprecated Provided for backward compatibility with the 1.6 API. 6131251881Speter */ 6132251881SpeterSVN_DEPRECATED 6133251881Spetersvn_error_t * 6134251881Spetersvn_client_info2(const char *path_or_url, 6135251881Speter const svn_opt_revision_t *peg_revision, 6136251881Speter const svn_opt_revision_t *revision, 6137251881Speter svn_info_receiver_t receiver, 6138251881Speter void *receiver_baton, 6139251881Speter svn_depth_t depth, 6140251881Speter const apr_array_header_t *changelists, 6141251881Speter svn_client_ctx_t *ctx, 6142251881Speter apr_pool_t *pool); 6143251881Speter 6144251881Speter/** 6145251881Speter * Similar to svn_client_info2() but with @a changelists passed as @c 6146251881Speter * NULL, and @a depth set according to @a recurse: if @a recurse is 6147251881Speter * TRUE, @a depth is #svn_depth_infinity, else #svn_depth_empty. 6148251881Speter * 6149251881Speter * @deprecated Provided for backward compatibility with the 1.4 API. 6150251881Speter */ 6151251881SpeterSVN_DEPRECATED 6152251881Spetersvn_error_t * 6153251881Spetersvn_client_info(const char *path_or_url, 6154251881Speter const svn_opt_revision_t *peg_revision, 6155251881Speter const svn_opt_revision_t *revision, 6156251881Speter svn_info_receiver_t receiver, 6157251881Speter void *receiver_baton, 6158251881Speter svn_boolean_t recurse, 6159251881Speter svn_client_ctx_t *ctx, 6160251881Speter apr_pool_t *pool); 6161251881Speter 6162251881Speter/** 6163251881Speter * Set @a *wcroot_abspath to the local abspath of the root of the 6164251881Speter * working copy in which @a local_abspath resides. 6165251881Speter * 6166251881Speter * @since New in 1.7. 6167251881Speter */ 6168251881Spetersvn_error_t * 6169251881Spetersvn_client_get_wc_root(const char **wcroot_abspath, 6170251881Speter const char *local_abspath, 6171251881Speter svn_client_ctx_t *ctx, 6172251881Speter apr_pool_t *result_pool, 6173251881Speter apr_pool_t *scratch_pool); 6174251881Speter 6175251881Speter/** 6176251881Speter * Set @a *min_revision and @a *max_revision to the lowest and highest 6177251881Speter * revision numbers found within @a local_abspath. If @a committed is 6178251881Speter * TRUE, set @a *min_revision and @a *max_revision to the lowest and 6179251881Speter * highest comitted (i.e. "last changed") revision numbers, 6180251881Speter * respectively. NULL may be passed for either of @a min_revision and 6181251881Speter * @a max_revision to indicate the caller's lack of interest in the 6182251881Speter * value. Use @a scratch_pool for temporary allocations. 6183251881Speter * 6184251881Speter * @since New in 1.7. 6185251881Speter */ 6186251881Spetersvn_error_t * 6187251881Spetersvn_client_min_max_revisions(svn_revnum_t *min_revision, 6188251881Speter svn_revnum_t *max_revision, 6189251881Speter const char *local_abspath, 6190251881Speter svn_boolean_t committed, 6191251881Speter svn_client_ctx_t *ctx, 6192251881Speter apr_pool_t *scratch_pool); 6193251881Speter 6194251881Speter/** @} */ 6195251881Speter 6196251881Speter 6197251881Speter/** 6198251881Speter * @defgroup Patch Apply a patch to the working copy 6199251881Speter * 6200251881Speter * @{ 6201251881Speter */ 6202251881Speter 6203251881Speter/** 6204251881Speter * The callback invoked by svn_client_patch() before attempting to patch 6205251881Speter * the target file at @a canon_path_from_patchfile (the path as parsed from 6206251881Speter * the patch file, but in canonicalized form). The callback can set 6207251881Speter * @a *filtered to @c TRUE to prevent the file from being patched, or else 6208251881Speter * must set it to @c FALSE. 6209251881Speter * 6210251881Speter * The callback is also provided with @a patch_abspath, the path of a 6211251881Speter * temporary file containing the patched result, and with @a reject_abspath, 6212251881Speter * the path to a temporary file containing the diff text of any hunks 6213251881Speter * which were rejected during patching. 6214251881Speter * 6215251881Speter * Because the callback is invoked before the patching attempt is made, 6216251881Speter * there is no guarantee that the target file will actually be patched 6217251881Speter * successfully. Client implementations must pay attention to notification 6218251881Speter * feedback provided by svn_client_patch() to find out which paths were 6219251881Speter * patched successfully. 6220251881Speter * 6221251881Speter * Note also that the files at @a patch_abspath and @a reject_abspath are 6222251881Speter * guaranteed to remain on disk after patching only if the 6223251881Speter * @a remove_tempfiles parameter for svn_client_patch() is @c FALSE. 6224251881Speter * 6225251881Speter * The const char * parameters may be allocated in @a scratch_pool which 6226251881Speter * will be cleared after each invocation. 6227251881Speter * 6228251881Speter * @since New in 1.7. 6229251881Speter */ 6230251881Spetertypedef svn_error_t *(*svn_client_patch_func_t)( 6231251881Speter void *baton, 6232251881Speter svn_boolean_t *filtered, 6233251881Speter const char *canon_path_from_patchfile, 6234251881Speter const char *patch_abspath, 6235251881Speter const char *reject_abspath, 6236251881Speter apr_pool_t *scratch_pool); 6237251881Speter 6238251881Speter/** 6239251881Speter * Apply a unidiff patch that's located at absolute path 6240251881Speter * @a patch_abspath to the working copy directory at @a wc_dir_abspath. 6241251881Speter * 6242251881Speter * This function makes a best-effort attempt at applying the patch. 6243251881Speter * It might skip patch targets which cannot be patched (e.g. targets 6244251881Speter * that are outside of the working copy). It will also reject hunks 6245251881Speter * which cannot be applied to a target in case the hunk's context 6246251881Speter * does not match anywhere in the patch target. 6247251881Speter * 6248251881Speter * If @a dry_run is TRUE, the patching process is carried out, and full 6249251881Speter * notification feedback is provided, but the working copy is not modified. 6250251881Speter * 6251251881Speter * @a strip_count specifies how many leading path components should be 6252251881Speter * stripped from paths obtained from the patch. It is an error if a 6253251881Speter * negative strip count is passed. 6254251881Speter * 6255251881Speter * If @a reverse is @c TRUE, apply patches in reverse, deleting lines 6256251881Speter * the patch would add and adding lines the patch would delete. 6257251881Speter * 6258251881Speter * If @a ignore_whitespace is TRUE, allow patches to be applied if they 6259251881Speter * only differ from the target by whitespace. 6260251881Speter * 6261251881Speter * If @a remove_tempfiles is TRUE, lifetimes of temporary files created 6262251881Speter * during patching will be managed internally. Otherwise, the caller should 6263251881Speter * take ownership of these files, the names of which can be obtained by 6264251881Speter * passing a @a patch_func callback. 6265251881Speter * 6266251881Speter * If @a patch_func is non-NULL, invoke @a patch_func with @a patch_baton 6267251881Speter * for each patch target processed. 6268251881Speter * 6269251881Speter * If @a ctx->notify_func2 is non-NULL, invoke @a ctx->notify_func2 with 6270251881Speter * @a ctx->notify_baton2 as patching progresses. 6271251881Speter * 6272251881Speter * If @a ctx->cancel_func is non-NULL, invoke it passing @a 6273251881Speter * ctx->cancel_baton at various places during the operation. 6274251881Speter * 6275251881Speter * Use @a scratch_pool for temporary allocations. 6276251881Speter * 6277251881Speter * @since New in 1.7. 6278251881Speter */ 6279251881Spetersvn_error_t * 6280251881Spetersvn_client_patch(const char *patch_abspath, 6281251881Speter const char *wc_dir_abspath, 6282251881Speter svn_boolean_t dry_run, 6283251881Speter int strip_count, 6284251881Speter svn_boolean_t reverse, 6285251881Speter svn_boolean_t ignore_whitespace, 6286251881Speter svn_boolean_t remove_tempfiles, 6287251881Speter svn_client_patch_func_t patch_func, 6288251881Speter void *patch_baton, 6289251881Speter svn_client_ctx_t *ctx, 6290251881Speter apr_pool_t *scratch_pool); 6291251881Speter 6292251881Speter/** @} */ 6293251881Speter 6294251881Speter/** @} end group: Client working copy management */ 6295251881Speter 6296251881Speter/** 6297251881Speter * 6298251881Speter * @defgroup clnt_sessions Client session related functions 6299251881Speter * 6300251881Speter * @{ 6301251881Speter * 6302251881Speter */ 6303251881Speter 6304251881Speter 6305251881Speter/* Converting paths to URLs. */ 6306251881Speter 6307251881Speter/** Set @a *url to the URL for @a path_or_url allocated in result_pool. 6308251881Speter * 6309251881Speter * If @a path_or_url is already a URL, set @a *url to @a path_or_url. 6310251881Speter * 6311251881Speter * If @a path_or_url is a versioned item, set @a *url to @a 6312251881Speter * path_or_url's entry URL. If @a path_or_url is unversioned (has 6313251881Speter * no entry), set @a *url to NULL. 6314251881Speter * 6315251881Speter * Use @a ctx->wc_ctx to retrieve the information. Use 6316251881Speter ** @a scratch_pool for temporary allocations. 6317251881Speter * 6318251881Speter * @since New in 1.7. 6319251881Speter */ 6320251881Spetersvn_error_t * 6321251881Spetersvn_client_url_from_path2(const char **url, 6322251881Speter const char *path_or_url, 6323251881Speter svn_client_ctx_t *ctx, 6324251881Speter apr_pool_t *result_pool, 6325251881Speter apr_pool_t *scratch_pool); 6326251881Speter 6327251881Speter/** Similar to svn_client_url_from_path2(), but without a context argument. 6328251881Speter * 6329251881Speter * @since New in 1.5. 6330251881Speter * @deprecated Provided for backward compatibility with the 1.6 API. 6331251881Speter */ 6332251881SpeterSVN_DEPRECATED 6333251881Spetersvn_error_t * 6334251881Spetersvn_client_url_from_path(const char **url, 6335251881Speter const char *path_or_url, 6336251881Speter apr_pool_t *pool); 6337251881Speter 6338251881Speter 6339251881Speter 6340251881Speter/* Fetching a repository's root URL and UUID. */ 6341251881Speter 6342251881Speter/** Set @a *repos_root_url and @a *repos_uuid, to the root URL and UUID of 6343251881Speter * the repository in which @a abspath_or_url is versioned. Use the 6344251881Speter * authentication baton and working copy context cached in @a ctx as 6345251881Speter * necessary. @a repos_root_url and/or @a repos_uuid may be NULL if not 6346251881Speter * wanted. 6347251881Speter * 6348251881Speter * This function will open a temporary RA session to the repository if 6349251881Speter * necessary to get the information. 6350251881Speter * 6351251881Speter * Allocate @a *repos_root_url and @a *repos_uuid in @a result_pool. 6352251881Speter * Use @a scratch_pool for temporary allocations. 6353251881Speter * 6354251881Speter * @since New in 1.8. 6355251881Speter */ 6356251881Spetersvn_error_t * 6357251881Spetersvn_client_get_repos_root(const char **repos_root_url, 6358251881Speter const char **repos_uuid, 6359251881Speter const char *abspath_or_url, 6360251881Speter svn_client_ctx_t *ctx, 6361251881Speter apr_pool_t *result_pool, 6362251881Speter apr_pool_t *scratch_pool); 6363251881Speter 6364251881Speter/** Set @a *url to the repository root URL of the repository in which 6365251881Speter * @a path_or_url is versioned (or scheduled to be versioned), 6366251881Speter * allocated in @a pool. @a ctx is required for possible repository 6367251881Speter * authentication. 6368251881Speter * 6369251881Speter * @since New in 1.5. 6370251881Speter * @deprecated Provided for backward compatibility with the 1.7 API. Use 6371251881Speter * svn_client_get_repos_root() instead, with an absolute path. 6372251881Speter */ 6373251881SpeterSVN_DEPRECATED 6374251881Spetersvn_error_t * 6375251881Spetersvn_client_root_url_from_path(const char **url, 6376251881Speter const char *path_or_url, 6377251881Speter svn_client_ctx_t *ctx, 6378251881Speter apr_pool_t *pool); 6379251881Speter 6380251881Speter/** Get repository @a uuid for @a url. 6381251881Speter * 6382251881Speter * Use a @a pool to open a temporary RA session to @a url, discover the 6383251881Speter * repository uuid, and free the session. Return the uuid in @a uuid, 6384251881Speter * allocated in @a pool. @a ctx is required for possible repository 6385251881Speter * authentication. 6386251881Speter * 6387251881Speter * @deprecated Provided for backward compatibility with the 1.7 API. Use 6388251881Speter * svn_client_get_repos_root() instead. 6389251881Speter */ 6390251881SpeterSVN_DEPRECATED 6391251881Spetersvn_error_t * 6392251881Spetersvn_client_uuid_from_url(const char **uuid, 6393251881Speter const char *url, 6394251881Speter svn_client_ctx_t *ctx, 6395251881Speter apr_pool_t *pool); 6396251881Speter 6397251881Speter 6398251881Speter/** Return the repository @a uuid for working-copy @a local_abspath, 6399251881Speter * allocated in @a result_pool. Use @a ctx->wc_ctx to retrieve the 6400251881Speter * information. 6401251881Speter * 6402251881Speter * Use @a scratch_pool for temporary allocations. 6403251881Speter * 6404251881Speter * @since New in 1.7. 6405251881Speter * @deprecated Provided for backward compatibility with the 1.7 API. Use 6406251881Speter * svn_client_get_repos_root() instead. 6407251881Speter */ 6408251881SpeterSVN_DEPRECATED 6409251881Spetersvn_error_t * 6410251881Spetersvn_client_uuid_from_path2(const char **uuid, 6411251881Speter const char *local_abspath, 6412251881Speter svn_client_ctx_t *ctx, 6413251881Speter apr_pool_t *result_pool, 6414251881Speter apr_pool_t *scratch_pool); 6415251881Speter 6416251881Speter/** Similar to svn_client_uuid_from_path2(), but with a relative path and 6417251881Speter * an access baton. 6418251881Speter * 6419251881Speter * @deprecated Provided for backward compatibility with the 1.6 API. 6420251881Speter */ 6421251881SpeterSVN_DEPRECATED 6422251881Spetersvn_error_t * 6423251881Spetersvn_client_uuid_from_path(const char **uuid, 6424251881Speter const char *path, 6425251881Speter svn_wc_adm_access_t *adm_access, 6426251881Speter svn_client_ctx_t *ctx, 6427251881Speter apr_pool_t *pool); 6428251881Speter 6429251881Speter 6430251881Speter/* Opening RA sessions. */ 6431251881Speter 6432251881Speter/** Open an RA session rooted at @a url, and return it in @a *session. 6433251881Speter * 6434251881Speter * Use the authentication baton stored in @a ctx for authentication. 6435251881Speter * @a *session is allocated in @a result_pool. 6436251881Speter * 6437251881Speter * If @a wri_abspath is not NULL, use the working copy identified by @a 6438251881Speter * wri_abspath to potentially avoid transferring unneeded data. 6439251881Speter * 6440251881Speter * @note This function is similar to svn_ra_open4(), but the caller avoids 6441251881Speter * having to providing its own callback functions. 6442251881Speter * @since New in 1.8. 6443251881Speter */ 6444251881Spetersvn_error_t * 6445251881Spetersvn_client_open_ra_session2(svn_ra_session_t **session, 6446251881Speter const char *url, 6447251881Speter const char *wri_abspath, 6448251881Speter svn_client_ctx_t *ctx, 6449251881Speter apr_pool_t *result_pool, 6450251881Speter apr_pool_t *scratch_pool); 6451251881Speter 6452251881Speter/** Similar to svn_client_open_ra_session(), but with @ wri_abspath 6453251881Speter * always passed as NULL, and with the same pool used as both @a 6454251881Speter * result_pool and @a scratch_pool. 6455251881Speter * 6456251881Speter * @since New in 1.3. 6457251881Speter * @deprecated Provided for backward compatibility with the 1.7 API. 6458251881Speter */ 6459251881SpeterSVN_DEPRECATED 6460251881Spetersvn_error_t * 6461251881Spetersvn_client_open_ra_session(svn_ra_session_t **session, 6462251881Speter const char *url, 6463251881Speter svn_client_ctx_t *ctx, 6464251881Speter apr_pool_t *pool); 6465251881Speter 6466251881Speter 6467251881Speter/** @} end group: Client session related functions */ 6468251881Speter 6469251881Speter/** @} */ 6470251881Speter 6471251881Speter#ifdef __cplusplus 6472251881Speter} 6473251881Speter#endif /* __cplusplus */ 6474251881Speter 6475251881Speter#endif /* SVN_CLIENT_H */ 6476